From 8013f336953ea2bd48417e89f8ab6d3b88071cba Mon Sep 17 00:00:00 2001 From: taiga-family-bot <140712314+taiga-family-bot@users.noreply.github.com> Date: Tue, 25 Jun 2024 10:16:02 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20taiga-fa?= =?UTF-8?q?mily/preview-landing-components@4e5513bd2e08849200c09092fd64b15?= =?UTF-8?q?1beae7ef7=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chunk-FEQBHM2J.js => chunk-3GE2UJOD.js | 4 ++-- ...k-FEQBHM2J.js.map => chunk-3GE2UJOD.js.map | 0 chunk-7Z3ZNFQW.js => chunk-DFAUMSGH.js | 20 +++++++++---------- ...k-7Z3ZNFQW.js.map => chunk-DFAUMSGH.js.map | 2 +- index.csr.html | 2 +- index.html | 4 ++-- main-EMD2MDEP.js => main-LXQ3UEIO.js | 6 +++--- main-EMD2MDEP.js.map => main-LXQ3UEIO.js.map | 0 8 files changed, 19 insertions(+), 19 deletions(-) rename chunk-FEQBHM2J.js => chunk-3GE2UJOD.js (99%) rename chunk-FEQBHM2J.js.map => chunk-3GE2UJOD.js.map (100%) rename chunk-7Z3ZNFQW.js => chunk-DFAUMSGH.js (85%) rename chunk-7Z3ZNFQW.js.map => chunk-DFAUMSGH.js.map (67%) rename main-EMD2MDEP.js => main-LXQ3UEIO.js (99%) rename main-EMD2MDEP.js.map => main-LXQ3UEIO.js.map (100%) diff --git a/chunk-FEQBHM2J.js b/chunk-3GE2UJOD.js similarity index 99% rename from chunk-FEQBHM2J.js rename to chunk-3GE2UJOD.js index 0a55b233..1f78a9cc 100644 --- a/chunk-FEQBHM2J.js +++ b/chunk-3GE2UJOD.js @@ -1,5 +1,5 @@ -import{$ as se,$a as mn,A as Re,Aa as en,Ab as In,B as He,Bb as Dn,C as Ni,Cb as Sn,D as ji,Db as En,E as dt,Eb as zn,F as Le,Fa as de,Fb as Vn,G as Ne,Ga as ce,Gb as An,H as je,Ha as tn,Hb as Fn,Ia as $e,Ib as Rn,Ja as Ue,Jb as Hn,Ka as Ct,Kb as Ln,M as ct,Ma as Wt,N as pt,Na as nn,O as mt,Oa as on,P as gt,Pa as bt,Q as Bi,Qa as rn,R as ht,Ra as an,S as Lt,Sa as sn,T as Nt,Ta as ln,U as Wi,Ua as un,V as $i,Va as Mt,W as jt,Wa as dn,X as Z,Xa as cn,Y as ae,Ya as Ye,Z as Bt,Za as Ke,_ as Ze,_a as pn,aa as le,ab as Pt,ba as Ui,bb as Tt,c as _i,cb as Ge,db as Qe,eb as gn,f as ki,fa as Be,fb as hn,g as Me,ga as Yi,gb as _n,h as Pe,ha as Ki,hb as fn,i as Si,ia as _t,j as Ei,ja as Oe,jb as qe,k as ye,ka as J,kb as yt,lb as vn,m as zi,mb as Cn,n as Fe,nb as Ot,o as st,oa as ft,ob as bn,p as lt,pa as Gi,pb as Mn,qa as Qi,qb as Pn,ra as vt,rb as $t,sb as Tn,t as ut,ta as qi,tb as yn,u as Vi,ua as Xi,ub as Ut,v as Ai,va as We,vb as wt,w as Fi,wb as On,x as Ri,xb as wn,y as Hi,ya as Zi,yb as xn,z as Li,za as Ji,zb as kn}from"./chunk-7Z3ZNFQW.js";import{Aa as xe,Ga as Di,I as Ae,J as at,Ka as Yt,T as Oi,V as wi,W as xi,aa as Ii,n as X,o as Rt,p as gi,q as hi,qa as Te,ta as Ht}from"./chunk-HJXCO6QW.js";import"./chunk-J5MQQQCD.js";import{$c as bi,Ab as d,Ad as yi,Bb as m,Cb as x,Da as c,Db as j,Dc as Ee,Ea as p,Eb as B,Ec as U,Fb as Vt,Ga as ii,Gb as P,Ha as ni,Hb as ot,Hc as ue,J as ei,Ja as A,Jb as _,Kb as l,Kc as I,La as D,Lb as ee,Mb as W,Nb as At,Ob as F,Pb as z,Qb as V,Qc as ze,Rb as Q,Rc as oe,Sb as w,Sc as ve,Tb as rt,Tc as re,Ub as q,Uc as pi,Vc as mi,Wb as te,Wc as Ce,Xb as ie,Xc as fi,Yb as ne,Yc as vi,Zb as R,_b as li,_c as Ci,aa as we,ac as fe,bb as oi,bd as be,cb as ri,cc as ui,dc as S,ec as $,fc as Ft,ga as ti,hb as u,hc as di,ia as b,ib as g,ic as ci,jc as K,kb as ai,kd as Ve,la as zt,m as tt,na as _e,pd as Mi,qb as si,sb as Y,sc as G,sd as Pi,t as he,ta as y,td as Ti,ua as M,va as me,vb as v,wa as nt,wb as k,xb as s,y as Jt,yb as ge,z as it,zb as T}from"./chunk-5EVGTXYE.js";import"./chunk-GOOAHOWT.js";var Nn=(()=>{class i{constructor(e,t,n){this.el=e,this.zone=t,this.destroy$=n,this.eventName=""}ngOnInit(){Jt(this.el.nativeElement,this.eventName,{passive:!1}).pipe(xi(this.zone),Oi(),we(this.destroy$)).subscribe()}}return i.\u0275fac=function(e){return new(e||i)(g(A),g(si),g(xe,2))},i.\u0275dir=me({type:i,selectors:[["","tuiPreventDefault",""]],inputs:{eventName:[0,"tuiPreventDefault","eventName"]},features:[R([xe])]}),i})(),jn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({}),i})();var Bn=(()=>{class i{constructor(e,t){this.el=e,this.destroy$=t}set tuiScrollIntoView(e){e&&it(0).pipe(we(this.destroy$)).subscribe(()=>{this.el.nativeElement.dispatchEvent(new CustomEvent(Yi,{bubbles:!0,detail:this.el.nativeElement}))})}}return i.\u0275fac=function(e){return new(e||i)(g(A),g(xe,2))},i.\u0275dir=me({type:i,selectors:[["","tuiScrollIntoView",""]],inputs:{tuiScrollIntoView:"tuiScrollIntoView"},features:[R([xe])]}),i})(),Wn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({}),i})();function zo(i,o){if(i&1){let e=P();d(0,"div",4),_("click",function(){let n=c(e).tuiLet,r=l(3);return p(r.onItemClick(n))})("tuiHoveredChange",function(n){let r=c(e).tuiLet,a=l(3);return p(a.onItemHovered(n,r))})("tuiPressedChange",function(n){let r=c(e).tuiLet,a=l(3);return p(a.onItemPressed(n,r))}),d(1,"div",5),w(2),m()()}if(i&2){let e=o.tuiLet,t=l(3);T("t-cell_interval",t.itemIsInterval(e))("t-cell_today",t.itemIsToday(e)),s("tuiScrollIntoView",t.scrollItemIntoView(e)),k("data-range",t.getItemRange(e))("data-state",t.getItemState(e)),u(2),rt(e)}}function Vo(i,o){if(i&1&&(j(0),v(1,zo,3,8,"div",3),B()),i&2){let e=o.$implicit,t=l().$implicit,n=l();u(),s("tuiLet",n.getItem(t,e))}}function Ao(i,o){i&1&&(d(0,"div",1),v(1,Vo,2,1,"ng-container",2),m()),i&2&&(u(),s("tuiRepeatTimesOf",4))}var $n=100,Un=4,Yn=(()=>{class i{constructor(){this.hoveredItem=null,this.pressedItem=null,this.currentYear=Z.currentLocal().year,this.value=null,this.initialItem=Z.currentLocal(),this.min=se,this.max=le,this.disabledItemHandler=X,this.yearClick=new D}get computedMin(){var e;return(e=this.min)!==null&&e!==void 0?e:se}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)/Un)}get calculatedMin(){let e=this.initialItem.year-$n,t=this.computedMin;return t.year>e?t.year:e}get calculatedMax(){let e=this.initialItem.year+$n,t=this.computedMax;return t.yeart.from.year&&t.from.year===e&&t.from.yearSame(t.to)||n!==null&&n===e&&nt.from.year&&t.from.yearSame(t.to)?J.End:t.from.yearSame(t.to)&&t.from.year===e?J.Single:null:t.find(r=>r.year===e)?J.Single:null}itemIsToday(e){return this.currentYear===e}itemIsInterval(e){let{value:t,hoveredItem:n}=this;return t===null||!this.isRange(t)?!1:t.from.yearSame(t.to)?n===null||t.from.year===n?!1:vi(e,Math.min(t.from.year,n),Math.max(t.from.year,n)):t.from.year<=e&&t.to.year>e}onItemHovered(e,t){this.updateHoveredItem(e,t)}onItemPressed(e,t){this.updatePressedItem(e,t)}onItemClick(e){this.yearClick.emit(new jt(e))}updateHoveredItem(e,t){this.hoveredItem=e?t:null}updatePressedItem(e,t){this.pressedItem=e?t:null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=y({type:i,selectors:[["tui-primitive-year-picker"]],hostVars:2,hostBindings:function(e,t){e&2&&T("_single",t.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,"click","tuiHoveredChange","tuiPressedChange","tuiScrollIntoView"],[1,"t-item"]],template:function(e,t){e&1&&v(0,Ao,2,1,"div",0),e&2&&s("tuiRepeatTimesOf",t.rows)},dependencies:[mt,Ne,Bn,dt,ct],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}),i})(),Kn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[Le,pt,gt,je,Wn]]}),i})();var Ro=["*"];function Ho(i,o){if(i&1){let e=P();j(0),d(1,"button",1),_("click",function(){c(e);let n=l();return p(n.onLeftClick())}),m(),d(2,"span",2),W(3),m(),d(4,"button",3),_("click",function(){c(e);let n=l();return p(n.onRightClick())}),m(),B()}if(i&2){let e=o.ngIf,t=l();u(),T("t-hidden",t.leftComputedDisabled),s("focusable",t.computedFocusable)("icon",t.icons.decrement)("title",e[0]),u(3),T("t-hidden",t.rightComputedDisabled),s("focusable",t.computedFocusable)("icon",t.icons.increment)("title",e[1])}}var Gn=(()=>{class i extends Si{constructor(e,t,n){super(),this.el=e,this.icons=t,this.spinTexts$=n,this.disabled=!1,this.leftDisabled=!1,this.rightDisabled=!1,this.leftClick=new D,this.rightClick=new D}get focused(){return at(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 i.\u0275fac=function(e){return new(e||i)(g(A),g(Zi),g(qi))},i.\u0275cmp=y({type:i,selectors:[["tui-primitive-spin-button"]],hostBindings:function(e,t){e&1&&_("mousedown.silent.prevent",function(){return 0})("keydown.arrowLeft.prevent",function(){return t.onLeftClick()})("keydown.arrowRight.prevent",function(){return t.onRightClick()})("focusin",function(){return t.onFocused(!0)})("focusout",function(){return t.onFocused(!1)})},inputs:{disabled:"disabled",leftDisabled:"leftDisabled",rightDisabled:"rightDisabled"},outputs:{leftClick:"leftClick",rightClick:"rightClick"},features:[Y],ngContentSelectors:Ro,decls:2,vars:3,consts:[[4,"ngIf"],["appearance","flat","automation-id","tui-primitive-spin-button__left","size","xs","tuiIconButton","","type","button",3,"click","focusable","icon","title"],[1,"t-content","t-calendar-title"],["appearance","flat","automation-id","tui-primitive-spin-button__right","size","xs","tuiIconButton","","type","button",3,"click","focusable","icon","title"]],template:function(e,t){e&1&&(ee(),v(0,Ho,5,10,"ng-container",0),S(1,"async")),e&2&&s("ngIf",$(1,1,t.spinTexts$))},dependencies:[Pt,U,ue],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}),i})(),Qn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,Tt]]}),i})();var No=(i,o)=>{let e=new Date(i.year,i.month,1).getDay();return e>=o?e-o:ht-(o-e)},jo=({month:i,rowIndex:o,colIndex:e,firstDayOfWeek:t})=>{let n=o*ht+e-No(i,t)+1;return n>i.daysCount&&(n-=i.daysCount,i=i.append({month:1})),n<=0&&(i=i.append({month:-1}),n=i.daysCount+n),new ae(i.year,i.month,n)},Bo=6,qn=(()=>{class i{constructor(e){this.firstDayOfWeek=e,this.currentMonth=null,this.currentSheet=[]}transform(e,t=!1){var n;if(!((n=this.currentMonth)===null||n===void 0)&&n.monthSame(e))return this.currentSheet;let r=[];for(let a=0;aL.yearL.year>E.year||L.month>E.month;if(!(O(C)&&!t)){if(N(C)&&!t)break;f.push(C)}}r.push(f)}return this.currentSheet=r.filter(a=>a.length),this.currentMonth=e,this.currentSheet}}return i.\u0275fac=function(e){return new(e||i)(g(vt,16))},i.\u0275pipe=nt({name:"tuiCalendarSheet",type:i,pure:!0}),i})(),Xn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({}),i})();function Wo(i){let o=i.length-1;return[i[o],...i.slice(0,o)]}var Zn=(()=>{class i{constructor(e){this.firstDayOfWeekIndex=e}transform(e){return e.pipe(he(Wo),he(t=>[...t.slice(this.firstDayOfWeekIndex),...t.slice(0,this.firstDayOfWeekIndex)]))}}return i.\u0275fac=function(e){return new(e||i)(g(vt,16))},i.\u0275pipe=nt({name:"tuiOrderWeekDays",type:i,pure:!0}),i})(),Jn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({}),i})();function Uo(i,o){if(i&1&&(j(0),w(1),B()),i&2){let e=l();u(),q(" ",e.value.formattedYear," ")}}function Yo(i,o){if(i&1){let e=P();d(0,"button",3),_("click",function(){c(e);let n=l();return p(n.onYearClick())}),w(1),m()}if(i&2){let e=l();s("tuiFocusable",!1),u(),q(" ",e.value.formattedYear," ")}}var eo=(()=>{class i{constructor(){this.value=Z.currentLocal(),this.min=se,this.max=le,this.valueChange=new D,this.yearClick=new D}get computedMin(){var e;return(e=this.min)!==null&&e!==void 0?e:se}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:t}=this;return e.year===t.year}onYearClick(){this.yearClick.next(this.value)}onPrevMonthClick(){this.appendValueWithLimit({month:-1})}onNextMonthClick(){this.appendValueWithLimit({month:1})}appendValueWithLimit(e){let t=this.value.append(e),{computedMin:n,computedMax:r}=this;if(n.monthSameOrAfter(t)){this.updateValue(n);return}this.updateValue(r.monthSameOrBefore(t)?r:t)}updateValue(e){this.value.monthSame(e)||(this.value=e,this.valueChange.emit(e))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=y({type:i,selectors:[["tui-primitive-year-month-pagination"]],inputs:{value:"value",min:"min",max:"max"},outputs:{valueChange:"valueChange",yearClick:"yearClick"},decls:7,vars:10,consts:[["button",""],[3,"leftClick","rightClick","focusable","leftDisabled","rightDisabled"],[4,"ngIf","ngIfElse"],["id","year-btn","automation-id","tui-primitive-year-month-pagination__year-button","tuiLink","","type","button",3,"click","tuiFocusable"]],template:function(e,t){if(e&1){let n=P();d(0,"tui-primitive-spin-button",1),_("leftClick",function(){return c(n),p(t.onPrevMonthClick())})("rightClick",function(){return c(n),p(t.onNextMonthClick())}),w(1),S(2,"tuiMonth"),S(3,"async"),v(4,Uo,2,1,"ng-container",2)(5,Yo,2,2,"ng-template",null,0,K),m()}if(e&2){let n=Q(6);s("focusable",!1)("leftDisabled",t.prevMonthDisabled)("rightDisabled",t.nextMonthDisabled),u(),q(" ",$(3,8,$(2,6,t.value))," "),u(3),s("ngIf",t.oneYear)("ngIfElse",n)}},dependencies:[Gn,Ge,U,Re,ue,gn],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),i})(),to=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,He,Qn,Qe,hn]]}),i})();var Go=(i,o,e,t,n)=>[i,o,e,t,n];function Qo(i,o){if(i&1&&x(0,"div",3),i&2){let e=o.$implicit;s("textContent",e)}}function qo(i,o){if(i&1&&x(0,"div",14),i&2){let e=l().ngIf;ge("background-color",(e==null?null:e[1])||"")}}function Xo(i,o){if(i&1&&(d(0,"div",13),x(1,"div",14),v(2,qo,1,2,"div",15),m()),i&2){let e=o.ngIf;u(),ge("background-color",e==null?null:e[0]),u(),s("ngIf",e.length>1)}}function Zo(i,o){if(i&1){let e=P();d(0,"div",10),_("click",function(){c(e);let n=l().tuiLet,r=l(4);return p(r.onItemClick(n))})("tuiHoveredChange",function(n){c(e);let r=l().tuiLet,a=l(4);return p(a.onItemHovered(n&&r))})("tuiPressedChange",function(n){c(e);let r=l().tuiLet,a=l(4);return p(a.onItemPressed(n&&r))}),d(1,"div",11),S(2,"tuiMapper"),w(3),v(4,Xo,3,3,"div",12),S(5,"tuiMapper"),m()()}if(i&2){let e=l().tuiLet,t=l(4);T("t-cell_interval",t.itemIsInterval(e))("t-cell_today",t.itemIsToday(e))("t-cell_unavailable",t.itemIsUnavailable(e)),k("data-range",t.getItemRange(e))("data-state",t.getItemState(e)),u(),T("t-item_unavailable",t.itemIsUnavailable(e)),k("data-type",Ft(2,13,e,t.dayTypeHandler)),u(2),q(" ",e.day," "),u(),s("ngIf",ci(5,16,ui(22,Go,e,t.toMarkers,t.itemIsToday(e),!!t.getItemRange(e),t.markerHandler)))}}function Jo(i,o){if(i&1&&(j(0),v(1,Zo,6,28,"div",9),B()),i&2){let e=o.tuiLet,t=l(4);u(),s("ngIf",!t.itemIsUnavailable(e)||t.showAdjacent)}}function er(i,o){if(i&1&&(j(0),v(1,Jo,2,1,"ng-container",8),B()),i&2){let e=o.$implicit,t=l().$implicit,n=l().tuiLet;u(),s("tuiLet",n[t][e])}}function tr(i,o){if(i&1&&(d(0,"div",6),v(1,er,2,1,"ng-container",7),m()),i&2){let e=o.$implicit,t=l().tuiLet;u(),s("tuiRepeatTimesOf",t[e].length)}}function ir(i,o){if(i&1&&(d(0,"div",4),v(1,tr,2,1,"div",5),m()),i&2){let e=o.tuiLet;u(),s("tuiRepeatTimesOf",e.length)}}var io=(()=>{class i{constructor(e,t){this.unorderedWeekDays$=e,this.dayTypeHandler=t,this.pressedItem=null,this.today=ae.currentLocal(),this.month=Z.currentLocal(),this.disabledItemHandler=X,this.markerHandler=Be,this.value=null,this.hoveredItem=null,this.showAdjacent=!0,this.hoveredItemChange=new D,this.dayClick=new D,this.toMarkers=(n,r,a,f)=>{if(r||a)return null;let h=f(n);return h.length===0?null:h}}get isSingleDayRange(){return this.value instanceof Ze&&this.value.isSingleDay}get isSingle(){return this.isSingleDayRange}getItemState(e){let{disabledItemHandler:t,pressedItem:n,hoveredItem:r}=this;return t(e)?Oe.Disabled:n!=null&&n.daySame(e)?Oe.Active:r!=null&&r.daySame(e)?Oe.Hover:null}getItemRange(e){let{value:t,hoveredItem:n}=this;return t?t instanceof ae?t.daySame(e)?J.Single:null:t instanceof Ze?t.from.daySame(e)&&!t.isSingleDay||n!=null&&n.dayAfter(t.from)&&t.from.daySame(e)&&t.isSingleDay||n!=null&&n.daySame(e)&&n.dayBefore(t.from)&&t.isSingleDay?J.Start:t.to.daySame(e)&&!t.isSingleDay||n!=null&&n.dayBefore(t.from)&&t.from.daySame(e)&&t.isSingleDay||n!=null&&n.daySame(e)&&n.dayAfter(t.from)&&t.isSingleDay?J.End:t.isSingleDay&&t.from.daySame(e)?J.Single:null:t.find(r=>r.daySame(e))?J.Single:null:null}itemIsToday(e){return this.today.daySame(e)}itemIsUnavailable(e){return!this.month.monthSame(e)}itemIsInterval(e){let{value:t,hoveredItem:n}=this;if(!(t instanceof Ze))return!1;if(!t.isSingleDay)return t.from.daySameOrBefore(e)&&t.to.dayAfter(e);if(n===null)return!1;let r=Ze.sort(t.from,n);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){Ve(this.hoveredItem,e,(t,n)=>t.daySame(n))||(this.hoveredItem=e,this.hoveredItemChange.emit(e))}}return i.\u0275fac=function(e){return new(e||i)(g(Xi),g(Qi))},i.\u0275cmp=y({type:i,selectors:[["tui-primitive-calendar"]],hostVars:2,hostBindings:function(e,t){e&2&&T("_single",t.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,t){e&1&&(d(0,"div",0),v(1,Qo,1,1,"div",1),S(2,"tuiOrderWeekDays"),S(3,"async"),m(),v(4,ir,2,1,"div",2),S(5,"tuiCalendarSheet")),e&2&&(u(),s("ngForOf",$(3,4,$(2,2,t.unorderedWeekDays$))),u(3),s("tuiLet",Ft(5,6,t.month,!0)))},dependencies:[Ee,Ne,mt,U,dt,ct,ue,Zn,qn,st],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}),i})(),no=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,je,lt,gt,Le,pt,Xn,Jn]]}),i})();function or(i,o){if(i&1){let e=P();d(0,"tui-scrollbar",2)(1,"tui-primitive-year-picker",3),_("yearClick",function(n){c(e);let r=l();return p(r.onPickerYearClick(n))}),m()()}if(i&2){let e=l();u(),s("initialItem",e.month)("max",e.computedMax)("min",e.computedMin)("value",e.value)}}function rr(i,o){if(i&1){let e=P();d(0,"tui-primitive-year-month-pagination",4),_("valueChange",function(n){c(e);let r=l();return p(r.onPaginationValueChange(n))})("yearClick",function(){c(e);let n=l();return p(n.onPaginationYearClick())}),m(),d(1,"tui-primitive-calendar",5),S(2,"tuiMapper"),_("dayClick",function(n){c(e);let r=l();return p(r.onDayClick(n))})("hoveredItemChange",function(n){c(e);let r=l();return p(r.onHoveredItemChange(n))}),m()}if(i&2){let e=l();s("max",e.computedMaxViewedMonth)("min",e.computedMinViewedMonth)("value",e.month),u(),s("disabledItemHandler",di(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 xt=(()=>{class i{constructor(){this.day=null,this.view="month",this.month=Z.currentLocal(),this.disabledItemHandler=X,this.min=se,this.max=le,this.minViewedMonth=se,this.maxViewedMonth=le,this.hoveredItem=null,this.showAdjacent=!0,this.markerHandler=Be,this.dayClick=new D,this.monthChange=new D,this.hoveredItemChange=new D,this.disabledItemHandlerMapper=(e,t,n)=>r=>r.dayBefore(t)||r.dayAfter(n)||e(r)}set initialView(e){this.view=e}set value(e){this.day=e,this.showAdjacent&&e instanceof ae&&(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:se}get computedMax(){var e;return(e=this.max)!==null&&e!==void 0?e:le}get computedMinViewedMonth(){var e;let t=this.computedMin,n=(e=this.minViewedMonth)!==null&&e!==void 0?e:se;return n.monthSameOrAfter(t)?n:t}get computedMaxViewedMonth(){var e;let t=this.computedMax,n=(e=this.maxViewedMonth)!==null&&e!==void 0?e:le;return n.monthSameOrBefore(t)?n:t}onPaginationYearClick(){this.view="year"}onPickerYearClick({year:e}){this.view="month",this.updateViewedMonth(new Z(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){Ve(this.hoveredItem,e,(t,n)=>t.daySame(n))||(this.hoveredItem=e,this.hoveredItemChange.emit(e))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=y({type:i,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:[["calendar",""],["automation-id","tui-calendar__scrollbar","class","t-scrollbar",4,"ngIf","ngIfElse"],["automation-id","tui-calendar__scrollbar",1,"t-scrollbar"],["automation-id","tui-calendar__year",3,"yearClick","initialItem","max","min","value"],["automation-id","tui-calendar__pagination",1,"t-pagination",3,"valueChange","yearClick","max","min","value"],["automation-id","tui-calendar__calendar",3,"dayClick","hoveredItemChange","disabledItemHandler","hoveredItem","markerHandler","month","showAdjacent","value"]],template:function(e,t){if(e&1&&v(0,or,2,4,"tui-scrollbar",1)(1,rr,3,14,"ng-template",null,0,K),e&2){let n=Q(2);s("ngIf",t.isInYearView)("ngIfElse",n)}},dependencies:[Ue,Yn,eo,io,U,st],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}),i})(),kt=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,to,no,Kn,Ct,lt]]}),i})();var ar=["*"],sr=i=>({$implicit:i});function lr(i,o){if(i&1&&x(0,"tui-svg",2),i&2){let e=o.polymorpheusOutlet,t=l();T("t-mark_on",!t.empty),s("src",e)}}var ur={size:"m",appearances:{unchecked:_t.Outline,checked:_t.Primary,indeterminate:_t.Primary},icons:{checked:({$implicit:i})=>i==="m"?"tuiIconCheck":"tuiIconCheckLarge",indeterminate:({$implicit:i})=>i==="m"?"tuiIconMinus":"tuiIconMinusLarge"}},Je=be(ur);var oo=(()=>{class i{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 i.\u0275fac=function(e){return new(e||i)(g(Je))},i.\u0275cmp=y({type:i,selectors:[["tui-primitive-checkbox"]],hostVars:1,hostBindings:function(e,t){e&2&&k("data-size",t.size)},inputs:{size:"size",disabled:"disabled",focused:"focused",hovered:"hovered",pressed:"pressed",invalid:"invalid",valueSetter:[0,"value","valueSetter"]},ngContentSelectors:ar,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,t){e&1&&(ee(),d(0,"div",0),v(1,lr,1,3,"tui-svg",1),W(2),m()),e&2&&(s("active",t.pressed)("appearance",t.appearance)("disabled",t.disabled)("focus",t.focused)("hover",t.hovered)("invalid",t.invalid),u(),s("polymorpheusOutlet",t.icon)("polymorpheusOutletContext",fe(8,sr,t.size)))},dependencies:[de,Ye,Me],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}),i})(),ro=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[ce,Ke,Pe]]}),i})();function ao(i){if(i==="")return"";let o=0;for(let r=0;ra&&o(r)),t=i[e-1]||i[0],n=i[e]||i[i.length-1];return[t,n]}function co(i,o){let[[e,t],[n,r]]=uo(o,([h,C])=>i<=h),a=(i-e)/(n-e),f=(r-t)*a+t;return Ci(f,lo)}function po(i,o){let[[e,t],[n,r]]=uo(o,([f,h])=>i<=h),a=(i-t)/(r-t)||0;return(n-e)*a+e}var dr=["focusableElement"],Dt=(()=>{class i extends Fe{constructor(e,t,n){super(e,n),this.options=t,this.size=this.options.size}get nativeFocusableElement(){return!this.focusableElement||this.computedDisabled?null:this.focusableElement.nativeElement}get focused(){return Ae(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 i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(Je),g(G))},i.\u0275cmp=y({type:i,selectors:[["tui-checkbox"]],viewQuery:function(e,t){if(e&1&&F(dr,5),e&2){let n;z(n=V())&&(t.focusableElement=n.first)}},hostVars:1,hostBindings:function(e,t){e&2&&k("data-size",t.size)},inputs:{size:"size"},features:[R([Te(i),ye(i)]),Y],decls:3,vars:11,consts:[["focusableElement",""],[3,"disabled","focused","hovered","invalid","pressed","size","value"],["automation-id","tui-checkbox__native","type","checkbox",1,"t-native",3,"tuiCheckedChange","tuiFocusedChange","tuiFocusVisibleChange","disabled","id","tuiFocusable","tuiChecked"]],template:function(e,t){if(e&1){let n=P();d(0,"tui-primitive-checkbox",1)(1,"input",2,0),ne("tuiCheckedChange",function(a){return c(n),ie(t.value,a)||(t.value=a),p(a)}),_("tuiFocusedChange",function(a){return c(n),p(t.onFocused(a))})("tuiFocusVisibleChange",function(a){return c(n),p(t.onFocusVisible(a))}),m()()}e&2&&(s("disabled",t.disabled)("focused",t.computedFocusVisible)("hovered",t.pseudoHover)("invalid",t.computedInvalid)("pressed",t.pseudoActive)("size",t.size)("value",t.value),u(),s("disabled",t.disabled)("id",t.id)("tuiFocusable",t.computedFocusable),te("tuiChecked",t.value))},dependencies:[oo,Fi,Re,Ni,Hi],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}@supports (-webkit-touch-callout: none){.t-native[_ngcontent-%COMP%]:active{font-size:1rem}}"],changeDetection:0}),i})(),mo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,Ri,He,ji,Li,ro]]}),i})();var pr=["*"],go=(()=>{class i extends Fe{constructor(e,t,n,r){super(e,t),this.mode$=n,this.options=r,this.size=this.options.size}get focused(){return Ae(this.nativeFocusableElement)}get nativeFocusableElement(){var e,t;return(t=(e=this.checkbox)===null||e===void 0?void 0:e.nativeFocusableElement)!==null&&t!==void 0?t:null}onFocused(e){this.updateFocused(e)}onModelChange(e){this.value=e}}return i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(G),g(We),g(Je))},i.\u0275cmp=y({type:i,selectors:[["tui-checkbox-labeled"]],viewQuery:function(e,t){if(e&1&&F(Dt,5),e&2){let n;z(n=V())&&(t.checkbox=n.first)}},hostVars:1,hostBindings:function(e,t){e&1&&_("$.data-mode.attr",function(){return t.mode$}),e&2&&k("data-size",t.size)},inputs:{size:"size"},features:[R([Te(i),ye(i),$e]),Y],ngContentSelectors:pr,decls:4,vars:12,consts:[[1,"t-wrapper"],[3,"ngModelChange","focusedChange","disabled","focusable","nativeId","pseudoActive","pseudoFocus","pseudoHover","pseudoInvalid","readOnly","size","ngModel"],[1,"t-content"]],template:function(e,t){e&1&&(ee(),d(0,"label",0)(1,"tui-checkbox",1),ne("ngModelChange",function(r){return ie(t.value,r)||(t.value=r),r}),_("focusedChange",function(r){return t.onFocused(r)}),m(),d(2,"div",2),W(3),m()()),e&2&&(u(),s("disabled",t.computedDisabled)("focusable",t.focusable)("nativeId",t.nativeId)("pseudoActive",t.pseudoActive)("pseudoFocus",t.pseudoFocus)("pseudoHover",t.pseudoHover)("pseudoInvalid",t.computedInvalid)("readOnly",t.readOnly)("size",t.size),te("ngModel",t.value),u(),T("t-content_disabled",t.computedDisabled))},dependencies:[Dt,ve,re],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);line-height:1.5rem;margin-left:.75rem}"],changeDetection:0}),i})(),ho=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,Ce,mo]]}),i})();var mr=new Date("0001-01-01"),gr=new Date("9999-12-31");var hr="\u2013",_r="\u2014",fr="-",vr="\u2212",Cr=[fr,hr,_r,vr];var br=[":","."];function Mr(i,o,e){let t=Math.min(Number(e),Math.max(Number(o),Number(i)));return i instanceof Date?new Date(t):t}var _o=i=>{var o,e,t;return{day:((o=i.match(/d/g))===null||o===void 0?void 0:o.length)||0,month:((e=i.match(/m/g))===null||e===void 0?void 0:e.length)||0,year:((t=i.match(/y/g))===null||t===void 0?void 0:t.length)||0}};function Pr(i){return{day:String(i.getDate()).padStart(2,"0"),month:String(i.getMonth()+1).padStart(2,"0"),year:String(i.getFullYear()).padStart(4,"0"),hours:String(i.getHours()).padStart(2,"0"),minutes:String(i.getMinutes()).padStart(2,"0"),seconds:String(i.getSeconds()).padStart(2,"0"),milliseconds:String(i.getMilliseconds()).padStart(3,"0")}}function Tr(i,o){return i.length!e.match(/^0+$/))}function fo(i,o,e){let t=o.replace(/\W/g,"").length;return i.replace(e,"").match(new RegExp(`(\\D*\\d[^\\d\\s]*){1,${t}}`,"g"))||[]}function vo(i){return i.reduce((o,[e,t])=>Object.assign(Object.assign({},o),{[e]:t}),{})}function Co(i,o){let e=o.replace(/[^dmy]/g,""),t=i.replace(/\D+/g,""),n={day:t.slice(e.indexOf("d"),e.lastIndexOf("d")+1),month:t.slice(e.indexOf("m"),e.lastIndexOf("m")+1),year:t.slice(e.indexOf("y"),e.lastIndexOf("y")+1)};return vo(Object.entries(n).filter(([r,a])=>!!a).sort(([r],[a])=>o.toLowerCase().indexOf(r[0])>o.toLowerCase().indexOf(a[0])?1:-1))}function yr(i,o){var e,t,n,r,a,f,h;let C=((e=i.year)===null||e===void 0?void 0:e.length)===2?`20${i.year}`:i.year,O=new Date(Number(C??"0"),Number((t=i.month)!==null&&t!==void 0?t:"1")-1,Number((n=i.day)!==null&&n!==void 0?n:"1"),Number((r=o==null?void 0:o.hours)!==null&&r!==void 0?r:"0"),Number((a=o==null?void 0:o.minutes)!==null&&a!==void 0?a:"0"),Number((f=o==null?void 0:o.seconds)!==null&&f!==void 0?f:"0"),Number((h=o==null?void 0:o.milliseconds)!==null&&h!==void 0?h:"0"));return O.setFullYear(Number(C??"0")),O}var et=", ";function St({day:i,month:o,year:e,hours:t,minutes:n,seconds:r,milliseconds:a},f,h){var C;let O=((C=f.match(/y/g))===null||C===void 0?void 0:C.length)===2?e==null?void 0:e.slice(-2):e;return(f+(h?et+h:"")).replace(/d+/g,i??"").replace(/m+/g,o??"").replace(/y+/g,O??"").replace(/H+/g,t??"").replace(/MSS/g,a??"").replace(/M+/g,n??"").replace(/S+/g,r??"").replace(/^\D+/g,"").replace(/\D+$/g,"")}function qt(i,o,e=0){return Number(i.padEnd(o.length,"0"))<=Number(o)?{validatedSegmentValue:i,prefixedZeroesCount:e}:i.endsWith("0")?qt(`0${i.slice(0,o.length-1)}`,o,e+1):qt(`${i.slice(0,o.length-1)}0`,o,e)}var Or={day:31,month:12,year:9999};function wr({dateString:i,dateModeTemplate:o,offset:e,selection:[t,n]}){let r=Co(i,o),a=Object.entries(r),f={},h=0;for(let[N,L]of a){let E=St(f,o),Ie=Or[N],De=E.length&&1,pe=e+E.length+De+_o(o)[N],Se=pe>=t&&pe===n;if(Se&&Number(L)>Number(Ie))return{validatedDateString:"",updatedSelection:[t,n]};if(Se&&Number(L)<1)return{validatedDateString:"",updatedSelection:[t,n]};let{validatedSegmentValue:Et,prefixedZeroesCount:So}=qt(L,`${Ie}`);h+=So,f[N]=Et}let C=St(f,o),O=C.length-i.length;return{validatedDateString:C,updatedSelection:[t+h+O,n+h+O]}}var bo=/[\\^$.*+?()[\]{}|]/g,xr=new RegExp(bo.source);function Mo(i){return i&&xr.test(i)?i.replace(bo,"\\$&"):i}function kr(i,o){let e=_o(o);return vo(Object.entries(i).map(([t,n])=>{let r=e[t];return[t,n.length===r&&n.match(/^0+$/)?"1".padStart(r,"0"):n]}))}function Ir({dateModeTemplate:i,min:o=mr,max:e=gr,rangeSeparator:t="",dateSegmentSeparator:n="."}){return({value:r,selection:a})=>{let f=t&&r.endsWith(t),h=fo(r,i,t),C="";for(let O of h){C+=C?t:"";let N=Co(O,i);if(!Tr(O,i)){let Ie=kr(N,i),De=St(Ie,i),pe=O.endsWith(n)?n:"";C+=De+pe;continue}let L=yr(N),E=Mr(L,o,e);C+=St(Pr(E),i)}return{selection:a,value:C+(f?t:"")}}}function Dr({dateModeTemplate:i,dateSegmentsSeparator:o,rangeSeparator:e=""}){return({elementState:t,data:n})=>{let r=e?new RegExp(`${e}|-`):et,a=n.split(r),f=n.includes(et)?[a[0]]:a;if(f.every(h=>h.trim().split(/\D/).length===i.split(o).length)){let h=f.map(C=>Sr(C,i,o)).join(e);return{elementState:t,data:`${h}${n.includes(et)&&et+a[1]||""}`}}return{elementState:t,data:n}}}function Sr(i,o,e){let t=i.split(/\D/),n=o.split(e);return t.map((a,f)=>f===n.length-1?a:a.padStart(n[f].length,"0")).join(e)}function Er({dateModeTemplate:i,dateSegmentsSeparator:o,rangeSeparator:e=""}){return({elementState:t,data:n})=>{let{value:r,selection:a}=t;if(n===o)return{elementState:t,data:a[0]===r.length?n:""};if(Cr.includes(n))return{elementState:t,data:e};let f=n.replace(new RegExp(`[^\\d${Mo(o)}${e}]`,"g"),"");if(!f)return{elementState:t,data:""};let[h,C]=a,O=C+n.length,N=r.slice(0,h)+f+r.slice(O),L=fo(N,i,e),E="",Ie=!!e&&N.includes(e);for(let pe of L){let{validatedDateString:Se,updatedSelection:Et}=wr({dateString:pe,dateModeTemplate:i,offset:E?E.length+e.length:0,selection:[h,O]});if(pe&&!Se)return{elementState:t,data:""};O=Et[1],E+=Ie&&E?e+Se:Se}let De=E.slice(h,O);return{elementState:{selection:a,value:E.slice(0,h)+De.split(o).map(pe=>"0".repeat(pe.length)).join(o)+E.slice(O)},data:De}}}function zr(){return({elementState:i},o)=>{let{value:e,selection:t}=i;if(!e||Vr(e,t))return{elementState:i};let[n,r]=t,a=e.slice(n,r).replace(/\d/g,"0"),f=e.slice(0,n)+a+e.slice(r);return o==="validation"||o==="insert"&&n===r?{elementState:{selection:t,value:f}}:{elementState:{selection:o==="deleteBackward"||o==="insert"?[n,n]:[r,r],value:f}}}}function Vr(i,[o,e]){return e===i.length}function Po({mode:i,separator:o=".",max:e,min:t}){let n=i.split("/").join(o);return Object.assign(Object.assign({},wt),{mask:Array.from(n).map(r=>r===o?r:/\d/),overwriteMode:"replace",preprocessors:[zr(),Dr({dateModeTemplate:n,dateSegmentsSeparator:o}),Er({dateModeTemplate:n,dateSegmentsSeparator:o})],postprocessors:[Ir({min:t,max:e,dateModeTemplate:n,dateSegmentSeparator:o})]})}var du=new RegExp(`[${br.map(Mo).join("")}]$`);var Ar=["*",[["input"]]],Fr=["*","input"],Rr=i=>({$implicit:i});function Hr(i,o){if(i&1){let e=P();d(0,"tui-primitive-textfield",5),_("focusedChange",function(n){c(e);let r=l();return p(r.onFocused(n))})("valueChange",function(n){c(e);let r=l();return p(r.onValueChange(n))}),W(1),W(2,1,["ngProjectAs","input",5,["input"]]),m()}if(i&2){let e=o.tuiLet,t=l(),n=Q(4);s("disabled",t.computedDisabled)("focusable",t.computedFocusable)("invalid",t.computedInvalid)("maskito",t.computedMask)("nativeId",t.nativeId)("pseudoFocus",t.pseudoFocus)("pseudoHover",t.pseudoHover)("readOnly",t.readOnly)("tuiTextfieldFiller",t.getComputedFiller(e||""))("tuiTextfieldIcon",t.calendarIcon&&n)("value",t.computedValue)}}function Lr(i,o){if(i&1){let e=P();d(0,"tui-svg",8),_("click",function(){c(e);let n=l(2);return p(n.onIconClick())}),m()}if(i&2){let e=o.polymorpheusOutlet,t=l(2);T("t-icon",!t.computedDisabled),s("src",e)}}function Nr(i,o){i&1&&x(0,"input",9)}function jr(i,o){if(i&1&&v(0,Lr,1,3,"tui-svg",6)(1,Nr,1,0,"input",7),i&2){let e=l();s("polymorpheusOutlet",e.calendarIcon)("polymorpheusOutletContext",fe(3,Rr,e.size)),u(),s("ngIf",e.nativePicker)}}function Br(i,o){if(i&1){let e=P();d(0,"div",12)(1,"button",13),_("click",function(){c(e);let n=l(2);return p(n.onDayClick(n.items[0].day))}),w(2),m()()}if(i&2){let e=l(2);u(2),q(" ",e.items[0]," ")}}function Wr(i,o){if(i&1){let e=P();d(0,"tui-calendar",10),_("dayClick",function(n){c(e);let r=l();return p(r.onDayClick(n))})("monthChange",function(n){c(e);let r=l();return p(r.onMonthChange(n))}),m(),v(1,Br,3,1,"div",11)}if(i&2){let e=l();s("disabledItemHandler",e.disabledItemHandler)("markerHandler",e.markerHandler)("max",e.computedMax)("min",e.computedMin)("month",e.computedActiveYearMonth)("value",e.value),u(),s("ngIf",e.items.length===1)}}var $r=(()=>{class i{constructor(e,t){this.host=e,this.dateFormat=t}get value(){return this.host.value.length===Lt?ae.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?ae.normalizeParse(e,"YMD").toString(this.dateFormat):"")}}return i.\u0275fac=function(e){return new(e||i)(g(Ji),g(Nt))},i.\u0275dir=me({type:i,selectors:[["input","tuiDate",""]],hostAttrs:["type","date"],hostVars:4,hostBindings:function(e,t){e&1&&_("change",function(r){return t.onChange(r.target.value)})("click.stop.silent",function(){return 0})("input.stop.silent",function(){return 0})("mousedown.stop.silent",function(){return 0}),e&2&&ot("tabIndex",-1)("value",t.value)("max",t.max)("min",t.min)}}),i})(),To=(()=>{class i extends Fe{constructor(e,t,n,r,a,f,h,C,O,N){super(e,t,C),this.isMobile=n,this.mobileCalendar=r,this.dateFormat=a,this.dateSeparator=f,this.dateTexts$=h,this.valueTransformer=C,this.options=O,this.textfieldSize=N,this.month=null,this.min=this.options.min,this.max=this.options.max,this.disabledItemHandler=X,this.markerHandler=Be,this.items=[],this.defaultActiveYearMonth=Z.currentLocal(),this.open=!1,this.filler$=this.dateTexts$.pipe(he(L=>$i(L[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,t;return(t=(e=this.textfield)===null||e===void 0?void 0:e.nativeFocusableElement)!==null&&t!==void 0?t: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&&!!this.mobileCalendar&&this.isMobile}get calendarIcon(){return this.options.icon}get computedValue(){let{value:e,nativeValue:t,activeItem:n}=this;return n?String(n):e?e.toString(this.dateFormat,this.dateSeparator):t}get computedActiveYearMonth(){return this.items[0]&&this.value&&this.value.daySame(this.items[0].day)?this.items[0].displayDay:this.month||this.value||Bi(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 computedMask(){return this.activeItem?wt:this.computeMaskOptions(this.dateFormat,this.dateSeparator,this.computedMin,this.computedMax)}get activeItem(){let{value:e}=this;return e&&this.items.find(t=>t.day.daySame(e))||null}onClick(){!this.isMobile&&this.interactive&&(this.open=!this.open)}getComputedFiller(e){return this.activeItem?"":e}onMobileClick(){this.onIconClick()}onIconClick(){this.isMobile&&this.interactive&&(this.open=!0)}onValueChange(e){this.control&&this.control.updateValueAndValidity({emitEvent:!1}),!e&&!this.mobileCalendar&&this.onOpenChange(!0),this.value=e.length!==Lt?null:ae.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,t){return Ve(e,t,(n,r)=>n.daySame(r))}computeMaskOptions(e,t,n,r){return Po({separator:t,mode:so[e],min:n.toLocalNativeDate(),max:r.toLocalNativeDate()})}}return i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(G),g(Ht),g(Ut,8),g(Nt),g(Wi),g(Tn),g($t,8),g(yn),g(un))},i.\u0275cmp=y({type:i,selectors:[["tui-input-date",3,"multiple",""]],viewQuery:function(e,t){if(e&1&&F(Ot,5),e&2){let n;z(n=V())&&(t.textfield=n.first)}},hostVars:1,hostBindings:function(e,t){e&1&&_("click",function(){return t.onClick()}),e&2&&k("data-size",t.size)},inputs:{min:"min",max:"max",disabledItemHandler:"disabledItemHandler",markerHandler:"markerHandler",items:"items",defaultActiveYearMonth:"defaultActiveYearMonth"},features:[R([Te(i),ye(i),Pn($t),{provide:Wt,useFactory:()=>_e(Ht)&&_e(Ut,zt.Optional)||_e(Wt,zt.SkipSelf)}]),Y],ngContentSelectors:Fr,decls:7,vars:7,consts:[["iconContent",""],["dropdown","polymorpheus"],[1,"t-hosted",3,"openChange","canOpen","content","open"],["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"],[3,"polymorpheus"],["automation-id","tui-input-date-range__textfield","tuiValueAccessor","",1,"t-textfield",3,"focusedChange","valueChange","disabled","focusable","invalid","maskito","nativeId","pseudoFocus","pseudoHover","readOnly","tuiTextfieldFiller","tuiTextfieldIcon","value"],["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,"click","src"],["tuiDate","",1,"t-native-input"],["automation-id","tui-input-date__calendar","tuiPreventDefault","mousedown",3,"dayClick","monthChange","disabledItemHandler","markerHandler","max","min","month","value"],["tuiPreventDefault","mousedown","class","t-button",4,"ngIf"],["tuiPreventDefault","mousedown",1,"t-button"],["tuiLink","","type","button",3,"click"]],template:function(e,t){if(e&1){let n=P();ee(Ar),d(0,"tui-hosted-dropdown",2),_("openChange",function(a){return c(n),p(t.onOpenChange(a))}),v(1,Hr,3,11,"tui-primitive-textfield",3),S(2,"async"),v(3,jr,2,5,"ng-template",null,0,K)(5,Wr,2,7,"ng-template",4,1,K),m()}if(e&2){let n=Q(6);s("canOpen",t.interactive&&!t.nativePicker)("content",n)("open",t.open&&t.interactive&&!t.nativePicker),u(),s("tuiLet",$(2,5,t.filler$)),u(4),s("polymorpheus",t.type)}},dependencies:[qe,Ot,de,xt,Ge,Ne,bn,wn,kn,an,sn,Me,Ye,U,$r,ki,Nn,ue],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}),tt([ut],i.prototype,"computeMaskOptions",null),i})(),yo=(()=>{class i extends Ui{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 i.\u0275fac=(()=>{let o;return function(t){return(o||(o=ii(i)))(t||i)}})(),i.\u0275dir=me({type:i,selectors:[["tui-input-date",3,"multiple",""]],features:[R([en(i)]),Y]}),i})(),Oo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,In,Pe,Ke,jn,kt,ce,Qe,yt,Mn,xn,je,Mt]]}),i})();var Ur=["input"];function Yr(i,o){if(i&1&&(j(0),w(1),B()),i&2){let e=o.polymorpheusOutlet;u(),q(" ",e," ")}}function Kr(i,o){if(i&1&&(d(0,"div",7),v(1,Yr,2,1,"ng-container",8),m()),i&2){let e=l();u(),s("polymorpheusOutlet",e.leftContent)}}function Gr(i,o){if(i&1&&x(0,"tui-loader",9),i&2){let e=l();s("inheritColor",!0)("size",e.loaderSize)}}function Qr(i,o){if(i&1){let e=P();d(0,"tui-svg",10),_("click",function(n){c(e);let r=l();return p(r.remove(n))})("mousedown.stop.prevent.silent",function(){return c(e),p(0)}),m()}if(i&2){let e=l();s("src",e.icons.close)}}function qr(i,o){if(i&1){let e=P();d(0,"input",11,0),_("blur",function(){c(e);let n=l();return p(n.onBlur())})("keydown",function(n){c(e);let r=l();return p(r.onKeyDown(n))})("ngModelChange",function(n){c(e);let r=l();return p(r.onInput(n))}),m()}if(i&2){let e=l();s("ngModel",e.editedText),k("maxLength",e.maxLength)}}var Xr={size:"m",status:"default",autoColor:!1},Zr=be(Xr);var wo=(()=>{class i{constructor(e,t,n,r){this.el=e,this.mode$=t,this.options=n,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 D,this.editing=!1,this.editedText=null}set input(e){e&&e.nativeElement.focus()}get backgroundColor(){return this.autoColor?ao(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 Ki(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 t=e.split(this.separator);if(t.length>1){this.save(String(t));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 i.\u0275fac=function(e){return new(e||i)(g(A),g(We),g(Zr),g(ft))},i.\u0275cmp=y({type:i,selectors:[["tui-tag"],["a","tuiTag",""],["button","tuiTag",""]],viewQuery:function(e,t){if(e&1&&F(Ur,5,A),e&2){let n;z(n=V())&&(t.input=n.first)}},hostVars:10,hostBindings:function(e,t){e&1&&_("$.data-mode.attr",function(){return t.mode$})("keydown.enter",function(r){return t.edit(r)})("keydown.delete",function(r){return t.remove(r)})("keydown.backspace",function(r){return t.remove(r)}),e&2&&(k("data-size",t.size)("data-status",t.status),T("_hoverable",t.hoverable)("_disabled",t.disabled)("_autocolor",t.autoColor)("_editing",t.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:[R([$e])],decls:6,vars:7,consts:[["input",""],[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,"click","mousedown.stop.prevent.silent","src"],["automation-id","tui-tag__edit","type","text",1,"t-edit",3,"blur","keydown","ngModelChange","ngModel"]],template:function(e,t){e&1&&(d(0,"div",1),_("dblclick",function(r){return t.edit(r)}),v(1,Kr,2,1,"div",2),x(2,"span",3),v(3,Gr,1,2,"tui-loader",4)(4,Qr,1,1,"tui-svg",5),m(),v(5,qr,2,2,"input",6)),e&2&&(ge("background-color",t.backgroundColor),u(),s("ngIf",t.leftContent),u(),s("textContent",t.displayText),u(),s("ngIf",t.showLoader),u(),s("ngIf",t.canRemove),u(),s("ngIf",t.editing))},dependencies:[pn,de,U,Me,ze,ve,re],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}@supports (-webkit-touch-callout: none){.t-edit[_ngcontent-%COMP%]:active{font-size:1rem}}[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}),i})(),xo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,Ce,ce,mn,Pe]]}),i})();var ea=["focusableElement"],ta=["tagsContainer"],ia=["cleaner"],na=["errorIcon"],oa=["tag"],ra=[[["tuiContent"]],[["select"]],"*"],aa=["tuiContent","select","*"],Xt=i=>({$implicit:i});function sa(i,o){i&1&&Vt(0)}function la(i,o){if(i&1&&x(0,"tui-svg",23),i&2){let e=o.polymorpheusOutlet;s("src",e)}}function ua(i,o){if(i&1&&(d(0,"div",21),v(1,la,1,1,"tui-svg",22),m()),i&2){let e=l();u(),s("polymorpheusOutlet",e.iconLeft)("polymorpheusOutletContext",fe(2,Xt,e.size))}}function da(i,o){if(i&1&&(d(0,"div",24),W(1,2),m()),i&2){let e=l();T("t-placeholder_raised",e.placeholderRaised)}}function ca(i,o){if(i&1){let e=P();d(0,"tui-tag",26,3),S(2,"async"),_("edited",function(n){let r=c(e).index,a=l(2);return p(a.onTagEdited(n,r))})("keydown.arrowLeft.prevent",function(){let n=c(e).index,r=l(2);return p(r.onTagKeyDownArrowLeft(n))})("keydown.arrowRight.prevent",function(){let n=c(e).index,r=l(2);return p(r.onTagKeyDownArrowRight(n))}),m()}if(i&2){let e=o.$implicit,t=l(2);s("autoColor",t.autoColor)("disabled",t.computedDisabled||t.disabledItemHandler(e))("editable",t.editable&&!t.readOnly)("hoverable",!t.readOnly)("leftContent",t.getLeftContent(e))("maxLength",t.maxLength)("removable",!t.readOnly&&t.removable)("separator",t.separator)("size",t.controller.size)("status",$(2,12,t.status$))("tuiFocusable",!1)("value",e.toString())}}function pa(i,o){if(i&1&&(j(0),v(1,ca,3,14,"tui-tag",25),B()),i&2){let e=l();u(),s("ngForOf",e.value)("ngForTrackBy",e.trackByFn)}}function ma(i,o){if(i&1&&x(0,"span",28),i&2){let e=o.$implicit,t=l(2);T("t-text_comma",t.computedFocused&&!t.inputHidden)("t-text_disabled",t.disabledItemHandler(e))("t-text_error",!t.tagValidator(e)),s("textContent",e)}}function ga(i,o){if(i&1&&v(0,ma,1,7,"span",27),i&2){let e=l();s("ngForOf",e.value)}}function ha(i,o){if(i&1){let e=P();d(0,"tui-svg",33,4),_("click.stop",function(){c(e);let n=l(3);return p(n.onCleanerClick())}),m()}if(i&2){let e=o.polymorpheusOutlet;s("src",e)}}function _a(i,o){if(i&1&&(j(0),v(1,ha,2,1,"tui-svg",32),B()),i&2){let e=l(2);u(),s("polymorpheusOutlet",e.iconCleaner)("polymorpheusOutletContext",fe(2,Xt,e.size))}}function fa(i,o){if(i&1&&x(0,"tui-tooltip",34),i&2){let e=l(2);s("content",e.hintOptions==null?null:e.hintOptions.content)("describeId",e.id)}}function va(i,o){if(i&1&&x(0,"tui-svg",23),i&2){let e=o.polymorpheusOutlet;s("src",e)}}function Ca(i,o){if(i&1&&(d(0,"div",35),v(1,va,1,1,"tui-svg",22),m()),i&2){let e=l(2);u(),s("polymorpheusOutlet",e.icon)("polymorpheusOutletContext",fe(2,Xt,e.size))}}function ba(i,o){if(i&1&&(d(0,"div",29),v(1,_a,2,4,"ng-container",5)(2,fa,1,2,"tui-tooltip",30)(3,Ca,2,4,"div",31),m()),i&2){let e=l();u(),s("ngIf",e.hasCleaner),u(),s("ngIf",e.showHint),u(),s("ngIf",e.icon)}}function Ma(i,o){if(i&1&&x(0,"tui-svg",36),i&2){let e=l();s("src",e.icons.error)}}var Pa={autoColor:!1,separator:",",tagStatus:"primary",uniqueTags:!0},Ta=be(Pa);var ya={s:1.25,m:1.5,l:2},Oa={s:1,m:1.25,l:1.25},wa=.125,ko=(()=>{class i extends zi{constructor(e,t,n,r,a,f,h,C,O){super(e,t),this.el=n,this.modeDirective=r,this.mode$=a,this.hintOptions=f,this.controller=h,this.options=C,this.icons=O,this.tags=hi,this.separator=this.options.separator,this.search="",this.editable=!0,this.tagValidator=Rt,this.expandable=!0,this.rows=1/0,this.inputHidden=!1,this.uniqueTags=this.options.uniqueTags,this.autoColor=this.options.autoColor,this.maxLength=null,this.placeholder="",this.removable=!0,this.disabledItemHandler=X,this.searchChange=new D,this.status$=this.mode$.pipe(he(()=>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 at(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:t}=this.controller;return e==="s"||t}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){yi(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 t;let n=Pi(e);!this.focusableElement||n===this.focusableElement.nativeElement||!Mi(e.target)||!((t=this.cleanerSvg)===null||t===void 0)&&t.nativeElement.contains(e.target)||this.tagsContainer&&n!==this.tagsContainer.nativeElement&&this.tagsContainer.nativeElement.contains(n)||(e.preventDefault(),this.focusInput(),this.scrollTo())}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(!1):this.onScrollKeyDown(e,1)}onTagEdited(e,t){this.focusInput(e===""),this.value=this.filterValue(this.value.map((n,r)=>r!==t?n:e.split(this.separator).map(a=>a.trim()).filter(Boolean)).reduce((n,r)=>n.concat(r),[]))}handleOption(e){this.focusInput(),this.updateSearch(""),this.value=this.filterValue(this.value.concat(e)),this.open=!1,this.scrollTo()}onInput(e){let t=e.split(this.separator),r=t.map(a=>this.clippedValue(a.trim())).filter((a,f,{length:h})=>a.length>0&&f!==h-1).filter(a=>!this.disabledItemHandler(a));t.length>1?(this.updateSearch(this.clippedValue(t[t.length-1].trim())),this.value=this.filterValue([...this.value,...r])):this.updateSearch(this.clippedValue(e)),this.open=this.hasNativeValue}onPaste(e){let t=Ti(e);this.onInput(t||"")}onDrop({dataTransfer:e}){e&&this.onInput(e.getData("text")||"")}setDisabledState(){super.setDisabledState(),this.open=!1}trackByFn(e,t){return t.toString()}scrollTo(e){var t;e===void 0&&(e=(t=this.scrollBar)===null||t===void 0?void 0:t.nativeElement.scrollWidth),it(0).pipe(we(this.destroy$)).subscribe(()=>{this.scrollBar&&(this.scrollBar.nativeElement.scrollLeft=e||0)})}filterValue(e){let t=new Set;return e.reverse().filter(n=>!this.uniqueTags||n&&!t.has(n)&&t.add(n)).reverse()}onScrollKeyDown(e,t){let n=this.tags.find((r,a)=>a===e+t);!n||!this.scrollBar||(n.nativeElement.focus(),t*this.scrollBar.nativeElement.clientWidth-t*n.nativeElement.offsetLeft-n.nativeElement.clientWidth<0&&(this.scrollBar.nativeElement.scrollLeft+=t*n.nativeElement.clientWidth))}updateSearch(e){this.focusableElement&&(this.focusableElement.nativeElement.value=e),this.search=e,this.searchChange.emit(e)}addTag(){var e,t;let n=(t=(e=this.search)===null||e===void 0?void 0:e.trim())!==null&&t!==void 0?t:"";!n||this.disabledItemHandler(n)||(this.updateSearch(""),this.value=this.filterValue(this.value.concat(n)))}deleteLastEnabledItem(){for(let e=this.value.length-1;e>=0;e--)if(!this.disabledItemHandler(this.value[e])){this.value=bi(this.value,e);break}}focusInput(e=!0){var t;(t=this.nativeFocusableElement)===null||t===void 0||t.focus({preventScroll:e})}clippedValue(e){return e.slice(0,this.maxLength||e.length)}get lineHeight(){return this.labelOutside?ya[this.controller.size]+2*wa:Oa[this.controller.size]}}return i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(G),g(A),g(tn,8),g(We),g(bt,8),g(dn),g(Ta),g(ft))},i.\u0275cmp=y({type:i,selectors:[["tui-input-tag"]],contentQueries:function(e,t,n){if(e&1&&At(n,_n,5,ai),e&2){let r;z(r=V())&&(t.datalist=r.first)}},viewQuery:function(e,t){if(e&1&&(F(qe,5),F(ea,5),F(ta,5),F(ia,5,A),F(Ue,5,A),F(na,5),F(oa,5,A)),e&2){let n;z(n=V())&&(t.hostedDropdown=n.first),z(n=V())&&(t.focusableElement=n.first),z(n=V())&&(t.tagsContainer=n.first),z(n=V())&&(t.cleanerSvg=n.first),z(n=V())&&(t.scrollBar=n.first),z(n=V())&&(t.errorIconTemplate=n.first),z(n=V())&&(t.tags=n)}},hostVars:7,hostBindings:function(e,t){e&1&&_("focusin.capture.silent",function(){return t.onFocusInOut()})("focusout.capture.silent",function(){return t.onFocusInOut()}),e&2&&(k("data-size",t.size),T("_expandable",t.expandable)("_label-outside",t.labelOutside)("_icon-left",t.iconLeft))},inputs:{separator:"separator",search:"search",editable:"editable",tagValidator:"tagValidator",expandable:"expandable",rows:"rows",inputHidden:"inputHidden",uniqueTags:"uniqueTags",autoColor:"autoColor",maxLength:"maxLength",placeholder:"placeholder",removable:"removable",disabledItemHandler:"disabledItemHandler",pseudoFocusedSetter:[0,"pseudoFocused","pseudoFocusedSetter"]},outputs:{searchChange:"searchChange"},features:[R([Te(i),ye(i),Gi(i),cn,$e],[On]),Y],ngContentSelectors:aa,decls:25,vars:34,consts:[["text",""],["focusableElement",""],["errorIcon",""],["tag",""],["cleaner",""],[4,"ngIf"],[1,"t-hosted",3,"openChange","tuiActiveZoneChange","canOpen","content","open"],["tuiWrapper","",3,"click.prevent.silent","mousedown","appearance","disabled","focus","hover","invalid","readOnly"],[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"],[1,"t-input-wrapper"],[1,"t-ghost"],["automation-id","tui-input-tag__native","type","text",1,"t-native",3,"drop.prevent","keydown.arrowLeft","keydown.backspace","keydown.enter.prevent","ngModelChange","paste.prevent","disabled","id","ngModel","placeholder","readOnly","tuiFocusable"],[1,"t-value-content"],["class","t-icons t-icon-wrapper",4,"ngIf"],[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,"autoColor","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,"edited","keydown.arrowLeft.prevent","keydown.arrowRight.prevent","autoColor","disabled","editable","hoverable","leftContent","maxLength","removable","separator","size","status","tuiFocusable","value"],["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,"click.stop","src"],["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,t){if(e&1){let n=P();ee(ra),v(0,sa,1,0,"ng-container",5),S(1,"async"),d(2,"tui-hosted-dropdown",6),ne("openChange",function(a){return c(n),ie(t.open,a)||(t.open=a),p(a)}),_("tuiActiveZoneChange",function(a){return c(n),p(t.onActiveZone(a))}),d(3,"div",7),_("click.prevent.silent",function(a){return c(n),p(t.detectRetargetFromLabel(a))})("mousedown",function(a){return c(n),p(t.onMouseDown(a))}),d(4,"div",8),v(5,ua,2,4,"div",9),d(6,"div",10)(7,"div",11),v(8,da,2,2,"div",12),m(),d(9,"tui-scrollbar",13)(10,"div",14),v(11,pa,2,2,"ng-container",15)(12,ga,1,1,"ng-template",null,0,K),d(14,"div",16)(15,"div",17),w(16),m(),d(17,"input",18,1),_("drop.prevent",function(a){return c(n),p(t.onDrop(a))})("keydown.arrowLeft",function(a){return c(n),p(t.onFieldKeyDownArrowLeft(a))})("keydown.backspace",function(a){return c(n),p(t.onFieldKeyDownBackspace(a))})("keydown.enter.prevent",function(){return c(n),p(t.onFieldKeyDownEnter())})("ngModelChange",function(a){return c(n),p(t.onInput(a))})("paste.prevent",function(a){return c(n),p(t.onPaste(a))}),m()()(),d(19,"div",19),W(20),m()()(),W(21,1),v(22,ba,4,3,"div",20),m(),v(23,Ma,1,1,"ng-template",null,2,K),m()()}if(e&2){let n,r=Q(13);s("ngIf",$(1,32,t.hintOptions==null?null:t.hintOptions.change$)),u(2),s("canOpen",t.canOpen)("content",t.datalist||""),te("open",t.open),u(),s("appearance",t.appearance)("disabled",t.computedDisabled)("focus",t.computedFocused)("hover",t.pseudoHover)("invalid",t.computedInvalid)("readOnly",t.readOnly),u(2),s("ngIf",t.iconLeft),u(3),s("ngIf",t.hasPlaceholder),u(),ge("max-height",t.computeMaxHeight,"rem"),s("hidden",!t.expandable),u(),T("t-tags_empty",(!t.focused||t.inputHidden)&&!(t.value!=null&&t.value.length)&&!(!(t.search==null||(n=t.search.trim())==null)&&n.length)),u(),s("ngIf",t.labelOutside)("ngIfElse",r),u(3),T("t-input-wrapper_collapsed",t.computedDisabled||t.readOnly||t.inputHidden),u(2),rt(t.search),u(),T("t-native_hidden",t.inputHidden),s("disabled",t.computedDisabled)("id",t.id)("ngModel",t.search)("placeholder",t.placeholder)("readOnly",t.readOnly||t.inputHidden)("tuiFocusable",t.computedFocusable),k("maxLength",t.maxLength),u(5),s("ngIf",t.hasRightIcons)}},dependencies:[qe,de,Ue,wo,vn,U,Vi,Ye,Me,Ee,Re,ze,ve,re,ue],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}@supports (-webkit-touch-callout: none){.t-input[_ngcontent-%COMP%]:active{font-size:1rem}}.t-input[inputMode=none][_ngcontent-%COMP%]{caret-color:transparent}.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=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=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]{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%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-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}@supports (-webkit-touch-callout: none){.t-native[_ngcontent-%COMP%]:active{font-size:1rem}}.t-native[inputMode=none][_ngcontent-%COMP%]{caret-color:transparent}.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}),i})(),Io=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({providers:[Di],imports:[[I,Ce,Pe,He,Le,Ai,ce,Ct,Cn,yt,xo,Ke]]}),i})();var xa=["type","range","tuiSlider",""];var ka={size:"m",trackColor:"var(--tui-base-03)"},Ia=be(ka);var Zt=(()=>{class i{constructor(e,t,n,r,a,f){var h;this.control=e,this.options=n,this.el=r,this.userAgent=a,this.injector=f,this.size=this.options.size,this.segments=1,e instanceof re&&((h=e.valueChanges)===null||h===void 0||h.pipe(wi(t),ei(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:t,hasKeySteps:n}=this;return!n&&t instanceof re?t.viewModel:Number(e.nativeElement.value)||0}set value(e){this.el.nativeElement.value=`${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 _i(gi,this.userAgent)}get hasKeySteps(){return!!this.injector.get(Da,null)}}return i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(G),g(Ia),g(A),g(Ii),g(ni))},i.\u0275cmp=y({type:i,selectors:[["input","type","range","tuiSlider",""]],hostVars:11,hostBindings:function(e,t){e&1&&_("input",function(){return 0}),e&2&&(k("data-size",t.size),ge("--tui-slider-track-color",t.options.trackColor)("--tui-slider-fill-ratio",t.valueRatio)("--tui-slider-fill-percentage",t.valuePercentage,"%")("--tui-slider-segment-width",t.segmentWidth,"%"),T("_old-edge",t.isOldEdge))},inputs:{size:"size",segments:"segments"},attrs:xa,decls:0,vars:0,template:function(e,t){},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}),tt([ut],i.prototype,"hasKeySteps",null),i})(),Da=(()=>{class i extends Ei{constructor(e,t,n,r){super(e,t),this.el=n,this.slider=r}get nativeFocusableElement(){return this.computedDisabled?null:this.el.nativeElement}get focused(){return Ae(this.nativeFocusableElement)}get min(){return this.keySteps[0][1]}get max(){return this.keySteps[this.keySteps.length-1][1]}updateControlValue(){this.value=co(this.slider.valuePercentage,this.keySteps)}writeValue(e){if(e===null)return;let t=fi(e,this.min,this.max);this.slider.value=this.transformToNativeValue(t)}getFallbackValue(){return 0}transformToNativeValue(e){let{min:t,max:n}=this.slider;return po(e,this.keySteps)*(n-t)/100+t}}return i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(G),g(A),g(ti(()=>Zt)))},i.\u0275dir=me({type:i,selectors:[["input","tuiSlider","","keySteps",""]],hostVars:4,hostBindings:function(e,t){e&1&&_("input",function(){return t.updateControlValue()})("change",function(){return t.updateControlValue()}),e&2&&(ot("disabled",t.computedDisabled),k("aria-valuenow",t.safeCurrentValue)("aria-valuemin",t.min)("aria-valuemax",t.max))},inputs:{keySteps:"keySteps"},features:[Y]}),i})();var Do=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I]]}),i})();function Sa(i,o){if(i&1&&x(0,"span",18),i&2){let e=l();s("innerHtml",e.purify("Customizable for any use case"),ri)}}function Ea(i,o){if(i&1&&(d(0,"tui-checkbox-labeled",19),w(1),m()),i&2){let e=o.$implicit,t=l();s("ngModel",e===t.labels[1]),u(),q(" ",e," ")}}function za(i,o){if(i&1){let e=P();d(0,"div",20)(1,"div",21),x(2,"img",22),d(3,"h3"),w(4,"Aleksandr Inkin"),m()(),d(5,"div",23)(6,"button",24),_("click",function(){let n=c(e).$implicit;return p(n.complete())}),m(),d(7,"button",25),_("click",function(){let n=c(e).$implicit;return p(n.complete())}),m()()()}}function Va(i,o){if(i&1){let e=P();d(0,"tui-push",26),_("close",function(){c(e);let n=l();return p(n.toggle(!1))}),x(1,"tui-svg",27),w(2," I have a bad feeling about this... "),d(3,"button",28),_("click",function(){c(e);let n=l();return p(n.toggle(!1))}),w(4," Fortune "),m(),d(5,"button",29),_("click",function(){c(e);let n=l();return p(n.toggle(!1))}),w(6," Glory "),m()()}}var cc=(()=>{let o=class o{constructor(){this.dompurifySanitizer=_e(Hn),this.dialogs=_e(fn),this.cd=_e(G),this.builtInTools=[Yt.Undo,Yt.Img],this.labels=["New","Read","Archived","Junk"],this.tags=["Angular","Open source"],this.date=null,this.notification=!1,this.slider=80}onDay(t){this.date=t}call(t){this.dialogs.open(t,{appearance:"call",closeable:!1,dismissible:!1}).subscribe()}toggle(t){this.notification=t,this.cd.detectChanges()}purify(t){return this.dompurifySanitizer.sanitize(oi.HTML,t)}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=y({type:o,selectors:[["home"]],standalone:!0,features:[li],decls:28,vars:13,consts:[["hint",""],["callTemplate",""],[1,"title"],[1,"tui-space_vertical-10",3,"ngModelChange","tuiHintContent","tuiTextfieldLabelOutside","ngModel"],[1,"flex"],[1,"date"],["required","",3,"ngModelChange","click.capture.stop","keydown.capture.stop","mousedown.capture.stop","ngModel"],[1,"calendar",3,"dayClick","event.prevent.silent","tuiDropdownOpen","value"],["size","l","class","tui-space_bottom-4",3,"ngModel",4,"ngFor","ngForOf"],[1,"controls"],["size","l",1,"tui-space_right-3",3,"ngModelChange","showIcons","ngModel"],["size","m","step","any","tuiSlider","","type","range",1,"tui-space_vertical-6",3,"ngModelChange","max","ngModel"],[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"],[3,"tools"],["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(n,r){if(n&1){let a=P();d(0,"h2",2),w(1," Dozens of "),x(2,"br"),w(3,` components +import{$ as se,$a as mn,A as Re,Aa as en,Ab as In,B as He,Bb as Dn,C as Ni,Cb as Sn,D as ji,Db as En,E as dt,Eb as zn,F as Le,Fa as de,Fb as Vn,G as Ne,Ga as ce,Gb as An,H as je,Ha as tn,Hb as Fn,Ia as $e,Ib as Rn,Ja as Ue,Jb as Hn,Ka as Ct,Kb as Ln,M as ct,Ma as Wt,N as pt,Na as nn,O as mt,Oa as on,P as gt,Pa as bt,Q as Bi,Qa as rn,R as ht,Ra as an,S as Lt,Sa as sn,T as Nt,Ta as ln,U as Wi,Ua as un,V as $i,Va as Mt,W as jt,Wa as dn,X as Z,Xa as cn,Y as ae,Ya as Ye,Z as Bt,Za as Ke,_ as Ze,_a as pn,aa as le,ab as Pt,ba as Ui,bb as Tt,c as _i,cb as Ge,db as Qe,eb as gn,f as ki,fa as Be,fb as hn,g as Me,ga as Yi,gb as _n,h as Pe,ha as Ki,hb as fn,i as Si,ia as _t,j as Ei,ja as Oe,jb as qe,k as ye,ka as J,kb as yt,lb as vn,m as zi,mb as Cn,n as Fe,nb as Ot,o as st,oa as ft,ob as bn,p as lt,pa as Gi,pb as Mn,qa as Qi,qb as Pn,ra as vt,rb as $t,sb as Tn,t as ut,ta as qi,tb as yn,u as Vi,ua as Xi,ub as Ut,v as Ai,va as We,vb as wt,w as Fi,wb as On,x as Ri,xb as wn,y as Hi,ya as Zi,yb as xn,z as Li,za as Ji,zb as kn}from"./chunk-DFAUMSGH.js";import{Aa as xe,Ga as Di,I as Ae,J as at,Ka as Yt,T as Oi,V as wi,W as xi,aa as Ii,n as X,o as Rt,p as gi,q as hi,qa as Te,ta as Ht}from"./chunk-HJXCO6QW.js";import"./chunk-J5MQQQCD.js";import{$c as bi,Ab as d,Ad as yi,Bb as m,Cb as x,Da as c,Db as j,Dc as Ee,Ea as p,Eb as B,Ec as U,Fb as Vt,Ga as ii,Gb as P,Ha as ni,Hb as ot,Hc as ue,J as ei,Ja as A,Jb as _,Kb as l,Kc as I,La as D,Lb as ee,Mb as W,Nb as At,Ob as F,Pb as z,Qb as V,Qc as ze,Rb as Q,Rc as oe,Sb as w,Sc as ve,Tb as rt,Tc as re,Ub as q,Uc as pi,Vc as mi,Wb as te,Wc as Ce,Xb as ie,Xc as fi,Yb as ne,Yc as vi,Zb as R,_b as li,_c as Ci,aa as we,ac as fe,bb as oi,bd as be,cb as ri,cc as ui,dc as S,ec as $,fc as Ft,ga as ti,hb as u,hc as di,ia as b,ib as g,ic as ci,jc as K,kb as ai,kd as Ve,la as zt,m as tt,na as _e,pd as Mi,qb as si,sb as Y,sc as G,sd as Pi,t as he,ta as y,td as Ti,ua as M,va as me,vb as v,wa as nt,wb as k,xb as s,y as Jt,yb as ge,z as it,zb as T}from"./chunk-5EVGTXYE.js";import"./chunk-GOOAHOWT.js";var Nn=(()=>{class i{constructor(e,t,n){this.el=e,this.zone=t,this.destroy$=n,this.eventName=""}ngOnInit(){Jt(this.el.nativeElement,this.eventName,{passive:!1}).pipe(xi(this.zone),Oi(),we(this.destroy$)).subscribe()}}return i.\u0275fac=function(e){return new(e||i)(g(A),g(si),g(xe,2))},i.\u0275dir=me({type:i,selectors:[["","tuiPreventDefault",""]],inputs:{eventName:[0,"tuiPreventDefault","eventName"]},features:[R([xe])]}),i})(),jn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({}),i})();var Bn=(()=>{class i{constructor(e,t){this.el=e,this.destroy$=t}set tuiScrollIntoView(e){e&&it(0).pipe(we(this.destroy$)).subscribe(()=>{this.el.nativeElement.dispatchEvent(new CustomEvent(Yi,{bubbles:!0,detail:this.el.nativeElement}))})}}return i.\u0275fac=function(e){return new(e||i)(g(A),g(xe,2))},i.\u0275dir=me({type:i,selectors:[["","tuiScrollIntoView",""]],inputs:{tuiScrollIntoView:"tuiScrollIntoView"},features:[R([xe])]}),i})(),Wn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({}),i})();function zo(i,o){if(i&1){let e=P();d(0,"div",4),_("click",function(){let n=c(e).tuiLet,r=l(3);return p(r.onItemClick(n))})("tuiHoveredChange",function(n){let r=c(e).tuiLet,a=l(3);return p(a.onItemHovered(n,r))})("tuiPressedChange",function(n){let r=c(e).tuiLet,a=l(3);return p(a.onItemPressed(n,r))}),d(1,"div",5),w(2),m()()}if(i&2){let e=o.tuiLet,t=l(3);T("t-cell_interval",t.itemIsInterval(e))("t-cell_today",t.itemIsToday(e)),s("tuiScrollIntoView",t.scrollItemIntoView(e)),k("data-range",t.getItemRange(e))("data-state",t.getItemState(e)),u(2),rt(e)}}function Vo(i,o){if(i&1&&(j(0),v(1,zo,3,8,"div",3),B()),i&2){let e=o.$implicit,t=l().$implicit,n=l();u(),s("tuiLet",n.getItem(t,e))}}function Ao(i,o){i&1&&(d(0,"div",1),v(1,Vo,2,1,"ng-container",2),m()),i&2&&(u(),s("tuiRepeatTimesOf",4))}var $n=100,Un=4,Yn=(()=>{class i{constructor(){this.hoveredItem=null,this.pressedItem=null,this.currentYear=Z.currentLocal().year,this.value=null,this.initialItem=Z.currentLocal(),this.min=se,this.max=le,this.disabledItemHandler=X,this.yearClick=new D}get computedMin(){var e;return(e=this.min)!==null&&e!==void 0?e:se}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)/Un)}get calculatedMin(){let e=this.initialItem.year-$n,t=this.computedMin;return t.year>e?t.year:e}get calculatedMax(){let e=this.initialItem.year+$n,t=this.computedMax;return t.yeart.from.year&&t.from.year===e&&t.from.yearSame(t.to)||n!==null&&n===e&&nt.from.year&&t.from.yearSame(t.to)?J.End:t.from.yearSame(t.to)&&t.from.year===e?J.Single:null:t.find(r=>r.year===e)?J.Single:null}itemIsToday(e){return this.currentYear===e}itemIsInterval(e){let{value:t,hoveredItem:n}=this;return t===null||!this.isRange(t)?!1:t.from.yearSame(t.to)?n===null||t.from.year===n?!1:vi(e,Math.min(t.from.year,n),Math.max(t.from.year,n)):t.from.year<=e&&t.to.year>e}onItemHovered(e,t){this.updateHoveredItem(e,t)}onItemPressed(e,t){this.updatePressedItem(e,t)}onItemClick(e){this.yearClick.emit(new jt(e))}updateHoveredItem(e,t){this.hoveredItem=e?t:null}updatePressedItem(e,t){this.pressedItem=e?t:null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=y({type:i,selectors:[["tui-primitive-year-picker"]],hostVars:2,hostBindings:function(e,t){e&2&&T("_single",t.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,"click","tuiHoveredChange","tuiPressedChange","tuiScrollIntoView"],[1,"t-item"]],template:function(e,t){e&1&&v(0,Ao,2,1,"div",0),e&2&&s("tuiRepeatTimesOf",t.rows)},dependencies:[mt,Ne,Bn,dt,ct],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}),i})(),Kn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[Le,pt,gt,je,Wn]]}),i})();var Ro=["*"];function Ho(i,o){if(i&1){let e=P();j(0),d(1,"button",1),_("click",function(){c(e);let n=l();return p(n.onLeftClick())}),m(),d(2,"span",2),W(3),m(),d(4,"button",3),_("click",function(){c(e);let n=l();return p(n.onRightClick())}),m(),B()}if(i&2){let e=o.ngIf,t=l();u(),T("t-hidden",t.leftComputedDisabled),s("focusable",t.computedFocusable)("icon",t.icons.decrement)("title",e[0]),u(3),T("t-hidden",t.rightComputedDisabled),s("focusable",t.computedFocusable)("icon",t.icons.increment)("title",e[1])}}var Gn=(()=>{class i extends Si{constructor(e,t,n){super(),this.el=e,this.icons=t,this.spinTexts$=n,this.disabled=!1,this.leftDisabled=!1,this.rightDisabled=!1,this.leftClick=new D,this.rightClick=new D}get focused(){return at(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 i.\u0275fac=function(e){return new(e||i)(g(A),g(Zi),g(qi))},i.\u0275cmp=y({type:i,selectors:[["tui-primitive-spin-button"]],hostBindings:function(e,t){e&1&&_("mousedown.silent.prevent",function(){return 0})("keydown.arrowLeft.prevent",function(){return t.onLeftClick()})("keydown.arrowRight.prevent",function(){return t.onRightClick()})("focusin",function(){return t.onFocused(!0)})("focusout",function(){return t.onFocused(!1)})},inputs:{disabled:"disabled",leftDisabled:"leftDisabled",rightDisabled:"rightDisabled"},outputs:{leftClick:"leftClick",rightClick:"rightClick"},features:[Y],ngContentSelectors:Ro,decls:2,vars:3,consts:[[4,"ngIf"],["appearance","flat","automation-id","tui-primitive-spin-button__left","size","xs","tuiIconButton","","type","button",3,"click","focusable","icon","title"],[1,"t-content","t-calendar-title"],["appearance","flat","automation-id","tui-primitive-spin-button__right","size","xs","tuiIconButton","","type","button",3,"click","focusable","icon","title"]],template:function(e,t){e&1&&(ee(),v(0,Ho,5,10,"ng-container",0),S(1,"async")),e&2&&s("ngIf",$(1,1,t.spinTexts$))},dependencies:[Pt,U,ue],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}),i})(),Qn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,Tt]]}),i})();var No=(i,o)=>{let e=new Date(i.year,i.month,1).getDay();return e>=o?e-o:ht-(o-e)},jo=({month:i,rowIndex:o,colIndex:e,firstDayOfWeek:t})=>{let n=o*ht+e-No(i,t)+1;return n>i.daysCount&&(n-=i.daysCount,i=i.append({month:1})),n<=0&&(i=i.append({month:-1}),n=i.daysCount+n),new ae(i.year,i.month,n)},Bo=6,qn=(()=>{class i{constructor(e){this.firstDayOfWeek=e,this.currentMonth=null,this.currentSheet=[]}transform(e,t=!1){var n;if(!((n=this.currentMonth)===null||n===void 0)&&n.monthSame(e))return this.currentSheet;let r=[];for(let a=0;aL.yearL.year>E.year||L.month>E.month;if(!(O(C)&&!t)){if(N(C)&&!t)break;f.push(C)}}r.push(f)}return this.currentSheet=r.filter(a=>a.length),this.currentMonth=e,this.currentSheet}}return i.\u0275fac=function(e){return new(e||i)(g(vt,16))},i.\u0275pipe=nt({name:"tuiCalendarSheet",type:i,pure:!0}),i})(),Xn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({}),i})();function Wo(i){let o=i.length-1;return[i[o],...i.slice(0,o)]}var Zn=(()=>{class i{constructor(e){this.firstDayOfWeekIndex=e}transform(e){return e.pipe(he(Wo),he(t=>[...t.slice(this.firstDayOfWeekIndex),...t.slice(0,this.firstDayOfWeekIndex)]))}}return i.\u0275fac=function(e){return new(e||i)(g(vt,16))},i.\u0275pipe=nt({name:"tuiOrderWeekDays",type:i,pure:!0}),i})(),Jn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({}),i})();function Uo(i,o){if(i&1&&(j(0),w(1),B()),i&2){let e=l();u(),q(" ",e.value.formattedYear," ")}}function Yo(i,o){if(i&1){let e=P();d(0,"button",3),_("click",function(){c(e);let n=l();return p(n.onYearClick())}),w(1),m()}if(i&2){let e=l();s("tuiFocusable",!1),u(),q(" ",e.value.formattedYear," ")}}var eo=(()=>{class i{constructor(){this.value=Z.currentLocal(),this.min=se,this.max=le,this.valueChange=new D,this.yearClick=new D}get computedMin(){var e;return(e=this.min)!==null&&e!==void 0?e:se}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:t}=this;return e.year===t.year}onYearClick(){this.yearClick.next(this.value)}onPrevMonthClick(){this.appendValueWithLimit({month:-1})}onNextMonthClick(){this.appendValueWithLimit({month:1})}appendValueWithLimit(e){let t=this.value.append(e),{computedMin:n,computedMax:r}=this;if(n.monthSameOrAfter(t)){this.updateValue(n);return}this.updateValue(r.monthSameOrBefore(t)?r:t)}updateValue(e){this.value.monthSame(e)||(this.value=e,this.valueChange.emit(e))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=y({type:i,selectors:[["tui-primitive-year-month-pagination"]],inputs:{value:"value",min:"min",max:"max"},outputs:{valueChange:"valueChange",yearClick:"yearClick"},decls:7,vars:10,consts:[["button",""],[3,"leftClick","rightClick","focusable","leftDisabled","rightDisabled"],[4,"ngIf","ngIfElse"],["id","year-btn","automation-id","tui-primitive-year-month-pagination__year-button","tuiLink","","type","button",3,"click","tuiFocusable"]],template:function(e,t){if(e&1){let n=P();d(0,"tui-primitive-spin-button",1),_("leftClick",function(){return c(n),p(t.onPrevMonthClick())})("rightClick",function(){return c(n),p(t.onNextMonthClick())}),w(1),S(2,"tuiMonth"),S(3,"async"),v(4,Uo,2,1,"ng-container",2)(5,Yo,2,2,"ng-template",null,0,K),m()}if(e&2){let n=Q(6);s("focusable",!1)("leftDisabled",t.prevMonthDisabled)("rightDisabled",t.nextMonthDisabled),u(),q(" ",$(3,8,$(2,6,t.value))," "),u(3),s("ngIf",t.oneYear)("ngIfElse",n)}},dependencies:[Gn,Ge,U,Re,ue,gn],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),i})(),to=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,He,Qn,Qe,hn]]}),i})();var Go=(i,o,e,t,n)=>[i,o,e,t,n];function Qo(i,o){if(i&1&&x(0,"div",3),i&2){let e=o.$implicit;s("textContent",e)}}function qo(i,o){if(i&1&&x(0,"div",14),i&2){let e=l().ngIf;ge("background-color",(e==null?null:e[1])||"")}}function Xo(i,o){if(i&1&&(d(0,"div",13),x(1,"div",14),v(2,qo,1,2,"div",15),m()),i&2){let e=o.ngIf;u(),ge("background-color",e==null?null:e[0]),u(),s("ngIf",e.length>1)}}function Zo(i,o){if(i&1){let e=P();d(0,"div",10),_("click",function(){c(e);let n=l().tuiLet,r=l(4);return p(r.onItemClick(n))})("tuiHoveredChange",function(n){c(e);let r=l().tuiLet,a=l(4);return p(a.onItemHovered(n&&r))})("tuiPressedChange",function(n){c(e);let r=l().tuiLet,a=l(4);return p(a.onItemPressed(n&&r))}),d(1,"div",11),S(2,"tuiMapper"),w(3),v(4,Xo,3,3,"div",12),S(5,"tuiMapper"),m()()}if(i&2){let e=l().tuiLet,t=l(4);T("t-cell_interval",t.itemIsInterval(e))("t-cell_today",t.itemIsToday(e))("t-cell_unavailable",t.itemIsUnavailable(e)),k("data-range",t.getItemRange(e))("data-state",t.getItemState(e)),u(),T("t-item_unavailable",t.itemIsUnavailable(e)),k("data-type",Ft(2,13,e,t.dayTypeHandler)),u(2),q(" ",e.day," "),u(),s("ngIf",ci(5,16,ui(22,Go,e,t.toMarkers,t.itemIsToday(e),!!t.getItemRange(e),t.markerHandler)))}}function Jo(i,o){if(i&1&&(j(0),v(1,Zo,6,28,"div",9),B()),i&2){let e=o.tuiLet,t=l(4);u(),s("ngIf",!t.itemIsUnavailable(e)||t.showAdjacent)}}function er(i,o){if(i&1&&(j(0),v(1,Jo,2,1,"ng-container",8),B()),i&2){let e=o.$implicit,t=l().$implicit,n=l().tuiLet;u(),s("tuiLet",n[t][e])}}function tr(i,o){if(i&1&&(d(0,"div",6),v(1,er,2,1,"ng-container",7),m()),i&2){let e=o.$implicit,t=l().tuiLet;u(),s("tuiRepeatTimesOf",t[e].length)}}function ir(i,o){if(i&1&&(d(0,"div",4),v(1,tr,2,1,"div",5),m()),i&2){let e=o.tuiLet;u(),s("tuiRepeatTimesOf",e.length)}}var io=(()=>{class i{constructor(e,t){this.unorderedWeekDays$=e,this.dayTypeHandler=t,this.pressedItem=null,this.today=ae.currentLocal(),this.month=Z.currentLocal(),this.disabledItemHandler=X,this.markerHandler=Be,this.value=null,this.hoveredItem=null,this.showAdjacent=!0,this.hoveredItemChange=new D,this.dayClick=new D,this.toMarkers=(n,r,a,f)=>{if(r||a)return null;let h=f(n);return h.length===0?null:h}}get isSingleDayRange(){return this.value instanceof Ze&&this.value.isSingleDay}get isSingle(){return this.isSingleDayRange}getItemState(e){let{disabledItemHandler:t,pressedItem:n,hoveredItem:r}=this;return t(e)?Oe.Disabled:n!=null&&n.daySame(e)?Oe.Active:r!=null&&r.daySame(e)?Oe.Hover:null}getItemRange(e){let{value:t,hoveredItem:n}=this;return t?t instanceof ae?t.daySame(e)?J.Single:null:t instanceof Ze?t.from.daySame(e)&&!t.isSingleDay||n!=null&&n.dayAfter(t.from)&&t.from.daySame(e)&&t.isSingleDay||n!=null&&n.daySame(e)&&n.dayBefore(t.from)&&t.isSingleDay?J.Start:t.to.daySame(e)&&!t.isSingleDay||n!=null&&n.dayBefore(t.from)&&t.from.daySame(e)&&t.isSingleDay||n!=null&&n.daySame(e)&&n.dayAfter(t.from)&&t.isSingleDay?J.End:t.isSingleDay&&t.from.daySame(e)?J.Single:null:t.find(r=>r.daySame(e))?J.Single:null:null}itemIsToday(e){return this.today.daySame(e)}itemIsUnavailable(e){return!this.month.monthSame(e)}itemIsInterval(e){let{value:t,hoveredItem:n}=this;if(!(t instanceof Ze))return!1;if(!t.isSingleDay)return t.from.daySameOrBefore(e)&&t.to.dayAfter(e);if(n===null)return!1;let r=Ze.sort(t.from,n);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){Ve(this.hoveredItem,e,(t,n)=>t.daySame(n))||(this.hoveredItem=e,this.hoveredItemChange.emit(e))}}return i.\u0275fac=function(e){return new(e||i)(g(Xi),g(Qi))},i.\u0275cmp=y({type:i,selectors:[["tui-primitive-calendar"]],hostVars:2,hostBindings:function(e,t){e&2&&T("_single",t.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,t){e&1&&(d(0,"div",0),v(1,Qo,1,1,"div",1),S(2,"tuiOrderWeekDays"),S(3,"async"),m(),v(4,ir,2,1,"div",2),S(5,"tuiCalendarSheet")),e&2&&(u(),s("ngForOf",$(3,4,$(2,2,t.unorderedWeekDays$))),u(3),s("tuiLet",Ft(5,6,t.month,!0)))},dependencies:[Ee,Ne,mt,U,dt,ct,ue,Zn,qn,st],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}),i})(),no=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,je,lt,gt,Le,pt,Xn,Jn]]}),i})();function or(i,o){if(i&1){let e=P();d(0,"tui-scrollbar",2)(1,"tui-primitive-year-picker",3),_("yearClick",function(n){c(e);let r=l();return p(r.onPickerYearClick(n))}),m()()}if(i&2){let e=l();u(),s("initialItem",e.month)("max",e.computedMax)("min",e.computedMin)("value",e.value)}}function rr(i,o){if(i&1){let e=P();d(0,"tui-primitive-year-month-pagination",4),_("valueChange",function(n){c(e);let r=l();return p(r.onPaginationValueChange(n))})("yearClick",function(){c(e);let n=l();return p(n.onPaginationYearClick())}),m(),d(1,"tui-primitive-calendar",5),S(2,"tuiMapper"),_("dayClick",function(n){c(e);let r=l();return p(r.onDayClick(n))})("hoveredItemChange",function(n){c(e);let r=l();return p(r.onHoveredItemChange(n))}),m()}if(i&2){let e=l();s("max",e.computedMaxViewedMonth)("min",e.computedMinViewedMonth)("value",e.month),u(),s("disabledItemHandler",di(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 xt=(()=>{class i{constructor(){this.day=null,this.view="month",this.month=Z.currentLocal(),this.disabledItemHandler=X,this.min=se,this.max=le,this.minViewedMonth=se,this.maxViewedMonth=le,this.hoveredItem=null,this.showAdjacent=!0,this.markerHandler=Be,this.dayClick=new D,this.monthChange=new D,this.hoveredItemChange=new D,this.disabledItemHandlerMapper=(e,t,n)=>r=>r.dayBefore(t)||r.dayAfter(n)||e(r)}set initialView(e){this.view=e}set value(e){this.day=e,this.showAdjacent&&e instanceof ae&&(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:se}get computedMax(){var e;return(e=this.max)!==null&&e!==void 0?e:le}get computedMinViewedMonth(){var e;let t=this.computedMin,n=(e=this.minViewedMonth)!==null&&e!==void 0?e:se;return n.monthSameOrAfter(t)?n:t}get computedMaxViewedMonth(){var e;let t=this.computedMax,n=(e=this.maxViewedMonth)!==null&&e!==void 0?e:le;return n.monthSameOrBefore(t)?n:t}onPaginationYearClick(){this.view="year"}onPickerYearClick({year:e}){this.view="month",this.updateViewedMonth(new Z(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){Ve(this.hoveredItem,e,(t,n)=>t.daySame(n))||(this.hoveredItem=e,this.hoveredItemChange.emit(e))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=y({type:i,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:[["calendar",""],["automation-id","tui-calendar__scrollbar","class","t-scrollbar",4,"ngIf","ngIfElse"],["automation-id","tui-calendar__scrollbar",1,"t-scrollbar"],["automation-id","tui-calendar__year",3,"yearClick","initialItem","max","min","value"],["automation-id","tui-calendar__pagination",1,"t-pagination",3,"valueChange","yearClick","max","min","value"],["automation-id","tui-calendar__calendar",3,"dayClick","hoveredItemChange","disabledItemHandler","hoveredItem","markerHandler","month","showAdjacent","value"]],template:function(e,t){if(e&1&&v(0,or,2,4,"tui-scrollbar",1)(1,rr,3,14,"ng-template",null,0,K),e&2){let n=Q(2);s("ngIf",t.isInYearView)("ngIfElse",n)}},dependencies:[Ue,Yn,eo,io,U,st],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}),i})(),kt=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,to,no,Kn,Ct,lt]]}),i})();var ar=["*"],sr=i=>({$implicit:i});function lr(i,o){if(i&1&&x(0,"tui-svg",2),i&2){let e=o.polymorpheusOutlet,t=l();T("t-mark_on",!t.empty),s("src",e)}}var ur={size:"m",appearances:{unchecked:_t.Outline,checked:_t.Primary,indeterminate:_t.Primary},icons:{checked:({$implicit:i})=>i==="m"?"tuiIconCheck":"tuiIconCheckLarge",indeterminate:({$implicit:i})=>i==="m"?"tuiIconMinus":"tuiIconMinusLarge"}},Je=be(ur);var oo=(()=>{class i{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 i.\u0275fac=function(e){return new(e||i)(g(Je))},i.\u0275cmp=y({type:i,selectors:[["tui-primitive-checkbox"]],hostVars:1,hostBindings:function(e,t){e&2&&k("data-size",t.size)},inputs:{size:"size",disabled:"disabled",focused:"focused",hovered:"hovered",pressed:"pressed",invalid:"invalid",valueSetter:[0,"value","valueSetter"]},ngContentSelectors:ar,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,t){e&1&&(ee(),d(0,"div",0),v(1,lr,1,3,"tui-svg",1),W(2),m()),e&2&&(s("active",t.pressed)("appearance",t.appearance)("disabled",t.disabled)("focus",t.focused)("hover",t.hovered)("invalid",t.invalid),u(),s("polymorpheusOutlet",t.icon)("polymorpheusOutletContext",fe(8,sr,t.size)))},dependencies:[de,Ye,Me],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}),i})(),ro=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[ce,Ke,Pe]]}),i})();function ao(i){if(i==="")return"";let o=0;for(let r=0;ra&&o(r)),t=i[e-1]||i[0],n=i[e]||i[i.length-1];return[t,n]}function co(i,o){let[[e,t],[n,r]]=uo(o,([h,C])=>i<=h),a=(i-e)/(n-e),f=(r-t)*a+t;return Ci(f,lo)}function po(i,o){let[[e,t],[n,r]]=uo(o,([f,h])=>i<=h),a=(i-t)/(r-t)||0;return(n-e)*a+e}var dr=["focusableElement"],Dt=(()=>{class i extends Fe{constructor(e,t,n){super(e,n),this.options=t,this.size=this.options.size}get nativeFocusableElement(){return!this.focusableElement||this.computedDisabled?null:this.focusableElement.nativeElement}get focused(){return Ae(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 i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(Je),g(G))},i.\u0275cmp=y({type:i,selectors:[["tui-checkbox"]],viewQuery:function(e,t){if(e&1&&F(dr,5),e&2){let n;z(n=V())&&(t.focusableElement=n.first)}},hostVars:1,hostBindings:function(e,t){e&2&&k("data-size",t.size)},inputs:{size:"size"},features:[R([Te(i),ye(i)]),Y],decls:3,vars:11,consts:[["focusableElement",""],[3,"disabled","focused","hovered","invalid","pressed","size","value"],["automation-id","tui-checkbox__native","type","checkbox",1,"t-native",3,"tuiCheckedChange","tuiFocusedChange","tuiFocusVisibleChange","disabled","id","tuiFocusable","tuiChecked"]],template:function(e,t){if(e&1){let n=P();d(0,"tui-primitive-checkbox",1)(1,"input",2,0),ne("tuiCheckedChange",function(a){return c(n),ie(t.value,a)||(t.value=a),p(a)}),_("tuiFocusedChange",function(a){return c(n),p(t.onFocused(a))})("tuiFocusVisibleChange",function(a){return c(n),p(t.onFocusVisible(a))}),m()()}e&2&&(s("disabled",t.disabled)("focused",t.computedFocusVisible)("hovered",t.pseudoHover)("invalid",t.computedInvalid)("pressed",t.pseudoActive)("size",t.size)("value",t.value),u(),s("disabled",t.disabled)("id",t.id)("tuiFocusable",t.computedFocusable),te("tuiChecked",t.value))},dependencies:[oo,Fi,Re,Ni,Hi],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}@supports (-webkit-touch-callout: none){.t-native[_ngcontent-%COMP%]:active{font-size:1rem}}"],changeDetection:0}),i})(),mo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,Ri,He,ji,Li,ro]]}),i})();var pr=["*"],go=(()=>{class i extends Fe{constructor(e,t,n,r){super(e,t),this.mode$=n,this.options=r,this.size=this.options.size}get focused(){return Ae(this.nativeFocusableElement)}get nativeFocusableElement(){var e,t;return(t=(e=this.checkbox)===null||e===void 0?void 0:e.nativeFocusableElement)!==null&&t!==void 0?t:null}onFocused(e){this.updateFocused(e)}onModelChange(e){this.value=e}}return i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(G),g(We),g(Je))},i.\u0275cmp=y({type:i,selectors:[["tui-checkbox-labeled"]],viewQuery:function(e,t){if(e&1&&F(Dt,5),e&2){let n;z(n=V())&&(t.checkbox=n.first)}},hostVars:1,hostBindings:function(e,t){e&1&&_("$.data-mode.attr",function(){return t.mode$}),e&2&&k("data-size",t.size)},inputs:{size:"size"},features:[R([Te(i),ye(i),$e]),Y],ngContentSelectors:pr,decls:4,vars:12,consts:[[1,"t-wrapper"],[3,"ngModelChange","focusedChange","disabled","focusable","nativeId","pseudoActive","pseudoFocus","pseudoHover","pseudoInvalid","readOnly","size","ngModel"],[1,"t-content"]],template:function(e,t){e&1&&(ee(),d(0,"label",0)(1,"tui-checkbox",1),ne("ngModelChange",function(r){return ie(t.value,r)||(t.value=r),r}),_("focusedChange",function(r){return t.onFocused(r)}),m(),d(2,"div",2),W(3),m()()),e&2&&(u(),s("disabled",t.computedDisabled)("focusable",t.focusable)("nativeId",t.nativeId)("pseudoActive",t.pseudoActive)("pseudoFocus",t.pseudoFocus)("pseudoHover",t.pseudoHover)("pseudoInvalid",t.computedInvalid)("readOnly",t.readOnly)("size",t.size),te("ngModel",t.value),u(),T("t-content_disabled",t.computedDisabled))},dependencies:[Dt,ve,re],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);line-height:1.5rem;margin-left:.75rem}"],changeDetection:0}),i})(),ho=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,Ce,mo]]}),i})();var mr=new Date("0001-01-01"),gr=new Date("9999-12-31");var hr="\u2013",_r="\u2014",fr="-",vr="\u2212",Cr=[fr,hr,_r,vr];var br=[":","."];function Mr(i,o,e){let t=Math.min(Number(e),Math.max(Number(o),Number(i)));return i instanceof Date?new Date(t):t}var _o=i=>{var o,e,t;return{day:((o=i.match(/d/g))===null||o===void 0?void 0:o.length)||0,month:((e=i.match(/m/g))===null||e===void 0?void 0:e.length)||0,year:((t=i.match(/y/g))===null||t===void 0?void 0:t.length)||0}};function Pr(i){return{day:String(i.getDate()).padStart(2,"0"),month:String(i.getMonth()+1).padStart(2,"0"),year:String(i.getFullYear()).padStart(4,"0"),hours:String(i.getHours()).padStart(2,"0"),minutes:String(i.getMinutes()).padStart(2,"0"),seconds:String(i.getSeconds()).padStart(2,"0"),milliseconds:String(i.getMilliseconds()).padStart(3,"0")}}function Tr(i,o){return i.length!e.match(/^0+$/))}function fo(i,o,e){let t=o.replace(/\W/g,"").length;return i.replace(e,"").match(new RegExp(`(\\D*\\d[^\\d\\s]*){1,${t}}`,"g"))||[]}function vo(i){return i.reduce((o,[e,t])=>Object.assign(Object.assign({},o),{[e]:t}),{})}function Co(i,o){let e=o.replace(/[^dmy]/g,""),t=i.replace(/\D+/g,""),n={day:t.slice(e.indexOf("d"),e.lastIndexOf("d")+1),month:t.slice(e.indexOf("m"),e.lastIndexOf("m")+1),year:t.slice(e.indexOf("y"),e.lastIndexOf("y")+1)};return vo(Object.entries(n).filter(([r,a])=>!!a).sort(([r],[a])=>o.toLowerCase().indexOf(r[0])>o.toLowerCase().indexOf(a[0])?1:-1))}function yr(i,o){var e,t,n,r,a,f,h;let C=((e=i.year)===null||e===void 0?void 0:e.length)===2?`20${i.year}`:i.year,O=new Date(Number(C??"0"),Number((t=i.month)!==null&&t!==void 0?t:"1")-1,Number((n=i.day)!==null&&n!==void 0?n:"1"),Number((r=o==null?void 0:o.hours)!==null&&r!==void 0?r:"0"),Number((a=o==null?void 0:o.minutes)!==null&&a!==void 0?a:"0"),Number((f=o==null?void 0:o.seconds)!==null&&f!==void 0?f:"0"),Number((h=o==null?void 0:o.milliseconds)!==null&&h!==void 0?h:"0"));return O.setFullYear(Number(C??"0")),O}var et=", ";function St({day:i,month:o,year:e,hours:t,minutes:n,seconds:r,milliseconds:a},f,h){var C;let O=((C=f.match(/y/g))===null||C===void 0?void 0:C.length)===2?e==null?void 0:e.slice(-2):e;return(f+(h?et+h:"")).replace(/d+/g,i??"").replace(/m+/g,o??"").replace(/y+/g,O??"").replace(/H+/g,t??"").replace(/MSS/g,a??"").replace(/M+/g,n??"").replace(/S+/g,r??"").replace(/^\D+/g,"").replace(/\D+$/g,"")}function qt(i,o,e=0){return Number(i.padEnd(o.length,"0"))<=Number(o)?{validatedSegmentValue:i,prefixedZeroesCount:e}:i.endsWith("0")?qt(`0${i.slice(0,o.length-1)}`,o,e+1):qt(`${i.slice(0,o.length-1)}0`,o,e)}var Or={day:31,month:12,year:9999};function wr({dateString:i,dateModeTemplate:o,offset:e,selection:[t,n]}){let r=Co(i,o),a=Object.entries(r),f={},h=0;for(let[N,L]of a){let E=St(f,o),Ie=Or[N],De=E.length&&1,pe=e+E.length+De+_o(o)[N],Se=pe>=t&&pe===n;if(Se&&Number(L)>Number(Ie))return{validatedDateString:"",updatedSelection:[t,n]};if(Se&&Number(L)<1)return{validatedDateString:"",updatedSelection:[t,n]};let{validatedSegmentValue:Et,prefixedZeroesCount:So}=qt(L,`${Ie}`);h+=So,f[N]=Et}let C=St(f,o),O=C.length-i.length;return{validatedDateString:C,updatedSelection:[t+h+O,n+h+O]}}var bo=/[\\^$.*+?()[\]{}|]/g,xr=new RegExp(bo.source);function Mo(i){return i&&xr.test(i)?i.replace(bo,"\\$&"):i}function kr(i,o){let e=_o(o);return vo(Object.entries(i).map(([t,n])=>{let r=e[t];return[t,n.length===r&&n.match(/^0+$/)?"1".padStart(r,"0"):n]}))}function Ir({dateModeTemplate:i,min:o=mr,max:e=gr,rangeSeparator:t="",dateSegmentSeparator:n="."}){return({value:r,selection:a})=>{let f=t&&r.endsWith(t),h=fo(r,i,t),C="";for(let O of h){C+=C?t:"";let N=Co(O,i);if(!Tr(O,i)){let Ie=kr(N,i),De=St(Ie,i),pe=O.endsWith(n)?n:"";C+=De+pe;continue}let L=yr(N),E=Mr(L,o,e);C+=St(Pr(E),i)}return{selection:a,value:C+(f?t:"")}}}function Dr({dateModeTemplate:i,dateSegmentsSeparator:o,rangeSeparator:e=""}){return({elementState:t,data:n})=>{let r=e?new RegExp(`${e}|-`):et,a=n.split(r),f=n.includes(et)?[a[0]]:a;if(f.every(h=>h.trim().split(/\D/).length===i.split(o).length)){let h=f.map(C=>Sr(C,i,o)).join(e);return{elementState:t,data:`${h}${n.includes(et)&&et+a[1]||""}`}}return{elementState:t,data:n}}}function Sr(i,o,e){let t=i.split(/\D/),n=o.split(e);return t.map((a,f)=>f===n.length-1?a:a.padStart(n[f].length,"0")).join(e)}function Er({dateModeTemplate:i,dateSegmentsSeparator:o,rangeSeparator:e=""}){return({elementState:t,data:n})=>{let{value:r,selection:a}=t;if(n===o)return{elementState:t,data:a[0]===r.length?n:""};if(Cr.includes(n))return{elementState:t,data:e};let f=n.replace(new RegExp(`[^\\d${Mo(o)}${e}]`,"g"),"");if(!f)return{elementState:t,data:""};let[h,C]=a,O=C+n.length,N=r.slice(0,h)+f+r.slice(O),L=fo(N,i,e),E="",Ie=!!e&&N.includes(e);for(let pe of L){let{validatedDateString:Se,updatedSelection:Et}=wr({dateString:pe,dateModeTemplate:i,offset:E?E.length+e.length:0,selection:[h,O]});if(pe&&!Se)return{elementState:t,data:""};O=Et[1],E+=Ie&&E?e+Se:Se}let De=E.slice(h,O);return{elementState:{selection:a,value:E.slice(0,h)+De.split(o).map(pe=>"0".repeat(pe.length)).join(o)+E.slice(O)},data:De}}}function zr(){return({elementState:i},o)=>{let{value:e,selection:t}=i;if(!e||Vr(e,t))return{elementState:i};let[n,r]=t,a=e.slice(n,r).replace(/\d/g,"0"),f=e.slice(0,n)+a+e.slice(r);return o==="validation"||o==="insert"&&n===r?{elementState:{selection:t,value:f}}:{elementState:{selection:o==="deleteBackward"||o==="insert"?[n,n]:[r,r],value:f}}}}function Vr(i,[o,e]){return e===i.length}function Po({mode:i,separator:o=".",max:e,min:t}){let n=i.split("/").join(o);return Object.assign(Object.assign({},wt),{mask:Array.from(n).map(r=>r===o?r:/\d/),overwriteMode:"replace",preprocessors:[zr(),Dr({dateModeTemplate:n,dateSegmentsSeparator:o}),Er({dateModeTemplate:n,dateSegmentsSeparator:o})],postprocessors:[Ir({min:t,max:e,dateModeTemplate:n,dateSegmentSeparator:o})]})}var du=new RegExp(`[${br.map(Mo).join("")}]$`);var Ar=["*",[["input"]]],Fr=["*","input"],Rr=i=>({$implicit:i});function Hr(i,o){if(i&1){let e=P();d(0,"tui-primitive-textfield",5),_("focusedChange",function(n){c(e);let r=l();return p(r.onFocused(n))})("valueChange",function(n){c(e);let r=l();return p(r.onValueChange(n))}),W(1),W(2,1,["ngProjectAs","input",5,["input"]]),m()}if(i&2){let e=o.tuiLet,t=l(),n=Q(4);s("disabled",t.computedDisabled)("focusable",t.computedFocusable)("invalid",t.computedInvalid)("maskito",t.computedMask)("nativeId",t.nativeId)("pseudoFocus",t.pseudoFocus)("pseudoHover",t.pseudoHover)("readOnly",t.readOnly)("tuiTextfieldFiller",t.getComputedFiller(e||""))("tuiTextfieldIcon",t.calendarIcon&&n)("value",t.computedValue)}}function Lr(i,o){if(i&1){let e=P();d(0,"tui-svg",8),_("click",function(){c(e);let n=l(2);return p(n.onIconClick())}),m()}if(i&2){let e=o.polymorpheusOutlet,t=l(2);T("t-icon",!t.computedDisabled),s("src",e)}}function Nr(i,o){i&1&&x(0,"input",9)}function jr(i,o){if(i&1&&v(0,Lr,1,3,"tui-svg",6)(1,Nr,1,0,"input",7),i&2){let e=l();s("polymorpheusOutlet",e.calendarIcon)("polymorpheusOutletContext",fe(3,Rr,e.size)),u(),s("ngIf",e.nativePicker)}}function Br(i,o){if(i&1){let e=P();d(0,"div",12)(1,"button",13),_("click",function(){c(e);let n=l(2);return p(n.onDayClick(n.items[0].day))}),w(2),m()()}if(i&2){let e=l(2);u(2),q(" ",e.items[0]," ")}}function Wr(i,o){if(i&1){let e=P();d(0,"tui-calendar",10),_("dayClick",function(n){c(e);let r=l();return p(r.onDayClick(n))})("monthChange",function(n){c(e);let r=l();return p(r.onMonthChange(n))}),m(),v(1,Br,3,1,"div",11)}if(i&2){let e=l();s("disabledItemHandler",e.disabledItemHandler)("markerHandler",e.markerHandler)("max",e.computedMax)("min",e.computedMin)("month",e.computedActiveYearMonth)("value",e.value),u(),s("ngIf",e.items.length===1)}}var $r=(()=>{class i{constructor(e,t){this.host=e,this.dateFormat=t}get value(){return this.host.value.length===Lt?ae.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?ae.normalizeParse(e,"YMD").toString(this.dateFormat):"")}}return i.\u0275fac=function(e){return new(e||i)(g(Ji),g(Nt))},i.\u0275dir=me({type:i,selectors:[["input","tuiDate",""]],hostAttrs:["type","date"],hostVars:4,hostBindings:function(e,t){e&1&&_("change",function(r){return t.onChange(r.target.value)})("click.stop.silent",function(){return 0})("input.stop.silent",function(){return 0})("mousedown.stop.silent",function(){return 0}),e&2&&ot("tabIndex",-1)("value",t.value)("max",t.max)("min",t.min)}}),i})(),To=(()=>{class i extends Fe{constructor(e,t,n,r,a,f,h,C,O,N){super(e,t,C),this.isMobile=n,this.mobileCalendar=r,this.dateFormat=a,this.dateSeparator=f,this.dateTexts$=h,this.valueTransformer=C,this.options=O,this.textfieldSize=N,this.month=null,this.min=this.options.min,this.max=this.options.max,this.disabledItemHandler=X,this.markerHandler=Be,this.items=[],this.defaultActiveYearMonth=Z.currentLocal(),this.open=!1,this.filler$=this.dateTexts$.pipe(he(L=>$i(L[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,t;return(t=(e=this.textfield)===null||e===void 0?void 0:e.nativeFocusableElement)!==null&&t!==void 0?t: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&&!!this.mobileCalendar&&this.isMobile}get calendarIcon(){return this.options.icon}get computedValue(){let{value:e,nativeValue:t,activeItem:n}=this;return n?String(n):e?e.toString(this.dateFormat,this.dateSeparator):t}get computedActiveYearMonth(){return this.items[0]&&this.value&&this.value.daySame(this.items[0].day)?this.items[0].displayDay:this.month||this.value||Bi(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 computedMask(){return this.activeItem?wt:this.computeMaskOptions(this.dateFormat,this.dateSeparator,this.computedMin,this.computedMax)}get activeItem(){let{value:e}=this;return e&&this.items.find(t=>t.day.daySame(e))||null}onClick(){!this.isMobile&&this.interactive&&(this.open=!this.open)}getComputedFiller(e){return this.activeItem?"":e}onMobileClick(){this.onIconClick()}onIconClick(){this.isMobile&&this.interactive&&(this.open=!0)}onValueChange(e){this.control&&this.control.updateValueAndValidity({emitEvent:!1}),!e&&!this.mobileCalendar&&this.onOpenChange(!0),this.value=e.length!==Lt?null:ae.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,t){return Ve(e,t,(n,r)=>n.daySame(r))}computeMaskOptions(e,t,n,r){return Po({separator:t,mode:so[e],min:n.toLocalNativeDate(),max:r.toLocalNativeDate()})}}return i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(G),g(Ht),g(Ut,8),g(Nt),g(Wi),g(Tn),g($t,8),g(yn),g(un))},i.\u0275cmp=y({type:i,selectors:[["tui-input-date",3,"multiple",""]],viewQuery:function(e,t){if(e&1&&F(Ot,5),e&2){let n;z(n=V())&&(t.textfield=n.first)}},hostVars:1,hostBindings:function(e,t){e&1&&_("click",function(){return t.onClick()}),e&2&&k("data-size",t.size)},inputs:{min:"min",max:"max",disabledItemHandler:"disabledItemHandler",markerHandler:"markerHandler",items:"items",defaultActiveYearMonth:"defaultActiveYearMonth"},features:[R([Te(i),ye(i),Pn($t),{provide:Wt,useFactory:()=>_e(Ht)&&_e(Ut,zt.Optional)||_e(Wt,zt.SkipSelf)}]),Y],ngContentSelectors:Fr,decls:7,vars:7,consts:[["iconContent",""],["dropdown","polymorpheus"],[1,"t-hosted",3,"openChange","canOpen","content","open"],["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"],[3,"polymorpheus"],["automation-id","tui-input-date-range__textfield","tuiValueAccessor","",1,"t-textfield",3,"focusedChange","valueChange","disabled","focusable","invalid","maskito","nativeId","pseudoFocus","pseudoHover","readOnly","tuiTextfieldFiller","tuiTextfieldIcon","value"],["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,"click","src"],["tuiDate","",1,"t-native-input"],["automation-id","tui-input-date__calendar","tuiPreventDefault","mousedown",3,"dayClick","monthChange","disabledItemHandler","markerHandler","max","min","month","value"],["tuiPreventDefault","mousedown","class","t-button",4,"ngIf"],["tuiPreventDefault","mousedown",1,"t-button"],["tuiLink","","type","button",3,"click"]],template:function(e,t){if(e&1){let n=P();ee(Ar),d(0,"tui-hosted-dropdown",2),_("openChange",function(a){return c(n),p(t.onOpenChange(a))}),v(1,Hr,3,11,"tui-primitive-textfield",3),S(2,"async"),v(3,jr,2,5,"ng-template",null,0,K)(5,Wr,2,7,"ng-template",4,1,K),m()}if(e&2){let n=Q(6);s("canOpen",t.interactive&&!t.nativePicker)("content",n)("open",t.open&&t.interactive&&!t.nativePicker),u(),s("tuiLet",$(2,5,t.filler$)),u(4),s("polymorpheus",t.type)}},dependencies:[qe,Ot,de,xt,Ge,Ne,bn,wn,kn,an,sn,Me,Ye,U,$r,ki,Nn,ue],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}),tt([ut],i.prototype,"computeMaskOptions",null),i})(),yo=(()=>{class i extends Ui{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 i.\u0275fac=(()=>{let o;return function(t){return(o||(o=ii(i)))(t||i)}})(),i.\u0275dir=me({type:i,selectors:[["tui-input-date",3,"multiple",""]],features:[R([en(i)]),Y]}),i})(),Oo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,In,Pe,Ke,jn,kt,ce,Qe,yt,Mn,xn,je,Mt]]}),i})();var Ur=["input"];function Yr(i,o){if(i&1&&(j(0),w(1),B()),i&2){let e=o.polymorpheusOutlet;u(),q(" ",e," ")}}function Kr(i,o){if(i&1&&(d(0,"div",7),v(1,Yr,2,1,"ng-container",8),m()),i&2){let e=l();u(),s("polymorpheusOutlet",e.leftContent)}}function Gr(i,o){if(i&1&&x(0,"tui-loader",9),i&2){let e=l();s("inheritColor",!0)("size",e.loaderSize)}}function Qr(i,o){if(i&1){let e=P();d(0,"tui-svg",10),_("click",function(n){c(e);let r=l();return p(r.remove(n))})("mousedown.stop.prevent.silent",function(){return c(e),p(0)}),m()}if(i&2){let e=l();s("src",e.icons.close)}}function qr(i,o){if(i&1){let e=P();d(0,"input",11,0),_("blur",function(){c(e);let n=l();return p(n.onBlur())})("keydown",function(n){c(e);let r=l();return p(r.onKeyDown(n))})("ngModelChange",function(n){c(e);let r=l();return p(r.onInput(n))}),m()}if(i&2){let e=l();s("ngModel",e.editedText),k("maxLength",e.maxLength)}}var Xr={size:"m",status:"default",autoColor:!1},Zr=be(Xr);var wo=(()=>{class i{constructor(e,t,n,r){this.el=e,this.mode$=t,this.options=n,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 D,this.editing=!1,this.editedText=null}set input(e){e&&e.nativeElement.focus()}get backgroundColor(){return this.autoColor?ao(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 Ki(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 t=e.split(this.separator);if(t.length>1){this.save(String(t));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 i.\u0275fac=function(e){return new(e||i)(g(A),g(We),g(Zr),g(ft))},i.\u0275cmp=y({type:i,selectors:[["tui-tag"],["a","tuiTag",""],["button","tuiTag",""]],viewQuery:function(e,t){if(e&1&&F(Ur,5,A),e&2){let n;z(n=V())&&(t.input=n.first)}},hostVars:10,hostBindings:function(e,t){e&1&&_("$.data-mode.attr",function(){return t.mode$})("keydown.enter",function(r){return t.edit(r)})("keydown.delete",function(r){return t.remove(r)})("keydown.backspace",function(r){return t.remove(r)}),e&2&&(k("data-size",t.size)("data-status",t.status),T("_hoverable",t.hoverable)("_disabled",t.disabled)("_autocolor",t.autoColor)("_editing",t.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:[R([$e])],decls:6,vars:7,consts:[["input",""],[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,"click","mousedown.stop.prevent.silent","src"],["automation-id","tui-tag__edit","type","text",1,"t-edit",3,"blur","keydown","ngModelChange","ngModel"]],template:function(e,t){e&1&&(d(0,"div",1),_("dblclick",function(r){return t.edit(r)}),v(1,Kr,2,1,"div",2),x(2,"span",3),v(3,Gr,1,2,"tui-loader",4)(4,Qr,1,1,"tui-svg",5),m(),v(5,qr,2,2,"input",6)),e&2&&(ge("background-color",t.backgroundColor),u(),s("ngIf",t.leftContent),u(),s("textContent",t.displayText),u(),s("ngIf",t.showLoader),u(),s("ngIf",t.canRemove),u(),s("ngIf",t.editing))},dependencies:[pn,de,U,Me,ze,ve,re],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}@supports (-webkit-touch-callout: none){.t-edit[_ngcontent-%COMP%]:active{font-size:1rem}}[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}),i})(),xo=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I,Ce,ce,mn,Pe]]}),i})();var ea=["focusableElement"],ta=["tagsContainer"],ia=["cleaner"],na=["errorIcon"],oa=["tag"],ra=[[["tuiContent"]],[["select"]],"*"],aa=["tuiContent","select","*"],Xt=i=>({$implicit:i});function sa(i,o){i&1&&Vt(0)}function la(i,o){if(i&1&&x(0,"tui-svg",23),i&2){let e=o.polymorpheusOutlet;s("src",e)}}function ua(i,o){if(i&1&&(d(0,"div",21),v(1,la,1,1,"tui-svg",22),m()),i&2){let e=l();u(),s("polymorpheusOutlet",e.iconLeft)("polymorpheusOutletContext",fe(2,Xt,e.size))}}function da(i,o){if(i&1&&(d(0,"div",24),W(1,2),m()),i&2){let e=l();T("t-placeholder_raised",e.placeholderRaised)}}function ca(i,o){if(i&1){let e=P();d(0,"tui-tag",26,3),S(2,"async"),_("edited",function(n){let r=c(e).index,a=l(2);return p(a.onTagEdited(n,r))})("keydown.arrowLeft.prevent",function(){let n=c(e).index,r=l(2);return p(r.onTagKeyDownArrowLeft(n))})("keydown.arrowRight.prevent",function(){let n=c(e).index,r=l(2);return p(r.onTagKeyDownArrowRight(n))}),m()}if(i&2){let e=o.$implicit,t=l(2);s("autoColor",t.autoColor)("disabled",t.computedDisabled||t.disabledItemHandler(e))("editable",t.editable&&!t.readOnly)("hoverable",!t.readOnly)("leftContent",t.getLeftContent(e))("maxLength",t.maxLength)("removable",!t.readOnly&&t.removable)("separator",t.separator)("size",t.controller.size)("status",$(2,12,t.status$))("tuiFocusable",!1)("value",e.toString())}}function pa(i,o){if(i&1&&(j(0),v(1,ca,3,14,"tui-tag",25),B()),i&2){let e=l();u(),s("ngForOf",e.value)("ngForTrackBy",e.trackByFn)}}function ma(i,o){if(i&1&&x(0,"span",28),i&2){let e=o.$implicit,t=l(2);T("t-text_comma",t.computedFocused&&!t.inputHidden)("t-text_disabled",t.disabledItemHandler(e))("t-text_error",!t.tagValidator(e)),s("textContent",e)}}function ga(i,o){if(i&1&&v(0,ma,1,7,"span",27),i&2){let e=l();s("ngForOf",e.value)}}function ha(i,o){if(i&1){let e=P();d(0,"tui-svg",33,4),_("click.stop",function(){c(e);let n=l(3);return p(n.onCleanerClick())}),m()}if(i&2){let e=o.polymorpheusOutlet;s("src",e)}}function _a(i,o){if(i&1&&(j(0),v(1,ha,2,1,"tui-svg",32),B()),i&2){let e=l(2);u(),s("polymorpheusOutlet",e.iconCleaner)("polymorpheusOutletContext",fe(2,Xt,e.size))}}function fa(i,o){if(i&1&&x(0,"tui-tooltip",34),i&2){let e=l(2);s("content",e.hintOptions==null?null:e.hintOptions.content)("describeId",e.id)}}function va(i,o){if(i&1&&x(0,"tui-svg",23),i&2){let e=o.polymorpheusOutlet;s("src",e)}}function Ca(i,o){if(i&1&&(d(0,"div",35),v(1,va,1,1,"tui-svg",22),m()),i&2){let e=l(2);u(),s("polymorpheusOutlet",e.icon)("polymorpheusOutletContext",fe(2,Xt,e.size))}}function ba(i,o){if(i&1&&(d(0,"div",29),v(1,_a,2,4,"ng-container",5)(2,fa,1,2,"tui-tooltip",30)(3,Ca,2,4,"div",31),m()),i&2){let e=l();u(),s("ngIf",e.hasCleaner),u(),s("ngIf",e.showHint),u(),s("ngIf",e.icon)}}function Ma(i,o){if(i&1&&x(0,"tui-svg",36),i&2){let e=l();s("src",e.icons.error)}}var Pa={autoColor:!1,separator:",",tagStatus:"primary",uniqueTags:!0},Ta=be(Pa);var ya={s:1.25,m:1.5,l:2},Oa={s:1,m:1.25,l:1.25},wa=.125,ko=(()=>{class i extends zi{constructor(e,t,n,r,a,f,h,C,O){super(e,t),this.el=n,this.modeDirective=r,this.mode$=a,this.hintOptions=f,this.controller=h,this.options=C,this.icons=O,this.tags=hi,this.separator=this.options.separator,this.search="",this.editable=!0,this.tagValidator=Rt,this.expandable=!0,this.rows=1/0,this.inputHidden=!1,this.uniqueTags=this.options.uniqueTags,this.autoColor=this.options.autoColor,this.maxLength=null,this.placeholder="",this.removable=!0,this.disabledItemHandler=X,this.searchChange=new D,this.status$=this.mode$.pipe(he(()=>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 at(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:t}=this.controller;return e==="s"||t}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){yi(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 t;let n=Pi(e);!this.focusableElement||n===this.focusableElement.nativeElement||!Mi(e.target)||!((t=this.cleanerSvg)===null||t===void 0)&&t.nativeElement.contains(e.target)||this.tagsContainer&&n!==this.tagsContainer.nativeElement&&this.tagsContainer.nativeElement.contains(n)||(e.preventDefault(),this.focusInput(),this.scrollTo())}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(!1):this.onScrollKeyDown(e,1)}onTagEdited(e,t){this.focusInput(e===""),this.value=this.filterValue(this.value.map((n,r)=>r!==t?n:e.split(this.separator).map(a=>a.trim()).filter(Boolean)).reduce((n,r)=>n.concat(r),[]))}handleOption(e){this.focusInput(),this.updateSearch(""),this.value=this.filterValue(this.value.concat(e)),this.open=!1,this.scrollTo()}onInput(e){let t=e.split(this.separator),r=t.map(a=>this.clippedValue(a.trim())).filter((a,f,{length:h})=>a.length>0&&f!==h-1).filter(a=>!this.disabledItemHandler(a));t.length>1?(this.updateSearch(this.clippedValue(t[t.length-1].trim())),this.value=this.filterValue([...this.value,...r])):this.updateSearch(this.clippedValue(e)),this.open=this.hasNativeValue}onPaste(e){let t=Ti(e);this.onInput(t||"")}onDrop({dataTransfer:e}){e&&this.onInput(e.getData("text")||"")}setDisabledState(){super.setDisabledState(),this.open=!1}trackByFn(e,t){return t.toString()}scrollTo(e){var t;e===void 0&&(e=(t=this.scrollBar)===null||t===void 0?void 0:t.nativeElement.scrollWidth),it(0).pipe(we(this.destroy$)).subscribe(()=>{this.scrollBar&&(this.scrollBar.nativeElement.scrollLeft=e||0)})}filterValue(e){let t=new Set;return e.reverse().filter(n=>!this.uniqueTags||n&&!t.has(n)&&t.add(n)).reverse()}onScrollKeyDown(e,t){let n=this.tags.find((r,a)=>a===e+t);!n||!this.scrollBar||(n.nativeElement.focus(),t*this.scrollBar.nativeElement.clientWidth-t*n.nativeElement.offsetLeft-n.nativeElement.clientWidth<0&&(this.scrollBar.nativeElement.scrollLeft+=t*n.nativeElement.clientWidth))}updateSearch(e){this.focusableElement&&(this.focusableElement.nativeElement.value=e),this.search=e,this.searchChange.emit(e)}addTag(){var e,t;let n=(t=(e=this.search)===null||e===void 0?void 0:e.trim())!==null&&t!==void 0?t:"";!n||this.disabledItemHandler(n)||(this.updateSearch(""),this.value=this.filterValue(this.value.concat(n)))}deleteLastEnabledItem(){for(let e=this.value.length-1;e>=0;e--)if(!this.disabledItemHandler(this.value[e])){this.value=bi(this.value,e);break}}focusInput(e=!0){var t;(t=this.nativeFocusableElement)===null||t===void 0||t.focus({preventScroll:e})}clippedValue(e){return e.slice(0,this.maxLength||e.length)}get lineHeight(){return this.labelOutside?ya[this.controller.size]+2*wa:Oa[this.controller.size]}}return i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(G),g(A),g(tn,8),g(We),g(bt,8),g(dn),g(Ta),g(ft))},i.\u0275cmp=y({type:i,selectors:[["tui-input-tag"]],contentQueries:function(e,t,n){if(e&1&&At(n,_n,5,ai),e&2){let r;z(r=V())&&(t.datalist=r.first)}},viewQuery:function(e,t){if(e&1&&(F(qe,5),F(ea,5),F(ta,5),F(ia,5,A),F(Ue,5,A),F(na,5),F(oa,5,A)),e&2){let n;z(n=V())&&(t.hostedDropdown=n.first),z(n=V())&&(t.focusableElement=n.first),z(n=V())&&(t.tagsContainer=n.first),z(n=V())&&(t.cleanerSvg=n.first),z(n=V())&&(t.scrollBar=n.first),z(n=V())&&(t.errorIconTemplate=n.first),z(n=V())&&(t.tags=n)}},hostVars:7,hostBindings:function(e,t){e&1&&_("focusin.capture.silent",function(){return t.onFocusInOut()})("focusout.capture.silent",function(){return t.onFocusInOut()}),e&2&&(k("data-size",t.size),T("_expandable",t.expandable)("_label-outside",t.labelOutside)("_icon-left",t.iconLeft))},inputs:{separator:"separator",search:"search",editable:"editable",tagValidator:"tagValidator",expandable:"expandable",rows:"rows",inputHidden:"inputHidden",uniqueTags:"uniqueTags",autoColor:"autoColor",maxLength:"maxLength",placeholder:"placeholder",removable:"removable",disabledItemHandler:"disabledItemHandler",pseudoFocusedSetter:[0,"pseudoFocused","pseudoFocusedSetter"]},outputs:{searchChange:"searchChange"},features:[R([Te(i),ye(i),Gi(i),cn,$e],[On]),Y],ngContentSelectors:aa,decls:25,vars:34,consts:[["text",""],["focusableElement",""],["errorIcon",""],["tag",""],["cleaner",""],[4,"ngIf"],[1,"t-hosted",3,"openChange","tuiActiveZoneChange","canOpen","content","open"],["tuiWrapper","",3,"click.prevent.silent","mousedown","appearance","disabled","focus","hover","invalid","readOnly"],[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"],[1,"t-input-wrapper"],[1,"t-ghost"],["automation-id","tui-input-tag__native","type","text",1,"t-native",3,"drop.prevent","keydown.arrowLeft","keydown.backspace","keydown.enter.prevent","ngModelChange","paste.prevent","disabled","id","ngModel","placeholder","readOnly","tuiFocusable"],[1,"t-value-content"],["class","t-icons t-icon-wrapper",4,"ngIf"],[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,"autoColor","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,"edited","keydown.arrowLeft.prevent","keydown.arrowRight.prevent","autoColor","disabled","editable","hoverable","leftContent","maxLength","removable","separator","size","status","tuiFocusable","value"],["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,"click.stop","src"],["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,t){if(e&1){let n=P();ee(ra),v(0,sa,1,0,"ng-container",5),S(1,"async"),d(2,"tui-hosted-dropdown",6),ne("openChange",function(a){return c(n),ie(t.open,a)||(t.open=a),p(a)}),_("tuiActiveZoneChange",function(a){return c(n),p(t.onActiveZone(a))}),d(3,"div",7),_("click.prevent.silent",function(a){return c(n),p(t.detectRetargetFromLabel(a))})("mousedown",function(a){return c(n),p(t.onMouseDown(a))}),d(4,"div",8),v(5,ua,2,4,"div",9),d(6,"div",10)(7,"div",11),v(8,da,2,2,"div",12),m(),d(9,"tui-scrollbar",13)(10,"div",14),v(11,pa,2,2,"ng-container",15)(12,ga,1,1,"ng-template",null,0,K),d(14,"div",16)(15,"div",17),w(16),m(),d(17,"input",18,1),_("drop.prevent",function(a){return c(n),p(t.onDrop(a))})("keydown.arrowLeft",function(a){return c(n),p(t.onFieldKeyDownArrowLeft(a))})("keydown.backspace",function(a){return c(n),p(t.onFieldKeyDownBackspace(a))})("keydown.enter.prevent",function(){return c(n),p(t.onFieldKeyDownEnter())})("ngModelChange",function(a){return c(n),p(t.onInput(a))})("paste.prevent",function(a){return c(n),p(t.onPaste(a))}),m()()(),d(19,"div",19),W(20),m()()(),W(21,1),v(22,ba,4,3,"div",20),m(),v(23,Ma,1,1,"ng-template",null,2,K),m()()}if(e&2){let n,r=Q(13);s("ngIf",$(1,32,t.hintOptions==null?null:t.hintOptions.change$)),u(2),s("canOpen",t.canOpen)("content",t.datalist||""),te("open",t.open),u(),s("appearance",t.appearance)("disabled",t.computedDisabled)("focus",t.computedFocused)("hover",t.pseudoHover)("invalid",t.computedInvalid)("readOnly",t.readOnly),u(2),s("ngIf",t.iconLeft),u(3),s("ngIf",t.hasPlaceholder),u(),ge("max-height",t.computeMaxHeight,"rem"),s("hidden",!t.expandable),u(),T("t-tags_empty",(!t.focused||t.inputHidden)&&!(t.value!=null&&t.value.length)&&!(!(t.search==null||(n=t.search.trim())==null)&&n.length)),u(),s("ngIf",t.labelOutside)("ngIfElse",r),u(3),T("t-input-wrapper_collapsed",t.computedDisabled||t.readOnly||t.inputHidden),u(2),rt(t.search),u(),T("t-native_hidden",t.inputHidden),s("disabled",t.computedDisabled)("id",t.id)("ngModel",t.search)("placeholder",t.placeholder)("readOnly",t.readOnly||t.inputHidden)("tuiFocusable",t.computedFocusable),k("maxLength",t.maxLength),u(5),s("ngIf",t.hasRightIcons)}},dependencies:[qe,de,Ue,wo,vn,U,Vi,Ye,Me,Ee,Re,ze,ve,re,ue],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}@supports (-webkit-touch-callout: none){.t-input[_ngcontent-%COMP%]:active{font-size:1rem}}.t-input[inputMode=none][_ngcontent-%COMP%]{caret-color:transparent}.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=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=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]{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%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-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}@supports (-webkit-touch-callout: none){.t-native[_ngcontent-%COMP%]:active{font-size:1rem}}.t-native[inputMode=none][_ngcontent-%COMP%]{caret-color:transparent}.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}),i})(),Io=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({providers:[Di],imports:[[I,Ce,Pe,He,Le,Ai,ce,Ct,Cn,yt,xo,Ke]]}),i})();var xa=["type","range","tuiSlider",""];var ka={size:"m",trackColor:"var(--tui-base-03)"},Ia=be(ka);var Zt=(()=>{class i{constructor(e,t,n,r,a,f){var h;this.control=e,this.options=n,this.el=r,this.userAgent=a,this.injector=f,this.size=this.options.size,this.segments=1,e instanceof re&&((h=e.valueChanges)===null||h===void 0||h.pipe(wi(t),ei(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:t,hasKeySteps:n}=this;return!n&&t instanceof re?t.viewModel:Number(e.nativeElement.value)||0}set value(e){this.el.nativeElement.value=`${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 _i(gi,this.userAgent)}get hasKeySteps(){return!!this.injector.get(Da,null)}}return i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(G),g(Ia),g(A),g(Ii),g(ni))},i.\u0275cmp=y({type:i,selectors:[["input","type","range","tuiSlider",""]],hostVars:11,hostBindings:function(e,t){e&1&&_("input",function(){return 0}),e&2&&(k("data-size",t.size),ge("--tui-slider-track-color",t.options.trackColor)("--tui-slider-fill-ratio",t.valueRatio)("--tui-slider-fill-percentage",t.valuePercentage,"%")("--tui-slider-segment-width",t.segmentWidth,"%"),T("_old-edge",t.isOldEdge))},inputs:{size:"size",segments:"segments"},attrs:xa,decls:0,vars:0,template:function(e,t){},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}),tt([ut],i.prototype,"hasKeySteps",null),i})(),Da=(()=>{class i extends Ei{constructor(e,t,n,r){super(e,t),this.el=n,this.slider=r}get nativeFocusableElement(){return this.computedDisabled?null:this.el.nativeElement}get focused(){return Ae(this.nativeFocusableElement)}get min(){return this.keySteps[0][1]}get max(){return this.keySteps[this.keySteps.length-1][1]}updateControlValue(){this.value=co(this.slider.valuePercentage,this.keySteps)}writeValue(e){if(e===null)return;let t=fi(e,this.min,this.max);this.slider.value=this.transformToNativeValue(t)}getFallbackValue(){return 0}transformToNativeValue(e){let{min:t,max:n}=this.slider;return po(e,this.keySteps)*(n-t)/100+t}}return i.\u0275fac=function(e){return new(e||i)(g(oe,10),g(G),g(A),g(ti(()=>Zt)))},i.\u0275dir=me({type:i,selectors:[["input","tuiSlider","","keySteps",""]],hostVars:4,hostBindings:function(e,t){e&1&&_("input",function(){return t.updateControlValue()})("change",function(){return t.updateControlValue()}),e&2&&(ot("disabled",t.computedDisabled),k("aria-valuenow",t.safeCurrentValue)("aria-valuemin",t.min)("aria-valuemax",t.max))},inputs:{keySteps:"keySteps"},features:[Y]}),i})();var Do=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=M({type:i}),i.\u0275inj=b({imports:[[I]]}),i})();function Sa(i,o){if(i&1&&x(0,"span",18),i&2){let e=l();s("innerHtml",e.purify("Customizable for any use case"),ri)}}function Ea(i,o){if(i&1&&(d(0,"tui-checkbox-labeled",19),w(1),m()),i&2){let e=o.$implicit,t=l();s("ngModel",e===t.labels[1]),u(),q(" ",e," ")}}function za(i,o){if(i&1){let e=P();d(0,"div",20)(1,"div",21),x(2,"img",22),d(3,"h3"),w(4,"Aleksandr Inkin"),m()(),d(5,"div",23)(6,"button",24),_("click",function(){let n=c(e).$implicit;return p(n.complete())}),m(),d(7,"button",25),_("click",function(){let n=c(e).$implicit;return p(n.complete())}),m()()()}}function Va(i,o){if(i&1){let e=P();d(0,"tui-push",26),_("close",function(){c(e);let n=l();return p(n.toggle(!1))}),x(1,"tui-svg",27),w(2," I have a bad feeling about this... "),d(3,"button",28),_("click",function(){c(e);let n=l();return p(n.toggle(!1))}),w(4," Fortune "),m(),d(5,"button",29),_("click",function(){c(e);let n=l();return p(n.toggle(!1))}),w(6," Glory "),m()()}}var cc=(()=>{let o=class o{constructor(){this.dompurifySanitizer=_e(Hn),this.dialogs=_e(fn),this.cd=_e(G),this.builtInTools=[Yt.Undo,Yt.Img],this.labels=["New","Read","Archived","Junk"],this.tags=["Angular","Open source"],this.date=null,this.notification=!1,this.slider=80}onDay(t){this.date=t}call(t){this.dialogs.open(t,{appearance:"call",closeable:!1,dismissible:!1}).subscribe()}toggle(t){this.notification=t,this.cd.detectChanges()}purify(t){return this.dompurifySanitizer.sanitize(oi.HTML,t)}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=y({type:o,selectors:[["home"]],standalone:!0,features:[li],decls:28,vars:13,consts:[["hint",""],["callTemplate",""],[1,"title"],[1,"tui-space_vertical-10",3,"ngModelChange","tuiHintContent","tuiTextfieldLabelOutside","ngModel"],[1,"flex"],[1,"date"],["required","",3,"ngModelChange","click.capture.stop","keydown.capture.stop","mousedown.capture.stop","ngModel"],[1,"calendar",3,"dayClick","event.prevent.silent","tuiDropdownOpen","value"],["size","l","class","tui-space_bottom-4",3,"ngModel",4,"ngFor","ngForOf"],[1,"controls"],["size","l",1,"tui-space_right-3",3,"ngModelChange","showIcons","ngModel"],["size","m","step","any","tuiSlider","","type","range",1,"tui-space_vertical-6",3,"ngModelChange","max","ngModel"],[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"],[3,"tools"],["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(n,r){if(n&1){let a=P();d(0,"h2",2),w(1," Dozens of "),x(2,"br"),w(3,` components `),m(),d(4,"tui-input-tag",3),ne("ngModelChange",function(h){return c(a),ie(r.tags,h)||(r.tags=h),p(h)}),m(),v(5,Sa,1,1,"ng-template",null,0,K),d(7,"div",4)(8,"div",5)(9,"tui-input-date",6),ne("ngModelChange",function(h){return c(a),ie(r.date,h)||(r.date=h),p(h)}),_("click.capture.stop",function(){return c(a),p(0)})("keydown.capture.stop",function(){return c(a),p(0)})("mousedown.capture.stop",function(){return c(a),p(0)}),w(10," Choose date "),m(),d(11,"tui-calendar",7),_("dayClick",function(h){return c(a),p(r.onDay(h))})("event.prevent.silent",function(){return c(a),p(0)}),m()(),d(12,"div"),v(13,Ea,2,2,"tui-checkbox-labeled",8),m(),d(14,"div",9)(15,"label")(16,"tui-toggle",10),ne("ngModelChange",function(h){return c(a),ie(r.notification,h)||(r.notification=h),p(h)}),m(),w(17," Push notification "),m(),d(18,"input",11),ne("ngModelChange",function(h){return c(a),ie(r.slider,h)||(r.slider=h),p(h)}),m(),d(19,"div",12)(20,"button",13),_("click",function(){return c(a),p(r.slider=0)}),m(),x(21,"button",14),d(22,"button",15),_("click",function(){c(a);let h=Q(26);return p(r.call(h))}),m()()()(),d(23,"tui-editor",16),w(24,"Typing..."),m(),v(25,za,8,0,"ng-template",null,1,K)(27,Va,7,0,"tui-push",17)}if(n&2){let a=Q(6);u(4),s("tuiHintContent",a)("tuiTextfieldLabelOutside",!0),te("ngModel",r.tags),u(5),te("ngModel",r.date),u(2),s("tuiDropdownOpen",!1)("value",r.date),u(2),s("ngForOf",r.labels),u(3),s("showIcons",!0),te("ngModel",r.notification),u(2),s("max",140),te("ngModel",r.slider),u(5),s("tools",r.builtInTools),u(4),s("tuiPush",r.notification)}},dependencies:[I,Ee,Ce,ze,pi,ve,mi,re,Io,ko,An,Vn,kt,xt,Mt,ln,Oo,To,yo,ho,go,Tt,Pt,rn,bt,Do,Zt,ce,de,zn,Dn,Sn,En,Qe,Ge,on,nn,Ln,Rn,Fn],styles:[`.title{font-size:3.5rem;line-height:4.0625rem;margin:0}.t-overlay{display:none!important}.flex{display:flex;margin-bottom:1.5625rem}.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,#5f86f2,#a65ff2,#f25fd0,#f25f61,#f2cb5f,#abf25f,#5ff281,#5ff2f0);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%}} /*# sourceMappingURL=home.component-2GBCGOA3.css.map */ `],encapsulation:2,changeDetection:0});let i=o;return i})();export{cc as default}; -//# sourceMappingURL=chunk-FEQBHM2J.js.map +//# sourceMappingURL=chunk-3GE2UJOD.js.map diff --git a/chunk-FEQBHM2J.js.map b/chunk-3GE2UJOD.js.map similarity index 100% rename from chunk-FEQBHM2J.js.map rename to chunk-3GE2UJOD.js.map diff --git a/chunk-7Z3ZNFQW.js b/chunk-DFAUMSGH.js similarity index 85% rename from chunk-7Z3ZNFQW.js rename to chunk-DFAUMSGH.js index 9712eff5..dbb601d9 100644 --- a/chunk-7Z3ZNFQW.js +++ b/chunk-DFAUMSGH.js @@ -1,11 +1,11 @@ -import{$a as Gd,A as Yu,Aa as q,B as rr,Ba as Sd,C as Zu,Ca as mo,D as nd,Da as qa,E as od,Ea as Pd,F as rd,Fa as Ka,G as ls,H as Pi,Ha as Ed,I as Qt,Ia as f,J as li,Ja as ze,K as Za,Ka as It,L as sd,La as us,M as Qe,Ma as go,N as dd,Na as Hd,O as pe,Oa as ti,P as po,Pa as Nd,Q as pd,Qa as jd,R as hd,Ra as cr,S as fd,Sa as Ud,Ta as Qa,U as md,Ua as Ee,V as gd,Va as zd,W as $i,Wa as Bd,X as Jt,Xa as Vd,Y as zt,Ya as $d,Z as Cn,Za as Be,_ as vd,_a as Wd,a as $a,aa as _d,ab as Yd,ba as Td,bb as Zd,cb as Xd,d as Bu,db as vo,e as ts,eb as qd,fb as lr,g as ct,h as ie,i as P,j as ge,ja as Cd,ka as yd,l as Et,m as At,ma as bd,n as cn,o as Bi,oa as Md,pa as ho,q as ns,qa as ei,r as Vu,ra as Dd,s as Wa,sa as ln,t as ai,ta as fo,u as $u,v as Wu,va as wd,wa as Id,x as os,xa as Fn,y as Gu,ya as xd,z as Vi,za as Od}from"./chunk-HJXCO6QW.js";import{b as kd,d as Rd,f as Fd,g as Ld}from"./chunk-J5MQQQCD.js";import{$ as Fe,$b as Ba,$c as Xu,A as He,Aa as Xr,Ab as g,Ad as id,B as pu,Ba as sn,Bb as v,Bc as Hu,Bd as ad,C as et,Ca as qt,Cb as S,Cd as cd,D as hu,Da as I,Db as Ie,Dc as Ui,Dd as ld,E as dn,Ea as x,Eb as xe,Ec as ee,Ed as ud,F as tr,Fa as qr,Fb as Ut,Fc as Nu,G as fu,Ga as ae,Gb as F,Gc as ju,Gd as Xa,Ha as mn,Hb as kn,Hc as K,I as Ha,Ib as vn,Ic as Uu,J as Wt,Ja as N,Jb as C,Jc as zu,Ka as bu,Kb as u,Kc as z,L as mu,La as Pe,Lb as Ve,M as ri,Mb as me,N as oe,Nb as Rn,Ob as at,P as ro,Pb as $e,Pc as is,Q as pn,Qb as We,Qc as ao,R as Na,Rb as j,Rc as zi,S as gu,Sb as Te,Sc as co,T as ja,Tb as Iu,Tc as an,Ub as Ne,V as vu,Vb as xu,W as on,Wb as ir,Wc as lo,X as Zr,Xb as nr,Xc as _n,Y as hn,Yb as or,Yc as sr,Z as _u,Zb as A,Zc as rs,_ as it,_b as Ou,a as lu,aa as re,ac as Oi,ad as ci,b as io,ba as Tu,bb as xi,bc as Jr,bd as ce,c as uu,ca as st,cb as gn,cd as X,d as _i,da as rn,db as Kr,dc as R,ec as H,f as Fa,fa as Gt,fb as Ni,fc as Su,g as La,ga as mt,gc as Pu,h as Ze,ha as Q,hb as h,i as Ke,ia as M,ib as a,id as Tn,j as no,ja as Cu,jb as za,jc as de,jd as qu,k as Dt,ka as se,kb as Kt,kc as Eu,la as Ua,lb as Qr,lc as Au,ld as Si,m as jt,ma as ye,mc as ku,md as ar,na as V,nb as ji,nc as Ru,nd as Ku,o as wi,oa as tt,ob as Mu,od as Qu,p as B,pa as fn,pc as Va,pd as pt,q as Qo,qa as si,qb as Xe,qc as Fu,qd as ss,r as Gr,ra as so,rb as Ci,rc as Lu,rd as as,s as du,sb as W,sc as ft,sd as uo,t as b,ta as k,tb as Du,u as wt,ua as D,ub as wu,ud as Ju,v as Ti,va as w,vb as T,vd as ed,w as Yr,wa as Ii,wb as fe,wd as td,x as Jo,xa as yu,xb as l,xd as Ga,y as er,yb as nt,yc as qe,yd as cs,z as oo,zb as J,zc as es,zd as Ya}from"./chunk-5EVGTXYE.js";import{a as te,b as oi,d as cg,e as lg,p as Ad}from"./chunk-GOOAHOWT.js";var Mm=cg((Dl,wl)=>{"use strict";(function(e,n){typeof Dl=="object"&&typeof wl<"u"?wl.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.DOMPurify=n())})(Dl,function(){"use strict";let{entries:e,setPrototypeOf:n,isFrozen:t,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object,{freeze:r,seal:s,create:c}=Object,{apply:d,construct:p}=typeof Reflect<"u"&&Reflect;r||(r=function(G){return G}),s||(s=function(G){return G}),d||(d=function(G,Re,Ce){return G.apply(Re,Ce)}),p||(p=function(G,Re){return new G(...Re)});let _=ni(Array.prototype.forEach),y=ni(Array.prototype.pop),O=ni(Array.prototype.push),L=ni(String.prototype.toLowerCase),Z=ni(String.prototype.toString),ue=ni(String.prototype.match),Ge=ni(String.prototype.replace),Tt=ni(String.prototype.indexOf),Ji=ni(String.prototype.trim),ut=ni(Object.prototype.hasOwnProperty),Ct=ni(RegExp.prototype.test),$o=wm(TypeError);function ni(we){return function(G){for(var Re=arguments.length,Ce=new Array(Re>1?Re-1:0),Ht=1;Ht2&&arguments[2]!==void 0?arguments[2]:L;n&&n(we,null);let Ce=G.length;for(;Ce--;){let Ht=G[Ce];if(typeof Ht=="string"){let en=Re(Ht);en!==Ht&&(t(G)||(G[Ce]=en),Ht=en)}we[Ht]=!0}return we}function Im(we){for(let G=0;G/gm),Em=s(/\${[\w\W]*}/gm),Am=s(/^data-[\-\w.\u00B7-\uFFFF]/),km=s(/^aria-[\-\w]+$/),Pl=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rm=s(/^(?:\w+script|data):/i),Fm=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),El=s(/^html$/i),Lm=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var Al=Object.freeze({__proto__:null,MUSTACHE_EXPR:Sm,ERB_EXPR:Pm,TMPLIT_EXPR:Em,DATA_ATTR:Am,ARIA_ATTR:km,IS_ALLOWED_URI:Pl,IS_SCRIPT_OR_DATA:Rm,ATTR_WHITESPACE:Fm,DOCTYPE_NAME:El,CUSTOM_ELEMENT:Lm});let Wo={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Hm=function(){return typeof window>"u"?null:window},Nm=function(G,Re){if(typeof G!="object"||typeof G.createPolicy!="function")return null;let Ce=null,Ht="data-tt-policy-suffix";Re&&Re.hasAttribute(Ht)&&(Ce=Re.getAttribute(Ht));let en="dompurify"+(Ce?"#"+Ce:"");try{return G.createPolicy(en,{createHTML(Xn){return Xn},createScriptURL(Xn){return Xn}})}catch{return console.warn("TrustedTypes policy "+en+" could not be created."),null}};function kl(){let we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hm(),G=Y=>kl(Y);if(G.version="3.1.5",G.removed=[],!we||!we.document||we.document.nodeType!==Wo.document)return G.isSupported=!1,G;let{document:Re}=we,Ce=Re,Ht=Ce.currentScript,{DocumentFragment:en,HTMLTemplateElement:Xn,Node:Ta,Element:Rl,NodeFilter:Go,NamedNodeMap:Um=we.NamedNodeMap||we.MozNamedAttrMap,HTMLFormElement:zm,DOMParser:Bm,trustedTypes:jr}=we,Ur=Rl.prototype,Vm=Hr(Ur,"cloneNode"),$m=Hr(Ur,"nextSibling"),Wm=Hr(Ur,"childNodes"),Ca=Hr(Ur,"parentNode");if(typeof Xn=="function"){let Y=Re.createElement("template");Y.content&&Y.content.ownerDocument&&(Re=Y.content.ownerDocument)}let Vt,Yo="",{implementation:ya,createNodeIterator:Gm,createDocumentFragment:Ym,getElementsByTagName:Zm}=Re,{importNode:Xm}=Ce,Fi={};G.isSupported=typeof e=="function"&&typeof Ca=="function"&&ya&&ya.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ba,ERB_EXPR:Ma,TMPLIT_EXPR:Da,DATA_ATTR:qm,ARIA_ATTR:Km,IS_SCRIPT_OR_DATA:Qm,ATTR_WHITESPACE:Fl,CUSTOM_ELEMENT:Jm}=Al,{IS_ALLOWED_URI:Ll}=Al,yt=null,Hl=he({},[...Il,...ma,...ga,...va,...xl]),bt=null,Nl=he({},[...Ol,..._a,...Sl,...Nr]),dt=Object.seal(c(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,wa=null,jl=!0,Ia=!0,Ul=!1,zl=!0,qn=!1,xa=!0,An=!1,Oa=!1,Sa=!1,Kn=!1,zr=!1,Br=!1,Bl=!0,Vl=!1,eg="user-content-",Pa=!0,Xo=!1,Qn={},Jn=null,$l=he({},["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"]),Wl=null,Gl=he({},["audio","video","img","source","image","track"]),Ea=null,Yl=he({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vr="http://www.w3.org/1998/Math/MathML",$r="http://www.w3.org/2000/svg",tn="http://www.w3.org/1999/xhtml",eo=tn,Aa=!1,ka=null,tg=he({},[Vr,$r,tn],Z),qo=null,ig=["application/xhtml+xml","text/html"],ng="text/html",Mt=null,to=null,og=Re.createElement("form"),Zl=function(m){return m instanceof RegExp||m instanceof Function},Ra=function(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(to&&to===m)){if((!m||typeof m!="object")&&(m={}),m=En(m),qo=ig.indexOf(m.PARSER_MEDIA_TYPE)===-1?ng:m.PARSER_MEDIA_TYPE,Mt=qo==="application/xhtml+xml"?Z:L,yt=ut(m,"ALLOWED_TAGS")?he({},m.ALLOWED_TAGS,Mt):Hl,bt=ut(m,"ALLOWED_ATTR")?he({},m.ALLOWED_ATTR,Mt):Nl,ka=ut(m,"ALLOWED_NAMESPACES")?he({},m.ALLOWED_NAMESPACES,Z):tg,Ea=ut(m,"ADD_URI_SAFE_ATTR")?he(En(Yl),m.ADD_URI_SAFE_ATTR,Mt):Yl,Wl=ut(m,"ADD_DATA_URI_TAGS")?he(En(Gl),m.ADD_DATA_URI_TAGS,Mt):Gl,Jn=ut(m,"FORBID_CONTENTS")?he({},m.FORBID_CONTENTS,Mt):$l,Zo=ut(m,"FORBID_TAGS")?he({},m.FORBID_TAGS,Mt):{},wa=ut(m,"FORBID_ATTR")?he({},m.FORBID_ATTR,Mt):{},Qn=ut(m,"USE_PROFILES")?m.USE_PROFILES:!1,jl=m.ALLOW_ARIA_ATTR!==!1,Ia=m.ALLOW_DATA_ATTR!==!1,Ul=m.ALLOW_UNKNOWN_PROTOCOLS||!1,zl=m.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qn=m.SAFE_FOR_TEMPLATES||!1,xa=m.SAFE_FOR_XML!==!1,An=m.WHOLE_DOCUMENT||!1,Kn=m.RETURN_DOM||!1,zr=m.RETURN_DOM_FRAGMENT||!1,Br=m.RETURN_TRUSTED_TYPE||!1,Sa=m.FORCE_BODY||!1,Bl=m.SANITIZE_DOM!==!1,Vl=m.SANITIZE_NAMED_PROPS||!1,Pa=m.KEEP_CONTENT!==!1,Xo=m.IN_PLACE||!1,Ll=m.ALLOWED_URI_REGEXP||Pl,eo=m.NAMESPACE||tn,dt=m.CUSTOM_ELEMENT_HANDLING||{},m.CUSTOM_ELEMENT_HANDLING&&Zl(m.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(dt.tagNameCheck=m.CUSTOM_ELEMENT_HANDLING.tagNameCheck),m.CUSTOM_ELEMENT_HANDLING&&Zl(m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(dt.attributeNameCheck=m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),m.CUSTOM_ELEMENT_HANDLING&&typeof m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(dt.allowCustomizedBuiltInElements=m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qn&&(Ia=!1),zr&&(Kn=!0),Qn&&(yt=he({},xl),bt=[],Qn.html===!0&&(he(yt,Il),he(bt,Ol)),Qn.svg===!0&&(he(yt,ma),he(bt,_a),he(bt,Nr)),Qn.svgFilters===!0&&(he(yt,ga),he(bt,_a),he(bt,Nr)),Qn.mathMl===!0&&(he(yt,va),he(bt,Sl),he(bt,Nr))),m.ADD_TAGS&&(yt===Hl&&(yt=En(yt)),he(yt,m.ADD_TAGS,Mt)),m.ADD_ATTR&&(bt===Nl&&(bt=En(bt)),he(bt,m.ADD_ATTR,Mt)),m.ADD_URI_SAFE_ATTR&&he(Ea,m.ADD_URI_SAFE_ATTR,Mt),m.FORBID_CONTENTS&&(Jn===$l&&(Jn=En(Jn)),he(Jn,m.FORBID_CONTENTS,Mt)),Pa&&(yt["#text"]=!0),An&&he(yt,["html","head","body"]),yt.table&&(he(yt,["tbody"]),delete Zo.tbody),m.TRUSTED_TYPES_POLICY){if(typeof m.TRUSTED_TYPES_POLICY.createHTML!="function")throw $o('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof m.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $o('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Vt=m.TRUSTED_TYPES_POLICY,Yo=Vt.createHTML("")}else Vt===void 0&&(Vt=Nm(jr,Ht)),Vt!==null&&typeof Yo=="string"&&(Yo=Vt.createHTML(""));r&&r(m),to=m}},Xl=he({},["mi","mo","mn","ms","mtext"]),ql=he({},["foreignobject","annotation-xml"]),rg=he({},["title","style","font","a","script"]),Kl=he({},[...ma,...ga,...xm]),Ql=he({},[...va,...Om]),sg=function(m){let E=Ca(m);(!E||!E.tagName)&&(E={namespaceURI:eo,tagName:"template"});let $=L(m.tagName),Ye=L(E.tagName);return ka[m.namespaceURI]?m.namespaceURI===$r?E.namespaceURI===tn?$==="svg":E.namespaceURI===Vr?$==="svg"&&(Ye==="annotation-xml"||Xl[Ye]):!!Kl[$]:m.namespaceURI===Vr?E.namespaceURI===tn?$==="math":E.namespaceURI===$r?$==="math"&&ql[Ye]:!!Ql[$]:m.namespaceURI===tn?E.namespaceURI===$r&&!ql[Ye]||E.namespaceURI===Vr&&!Xl[Ye]?!1:!Ql[$]&&(rg[$]||!Kl[$]):!!(qo==="application/xhtml+xml"&&ka[m.namespaceURI]):!1},Li=function(m){O(G.removed,{element:m});try{m.parentNode.removeChild(m)}catch{m.remove()}},Wr=function(m,E){try{O(G.removed,{attribute:E.getAttributeNode(m),from:E})}catch{O(G.removed,{attribute:null,from:E})}if(E.removeAttribute(m),m==="is"&&!bt[m])if(Kn||zr)try{Li(E)}catch{}else try{E.setAttribute(m,"")}catch{}},Jl=function(m){let E=null,$=null;if(Sa)m=""+m;else{let Pt=ue(m,/^[\r\n\t ]+/);$=Pt&&Pt[0]}qo==="application/xhtml+xml"&&eo===tn&&(m=''+m+"");let Ye=Vt?Vt.createHTML(m):m;if(eo===tn)try{E=new Bm().parseFromString(Ye,qo)}catch{}if(!E||!E.documentElement){E=ya.createDocument(eo,"template",null);try{E.documentElement.innerHTML=Aa?Yo:Ye}catch{}}let Nt=E.body||E.documentElement;return m&&$&&Nt.insertBefore(Re.createTextNode($),Nt.childNodes[0]||null),eo===tn?Zm.call(E,An?"html":"body")[0]:An?E.documentElement:Nt},eu=function(m){return Gm.call(m.ownerDocument||m,m,Go.SHOW_ELEMENT|Go.SHOW_COMMENT|Go.SHOW_TEXT|Go.SHOW_PROCESSING_INSTRUCTION|Go.SHOW_CDATA_SECTION,null)},tu=function(m){return m instanceof zm&&(typeof m.nodeName!="string"||typeof m.textContent!="string"||typeof m.removeChild!="function"||!(m.attributes instanceof Um)||typeof m.removeAttribute!="function"||typeof m.setAttribute!="function"||typeof m.namespaceURI!="string"||typeof m.insertBefore!="function"||typeof m.hasChildNodes!="function")},iu=function(m){return typeof Ta=="function"&&m instanceof Ta},nn=function(m,E,$){Fi[m]&&_(Fi[m],Ye=>{Ye.call(G,E,$,to)})},nu=function(m){let E=null;if(nn("beforeSanitizeElements",m,null),tu(m))return Li(m),!0;let $=Mt(m.nodeName);if(nn("uponSanitizeElement",m,{tagName:$,allowedTags:yt}),m.hasChildNodes()&&!iu(m.firstElementChild)&&Ct(/<[/\w]/g,m.innerHTML)&&Ct(/<[/\w]/g,m.textContent)||m.nodeType===Wo.progressingInstruction||xa&&m.nodeType===Wo.comment&&Ct(/<[/\w]/g,m.data))return Li(m),!0;if(!yt[$]||Zo[$]){if(!Zo[$]&&ru($)&&(dt.tagNameCheck instanceof RegExp&&Ct(dt.tagNameCheck,$)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck($)))return!1;if(Pa&&!Jn[$]){let Ye=Ca(m)||m.parentNode,Nt=Wm(m)||m.childNodes;if(Nt&&Ye){let Pt=Nt.length;for(let Xt=Pt-1;Xt>=0;--Xt){let Hi=Vm(Nt[Xt],!0);Hi.__removalCount=(m.__removalCount||0)+1,Ye.insertBefore(Hi,$m(m))}}}return Li(m),!0}return m instanceof Rl&&!sg(m)||($==="noscript"||$==="noembed"||$==="noframes")&&Ct(/<\/no(script|embed|frames)/i,m.innerHTML)?(Li(m),!0):(qn&&m.nodeType===Wo.text&&(E=m.textContent,_([ba,Ma,Da],Ye=>{E=Ge(E,Ye," ")}),m.textContent!==E&&(O(G.removed,{element:m.cloneNode()}),m.textContent=E)),nn("afterSanitizeElements",m,null),!1)},ou=function(m,E,$){if(Bl&&(E==="id"||E==="name")&&($ in Re||$ in og))return!1;if(!(Ia&&!wa[E]&&Ct(qm,E))){if(!(jl&&Ct(Km,E))){if(!bt[E]||wa[E]){if(!(ru(m)&&(dt.tagNameCheck instanceof RegExp&&Ct(dt.tagNameCheck,m)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(m))&&(dt.attributeNameCheck instanceof RegExp&&Ct(dt.attributeNameCheck,E)||dt.attributeNameCheck instanceof Function&&dt.attributeNameCheck(E))||E==="is"&&dt.allowCustomizedBuiltInElements&&(dt.tagNameCheck instanceof RegExp&&Ct(dt.tagNameCheck,$)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck($))))return!1}else if(!Ea[E]){if(!Ct(Ll,Ge($,Fl,""))){if(!((E==="src"||E==="xlink:href"||E==="href")&&m!=="script"&&Tt($,"data:")===0&&Wl[m])){if(!(Ul&&!Ct(Qm,Ge($,Fl,"")))){if($)return!1}}}}}}return!0},ru=function(m){return m!=="annotation-xml"&&ue(m,Jm)},su=function(m){nn("beforeSanitizeAttributes",m,null);let{attributes:E}=m;if(!E)return;let $={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:bt},Ye=E.length;for(;Ye--;){let Nt=E[Ye],{name:Pt,namespaceURI:Xt,value:Hi}=Nt,Ko=Mt(Pt),$t=Pt==="value"?Hi:Ji(Hi);if($.attrName=Ko,$.attrValue=$t,$.keepAttr=!0,$.forceKeepAttr=void 0,nn("uponSanitizeAttribute",m,$),$t=$.attrValue,$.forceKeepAttr||(Wr(Pt,m),!$.keepAttr))continue;if(!zl&&Ct(/\/>/i,$t)){Wr(Pt,m);continue}if(xa&&Ct(/((--!?|])>)|<\/(style|title)/i,$t)){Wr(Pt,m);continue}qn&&_([ba,Ma,Da],cu=>{$t=Ge($t,cu," ")});let au=Mt(m.nodeName);if(ou(au,Ko,$t)){if(Vl&&(Ko==="id"||Ko==="name")&&(Wr(Pt,m),$t=eg+$t),Vt&&typeof jr=="object"&&typeof jr.getAttributeType=="function"&&!Xt)switch(jr.getAttributeType(au,Ko)){case"TrustedHTML":{$t=Vt.createHTML($t);break}case"TrustedScriptURL":{$t=Vt.createScriptURL($t);break}}try{Xt?m.setAttributeNS(Xt,Pt,$t):m.setAttribute(Pt,$t),tu(m)?Li(m):y(G.removed)}catch{}}}nn("afterSanitizeAttributes",m,null)},ag=function Y(m){let E=null,$=eu(m);for(nn("beforeSanitizeShadowDOM",m,null);E=$.nextNode();)nn("uponSanitizeShadowNode",E,null),!nu(E)&&(E.content instanceof en&&Y(E.content),su(E));nn("afterSanitizeShadowDOM",m,null)};return G.sanitize=function(Y){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,$=null,Ye=null,Nt=null;if(Aa=!Y,Aa&&(Y=""),typeof Y!="string"&&!iu(Y))if(typeof Y.toString=="function"){if(Y=Y.toString(),typeof Y!="string")throw $o("dirty is not a string, aborting")}else throw $o("toString is not a function");if(!G.isSupported)return Y;if(Oa||Ra(m),G.removed=[],typeof Y=="string"&&(Xo=!1),Xo){if(Y.nodeName){let Hi=Mt(Y.nodeName);if(!yt[Hi]||Zo[Hi])throw $o("root node is forbidden and cannot be sanitized in-place")}}else if(Y instanceof Ta)E=Jl(""),$=E.ownerDocument.importNode(Y,!0),$.nodeType===Wo.element&&$.nodeName==="BODY"||$.nodeName==="HTML"?E=$:E.appendChild($);else{if(!Kn&&!qn&&!An&&Y.indexOf("<")===-1)return Vt&&Br?Vt.createHTML(Y):Y;if(E=Jl(Y),!E)return Kn?null:Br?Yo:""}E&&Sa&&Li(E.firstChild);let Pt=eu(Xo?Y:E);for(;Ye=Pt.nextNode();)nu(Ye)||(Ye.content instanceof en&&ag(Ye.content),su(Ye));if(Xo)return Y;if(Kn){if(zr)for(Nt=Ym.call(E.ownerDocument);E.firstChild;)Nt.appendChild(E.firstChild);else Nt=E;return(bt.shadowroot||bt.shadowrootmode)&&(Nt=Xm.call(Ce,Nt,!0)),Nt}let Xt=An?E.outerHTML:E.innerHTML;return An&&yt["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&Ct(El,E.ownerDocument.doctype.name)&&(Xt=" -`+Xt),qn&&_([ba,Ma,Da],Hi=>{Xt=Ge(Xt,Hi," ")}),Vt&&Br?Vt.createHTML(Xt):Xt},G.setConfig=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ra(Y),Oa=!0},G.clearConfig=function(){to=null,Oa=!1},G.isValidAttribute=function(Y,m,E){to||Ra({});let $=Mt(Y),Ye=Mt(m);return ou($,Ye,E)},G.addHook=function(Y,m){typeof m=="function"&&(Fi[Y]=Fi[Y]||[],O(Fi[Y],m))},G.removeHook=function(Y){if(Fi[Y])return y(Fi[Y])},G.removeHooks=function(Y){Fi[Y]&&(Fi[Y]=[])},G.removeAllHooks=function(){Fi={}},G}var jm=kl();return jm})});var Kd="edge/";function Jb(e,n){return parseInt(n.slice(n.toLowerCase().indexOf(Kd)+Kd.length),10)i.slice(4,i.length-1).replace(/['"#]+/g,""));return Array.from(new Set(t))}function ds(e,n=ug()){return ci(e)?pg(e).reduce((i,o)=>{let r=dg(o),s=`id_${n}_${o}`;return i.replace(new RegExp(`"${r}"`,"g"),`"${s}"`).replace(new RegExp(`'${r}'`,"g"),`'${s}'`).replace(new RegExp(`url\\('#${r}'\\)`,"g"),`url('#${s}')`).replace(new RegExp(`url\\("#${r}"\\)`,"g"),`url("#${s}")`).replace(new RegExp(`url\\(#${r}\\)`,"g"),`url(#${s})`)},e):e}var Ln=new se("POLYMORPHEUS_CONTEXT"),ui=class{constructor(n,t){this.component=n,this.i=t}createInjector(n,t){return mn.create({parent:this.i||n,providers:[{provide:Ln,useValue:t}]})}},ur=(()=>{class e{constructor(t,i){this.template=t,this.cdr=i,this.polymorpheus=""}check(){this.cdr.markForCheck()}static ngTemplateContextGuard(t,i){return!0}}return e.\u0275fac=function(t){return new(t||e)(a(Kt,2),a(ft))},e.\u0275dir=w({type:e,selectors:[["ng-template","polymorpheus",""]],inputs:{polymorpheus:"polymorpheus"},exportAs:["polymorpheus"]}),e})(),ps=class{constructor(n){this.$implicit=n}get polymorpheusOutlet(){return this.$implicit}};var Je=(()=>{class e{constructor(t,i,o){this.vcr=t,this.i=i,this.t=o,this.content=""}get template(){return Ja(this.content)?this.content.template:this.content instanceof Kt?this.content:this.t}ngOnChanges({content:t}){var i;let o=this.getContext();if((i=this.c)===null||i===void 0||i.injector.get(ft).markForCheck(),!t)return;this.vcr.clear();let r=o&&new Proxy(o,{get:(s,c)=>{var d;return(d=this.getContext())===null||d===void 0?void 0:d[c]}});ep(this.content)?this.process(this.content,r):(o instanceof ps&&o.$implicit)!=null&&this.vcr.createEmbeddedView(this.template,r)}ngDoCheck(){Ja(this.content)&&this.content.check()}static ngTemplateContextGuard(t,i){return!0}getContext(){return hg(this.content)||ep(this.content)?this.context:new ps(typeof this.content=="function"?this.content(this.context):this.content)}process(t,i){let o=t.createInjector(this.i,i);this.c=this.vcr.createComponent(o.get(Qr).resolveComponentFactory(t.component),0,o)}}return e.\u0275fac=function(t){return new(t||e)(a(Ci),a(mn),a(Kt))},e.\u0275dir=w({type:e,selectors:[["","polymorpheusOutlet",""]],inputs:{content:[0,"polymorpheusOutlet","content"],context:[0,"polymorpheusOutletContext","context"]},features:[qt]}),e})();function Ja(e){return e instanceof ur}function ep(e){return e instanceof ui}function hg(e){return Ja(e)||e instanceof Kt}var lt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var fg=["viewContainer"],mg="tui_interactive_",dr=(()=>{class e{constructor(){this.pseudoHover=null,this.pseudoActive=null,this.pseudoFocus=null,this.focusable=!0,this.nativeId="",this.focusedChange=new Pe,this.focusVisibleChange=new Pe,this.focusVisible=!1,this.autoIdString=`${mg}${e.autoId++}${Date.now()}`}get computedDisabled(){return this.disabled}get computedFocusable(){return!this.computedDisabled&&(this.focusable||this.focused)}get computedFocused(){var t;return!this.computedDisabled&&((t=this.pseudoFocus)!==null&&t!==void 0?t:this.focused)}get computedFocusVisible(){var t;return!this.computedDisabled&&((t=this.pseudoFocus)!==null&&t!==void 0?t:this.focusVisible)}get id(){return this.nativeId||this.autoIdString}updateFocused(t){this.focusedChange.emit(t)}updateFocusVisible(t){this.focusVisible!==t&&(this.focusVisible=t,this.focusVisibleChange.emit(t))}}return e.autoId=0,e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,hostVars:7,hostBindings:function(t,i){t&2&&(fe("data-focused",i.pseudoFocus),J("_disabled",i.computedDisabled)("_focused",i.computedFocused)("_focus-visible",i.computedFocusVisible))},inputs:{pseudoHover:"pseudoHover",pseudoActive:"pseudoActive",pseudoFocus:"pseudoFocus",focusable:"focusable",nativeId:"nativeId"},outputs:{focusedChange:"focusedChange",focusVisibleChange:"focusVisibleChange"}}),e})(),ec=class{},Ai=(()=>{class e extends dr{constructor(t,i,o){super(),this.ngControl=t,this.cdr=i,this.valueTransformer=o,this.refresh$=new Ze,this.onTouched=Wa,this.onChange=Wa,this.fallbackValue=this.getFallbackValue(),this.destroy$=new Ze,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 t;return(t=this.previousInternalValue)!==null&&t!==void 0?t:this.fallbackValue}set value(t){this.updateValue(t)}get safeCurrentValue(){var t;return(t=this.rawValue)!==null&&t!==void 0?t:this.fallbackValue}get invalid(){return this.safeNgControlData(({invalid:t})=>t,!1)}get valid(){return this.safeNgControlData(({valid:t})=>t,!1)}get touched(){return this.safeNgControlData(({touched:t})=>t,!1)}get disabled(){return this.safeNgControlData(({disabled:t})=>t,!1)}get interactive(){return!this.readOnly&&!this.computedDisabled}get control(){return this.safeNgControlData(({control:t})=>t,null)}get computedName(){var t,i;return(i=(t=this.controlName)===null||t===void 0?void 0:t.toString())!==null&&i!==void 0?i:null}get controlName(){var t,i,o;return(o=(i=(t=this.ngControl)===null||t===void 0?void 0:t.name)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:null}get rawValue(){let{ngControl:t}=this;if(t===null)return;let i=t instanceof an&&this.previousInternalValue===void 0?t.viewModel:t.value;return this.fromControlValue(i)}ngOnInit(){this.refresh$.pipe(ri(0),it(null),b(()=>{var t;return(t=this.ngControl)===null||t===void 0?void 0:t.control}),et(Tn),oe(),Fe(t=>He(t.valueChanges,t.statusChanges)),re(this.destroy$)).subscribe(()=>{this.refreshLocalValue(this.safeCurrentValue)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}checkControlUpdate(){this.cdr.markForCheck()}registerOnChange(t){this.onChange=i=>{t(this.toControlValue(i))},this.refresh$.next()}registerOnTouched(t){this.onTouched=t}setDisabledState(){this.checkControlUpdate()}writeValue(t){let i=this.ngControl instanceof an&&this.previousInternalValue===void 0?this.ngControl.model:t;this.refreshLocalValue(this.fromControlValue(i))}updateFocused(t){t||this.controlMarkAsTouched(),super.updateFocused(t)}updateValue(t){this.disabled||this.valueIdenticalComparator(this.value,t)||(this.previousInternalValue=t,this.controlSetValue(t))}valueIdenticalComparator(t,i){return t===i}safeNgControlData(t,i){var o;return(o=this.ngControl&&t(this.ngControl))!==null&&o!==void 0?o:i}controlMarkAsTouched(){this.onTouched(),this.checkControlUpdate()}controlSetValue(t){this.onChange(t),this.checkControlUpdate()}refreshLocalValue(t){this.previousInternalValue=t,this.checkControlUpdate()}fromControlValue(t){return this.valueTransformer?this.valueTransformer.fromControlValue(t):t}toControlValue(t){return this.valueTransformer?this.valueTransformer.toControlValue(t):t}}return e.\u0275fac=function(t){return new(t||e)(a(zi,8),a(ft),a(ec,8))},e.\u0275dir=w({type:e,hostVars:4,hostBindings:function(t,i){t&2&&J("_readonly",i.readOnly)("_invalid",i.computedInvalid)},inputs:{readOnly:"readOnly",pseudoInvalid:"pseudoInvalid"},features:[W]}),e})();function tp(e){return{provide:Ai,useExisting:e}}var Yt=(()=>{class e{constructor(){this.change$=new Ze}ngOnChanges(){this.change$.next()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,features:[qt]}),e})(),hs=(()=>{class e extends _i{constructor(t){super(i=>this.dialogs$.subscribe(i)),this.idService=t,this.dialogs$=new Ke([])}open(t,i={}){return new _i(o=>{let r=c=>{o.next(c),o.complete()},s=Object.assign(Object.assign(Object.assign({},this.defaultOptions),i),{content:t,completeWith:r,$implicit:o,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(c=>c!==s))}})}}return e.\u0275fac=function(t){return new(t||e)(ye(qa))},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})();var wM=(()=>{class e extends Ai{clear(){this.value=[]}getFallbackValue(){return[]}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,features:[W]}),e})(),IM=(()=>{class e extends Ai{getFallbackValue(){return null}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,features:[W]}),e})(),Hn=(()=>{class e{get safeHost(){if(!this.host)throw new ud;return this.host}attach(t){this.host=t}add(t){return this.safeHost.addComponentChild(t)}remove({hostView:t}){t.destroyed||t.destroy()}addTemplate(t,i){return this.safeHost.addTemplateChild(t,i)}removeTemplate(t){t.destroyed||t.destroy()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),_o=(()=>{class e{constructor(t,i,o){this.injector=t,this.el=i,o.attach(this)}get clientRect(){return this.el.nativeElement.getBoundingClientRect()}addComponentChild(t){let i=t.createInjector(this.injector),r=i.get(Qr).resolveComponentFactory(t.component),s=[{provide:e,useValue:this}],c=mn.create({parent:i,providers:s}),d=this.vcr.createComponent(r,void 0,c);return d.changeDetectorRef.detectChanges(),d}addTemplateChild(t,i){return this.vcr.createEmbeddedView(t,i)}}return e.\u0275fac=function(t){return new(t||e)(a(so),a(N),a(Hn))},e.\u0275dir=w({type:e,viewQuery:function(t,i){if(t&1&&at(fg,5,Ci),t&2){let o;$e(o=We())&&(i.vcr=o.first)}}}),e})();function ip(e){return e!==null&&typeof e<"u"&&`${e}`!="false"}var SM=(()=>{class e{transform(t,i,...o){return i(t,...o)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=Ii({name:"tuiMapper",type:e,pure:!0}),e})(),PM=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();function gg(e,n){if(e&1&&(g(0,"div",3),S(1,"div",4),v()),e&2){let t=u().ngIf;J("t-bar_has-horizontal",t[1])}}function vg(e,n){if(e&1&&(g(0,"div",5),S(1,"div",6),v()),e&2){let t=u().ngIf;J("t-bar_has-vertical",t[0])}}function _g(e,n){if(e&1&&(Ie(0),T(1,gg,2,2,"div",1)(2,vg,2,2,"div",2),xe()),e&2){let t=n.ngIf;h(),l("ngIf",t[0]),h(),l("ngIf",t[1])}}function Tg(e,n){if(e&1&&(Ie(0),T(1,_g,3,2,"ng-container",0),R(2,"async"),xe()),e&2){let t=u();h(),l("ngIf",H(2,1,t.refresh$))}}var fs=24;function Cg({clientY:e},{top:n,height:t}){return(e-n)/t}function yg({clientX:e},{left:n,width:t}){return(e-n)/t}var bg=(()=>{class e{constructor(t,i,o,r,s,c){this.container=r,this.doc=s,this.el=c,this.tuiScrollbar="vertical";let{nativeElement:d}=this.el,p=pe(d,"mousedown"),_=pe(this.doc,"mousemove"),y=pe(this.doc,"mouseup"),O=pe(this.wrapper,"mousedown");He(O.pipe(b(L=>this.getScrolled(L,.5,.5))),p.pipe(Fe(L=>{let Z=d.getBoundingClientRect(),ue=Cg(L,Z),Ge=yg(L,Z);return _.pipe(b(Tt=>this.getScrolled(Tt,ue,Ge)),re(y))}))).pipe($i(t),re(i)).subscribe(([L,Z])=>{this.element.style.scrollBehavior="auto",this.tuiScrollbar==="vertical"?this.element.scrollTop=L:this.element.scrollLeft=Z,this.element.style.scrollBehavior=""}),He(o.pipe(rn(os)),md(this.element)).pipe($i(t),re(i)).subscribe(()=>{this.tuiScrollbar==="vertical"?(d.style.top=`${this.thumb*100}%`,d.style.height=`${this.view*100}%`):(d.style.left=`${this.thumb*100}%`,d.style.width=`${this.view*100}%`)})}get wrapper(){return this.el.nativeElement.parentElement}get scrolled(){let{scrollTop:t,scrollHeight:i,clientHeight:o,scrollLeft:r,scrollWidth:s,clientWidth:c}=this.element;return this.tuiScrollbar==="vertical"?t/(i-o):r/(s-c)}get compensation(){let{clientHeight:t,scrollHeight:i,clientWidth:o,scrollWidth:r}=this.element;return t*t/i>fs&&this.tuiScrollbar==="vertical"||o*o/r>fs&&this.tuiScrollbar==="horizontal"?0:this.tuiScrollbar==="vertical"?fs/t:fs/o}get thumb(){let t=this.compensation||this.view;return this.scrolled*(1-t)}get view(){let{clientHeight:t,scrollHeight:i,clientWidth:o,scrollWidth:r}=this.element;return this.tuiScrollbar==="vertical"?Math.ceil(t/i*100)/100:Math.ceil(o/r*100)/100}get element(){return this.container.nativeElement}getScrolled({clientY:t,clientX:i},o,r){let{offsetHeight:s,offsetWidth:c}=this.el.nativeElement,{top:d,left:p,width:_,height:y}=this.wrapper.getBoundingClientRect(),O=this.element.scrollHeight-y,L=this.element.scrollWidth-_,Z=(t-d-s*o)/(y-s),ue=(i-p-c*r)/(_-c);return[O*Z,L*ue]}}return e.\u0275fac=function(t){return new(t||e)(a(Xe),a(q,2),a(Cn),a(Fn),a(qe),a(N))},e.\u0275dir=w({type:e,selectors:[["","tuiScrollbar",""]],inputs:{tuiScrollbar:"tuiScrollbar"},features:[A([q])]}),e})(),np=(()=>{class e{constructor(t,i,o,r){this.isIOS=t,this.zone=i,this.scrollRef=o,this.animationFrame$=r,this.refresh$=this.animationFrame$.pipe(rn(300),b(()=>{let{clientHeight:s,scrollHeight:c,clientWidth:d,scrollWidth:p}=this.scrollRef.nativeElement;return[Math.ceil(s/c*100)<100,Math.ceil(d/p*100)<100]}),it([!1,!1]),oe((s,c)=>s[0]===c[0]&&s[1]===c[1]),Jt(this.zone))}}return e.\u0275fac=function(t){return new(t||e)(a(ln),a(Xe),a(Fn),a(Cn))},e.\u0275cmp=k({type:e,selectors:[["tui-scroll-controls"]],decls:1,vars:1,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(t,i){t&1&&T(0,Tg,3,3,"ng-container",0),t&2&&l("ngIf",!i.isIOS)},dependencies:[ee,bg,K],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 ZM=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiScrollRef",""]],features:[A([{provide:Fn,useExisting:N}])]}),e})(),op=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z]]}),e})();function Mg(e){let n=[],t=!1,i;return function(...r){return t&&n.length===r.length&&r.every((c,d)=>c===n[d])||(n=r,i=e.apply(this,r),t=!0),i}}function rp(e,n,t=!0){return function(){let o=e.call(this);return Object.defineProperty(this,n,{enumerable:t,value:o}),o}}function Zt(e,n,t){if(typeof e=="function"){let d=n;if(d.kind==="getter")return rp(e,d.name);if(d.kind==="method")return Mg(e);throw new Xa}let{get:i,enumerable:o,value:r}=t,s=n;if(i)return{configurable:!0,enumerable:o,get:rp(i,s,o)};if(typeof r!="function")throw new Xa;let c=r;return{configurable:!0,enumerable:o,get(){let d=[],p=!1,_,y=(...O)=>(p&&d.length===O.length&&O.every((Z,ue)=>Z===d[ue])||(d=O,_=c.apply(this,O),p=!0),_);return Object.defineProperty(this,s,{configurable:!0,value:y}),y}}}var gt=(()=>{class e{constructor(t,i,o,r){var s;this.active$=t,this.zone=i,this.el=o,this.directParentActiveZone=r,this.subActiveZones=[],this.tuiActiveZoneParent=null,this.tuiActiveZoneChange=this.active$.pipe(b(c=>!!c&&this.contains(c)),it(!1),oe(),hn(1),Jt(this.zone)),(s=this.directParentActiveZone)===null||s===void 0||s.addSubActiveZone(this)}set tuiActiveZoneParentSetter(t){this.setZone(t)}ngOnDestroy(){var t,i;(t=this.directParentActiveZone)===null||t===void 0||t.removeSubActiveZone(this),(i=this.tuiActiveZoneParent)===null||i===void 0||i.removeSubActiveZone(this)}contains(t){return this.el.nativeElement.contains(t)||this.subActiveZones.some((i,o,r)=>r.indexOf(i)===o&&i.contains(t))}setZone(t){var i;(i=this.tuiActiveZoneParent)===null||i===void 0||i.removeSubActiveZone(this),t==null||t.addSubActiveZone(this),this.tuiActiveZoneParent=t}addSubActiveZone(t){this.subActiveZones=[...this.subActiveZones,t]}removeSubActiveZone(t){this.subActiveZones=Xu(this.subActiveZones,this.subActiveZones.indexOf(t))}}return e.\u0275fac=function(t){return new(t||e)(a(Cd),a(Xe),a(N),a(e,12))},e.\u0275dir=w({type:e,selectors:[["","tuiActiveZone","",5,"ng-container"],["","tuiActiveZoneChange","",5,"ng-container"],["","tuiActiveZoneParent","",5,"ng-container"]],hostBindings:function(t,i){t&1&&C("mousedown.silent",function(){return 0},!1,Ni)},inputs:{tuiActiveZoneParentSetter:[0,"tuiActiveZoneParent","tuiActiveZoneParentSetter"]},outputs:{tuiActiveZoneChange:"tuiActiveZoneChange"},exportAs:["tuiActiveZone"]}),Td([Zt],e.prototype,"setZone",null),e})(),yi=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var sp=(()=>{class e{constructor(t,i){this.focusable=t,this.el=i}get element(){var t;return((t=this.focusable)===null||t===void 0?void 0:t.nativeFocusableElement)||this.el.nativeElement}get isTextFieldElement(){return this.element.matches("input, textarea, [contenteditable]")}}return e.\u0275fac=function(t){za()},e.\u0275dir=w({type:e}),e})(),Dg=1e3,wg=".ng-animating",Ig=(()=>{class e extends sp{constructor(t,i,o){super(t,i),this.animationFrame$=o}setFocus(){this.isTextFieldElement?hu(oo(Dg),this.animationFrame$.pipe(rn(os),b(()=>this.element.closest(wg)),_u(Boolean),Wt(1))).subscribe(()=>this.element.focus({preventScroll:!0})):this.element.focus({preventScroll:!0})}}return e.\u0275fac=function(t){return new(t||e)(a(ho,10),a(N),a(Cn))},e.\u0275dir=w({type:e,features:[W]}),e})(),xg=["type","inputMode","autocomplete","accept","min","max","step","pattern","size","maxlength"],Og=(()=>{class e extends sp{constructor(t,i,o,r,s){super(t,i),this.renderer=o,this.zone=r,this.win=s,this.patchCssStyles()}setFocus(){this.isTextFieldElement?this.zone.runOutsideAngular(()=>this.iosWebkitAutofocus()):this.element.focus({preventScroll:!0})}iosWebkitAutofocus(){var t;let i=this.makeFakeInput(),o=this.getDurationTimeBeforeFocus(),r=0,s=0,c=()=>i.focus({preventScroll:!0}),d=()=>{clearTimeout(r),r=this.win.setTimeout(()=>{clearTimeout(s),i.removeEventListener("blur",c),i.removeEventListener("focus",d),s=this.win.setTimeout(()=>{this.element.focus({preventScroll:!1}),i.remove()},o)})};i.addEventListener("blur",c,{once:!0}),i.addEventListener("focus",d),this.insideDialog()?this.win.document.body.appendChild(i):(t=this.element.parentElement)===null||t===void 0||t.appendChild(i),i.focus({preventScroll:!0})}makeFakeInput(){let t=this.renderer.createElement("input"),i=this.element.getBoundingClientRect();return this.patchFakeInputFromFocusableElement(t),t.style.height=Qe(i.height),t.style.width=Qe(i.width/2),t.style.position="fixed",t.style.zIndex="-99999999",t.style.caretColor="transparent",t.style.border="none",t.style.outline="none",t.style.color="transparent",t.style.background="transparent",t.style.cursor="none",t.style.fontSize=Qe(16),t.style.top=Qe(i.top),t.style.left=Qe(i.left),t}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(t=>{t.style.setProperty("overflow","auto"),t.style.setProperty("height","100%")})}patchFakeInputFromFocusableElement(t){xg.forEach(i=>{let o=this.element.getAttribute(i);Tn(o)&&t.setAttribute(i,o)})}}return e.\u0275fac=function(t){return new(t||e)(a(ho,10),a(N),a(ji),a(Xe),a(zt))},e.\u0275dir=w({type:e,features:[W]}),e})(),ap={delay:NaN},cp=ce(ap);function lp(e){return Si(cp,e,ap)}var up=new se("[TUI_AUTOFOCUS_HANDLER]"),Sg=[{provide:up,useFactory:(e,n,t,i,o,r,s)=>s?new Og(e,n,i,o,r):new Ig(e,n,t),deps:[[new tt,new fn,ho],N,Cn,ji,Xe,zt,ln]},q],ms=(()=>{class e{constructor(t,i,o){this.handler=t,this.options=i,this.destroy$=o,this.autoFocus=!0}ngAfterViewInit(){ip(this.autoFocus)&&this.focus()}focus(){Number.isNaN(this.options.delay)?Promise.resolve().then(()=>this.handler.setFocus()):oo(this.options.delay).pipe(re(this.destroy$)).subscribe(()=>this.handler.setFocus())}}return e.\u0275fac=function(t){return new(t||e)(a(up),a(cp),a(q,2))},e.\u0275dir=w({type:e,selectors:[["","tuiAutoFocus",""]],inputs:{autoFocus:[0,"tuiAutoFocus","autoFocus"]},features:[A(Sg)]}),e})(),gs=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Pg=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=k({type:e,selectors:[["ng-component"]],hostAttrs:[1,"tui-autofilled-styles"],decls:0,vars:0,template:function(t,i){},styles:[`.tui-autofill input,input.tui-autofill{transition:box-shadow .01s} -`],encapsulation:2,changeDetection:0}),e})(),dp=(()=>{class e{constructor(t){this.autofilled=!1,this.tuiAutofilledChange=new Pe,t.addComponent(Pg)}transitionStartHandler({propertyName:t,target:i}){var o;t.includes("box-shadow")&&((o=i)===null||o===void 0?void 0:o.matches("input"))&&(this.autofilled=!this.autofilled,this.tuiAutofilledChange.emit(this.autofilled))}}return e.\u0275fac=function(t){return new(t||e)(a(Sd))},e.\u0275dir=w({type:e,selectors:[["","tuiAutofilledChange",""]],hostAttrs:[1,"tui-autofill"],hostVars:2,hostBindings:function(t,i){t&1&&C("transitionstart",function(r){return i.transitionStartHandler(r)}),t&2&&J("_autofilled",i.autofilled)},outputs:{tuiAutofilledChange:"tuiAutofilledChange"}}),e})(),pp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var hp=(()=>{class e{constructor(){this.indeterminate=!1,this.checked=!1,this.tuiCheckedChange=new Pe}get isChecked(){return this.checked}get isIndeterminate(){return this.indeterminate}set tuiChecked(t){this.checked=t||!1,this.indeterminate=t===null}onChange({checked:t}){this.checked=t,this.indeterminate=!1,this.tuiCheckedChange.emit(t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["input","tuiChecked",""],["input","tuiCheckedChange",""]],hostVars:2,hostBindings:function(t,i){t&1&&C("change",function(r){return i.onChange(r.target)}),t&2&&kn("checked",i.isChecked)("indeterminate",i.isIndeterminate)},inputs:{tuiChecked:"tuiChecked"},outputs:{tuiCheckedChange:"tuiCheckedChange"}}),e})(),fp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var mp=(()=>{class e{constructor(t){this.tuiFocusVisibleChange=t}}return e.\u0275fac=function(t){return new(t||e)(a(mo))},e.\u0275dir=w({type:e,selectors:[["","tuiFocusVisibleChange",""]],outputs:{tuiFocusVisibleChange:"tuiFocusVisibleChange"},features:[A([q,mo])]}),e})(),gp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var yn=(()=>{class e{constructor(){this.focusable=!0}get tabIndex(){return this.focusable?0:-1}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiFocusable",""]],hostVars:1,hostBindings:function(t,i){t&2&&kn("tabIndex",i.tabIndex)},inputs:{focusable:[0,"tuiFocusable","focusable"]}}),e})(),bn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var vs=(()=>{class e{constructor({nativeElement:t},i){this.tuiFocusedChange=He(pe(t,"focusin"),pe(t,"focusout")).pipe(b(()=>Qt(t)),it(!1),oe(),hn(1),Jt(i))}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(Xe))},e.\u0275dir=w({type:e,selectors:[["","tuiFocusedChange",""]],outputs:{tuiFocusedChange:"tuiFocusedChange"}}),e})(),_s=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();function Eg({currentTarget:e,relatedTarget:n}){return!pt(n)||!pt(e)||!e.contains(n)}var Wi=(()=>{class e extends _i{constructor(t,i){super(o=>this.stream$.subscribe(o)),this.el=t,this.zone=i,this.stream$=He(pe(this.el.nativeElement,"mouseenter").pipe(b(Bi)),pe(this.el.nativeElement,"mouseleave").pipe(b(cn)),pe(this.el.nativeElement,"mouseout").pipe(et(Eg),b(cn))).pipe(oe(),Jt(this.zone))}}return e.\u0275fac=function(t){return new(t||e)(ye(N),ye(Xe))},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),vp=(()=>{class e{constructor(t){this.tuiHoveredChange=t}}return e.\u0275fac=function(t){return new(t||e)(a(Wi))},e.\u0275dir=w({type:e,selectors:[["","tuiHoveredChange",""]],outputs:{tuiHoveredChange:"tuiHoveredChange"},features:[A([Wi])]}),e})(),_p=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Tp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiItem",""]]}),e})(),Ts=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var ic=class{constructor(n){this.internalDirectiveInstance=n}get $implicit(){return this.internalDirectiveInstance.tuiLet}get tuiLet(){return this.internalDirectiveInstance.tuiLet}},xt=(()=>{class e{constructor(t,i){t.createEmbeddedView(i,new ic(this))}static ngTemplateContextGuard(t,i){return!0}}return e.\u0275fac=function(t){return new(t||e)(a(Ci),a(Kt))},e.\u0275dir=w({type:e,selectors:[["","tuiLet",""]],inputs:{tuiLet:"tuiLet"}}),e})(),Ot=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Cp=(()=>{class e{constructor(t,i){this.enabled$=new Ze;let o=i.pipe(b(r=>!!r&&(!t||!r.length||r.every(s=>!t.contains(s)))));this.tuiObscured=this.enabled$.pipe(po(()=>o))}set tuiObscuredEnabled(t){this.enabled$.next(t)}}return e.\u0275fac=function(t){return new(t||e)(a(gt,8),a(Ka,2))},e.\u0275dir=w({type:e,selectors:[["","tuiObscured",""]],inputs:{tuiObscuredEnabled:"tuiObscuredEnabled"},outputs:{tuiObscured:"tuiObscured"},features:[A([Ka,Pd,q])]}),e})(),yp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var bp=(()=>{class e{constructor({nativeElement:t},i,o){this.mode="scroll",pe(t,"wheel",{passive:!1}).pipe(et(()=>this.enabled),$i(i),re(o)).subscribe(r=>{this.processEvent(r,!!r.deltaY,r.deltaY?r.deltaY<0:r.deltaX<0)}),pe(t,"touchstart",{passive:!0}).pipe(Fe(({touches:r})=>{let{clientX:s,clientY:c}=r[0],d=0,p=0,_;return pe(t,"touchmove",{passive:!1}).pipe(et(()=>this.enabled),st(y=>{let O=y.changedTouches[0];d=s-O.clientX,p=c-O.clientY,s=O.clientX,c=O.clientY,_===void 0&&(_=Math.abs(p)>Math.abs(d)),this.processEvent(y,_,_?p<0:d<0)}))}),$i(i),re(o)).subscribe()}get enabled(){return this.mode!=="none"}get overscrollBehavior(){return this.enabled?"contain":null}processEvent(t,i,o){var r;let{target:s,currentTarget:c,cancelable:d}=t;if(!(!d||!pt(s)||((r=s)===null||r===void 0?void 0:r.type)==="range")){if(this.mode==="all"&&(i&&!c.contains(Ga(s))||!i&&!c.contains(Ga(s,!1)))){t.preventDefault();return}if(i&&(o&&!ar(s,c,!0,!1)||!o&&!ar(s,c,!0,!0))){t.preventDefault();return}!i&&(o&&!ar(s,c,!1,!1)||!o&&!ar(s,c,!1,!0))&&t.preventDefault()}}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(Xe),a(q,2))},e.\u0275dir=w({type:e,selectors:[["","tuiOverscroll",""]],hostVars:2,hostBindings:function(t,i){t&2&&nt("overscroll-behavior",i.overscrollBehavior)},inputs:{mode:[0,"tuiOverscroll","mode"]},features:[A([q])]}),e})(),Mp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Ag=["*"],To=(()=>{class e extends Hn{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),$w=(()=>{class e extends _o{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275cmp=k({type:e,selectors:[["tui-dropdown-host"]],features:[A([{provide:Hn,useExisting:To},{provide:_o,useExisting:e}]),W],ngContentSelectors:Ag,decls:3,vars:0,consts:[["viewContainer",""]],template:function(t,i){t&1&&(Ve(),me(0),Ut(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})(),Ww=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var eI=(()=>{class e{constructor(t,i){this.el=t,this.takeOnlyTrustedEvents=i,this.tuiPressedChange=fd(this.el.nativeElement,{onlyTrusted:this.takeOnlyTrustedEvents})}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(xd))},e.\u0275dir=w({type:e,selectors:[["","tuiPressedChange",""]],outputs:{tuiPressedChange:"tuiPressedChange"}}),e})(),Dp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var kg=65536,nc=class{constructor(n){this.$implicit=n}},wp=(()=>{class e{constructor(t,i){this.viewContainer=t,this.templateRef=i}set tuiRepeatTimesOf(t){let i=Math.floor(_n(t,0,kg)),{length:o}=this.viewContainer;t{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Co=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}(Co||{}),ki=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}(ki||{});function mI(e,n,t){return t&&te?n:e}var gI=7;var yo=12,Cs=1,oc=0,rc=11,sc=0,ac=9999,ys=`${Vi}${Yu}${Vi}`,Rg=1e3,Fg=60,Lg=60,xp=24,Hg=Rg*Fg,Ng=Hg*Lg,vI=Ng*xp,cc=10,jg=2*cc+ys.length,_I=ce("DMY"),TI=ce("."),CI=(e,n)=>e.replace(/[^0-9A-Za-zА-Яа-я]/gi,n),pi=class e{constructor(n){this.year=n}static isValidYear(n){return Number.isInteger(n)&&sr(n,sc,ac+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,t){return t.year-n.year}static normalizeYearPart(n){return rs(n,sc,ac)}get formattedYear(){return String(this.year).padStart(4,"0")}get isLeapYear(){return e.isLeapYear(this.year)}get absoluteLeapYears(){return e.getAbsoluteLeapYears(this.year)}yearBefore({year:n}){return this.year=n}yearAfter({year:n}){return this.year>n}append({year:n=0}){let t=this.year+n;return new e(t)}toString(){return this.formattedYear}valueOf(){return this.year}[Symbol.toPrimitive](n){return Date.prototype[Symbol.toPrimitive].call(this,n)}toJSON(){return this.formattedYear}},di=class e extends pi{constructor(n,t){super(n),this.month=t}static isValidMonth(n,t){return pi.isValidYear(n)&&e.isValidMonthPart(t)}static getMonthDaysCount(n,t){switch(n){case ki.February:return t?29:28;case ki.April:case ki.June:case ki.September:case ki.November:return 30;default:return 31}}static currentLocal(){let n=new Date;return new e(n.getFullYear(),n.getMonth())}static currentUtc(){let n=new Date;return new e(n.getUTCFullYear(),n.getUTCMonth())}static lengthBetween(n,t){let i=n.month+n.year*12;return t.month+t.year*12-i}static normalizeMonthPart(n){return rs(n,oc,rc)}static isValidMonthPart(n){return Number.isInteger(n)&&sr(n,oc,rc+1)}get formattedMonthPart(){return String(this.month+1).padStart(2,"0")}get daysCount(){return e.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:t=0}){let i=(this.year+n)*yo+this.month+t;return new e(Math.floor(i/yo),i%yo)}toString(){return`${this.formattedMonthPart}.${this.formattedYear}`}valueOf(){return this.toLocalNativeDate().valueOf()}toJSON(){return`${super.toJSON()}-${this.formattedMonthPart}`}toLocalNativeDate(){return new Date(this.year,this.month)}toUtcNativeDate(){return new Date(Date.UTC(this.year,this.month))}},Nn=class e extends di{constructor(n,t,i){super(n,t),this.day=i}static fromLocalNativeDate(n){return new e(n.getFullYear(),n.getMonth(),n.getDate())}static fromUtcNativeDate(n){return new e(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate())}static isValidDay(n,t,i){return di.isValidMonth(n,t)&&Number.isInteger(i)&&sr(i,Cs,di.getMonthDaysCount(t,pi.isLeapYear(n))+1)}static currentLocal(){let n=new Date,t=n.getFullYear(),i=n.getMonth(),o=n.getDate();return new e(t,i,o)}static currentUtc(){let n=new Date,t=n.getUTCFullYear(),i=n.getUTCMonth(),o=n.getUTCDate();return new e(t,i,o)}static normalizeOf(n,t,i){let o=pi.normalizeYearPart(n),r=di.normalizeMonthPart(t),s=e.normalizeDayPart(i,r,o);return new e(o,r,s)}static lengthBetween(n,t){return Math.round((t.toLocalNativeDate().getTime()-n.toLocalNativeDate().getTime())/(1e3*60*60*24))}static parseRawDateString(n,t="DMY"){switch(t){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,t="DMY"){let{day:i,month:o,year:r}=this.parseRawDateString(n,t);return e.normalizeOf(r,o,i)}static jsonParse(n){let{day:t,month:i,year:o}=this.parseRawDateString(n,"YMD");if(!pi.isValidYear(o))throw new ld(o);if(!di.isValidMonth(o,i))throw new cd(i);if(!Number.isInteger(t)||!sr(t,Cs,di.getMonthDaysCount(i,pi.isLeapYear(o))+1))throw new ad(t);return new e(o,i,t)}static normalizeDayPart(n,t,i){let o=di.getMonthDaysCount(t,pi.isLeapYear(i));return rs(n,1,o)}get formattedDayPart(){return String(this.day).padStart(2,"0")}get isWeekend(){let n=this.dayOfWeek(!1);return n===Co.Saturday||n===Co.Sunday}dayOfWeek(n=!0){let t=n?this.toLocalNativeDate().getDay()-1:this.toLocalNativeDate().getDay();return t<0?6:t}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,t){return n!==null&&this.dayBefore(n)?n:t!==null&&this.dayAfter(t)?t:this}append({year:n=0,month:t=0,day:i=0}){let o=(this.year+n)*yo+this.month+t,r=Math.floor(o/yo),s=o%yo,c=Math.min(this.day,di.getMonthDaysCount(s,pi.isLeapYear(r)))+i;for(;c>di.getMonthDaysCount(s,pi.isLeapYear(r));)c-=di.getMonthDaysCount(s,pi.isLeapYear(r)),s===ki.December?(r++,s=ki.January):s++;for(;ce.includes(".svg#")?e:`#${e}`,MI=()=>Vu,pc={decimalLimit:1/0,decimalSeparator:",",thousandSeparator:Vi,zeroPadding:!0,rounding:"truncate",decimal:"not-zero"},Pp=["Spacebar","Backspace","Delete","ArrowLeft","ArrowRight","Left","Right","End","Home"];var DI="tui-scroll-into-view";var Ep="tui-icon-error",hc=["bottom-left","bottom","bottom-right","top-left","top","top-right","left-top","left","left-bottom","right-top","right","right-bottom"];function vc(e){return!e||typeof getComputedStyle>"u"?!1:getComputedStyle(e).getPropertyValue("position")==="fixed"||vc(e.parentElement)}function bo({document:e,innerWidth:n}){return Math.max(e.documentElement.clientWidth||0,n||0)}function bs(e){let n=e.cloneRange(),{startContainer:t,startOffset:i,endContainer:o,endOffset:r}=n,{ownerDocument:s}=t;if(!s)return n;let c=s.createTreeWalker(s.body,NodeFilter.SHOW_TEXT,Gu);c.currentNode=t;do{let d=c.currentNode,p=d.textContent||"",_=d===t?p.slice(0,Math.max(0,i+1)):p,y=Math.max(_.lastIndexOf(" "),_.lastIndexOf(Vi),_.lastIndexOf(rr))+1;if(n.setStart(d,0),y){n.setStart(d,y);break}}while(c.previousNode());c.currentNode=o;do{let d=c.currentNode,p=d.textContent||"",_=d===o?p.slice(r+1):p,y=[_.indexOf(" "),_.indexOf(Vi),_.indexOf(rr)].reduce((O,L)=>O===-1||L===-1?Math.max(O,L):Math.min(O,L),-1);if(n.setEnd(d,p.length),y!==-1){n.setEnd(d,y+p.length-_.length);break}}while(c.nextNode());return n}var fc='width="',mc='height="',gc="")));if(!(i!=null&&i.includes(fc))||!i.includes(mc))return`${t.replace(gc,``;let o=i.indexOf(fc),r=i.indexOf(mc),s=o+fc.length,c=r+mc.length,d=i.slice(s,i.indexOf('"',s)),p=i.slice(c,i.indexOf('"',c));if(!p||!d||d.includes("%")||p.includes("%")||d.includes("em")||p.includes("em"))return t.replace(gc,`${t}`}var _c=1.5,Ug=2.5;function Rp(e,n=!1,t=!1,i=!1,o="m"){let r=o==="s"?0:.25,s=0;return e&&(s+=_c+r),n&&(s+=_c+r),t&&(s+=_c+r),i&&(s+=Ug+r),s}function Ms(e){let n=e.endsWith("/")?e:`${e}/`;return t=>t.startsWith("tuiIcon")?`${n}${t}.svg${pr}#${t}`:Sp(t)}function Fp(e){return e.length===1||Pp.includes(e)}function Tc(e,n="tui-hints-host"){var t;return!!(!((t=ed(e))===null||t===void 0)&&t.some(i=>!i.closest(n)))}function Lp(e){let n=e.trim();return n.startsWith("<")&&n.endsWith(">")}function Cc(e,n){return(t,i)=>{let o=t||Object.assign({},i||n);return Object.keys(e).forEach(r=>{o[r]=e[r]}),o}}var kp={xxs:0,xs:1,s:2,m:3,l:4,xl:5,xxl:6};function Hp(e,n="s"){return kp[e]>kp[n]}function Np(e,{mobile:n}){return bo(e){var e,n,t;return(t=(n=(e=V(qe).defaultView)===null||e===void 0?void 0:e.matchMedia)===null||n===void 0?void 0:n.call(e,"(prefers-reduced-motion: reduce)").matches)!==null&&t!==void 0?t:!1}),yc=300,bc=X(()=>V(Bg)?0:yc),Do=X(()=>({value:"",params:{duration:V(bc)}})),$I=X(()=>Lu()),Vg={check:"tuiIconCheck",close:"tuiIconClose",error:"tuiIconAlertCircle",more:"tuiIconChevronRight"},wo=ce(Vg);var $g=new se("[TUI_DATA_LIST_ACCESSOR]");function jp(e){return{provide:$g,useExisting:e}}var Mc=new se("[TUI_DATA_LIST_HOST]");function WI(e){return{provide:Mc,useExisting:e}}var GI=ce(e=>e.isWeekend?"weekend":"weekday"),YI=new se("[TUI_DOCUMENT_OR_SHADOW_ROOT]"),ZI=new se("[TUI_ELEMENT_REF]"),Wg=ce(Co.Monday),Up=X(ze("months")),Ds=X(ze("close")),zp=X(ze("nothingFoundMessage")),XI=X(ze("defaultErrorMessage")),qI=X(ze("spinTexts")),Gg=X(ze("shortWeekDays")),ws="assets/taiga-ui/icons",Dc=ce(ws),Bp=ce({}),Vp=X(()=>Ms(V(Dc))),wc=ce({mobile:768,desktopSmall:1024,desktopLarge:1280}),Ic=X(()=>{let e=V(zt),n=V(wc);return pe(e,"resize").pipe(on(),it(null),b(()=>Np(e,n)),oe(),Jt(V(Xe)))}),Yg=new se("[TUI_LEGACY_MASK]"),Yi=new se("[TUI_MODE]"),Zg={info:"tuiIconInfo",success:"tuiIconCheckCircle",error:"tuiIconXCircle",warning:"tuiIconAlertCircle",neutral:"tuiIconInfo"},Xg={autoClose:3e3,label:"",status:"info",hasCloseButton:!0,icon:({$implicit:e})=>Zg[e],size:"m",hasIcon:!0,defaultAutoCloseTime:3e3},KI=ce(Xg);var QI=ce(pc);var JI=ce(B(Object.assign(Object.assign({},pc),{decimalLimit:NaN}))),$p=new se("[TUI_OPTION_CONTENT]");var qg=e=>{let n=e.length-1;return[e[n],...e.slice(0,n)]},ex=X(()=>{let e=V(Wg);return V(Gg).pipe(b(qg),b(n=>[...n.slice(e),...n.slice(0,e)]))}),Io=new se("[TUI_SANITIZER]");var Wp=X(()=>{let e=V(qe);return He(pe(e,"selectionchange"),pe(e,"mouseup"),pe(e,"mousedown").pipe(Fe(()=>pe(e,"mousemove").pipe(re(pe(e,"mouseup"))))),pe(e,"keydown"),pe(e,"keyup")).pipe(on())}),tx=ce({decrement:"tuiIconChevronLeft",increment:"tuiIconChevronRight"}),Gp=ce(ds),Yp=ce(io),Zp=ce(Gi.Textfield),Xp=new se("[TUI_TEXTFIELD_HOST]");function qp(e){return{provide:Xp,useExisting:e}}var ix=ce("Taiga"),Is=new se("[TUI_VALUE_ACCESSOR]"),jn=X(()=>{let e=V(zt);return{type:"viewport",getClientRect(){return{top:0,left:0,right:e.innerWidth,bottom:e.innerHeight,width:e.innerWidth,height:e.innerHeight}}}});function Kp(e){return{provide:jn,useExisting:e}}var hi=class extends _i{};function Zi(e){return{provide:hi,multi:!0,useExisting:e}}var Mn=class{};function xs(e){return{provide:Mn,multi:!0,useExisting:e}}var Os=(()=>{class e{constructor(t,i,o){this.destroy$=t,this.drivers=i,this.vehicles=o}ngOnInit(){let t=this.vehicles.find(({type:i})=>i===this.type);He(...this.drivers.filter(({type:i})=>i===this.type)).pipe(oe(),re(this.destroy$)).subscribe(i=>{t==null||t.toggle(i)})}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(hi),a(Mn))},e.\u0275dir=w({type:e}),e})(),Qp=(()=>{class e{constructor(t){this.host=t}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 t;return((t=this.host.value)===null||t===void 0?void 0:t.toString())||""}process(t){}}return e.\u0275fac=function(t){return new(t||e)(a(Ai))},e.\u0275dir=w({type:e}),e})();function xc(e){return(n,t)=>(n==null?void 0:n.find(i=>i!==t&&i.type===e))||t}var kt=class{};function Ss(e,n){return{provide:kt,deps:n?[[new si,new tt,kt],n]:[[new si,new tt,kt]],useFactory:xc(e)}}function Jp(e){return{provide:kt,multi:!0,useExisting:e}}var fi=class{};function Ps(e,n){return{provide:fi,deps:[[new si,new tt,fi],n],useFactory:xc(e)}}var Es=xc;function Dn(e){return{provide:fi,multi:!0,useExisting:e}}var le="primary",Sr=Symbol("RouteTitle"),Ac=class{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let t=this.params[n];return Array.isArray(t)?t[0]:t}return null}getAll(n){if(this.has(n)){let t=this.params[n];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}};function Ao(e){return new Ac(e)}function Kg(e,n,t){let i=t.path.split("/");if(i.length>e.length||t.pathMatch==="full"&&(n.hasChildren()||i.lengthi[r]===o)}else return e===n}function ch(e){return e.length>0?e[e.length-1]:null}function In(e){return Gr(e)?e:Au(e)?wi(Promise.resolve(e)):B(e)}var Jg={exact:uh,subset:dh},lh={exact:ev,subset:tv,ignored:()=>!0};function eh(e,n,t){return Jg[t.paths](e.root,n.root,t.matrixParams)&&lh[t.queryParams](e.queryParams,n.queryParams)&&!(t.fragment==="exact"&&e.fragment!==n.fragment)}function ev(e,n){return Xi(e,n)}function uh(e,n,t){if(!zn(e.segments,n.segments)||!Rs(e.segments,n.segments,t)||e.numberOfChildren!==n.numberOfChildren)return!1;for(let i in n.children)if(!e.children[i]||!uh(e.children[i],n.children[i],t))return!1;return!0}function tv(e,n){return Object.keys(n).length<=Object.keys(e).length&&Object.keys(n).every(t=>ah(e[t],n[t]))}function dh(e,n,t){return ph(e,n,n.segments,t)}function ph(e,n,t,i){if(e.segments.length>t.length){let o=e.segments.slice(0,t.length);return!(!zn(o,t)||n.hasChildren()||!Rs(o,t,i))}else if(e.segments.length===t.length){if(!zn(e.segments,t)||!Rs(e.segments,t,i))return!1;for(let o in n.children)if(!e.children[o]||!dh(e.children[o],n.children[o],i))return!1;return!0}else{let o=t.slice(0,e.segments.length),r=t.slice(e.segments.length);return!zn(e.segments,o)||!Rs(e.segments,o,i)||!e.children[le]?!1:ph(e.children[le],n,r,i)}}function Rs(e,n,t){return n.every((i,o)=>lh[t](e[o].parameters,i.parameters))}var wn=class{constructor(n=new Ue([],{}),t={},i=null){this.root=n,this.queryParams=t,this.fragment=i}get queryParamMap(){return this._queryParamMap??(this._queryParamMap=Ao(this.queryParams)),this._queryParamMap}toString(){return ov.serialize(this)}},Ue=class{constructor(n,t){this.segments=n,this.children=t,this.parent=null,Object.values(t).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Fs(this)}},Un=class{constructor(n,t){this.path=n,this.parameters=t}get parameterMap(){return this._parameterMap??(this._parameterMap=Ao(this.parameters)),this._parameterMap}toString(){return fh(this)}};function iv(e,n){return zn(e,n)&&e.every((t,i)=>Xi(t.parameters,n[i].parameters))}function zn(e,n){return e.length!==n.length?!1:e.every((t,i)=>t.path===n[i].path)}function nv(e,n){let t=[];return Object.entries(e.children).forEach(([i,o])=>{i===le&&(t=t.concat(n(o,i)))}),Object.entries(e.children).forEach(([i,o])=>{i!==le&&(t=t.concat(n(o,i)))}),t}var rl=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:()=>new Tr,providedIn:"root"});let e=n;return e})(),Tr=class{parse(n){let t=new Fc(n);return new wn(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(n){let t=`/${hr(n.root,!0)}`,i=av(n.queryParams),o=typeof n.fragment=="string"?`#${rv(n.fragment)}`:"";return`${t}${i}${o}`}},ov=new Tr;function Fs(e){return e.segments.map(n=>fh(n)).join("/")}function hr(e,n){if(!e.hasChildren())return Fs(e);if(n){let t=e.children[le]?hr(e.children[le],!1):"",i=[];return Object.entries(e.children).forEach(([o,r])=>{o!==le&&i.push(`${o}:${hr(r,!1)}`)}),i.length>0?`${t}(${i.join("//")})`:t}else{let t=nv(e,(i,o)=>o===le?[hr(e.children[le],!1)]:[`${o}:${hr(i,!1)}`]);return Object.keys(e.children).length===1&&e.children[le]!=null?`${Fs(e)}/${t[0]}`:`${Fs(e)}/(${t.join("//")})`}}function hh(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function As(e){return hh(e).replace(/%3B/gi,";")}function rv(e){return encodeURI(e)}function Rc(e){return hh(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Ls(e){return decodeURIComponent(e)}function th(e){return Ls(e.replace(/\+/g,"%20"))}function fh(e){return`${Rc(e.path)}${sv(e.parameters)}`}function sv(e){return Object.entries(e).map(([n,t])=>`;${Rc(n)}=${Rc(t)}`).join("")}function av(e){let n=Object.entries(e).map(([t,i])=>Array.isArray(i)?i.map(o=>`${As(t)}=${As(o)}`).join("&"):`${As(t)}=${As(i)}`).filter(t=>t);return n.length?`?${n.join("&")}`:""}var cv=/^[^\/()?;#]+/;function Oc(e){let n=e.match(cv);return n?n[0]:""}var lv=/^[^\/()?;=#]+/;function uv(e){let n=e.match(lv);return n?n[0]:""}var dv=/^[^=?&#]+/;function pv(e){let n=e.match(dv);return n?n[0]:""}var hv=/^[^&#]+/;function fv(e){let n=e.match(hv);return n?n[0]:""}var Fc=class{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ue([],{}):new Ue([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(t).length>0)&&(i[le]=new Ue(n,t)),i}parseSegment(){let n=Oc(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new Gt(4009,!1);return this.capture(n),new Un(Ls(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let t=uv(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){let o=Oc(this.remaining);o&&(i=o,this.capture(i))}n[Ls(t)]=Ls(i)}parseQueryParam(n){let t=pv(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){let s=fv(this.remaining);s&&(i=s,this.capture(i))}let o=th(t),r=th(i);if(n.hasOwnProperty(o)){let s=n[o];Array.isArray(s)||(s=[s],n[o]=s),s.push(r)}else n[o]=r}parseParens(n){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=Oc(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new Gt(4010,!1);let r;i.indexOf(":")>-1?(r=i.slice(0,i.indexOf(":")),this.capture(r),this.capture(":")):n&&(r=le);let s=this.parseChildren();t[r]=Object.keys(s).length===1?s[le]:new Ue([],s),this.consumeOptional("//")}return t}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new Gt(4011,!1)}};function mh(e){return e.segments.length>0?new Ue([],{[le]:e}):e}function gh(e){let n={};for(let[i,o]of Object.entries(e.children)){let r=gh(o);if(i===le&&r.segments.length===0&&r.hasChildren())for(let[s,c]of Object.entries(r.children))n[s]=c;else(r.segments.length>0||r.hasChildren())&&(n[i]=r)}let t=new Ue(e.segments,n);return mv(t)}function mv(e){if(e.numberOfChildren===1&&e.children[le]){let n=e.children[le];return new Ue(e.segments.concat(n.segments),n.children)}return e}function Cr(e){return e instanceof wn}function gv(e,n,t=null,i=null){let o=vh(e);return _h(o,n,t,i)}function vh(e){let n;function t(r){let s={};for(let d of r.children){let p=t(d);s[d.outlet]=p}let c=new Ue(r.url,s);return r===e&&(n=c),c}let i=t(e.root),o=mh(i);return n??o}function _h(e,n,t,i){let o=e;for(;o.parent;)o=o.parent;if(n.length===0)return Sc(o,o,o,t,i);let r=vv(n);if(r.toRoot())return Sc(o,o,new Ue([],{}),t,i);let s=_v(r,o,e),c=s.processChildren?gr(s.segmentGroup,s.index,r.commands):Ch(s.segmentGroup,s.index,r.commands);return Sc(o,s.segmentGroup,c,t,i)}function Hs(e){return typeof e=="object"&&e!=null&&!e.outlets&&!e.segmentPath}function yr(e){return typeof e=="object"&&e!=null&&e.outlets}function Sc(e,n,t,i,o){let r={};i&&Object.entries(i).forEach(([d,p])=>{r[d]=Array.isArray(p)?p.map(_=>`${_}`):`${p}`});let s;e===n?s=t:s=Th(e,n,t);let c=mh(gh(s));return new wn(c,r,o)}function Th(e,n,t){let i={};return Object.entries(e.children).forEach(([o,r])=>{r===n?i[o]=t:i[o]=Th(r,n,t)}),new Ue(e.segments,i)}var Ns=class{constructor(n,t,i){if(this.isAbsolute=n,this.numberOfDoubleDots=t,this.commands=i,n&&i.length>0&&Hs(i[0]))throw new Gt(4003,!1);let o=i.find(yr);if(o&&o!==ch(i))throw new Gt(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function vv(e){if(typeof e[0]=="string"&&e.length===1&&e[0]==="/")return new Ns(!0,0,e);let n=0,t=!1,i=e.reduce((o,r,s)=>{if(typeof r=="object"&&r!=null){if(r.outlets){let c={};return Object.entries(r.outlets).forEach(([d,p])=>{c[d]=typeof p=="string"?p.split("/"):p}),[...o,{outlets:c}]}if(r.segmentPath)return[...o,r.segmentPath]}return typeof r!="string"?[...o,r]:s===0?(r.split("/").forEach((c,d)=>{d==0&&c==="."||(d==0&&c===""?t=!0:c===".."?n++:c!=""&&o.push(c))}),o):[...o,r]},[]);return new Ns(t,n,i)}var So=class{constructor(n,t,i){this.segmentGroup=n,this.processChildren=t,this.index=i}};function _v(e,n,t){if(e.isAbsolute)return new So(n,!0,0);if(!t)return new So(n,!1,NaN);if(t.parent===null)return new So(t,!0,0);let i=Hs(e.commands[0])?0:1,o=t.segments.length-1+i;return Tv(t,o,e.numberOfDoubleDots)}function Tv(e,n,t){let i=e,o=n,r=t;for(;r>o;){if(r-=o,i=i.parent,!i)throw new Gt(4005,!1);o=i.segments.length}return new So(i,!1,o-r)}function Cv(e){return yr(e[0])?e[0].outlets:{[le]:e}}function Ch(e,n,t){if(e??(e=new Ue([],{})),e.segments.length===0&&e.hasChildren())return gr(e,n,t);let i=yv(e,n,t),o=t.slice(i.commandIndex);if(i.match&&i.pathIndexr!==le)&&e.children[le]&&e.numberOfChildren===1&&e.children[le].segments.length===0){let r=gr(e.children[le],n,t);return new Ue(e.segments,r.children)}return Object.entries(i).forEach(([r,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(o[r]=Ch(e.children[r],n,s))}),Object.entries(e.children).forEach(([r,s])=>{i[r]===void 0&&(o[r]=s)}),new Ue(e.segments,o)}}function yv(e,n,t){let i=0,o=n,r={match:!1,pathIndex:0,commandIndex:0};for(;o=t.length)return r;let s=e.segments[o],c=t[i];if(yr(c))break;let d=`${c}`,p=i0&&d===void 0)break;if(d&&p&&typeof p=="object"&&p.outlets===void 0){if(!nh(d,p,s))return r;i+=2}else{if(!nh(d,{},s))return r;i++}o++}return{match:!0,pathIndex:o,commandIndex:i}}function Lc(e,n,t){let i=e.segments.slice(0,n),o=0;for(;o{typeof i=="string"&&(i=[i]),i!==null&&(n[t]=Lc(new Ue([],{}),0,i))}),n}function ih(e){let n={};return Object.entries(e).forEach(([t,i])=>n[t]=`${i}`),n}function nh(e,n,t){return e==t.path&&Xi(n,t.parameters)}var vr="imperative",Rt=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(Rt||{}),bi=class{constructor(n,t){this.id=n,this.url=t}},br=class extends bi{constructor(n,t,i="imperative",o=null){super(n,t),this.type=Rt.NavigationStart,this.navigationTrigger=i,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Bn=class extends bi{constructor(n,t,i){super(n,t),this.urlAfterRedirects=i,this.type=Rt.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},gi=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(gi||{}),Hc=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(Hc||{}),un=class extends bi{constructor(n,t,i,o){super(n,t),this.reason=i,this.code=o,this.type=Rt.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Vn=class extends bi{constructor(n,t,i,o){super(n,t),this.reason=i,this.code=o,this.type=Rt.NavigationSkipped}},Mr=class extends bi{constructor(n,t,i,o){super(n,t),this.error=i,this.target=o,this.type=Rt.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},js=class extends bi{constructor(n,t,i,o){super(n,t),this.urlAfterRedirects=i,this.state=o,this.type=Rt.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Nc=class extends bi{constructor(n,t,i,o){super(n,t),this.urlAfterRedirects=i,this.state=o,this.type=Rt.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},jc=class extends bi{constructor(n,t,i,o,r){super(n,t),this.urlAfterRedirects=i,this.state=o,this.shouldActivate=r,this.type=Rt.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Uc=class extends bi{constructor(n,t,i,o){super(n,t),this.urlAfterRedirects=i,this.state=o,this.type=Rt.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},zc=class extends bi{constructor(n,t,i,o){super(n,t),this.urlAfterRedirects=i,this.state=o,this.type=Rt.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Bc=class{constructor(n){this.route=n,this.type=Rt.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Vc=class{constructor(n){this.route=n,this.type=Rt.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},$c=class{constructor(n){this.snapshot=n,this.type=Rt.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Wc=class{constructor(n){this.snapshot=n,this.type=Rt.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Gc=class{constructor(n){this.snapshot=n,this.type=Rt.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Yc=class{constructor(n){this.snapshot=n,this.type=Rt.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Dr=class{},ko=class{constructor(n,t){this.url=n,this.navigationBehaviorOptions=t}};var Zc=class{constructor(n){this.injector=n,this.outlet=null,this.route=null,this.children=new Gs(this.injector),this.attachRef=null}},Gs=(()=>{let n=class n{constructor(i){this.parentInjector=i,this.contexts=new Map}onChildOutletCreated(i,o){let r=this.getOrCreateContext(i);r.outlet=o,this.contexts.set(i,r)}onChildOutletDestroyed(i){let o=this.getContext(i);o&&(o.outlet=null,o.attachRef=null)}onOutletDeactivated(){let i=this.contexts;return this.contexts=new Map,i}onOutletReAttached(i){this.contexts=i}getOrCreateContext(i){let o=this.getContext(i);return o||(o=new Zc(this.parentInjector),this.contexts.set(i,o)),o}getContext(i){return this.contexts.get(i)||null}};n.\u0275fac=function(o){return new(o||n)(ye(Xr))},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),Us=class{constructor(n){this._root=n}get root(){return this._root.value}parent(n){let t=this.pathFromRoot(n);return t.length>1?t[t.length-2]:null}children(n){let t=Xc(n,this._root);return t?t.children.map(i=>i.value):[]}firstChild(n){let t=Xc(n,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(n){let t=qc(n,this._root);return t.length<2?[]:t[t.length-2].children.map(o=>o.value).filter(o=>o!==n)}pathFromRoot(n){return qc(n,this._root).map(t=>t.value)}};function Xc(e,n){if(e===n.value)return n;for(let t of n.children){let i=Xc(e,t);if(i)return i}return null}function qc(e,n){if(e===n.value)return[n];for(let t of n.children){let i=qc(e,t);if(i.length)return i.unshift(n),i}return[]}var mi=class{constructor(n,t){this.value=n,this.children=t}toString(){return`TreeNode(${this.value})`}};function Oo(e){let n={};return e&&e.children.forEach(t=>n[t.value.outlet]=t),n}var zs=class extends Us{constructor(n,t){super(n),this.snapshot=t,sl(this,n)}toString(){return this.snapshot.toString()}};function yh(e){let n=Mv(e),t=new Ke([new Un("",{})]),i=new Ke({}),o=new Ke({}),r=new Ke({}),s=new Ke(""),c=new Ro(t,i,r,s,o,le,e,n.root);return c.snapshot=n.root,new zs(new mi(c,[]),n)}function Mv(e){let n={},t={},i={},o="",r=new Po([],n,i,o,t,le,e,null,{});return new Vs("",new mi(r,[]))}var Ro=class{constructor(n,t,i,o,r,s,c,d){var p;this.urlSubject=n,this.paramsSubject=t,this.queryParamsSubject=i,this.fragmentSubject=o,this.dataSubject=r,this.outlet=s,this.component=c,this._futureSnapshot=d,this.title=((p=this.dataSubject)==null?void 0:p.pipe(b(_=>_[Sr])))??B(void 0),this.url=n,this.params=t,this.queryParams=i,this.fragment=o,this.data=r}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(b(n=>Ao(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap??(this._queryParamMap=this.queryParams.pipe(b(n=>Ao(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Bs(e,n,t="emptyOnly"){var r;let i,{routeConfig:o}=e;return n!==null&&(t==="always"||(o==null?void 0:o.path)===""||!n.component&&!((r=n.routeConfig)!=null&&r.loadComponent))?i={params:te(te({},n.params),e.params),data:te(te({},n.data),e.data),resolve:te(te(te(te({},e.data),n.data),o==null?void 0:o.data),e._resolvedData)}:i={params:te({},e.params),data:te({},e.data),resolve:te(te({},e.data),e._resolvedData??{})},o&&Mh(o)&&(i.resolve[Sr]=o.title),i}var Po=class{get title(){var n;return(n=this.data)==null?void 0:n[Sr]}constructor(n,t,i,o,r,s,c,d,p){this.url=n,this.params=t,this.queryParams=i,this.fragment=o,this.data=r,this.outlet=s,this.component=c,this.routeConfig=d,this._resolve=p}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=Ao(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap??(this._queryParamMap=Ao(this.queryParams)),this._queryParamMap}toString(){let n=this.url.map(i=>i.toString()).join("/"),t=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${t}')`}},Vs=class extends Us{constructor(n,t){super(t),this.url=n,sl(this,t)}toString(){return bh(this._root)}};function sl(e,n){n.value._routerState=e,n.children.forEach(t=>sl(e,t))}function bh(e){let n=e.children.length>0?` { ${e.children.map(bh).join(", ")} } `:"";return`${e.value}${n}`}function Pc(e){if(e.snapshot){let n=e.snapshot,t=e._futureSnapshot;e.snapshot=t,Xi(n.queryParams,t.queryParams)||e.queryParamsSubject.next(t.queryParams),n.fragment!==t.fragment&&e.fragmentSubject.next(t.fragment),Xi(n.params,t.params)||e.paramsSubject.next(t.params),Qg(n.url,t.url)||e.urlSubject.next(t.url),Xi(n.data,t.data)||e.dataSubject.next(t.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function Kc(e,n){let t=Xi(e.params,n.params)&&iv(e.url,n.url),i=!e.parent!=!n.parent;return t&&!i&&(!e.parent||Kc(e.parent,n.parent))}function Mh(e){return typeof e.title=="string"||e.title===null}var Dv=(()=>{let n=class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=le,this.activateEvents=new Pe,this.deactivateEvents=new Pe,this.attachEvents=new Pe,this.detachEvents=new Pe,this.parentContexts=V(Gs),this.location=V(Ci),this.changeDetector=V(ft),this.inputBinder=V(al,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(i){if(i.name){let{firstChange:o,previousValue:r}=i.name;if(o)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){var i;this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),(i=this.inputBinder)==null||i.unsubscribeFromRouteData(this)}isTrackedInParentContexts(i){var o;return((o=this.parentContexts.getContext(i))==null?void 0:o.outlet)===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let i=this.parentContexts.getContext(this.name);i!=null&&i.route&&(i.attachRef?this.attach(i.attachRef,i.route):this.activateWith(i.route,i.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Gt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Gt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Gt(4012,!1);this.location.detach();let i=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(i.instance),i}attach(i,o){var r;this.activated=i,this._activatedRoute=o,this.location.insert(i.hostView),(r=this.inputBinder)==null||r.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(i.instance)}deactivate(){if(this.activated){let i=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(i)}}activateWith(i,o){var _;if(this.isActivated)throw new Gt(4013,!1);this._activatedRoute=i;let r=this.location,c=i.snapshot.component,d=this.parentContexts.getOrCreateContext(this.name).children,p=new Qc(i,d,r.injector);this.activated=r.createComponent(c,{index:r.length,injector:p,environmentInjector:o}),this.changeDetector.markForCheck(),(_=this.inputBinder)==null||_.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275dir=w({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[qt]});let e=n;return e})(),Qc=class e{__ngOutletInjector(n){return new e(this.route,this.childContexts,n)}constructor(n,t,i){this.route=n,this.childContexts=t,this.parent=i}get(n,t){return n===Ro?this.route:n===Gs?this.childContexts:this.parent.get(n,t)}},al=new se("");function wv(e,n,t){let i=wr(e,n._root,t?t._root:void 0);return new zs(i,n)}function wr(e,n,t){if(t&&e.shouldReuseRoute(n.value,t.value.snapshot)){let i=t.value;i._futureSnapshot=n.value;let o=Iv(e,n,t);return new mi(i,o)}else{if(e.shouldAttach(n.value)){let r=e.retrieve(n.value);if(r!==null){let s=r.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(c=>wr(e,c)),s}}let i=xv(n.value),o=n.children.map(r=>wr(e,r));return new mi(i,o)}}function Iv(e,n,t){return n.children.map(i=>{for(let o of t.children)if(e.shouldReuseRoute(i.value,o.value.snapshot))return wr(e,i,o);return wr(e,i)})}function xv(e){return new Ro(new Ke(e.url),new Ke(e.params),new Ke(e.queryParams),new Ke(e.fragment),new Ke(e.data),e.outlet,e.component,e)}var Ir=class{constructor(n,t){this.redirectTo=n,this.navigationBehaviorOptions=t}},Dh="ngNavigationCancelingError";function $s(e,n){let{redirectTo:t,navigationBehaviorOptions:i}=Cr(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,o=wh(!1,gi.Redirect);return o.url=t,o.navigationBehaviorOptions=i,o}function wh(e,n){let t=new Error(`NavigationCancelingError: ${e||""}`);return t[Dh]=!0,t.cancellationCode=n,t}function Ov(e){return Ih(e)&&Cr(e.url)}function Ih(e){return!!e&&e[Dh]}var Sv=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=k({type:n,selectors:[["ng-component"]],standalone:!0,features:[Ou],decls:1,vars:0,template:function(o,r){o&1&&S(0,"router-outlet")},dependencies:[Dv],encapsulation:2});let e=n;return e})();function Pv(e,n){return e.providers&&!e._injector&&(e._injector=wu(e.providers,n,`Route: ${e.path}`)),e._injector??n}function cl(e){let n=e.children&&e.children.map(cl),t=n?oi(te({},e),{children:n}):te({},e);return!t.component&&!t.loadComponent&&(n||t.loadChildren)&&t.outlet&&t.outlet!==le&&(t.component=Sv),t}function Ri(e){return e.outlet||le}function Ev(e,n){let t=e.filter(i=>Ri(i)===n);return t.push(...e.filter(i=>Ri(i)!==n)),t}function Pr(e){var n;if(!e)return null;if((n=e.routeConfig)!=null&&n._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){let i=t.routeConfig;if(i!=null&&i._loadedInjector)return i._loadedInjector;if(i!=null&&i._injector)return i._injector}return null}var Av=(e,n,t,i)=>b(o=>(new Jc(n,o.targetRouterState,o.currentRouterState,t,i).activate(e),o)),Jc=class{constructor(n,t,i,o,r){this.routeReuseStrategy=n,this.futureState=t,this.currState=i,this.forwardEvent=o,this.inputBindingEnabled=r}activate(n){let t=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,i,n),Pc(this.futureState.root),this.activateChildRoutes(t,i,n)}deactivateChildRoutes(n,t,i){let o=Oo(t);n.children.forEach(r=>{let s=r.value.outlet;this.deactivateRoutes(r,o[s],i),delete o[s]}),Object.values(o).forEach(r=>{this.deactivateRouteAndItsChildren(r,i)})}deactivateRoutes(n,t,i){let o=n.value,r=t?t.value:null;if(o===r)if(o.component){let s=i.getContext(o.outlet);s&&this.deactivateChildRoutes(n,t,s.children)}else this.deactivateChildRoutes(n,t,i);else r&&this.deactivateRouteAndItsChildren(t,i)}deactivateRouteAndItsChildren(n,t){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,t):this.deactivateRouteAndOutlet(n,t)}detachAndStoreRouteSubtree(n,t){let i=t.getContext(n.value.outlet),o=i&&n.value.component?i.children:t,r=Oo(n);for(let s of Object.values(r))this.deactivateRouteAndItsChildren(s,o);if(i&&i.outlet){let s=i.outlet.detach(),c=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:c})}}deactivateRouteAndOutlet(n,t){let i=t.getContext(n.value.outlet),o=i&&n.value.component?i.children:t,r=Oo(n);for(let s of Object.values(r))this.deactivateRouteAndItsChildren(s,o);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(n,t,i){let o=Oo(t);n.children.forEach(r=>{this.activateRoutes(r,o[r.value.outlet],i),this.forwardEvent(new Yc(r.value.snapshot))}),n.children.length&&this.forwardEvent(new Wc(n.value.snapshot))}activateRoutes(n,t,i){let o=n.value,r=t?t.value:null;if(Pc(o),o===r)if(o.component){let s=i.getOrCreateContext(o.outlet);this.activateChildRoutes(n,t,s.children)}else this.activateChildRoutes(n,t,i);else if(o.component){let s=i.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let c=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),s.children.onOutletReAttached(c.contexts),s.attachRef=c.componentRef,s.route=c.route.value,s.outlet&&s.outlet.attach(c.componentRef,c.route.value),Pc(c.route.value),this.activateChildRoutes(n,null,s.children)}else{let c=Pr(o.snapshot);s.attachRef=null,s.route=o,s.injector=c??s.injector,s.outlet&&s.outlet.activateWith(o,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}},Ws=class{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},Eo=class{constructor(n,t){this.component=n,this.route=t}};function kv(e,n,t){let i=e._root,o=n?n._root:null;return fr(i,o,t,[i.value])}function Rv(e){let n=e.routeConfig?e.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:e,guards:n}}function Lo(e,n){let t=Symbol(),i=n.get(e,t);return i===t?typeof e=="function"&&!Cu(e)?e:n.get(e):i}function fr(e,n,t,i,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=Oo(n);return e.children.forEach(s=>{Fv(s,r[s.value.outlet],t,i.concat([s.value]),o),delete r[s.value.outlet]}),Object.entries(r).forEach(([s,c])=>_r(c,t.getContext(s),o)),o}function Fv(e,n,t,i,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=e.value,s=n?n.value:null,c=t?t.getContext(e.value.outlet):null;if(s&&r.routeConfig===s.routeConfig){let d=Lv(s,r,r.routeConfig.runGuardsAndResolvers);d?o.canActivateChecks.push(new Ws(i)):(r.data=s.data,r._resolvedData=s._resolvedData),r.component?fr(e,n,c?c.children:null,i,o):fr(e,n,t,i,o),d&&c&&c.outlet&&c.outlet.isActivated&&o.canDeactivateChecks.push(new Eo(c.outlet.component,s))}else s&&_r(n,c,o),o.canActivateChecks.push(new Ws(i)),r.component?fr(e,null,c?c.children:null,i,o):fr(e,null,t,i,o);return o}function Lv(e,n,t){if(typeof t=="function")return t(e,n);switch(t){case"pathParamsChange":return!zn(e.url,n.url);case"pathParamsOrQueryParamsChange":return!zn(e.url,n.url)||!Xi(e.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Kc(e,n)||!Xi(e.queryParams,n.queryParams);case"paramsChange":default:return!Kc(e,n)}}function _r(e,n,t){let i=Oo(e),o=e.value;Object.entries(i).forEach(([r,s])=>{o.component?n?_r(s,n.children.getContext(r),t):_r(s,null,t):_r(s,n,t)}),o.component?n&&n.outlet&&n.outlet.isActivated?t.canDeactivateChecks.push(new Eo(n.outlet.component,o)):t.canDeactivateChecks.push(new Eo(null,o)):t.canDeactivateChecks.push(new Eo(null,o))}function Er(e){return typeof e=="function"}function Hv(e){return typeof e=="boolean"}function Nv(e){return e&&Er(e.canLoad)}function jv(e){return e&&Er(e.canActivate)}function Uv(e){return e&&Er(e.canActivateChild)}function zv(e){return e&&Er(e.canDeactivate)}function Bv(e){return e&&Er(e.canMatch)}function xh(e){return e instanceof du||(e==null?void 0:e.name)==="EmptyError"}var ks=Symbol("INITIAL_VALUE");function Fo(){return Fe(e=>wt(e.map(n=>n.pipe(Wt(1),it(ks)))).pipe(b(n=>{for(let t of n)if(t!==!0){if(t===ks)return ks;if(t===!1||Vv(t))return t}return!0}),et(n=>n!==ks),Wt(1)))}function Vv(e){return Cr(e)||e instanceof Ir}function $v(e,n){return Ti(t=>{let{targetSnapshot:i,currentSnapshot:o,guards:{canActivateChecks:r,canDeactivateChecks:s}}=t;return s.length===0&&r.length===0?B(oi(te({},t),{guardsResult:!0})):Wv(s,i,o,e).pipe(Ti(c=>c&&Hv(c)?Gv(i,r,e,n):B(c)),b(c=>oi(te({},t),{guardsResult:c})))})}function Wv(e,n,t,i){return wi(e).pipe(Ti(o=>Kv(o.component,o.route,t,n,i)),pn(o=>o!==!0,!0))}function Gv(e,n,t,i){return wi(n).pipe(tr(o=>Yr(Zv(o.route.parent,i),Yv(o.route,i),qv(e,o.path,t),Xv(e,o.route,t))),pn(o=>o!==!0,!0))}function Yv(e,n){return e!==null&&n&&n(new Gc(e)),B(!0)}function Zv(e,n){return e!==null&&n&&n(new $c(e)),B(!0)}function Xv(e,n,t){let i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||i.length===0)return B(!0);let o=i.map(r=>Jo(()=>{let s=Pr(n)??t,c=Lo(r,s),d=jv(c)?c.canActivate(n,e):sn(s,()=>c(n,e));return In(d).pipe(pn())}));return B(o).pipe(Fo())}function qv(e,n,t){let i=n[n.length-1],r=n.slice(0,n.length-1).reverse().map(s=>Rv(s)).filter(s=>s!==null).map(s=>Jo(()=>{let c=s.guards.map(d=>{let p=Pr(s.node)??t,_=Lo(d,p),y=Uv(_)?_.canActivateChild(i,e):sn(p,()=>_(i,e));return In(y).pipe(pn())});return B(c).pipe(Fo())}));return B(r).pipe(Fo())}function Kv(e,n,t,i,o){let r=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!r||r.length===0)return B(!0);let s=r.map(c=>{let d=Pr(n)??o,p=Lo(c,d),_=zv(p)?p.canDeactivate(e,n,t,i):sn(d,()=>p(e,n,t,i));return In(_).pipe(pn())});return B(s).pipe(Fo())}function Qv(e,n,t,i){let o=n.canLoad;if(o===void 0||o.length===0)return B(!0);let r=o.map(s=>{let c=Lo(s,e),d=Nv(c)?c.canLoad(n,t):sn(e,()=>c(n,t));return In(d)});return B(r).pipe(Fo(),Oh(i))}function Oh(e){return uu(st(n=>{if(typeof n!="boolean")throw $s(e,n)}),b(n=>n===!0))}function Jv(e,n,t,i){let o=n.canMatch;if(!o||o.length===0)return B(!0);let r=o.map(s=>{let c=Lo(s,e),d=Bv(c)?c.canMatch(n,t):sn(e,()=>c(n,t));return In(d)});return B(r).pipe(Fo(),Oh(i))}var xr=class{constructor(n){this.segmentGroup=n||null}},Or=class extends Error{constructor(n){super(),this.urlTree=n}};function xo(e){return Qo(new xr(e))}function e_(e){return Qo(new Gt(4e3,!1))}function t_(e){return Qo(wh(!1,gi.GuardRejected))}var el=class{constructor(n,t){this.urlSerializer=n,this.urlTree=t}lineralizeSegments(n,t){let i=[],o=t.root;for(;;){if(i=i.concat(o.segments),o.numberOfChildren===0)return B(i);if(o.numberOfChildren>1||!o.children[le])return e_(`${n.redirectTo}`);o=o.children[le]}}applyRedirectCommands(n,t,i,o,r){if(typeof t!="string"){let c=t,{queryParams:d,fragment:p,routeConfig:_,url:y,outlet:O,params:L,data:Z,title:ue}=o,Ge=sn(r,()=>c({params:L,data:Z,queryParams:d,fragment:p,routeConfig:_,url:y,outlet:O,title:ue}));if(Ge instanceof wn)throw new Or(Ge);t=Ge}let s=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),n,i);if(t[0]==="/")throw new Or(s);return s}applyRedirectCreateUrlTree(n,t,i,o){let r=this.createSegmentGroup(n,t.root,i,o);return new wn(r,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(n,t){let i={};return Object.entries(n).forEach(([o,r])=>{if(typeof r=="string"&&r[0]===":"){let c=r.substring(1);i[o]=t[c]}else i[o]=r}),i}createSegmentGroup(n,t,i,o){let r=this.createSegments(n,t.segments,i,o),s={};return Object.entries(t.children).forEach(([c,d])=>{s[c]=this.createSegmentGroup(n,d,i,o)}),new Ue(r,s)}createSegments(n,t,i,o){return t.map(r=>r.path[0]===":"?this.findPosParam(n,r,o):this.findOrReturn(r,i))}findPosParam(n,t,i){let o=i[t.path.substring(1)];if(!o)throw new Gt(4001,!1);return o}findOrReturn(n,t){let i=0;for(let o of t){if(o.path===n.path)return t.splice(i),o;i++}return n}},tl={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function i_(e,n,t,i,o){let r=ll(e,n,t);return r.matched?(i=Pv(n,i),Jv(i,n,t,o).pipe(b(s=>s===!0?r:te({},tl)))):B(r)}function ll(e,n,t){if(n.path==="**")return n_(t);if(n.path==="")return n.pathMatch==="full"&&(e.hasChildren()||t.length>0)?te({},tl):{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};let o=(n.matcher||Kg)(t,e,n);if(!o)return te({},tl);let r={};Object.entries(o.posParams??{}).forEach(([c,d])=>{r[c]=d.path});let s=o.consumed.length>0?te(te({},r),o.consumed[o.consumed.length-1].parameters):r;return{matched:!0,consumedSegments:o.consumed,remainingSegments:t.slice(o.consumed.length),parameters:s,positionalParamSegments:o.posParams??{}}}function n_(e){return{matched:!0,parameters:e.length>0?ch(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}function oh(e,n,t,i){return t.length>0&&s_(e,t,i)?{segmentGroup:new Ue(n,r_(i,new Ue(t,e.children))),slicedSegments:[]}:t.length===0&&a_(e,t,i)?{segmentGroup:new Ue(e.segments,o_(e,t,i,e.children)),slicedSegments:t}:{segmentGroup:new Ue(e.segments,e.children),slicedSegments:t}}function o_(e,n,t,i){let o={};for(let r of t)if(Ys(e,n,r)&&!i[Ri(r)]){let s=new Ue([],{});o[Ri(r)]=s}return te(te({},i),o)}function r_(e,n){let t={};t[le]=n;for(let i of e)if(i.path===""&&Ri(i)!==le){let o=new Ue([],{});t[Ri(i)]=o}return t}function s_(e,n,t){return t.some(i=>Ys(e,n,i)&&Ri(i)!==le)}function a_(e,n,t){return t.some(i=>Ys(e,n,i))}function Ys(e,n,t){return(e.hasChildren()||n.length>0)&&t.pathMatch==="full"?!1:t.path===""}function c_(e,n,t,i){return Ri(e)!==i&&(i===le||!Ys(n,t,e))?!1:ll(n,e,t).matched}function l_(e,n,t){return n.length===0&&!e.children[t]}var il=class{};function u_(e,n,t,i,o,r,s="emptyOnly"){return new nl(e,n,t,i,o,s,r).recognize()}var d_=31,nl=class{constructor(n,t,i,o,r,s,c){this.injector=n,this.configLoader=t,this.rootComponentType=i,this.config=o,this.urlTree=r,this.paramsInheritanceStrategy=s,this.urlSerializer=c,this.applyRedirects=new el(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(n){return new Gt(4002,`'${n.segmentGroup}'`)}recognize(){let n=oh(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(b(({children:t,rootSnapshot:i})=>{let o=new mi(i,t),r=new Vs("",o),s=gv(i,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,r.url=this.urlSerializer.serialize(s),{state:r,tree:s}}))}match(n){let t=new Po([],Object.freeze({}),Object.freeze(te({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),le,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,le,t).pipe(b(i=>({children:i,rootSnapshot:t})),dn(i=>{if(i instanceof Or)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof xr?this.noMatchError(i):i}))}processSegmentGroup(n,t,i,o,r){return i.segments.length===0&&i.hasChildren()?this.processChildren(n,t,i,r):this.processSegment(n,t,i,i.segments,o,!0,r).pipe(b(s=>s instanceof mi?[s]:[]))}processChildren(n,t,i,o){let r=[];for(let s of Object.keys(i.children))s==="primary"?r.unshift(s):r.push(s);return wi(r).pipe(tr(s=>{let c=i.children[s],d=Ev(t,s);return this.processSegmentGroup(n,d,c,s,o)}),vu((s,c)=>(s.push(...c),s)),Ha(null),gu(),Ti(s=>{if(s===null)return xo(i);let c=Sh(s);return p_(c),B(c)}))}processSegment(n,t,i,o,r,s,c){return wi(t).pipe(tr(d=>this.processSegmentAgainstRoute(d._injector??n,t,d,i,o,r,s,c).pipe(dn(p=>{if(p instanceof xr)return B(null);throw p}))),pn(d=>!!d),dn(d=>{if(xh(d))return l_(i,o,r)?B(new il):xo(i);throw d}))}processSegmentAgainstRoute(n,t,i,o,r,s,c,d){return c_(i,o,r,s)?i.redirectTo===void 0?this.matchSegmentAgainstRoute(n,o,i,r,s,d):this.allowRedirects&&c?this.expandSegmentAgainstRouteUsingRedirect(n,o,t,i,r,s,d):xo(o):xo(o)}expandSegmentAgainstRouteUsingRedirect(n,t,i,o,r,s,c){let{matched:d,parameters:p,consumedSegments:_,positionalParamSegments:y,remainingSegments:O}=ll(t,o,r);if(!d)return xo(t);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>d_&&(this.allowRedirects=!1));let L=new Po(r,p,Object.freeze(te({},this.urlTree.queryParams)),this.urlTree.fragment,rh(o),Ri(o),o.component??o._loadedComponent??null,o,sh(o)),Z=Bs(L,c,this.paramsInheritanceStrategy);L.params=Object.freeze(Z.params),L.data=Object.freeze(Z.data);let ue=this.applyRedirects.applyRedirectCommands(_,o.redirectTo,y,L,n);return this.applyRedirects.lineralizeSegments(o,ue).pipe(Ti(Ge=>this.processSegment(n,i,t,Ge.concat(O),s,!1,c)))}matchSegmentAgainstRoute(n,t,i,o,r,s){let c=i_(t,i,o,n,this.urlSerializer);return i.path==="**"&&(t.children={}),c.pipe(Fe(d=>d.matched?(n=i._injector??n,this.getChildConfig(n,i,o).pipe(Fe(({routes:p})=>{let _=i._loadedInjector??n,{parameters:y,consumedSegments:O,remainingSegments:L}=d,Z=new Po(O,y,Object.freeze(te({},this.urlTree.queryParams)),this.urlTree.fragment,rh(i),Ri(i),i.component??i._loadedComponent??null,i,sh(i)),ue=Bs(Z,s,this.paramsInheritanceStrategy);Z.params=Object.freeze(ue.params),Z.data=Object.freeze(ue.data);let{segmentGroup:Ge,slicedSegments:Tt}=oh(t,O,L,p);if(Tt.length===0&&Ge.hasChildren())return this.processChildren(_,p,Ge,Z).pipe(b(ut=>new mi(Z,ut)));if(p.length===0&&Tt.length===0)return B(new mi(Z,[]));let Ji=Ri(i)===r;return this.processSegment(_,p,Ge,Tt,Ji?le:r,!0,Z).pipe(b(ut=>new mi(Z,ut instanceof mi?[ut]:[])))}))):xo(t)))}getChildConfig(n,t,i){return t.children?B({routes:t.children,injector:n}):t.loadChildren?t._loadedRoutes!==void 0?B({routes:t._loadedRoutes,injector:t._loadedInjector}):Qv(n,t,i,this.urlSerializer).pipe(Ti(o=>o?this.configLoader.loadChildren(n,t).pipe(st(r=>{t._loadedRoutes=r.routes,t._loadedInjector=r.injector})):t_(t))):B({routes:[],injector:n})}};function p_(e){e.sort((n,t)=>n.value.outlet===le?-1:t.value.outlet===le?1:n.value.outlet.localeCompare(t.value.outlet))}function h_(e){let n=e.value.routeConfig;return n&&n.path===""}function Sh(e){let n=[],t=new Set;for(let i of e){if(!h_(i)){n.push(i);continue}let o=n.find(r=>i.value.routeConfig===r.value.routeConfig);o!==void 0?(o.children.push(...i.children),t.add(o)):n.push(i)}for(let i of t){let o=Sh(i.children);n.push(new mi(i.value,o))}return n.filter(i=>!t.has(i))}function rh(e){return e.data||{}}function sh(e){return e.resolve||{}}function f_(e,n,t,i,o,r){return Ti(s=>u_(e,n,t,i,s.extractedUrl,o,r).pipe(b(({state:c,tree:d})=>oi(te({},s),{targetSnapshot:c,urlAfterRedirects:d}))))}function m_(e,n){return Ti(t=>{let{targetSnapshot:i,guards:{canActivateChecks:o}}=t;if(!o.length)return B(t);let r=new Set(o.map(d=>d.route)),s=new Set;for(let d of r)if(!s.has(d))for(let p of Ph(d))s.add(p);let c=0;return wi(s).pipe(tr(d=>r.has(d)?g_(d,i,e,n):(d.data=Bs(d,d.parent,e).resolve,B(void 0))),st(()=>c++),Na(1),Ti(d=>c===s.size?B(t):Dt))})}function Ph(e){let n=e.children.map(t=>Ph(t)).flat();return[e,...n]}function g_(e,n,t,i){let o=e.routeConfig,r=e._resolve;return(o==null?void 0:o.title)!==void 0&&!Mh(o)&&(r[Sr]=o.title),v_(r,e,n,i).pipe(b(s=>(e._resolvedData=s,e.data=Bs(e,e.parent,t).resolve,null)))}function v_(e,n,t,i){let o=kc(e);if(o.length===0)return B({});let r={};return wi(o).pipe(Ti(s=>__(e[s],n,t,i).pipe(pn(),st(c=>{if(c instanceof Ir)throw $s(new Tr,c);r[s]=c}))),Na(1),mu(r),dn(s=>xh(s)?Dt:Qo(s)))}function __(e,n,t,i){let o=Pr(n)??i,r=Lo(e,o),s=r.resolve?r.resolve(n,t):sn(o,()=>r(n,t));return In(s)}function Ec(e){return Fe(n=>{let t=e(n);return t?wi(t).pipe(b(()=>n)):B(n)})}var Eh=(()=>{let n=class n{buildTitle(i){let o,r=i.root;for(;r!==void 0;)o=this.getResolvedTitleForRoute(r)??o,r=r.children.find(s=>s.outlet===le);return o}getResolvedTitleForRoute(i){return i.data[Sr]}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:()=>V(T_),providedIn:"root"});let e=n;return e})(),T_=(()=>{let n=class n extends Eh{constructor(i){super(),this.title=i}updateTitle(i){let o=this.buildTitle(i);o!==void 0&&this.title.setTitle(o)}};n.\u0275fac=function(o){return new(o||n)(ye(Bu))},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),ul=new se("",{providedIn:"root",factory:()=>({})}),dl=new se(""),C_=(()=>{let n=class n{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=V(Va)}loadComponent(i){if(this.componentLoaders.get(i))return this.componentLoaders.get(i);if(i._loadedComponent)return B(i._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(i);let o=In(i.loadComponent()).pipe(b(Ah),st(s=>{this.onLoadEndListener&&this.onLoadEndListener(i),i._loadedComponent=s}),ro(()=>{this.componentLoaders.delete(i)})),r=new La(o,()=>new Ze).pipe(Fa());return this.componentLoaders.set(i,r),r}loadChildren(i,o){if(this.childrenLoaders.get(o))return this.childrenLoaders.get(o);if(o._loadedRoutes)return B({routes:o._loadedRoutes,injector:o._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(o);let s=y_(o,this.compiler,i,this.onLoadEndListener).pipe(ro(()=>{this.childrenLoaders.delete(o)})),c=new La(s,()=>new Ze).pipe(Fa());return this.childrenLoaders.set(o,c),c}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})();function y_(e,n,t,i){return In(e.loadChildren()).pipe(b(Ah),Ti(o=>o instanceof Du||Array.isArray(o)?B(o):wi(n.compileModuleAsync(o))),b(o=>{i&&i(e);let r,s,c=!1;return Array.isArray(o)?(s=o,c=!0):(r=o.create(t).injector,s=r.get(dl,[],{optional:!0,self:!0}).flat()),{routes:s.map(cl),injector:r}}))}function b_(e){return e&&typeof e=="object"&&"default"in e}function Ah(e){return b_(e)?e.default:e}var pl=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:()=>V(M_),providedIn:"root"});let e=n;return e})(),M_=(()=>{let n=class n{shouldProcessUrl(i){return!0}extract(i){return i}merge(i,o){return i}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),D_=new se("");var w_=new se(""),I_=(()=>{let n=class n{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Ze,this.transitionAbortSubject=new Ze,this.configLoader=V(C_),this.environmentInjector=V(Xr),this.urlSerializer=V(rl),this.rootContexts=V(Gs),this.location=V(es),this.inputBindingEnabled=V(al,{optional:!0})!==null,this.titleStrategy=V(Eh),this.options=V(ul,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=V(pl),this.createViewTransition=V(D_,{optional:!0}),this.navigationErrorHandler=V(w_,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>B(void 0),this.rootComponentType=null;let i=r=>this.events.next(new Bc(r)),o=r=>this.events.next(new Vc(r));this.configLoader.onLoadEndListener=o,this.configLoader.onLoadStartListener=i}complete(){var i;(i=this.transitions)==null||i.complete()}handleNavigationRequest(i){var r;let o=++this.navigationId;(r=this.transitions)==null||r.next(oi(te(te({},this.transitions.value),i),{id:o}))}setupNavigations(i,o,r){return this.transitions=new Ke({id:0,currentUrlTree:o,currentRawUrl:o,extractedUrl:this.urlHandlingStrategy.extract(o),urlAfterRedirects:this.urlHandlingStrategy.extract(o),rawUrl:o,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:vr,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(et(s=>s.id!==0),b(s=>oi(te({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Fe(s=>{let c=!1,d=!1;return B(s).pipe(Fe(p=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",gi.SupersededByNewNavigation),Dt;this.currentTransition=s,this.currentNavigation={id:p.id,initialUrl:p.rawUrl,extractedUrl:p.extractedUrl,trigger:p.source,extras:p.extras,previousNavigation:this.lastSuccessfulNavigation?oi(te({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let _=!i.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),y=p.extras.onSameUrlNavigation??i.onSameUrlNavigation;if(!_&&y!=="reload"){let O="";return this.events.next(new Vn(p.id,this.urlSerializer.serialize(p.rawUrl),O,Hc.IgnoredSameUrlNavigation)),p.resolve(!1),Dt}if(this.urlHandlingStrategy.shouldProcessUrl(p.rawUrl))return B(p).pipe(Fe(O=>{var Z,ue;let L=(Z=this.transitions)==null?void 0:Z.getValue();return this.events.next(new br(O.id,this.urlSerializer.serialize(O.extractedUrl),O.source,O.restoredState)),L!==((ue=this.transitions)==null?void 0:ue.getValue())?Dt:Promise.resolve(O)}),f_(this.environmentInjector,this.configLoader,this.rootComponentType,i.config,this.urlSerializer,this.paramsInheritanceStrategy),st(O=>{s.targetSnapshot=O.targetSnapshot,s.urlAfterRedirects=O.urlAfterRedirects,this.currentNavigation=oi(te({},this.currentNavigation),{finalUrl:O.urlAfterRedirects});let L=new js(O.id,this.urlSerializer.serialize(O.extractedUrl),this.urlSerializer.serialize(O.urlAfterRedirects),O.targetSnapshot);this.events.next(L)}));if(_&&this.urlHandlingStrategy.shouldProcessUrl(p.currentRawUrl)){let{id:O,extractedUrl:L,source:Z,restoredState:ue,extras:Ge}=p,Tt=new br(O,this.urlSerializer.serialize(L),Z,ue);this.events.next(Tt);let Ji=yh(this.rootComponentType).snapshot;return this.currentTransition=s=oi(te({},p),{targetSnapshot:Ji,urlAfterRedirects:L,extras:oi(te({},Ge),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=L,B(s)}else{let O="";return this.events.next(new Vn(p.id,this.urlSerializer.serialize(p.extractedUrl),O,Hc.IgnoredByUrlHandlingStrategy)),p.resolve(!1),Dt}}),st(p=>{let _=new Nc(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot);this.events.next(_)}),b(p=>(this.currentTransition=s=oi(te({},p),{guards:kv(p.targetSnapshot,p.currentSnapshot,this.rootContexts)}),s)),$v(this.environmentInjector,p=>this.events.next(p)),st(p=>{if(s.guardsResult=p.guardsResult,p.guardsResult&&typeof p.guardsResult!="boolean")throw $s(this.urlSerializer,p.guardsResult);let _=new jc(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot,!!p.guardsResult);this.events.next(_)}),et(p=>p.guardsResult?!0:(this.cancelNavigationTransition(p,"",gi.GuardRejected),!1)),Ec(p=>{if(p.guards.canActivateChecks.length)return B(p).pipe(st(_=>{let y=new Uc(_.id,this.urlSerializer.serialize(_.extractedUrl),this.urlSerializer.serialize(_.urlAfterRedirects),_.targetSnapshot);this.events.next(y)}),Fe(_=>{let y=!1;return B(_).pipe(m_(this.paramsInheritanceStrategy,this.environmentInjector),st({next:()=>y=!0,complete:()=>{y||this.cancelNavigationTransition(_,"",gi.NoDataFromResolver)}}))}),st(_=>{let y=new zc(_.id,this.urlSerializer.serialize(_.extractedUrl),this.urlSerializer.serialize(_.urlAfterRedirects),_.targetSnapshot);this.events.next(y)}))}),Ec(p=>{let _=y=>{var L;let O=[];(L=y.routeConfig)!=null&&L.loadComponent&&!y.routeConfig._loadedComponent&&O.push(this.configLoader.loadComponent(y.routeConfig).pipe(st(Z=>{y.component=Z}),b(()=>{})));for(let Z of y.children)O.push(..._(Z));return O};return wt(_(p.targetSnapshot.root)).pipe(Ha(null),Wt(1))}),Ec(()=>this.afterPreactivation()),Fe(()=>{var O;let{currentSnapshot:p,targetSnapshot:_}=s,y=(O=this.createViewTransition)==null?void 0:O.call(this,this.environmentInjector,p.root,_.root);return y?wi(y).pipe(b(()=>s)):B(s)}),b(p=>{let _=wv(i.routeReuseStrategy,p.targetSnapshot,p.currentRouterState);return this.currentTransition=s=oi(te({},p),{targetRouterState:_}),this.currentNavigation.targetRouterState=_,s}),st(()=>{this.events.next(new Dr)}),Av(this.rootContexts,i.routeReuseStrategy,p=>this.events.next(p),this.inputBindingEnabled),Wt(1),st({next:p=>{var _;c=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Bn(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects))),(_=this.titleStrategy)==null||_.updateTitle(p.targetRouterState.snapshot),p.resolve(!0)},complete:()=>{c=!0}}),re(this.transitionAbortSubject.pipe(st(p=>{throw p}))),ro(()=>{var p;!c&&!d&&this.cancelNavigationTransition(s,"",gi.SupersededByNewNavigation),((p=this.currentTransition)==null?void 0:p.id)===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),dn(p=>{if(d=!0,Ih(p))this.events.next(new un(s.id,this.urlSerializer.serialize(s.extractedUrl),p.message,p.cancellationCode)),Ov(p)?this.events.next(new ko(p.url,p.navigationBehaviorOptions)):s.resolve(!1);else{let _=new Mr(s.id,this.urlSerializer.serialize(s.extractedUrl),p,s.targetSnapshot??void 0);try{let y=sn(this.environmentInjector,()=>{var O;return(O=this.navigationErrorHandler)==null?void 0:O.call(this,_)});if(y instanceof Ir){let{message:O,cancellationCode:L}=$s(this.urlSerializer,y);this.events.next(new un(s.id,this.urlSerializer.serialize(s.extractedUrl),O,L)),this.events.next(new ko(y.redirectTo,y.navigationBehaviorOptions))}else{this.events.next(_);let O=i.errorHandler(p);s.resolve(!!O)}}catch(y){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(y)}}return Dt}))}))}cancelNavigationTransition(i,o,r){let s=new un(i.id,this.urlSerializer.serialize(i.extractedUrl),o,r);this.events.next(s),i.resolve(!1)}isUpdatingInternalState(){var i,o;return((i=this.currentTransition)==null?void 0:i.extractedUrl.toString())!==((o=this.currentTransition)==null?void 0:o.currentUrlTree.toString())}isUpdatedBrowserUrl(){var o,r;return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==((o=this.currentTransition)==null?void 0:o.extractedUrl.toString())&&!((r=this.currentTransition)!=null&&r.extras.skipLocationChange)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})();function x_(e){return e!==vr}var O_=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:()=>V(S_),providedIn:"root"});let e=n;return e})(),ol=class{shouldDetach(n){return!1}store(n,t){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,t){return n.routeConfig===t.routeConfig}},S_=(()=>{let n=class n extends ol{};n.\u0275fac=(()=>{let i;return function(r){return(i||(i=ae(n)))(r||n)}})(),n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),kh=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:()=>V(P_),providedIn:"root"});let e=n;return e})(),P_=(()=>{let n=class n extends kh{constructor(){super(...arguments),this.location=V(es),this.urlSerializer=V(rl),this.options=V(ul,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=V(pl),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new wn,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=yh(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){var i;return this.canceledNavigationResolution!=="computed"?this.currentPageId:((i=this.restoredState())==null?void 0:i.\u0275routerPageId)??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(i){return this.location.subscribe(o=>{o.type==="popstate"&&i(o.url,o.state)})}handleRouterEvent(i,o){if(i instanceof br)this.stateMemento=this.createStateMemento();else if(i instanceof Vn)this.rawUrlTree=o.initialUrl;else if(i instanceof js){if(this.urlUpdateStrategy==="eager"&&!o.extras.skipLocationChange){let r=this.urlHandlingStrategy.merge(o.finalUrl,o.initialUrl);this.setBrowserUrl(r,o)}}else i instanceof Dr?(this.currentUrlTree=o.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(o.finalUrl,o.initialUrl),this.routerState=o.targetRouterState,this.urlUpdateStrategy==="deferred"&&(o.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,o))):i instanceof un&&(i.code===gi.GuardRejected||i.code===gi.NoDataFromResolver)?this.restoreHistory(o):i instanceof Mr?this.restoreHistory(o,!0):i instanceof Bn&&(this.lastSuccessfulId=i.id,this.currentPageId=this.browserPageId)}setBrowserUrl(i,o){let r=this.urlSerializer.serialize(i);if(this.location.isCurrentPathEqualTo(r)||o.extras.replaceUrl){let s=this.browserPageId,c=te(te({},o.extras.state),this.generateNgRouterState(o.id,s));this.location.replaceState(r,"",c)}else{let s=te(te({},o.extras.state),this.generateNgRouterState(o.id,this.browserPageId+1));this.location.go(r,"",s)}}restoreHistory(i,o=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,s=this.currentPageId-r;s!==0?this.location.historyGo(s):this.currentUrlTree===i.finalUrl&&s===0&&(this.resetState(i),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(o&&this.resetState(i),this.resetUrlToCurrentUrlTree())}resetState(i){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(i,o){return this.canceledNavigationResolution==="computed"?{navigationId:i,\u0275routerPageId:o}:{navigationId:i}}};n.\u0275fac=(()=>{let i;return function(r){return(i||(i=ae(n)))(r||n)}})(),n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),mr=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(mr||{});function E_(e,n){e.events.pipe(et(t=>t instanceof Bn||t instanceof un||t instanceof Mr||t instanceof Vn),b(t=>t instanceof Bn||t instanceof Vn?mr.COMPLETE:(t instanceof un?t.code===gi.Redirect||t.code===gi.SupersededByNewNavigation:!1)?mr.REDIRECTING:mr.FAILED),et(t=>t!==mr.REDIRECTING),Wt(1)).subscribe(()=>{n()})}function A_(e){throw e}var k_={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},R_={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Rh=(()=>{let n=class n{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 i;this.disposed=!1,this.console=V(Eu),this.stateManager=V(kh),this.options=V(ul,{optional:!0})||{},this.pendingTasks=V(bu),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=V(I_),this.urlSerializer=V(rl),this.location=V(es),this.urlHandlingStrategy=V(pl),this._events=new Ze,this.errorHandler=this.options.errorHandler||A_,this.navigated=!1,this.routeReuseStrategy=V(O_),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=((i=V(dl,{optional:!0}))==null?void 0:i.flat())??[],this.componentInputBindingEnabled=!!V(al,{optional:!0}),this.eventsSubscription=new lu,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:o=>{this.console.warn(o)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let i=this.navigationTransitions.events.subscribe(o=>{try{let r=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(r!==null&&s!==null){if(this.stateManager.handleRouterEvent(o,s),o instanceof un&&o.code!==gi.Redirect&&o.code!==gi.SupersededByNewNavigation)this.navigated=!0;else if(o instanceof Bn)this.navigated=!0;else if(o instanceof ko){let c=o.navigationBehaviorOptions,d=this.urlHandlingStrategy.merge(o.url,r.currentRawUrl),p=te({info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||x_(r.source)},c);this.scheduleNavigation(d,vr,null,p,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}L_(o)&&this._events.next(o)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(i)}resetRootComponentType(i){this.routerState.root.component=i,this.navigationTransitions.rootComponentType=i}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),vr,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??(this.nonRouterCurrentEntryChangeSubscription=this.stateManager.registerNonRouterCurrentEntryChangeListener((i,o)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(i,"popstate",o)},0)}))}navigateToSyncWithBrowser(i,o,r){let s={replaceUrl:!0},c=r!=null&&r.navigationId?r:null;if(r){let p=te({},r);delete p.navigationId,delete p.\u0275routerPageId,Object.keys(p).length!==0&&(s.state=p)}let d=this.parseUrl(i);this.scheduleNavigation(d,o,c,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(i){this.config=i.map(cl),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(i,o={}){let{relativeTo:r,queryParams:s,fragment:c,queryParamsHandling:d,preserveFragment:p}=o,_=p?this.currentUrlTree.fragment:c,y=null;switch(d){case"merge":y=te(te({},this.currentUrlTree.queryParams),s);break;case"preserve":y=this.currentUrlTree.queryParams;break;default:y=s||null}y!==null&&(y=this.removeEmptyProps(y));let O;try{let L=r?r.snapshot:this.routerState.snapshot.root;O=vh(L)}catch{(typeof i[0]!="string"||i[0][0]!=="/")&&(i=[]),O=this.currentUrlTree.root}return _h(O,i,y,_??null)}navigateByUrl(i,o={skipLocationChange:!1}){let r=Cr(i)?i:this.parseUrl(i),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,vr,null,o)}navigate(i,o={skipLocationChange:!1}){return F_(i),this.navigateByUrl(this.createUrlTree(i,o),o)}serializeUrl(i){return this.urlSerializer.serialize(i)}parseUrl(i){try{return this.urlSerializer.parse(i)}catch{return this.urlSerializer.parse("/")}}isActive(i,o){let r;if(o===!0?r=te({},k_):o===!1?r=te({},R_):r=o,Cr(i))return eh(this.currentUrlTree,i,r);let s=this.parseUrl(i);return eh(this.currentUrlTree,s,r)}removeEmptyProps(i){return Object.entries(i).reduce((o,[r,s])=>(s!=null&&(o[r]=s),o),{})}scheduleNavigation(i,o,r,s,c){if(this.disposed)return Promise.resolve(!1);let d,p,_;c?(d=c.resolve,p=c.reject,_=c.promise):_=new Promise((O,L)=>{d=O,p=L});let y=this.pendingTasks.add();return E_(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(y))}),this.navigationTransitions.handleNavigationRequest({source:o,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:i,extras:s,resolve:d,reject:p,promise:_,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),_.catch(O=>Promise.reject(O))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})();function F_(e){for(let n=0;nt.\u0275providers)])}function N_(e){return e.routerState.root}function j_(){let e=V(mn);return n=>{var r,s;let t=e.get(Ru);if(n!==t.components[0])return;let i=e.get(Rh),o=e.get(U_);e.get(z_)===1&&i.initialNavigation(),(r=e.get(B_,null,Ua.Optional))==null||r.setUpPreloading(),(s=e.get(H_,null,Ua.Optional))==null||s.init(),i.resetRootComponentType(t.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var U_=new se("",{factory:()=>new Ze}),z_=new se("",{providedIn:"root",factory:()=>1});var B_=new se("");var uO=(()=>{class e extends _i{constructor(t,i,o){super(r=>this.stream$.subscribe(r)),this.media=t,this.ngZone=i,this.size$=o,this.sorted=Object.values(this.media).sort((r,s)=>r-s),this.invert=Object.keys(this.media).reduce((r,s)=>Object.assign(Object.assign({},r),{[this.media[s]]:s}),{}),this.stream$=this.size$.pipe(b(({width:r})=>this.sorted.find(s=>s>r)),b(r=>this.invert[r||this.sorted[this.sorted.length-1]]),oe(),Jt(this.ngZone),Zr({bufferSize:1,refCount:!0}))}}return e.\u0275fac=function(t){return new(t||e)(ye(wc),ye(Xe),ye(Od))},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Fh=(()=>{class e{constructor(t){this.locale=t}format(t){return B(new Date(t).toLocaleTimeString(this.locale,{hour:"numeric",minute:"2-digit"}))}}return e.\u0275fac=function(t){return new(t||e)(ye(Fu))},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Lh=(()=>{class e extends Ke{constructor(){super([])}add(t){this.next(this.value.concat(t))}remove(t){this.value.includes(t)&&this.next(this.value.filter(i=>i!==t))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Ho=(()=>{class e extends _i{constructor(t,i,o,r){super(s=>i.pipe(b(()=>t.nativeElement.getBoundingClientRect()),b(c=>r.getPosition(c)),$i(o),ro(()=>r.getPosition(ai))).subscribe(s))}}return e.\u0275fac=function(t){return new(t||e)(ye(N),ye(Cn),ye(Xe),ye(kt))},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})();var Hh=(()=>{class e{constructor(t,i,o){this.tuiSanitizer=t,this.sanitizer=i,this.originals={},this.items$=new Ke(new Map),this.define(o)}define(t){let{value:i}=this.items$;Object.keys(t).forEach(o=>{this.defineIcon(o,t[o],i)}),this.items$.next(i)}getOriginal(t){return this.originals[t]||null}defineIcon(t,i,o){if(o.has(t))return;let r=this.parseSrc(t,i);r&&(o.set(t,r),this.originals=Object.assign(Object.assign({},this.originals),{[t]:i}))}parseSrc(t,i){return this.sanitize(Ap(i,t))}sanitize(t){return this.sanitizer.bypassSecurityTrustHtml((this.tuiSanitizer?this.tuiSanitizer.sanitize(xi.HTML,t):this.sanitizer.sanitize(xi.HTML,t))||"")}}return e.\u0275fac=function(t){return new(t||e)(ye(Io,8),ye(ts),ye(Bp))},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Zs=(()=>{class e{constructor(t,i){this.win=t,this.isWebkit=i}correct([t,i]){return[this.correctY(t),this.correctX(i)]}correctX(t){var i,o;return this.isWebkit?t+((o=(i=this.win.visualViewport)===null||i===void 0?void 0:i.offsetLeft)!==null&&o!==void 0?o:0):t}correctY(t){var i,o;return this.isWebkit?t+((o=(i=this.win.visualViewport)===null||i===void 0?void 0:i.offsetTop)!==null&&o!==void 0?o:0):t}}return e.\u0275fac=function(t){return new(t||e)(ye(zt),ye(wd))},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function V_(e,n){if(e&1&&S(0,"div",3),e&2){let t=u().tuiLet;l("innerHTML",t,gn)}}function $_(e,n){if(e&1){let t=F();qr(),g(0,"svg",4),C("error",function(){I(t);let o=u(2);return x(o.onError())}),S(1,"use"),v()}if(e&2){let t=u(2);h(),fe("href",t.use,null,"xlink")}}function W_(e,n){if(e&1&&(Ie(0),T(1,V_,1,1,"div",2)(2,$_,2,1,"ng-template",null,0,de),xe()),e&2){let t=j(3),i=u();h(),l("ngIf",i.isInnerHTML)("ngIfElse",t)}}var G_={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"},Y_={iconsPlace:ws,path:Ms(ws),srcProcessor:io,contentProcessor:ds,deprecated:e=>{let n=e.replace("Large","").replace("Outline",""),t=G_[n];return t?`${n}/(Large|Outline) is deprecated, use ${t}/(Large|Outline) instead`:""}},Z_=X(()=>({iconsPlace:V(Dc),path:V(Vp),deprecated:Y_.deprecated,srcProcessor:V(Yp),contentProcessor:V(Gp)})),X_=new se("[TUI_SVG_SRC_INTERCEPTORS]");var q_="Attempted to use undefined named icon",K_="External icon is missing on the given URL",Q_="Failed to load external SVG",Ft=(()=>{class e{constructor(t,i,o,r,s,c,d,p,_,y){this.doc=t,this.win=i,this.options=o,this.srcInterceptors=r,this.tuiSanitizer=s,this.svgService=c,this.staticRequestService=d,this.sanitizer=p,this.el=_,this.baseHref=y,this.src$=new no(1),this.icon="",this.innerHTML$=this.src$.pipe(Fe(()=>ci(this.icon)?this.isExternal?this.getExternalIcon(this.icon):B(this.getSafeHtml(this.icon)):B(this.icon)),it(""))}set src(t){var i;let o=this.options.deprecated(String(t));this.icon=((i=this.srcInterceptors)!==null&&i!==void 0?i:[]).reduce((r,s)=>s(r,this.options),this.options.srcProcessor(t||"")),this.src$.next()}get src(){return this.icon}get use(){return ci(this.icon)?this.icon.includes(".svg#")?this.icon:this.resolveName(this.icon,this.options.path):""}get isInnerHTML(){return!ci(this.icon)||this.isSrc||this.isExternal||this.isName&&this.isShadowDOM}get isShadowDOM(){return Ju(this.el.nativeElement)!==this.doc}get isUse(){return this.use.replace(pr,"").includes(".svg#")}get isExternal(){return this.isUrl||this.isCrossDomain}get isUrl(){return ci(this.icon)&&this.icon.replace(pr,"").endsWith(".svg")}get isSrc(){return ci(this.icon)&&Lp(this.icon)}get isName(){return!this.isUrl&&!this.isUse&&!this.isSrc}get isCrossDomain(){let{use:t,isUse:i,win:o}=this;return i&&t.startsWith("http")&&!!o.origin&&!t.startsWith(o.origin)}onError(t=K_){let{icon:i}=this,o=new CustomEvent(Ep,{bubbles:!0,detail:{message:t,icon:i}});this.el.nativeElement.dispatchEvent(o)}resolveName(t,i){return i(t,this.baseHref)}getSafeHtml(t){return this.isSrc?this.sanitize(t):this.process(t)}process(t){let i=this.svgService.getOriginal(t);return this.isName&&!i&&t&&this.onError(q_),!this.isShadowDOM||!this.isName?"":this.sanitize(i||"")}sanitize(t){return t=this.options.contentProcessor(t),this.tuiSanitizer&&ci(t)?this.sanitizer.bypassSecurityTrustHtml(this.tuiSanitizer.sanitize(xi.HTML,t)||""):t}getExternalIcon(t){let i=t.includes(".svg")?t:this.use;return this.staticRequestService.request(i).pipe(dn(()=>(this.onError(Q_),B(""))),b(o=>this.sanitize(o.replace("{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Ot]]}),e})();var ne="{{duration}}ms ease-in-out",Oe={params:{duration:300}},Bt=300,Nh=ct("tuiHeightCollapse",[ge(":enter",[P({height:0}),ie(ne,P({height:"*"}))],Oe),ge(":leave",[P({height:"*"}),ie(ne,P({height:0}))],Oe)]),AO=ct("tuiHeightCollapseList",[ge("* => *",[Et(":enter",[P({height:0}),At(Bt,[ie(ne,P({height:"*"}))])],{optional:!0}),Et(":leave",[P({height:"*"}),At(Bt,[ie(ne,P({height:0}))])],{optional:!0})],Oe)]),kO=ct("tuiWidthCollapse",[ge(":enter",[P({width:0}),ie(ne,P({width:"*"}))],Oe),ge(":leave",[P({width:"*"}),ie(ne,P({width:0}))],Oe)]),RO=ct("tuiWidthCollapseList",[ge("* => *",[Et(":enter",[P({width:0}),At(Bt,[ie(ne,P({width:"*"}))])],{optional:!0}),Et(":leave",[P({width:"*"}),At(Bt,[ie(ne,P({width:0}))])],{optional:!0})],Oe)]),No=ct("tuiFadeIn",[ge(":enter",[P({opacity:0}),ie(ne,P({opacity:1}))],Oe),ge(":leave",[P({opacity:1}),ie(ne,P({opacity:0}))],Oe)]),FO=ct("tuiFadeInList",[ge("* => *",[Et(":enter",[P({opacity:0}),At(Bt,[ie(ne,P({opacity:1}))])],{optional:!0}),Et(":leave",[P({opacity:1}),At(Bt,[ie(ne,P({opacity:0}))])],{optional:!0})],Oe)]),LO=ct("tuiFadeInTop",[ge(":enter",[P({transform:"translateY(-10px)",opacity:0}),ie(ne,P({transform:"translateY(0)",opacity:1}))],Oe),ge(":leave",[P({transform:"translateY(0)",opacity:1}),ie(ne,P({transform:"translateY(-10px)",opacity:0}))],Oe)]),HO=ct("tuiFadeInBottom",[ge(":enter",[P({transform:"translateY(10px)",opacity:0}),ie(ne,P({transform:"translateY(0)",opacity:1}))],Oe),ge(":leave",[P({transform:"translateY(0)",opacity:1}),ie(ne,P({transform:"translateY(10px)",opacity:0}))],Oe)]),jh=ct("tuiDropdownAnimation",[ge(":enter",[P({transform:"translateY(-10px)",opacity:0}),ie(ne,P({transform:"translateY(0)",opacity:1}))],Oe),ge(":leave",[P({transform:"translateY(0)",opacity:1}),ie(ne,P({transform:"translateY(-10px)",opacity:0}))],Oe)]),NO=ct("tuiScaleIn",[ge(":enter",[P({transform:"scale(0)"}),ie(ne,P({transform:"scale(1)"}))],Oe),ge(":leave",[P({transform:"scale(1)"}),ie(ne,P({transform:"scale(0)"}))],Oe)]),jO=ct("tuiPop",[ge(":enter",[P({transform:"scale(0)"}),ie(ne,P({transform:"scale(1.1)"})),ie(ne,P({transform:"scale(1)"}))],Oe),ge(":leave",[P({transform:"scale(1)"}),ie(ne,P({transform:"scale(1.1)"})),ie(ne,P({transform:"scale(0)"}))],Oe)]),UO=ct("tuiScaleInList",[ge("* => *",[Et(":enter",[P({transform:"scale(0)"}),At(Bt,[ie(ne,P({transform:"scale(1)"}))])],{optional:!0}),Et(":leave",[P({transform:"scale(1)"}),At(Bt,[ie(ne,P({transform:"scale(0)"}))])],{optional:!0})],Oe)]),zO=ct("tuiSlideIn",[ge("* => left",[P({transform:"translateX(-100%)"}),ie(ne,P({transform:"translateX(0)"}))],Oe),ge("left => *",[P({transform:"translateX(0)"}),ie(ne,P({transform:"translateX(-100%)"}))],Oe),ge("* => right",[P({transform:"translateX(100%)"}),ie(ne,P({transform:"translateX(0)"}))],Oe),ge("right => *",[P({transform:"translateX(0)"}),ie(ne,P({transform:"translateX(100%)"}))],Oe)]),BO=ct("tuiSlideInLeft",[ge(":enter",[P({transform:"translateX(-100%)"}),ie(ne,P({transform:"translateX(0)"}))],Oe),ge(":leave",[P({transform:"translateX(0)"}),ie(ne,P({transform:"translateX(-100%)"}))],Oe)]),VO=ct("tuiSlideInLeftList",[ge("* => *",[Et(":enter",[P({transform:"translateX(-100%)"}),At(Bt,[ie(ne,P({transform:"translateX(0)"}))])],{optional:!0}),Et(":leave",[P({transform:"translateX(0)"}),At(Bt,[ie(ne,P({transform:"translateX(-100%)"}))])],{optional:!0})],Oe)]),Uh=ct("tuiSlideInRight",[ge(":enter",[P({transform:"translateX(100%)"}),ie(ne,P({transform:"translateX(0)"}))],Oe),ge(":leave",[P({transform:"translateX(0)"}),ie(ne,P({transform:"translateX(100%)"}))],Oe)]),$O=ct("tuiSlideInRightList",[ge("* => *",[Et(":enter",[P({transform:"translateX(100%)"}),At(Bt,[ie(ne,P({transform:"translateX(0)"}))])],{optional:!0}),Et(":leave",[P({transform:"translateX(0)"}),At(Bt,[ie(ne,P({transform:"translateX(100%)"}))])],{optional:!0})],Oe)]),zh=ct("tuiSlideInTop",[ge(":enter",[P({transform:"translate3d(0,{{start}},0)"}),ie(ne,P({transform:"translate3d(0,{{end}},0)"}))],{params:{end:0,start:"100%",duration:300}}),ge(":leave",[P({transform:"translate3d(0,{{end}},0)",pointerEvents:"none"}),ie(ne,P({transform:"translate3d(0,{{start}},0)"}))],{params:{end:0,start:"100%",duration:300}})]),WO=ct("tuiSlideInTopList",[ge("* => *",[Et(":enter",[P({transform:"translateY(100%)"}),At(Bt,[ie(ne,P({transform:"translateY(0)"}))])],{optional:!0}),Et(":leave",[P({transform:"translateY(0)"}),At(Bt,[ie(ne,P({transform:"translateY(100%)"}))])],{optional:!0})],Oe)]),GO=ct("tuiSlideInBottom",[ge(":enter",[P({transform:"translateY(-100%)"}),ie(ne,P({transform:"translateY(0)"}))],Oe),ge(":leave",[P({transform:"translateY(0)"}),ie(ne,P({transform:"translateY(-100%)"}))],Oe)]),YO=ct("tuiSlideInBottomList",[ge("* => *",[Et(":enter",[P({transform:"translateY(-100%)"}),At(Bt,[ie(ne,P({transform:"translateY(0)"}))])],{optional:!0}),Et(":leave",[P({transform:"translateY(0)"}),At(Bt,[ie(ne,P({transform:"translateY(-100%)"}))])],{optional:!0})],Oe)]);var Mi=(()=>{class e extends Yt{constructor(){super(...arguments),this.mode=null}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiMode",""]],inputs:{mode:[0,"tuiMode","mode"]},features:[W]}),e})();var i1={provide:Ic,deps:[[new si,Ic],N],useFactory:(e,{nativeElement:n})=>(n["$.class._mobile"]=e,e)},xn={provide:Yi,deps:[[new tt,Mi],N],useFactory:(e,{nativeElement:n})=>{let t=e?e.change$.pipe(it(null),b(()=>e.mode)):B(null);return n["$.data-mode.attr"]=t,t}};var J_=["*"];function e0(e,n){e&1&&S(0,"tui-scroll-controls",2)}var jo=(()=>{class e{constructor(t,i,o,r){this.cssRef=t,this.el=i,this.userAgent=o,this.isIos=r,this.isLegacy=!this.cssRef.supports("position","sticky")||Qd(this.userAgent)&&!this.cssRef.supports("scrollbar-width","none"),this.hidden=!1,this.browserScrollRef=new N(this.el.nativeElement)}get delegated(){return this.browserScrollRef.nativeElement!==this.el.nativeElement}get showScrollbars(){return!this.hidden&&!this.isIos&&(!this.isLegacy||this.delegated)}get showNative(){return this.isLegacy&&!this.hidden&&!this.delegated}onScrollable(t){this.browserScrollRef.nativeElement=t}scrollIntoView(t){var i;if(this.delegated)return;let{nativeElement:o}=this.browserScrollRef,{offsetTop:r,offsetLeft:s}=td(o,t),{clientHeight:c,clientWidth:d}=o,{offsetHeight:p,offsetWidth:_}=t,y=r+p/2-c/2,O=s+_/2-d/2;(i=o.scrollTo)===null||i===void 0||i.call(o,O,y)}}return e.\u0275fac=function(t){return new(t||e)(a(vd),a(N),a(_d),a(ln))},e.\u0275cmp=k({type:e,selectors:[["tui-scrollbar"]],hostVars:2,hostBindings:function(t,i){t&1&&C("tui-scrollable.stop",function(r){return i.onScrollable(r.detail)})("tui-scroll-into-view.stop",function(r){return i.scrollIntoView(r.detail)}),t&2&&J("_legacy",i.showNative)},inputs:{hidden:"hidden"},features:[A([{provide:Fn,deps:[e],useFactory:({browserScrollRef:n})=>n}])],ngContentSelectors:J_,decls:3,vars:3,consts:[["class","t-bars",4,"ngIf"],[1,"t-content"],[1,"t-bars"]],template:function(t,i){t&1&&(Ve(),T(0,e0,1,0,"tui-scroll-controls",0),g(1,"div",1),me(2),v()),t&2&&(l("ngIf",i.showScrollbars),h(),J("t-content_delegated",i.delegated))},dependencies:[np,ee],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-content_delegated[_ngcontent-%COMP%]{height:100%}.t-bars[_ngcontent-%COMP%]{color:var(--tui-text-01)}"],changeDetection:0}),e})(),Uo=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,op]]}),e})();function i0(e){return e.replace(/[a-z][A-Z]/g,n=>`${n[0]}-${n[1].toLowerCase()}`)}var qi=class{supports(n){return n.includes(this.modifier)}addGlobalEventListener(){return()=>{}}unwrap(n){return n.split(".").filter(t=>!this.modifier.includes(t)).join(".")}},n0=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier="$"}addEventListener(t,i){t[i]=t[i]||Dt;let o=this.getMethod(t,i),r=this.manager.getZone().onStable,s=Yr(r.pipe(Tu(()=>t[i]===Dt)),Jo(()=>t[i])).subscribe(o);return()=>s.unsubscribe()}getMethod(t,i){let[,o,r,s=""]=i.split(".");return i.endsWith(".attr")?c=>c===null?t.removeAttribute(o):t.setAttribute(o,String(c)):o==="class"?c=>t.classList.toggle(r,!!c):o==="style"?c=>t.style.setProperty(i0(r),`${c}${s}`):c=>t[o]=c}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),o0=new se("[GLOBAL_HANDLER]: Global event target handler",{factory:()=>{let e=V(qe);return n=>n==="body"?e.body:e.defaultView[n]||e.createElement("div")}}),r0=(()=>{class e extends qi{constructor(){super(...arguments),this.handler=V(o0),this.modifier=">"}addEventListener(t,i,o){return this.manager.addEventListener(this.handler(i.split(">")[0]),i.split(">")[1],o)}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),s0=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier="capture.once.passive"}supports(t){return t.includes(".")&&!this.unwrap(t).includes(".")}addEventListener(t,i,o){return t.addEventListener(this.unwrap(i),o,{once:i.includes(".once"),passive:i.includes(".passive"),capture:i.includes(".capture")}),()=>t.removeEventListener(this.unwrap(i),o,i.includes(".capture"))}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),a0=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier=".prevent"}addEventListener(t,i,o){let r=s=>{s.preventDefault(),o(s)};return this.manager.addEventListener(t,this.unwrap(i),r)}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),c0=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier=".self"}addEventListener(t,i,o){let r=s=>{s.target===s.currentTarget&&o(s)};return this.manager.addEventListener(t,this.unwrap(i),r)}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),Xs=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier=".silent"}addEventListener(t,i,o){return e.ngZone=this.manager.getZone(),e.ngZone.runOutsideAngular(()=>this.manager.addEventListener(t,this.unwrap(i),o))}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),l0=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier=".stop"}addEventListener(t,i,o){let r=s=>{s.stopPropagation(),o(s)};return this.manager.addEventListener(t,this.unwrap(i),r)}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),u0=(()=>{class e extends qi{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 n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),d0=[Xs,n0,r0,s0,a0,c0,l0,u0],p0=d0.map(e=>({provide:$a,multi:!0,useClass:e}));function qs(e){return(n,t,i)=>{let{value:o}=i;i.value=function(...r){e.apply(this,r)&&(Xs.ngZone?Xs.ngZone.run(()=>o.apply(this,r)):o.apply(this,r))}}}var D1=(()=>{class e{constructor([t]){console.assert(!(t instanceof Xs)||e.initialized,"EventPluginsModule must come after BrowserModule in imports"),e.initialized=!0}}return e.initialized=!1,e.\u0275fac=function(t){return new(t||e)(ye($a))},e.\u0275mod=D({type:e}),e.\u0275inj=M({providers:p0}),e})();var h0=e=>({$implicit:e});function f0(e,n){if(e&1&&(g(0,"div",4),Te(1),v()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t," ")}}var m0=X(()=>_0),hl=(()=>{class e{constructor(){this.tuiDropdownOpen=!1,this.tuiDropdownOpenChange=new Pe}update(t){this.tuiDropdownOpen=t,this.tuiDropdownOpenChange.emit(t)}ngOnChanges(){var t;(t=this.dropdown)===null||t===void 0||t.toggle(this.tuiDropdownOpen)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiDropdownOpen",""],["","tuiDropdownOpenChange",""]],inputs:{tuiDropdownOpen:"tuiDropdownOpen"},outputs:{tuiDropdownOpenChange:"tuiDropdownOpenChange"},features:[qt]}),e})(),ii=(()=>{class e{constructor(t,i,o,r,s,c){this.el=i,this.dropdown=o,this.injector=r,this.dropdownService=s,this.open=c,this.refresh$=new Ze,this.dropdownBoxRef=null,this.type="dropdown",this.component=new ui(this.dropdown,this.injector),this.open&&!this.open.dropdown?this.open.dropdown=this:this.open=null,this.refresh$.pipe(rn(0),re(t)).subscribe(()=>{var d,p;(d=this.dropdownBoxRef)===null||d===void 0||d.changeDetectorRef.detectChanges(),(p=this.dropdownBoxRef)===null||p===void 0||p.changeDetectorRef.markForCheck()})}get position(){return vc(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(t){var i,o;t&&this.content&&!this.dropdownBoxRef?(this.dropdownBoxRef=this.dropdownService.add(this.component),(i=this.open)===null||i===void 0||i.update(!0)):!t&&this.dropdownBoxRef&&(this.dropdownService.remove(this.dropdownBoxRef),this.dropdownBoxRef=null,(o=this.open)===null||o===void 0||o.update(!1))}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(N),a(m0),a(so),a(To),a(hl,8))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdown","",5,"ng-container"]],inputs:{content:[0,"tuiDropdown","content"]},exportAs:["tuiDropdown"],features:[A([q,Dn(e),xs(e)]),qt]}),jt([Zt],e.prototype,"position",null),e})(),g0={showDelay:200,hideDelay:500},v0=ce(g0);var fl=(()=>{class e extends hi{constructor(t,i,o){super(r=>this.stream$.subscribe(r)),this.hovered$=t,this.options=i,this.parentHover=o,this.toggle$=new Ze,this.stream$=He(this.toggle$,this.hovered$).pipe(Fe(r=>B(r).pipe(ri(r?this.showDelay:this.hideDelay))),st(r=>{this.hovered=r}),on()),this.showDelay=this.options.showDelay,this.hideDelay=this.options.hideDelay,this.hovered=!1,this.type="dropdown"}toggle(t){var i;(i=this.parentHover)===null||i===void 0||i.toggle(t),this.toggle$.next(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Wi),a(v0),a(e,12))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdownHover","",5,"ng-container"]],inputs:{showDelay:[0,"tuiDropdownShowDelay","showDelay"],hideDelay:[0,"tuiDropdownHideDelay","hideDelay"]},features:[A([Zi(e),Wi]),W]}),e})(),Bh={align:"left",direction:null,limitWidth:"auto",maxHeight:400,minHeight:80,offset:4,appearance:""},$n=ce(Bh),Vh=e=>({provide:$n,deps:[[new tt,Di],[new tt,new si,$n]],useFactory:Cc(e,Bh)}),Di=(()=>{class e{constructor(t){this.options=t,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 e.\u0275fac=function(t){return new(t||e)(a($n,4))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdownAlign",""],["","tuiDropdownAppearance",""],["","tuiDropdownDirection",""],["","tuiDropdownLimitWidth",""],["","tuiDropdownMinHeight",""],["","tuiDropdownMaxHeight",""],["","tuiDropdownOffset",""]],inputs:{align:[0,"tuiDropdownAlign","align"],appearance:[0,"tuiDropdownAppearance","appearance"],direction:[0,"tuiDropdownDirection","direction"],limitWidth:[0,"tuiDropdownLimitWidth","limitWidth"],minHeight:[0,"tuiDropdownMinHeight","minHeight"],maxHeight:[0,"tuiDropdownMaxHeight","maxHeight"],offset:[0,"tuiDropdownOffset","offset"]},features:[A([{provide:$n,useExisting:mt(()=>e)}])]}),e})(),Wn=(()=>{class e extends kt{constructor(t,i,o,r){super(),this.options=t,this.viewport=i,this.accessors=o,this.directive=r,this.type="dropdown"}getPosition({width:t,height:i}){var o,r;!t&&!i&&(this.previous=void 0);let s=(r=(o=this.accessor)===null||o===void 0?void 0:o.getClientRect())!==null&&r!==void 0?r:ai,c=this.viewport.getClientRect(),{minHeight:d,align:p,direction:_,offset:y,limitWidth:O}=this.options,L={top:c.top-y,bottom:c.bottom+y,right:c.right-y,left:c.left+y},Z=this.previous||_||"bottom",ue={top:s.top-2*y-L.top,bottom:L.bottom-s.bottom-2*y},Ge=O==="fixed"?s.width:t,Tt=Math.max(s.right-Ge,y),Ji=s.left+tue.bottom?"top":"bottom";return ue[Z]>d&&_||ue[Z]>i?[ut[Z],ut[p]]:(this.previous=Ct,[ut[Ct],ut[p]])}get accessor(){return Es("dropdown")(this.accessors,this.directive)}}return e.\u0275fac=function(t){return new(t||e)(a($n),a(jn),a(fi),a(ii))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdown",""]],features:[W]}),jt([Zt],e.prototype,"accessor",null),e})(),_0=(()=>{class e{constructor(t,i,o,r,s,c,d,p,_,y,O){this.directive=r,this.animation=s,this.el=c,this.accessor=d,this.win=p,this.mode$=_,this.options=y,this.hoverDirective=O,i.pipe(b(L=>this.directive.position==="fixed"?t.correct(L):L),re(o)).subscribe(([L,Z])=>{this.directive.el.nativeElement.isConnected?this.update(L,Z):this.directive.toggle(!1)}),this.updateWidth(this.accessor.getClientRect().width)}onHoveredChange(t){var i;(i=this.hoverDirective)===null||i===void 0||i.toggle(t)}onTopFocus(){this.moveFocusOutside(!0)}onBottomFocus(){this.moveFocusOutside(!1)}update(t,i){var o;let{style:r}=this.el.nativeElement,{right:s}=this.el.nativeElement.getBoundingClientRect(),{maxHeight:c,minHeight:d,offset:p}=this.options,{innerHeight:_}=this.win,y=(o=this.el.nativeElement.offsetParent)===null||o===void 0?void 0:o.getBoundingClientRect(),{position:O}=this.directive,L=this.accessor.getClientRect(),Z=O==="fixed"?0:-((y==null?void 0:y.left)||0),ue=O==="fixed"?0:-((y==null?void 0:y.top)||0);t+=ue,i+=Z;let Tt=iL.left&&t=L.right;r.position=O,r.top=Qe(Math.max(t,ue+p)),r.left=Qe(i),r.maxHeight=Ji?`${c}px`:Qe(Math.min(c,Math.max(Tt,d))),r.width="",r.minWidth="",this.updateWidth(L.width)}updateWidth(t){let{style:i}=this.el.nativeElement;switch(this.options.limitWidth){case"min":i.minWidth=Qe(t);break;case"fixed":i.width=Qe(t);break;case"auto":break}}moveFocusOutside(t){let{nativeElement:i}=this.directive.el,{ownerDocument:o}=i,r=o?o.body:i,s=Pi({initial:i,root:r,previous:t});for(;s!==null&&i.contains(s);)s=Pi({initial:s,root:r,previous:t});s==null||s.focus()}}return e.\u0275fac=function(t){return new(t||e)(a(Zs),a(Ho),a(q,2),a(ii),a(Do),a(N),a(fi),a(zt),a(Yi),a($n),a(fl,8))},e.\u0275cmp=k({type:e,selectors:[["tui-dropdown"]],hostVars:2,hostBindings:function(t,i){t&1&&C("$.data-mode.attr",function(){return i.mode$}),t&2&&(vn("@tuiDropdownAnimation",i.animation),fe("data-appearance",i.options.appearance))},features:[A([q,Ho,Ss("dropdown",Wn),Ps("dropdown",ii),xn])],decls:5,vars:4,consts:[["activeZone","tuiActiveZone"],["tuiActiveZone","","tuiOverscroll","all",1,"t-scroll",3,"tuiHoveredChange"],["tabindex","0",3,"focus"],["class","t-primitive",4,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-primitive"]],template:function(t,i){if(t&1){let o=F();g(0,"tui-scrollbar",1,0),C("tuiHoveredChange",function(s){return I(o),x(i.onHoveredChange(s))}),g(2,"div",2),C("focus",function(){return I(o),x(i.onTopFocus())}),v(),T(3,f0,2,1,"div",3),g(4,"div",2),C("focus",function(){return I(o),x(i.onBottomFocus())}),v()()}if(t&2){let o=j(1);h(3),l("polymorpheusOutlet",i.directive.content)("polymorpheusOutletContext",Oi(2,h0,o))}},dependencies:[jo,gt,bp,vp,Je],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}'],data:{animation:[jh]}}),e})();var Ks=(()=>{class e extends Os{constructor(t,i,o){super(t,i,o),this.type="dropdown"}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(hi),a(Mn))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdown",""]],features:[A([q]),W]}),e})();var $h=(()=>{class e extends hi{constructor(){super(t=>this.stream$.subscribe(t)),this.stream$=new Ke(!1),this.tuiDropdownManual=!1,this.type="dropdown"}ngOnChanges(){this.stream$.next(this.tuiDropdownManual)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiDropdown","","tuiDropdownManual",""]],inputs:{tuiDropdownManual:"tuiDropdownManual"},features:[A([Zi(e)]),W,qt]}),e})(),Wh=(()=>{class e extends kt{constructor(t,i,o){super(),this.options=t,this.viewport=i,this.vertical=o,this.previous=this.options.direction||"bottom",this.tuiDropdownSided="",this.tuiDropdownSidedOffset=4,this.type="dropdown"}getPosition(t){var i,o;if(this.tuiDropdownSided===!1)return this.vertical.getPosition(t);let{height:r,width:s}=t,c=(o=(i=this.vertical.accessor)===null||i===void 0?void 0:i.getClientRect())!==null&&o!==void 0?o:ai,d=this.viewport.getClientRect(),{direction:p,minHeight:_,offset:y}=this.options,O=this.options.align==="center"?"left":this.options.align,L={top:c.bottom-d.top,left:c.left-y-d.left,right:d.right-c.right-y,bottom:d.bottom-c.top},Z={top:c.bottom-r+this.tuiDropdownSidedOffset+1,left:c.left-s-y,right:c.right+y,bottom:c.top-this.tuiDropdownSidedOffset-1},ue=L.top>L.bottom?"top":"bottom",Ge=L.left>L.right?Z.left:Z.right,Tt=L[O]>s?Z[O]:Ge;return L[this.previous]>_&&p||this.previous===ue?[Z[this.previous],Tt]:(this.previous=ue,[Z[ue],Tt])}}return e.\u0275fac=function(t){return new(t||e)(a($n),a(jn),a(Wn))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdownSided",""]],inputs:{tuiDropdownSided:"tuiDropdownSided",tuiDropdownSidedOffset:"tuiDropdownSidedOffset"},features:[A([Wn,Jp(e)]),W]}),e})(),Gh=(()=>{class e extends hi{constructor(t,i,o,r,s,c){super(d=>this.stream$.subscribe(d)),this.range=t,this.doc=i,this.selection$=o,this.el=r,this.vcr=s,this.dropdown=c,this.handler$=new Ke(Bi),this.stream$=wt([this.handler$,this.selection$.pipe(b(()=>this.getRange()),oe((d,p)=>d.startOffset===p.startOffset&&d.endOffset===p.endOffset&&d.commonAncestorContainer===p.commonAncestorContainer))]).pipe(b(([d,p])=>{let _=this.el.nativeElement.contains(p.commonAncestorContainer);return this.range=_&&as(p.commonAncestorContainer)?p:this.range,_&&d(this.range)||this.inDropdown(p)})),this.position="selection",this.type="dropdown"}set tuiDropdownSelection(t){ci(t)||this.handler$.next(t)}getClientRect(){switch(this.position){case"tag":{let{commonAncestorContainer:t}=this.range,i=pt(t)?t:t.parentNode;return i&&pt(i)?i.getBoundingClientRect():ai}case"word":return bs(this.range).getBoundingClientRect();default:return this.range.getBoundingClientRect()}}ngOnDestroy(){this.ghost&&this.vcr.element.nativeElement.removeChild(this.ghost)}getRange(){let t=nd(this.doc),i=this.doc.getSelection();return(t&&Qu(t)&&this.el.nativeElement.contains(t)?this.veryVerySadInputFix(t):(i==null?void 0:i.rangeCount)&&i.getRangeAt(0)||this.range).cloneRange()}inDropdown(t){let{startContainer:i,endContainer:o}=t,{nativeElement:r}=this.el,s=this.boxContains(t.commonAncestorContainer),c=this.boxContains(o)&&r.contains(i),d=this.boxContains(i)&&r.contains(o);return s||c||d}veryVerySadInputFix(t){let{ghost:i=this.initGhost(t)}=this,{top:o,left:r,width:s,height:c}=t.getBoundingClientRect(),{selectionStart:d,selectionEnd:p,value:_}=t,y=this.doc.createRange(),O=this.el.nativeElement.getBoundingClientRect();return i.style.top=Qe(o-O.top),i.style.left=Qe(r-O.left),i.style.width=Qe(s),i.style.height=Qe(c),i.textContent=rr+_+Vi,y.setStart(i.firstChild,d||0),y.setEnd(i.firstChild,p||0),y}boxContains(t){var i;return!!(!((i=this.dropdown.dropdownBoxRef)===null||i===void 0)&&i.location.nativeElement.contains(t))}initGhost(t){let i=this.doc.createElement("div"),{font:o,letterSpacing:r,textTransform:s,padding:c}=getComputedStyle(t);return i.style.position="absolute",i.style.pointerEvents="none",i.style.opacity="0",i.style.whiteSpace="pre-wrap",i.style.font=o,i.style.letterSpacing=r,i.style.textTransform=s,i.style.padding=c,this.vcr.element.nativeElement.appendChild(i),this.ghost=i,i}}return e.\u0275fac=function(t){return new(t||e)(a(Id),a(qe),a(Wp),a(N),a(Ci),a(ii))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdown","","tuiDropdownSelection",""]],inputs:{position:[0,"tuiDropdownSelectionPosition","position"],tuiDropdownSelection:"tuiDropdownSelection"},features:[A([Zi(e),Dn(e)]),W]}),e})(),vi=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[lt,yi,Mp,Uo,_p]]}),e})();var C0=["*"];function y0(e,n){if(e&1&&S(0,"span",1),e&2){let t=n.polymorpheusOutlet;l("innerHTML",t,gn)}}var b0=X(()=>w0),M0={direction:"bottom-left",showDelay:500,hideDelay:200,appearance:"",icon:"tuiIconHelpCircle"},Gn=ce(M0);var Js=(()=>{class e extends Yt{constructor(t){super(),this.options=t,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 e.\u0275fac=function(t){return new(t||e)(a(Gn,4))},e.\u0275dir=w({type:e,selectors:[["","tuiHintContent",""]],inputs:{content:[0,"tuiHintContent","content"],direction:[0,"tuiHintDirection","direction"],appearance:[0,"tuiHintAppearance","appearance"],showDelay:[0,"tuiHintShowDelay","showDelay"],hideDelay:[0,"tuiHintHideDelay","hideDelay"]},features:[A([{provide:Gn,useExisting:mt(()=>e)}]),W]}),e})(),be=(()=>{class e{constructor(t,i,o,r,s){this.el=t,this.component=i,this.hintService=o,this.options=r,this.activeZone=s,this.tuiHintAppearance=null,this.type="hint"}set tuiHint(t){this.content=t,t||this.toggle(!1)}get appearance(){var t;return(t=this.tuiHintAppearance)!==null&&t!==void 0?t:this.options.appearance}ngOnDestroy(){this.toggle(!1)}getClientRect(){return this.el.nativeElement.getBoundingClientRect()}toggle(t){t&&this.content?this.hintService.add(this):this.hintService.remove(this)}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(ui),a(Lh),a(Gn),a(gt,8))},e.\u0275dir=w({type:e,selectors:[["","tuiHint","",5,"ng-container",5,"ng-template"]],inputs:{tuiHint:"tuiHint",context:[0,"tuiHintContext","context"],tuiHintAppearance:"tuiHintAppearance"},features:[A([Dn(e),xs(e),{provide:ui,deps:[b0,so],useClass:ui}])]}),e})(),ve=(()=>{class e extends hi{constructor(t,i,o,r){super(s=>this.stream$.subscribe(s)),this.hovered$=t,this.options=i,this.el=o,this.parent=r,this.visible=!1,this.toggle$=new Ze,this.stream$=He(this.toggle$.pipe(Fe(s=>B(s).pipe(ri(s?0:this.hideDelay))),re(this.hovered$),ja()),this.hovered$.pipe(Fe(s=>B(s).pipe(ri(s?this.showDelay:this.hideDelay))),re(this.toggle$),ja())).pipe(et(()=>this.enabled),b(s=>s&&(this.el.nativeElement.hasAttribute("tuiHintPointer")||!Tc(this.el.nativeElement))),st(s=>{this.visible=s})),this.showDelay=this.options.showDelay,this.hideDelay=this.options.hideDelay,this.type="hint",this.enabled=!0}toggle(t=!this.visible){var i;this.toggle$.next(t),(i=this.parent)===null||i===void 0||i.toggle(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Wi),a(Gn),a(N),a(e,12))},e.\u0275dir=w({type:e,selectors:[["","tuiHint","",5,"ng-container",5,"ng-template"]],inputs:{showDelay:[0,"tuiHintShowDelay","showDelay"],hideDelay:[0,"tuiHintHideDelay","hideDelay"]},exportAs:["tuiHintHover"],features:[A([Zi(e),Wi]),W]}),e})(),D0=(()=>{class e extends ve{constructor(){super(...arguments),this.currentRect=ai}onMove({clientX:t,clientY:i}){this.currentRect=Ya(t,i)}getClientRect(){return this.currentRect}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiHint","","tuiHintPointer",""]],hostBindings:function(t,i){t&1&&C("mousemove.silent",function(r){return i.onMove(r)})},features:[A([Dn(e),Zi(e)]),W]}),e})(),On=8,Qs=22,ht=0,vt=1,Se=(()=>{class e extends kt{constructor(t,i,o,r){super(),this.options=t,this.viewport=i,this.directive=o,this.accessors=r,this.points=hc.reduce((s,c)=>Object.assign(Object.assign({},s),{[c]:[0,0]}),{}),this.direction=this.options.direction,this.type="hint"}getPosition({width:t,height:i}){var o,r;let s=(r=(o=this.accessor)===null||o===void 0?void 0:o.getClientRect())!==null&&r!==void 0?r:ai,c=s.left+s.width/2,d=s.top+s.height/2;if(this.points["top-left"][ht]=s.top-i-On,this.points["top-left"][vt]=c-t+Qs,this.points.top[ht]=this.points["top-left"][ht],this.points.top[vt]=c-t/2,this.points["top-right"][ht]=this.points["top-left"][ht],this.points["top-right"][vt]=c-Qs,this.points["bottom-left"][ht]=s.bottom+On,this.points["bottom-left"][vt]=this.points["top-left"][vt],this.points.bottom[ht]=this.points["bottom-left"][ht],this.points.bottom[vt]=this.points.top[vt],this.points["bottom-right"][ht]=this.points["bottom-left"][ht],this.points["bottom-right"][vt]=this.points["top-right"][vt],this.points["left-top"][ht]=d-i+Qs,this.points["left-top"][vt]=s.left-t-On,this.points.left[ht]=d-i/2,this.points.left[vt]=this.points["left-top"][vt],this.points["left-bottom"][ht]=d-Qs,this.points["left-bottom"][vt]=this.points["left-top"][vt],this.points["right-top"][ht]=this.points["left-top"][ht],this.points["right-top"][vt]=s.right+On,this.points.right[ht]=this.points.left[ht],this.points.right[vt]=this.points["right-top"][vt],this.points["right-bottom"][ht]=this.points["left-bottom"][ht],this.points["right-bottom"][vt]=this.points["right-top"][vt],this.checkPosition(this.points[this.direction],t,i))return this.points[this.direction];let p=hc.find(_=>this.checkPosition(this.points[_],t,i));return this.points[p||this.fallback]}get accessor(){return Es("hint")(this.accessors,this.directive)}get fallback(){return this.points.top[ht]>this.viewport.getClientRect().bottom-this.points.bottom[ht]?"top":"bottom"}checkPosition([t,i],o,r){let s=this.viewport.getClientRect();return t>On/4&&i>On/4&&t+r{class e{constructor(t,i,o,r,s,c,d,p,_,y,O,L){var Z;this.animation=r,this.pointer=s,this.accessor=c,this.el=d,this.polymorpheus=p,this.hover=_,this.mode=y,this.vvs=O,this.viewport=L,this.appearance=this.polymorpheus.$implicit.appearance||((Z=this.mode)===null||Z===void 0?void 0:Z.mode),i.pipe(b(ue=>this.vvs.correct(ue)),re(o)).subscribe(([ue,Ge])=>{this.update(ue,Ge)}),t.pipe(re(o)).subscribe(ue=>this.hover.toggle(ue))}get content(){return this.polymorpheus.$implicit.content}get context(){return this.polymorpheus.$implicit.context}onClick(t){(!t.closest("tui-hint")&&!this.hover.el.nativeElement.contains(t)||Tc(this.hover.el.nativeElement))&&this.hover.toggle(!1)}update(t,i){if(!this.hover.el.nativeElement.isConnected){this.hover.toggle(!1);return}let{height:o,width:r}=this.el.nativeElement.getBoundingClientRect(),{style:s}=this.el.nativeElement,c=this.accessor.getClientRect(),d=this.viewport.getClientRect();if(c===ai)return;let p=_n(i,Yh,d.width-r-Yh),[_,y]=this.vvs.correct([c.top+c.height/2-t,c.left+c.width/2-p]);s.top=Qe(t),s.left=Qe(p),s.setProperty("--top",Qe(_n(_,.5,o-1))),s.setProperty("--left",Qe(_n(y,.5,r-1)))}}return e.\u0275fac=function(t){return new(t||e)(a(Wi),a(Ho),a(q,2),a(Do),a(D0,8),a(fi),a(N),a(Ln),a(ve),a(Mi,8),a(Zs),a(jn))},e.\u0275cmp=k({type:e,selectors:[["tui-hint"]],hostVars:4,hostBindings:function(t,i){t&1&&C("click",function(r){return i.onClick(r.target)},!1,Ni),t&2&&(vn("@tuiFadeIn",i.animation),fe("data-appearance",i.appearance),J("_untouchable",i.pointer))},features:[A([q,Ho,Wi,Ss("hint",Se),Ps("hint",be)])],ngContentSelectors:C0,decls:2,vars:2,consts:[[3,"innerHTML",4,"polymorpheusOutlet","polymorpheusOutletContext"],[3,"innerHTML"]],template:function(t,i){t&1&&(Ve(),me(0),T(1,y0,1,1,"span",0)),t&2&&(h(),l("polymorpheusOutlet",i.content)("polymorpheusOutletContext",i.context))},dependencies:[Je],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;line-height:1.25rem}[_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:[No]},changeDetection:0}),jt([Zt],e.prototype,"update",null),e})(),Ae=(()=>{class e extends hi{constructor(t,i,o){super(r=>this.stream$.subscribe(r)),this.zone=t,this.doc=i,this.el=o,this.id$=new no(1),this.stream$=this.id$.pipe(po(()=>pe(this.doc,"keydown",{capture:!0}),Tn),Fe(()=>this.focused?B(!1):He(pe(this.doc,"keyup"),pe(this.element,"blur")).pipe(b(()=>this.focused))),fu(r=>r?oo(1e3):B(null)),it(!1),oe(),hn(1),Jt(this.zone)),this.tuiHintDescribe="",this.type="hint"}ngOnChanges(){this.id$.next(this.tuiHintDescribe)}get focused(){return Qt(this.element)}get element(){return this.doc.getElementById(this.tuiHintDescribe||"")||this.el.nativeElement}}return e.\u0275fac=function(t){return new(t||e)(a(Xe),a(qe),a(N))},e.\u0275dir=w({type:e,selectors:[["","tuiHintDescribe",""]],inputs:{tuiHintDescribe:"tuiHintDescribe"},features:[A([Zi(e)]),W,qt]}),jt([Zt],e.prototype,"element",null),e})(),ke=(()=>{class e extends Os{constructor(t,i,o){super(t,i,o),this.type="hint"}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(hi),a(Mn))},e.\u0275dir=w({type:e,selectors:[["","tuiHint","",5,"ng-container",5,"ng-template"]],features:[A([q]),W]}),e})();var Le=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lt]]}),e})();var ml=class{constructor(n,t,i,o,r,s,c,d,p,_,y,O,L){this.change$=n,this.options=t,this.legacyAppearance=i,this.appearanceDirective=o,this.cleanerDirective=r,this.customContentDirective=s,this.iconDirective=c,this.iconLeftDirective=d,this.labelOutsideDirective=p,this.sizeDirective=_,this.prefixDirective=y,this.postfixDirective=O,this.fillerDirective=L}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}},x0={iconCleaner:"tuiIconClose",hintOnDisabled:!1},gl=ce(x0);var Zh=X(()=>new O0),O0=(()=>{class e extends Yt{constructor(){super(...arguments),this.appearance=""}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldAppearance",""]],inputs:{appearance:[0,"tuiTextfieldAppearance","appearance"]},features:[A([{provide:Zh,useExisting:mt(()=>e)}]),W]}),e})(),Xh=X(()=>new S0),S0=(()=>{class e extends Yt{constructor(){super(...arguments),this.cleaner=!1}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldCleaner",""]],inputs:{cleaner:[0,"tuiTextfieldCleaner","cleaner"]},features:[A([{provide:Xh,useExisting:mt(()=>e)}]),W]}),e})(),qh=X(()=>new P0),P0=(()=>{class e extends Yt{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldCustomContent",""]],inputs:{customContent:[0,"tuiTextfieldCustomContent","customContent"]},features:[A([{provide:qh,useExisting:mt(()=>e)}]),W]}),e})(),Kh=X(()=>new E0),E0=(()=>{class e extends Yt{constructor(){super(...arguments),this.filler=""}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldFiller",""]],inputs:{filler:[0,"tuiTextfieldFiller","filler"]},features:[A([{provide:Kh,useExisting:mt(()=>e)}]),W]}),e})(),Qh=X(()=>new A0),A0=(()=>{class e extends Yt{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldIcon",""]],inputs:{icon:[0,"tuiTextfieldIcon","icon"]},features:[A([{provide:Qh,useExisting:mt(()=>e)}]),W]}),e})(),Jh=X(()=>new k0),k0=(()=>{class e extends Yt{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldIconLeft",""]],inputs:{iconLeft:[0,"tuiTextfieldIconLeft","iconLeft"]},features:[A([{provide:Jh,useExisting:mt(()=>e)}]),W]}),e})(),ef=X(()=>new tf),tf=(()=>{class e extends Yt{constructor(){super(...arguments),this.labelOutside=!1}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldLabelOutside",""]],inputs:{labelOutside:[0,"tuiTextfieldLabelOutside","labelOutside"]},features:[A([{provide:ef,useExisting:mt(()=>e)}]),W]}),e})(),nf=X(()=>new of),of=(()=>{class e extends Yt{constructor(){super(...arguments),this.postfix=""}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldPostfix",""]],inputs:{postfix:[0,"tuiTextfieldPostfix","postfix"]},features:[A([{provide:nf,useExisting:mt(()=>e)}]),W]}),e})(),rf=X(()=>new R0),R0=(()=>{class e extends Yt{constructor(){super(...arguments),this.prefix=""}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldPrefix",""]],inputs:{prefix:[0,"tuiTextfieldPrefix","prefix"]},features:[A([{provide:rf,useExisting:mt(()=>e)}]),W]}),e})(),sf=X(()=>new af),af=(()=>{class e extends Yt{constructor(){super(...arguments),this.size="l"}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldSize",""]],inputs:{size:[0,"tuiTextfieldSize","size"]},features:[A([{provide:sf,useExisting:mt(()=>e)}]),W]}),e})(),F0=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})(),kr=new se("[TUI_TEXTFIELD_WATCHED_CONTROLLER]"),ea=[q,{provide:kr,deps:[ft,q,gl,Zp,Zh,Xh,qh,Qh,Jh,ef,sf,rf,nf,Kh],useFactory:(e,n,t,i,...o)=>{let r=He(...o.map(({change$:s})=>s||pu)).pipe(gd(e),re(n));return r.subscribe(),new ml(r,t,i,...o)}}];var ta=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["input","tuiMaskAccessor",""]],features:[A([{provide:is,deps:[[new tt,Is],ao],multi:!0,useFactory:(n,t)=>n?n[0]:t}])]}),e})(),ia=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Ki=(()=>{class e{constructor(t){this.mode$=t,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?Mo.Disabled:this.readOnly?Mo.Readonly:this.active?Mo.Active:this.hover?Mo.Hover:null}get noHover(){return this.readOnly||this.hover===!1}get noActive(){return this.readOnly||this.active===!1}}return e.\u0275fac=function(t){return new(t||e)(a(Yi))},e.\u0275dir=w({type:e,selectors:[["","tuiWrapper",""]],hostVars:10,hostBindings:function(t,i){t&1&&C("$.data-mode.attr",function(){return i.mode$}),t&2&&(fe("data-appearance",i.appearance)("data-state",i.interactiveState),J("_invalid",i.computedInvalid)("_focused",i.computedFocused)("_no-hover",i.noHover)("_no-active",i.noActive))},inputs:{disabled:"disabled",readOnly:"readOnly",hover:"hover",active:"active",focus:"focus",invalid:"invalid",appearance:"appearance"},features:[A([xn])]}),e})(),Qi=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var H0=["*"];function N0(e,n){if(e&1&&(Ie(0),Te(1),xe()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t," ")}}function j0(e,n){if(e&1&&(g(0,"div",6),T(1,N0,2,1,"ng-container",7),v()),e&2){let t=u(2);J("t-text_horizontal",t.isHorizontal),h(),l("polymorpheusOutlet",t.textContent)}}function U0(e,n){if(e&1&&(g(0,"div",2),qr(),g(1,"svg",3),S(2,"circle",4),v(),T(3,j0,2,3,"div",5),v()),e&2){let t=u();J("t-loader_horizontal",t.isHorizontal)("t-loader_inherit-color",t.inheritColor),fe("data-size",t.size),h(3),l("ngIf",t.hasText)}}var z0={size:"m",inheritColor:!1,overlay:!1},B0=ce(z0);var na=(()=>{class e{constructor(t,i,o,r){this.doc=t,this.el=i,this.isIos=o,this.options=r,this.size=this.options.size,this.inheritColor=this.options.inheritColor,this.overlay=this.options.overlay,this.loading=!0,this.isApple=Jd(this.el.nativeElement)||this.isIos}set showLoader(t){t&&this.focused&&od(this.doc),this.loading=t}get hasOverlay(){return this.overlay&&this.loading}get hasText(){return!!this.textContent}get isHorizontal(){return!Hp(this.size)}get focused(){return li(this.el.nativeElement)}}return e.\u0275fac=function(t){return new(t||e)(a(qe),a(N),a(ln),a(B0))},e.\u0275cmp=k({type:e,selectors:[["tui-loader"]],hostVars:2,hostBindings:function(t,i){t&2&&J("_loading",i.loading)},inputs:{size:"size",inheritColor:"inheritColor",overlay:"overlay",textContent:"textContent",showLoader:"showLoader"},ngContentSelectors:H0,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(t,i){t&1&&(Ve(),g(0,"fieldset",0),me(1),v(),T(2,U0,4,6,"div",1)),t&2&&(J("t-content_has-overlay",i.hasOverlay)("t-content_loading",i.loading),l("disabled",i.loading&&!i.isApple),fe("inert",i.loading||null),h(2),l("ngIf",i.loading))},dependencies:[ee,Je],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})(),oa=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lt]]}),e})();var $0=["tuiButton",""],W0=["*"];function G0(e,n){e&1&&Ut(0)}function Y0(e,n){if(e&1&&S(0,"tui-svg",8),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function Z0(e,n){if(e&1&&(g(0,"span",6),T(1,Y0,1,1,"tui-svg",7),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.icon)}}function X0(e,n){if(e&1&&S(0,"tui-svg",8),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function q0(e,n){if(e&1&&(g(0,"span",9),T(1,X0,1,1,"tui-svg",7),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.iconRight)}}function K0(e,n){if(e&1&&S(0,"tui-loader",10),e&2){let t=u();l("inheritColor",!0)("size",t.loaderSize)}}var Q0={size:"l",shape:null,appearance:Gi.Primary},_l=ce(Q0);var _e=(()=>{class e extends dr{constructor(t,i,o){var r;super(),this.mode=t,this.el=i,this.options=o,this.mode$=((r=this.mode)===null||r===void 0?void 0:r.change$)||Dt,this.appearance=null,this.disabled=!1,this.shape=this.options.shape,this.showLoader=!1,this.size=this.options.size,this.appearance$=this.mode$.pipe(it(null),b(()=>this.computedAppearance),oe())}get nativeFocusableElement(){return this.nativeDisabled?null:this.el.nativeElement}get focused(){return!this.showLoader&&Qt(this.el.nativeElement)}get loaderSize(){return this.size==="l"||this.size==="xl"?"m":"s"}get computedAppearance(){var t;return(t=this.appearance)!==null&&t!==void 0?t:this.options.appearance||""}get nativeDisabled(){return this.computedDisabled||this.showLoader?"":null}get tabIndex(){return this.focusable?0:-1}onFocused(t){this.updateFocused(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Mi,8),a(N),a(_l))},e.\u0275cmp=k({type:e,selectors:[["button","tuiButton",""],["button","tuiIconButton",""],["a","tuiButton",""],["a","tuiIconButton",""]],hostVars:7,hostBindings:function(t,i){t&1&&C("focusin",function(){return i.onFocused(!0)})("focusout",function(){return i.onFocused(!1)}),t&2&&(kn("tabIndex",i.tabIndex),fe("data-shape",i.shape)("data-size",i.size)("data-appearance",i.computedAppearance)("disabled",i.nativeDisabled),J("_loading",i.showLoader))},inputs:{appearance:"appearance",disabled:"disabled",icon:"icon",iconRight:"iconRight",shape:"shape",showLoader:"showLoader",size:"size"},features:[A([ei(e),q]),W],attrs:$0,ngContentSelectors:W0,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(t,i){t&1&&(Ve(),T(0,G0,1,0,"ng-container",0),R(1,"async"),g(2,"div",1)(3,"span",2),T(4,Z0,2,1,"span",3),me(5),T(6,q0,2,1,"span",4),v(),T(7,K0,1,2,"tui-loader",5),v()),t&2&&(l("ngIf",H(1,8,i.appearance$)),h(2),l("active",i.pseudoActive)("appearance",i.computedAppearance)("disabled",i.computedDisabled)("hover",i.pseudoHover),h(2),l("ngIf",i.icon),h(2),l("ngIf",i.iconRight),h(),l("ngIf",i.showLoader))},dependencies:[Ft,na,ee,Ki,Je,K],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%], [tuiIconButton][data-appearance=link][data-size=s][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [tuiIconButton][data-appearance=link][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})(),Me=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lt,Qi,Lt,oa]]}),e})();var eT=["tuiLink",""],tT=["*"];function iT(e,n){if(e&1&&S(0,"tui-svg",3),e&2){let t=u();l("src",t.icon||"")}}function nT(e,n){if(e&1&&S(0,"tui-svg",4),e&2){let t=u();l("src",t.icon||"")}}var ra=(()=>{class e{constructor(t,i,o){this.el=t,this.mode$=i,this.pseudo=!1,this.icon="",this.iconAlign="right",this.iconRotated=!1,this.mode=null,this.focusVisible=!1,this.focusedChange=He(pe(this.el.nativeElement,"focusin").pipe(b(Bi)),pe(this.el.nativeElement,"focusout").pipe(b(cn))),o.subscribe(r=>{this.focusVisible=r})}get nativeFocusableElement(){return this.el.nativeElement}get focused(){return Qt(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(t){return new(t||e)(a(N),a(Yi),a(mo))},e.\u0275cmp=k({type:e,selectors:[["a","tuiLink",""],["button","tuiLink",""]],hostVars:7,hostBindings:function(t,i){t&1&&C("$.data-mode.attr",function(){return i.mode$}),t&2&&(fe("data-host-mode",i.mode),J("_pseudo",i.pseudo)("_icon-rotated",i.iconRotated)("_focus-visible",i.focusVisible))},inputs:{pseudo:"pseudo",icon:"icon",iconAlign:"iconAlign",iconRotated:"iconRotated",mode:"mode"},exportAs:["tuiLink"],features:[A([ei(e),mo,q,xn])],attrs:eT,ngContentSelectors:tT,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(t,i){t&1&&(Ve(),T(0,iT,1,1,"tui-svg",0),g(1,"span",1),me(2),v(),T(3,nT,1,1,"tui-svg",2)),t&2&&(l("ngIf",i.iconAlignLeft),h(3),l("ngIf",i.iconAlignRight))},dependencies:[Ft,ee],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})(),sa=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Lt]]}),e})();function oT(e,n){if(e&1&&(Ie(0),Te(1),xe()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t," ")}}function rT(e,n){if(e&1&&(g(0,"header",6),T(1,oT,2,1,"ng-container",3),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.header)("polymorpheusOutletContext",t.context)}}function sT(e,n){if(e&1){let t=F();Ie(0),S(1,"div",7),g(2,"div",8)(3,"button",9),C("click",function(){I(t);let o=u();return x(o.context.$implicit.complete())}),Te(4),v()(),xe()}if(e&2){let t=n.polymorpheusOutlet,i=u();h(),l("innerHTML",t,gn),h(3),Ne(" ",(i.context.data==null?null:i.context.data.button)||"OK"," ")}}function aT(e,n){if(e&1){let t=F();g(0,"div",10)(1,"button",11),R(2,"async"),C("click",function(){I(t);let o=u();return x(o.close$.next())})("mousedown.prevent.silent",function(){return I(t),x(0)}),v()()}if(e&2){let t=u();h(),l("appearance",t.fullscreen?"secondary":"")("icon",t.icons.close)("title",H(2,3,t.closeWord$))}}var cT={size:"m",required:!1,closeable:!0,dismissible:!0,label:"",header:""},lT=ce(Dt),uT=ce(cT);var dT=17,cf=(()=>{class e extends _i{constructor(t,i,o){super(r=>He(this.esc$,this.mousedown$).subscribe(r)),this.win=t,this.doc=i,this.el=o,this.esc$=pe(this.doc,"keydown").pipe(et(r=>{let s=uo(r);return r.key==="Escape"&&!r.defaultPrevented&&(this.element.contains(s)||this.isOutside(s))})),this.mousedown$=pe(this.doc,"mousedown").pipe(et(r=>bo(this.win)-r.clientX>dT&&this.isOutside(uo(r))),Fe(()=>pe(this.doc,"mouseup").pipe(Wt(1),b(uo),et(r=>this.isOutside(r)))))}get element(){return this.el.nativeElement}isOutside(t){return pt(t)&&(!Ku(this.element,t)||t===this.element)}}return e.\u0275fac=function(t){return new(t||e)(ye(zt),ye(qe),ye(N))},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),pT=new Error("Required dialog was dismissed");function lf(e){return Gr(e)?e:B(e)}var hT=(()=>{class e{constructor(t,i,o,r,s,c,d,p){this.duration=t,this.isMobile=i,this.context=o,this.closeWord$=d,this.icons=p,this.animation={value:"",params:{start:"40px",duration:this.duration}},this.fullscreenAnimation={value:"",params:{start:"100vh",duration:this.duration}},this.close$=new Ze,He(this.close$.pipe(Fe(()=>lf(o.closeable))),s.pipe(Fe(()=>lf(o.dismissible))),c.pipe(b(Bi))).pipe(et(Boolean),re(r)).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(pT):this.context.$implicit.complete()}}return e.\u0275fac=function(t){return new(t||e)(a(bc),a(fo),a(Ln),a(q,2),a(cf),a(lT),a(Ds),a(wo))},e.\u0275cmp=k({type:e,selectors:[["tui-dialog"]],hostVars:6,hostBindings:function(t,i){t&2&&(vn("@tuiSlideInTop",i.slideInTop)("@tuiFadeIn",i.slideInTop),fe("data-appearance",i.context.appearance)("data-size",i.size),J("_centered",i.header))},features:[A([q,cf])],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,"click","mousedown.prevent.silent","appearance","icon","title"]],template:function(t,i){t&1&&(T(0,rT,2,2,"header",0),g(1,"div",1),S(2,"h2",2),g(3,"section"),T(4,sT,5,2,"ng-container",3),v()(),S(5,"div",4),T(6,aT,3,5,"div",5)),t&2&&(l("ngIf",i.header),h(2),l("id",i.context.id)("textContent",i.context.label),h(2),l("polymorpheusOutlet",i.context.content)("polymorpheusOutletContext",i.context),h(2),l("ngIf",i.context.closeable))},dependencies:[_e,ee,Je,ms,K],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:[zh,No]}}),e})(),fT=new ui(hT),mT=(()=>{class e extends hs{constructor(){super(...arguments),this.component=fT,this.defaultOptions=Object.assign(Object.assign({},V(uT)),{data:void 0})}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var qP=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({providers:[Md(mT)],imports:[[lt,Me,z,gs]]}),e})();var uf=(()=>{class e{constructor(t){this.service=t}transform(t){return this.service.format(t.valueOf())}}return e.\u0275fac=function(t){return new(t||e)(a(Fh,16))},e.\u0275pipe=Ii({name:"tuiFormatDate",type:e,pure:!0}),e})(),df=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var gT=(()=>{class e{constructor(t){this.months$=t}transform({month:t}){return this.months$.pipe(b(i=>i[t]))}}return e.\u0275fac=function(t){return new(t||e)(a(Up,16))},e.\u0275pipe=Ii({name:"tuiMonth",type:e,pure:!0}),e})(),iE=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var vT=["tuiOption",""],pf=["*"],_T=e=>({$implicit:e});function TT(e,n){if(e&1&&(Ie(0),Te(1),xe()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t,` -`)}}function CT(e,n){if(e&1&&S(0,"tui-svg",3),e&2){let t=u(2);l("src",t.icons.more)}}function yT(e,n){if(e&1&&(me(0),T(1,CT,1,1,"tui-svg",2)),e&2){let t=u();h(),l("ngIf",t.dropdown)}}function bT(e,n){if(e&1&&(Ie(0),Te(1),xe()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t," ")}}function MT(e,n){if(e&1&&(g(0,"div",2),T(1,bT,2,1,"ng-container",3),R(2,"async"),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.emptyContent||H(2,1,t.defaultEmptyContent$))}}function DT({currentTarget:e}){return!this.isMobile&&!Qt(e)}var Sn=(()=>{class e{constructor(t,i,o,r,s,c,d){this.isMobile=t,this.content=i,this.dataList=o,this.el=r,this.host=s,this.dropdown=c,this.icons=d,this.size=null,this.role="option",this.disabled=!1}get active(){return!!this.dropdown&&!!this.dropdown.dropdownBoxRef}onClick(){this.host&&this.value!==void 0&&this.host.handleOption(this.value)}onMouseMove({currentTarget:t}){t.focus({preventScroll:!0})}ngOnDestroy(){var t;(t=this.dataList)===null||t===void 0||t.handleFocusLossIfNecessary(this.el.nativeElement)}}return e.\u0275fac=function(t){return new(t||e)(a(fo),a($p,8),a(mt(()=>Pn),8),a(N),a(Mc,8),a(ii,10),a(wo))},e.\u0275cmp=k({type:e,selectors:[["button","tuiOption",""],["a","tuiOption",""]],hostAttrs:["tabIndex","-1","type","button"],hostVars:5,hostBindings:function(t,i){t&1&&C("click",function(){return i.onClick()})("mousemove.silent",function(r){return i.onMouseMove(r)}),t&2&&(fe("disabled",i.disabled||null)("data-size",i.size)("role",i.role),J("_with-dropdown",i.active))},inputs:{size:"size",role:"role",disabled:"disabled",value:"value"},attrs:vT,ngContentSelectors:pf,decls:3,vars:4,consts:[["base",""],[4,"polymorpheusOutlet","polymorpheusOutletContext"],["class","t-arrow",3,"src",4,"ngIf"],[1,"t-arrow",3,"src"]],template:function(t,i){if(t&1&&(Ve(),T(0,TT,2,1,"ng-container",1)(1,yT,2,1,"ng-template",null,0,de)),t&2){let o=j(2);l("polymorpheusOutlet",i.content||o)("polymorpheusOutletContext",Oi(2,_T,o))}},dependencies:[Ft,Je,ee],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}'],changeDetection:0}),jt([qs(DT)],e.prototype,"onMouseMove",null),e})(),Pn=(()=>{class e{constructor(t,i,o){var r;this.controller=t,this.el=i,this.defaultEmptyContent$=o,this.options=ns,this.role="listbox",this.size=((r=this.controller)===null||r===void 0?void 0:r.size)||"m"}get empty$(){return hd(this.options).pipe(b(({length:t})=>!t))}onFocusIn(t,i){!i.contains(t)&&!this.origin&&(this.origin=t)}noop(){}onKeyDownArrow(t,i){let{elements:o}=this;Za(o.indexOf(t),o,i)}handleFocusLossIfNecessary(t=this.el.nativeElement){this.origin&&li(t)&&sd(this.origin,!0,!0)}getOptions(t=!1){return this.options.filter(({disabled:i})=>t||!i).map(({value:i})=>i).filter(Tn)}onFocus({target:t},i){if(!pt(t))return;let{elements:o}=this;Za(i?-1:o.length,o,i?1:-1),this.handleFocusLossIfNecessary(t)}get elements(){return Array.from(this.el.nativeElement.querySelectorAll("[tuiOption]"))}}return e.\u0275fac=function(t){return new(t||e)(a(kr,8),a(N),a(zp))},e.\u0275cmp=k({type:e,selectors:[["tui-data-list"]],contentQueries:function(t,i,o){if(t&1&&Rn(o,Sn,5),t&2){let r;$e(r=We())&&(i.options=r)}},hostVars:2,hostBindings:function(t,i){t&1&&C("focusin",function(r){return i.onFocusIn(r.relatedTarget,r.currentTarget)})("mousedown.prevent",function(){return i.noop()})("keydown.arrowDown.prevent",function(r){return i.onKeyDownArrow(r.target,1)})("keydown.arrowUp.prevent",function(r){return i.onKeyDownArrow(r.target,-1)})("wheel.silent.passive",function(){return i.handleFocusLossIfNecessary()})("mouseleave",function(r){return i.handleFocusLossIfNecessary(r.target)}),t&2&&fe("role",i.role)("data-list-size",i.size)},inputs:{role:"role",emptyContent:"emptyContent",size:"size"},features:[A([jp(e),ea])],ngContentSelectors:pf,decls:5,vars:3,consts:[["tabindex","0",1,"t-trap",3,"focusin"],["class","t-empty",4,"ngIf"],[1,"t-empty"],[4,"polymorpheusOutlet"]],template:function(t,i){t&1&&(Ve(),g(0,"div",0),C("focusin",function(r){return i.onFocus(r,!0)}),v(),me(1),T(2,MT,3,3,"div",1),R(3,"async"),g(4,"div",0),C("focusin",function(r){return i.onFocus(r,!1)}),v()),t&2&&(h(2),l("ngIf",H(3,1,i.empty$)))},dependencies:[ee,Je,K],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} -`],encapsulation:2,changeDetection:0}),jt([Zt],e.prototype,"empty$",null),e})(),wT=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["ng-template","tuiDataList",""]]}),e})();var hf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["tui-opt-group"]],hostAttrs:["role","group"],hostVars:1,hostBindings:function(t,i){t&2&&fe("data-label",i.label)},inputs:{label:"label"}}),e})(),Yn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Lt,lt]]}),e})();var IT=["wrapper"],xT=["*"],OT=(e,n)=>({$implicit:e,close:n});function ST(e,n){if(e&1&&(g(0,"div",8),Te(1),v()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t," ")}}function PT(e,n){if(e&1){let t=F();g(0,"div",6,2),C("keydown",function(o){I(t);let r=u(2);return x(r.onKeydown(o))}),T(2,ST,2,1,"div",7),v(),S(3,"div")}if(e&2){u();let t=j(1),i=u();h(2),l("polymorpheusOutlet",i.content)("polymorpheusOutletContext",Jr(2,OT,t,i.close))}}function ET(e,n){if(e&1){let t=F();g(0,"div",4,0),C("tuiActiveZoneChange",function(o){I(t);let r=u();return x(r.onActiveZone(o))})("tuiObscured",function(o){I(t);let r=u();return x(r.onHostObscured(o))}),me(2),T(3,PT,4,5,"ng-template",5,1,de),v()}if(e&2){let t=n.tuiLet,i=j(4),o=u();l("tuiDropdown",i)("tuiDropdownManual",t&&o.canOpen)("tuiDropdownSided",o.sided)("tuiObscuredEnabled",t),h(3),l("polymorpheus",o.context)}}var ff=(()=>{class e extends kt{constructor(){super(...arguments),this.type="dummy"}getPosition(){return[0,0]}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiAccessorProxy",""]],features:[A([{provide:kt,multi:!0,deps:[[new tt,new si,e],e],useFactory:(n,t)=>n||t}]),W]}),e})(),mf=new se("[TUI_HOSTED_DROPDOWN_COMPONENT]"),AT=(()=>{class e{constructor(t,i,o,r){r==null||r.tuiDropdownOpenChange.pipe(et(s=>s&&r.dropdown===o&&!i.focused),re(t)).subscribe(()=>{var s;(s=i.nativeFocusableElement)===null||s===void 0||s.focus(),i.updateOpen(!0)})}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(mf),a(ii,2),a(hl,8))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdownOpenMonitor",""]],features:[A([q])]}),e})(),kT=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiHostedDropdownHost",""]]}),e})();function RT(e){var n;return"key"in e&&e.key.toLowerCase()==="escape"&&this.canOpen&&this.open&&!(!((n=this.dropdown)===null||n===void 0)&&n.nextElementSibling)}var ot=(()=>{class e{constructor(t,i){this.hover$=t,this.el=i,this.openChange$=new Ke(!1),this.hostHover$=wt([pe(this.el.nativeElement,"mouseover").pipe(b(o=>this.computedHost.contains(uo(o))),Fe(o=>{var r,s;return B(o).pipe(ri((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$||Dt]).pipe(b(([o,r])=>o&&r)),this.sided=!1,this.canOpen=!0,this.open$=He(this.openChange$,this.hostHover$).pipe(hn(1),oe(),on()),this.focusedChange=new Pe,this.openChange=this.openChange$,this.close=()=>this.updateOpen(!1)}set open(t){this.openChange.next(t)}get open(){return this.openChange.value}get host(){var t;return((t=this.dropdownHost)===null||t===void 0?void 0:t.nativeElement)||this.el.nativeElement}get computedHost(){var t;return((t=this.dropdownHost)===null||t===void 0?void 0:t.nativeElement)||this.nativeFocusableElement||this.el.nativeElement}get dropdown(){var t,i;return(i=(t=this.dropdownDirective)===null||t===void 0?void 0:t.dropdownBoxRef)===null||i===void 0?void 0:i.location.nativeElement}get nativeFocusableElement(){return rd(this.host)?this.host:Pi({initial:this.host,root:this.el.nativeElement})}get focused(){return li(this.host)||this.open&&!!this.wrapper&&li(this.wrapper.nativeElement)}onFocusInOut(){this.el.nativeElement.classList.toggle("_hosted_dropdown_focused",this.focused)}onFocusIn(t){this.computedHost.contains(t)||this.updateOpen(!1)}onClick(t){var i;!this.hostEditable&&this.computedHost.contains(t)&&!(!((i=this.hover$)===null||i===void 0)&&i.hovered)&&this.updateOpen(!this.open)}onKeyDownEsc(t){t.preventDefault(),this.closeDropdown()}onArrow(t,i){this.focusDropdown(t,i)}onKeydown({key:t,target:i,defaultPrevented:o}){!o&&Fp(t)&&this.hostEditable&&ss(i)&&!cs(i)&&this.focusHost()}onActiveZone(t){this.updateFocused(t),t||this.updateOpen(!1)}onHostObscured(t){t&&this.closeDropdown()}updateOpen(t){(!t||this.canOpen)&&(this.open=t)}get hostEditable(){return cs(this.computedHost)}focusDropdown(t,i){let o=this.nativeFocusableElement;if(!o||!ss(o)||!pt(t.target)||!o.contains(t.target))return;if(!this.wrapper||!this.open||!this.dropdown||!ss(this.wrapper.nativeElement.nextElementSibling)){this.updateOpen(!0),cs(o)||t.preventDefault();return}let r=i?this.wrapper.nativeElement:this.wrapper.nativeElement.nextElementSibling,s=Pi({initial:r,root:this.wrapper.nativeElement,previous:!i});s&&(s.focus(),t.preventDefault())}closeDropdown(){this.focused&&this.focusHost(),this.updateOpen(!1)}focusHost(){let t=this.nativeFocusableElement;t&&t.focus({preventScroll:!0})}updateFocused(t){this.focusedChange.emit(t)}}return e.\u0275fac=function(t){return new(t||e)(a(fl,10),a(N))},e.\u0275cmp=k({type:e,selectors:[["tui-hosted-dropdown"]],contentQueries:function(t,i,o){if(t&1&&Rn(o,kT,5,N),t&2){let r;$e(r=We())&&(i.dropdownHost=r.first)}},viewQuery:function(t,i){if(t&1&&(at(IT,5,N),at(ii,5),at(gt,5)),t&2){let o;$e(o=We())&&(i.wrapper=o.first),$e(o=We())&&(i.dropdownDirective=o.first),$e(o=We())&&(i.activeZone=o.first)}},hostBindings:function(t,i){t&1&&C("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,Ni)("keydown.arrowDown",function(r){return i.onArrow(r,!0)})("keydown.arrowUp",function(r){return i.onArrow(r,!1)})},inputs:{content:"content",sided:"sided",canOpen:"canOpen",open:"open"},outputs:{open$:"openChange",focusedChange:"focusedChange"},features:[A([ei(e),{provide:ff,deps:[[new tt,new fn,kt]],useFactory:n=>n==null?void 0:n[0]},{provide:mf,useExisting:e}])],ngContentSelectors:xT,decls:2,vars:3,consts:[["activeZone","tuiActiveZone"],["dropdown","polymorpheus"],["wrapper",""],["tuiAccessorProxy","","tuiDropdownOpenMonitor","","class","t-wrapper",3,"tuiDropdown","tuiDropdownManual","tuiDropdownSided","tuiObscuredEnabled","tuiActiveZoneChange","tuiObscured",4,"tuiLet"],["tuiAccessorProxy","","tuiDropdownOpenMonitor","",1,"t-wrapper",3,"tuiActiveZoneChange","tuiObscured","tuiDropdown","tuiDropdownManual","tuiDropdownSided","tuiObscuredEnabled"],[3,"polymorpheus"],[1,"t-dropdown",3,"keydown"],["class","t-primitive",4,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-primitive"]],template:function(t,i){if(t&1&&(Ve(),T(0,ET,5,5,"div",3),R(1,"async")),t&2){let o;l("tuiLet",(o=H(1,1,i.open$))!==null&&o!==void 0?o:i.openChange.value)}},dependencies:[xt,ff,AT,ii,Ks,Wn,$h,Wh,gt,Cp,ur,Je,K],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}),jt([qs(RT)],e.prototype,"onKeyDownEsc",null),e})(),rt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lt,Ot,yp,yi,vi]]}),e})();function FT(e,n){if(e&1&&S(0,"tui-svg",3),e&2){let t=n.polymorpheusOutlet;l("src",t)}}var gf=(()=>{class e extends Js{constructor(t,i,o,r){super(o),this.isMobile=r,this.mode=null,this.describeId="",i.pipe(re(t)).subscribe(s=>{this.mode=s})}get computedAppearance(){return this.appearance||this.mode||""}stopOnMobile(t){var i;this.isMobile&&(t.preventDefault(),t.stopPropagation()),(i=this.driver$)===null||i===void 0||i.toggle()}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(Yi),a(Gn),a(fo))},e.\u0275cmp=k({type:e,selectors:[["tui-tooltip"]],viewQuery:function(t,i){if(t&1&&at(ve,5),t&2){let o;$e(o=We())&&(i.driver$=o.first)}},hostVars:1,hostBindings:function(t,i){t&1&&C("mousedown",function(r){return i.stopOnMobile(r)}),t&2&&fe("data-appearance",i.computedAppearance)},inputs:{content:"content",direction:"direction",appearance:"appearance",showDelay:"showDelay",hideDelay:"hideDelay",describeId:"describeId",context:"context"},features:[A([q,xn]),W],decls:4,vars:11,consts:[["driver","tuiHintHover"],["appearance","icon","automation-id","tui-tooltip__icon","tuiWrapper","",1,"t-tooltip-icon",3,"hover","tuiHint","tuiHintAppearance","tuiHintContext","tuiHintDescribe","tuiHintDirection","tuiHintHideDelay","tuiHintShowDelay"],[3,"src",4,"polymorpheusOutlet"],[3,"src"]],template:function(t,i){if(t&1&&(g(0,"span",1,0),R(2,"async"),T(3,FT,1,1,"tui-svg",2),v()),t&2){let o=j(1);l("hover",H(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),h(3),l("polymorpheusOutlet",i.icon)}},dependencies:[Ft,Ki,be,ke,ve,Se,Ae,Je,K],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}),e})(),vf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Qi,Lt,Le,lt]]}),e})();var HT=["pre"],NT=["focusableElement"],jT=[[["input"]],[["select"]],[["tuiContent"]],"*"],UT=["input","select","tuiContent","*"],Tl=e=>({$implicit:e});function zT(e,n){e&1&&Ut(0)}function BT(e,n){e&1&&Ut(0)}function VT(e,n){e&1&&(g(0,"div",17),me(1,2),v())}function $T(e,n){if(e&1&&S(0,"tui-svg",20),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function WT(e,n){if(e&1&&(g(0,"div",18),T(1,$T,1,1,"tui-svg",19),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.iconLeftContent)("polymorpheusOutletContext",Oi(2,Tl,t.size))}}function GT(e,n){if(e&1&&(g(0,"label",21),me(1,3),v()),e&2){let t=u();J("t-placeholder_raised",t.placeholderRaised),l("for",t.computedId)}}function YT(e,n){if(e&1&&S(0,"tui-svg",24),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function ZT(e,n){if(e&1&&(g(0,"div",22),T(1,YT,1,1,"tui-svg",23),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.controller.customContent)}}function XT(e,n){if(e&1&&S(0,"tui-svg",27),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function qT(e,n){if(e&1){let t=F();g(0,"span",25),C("click.stop",function(){I(t);let o=u();return x(o.clear())}),T(1,XT,1,1,"tui-svg",26),v()}if(e&2){let t=u();h(),l("polymorpheusOutlet",t.iconCleaner||t.controller.options.iconCleaner)("polymorpheusOutletContext",Oi(2,Tl,t.size))}}function KT(e,n){if(e&1&&S(0,"tui-tooltip",28),e&2){let t=u();l("content",t.hintOptions==null?null:t.hintOptions.content)("describeId",t.computedId)}}function QT(e,n){if(e&1&&S(0,"tui-svg",20),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function JT(e,n){if(e&1&&(g(0,"div",29),T(1,QT,1,1,"tui-svg",19),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.iconContent)("polymorpheusOutletContext",Oi(2,Tl,t.size))}}var eC=(()=>{class e{constructor(t,i){this.textfield=t,this.fontsReady$=i,this.prefix$=new Ke(""),this.pre$=He(this.fontsReady$,this.prefix$).pipe(ri(0),et(()=>{var o;return!!(!((o=this.pre)===null||o===void 0)&&o.nativeElement.isConnected)}),b(()=>{var o;return((o=this.pre)===null||o===void 0?void 0:o.nativeElement.offsetWidth)||0}),oe())}get isContextTable(){return this.textfield.appearance===Gi.Table}get value(){return this.textfield.value}get filler(){let{focused:t,placeholder:i,exampleText:o,value:r,textfield:s}=this;return i&&o?"":t?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 t;return((t=this.textfield.nativeFocusableElement)===null||t===void 0?void 0:t.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)?` ${this.textfield.postfix}`:this.textfield.postfix}}return e.\u0275fac=function(t){return new(t||e)(a(ho),a(Dd))},e.\u0275cmp=k({type:e,selectors:[["tui-value-decoration"]],viewQuery:function(t,i){if(t&1&&at(HT,7,N),t&2){let o;$e(o=We())&&(i.pre=o.first)}},hostVars:4,hostBindings:function(t,i){t&1&&C("animationstart",function(){return i.ngDoCheck()}),t&2&&J("_table",i.isContextTable)("_filler",i.filler)},decls:5,vars:4,consts:[["pre",""],[1,"t-prefix",3,"textContent"],[1,"t-ghost",3,"textContent"],[1,"t-filler",3,"textContent"],[1,"t-postfix",3,"textContent"]],template:function(t,i){t&1&&S(0,"span",1,0)(2,"span",2)(3,"span",3)(4,"span",4),t&2&&(l("textContent",i.prefix),h(2),l("textContent",i.value),h(),l("textContent",i.filler),h(),l("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}']}),e})(),tC={s:1.25,m:1.75,l:2.25},_f=(()=>{class e extends dr{constructor(t,i,o,r){super(),this.controller=t,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 Pe,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:t}=this.focusableElement;return t.previousElementSibling||t}get focused(){return li(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 t;return!!(!((t=this.content)===null||t===void 0)&&t.length)}get hasValue(){return!!this.value}get hasCleaner(){return this.controller.cleaner&&this.hasValue&&!this.computedDisabled&&!this.readOnly}get hasTooltip(){var t;return!!(!((t=this.hintOptions)===null||t===void 0)&&t.content)&&!this.computedDisabled}get hasCustomContent(){return!!this.controller.customContent}get placeholderVisible(){var t;let o=(((t=this.nativeFocusableElement)===null||t===void 0?void 0:t.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 Rp(!!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 t;return!!(!((t=this.hintOptions)===null||t===void 0)&&t.content)&&(this.options.hintOnDisabled||!this.computedDisabled)}get name(){var t;return((t=this.nativeFocusableElement)===null||t===void 0?void 0:t.autocomplete)==="cc-exp"?"ccexpiryyear":null}get computedId(){var t;return((t=this.nativeFocusableElement)===null||t===void 0?void 0:t.id)||""}onFocused(t){this.updateFocused(t)}getIndent$(t){return er(t,"scroll").pipe(b(()=>-1*Math.max(t.scrollLeft,0)))}clear(){this.nativeFocusableElement&&(this.nativeFocusableElement.value=""),this.updateValue("")}onMouseDown(t){let{nativeFocusableElement:i}=this;!i||t.target===i||(t.preventDefault(),i.focus())}onModelChange(t){this.updateValue(t)}onAutofilled(t){this.updateAutofilled(t)}detectRetargetFromLabel(t){id(t)&&t.stopImmediatePropagation()}get iconPaddingLeft(){return tC[this.size]}get placeholderRaisable(){return this.size!=="s"&&!this.controller.labelOutside}updateAutofilled(t){this.autofilled!==t&&(this.autofilled=t)}updateValue(t){this.value=t,this.valueChange.emit(t)}}return e.\u0275fac=function(t){return new(t||e)(a(kr),a(Js,8),a(gl),a(N))},e.\u0275cmp=k({type:e,selectors:[["tui-primitive-textfield"]],contentQueries:function(t,i,o){if(t&1&&Rn(o,Je,5),t&2){let r;$e(r=We())&&(i.content=r)}},viewQuery:function(t,i){if(t&1&&at(NT,5),t&2){let o;$e(o=We())&&(i.focusableElement=o.first)}},hostVars:15,hostBindings:function(t,i){t&1&&C("focusin",function(){return i.onFocused(!0)})("focusout",function(){return i.onFocused(!1)}),t&2&&(fe("data-size",i.size),nt("--border-start",i.borderStart,"rem")("--border-end",i.borderEnd,"rem"),J("_autofilled",i.autofilled)("_label-outside",i.controller.labelOutside)("_readonly",i.readOnly)("_invalid",i.computedInvalid)("_hidden",i.inputHidden))},inputs:{editable:"editable",textfieldFiller:[0,"filler","textfieldFiller"],iconCleaner:"iconCleaner",readOnly:"readOnly",invalid:"invalid",disabled:"disabled",textfieldPrefix:[0,"prefix","textfieldPrefix"],textfieldPostfix:[0,"postfix","textfieldPostfix"],value:"value"},outputs:{valueChange:"valueChange"},features:[A([ei(e),ea]),W],ngContentSelectors:UT,decls:24,vars:37,consts:[["focusableElement",""],["decor",""],[4,"ngIf"],["automation-id","tui-primitive-textfield__wrapper","tuiWrapper","",3,"click.prevent.silent","mousedown","tuiAutofilledChange","active","appearance","disabled","focus","hover","invalid","readOnly"],["automation-id","tui-primitive-textfield__native-input","tuiMaskAccessor","",1,"t-input",3,"ngModelChange","disabled","id","ngModel","readOnly","tuiFocusable"],["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"],[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(t,i){if(t&1){let o=F();Ve(jT),T(0,zT,1,0,"ng-container",2),R(1,"async"),T(2,BT,1,0,"ng-container",2),R(3,"async"),g(4,"div",3),R(5,"async"),C("click.prevent.silent",function(s){return I(o),x(i.detectRetargetFromLabel(s))})("mousedown",function(s){return I(o),x(i.onMouseDown(s))})("tuiAutofilledChange",function(s){return I(o),x(i.onAutofilled(s))}),me(6),me(7,1),g(8,"input",4,0),C("ngModelChange",function(s){return I(o),x(i.onModelChange(s))}),v(),T(10,VT,2,0,"div",5),g(11,"div",6),T(12,WT,2,4,"div",7),g(13,"div",8),T(14,GT,2,3,"label",9),g(15,"div",10),S(16,"tui-value-decoration",11,1),R(18,"async"),v()(),g(19,"div",12),T(20,ZT,2,1,"div",13)(21,qT,2,4,"span",14)(22,KT,1,2,"tui-tooltip",15)(23,JT,2,4,"div",16),v()()()}if(t&2){let o=j(9),r=j(17);l("ngIf",H(1,29,i.content==null?null:i.content.changes)),h(2),l("ngIf",H(3,31,i.hintOptions==null?null:i.hintOptions.change$)),h(2),nt("--text-indent",H(5,33,r.pre$),"px"),l("active",i.pseudoActive)("appearance",i.appearance)("disabled",i.disabled)("focus",i.computedFocused)("hover",i.pseudoHover)("invalid",i.computedInvalid)("readOnly",i.readOnly),h(4),l("disabled",i.computedDisabled)("id",i.id)("ngModel",i.value)("readOnly",i.readOnly||!i.editable)("tuiFocusable",i.computedFocusable),fe("aria-invalid",i.computedInvalid)("name",i.name),h(2),l("ngIf",i.inputHidden),h(2),l("ngIf",i.iconLeftContent),h(2),l("ngIf",i.hasPlaceholder),h(2),nt("text-indent",H(18,35,i.getIndent$(o)),"px"),J("t-has-value",i.value),h(4),l("ngIf",i.hasCustomContent),h(),l("ngIf",i.hasCleaner),h(),l("ngIf",i.showHint),h(),l("ngIf",i.iconContent)}},dependencies:[Ft,eC,gf,ee,Ki,dp,ta,ao,co,an,yn,Je,K],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}@supports (-webkit-touch-callout: none){.t-input[_ngcontent-%COMP%]:active{font-size:1rem}}.t-input[inputMode=none][_ngcontent-%COMP%]{caret-color:transparent}.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=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=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]{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%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-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}),jt([Zt],e.prototype,"getIndent$",null),e})(),iC=(()=>{class e extends Qp{constructor(t){super(t),this.textfield=t}get readOnly(){return this.textfield.readOnly||!this.textfield.editable}onValueChange(t){this.textfield.onModelChange(t)}}return e.\u0275fac=function(t){return new(t||e)(a(_f))},e.\u0275dir=w({type:e,selectors:[["tui-primitive-textfield"]],features:[A([qp(e)]),W]}),e})();var nC=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lo,lt,ia,bn,Qi,Lt,vf,pp]]}),e})();var oC=[[["img"]],[["tui-svg"]],"*",[["","tuiButton",""]],[["","tuiLink",""]]],rC=["img","tui-svg","*","[tuiButton]","[tuiLink]"];function sC(e,n){if(e&1){let t=F();g(0,"button",10),R(1,"async"),C("click",function(){I(t);let o=u();return x(o.close.emit())}),v()}if(e&2){let t=u();nt("border-radius",50,"%"),l("icon",t.icons.close)("title",H(1,4,t.closeWord$))}}function aC(e,n){if(e&1&&(S(0,"span",11),R(1,"tuiFormatDate"),R(2,"async")),e&2){let t=u();l("textContent",t.isString(t.timestamp)?t.timestamp:H(2,3,H(1,1,t.timestamp)))}}function cC(e,n){if(e&1&&S(0,"img",8),e&2){let t=u(2);l("src",t.context.image,Kr)}}function lC(e,n){if(e&1&&S(0,"tui-svg",9),e&2){let t=u(2);nt("color",t.context.iconColor),l("src",t.context.icon)}}function uC(e,n){if(e&1&&S(0,"div",10),e&2){let t=n.polymorpheusOutlet;l("innerHTML",t,gn)}}function dC(e,n){if(e&1){let t=F();g(0,"button",11),C("click",function(){I(t);let o=u(2);return x(o.context.$implicit.next(o.context.buttons[0]))}),Te(1),v()}if(e&2){let t=u(2);h(),Ne(" ",t.context.buttons[0]," ")}}function pC(e,n){if(e&1){let t=F();g(0,"button",12),C("click",function(){I(t);let o=u(2);return x(o.context.$implicit.next(o.context.buttons[o.context.buttons.length-1]))}),Te(1),v()}if(e&2){let t=u(2);h(),Ne(" ",t.context.buttons[t.context.buttons.length-1]," ")}}function hC(e,n){if(e&1){let t=F();g(0,"tui-push",2),C("close",function(){I(t);let o=u();return x(o.context.$implicit.complete())}),T(1,cC,1,1,"img",3)(2,lC,1,3,"tui-svg",4)(3,uC,1,1,"div",5)(4,dC,2,1,"button",6)(5,pC,2,1,"button",7),v()}if(e&2){let t=u();l("heading",t.context.heading)("timestamp",t.context.timestamp)("type",t.context.type),h(),l("ngIf",t.context.image),h(),l("ngIf",t.context.icon),h(),l("polymorpheusOutlet",t.context.content)("polymorpheusOutletContext",t.context),h(),l("ngIf",t.context.buttons.length>1),h(),l("ngIf",t.context.buttons.length)}}function fC(e,n){e&1&&Ut(0)}function mC(e,n){if(e&1&&T(0,fC,1,0,"ng-container",13),e&2){let t=u();l("polymorpheusOutlet",t.context.content)}}var gC=(()=>{class e{constructor(t,i){this.closeWord$=t,this.icons=i,this.heading="",this.type="",this.lines=2,this.timestamp="",this.close=new Pe,this.isString=ci}get closeable(){return pd(this.close)}}return e.\u0275fac=function(t){return new(t||e)(a(Ds),a(wo))},e.\u0275cmp=k({type:e,selectors:[["tui-push"]],hostVars:2,hostBindings:function(t,i){t&2&&nt("--t-lines",i.lines)},inputs:{heading:"heading",type:"type",lines:"lines",timestamp:"timestamp"},outputs:{close:"close"},ngContentSelectors:rC,decls:17,vars:4,consts:[[1,"t-image"],["appearance","","size","xs","tuiIconButton","","type","button","class","t-close",3,"icon","border-radius","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","","size","xs","tuiIconButton","","type","button",1,"t-close",3,"click","icon","title"],[1,"t-time",3,"textContent"]],template:function(t,i){t&1&&(Ve(oC),g(0,"div",0),me(1),v(),T(2,sC,2,6,"button",1),g(3,"div",2)(4,"span",3),me(5,1),v(),Te(6),T(7,aC,3,5,"span",4),v(),g(8,"h3",5),Te(9),v(),g(10,"div",6),me(11,2),v(),g(12,"div",7)(13,"span",8),me(14,3),v(),g(15,"span",9),me(16,4),v()()),t&2&&(h(2),l("ngIf",i.closeable),h(4),Ne(" ",i.type," "),h(),l("ngIf",i.timestamp),h(2),Ne(" ",i.heading,` -`))},dependencies:[_e,ee,K,uf],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:var(--t-lines);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})(),vC=(()=>{class e extends Mi{constructor(t){var i;super(),this.modeDirective=t,this.size="s",this.shape=null,this.change$=((i=this.modeDirective)===null||i===void 0?void 0:i.change$)||new Ze}get appearance(){var t;return((t=this.modeDirective)===null||t===void 0?void 0:t.mode)==="onDark"?"accent":"secondary"}}return e.\u0275fac=function(t){return new(t||e)(a(Mi,12))},e.\u0275dir=w({type:e,selectors:[["tui-push"]],features:[A([{provide:Mi,useExisting:e},{provide:_l,useExisting:e}]),W]}),e})(),_C={heading:"",type:"",timestamp:"",image:"",icon:"",iconColor:"",buttons:[]},TC=ce(_C);var CC=(()=>{class e extends ur{constructor(t,i,o,r){super(t,i),this.show$=new Ze,this.show$.pipe(po(()=>r.open(this)),re(o)).subscribe()}set tuiPush(t){this.show$.next(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Kt),a(ft),a(q,2),a(mt(()=>Tf)))},e.\u0275dir=w({type:e,selectors:[["","tuiPush",""]],inputs:{tuiPush:"tuiPush"},features:[A([q]),W]}),e})(),yC=(()=>{class e{constructor(t,i){this.animation=t,this.context=i}get isDirective(){return this.context.content instanceof CC}}return e.\u0275fac=function(t){return new(t||e)(a(Do),a(Ln))},e.\u0275cmp=k({type:e,selectors:[["tui-push-alert"]],hostAttrs:["role","alert"],hostVars:3,hostBindings:function(t,i){t&2&&vn("@tuiFadeIn",i.animation)("@tuiSlideInRight",i.animation)("@tuiHeightCollapse",i.animation)},decls:3,vars:2,consts:[["directive",""],[3,"heading","timestamp","type","close",4,"ngIf","ngIfElse"],[3,"close","heading","timestamp","type"],["alt","",3,"src",4,"ngIf"],[3,"src","color",4,"ngIf"],[3,"innerHTML",4,"polymorpheusOutlet","polymorpheusOutletContext"],["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"],[4,"polymorpheusOutlet"]],template:function(t,i){if(t&1&&T(0,hC,6,9,"tui-push",1)(1,mC,1,1,"ng-template",null,0,de),t&2){let o=j(2);l("ngIf",!i.isDirective)("ngIfElse",o)}},dependencies:[gC,Ft,_e,ra,ee,vC,Je],styles:["[_nghost-%COMP%]{max-width:calc(100% - 2rem);margin:0 1rem 1rem auto}[_nghost-%COMP%]:first-child{margin-top:auto}"],data:{animation:[No,Uh,Nh]},changeDetection:0}),e})(),Tf=(()=>{class e extends hs{constructor(){super(...arguments),this.component=new ui(yC),this.defaultOptions=V(TC)}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),nk=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({providers:[{provide:yd,useExisting:Tf,multi:!0}],imports:[[z,lt,Me,sa,Lt,df]]}),e})();var bC=["focusableElement"],Cf=e=>({$implicit:e});function MC(e,n){if(e&1&&S(0,"tui-loader",7),e&2){let t=u();l("inheritColor",!0)("showLoader",t.value)("size",t.loaderSize)}}function DC(e,n){if(e&1&&S(0,"tui-svg",10),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function wC(e,n){if(e&1&&(g(0,"span",8),T(1,DC,1,1,"tui-svg",9),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.iconOn)("polymorpheusOutletContext",Oi(2,Cf,t.size))}}function IC(e,n){if(e&1&&S(0,"tui-loader",7),e&2){let t=u();l("inheritColor",!0)("showLoader",!t.value)("size",t.loaderSize)}}function xC(e,n){if(e&1&&S(0,"tui-svg",12),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function OC(e,n){if(e&1&&(g(0,"span",8),T(1,xC,1,1,"tui-svg",11),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.iconOff)("polymorpheusOutletContext",Oi(2,Cf,t.size))}}var SC={icons:{toggleOff({$implicit:e}){return e==="m"?"tuiIconToggleOff":"tuiIconToggleOffLarge"},toggleOn({$implicit:e}){return e==="m"?"tuiIconToggleOn":"tuiIconToggleOnLarge"}},appearances:{checked:Gi.Primary,unchecked:Gi.Secondary},singleColor:!1,showIcons:!1,size:"m"},PC=ce(SC);var Ck=(()=>{class e extends Ai{constructor(t,i,o,r){super(t,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 t,i;return(i=(t=this.focusableElement)===null||t===void 0?void 0:t.nativeElement)!==null&&i!==void 0?i:null}get focused(){return Qt(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 t,i;return(i=(t=this.modeDirective)===null||t===void 0?void 0:t.mode)!==null&&i!==void 0?i:null}onChecked(t){this.value=t}onFocused(t){this.updateFocused(t)}onFocusVisible(t){this.updateFocusVisible(t)}getFallbackValue(){return!1}}return e.\u0275fac=function(t){return new(t||e)(a(zi,10),a(ft),a(Mi,8),a(PC))},e.\u0275cmp=k({type:e,selectors:[["tui-toggle"]],viewQuery:function(t,i){if(t&1&&at(bC,5),t&2){let o;$e(o=We())&&(i.focusableElement=o.first)}},hostVars:4,hostBindings:function(t,i){t&2&&(fe("data-size",i.size)("data-mode",i.hostMode),J("_checked",i.value))},inputs:{singleColor:"singleColor",showIcons:"showIcons",showLoader:"showLoader",size:"size"},features:[A([ei(e),tp(e)]),W],decls:9,vars:16,consts:[["focusableElement",""],["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,"tuiCheckedChange","tuiFocusedChange","tuiFocusVisibleChange","disabled","id","tuiFocusable","tuiChecked"],[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(t,i){if(t&1){let o=F();g(0,"div",1)(1,"div",2),T(2,MC,1,3,"tui-loader",3)(3,wC,2,4,"span",4),S(4,"div",5),T(5,IC,1,3,"tui-loader",3)(6,OC,2,4,"span",4),v(),g(7,"input",6,0),or("tuiCheckedChange",function(s){return I(o),nr(i.value,s)||(i.value=s),x(s)}),C("tuiFocusedChange",function(s){return I(o),x(i.onFocused(s))})("tuiFocusVisibleChange",function(s){return I(o),x(i.onFocusVisible(s))}),v()()}t&2&&(l("active",i.pseudoActive)("appearance",i.appearance)("disabled",i.computedDisabled)("focus",i.computedFocusVisible)("hover",i.pseudoHover)("invalid",i.computedInvalid)("readOnly",i.readOnly),h(2),l("ngIf",i.showLoader),h(),l("ngIf",i.showIcons&&!i.showLoader),h(2),l("ngIf",i.showLoader),h(),l("ngIf",i.showIcons&&!i.showLoader),h(),l("disabled",i.disabled)("id",i.id)("tuiFocusable",i.focusable),ir("tuiChecked",i.value),fe("aria-checked",i.value))},dependencies:[na,Ft,Ki,ee,Je,hp,yn,vs,mp],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}@supports (-webkit-touch-callout: none){.t-checkbox[_ngcontent-%COMP%]:active{font-size:1rem}}._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}),e})(),yf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,_s,bn,Dp,gp,fp,Qi,Lt,oa,lt]]}),e})();var bf=(()=>{class e{constructor(){this.stateChange$=new Ze,this.valueChange$=new Ze}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e}),e})();function EC(e){return Array.isArray(e)&&e.length===1&&e[0].type==="paragraph"&&!e[0].hasOwnProperty("content")}var De=(()=>{class e extends bf{constructor(t){super(),this.editorRef=t,this.editorRef.subscribe(i=>{this.editor=i;let o=()=>{let r=i.getHTML(),s=i.getJSON().content,c=EC(s)?"":r;this.valueChange$.next(c),this.stateChange$.next()};i.on("transaction",o.bind(this)),i.on("update",o.bind(this))})}get isFocused(){return this.editor.isFocused}get html(){return this.editor.getHTML()}get editable(){return this.editor.isEditable}set editable(t){this.editor.setEditable(t,!1)}get state(){return this.editor.state}getOriginTiptapEditor(){return this.editor}undoDisabled(){return!this.editor.can().undo()}redoDisabled(){return!this.editor.can().redo()}getFontColor(){return this.editor.getAttributes("textStyle").fontColor||us}getFontSize(){return parseInt(this.editor.getAttributes("textStyle").fontSize,10)}setFontSize(t){this.editor.chain().setMark("textStyle",{fontSize:Qe(t)}).run()}getBackgroundColor(){var t;return((t=this.editor)===null||t===void 0?void 0:t.getAttributes("textStyle").backgroundColor)||"transparent"}getCellColor(){return this.editor.getAttributes("tableCell").background||this.editor.getAttributes("tableHeader").background}getGroupColor(){var t,i,o,r;if(this.editor.isActive("group")){let s=(i=(t=this.editor.getAttributes("group"))===null||t===void 0?void 0:t.style)!==null&&i!==void 0?i:"",c=Fd(s);return(r=(o=c["background-color"])!==null&&o!==void 0?o:c.background)!==null&&r!==void 0?r:""}return""}onAlign(t){this.editor.chain().focus().setTextAlign(t).run()}setImage(t){this.editor.chain().focus().command(({commands:i,state:o})=>{var r;let s=(r=i.setEditableImage)!==null&&r!==void 0?r:i.setImage;if(s){let c=o.selection.anchor;return s({src:t}),i.setTextSelection(c),!0}return!1}).run()}undo(){this.editor.chain().undo().run()}redo(){this.editor.chain().redo().run()}setHorizontalRule(){this.editor.chain().focus().setHorizontalRule().run()}removeFormat(){this.editor.commands.unsetAllMarks(),this.editor.commands.clearNodes()}setFontColor(t){this.editor.chain().focus().setFontColor(t).run()}setBackgroundColor(t){this.editor.chain().focus().setBackgroundColor(t).run()}toggleUnderline(){this.editor.chain().focus().toggleUnderline().run()}toggleStrike(){this.editor.chain().focus().toggleStrike().run()}toggleOrderedList(){this.editor.chain().focus().toggleOrderedList().run()}toggleUnorderedList(){this.editor.chain().focus().toggleBulletList().run()}togglePre(){this.editor.chain().focus().toggleCodeBlock().run()}toggleTaskList(){this.editor.commands.toggleTaskList()}sinkListItem(){let t=this.editor.isActive("taskList")?"taskItem":"listItem";this.editor.chain().focus().sinkListItem(t).run()}liftListItem(){let t=this.editor.isActive("taskList")?"taskItem":"listItem";this.editor.chain().focus().liftListItem(t).run()}isActive(t){return this.editor.isActive(t)}isActive$(t){return this.stateChange$.pipe(it(null),b(()=>this.isActive(t)),oe())}toggleBold(){this.editor.chain().focus().toggleBold().run()}toggleCode(){this.editor.chain().focus().toggleCode().run()}toggleItalic(){this.editor.chain().focus().toggleItalic().run()}toggleBlockquote(){this.editor.chain().focus().toggleBlockquote().run()}toggleSubscript(){this.editor.chain().focus().toggleSubscript().run()}toggleSuperscript(){this.editor.chain().focus().toggleSuperscript().run()}toggleCodeBlock(){this.editor.chain().focus().toggleCodeBlock().run()}insertTable(t,i){this.editor.chain().focus().insertTable({cols:t,rows:i}).run()}addColumnAfter(){this.editor.chain().focus().addColumnAfter().run()}addColumnBefore(){this.editor.chain().focus().addColumnBefore().run()}addRowAfter(){this.editor.chain().focus().addRowAfter().run()}addRowBefore(){this.editor.chain().focus().addRowBefore().run()}deleteColumn(){this.editor.chain().focus().deleteColumn().run()}deleteRow(){this.editor.chain().focus().deleteRow().run()}mergeCells(){this.editor.chain().focus().mergeCells().run()}splitCell(){this.editor.chain().focus().splitCell().run()}canMergeCells(){return this.editor.can().mergeCells()}canSplitCells(){return this.editor.can().splitCell()}setHeading(t){this.editor.chain().focus().setHeading({level:t}).run()}setParagraph(t){this.editor.chain().focus().setParagraph().run(),t&&this.editor.chain().setMark("textStyle",t).run()}setHardBreak(){this.editor.chain().setHardBreak().run()}setTextSelection(t){this.editor.commands.setTextSelection(t)}toggleLink(t){this.editor.chain().focus().toggleLink({href:t}).run()}setLink(t){this.editor.chain().focus().setLink({href:t}).run()}unsetLink(){this.editor.chain().focus().unsetLink().run()}focus(){this.editor.chain().focus().run()}setValue(t){t===this.html||t===""&&this.html==="

"||(this.editor.commands.setContent(t),this.editor.view.updateState(Ad.create({schema:this.editor.state.schema,doc:this.editor.state.doc,selection:this.editor.state.selection,storedMarks:this.editor.state.storedMarks,plugins:this.editor.state.plugins})))}destroy(){this.editor.destroy()}setCellColor(t){this.editor.chain().focus().setCellBackground(t).run()}selectClosest(){let t=this.editor.state.selection.anchor,{schema:i,doc:o}=this.editor.state,r=kd(o.resolve(t),i.marks.link);r&&this.editor.chain().setTextSelection(r).run()}enter(){this.editor.commands.enter()}setDetails(){this.editor.commands.setDetails()}removeDetails(){this.editor.commands.removeDetails()}setGroup(){this.editor.commands.setGroup()}removeGroup(){this.editor.commands.removeGroup()}setGroupHilite(t){this.editor.commands.setGroupHilite(t)}setAnchor(t){this.editor.commands.setAnchor(t.replace("#",""))}removeAnchor(){this.editor.commands.removeAnchor()}setFileLink(t){this.editor.commands.setFileLink(t)}setYoutubeVideo(t){this.editor.commands.setYoutubeVideo(t)}setIframe(t){this.editor.commands.setIframe(t)}removeEmptyTextStyle(){this.editor.commands.removeEmptyTextStyle()}toggleMark(t,i,o){this.editor.commands.toggleMark(t,i,o)}getHTML(){var t;return(t=this.getOriginTiptapEditor().getHTML())!==null&&t!==void 0?t:""}}return e.\u0275fac=function(t){return new(t||e)(ye(vo))},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),zo=(()=>{class e{constructor(t,i,o,r,s,c){this.el=t,this.renderer=i,this.editor=o,this.editorContainer=r,this.editorLoaded$=s,this.valueChange=this.editor.valueChange$,this.stateChange=this.editor.stateChange$,this.editorLoaded$.pipe(re(c)).subscribe(()=>{this.renderer.appendChild(this.el.nativeElement,this.editorContainer)})}set value(t){this.editor.setValue(t)}set editable(t){this.editor.editable=t}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(ji),a(De),a(lr),a(vo),a(q,2))},e.\u0275dir=w({type:e,selectors:[["","tuiTiptapEditor",""]],inputs:{value:"value",editable:"editable"},outputs:{valueChange:"valueChange",stateChange:"stateChange"},features:[A([q])]}),e})(),Mf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();function AC(e,n){if(e&1){let t=F();g(0,"div",6)(1,"button",7),C("click",function(){I(t);let o=u(3);return x(o.editor.onAlign("left"))}),v(),g(2,"button",7),C("click",function(){I(t);let o=u(3);return x(o.editor.onAlign("center"))}),v(),g(3,"button",7),C("click",function(){I(t);let o=u(3);return x(o.editor.onAlign("right"))}),v(),g(4,"button",7),C("click",function(){I(t);let o=u(3);return x(o.editor.onAlign("justify"))}),v()()}if(e&2){let t=u().tuiLet,i=u().ngIf,o=u();h(),l("icon",o.options.icons.textAlignLeft)("pseudoActive",!!(t!=null&&t.left))("tuiHint",i.justifyLeft),h(),l("icon",o.options.icons.textAlignCenter)("pseudoActive",!!(t!=null&&t.center))("tuiHint",i.justifyCenter),h(),l("icon",o.options.icons.textAlignRight)("pseudoActive",!!(t!=null&&t.right))("tuiHint",i.justifyRight),h(),l("icon",o.options.icons.textAlignJustify)("pseudoActive",!!(t!=null&&t.justify))("tuiHint",i.justifyFull)}}function kC(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",4,0),S(2,"button",5),T(3,AC,5,12,"ng-template",null,1,de),v()),e&2){let t=j(1),i=j(4),o=u().ngIf,r=u();l("content",i),h(2),l("focusable",t.open)("icon",r.options.icons.textAlignPreview)("pseudoActive",t.open)("tuiHint",o.justify)}}function RC(e,n){if(e&1&&(Ie(0),T(1,kC,5,5,"tui-hosted-dropdown",3),R(2,"async"),xe()),e&2){let t=u();h(),l("tuiLet",H(2,1,t.alignState$))}}var Df=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.alignState$=wt([this.editor.isActive$({textAlign:"left"}),this.editor.isActive$({textAlign:"right"}),this.editor.isActive$({textAlign:"center"}),this.editor.isActive$({textAlign:"justify"})]).pipe(b(([r,s,c,d])=>({left:r,right:s,center:c,justify:d})))}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-align-content"]],decls:2,vars:3,consts:[["align",""],["alignDropdown",""],[4,"ngIf"],[3,"content",4,"tuiLet"],[3,"content"],["appearance","icon","automation-id","toolbar__align-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[1,"t-dropdown"],["appearance","icon","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","pseudoActive","tuiHint"]],template:function(t,i){t&1&&(T(0,RC,3,3,"ng-container",2),R(1,"async")),t&2&&l("ngIf",H(1,1,i.texts$))},dependencies:[ot,_e,ee,xt,Ae,be,ke,ve,Se,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),wf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Le,Ot]]}),e})();function FC(e,n){if(e&1){let t=F();g(0,"button",5),C("click",function(){let o=I(t).index,r=u(2);return x(r.onCode(!!o))}),Te(1),v()}if(e&2){let t=n.$implicit;h(),Ne(" ",t," ")}}function LC(e,n){if(e&1&&(g(0,"tui-data-list"),T(1,FC,2,1,"button",4),R(2,"async"),v()),e&2){let t=u();h(),l("ngForOf",H(2,1,t.codeOptionsTexts$))}}var If=(()=>{class e{constructor(t,i,o,r){this.options=t,this.editor=i,this.texts$=o,this.codeOptionsTexts$=r,this.hintText$=this.texts$.pipe(b(s=>s.code)),this.insideCode$=this.editor.stateChange$.pipe(b(()=>this.editor.isActive("code")||this.editor.isActive("codeBlock")),oe())}onCode(t){t?this.editor.toggleCodeBlock():this.editor.toggleCode()}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be),a(Yd))},e.\u0275cmp=k({type:e,selectors:[["tui-code"]],decls:7,vars:9,consts:[["codes",""],["codesDropdown",""],[3,"content"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["tuiOption","",3,"click",4,"ngFor","ngForOf"],["tuiOption","",3,"click"]],template:function(t,i){if(t&1&&(g(0,"tui-hosted-dropdown",2,0),S(2,"button",3),R(3,"async"),R(4,"async"),T(5,LC,3,3,"ng-template",null,1,de),v()),t&2){let o=j(1),r=j(6);l("content",r),h(2),l("focusable",o.open)("icon",i.options.icons.code)("pseudoActive",o.open||H(3,5,i.insideCode$))("tuiHint",H(4,7,i.hintText$))}},dependencies:[ot,_e,Pn,Sn,Ae,be,ke,ve,Se,Ui,K],encapsulation:2,changeDetection:0}),e})(),xf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Le,Yn]]}),e})();function HC(e,n){if(e&1){let t=F();g(0,"button",1),C("click",function(){I(t);let o=u();return x(o.setDetails())}),v()}if(e&2){let t=n.ngIf,i=u();l("focusable",!1)("icon",i.options.icons.detailsAdd)("tuiHint",t.setDetails)}}function NC(e,n){if(e&1){let t=F();g(0,"button",1),R(1,"async"),C("click",function(){I(t);let o=u();return x(o.removeDetails())}),v()}if(e&2){let t=n.ngIf,i=u();l("disabled",!!H(1,4,i.disabled$))("focusable",!1)("icon",i.options.icons.detailsRemove)("tuiHint",t.removeDetails)}}var Of=(()=>{class e{constructor(t,i,o){this.editor=t,this.texts$=i,this.options=o}setDetails(){this.editor.setDetails()}}return e.\u0275fac=function(t){return new(t||e)(a(De),a(Be),a(Ee))},e.\u0275cmp=k({type:e,selectors:[["tui-details"]],decls:2,vars:3,consts:[["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"click","focusable","icon","tuiHint"]],template:function(t,i){t&1&&(T(0,HC,1,3,"button",0),R(1,"async")),t&2&&l("ngIf",H(1,1,i.texts$))},dependencies:[_e,ee,Ae,be,ke,ve,Se,K],encapsulation:2,changeDetection:0}),e})(),Sf=(()=>{class e{constructor(t,i,o){this.editor=t,this.texts$=i,this.options=o,this.disabled$=this.editor.stateChange$.pipe(b(()=>!this.editor.isActive("details")),oe())}removeDetails(){this.editor.removeDetails()}}return e.\u0275fac=function(t){return new(t||e)(a(De),a(Be),a(Ee))},e.\u0275cmp=k({type:e,selectors:[["tui-details-remove"]],decls:2,vars:3,consts:[["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"click","disabled","focusable","icon","tuiHint"]],template:function(t,i){t&1&&(T(0,NC,2,6,"button",0),R(1,"async")),t&2&&l("ngIf",H(1,1,i.texts$))},dependencies:[_e,ee,Ae,be,ke,ve,Se,K],encapsulation:2,changeDetection:0}),e})(),Pf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Me,Le]]}),e})();var Ef=()=>({});function jC(e,n){if(e&1){let t=F();g(0,"button",5),R(1,"lowercase"),C("click",function(){let o=I(t).$implicit,r=u(2);return x(r.setFontOption(o))}),Te(2),v()}if(e&2){let t=n.$implicit;nt("font-family",t.family)("font-size",t.px,"px")("font-weight",t.weight),l("ngClass",(t==null?null:t.ngClass)||Ba(12,Ef))("ngStyle",(t==null?null:t.ngStyle)||Ba(13,Ef)),fe("automation-id","tui_font__"+H(1,10,t.name||"")),h(2),Ne(" ",t.name," ")}}function UC(e,n){if(e&1&&(g(0,"tui-data-list"),T(1,jC,3,14,"button",4),R(2,"async"),v()),e&2){let t=u();h(),l("ngForOf",H(2,1,t.fontsOptions$))}}var Af=(()=>{class e{constructor(t,i,o,r){this.options=t,this.editor=i,this.texts$=o,this.fontOptionsTexts$=r,this.fontsOptions$=this.fontOptionsTexts$.pipe(b(s=>this.options.fontOptions(s))),this.fontText$=this.texts$.pipe(b(s=>s.font))}onClick({headingLevel:t,px:i}){this.setFontOption({headingLevel:t,px:i})}setFontOption({headingLevel:t,px:i}){let o=this.editor.getFontColor();this.clearPreviousTextStyles(),t?this.editor.setHeading(t):this.editor.setParagraph({fontSize:Qe(i||0)}),o!==us&&this.editor.setFontColor(o)}clearPreviousTextStyles(){this.editor.removeEmptyTextStyle(),this.editor.toggleMark("textStyle")}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be),a(Zd))},e.\u0275cmp=k({type:e,selectors:[["tui-font-size"]],decls:6,vars:7,consts:[["fonts",""],["fontsDropdown",""],[3,"content"],["appearance","icon","automation-id","toolbar__font-size-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["tuiOption","",3,"ngClass","ngStyle","fontFamily","fontSize","fontWeight","click",4,"ngFor","ngForOf"],["tuiOption","",3,"click","ngClass","ngStyle"]],template:function(t,i){if(t&1&&(g(0,"tui-hosted-dropdown",2,0),S(2,"button",3),R(3,"async"),T(4,UC,3,3,"ng-template",null,1,de),v()),t&2){let o=j(1),r=j(5);l("content",r),h(2),l("focusable",o.open)("icon",i.options.icons.fontSize)("pseudoActive",o.open)("tuiHint",H(3,5,i.fontText$))}},dependencies:[ot,_e,Pn,Sn,Ae,be,ke,ve,Se,Ui,Hu,Nu,K,Uu],encapsulation:2,changeDetection:0}),e})(),kf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Le,Yn]]}),e})();function zC(e,n){if(e&1){let t=F();g(0,"button",8),C("click",function(){I(t);let o=u(4);return x(o.editor.toggleBold())}),v()}if(e&2){let t=u(2).ngIf,i=u().ngIf,o=u();l("icon",o.options.icons.fontStyleBold)("pseudoActive",t.bold)("tuiHint",i.bold)}}function BC(e,n){if(e&1){let t=F();g(0,"button",8),C("click",function(){I(t);let o=u(4);return x(o.editor.toggleItalic())}),v()}if(e&2){let t=u(2).ngIf,i=u().ngIf,o=u();l("icon",o.options.icons.fontStyleItalic)("pseudoActive",t.italic)("tuiHint",i.italic)}}function VC(e,n){if(e&1){let t=F();g(0,"button",8),C("click",function(){I(t);let o=u(4);return x(o.editor.toggleUnderline())}),v()}if(e&2){let t=u(2).ngIf,i=u().ngIf,o=u();l("icon",o.options.icons.fontStyleUnderline)("pseudoActive",t.underline)("tuiHint",i.underline)}}function $C(e,n){if(e&1){let t=F();g(0,"button",8),C("click",function(){I(t);let o=u(4);return x(o.editor.toggleStrike())}),v()}if(e&2){let t=u(2).ngIf,i=u().ngIf,o=u();l("icon",o.options.icons.fontStyleStrike)("pseudoActive",t.strike)("tuiHint",i.strikeThrough)}}function WC(e,n){if(e&1&&(g(0,"div",6),T(1,zC,1,3,"button",7)(2,BC,1,3,"button",7)(3,VC,1,3,"button",7)(4,$C,1,3,"button",7),v()),e&2){let t=u(3);h(),l("ngIf",t.isEnabled(t.editorTool.Bold)),h(),l("ngIf",t.isEnabled(t.editorTool.Italic)),h(),l("ngIf",t.isEnabled(t.editorTool.Underline)),h(),l("ngIf",t.isEnabled(t.editorTool.Strikethrough))}}function GC(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",4,0),S(2,"button",5),T(3,WC,5,4,"ng-template",null,1,de),v()),e&2){let t=n.ngIf,i=j(1),o=j(4),r=u().ngIf,s=u();l("content",o),h(2),l("focusable",i.open)("icon",s.options.icons.fontStylePreview)("pseudoActive",i.open||t.bold||t.italic||t.underline||t.strike)("tuiHint",r.fontStyle)}}function YC(e,n){if(e&1&&(Ie(0),T(1,GC,5,5,"tui-hosted-dropdown",3),R(2,"async"),xe()),e&2){let t=u();h(),l("ngIf",H(2,1,t.fontStyleState$))}}var Rf=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.toolsSet=new Set(go),this.editorTool=It,this.fontStyleState$=wt([this.editor.isActive$("bold"),this.editor.isActive$("italic"),this.editor.isActive$("underline"),this.editor.isActive$("strike")]).pipe(b(([r,s,c,d])=>({bold:r,italic:s,underline:c,strike:d})))}set enabledTools(t){this.toolsSet=new Set(t)}isEnabled(t){return this.toolsSet.has(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-font-style"]],inputs:{enabledTools:"enabledTools"},decls:2,vars:3,consts:[["format",""],["formatDropdown",""],[4,"ngIf"],[3,"content",4,"ngIf"],[3,"content"],["appearance","icon","automation-id","toolbar__font-style-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[1,"t-dropdown"],["appearance","icon","size","s","tuiIconButton","","type","button","class","t-option t-option_margin",3,"icon","pseudoActive","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","pseudoActive","tuiHint"]],template:function(t,i){t&1&&(T(0,YC,3,3,"ng-container",2),R(1,"async")),t&2&&l("ngIf",H(1,1,i.texts$))},dependencies:[ot,_e,ee,Ae,be,ke,ve,Se,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),Ff=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Le]]}),e})();var Lf=(()=>{class e{constructor(t,i,o){this.editor=t,this.texts$=i,this.options=o,this.insertGroupText$=this.texts$.pipe(b(r=>r.insertGroup)),this.removeGroupText$=this.texts$.pipe(b(r=>r.removeGroup)),this.disabled$=this.editor.stateChange$.pipe(b(()=>!this.editor.isActive("group")),oe())}addGroup(){this.editor.setGroup()}removeGroup(){this.editor.removeGroup()}}return e.\u0275fac=function(t){return new(t||e)(a(De),a(Be),a(Ee))},e.\u0275cmp=k({type:e,selectors:[["tui-editor-group-tool"]],decls:5,vars:13,consts:[["appearance","icon","automation-id","toolbar__group-add-button","size","s","tuiHintDescribe","","tuiIconButton","","type","button",3,"click","focusable","icon","tuiHint"],["appearance","icon","automation-id","toolbar__group-remove-button","size","s","tuiHintDescribe","","tuiIconButton","","type","button",3,"click","disabled","focusable","icon","tuiHint"]],template:function(t,i){t&1&&(g(0,"button",0),R(1,"async"),C("click",function(){return i.addGroup()}),v(),g(2,"button",1),R(3,"async"),R(4,"async"),C("click",function(){return i.removeGroup()}),v()),t&2&&(l("focusable",!1)("icon",i.options.icons.groupAdd)("tuiHint",H(1,7,i.insertGroupText$)),h(2),l("disabled",!!H(3,9,i.disabled$))("focusable",!1)("icon",i.options.icons.groupRemove)("tuiHint",H(4,11,i.removeGroupText$)))},dependencies:[_e,Ae,be,ke,ve,Se,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),Hf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Me,Le]]}),e})();function Nf(e,n){return e?dd(e).pipe(b(t=>n?n.fromControlValue(t):t)):B(null)}var ZC=new se("[TUI_CALENDAR_DATE_STREAM]");function j2(e){return{provide:ZC,deps:[[new tt,new fn,zi],[new tt,e]],useFactory:Nf}}var XC={[f.AD]:"+376###-###",[f.AE]:"+971-##-###-####",[f.AF]:"+93##-###-####",[f.AG]:"+1(268) ###-####",[f.AI]:"+1(264) ###-####",[f.AL]:"+355(###) ###-###",[f.AM]:"+374##-###-###",[f.AO]:"+244(###) ###-###",[f.AR]:"+54(###) ####-####",[f.AT]:"+43(###) ###-####",[f.AU]:"+61#-####-####",[f.AW]:"+297###-####",[f.AZ]:"+994##-###-##-##",[f.BA]:"+387 ###-####-##",[f.BB]:"+1(246) ###-####",[f.BD]:"+880##-###-###",[f.BE]:"+32(###) ###-###",[f.BF]:"+226##-##-####",[f.BG]:"+359(###) ###-###",[f.BH]:"+973####-####",[f.BI]:"+257##-##-####",[f.BJ]:"+229##-##-####",[f.BL]:"+590 ## ## ## ## ##",[f.BM]:"+1(441) ###-####",[f.BN]:"+673###-####",[f.BO]:"+591#-###-####",[f.BQ]:"+599-###-####",[f.BR]:"+55(##) ####-#####",[f.BS]:"+1(242) ###-####",[f.BT]:"+975#-###-###",[f.BW]:"+267##-###-###",[f.BY]:"+375(##) ###-##-##",[f.BZ]:"+501###-####",[f.CA]:"+1(###) ###-####",[f.CD]:"+243(###) ###-###",[f.CF]:"+236-##-##-####",[f.CG]:"+242##-###-####",[f.CH]:"+41##-###-####",[f.CI]:"+225##-##-###-###",[f.CL]:"+56#-####-####",[f.CM]:"+237#####-####",[f.CN]:"+86(###) ####-####",[f.CO]:"+57(###) ###-####",[f.CR]:"+506####-####",[f.CU]:"+53#-###-####",[f.CV]:"+238(###) ##-##",[f.CW]:"+5999-###-####",[f.CY]:"+357##-###-###",[f.CZ]:"+420(###) ###-###",[f.DE]:"+49(###) ###-###-##",[f.DJ]:"+253##-##-##-##",[f.DK]:"+45##-##-##-##",[f.DM]:"+1(767) ###-####",[f.DO]:"+1(###) ###-####",[f.DZ]:"+213##-###-####",[f.EC]:"+593##-###-####",[f.EE]:"+372####-####",[f.EG]:"+20(###) ###-####",[f.ER]:"+291#-###-###",[f.ES]:"+34(###) ###-###",[f.ET]:"+251##-###-####",[f.FI]:"+358(###) ###-##-##",[f.FJ]:"+679##-#####",[f.FK]:"+500#####",[f.FM]:"+691###-####",[f.FR]:"+33 ## ## ## ## ##",[f.GA]:"+241##-##-##-##",[f.GB]:"+44##-####-####",[f.GD]:"+1(473) ###-####",[f.GE]:"+995(###) ###-###",[f.GF]:"+594 ## ## ## ## ##",[f.GH]:"+233(###) ###-###",[f.GI]:"+350###-#####",[f.GL]:"+299##-##-##",[f.GM]:"+220(###) ##-##",[f.GN]:"+224##-###-###",[f.GP]:"+590 ## ## ## ## ##",[f.GQ]:"+240##-###-####",[f.GR]:"+30(###) ###-####",[f.GT]:"+502#-###-####",[f.GW]:"+245#-######",[f.GY]:"+592###-####",[f.HK]:"+852####-####",[f.HN]:"+504####-####",[f.HR]:"+385##-###-####",[f.HT]:"+509##-##-####",[f.HU]:"+36(###) ###-###",[f.ID]:"+62(###) ###-##-###",[f.IE]:"+353(###) ###-###",[f.IL]:"+972##-###-####",[f.IN]:"+91(####) ###-###",[f.IQ]:"+964(###) ###-####",[f.IR]:"+98(###) ###-####",[f.IS]:"+354###-####",[f.IT]:"+39(###) ####-###",[f.JM]:"+1(876) ###-####",[f.JO]:"+962#-####-####",[f.JP]:"+81-##-####-####",[f.KE]:"+254###-######",[f.KG]:"+996(###) ###-###",[f.KH]:"+855##-###-###",[f.KM]:"+269##-#####",[f.KN]:"+1(869) ###-####",[f.KP]:"+850####-#############",[f.KR]:"+82##-###-####",[f.KW]:"+965####-####",[f.KY]:"+1(345) ###-####",[f.KZ]:"+7(###) ###-##-##",[f.LA]:"+856##-##-###-###",[f.LB]:"+961##-###-###",[f.LC]:"+1(758) ###-####",[f.LI]:"+423(###) ###-####",[f.LK]:"+94##-###-####",[f.LR]:"+231##-###-###",[f.LS]:"+266#-###-####",[f.LT]:"+370(###) ##-###",[f.LU]:"+352(###) ###-###",[f.LV]:"+371##-###-###",[f.LY]:"+218##-###-####",[f.MA]:"+212##-####-###",[f.MC]:"+377###-###-###",[f.MD]:"+373####-####",[f.ME]:"+382##-###-###",[f.MF]:"+590 ## ## ## ## ##",[f.MG]:"+261##-##-#####",[f.MK]:"+389##-###-###",[f.ML]:"+223##-##-####",[f.MM]:"+95##-###-###",[f.MN]:"+976##-##-####",[f.MO]:"+853####-####",[f.MQ]:"+596 ## ## ## ## ##",[f.MR]:"+222##-##-####",[f.MS]:"+1(664) ###-####",[f.MT]:"+356####-####",[f.MU]:"+230####-####",[f.MV]:"+960###-####",[f.MW]:"+265#-####-####",[f.MX]:"+52(###) ###-####",[f.MY]:"+60(###) ###-###",[f.MZ]:"+258##-###-###",[f.NA]:"+264##-###-####",[f.NC]:"+687 ### ###",[f.NE]:"+227##-##-####",[f.NG]:"+234(###) ###-####",[f.NI]:"+505####-####",[f.NL]:"+31##-###-####",[f.NO]:"+47(###) ##-###",[f.NP]:"+977##-###-###",[f.NZ]:"+64(###) ###-####",[f.OM]:"+968##-###-###",[f.PA]:"+507###-####",[f.PE]:"+51(###) ###-###",[f.PF]:"+689 ## ## ## ##",[f.PG]:"+675(###) ##-###",[f.PH]:"+63(###) ###-####",[f.PK]:"+92(###) ###-####",[f.PL]:"+48(###) ###-###",[f.PT]:"+351##-###-####",[f.PW]:"+680###-####",[f.PY]:"+595(###) ###-###",[f.QA]:"+974####-####",[f.RE]:"+262 ## ## ## ## ##",[f.RO]:"+40##-###-####",[f.RS]:"+381##-###-####",[f.RU]:"+7### ###-##-##",[f.RW]:"+250(###) ###-###",[f.SA]:"+966#-####-####",[f.SB]:"+677###-####",[f.SC]:"+248#-###-###",[f.SD]:"+249##-###-####",[f.SE]:"+46##-###-####",[f.SG]:"+65####-####",[f.SH]:"+290####",[f.SI]:"+386##-###-###",[f.SK]:"+421(###) ###-###",[f.SL]:"+232##-######",[f.SM]:"+378####-######",[f.SN]:"+221##-###-####",[f.SO]:"+252##-###-###",[f.SR]:"+597###-####",[f.ST]:"+239##-#####",[f.SV]:"+503##-##-####",[f.SX]:"+1(721) ###-####",[f.SY]:"+963##-####-###",[f.SZ]:"+268##-##-####",[f.TC]:"+1(649) ###-####",[f.TD]:"+235##-##-##-##",[f.TG]:"+228##-###-###",[f.TH]:"+66##-###-####",[f.TJ]:"+992##-###-####",[f.TL]:"+670###-#####",[f.TM]:"+993#-###-####",[f.TN]:"+216##-###-###",[f.TO]:"+676#####",[f.TR]:"+90(###) ###-####",[f.TT]:"+1(868) ###-####",[f.TW]:"+886#-####-####",[f.TZ]:"+255##-###-####",[f.UA]:"+380(##) ###-##-##",[f.UG]:"+256(###) ###-###",[f.US]:"+1(###) ###-####",[f.UY]:"+598#-###-##-##",[f.UZ]:"+998##-###-####",[f.VC]:"+1(784) ###-####",[f.VE]:"+58(###) ###-####",[f.VG]:"+1(284)###-####",[f.VN]:"+84(###) ####-###",[f.VU]:"+678##-#####",[f.WS]:"+685##-####",[f.XK]:"+383##-###-###",[f.YE]:"+967###-###-###",[f.YT]:"+262 ## ## ## ## ##",[f.ZA]:"+27##-###-####",[f.ZM]:"+260##-###-####",[f.ZW]:"+263#-######"},U2=ce(XC);var z2=new se("[TUI_DATE_VALUE_TRANSFORMER]"),B2=new se("[TUI_DATE_RANGE_VALUE_TRANSFORMER]"),V2=new se("[TUI_DATE_TIME_VALUE_TRANSFORMER]"),$2=X(ze("prompt")),W2=X(ze("cancel")),G2=X(ze("done")),Y2=X(ze("more")),Z2=X(ze("hide")),X2=X(ze("showAll")),q2=X(ze("otherDate")),K2=X(ze("mobileCalendarTexts")),Q2=X(ze("range")),J2=X(ze("countTexts")),eR=X(ze("time")),tR=X(ze("dateTexts")),iR=X(ze("digitalInformationUnits")),nR=X(ze("copyTexts")),oR=X(ze("passwordTexts")),rR=X(ze("shortCalendarMonths")),sR=X(ze("fileTexts")),aR=X(ze("pagination")),cR=X(ze("inputFileTexts")),lR=X(ze("multiSelectTexts")),uR=X(ze("countries")),qC={icon:({$implicit:e})=>e==="s"?"tuiIconCalendar":"tuiIconCalendarLarge",min:dc,max:Op,nativePicker:!1},dR=ce(qC);var KC={stringify:$u,identityMatcher:Wu,disabledItemHandler:cn},pR=ce(KC);var hR=new se("[TUI_MOBILE_CALENDAR]"),fR=new se("[TUI_MONTH_FORMATTER]"),mR=ce(24),gR=ce({});var Wf=e=>e.querySelector("input,textarea")||e,Lr={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"},Cl=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 t=this.now.value!==n.value,i=this.now.selection.some((o,r)=>o!==n.selection[r]);!t&&!i||(t&&(this.past.push(this.now),this.future=[]),this.now=n)}updateElement(n,t){this.now=n,this.updateElementState(n,{inputType:t,data:null})}};function QC(e,...n){return n.every(({value:t})=>t===e.value)}function JC(e,...n){return n.every(({value:t,selection:i})=>t===e.value&&i[0]===e.selection[0]&&i[1]===e.selection[1])}function ey({value:e,selection:n},t,i){let[o,r]=n,s=typeof i=="function"?i({value:e,selection:n}):i;return{value:e,selection:s==="replace"?[o,o+t.length]:[o,r]}}function ua(e){return typeof e=="string"}function jf(e,n,t,i){let o="";for(let r=n.length;r{let o=n[i];return ua(o)?t===o:t.match(o)}):n.test(e)}function ty(e,n,t){let i=null,o=null,r=Array.from(e.value).reduce((c,d,p)=>{let _=jf(n,c,d,t),y=c+_,O=n[y.length];return ua(O)?y+O:d.match(O)?(i===null&&p>=e.selection[0]&&(i=y.length),o===null&&p>=e.selection[1]&&(o=y.length),y+d):y},""),s=jf(n,r,"",t);return{value:Gf(r+s,n)?r+s:r,selection:[i??r.length,o??r.length]}}function iy({value:e,selection:n},t){let[i,o]=n,r=i,s=o;return{value:Array.from(e).reduce((d,p,_)=>{let y=d+p;return i===_&&(r=d.length),o===_&&(s=d.length),y.match(t)?y:d},""),selection:[r,s]}}function aa(e,n,t=null){if(Gf(e.value,n))return e;let{value:i,selection:o}=Array.isArray(n)?ty(e,n,t):iy(e,n);return{selection:o,value:Array.isArray(n)?i.slice(0,n.length):i}}function Uf(e,n){if(!Array.isArray(n))return e;let[t,i]=e.selection,o=[],r=Array.from(e.value).reduce((s,c,d)=>{let p=n[d];return d===t&&o.push(s.length),d===i&&o.push(s.length),ua(p)&&p===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 Fr=class{constructor(n,t){this.initialElementState=n,this.maskOptions=t,this.value="",this.selection=[0,0];let{value:i,selection:o}=aa(n,this.getMaskExpression(n));this.value=i,this.selection=o}addCharacters([n,t],i){let{value:o}=this,r=this.getMaskExpression({value:o.slice(0,n)+i+o.slice(t),selection:[n+i.length,n+i.length]}),s={value:o,selection:[n,t]},c=Uf(s,r),[d,p]=ey(c,i,this.maskOptions.overwriteMode).selection,_=c.value.slice(0,d)+i,y=_.length,O=aa({value:_+c.value.slice(p),selection:[y,y]},r,s);if(o.slice(0,d)===aa({value:_,selection:[y,y]},r,s).value||JC(this,O))throw new Error("Invalid mask value");this.value=O.value,this.selection=O.selection}deleteCharacters([n,t]){if(n===t||!t)return;let{value:i}=this,o=this.getMaskExpression({value:i.slice(0,n)+i.slice(t),selection:[n,n]}),r={value:i,selection:[n,t]},s=Uf(r,o),[c,d]=s.selection,p=s.value.slice(0,c)+s.value.slice(d),_=aa({value:p,selection:[c,c]},o,r);this.value=_.value,this.selection=_.selection}getMaskExpression(n){let{mask:t}=this.maskOptions;return typeof t=="function"?t(n):t}},yl=class{constructor(n){this.element=n,this.listeners=[]}listen(n,t,i){let o=t;this.element.addEventListener(n,o,i),this.listeners.push(()=>this.element.removeEventListener(n,o))}destroy(){this.listeners.forEach(n=>n())}};function Rr(e,n,t){return e.ctrlKey===!!(n&1)&&e.altKey===!!(n&2)&&e.shiftKey===!!(n&4)&&e.metaKey===!!(n&8)&&e.keyCode===t}function ny(e){return Rr(e,1,89)||Rr(e,5,90)||Rr(e,12,90)}function oy(e){return Rr(e,1,90)||Rr(e,8,90)}function ry(e){return"onbeforeinput"in e}function sy({key:e,ctrlKey:n,metaKey:t,altKey:i}){let o=n||t||i,r=/^.$/u.test(e);return!o&&e!=="Backspace"&&r}function ay({value:e,selection:n},t){let[i,o]=n;if(i!==o)return[i,o];let r=t?e.slice(i).indexOf(` +import{$a as Gd,A as Yu,Aa as q,B as rr,Ba as Sd,C as Zu,Ca as mo,D as nd,Da as qa,E as od,Ea as Pd,F as rd,Fa as Ka,G as ls,H as Pi,Ha as Ed,I as Qt,Ia as f,J as li,Ja as ze,K as Za,Ka as It,L as sd,La as us,M as Qe,Ma as go,N as dd,Na as Hd,O as pe,Oa as ti,P as po,Pa as Nd,Q as pd,Qa as jd,R as hd,Ra as cr,S as fd,Sa as Ud,Ta as Qa,U as md,Ua as Ee,V as gd,Va as zd,W as $i,Wa as Bd,X as Jt,Xa as Vd,Y as zt,Ya as $d,Z as Cn,Za as Be,_ as vd,_a as Wd,a as $a,aa as _d,ab as Yd,ba as Td,bb as Zd,cb as Xd,d as Bu,db as vo,e as ts,eb as qd,fb as lr,g as ct,h as ie,i as P,j as ge,ja as Cd,ka as yd,l as Et,m as At,ma as bd,n as cn,o as Bi,oa as Md,pa as ho,q as ns,qa as ei,r as Vu,ra as Dd,s as Wa,sa as ln,t as ai,ta as fo,u as $u,v as Wu,va as wd,wa as Id,x as os,xa as Fn,y as Gu,ya as xd,z as Vi,za as Od}from"./chunk-HJXCO6QW.js";import{b as kd,d as Rd,f as Fd,g as Ld}from"./chunk-J5MQQQCD.js";import{$ as Fe,$b as Ba,$c as Xu,A as He,Aa as Xr,Ab as g,Ad as id,B as pu,Ba as sn,Bb as v,Bc as Hu,Bd as ad,C as et,Ca as qt,Cb as S,Cd as cd,D as hu,Da as I,Db as Ie,Dc as Ui,Dd as ld,E as dn,Ea as x,Eb as xe,Ec as ee,Ed as ud,F as tr,Fa as qr,Fb as Ut,Fc as Nu,G as fu,Ga as ae,Gb as F,Gc as ju,Gd as Xa,Ha as mn,Hb as kn,Hc as K,I as Ha,Ib as vn,Ic as Uu,J as Wt,Ja as N,Jb as y,Jc as zu,Ka as bu,Kb as u,Kc as z,L as mu,La as Pe,Lb as Ve,M as ri,Mb as me,N as oe,Nb as Rn,Ob as at,P as ro,Pb as $e,Pc as is,Q as pn,Qb as We,Qc as ao,R as Na,Rb as j,Rc as zi,S as gu,Sb as Te,Sc as co,T as ja,Tb as Iu,Tc as an,Ub as Ne,V as vu,Vb as xu,W as on,Wb as ir,Wc as lo,X as Zr,Xb as nr,Xc as _n,Y as hn,Yb as or,Yc as sr,Z as _u,Zb as A,Zc as rs,_ as it,_b as Ou,a as lu,aa as re,ac as Oi,ad as ci,b as io,ba as Tu,bb as xi,bc as Jr,bd as ce,c as uu,ca as st,cb as gn,cd as X,d as _i,da as rn,db as Kr,dc as R,ec as H,f as Fa,fa as Gt,fb as Ni,fc as Su,g as La,ga as mt,gc as Pu,h as Ze,ha as Q,hb as h,i as Ke,ia as M,ib as a,id as Tn,j as no,ja as Cu,jb as za,jc as de,jd as qu,k as Dt,ka as se,kb as Kt,kc as Eu,la as Ua,lb as Qr,lc as Au,ld as Si,m as jt,ma as ye,mc as ku,md as ar,na as V,nb as ji,nc as Ru,nd as Ku,o as wi,oa as tt,ob as Mu,od as Qu,p as B,pa as fn,pc as Va,pd as pt,q as Qo,qa as si,qb as Xe,qc as Fu,qd as ss,r as Gr,ra as so,rb as Ci,rc as Lu,rd as as,s as du,sb as W,sc as ft,sd as uo,t as b,ta as k,tb as Du,u as wt,ua as D,ub as wu,ud as Ju,v as Ti,va as w,vb as T,vd as ed,w as Yr,wa as Ii,wb as fe,wd as td,x as Jo,xa as yu,xb as l,xd as Ga,y as er,yb as nt,yc as qe,yd as cs,z as oo,zb as J,zc as es,zd as Ya}from"./chunk-5EVGTXYE.js";import{a as te,b as oi,d as cg,e as lg,p as Ad}from"./chunk-GOOAHOWT.js";var Mm=cg((Dl,wl)=>{"use strict";(function(e,n){typeof Dl=="object"&&typeof wl<"u"?wl.exports=n():typeof define=="function"&&define.amd?define(n):(e=typeof globalThis<"u"?globalThis:e||self,e.DOMPurify=n())})(Dl,function(){"use strict";let{entries:e,setPrototypeOf:n,isFrozen:t,getPrototypeOf:i,getOwnPropertyDescriptor:o}=Object,{freeze:r,seal:s,create:c}=Object,{apply:d,construct:p}=typeof Reflect<"u"&&Reflect;r||(r=function(G){return G}),s||(s=function(G){return G}),d||(d=function(G,Re,Ce){return G.apply(Re,Ce)}),p||(p=function(G,Re){return new G(...Re)});let _=ni(Array.prototype.forEach),C=ni(Array.prototype.pop),O=ni(Array.prototype.push),L=ni(String.prototype.toLowerCase),Z=ni(String.prototype.toString),ue=ni(String.prototype.match),Ge=ni(String.prototype.replace),Tt=ni(String.prototype.indexOf),Ji=ni(String.prototype.trim),ut=ni(Object.prototype.hasOwnProperty),Ct=ni(RegExp.prototype.test),$o=wm(TypeError);function ni(we){return function(G){for(var Re=arguments.length,Ce=new Array(Re>1?Re-1:0),Ht=1;Ht2&&arguments[2]!==void 0?arguments[2]:L;n&&n(we,null);let Ce=G.length;for(;Ce--;){let Ht=G[Ce];if(typeof Ht=="string"){let en=Re(Ht);en!==Ht&&(t(G)||(G[Ce]=en),Ht=en)}we[Ht]=!0}return we}function Im(we){for(let G=0;G/gm),Em=s(/\${[\w\W]*}/gm),Am=s(/^data-[\-\w.\u00B7-\uFFFF]/),km=s(/^aria-[\-\w]+$/),Pl=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rm=s(/^(?:\w+script|data):/i),Fm=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),El=s(/^html$/i),Lm=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var Al=Object.freeze({__proto__:null,MUSTACHE_EXPR:Sm,ERB_EXPR:Pm,TMPLIT_EXPR:Em,DATA_ATTR:Am,ARIA_ATTR:km,IS_ALLOWED_URI:Pl,IS_SCRIPT_OR_DATA:Rm,ATTR_WHITESPACE:Fm,DOCTYPE_NAME:El,CUSTOM_ELEMENT:Lm});let Wo={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Hm=function(){return typeof window>"u"?null:window},Nm=function(G,Re){if(typeof G!="object"||typeof G.createPolicy!="function")return null;let Ce=null,Ht="data-tt-policy-suffix";Re&&Re.hasAttribute(Ht)&&(Ce=Re.getAttribute(Ht));let en="dompurify"+(Ce?"#"+Ce:"");try{return G.createPolicy(en,{createHTML(Xn){return Xn},createScriptURL(Xn){return Xn}})}catch{return console.warn("TrustedTypes policy "+en+" could not be created."),null}};function kl(){let we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hm(),G=Y=>kl(Y);if(G.version="3.1.5",G.removed=[],!we||!we.document||we.document.nodeType!==Wo.document)return G.isSupported=!1,G;let{document:Re}=we,Ce=Re,Ht=Ce.currentScript,{DocumentFragment:en,HTMLTemplateElement:Xn,Node:Ta,Element:Rl,NodeFilter:Go,NamedNodeMap:Um=we.NamedNodeMap||we.MozNamedAttrMap,HTMLFormElement:zm,DOMParser:Bm,trustedTypes:jr}=we,Ur=Rl.prototype,Vm=Hr(Ur,"cloneNode"),$m=Hr(Ur,"nextSibling"),Wm=Hr(Ur,"childNodes"),Ca=Hr(Ur,"parentNode");if(typeof Xn=="function"){let Y=Re.createElement("template");Y.content&&Y.content.ownerDocument&&(Re=Y.content.ownerDocument)}let Vt,Yo="",{implementation:ya,createNodeIterator:Gm,createDocumentFragment:Ym,getElementsByTagName:Zm}=Re,{importNode:Xm}=Ce,Fi={};G.isSupported=typeof e=="function"&&typeof Ca=="function"&&ya&&ya.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ba,ERB_EXPR:Ma,TMPLIT_EXPR:Da,DATA_ATTR:qm,ARIA_ATTR:Km,IS_SCRIPT_OR_DATA:Qm,ATTR_WHITESPACE:Fl,CUSTOM_ELEMENT:Jm}=Al,{IS_ALLOWED_URI:Ll}=Al,yt=null,Hl=he({},[...Il,...ma,...ga,...va,...xl]),bt=null,Nl=he({},[...Ol,..._a,...Sl,...Nr]),dt=Object.seal(c(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,wa=null,jl=!0,Ia=!0,Ul=!1,zl=!0,qn=!1,xa=!0,An=!1,Oa=!1,Sa=!1,Kn=!1,zr=!1,Br=!1,Bl=!0,Vl=!1,eg="user-content-",Pa=!0,Xo=!1,Qn={},Jn=null,$l=he({},["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"]),Wl=null,Gl=he({},["audio","video","img","source","image","track"]),Ea=null,Yl=he({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vr="http://www.w3.org/1998/Math/MathML",$r="http://www.w3.org/2000/svg",tn="http://www.w3.org/1999/xhtml",eo=tn,Aa=!1,ka=null,tg=he({},[Vr,$r,tn],Z),qo=null,ig=["application/xhtml+xml","text/html"],ng="text/html",Mt=null,to=null,og=Re.createElement("form"),Zl=function(m){return m instanceof RegExp||m instanceof Function},Ra=function(){let m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(to&&to===m)){if((!m||typeof m!="object")&&(m={}),m=En(m),qo=ig.indexOf(m.PARSER_MEDIA_TYPE)===-1?ng:m.PARSER_MEDIA_TYPE,Mt=qo==="application/xhtml+xml"?Z:L,yt=ut(m,"ALLOWED_TAGS")?he({},m.ALLOWED_TAGS,Mt):Hl,bt=ut(m,"ALLOWED_ATTR")?he({},m.ALLOWED_ATTR,Mt):Nl,ka=ut(m,"ALLOWED_NAMESPACES")?he({},m.ALLOWED_NAMESPACES,Z):tg,Ea=ut(m,"ADD_URI_SAFE_ATTR")?he(En(Yl),m.ADD_URI_SAFE_ATTR,Mt):Yl,Wl=ut(m,"ADD_DATA_URI_TAGS")?he(En(Gl),m.ADD_DATA_URI_TAGS,Mt):Gl,Jn=ut(m,"FORBID_CONTENTS")?he({},m.FORBID_CONTENTS,Mt):$l,Zo=ut(m,"FORBID_TAGS")?he({},m.FORBID_TAGS,Mt):{},wa=ut(m,"FORBID_ATTR")?he({},m.FORBID_ATTR,Mt):{},Qn=ut(m,"USE_PROFILES")?m.USE_PROFILES:!1,jl=m.ALLOW_ARIA_ATTR!==!1,Ia=m.ALLOW_DATA_ATTR!==!1,Ul=m.ALLOW_UNKNOWN_PROTOCOLS||!1,zl=m.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qn=m.SAFE_FOR_TEMPLATES||!1,xa=m.SAFE_FOR_XML!==!1,An=m.WHOLE_DOCUMENT||!1,Kn=m.RETURN_DOM||!1,zr=m.RETURN_DOM_FRAGMENT||!1,Br=m.RETURN_TRUSTED_TYPE||!1,Sa=m.FORCE_BODY||!1,Bl=m.SANITIZE_DOM!==!1,Vl=m.SANITIZE_NAMED_PROPS||!1,Pa=m.KEEP_CONTENT!==!1,Xo=m.IN_PLACE||!1,Ll=m.ALLOWED_URI_REGEXP||Pl,eo=m.NAMESPACE||tn,dt=m.CUSTOM_ELEMENT_HANDLING||{},m.CUSTOM_ELEMENT_HANDLING&&Zl(m.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(dt.tagNameCheck=m.CUSTOM_ELEMENT_HANDLING.tagNameCheck),m.CUSTOM_ELEMENT_HANDLING&&Zl(m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(dt.attributeNameCheck=m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),m.CUSTOM_ELEMENT_HANDLING&&typeof m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(dt.allowCustomizedBuiltInElements=m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qn&&(Ia=!1),zr&&(Kn=!0),Qn&&(yt=he({},xl),bt=[],Qn.html===!0&&(he(yt,Il),he(bt,Ol)),Qn.svg===!0&&(he(yt,ma),he(bt,_a),he(bt,Nr)),Qn.svgFilters===!0&&(he(yt,ga),he(bt,_a),he(bt,Nr)),Qn.mathMl===!0&&(he(yt,va),he(bt,Sl),he(bt,Nr))),m.ADD_TAGS&&(yt===Hl&&(yt=En(yt)),he(yt,m.ADD_TAGS,Mt)),m.ADD_ATTR&&(bt===Nl&&(bt=En(bt)),he(bt,m.ADD_ATTR,Mt)),m.ADD_URI_SAFE_ATTR&&he(Ea,m.ADD_URI_SAFE_ATTR,Mt),m.FORBID_CONTENTS&&(Jn===$l&&(Jn=En(Jn)),he(Jn,m.FORBID_CONTENTS,Mt)),Pa&&(yt["#text"]=!0),An&&he(yt,["html","head","body"]),yt.table&&(he(yt,["tbody"]),delete Zo.tbody),m.TRUSTED_TYPES_POLICY){if(typeof m.TRUSTED_TYPES_POLICY.createHTML!="function")throw $o('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof m.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $o('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Vt=m.TRUSTED_TYPES_POLICY,Yo=Vt.createHTML("")}else Vt===void 0&&(Vt=Nm(jr,Ht)),Vt!==null&&typeof Yo=="string"&&(Yo=Vt.createHTML(""));r&&r(m),to=m}},Xl=he({},["mi","mo","mn","ms","mtext"]),ql=he({},["foreignobject","annotation-xml"]),rg=he({},["title","style","font","a","script"]),Kl=he({},[...ma,...ga,...xm]),Ql=he({},[...va,...Om]),sg=function(m){let E=Ca(m);(!E||!E.tagName)&&(E={namespaceURI:eo,tagName:"template"});let $=L(m.tagName),Ye=L(E.tagName);return ka[m.namespaceURI]?m.namespaceURI===$r?E.namespaceURI===tn?$==="svg":E.namespaceURI===Vr?$==="svg"&&(Ye==="annotation-xml"||Xl[Ye]):!!Kl[$]:m.namespaceURI===Vr?E.namespaceURI===tn?$==="math":E.namespaceURI===$r?$==="math"&&ql[Ye]:!!Ql[$]:m.namespaceURI===tn?E.namespaceURI===$r&&!ql[Ye]||E.namespaceURI===Vr&&!Xl[Ye]?!1:!Ql[$]&&(rg[$]||!Kl[$]):!!(qo==="application/xhtml+xml"&&ka[m.namespaceURI]):!1},Li=function(m){O(G.removed,{element:m});try{m.parentNode.removeChild(m)}catch{m.remove()}},Wr=function(m,E){try{O(G.removed,{attribute:E.getAttributeNode(m),from:E})}catch{O(G.removed,{attribute:null,from:E})}if(E.removeAttribute(m),m==="is"&&!bt[m])if(Kn||zr)try{Li(E)}catch{}else try{E.setAttribute(m,"")}catch{}},Jl=function(m){let E=null,$=null;if(Sa)m=""+m;else{let Pt=ue(m,/^[\r\n\t ]+/);$=Pt&&Pt[0]}qo==="application/xhtml+xml"&&eo===tn&&(m=''+m+"");let Ye=Vt?Vt.createHTML(m):m;if(eo===tn)try{E=new Bm().parseFromString(Ye,qo)}catch{}if(!E||!E.documentElement){E=ya.createDocument(eo,"template",null);try{E.documentElement.innerHTML=Aa?Yo:Ye}catch{}}let Nt=E.body||E.documentElement;return m&&$&&Nt.insertBefore(Re.createTextNode($),Nt.childNodes[0]||null),eo===tn?Zm.call(E,An?"html":"body")[0]:An?E.documentElement:Nt},eu=function(m){return Gm.call(m.ownerDocument||m,m,Go.SHOW_ELEMENT|Go.SHOW_COMMENT|Go.SHOW_TEXT|Go.SHOW_PROCESSING_INSTRUCTION|Go.SHOW_CDATA_SECTION,null)},tu=function(m){return m instanceof zm&&(typeof m.nodeName!="string"||typeof m.textContent!="string"||typeof m.removeChild!="function"||!(m.attributes instanceof Um)||typeof m.removeAttribute!="function"||typeof m.setAttribute!="function"||typeof m.namespaceURI!="string"||typeof m.insertBefore!="function"||typeof m.hasChildNodes!="function")},iu=function(m){return typeof Ta=="function"&&m instanceof Ta},nn=function(m,E,$){Fi[m]&&_(Fi[m],Ye=>{Ye.call(G,E,$,to)})},nu=function(m){let E=null;if(nn("beforeSanitizeElements",m,null),tu(m))return Li(m),!0;let $=Mt(m.nodeName);if(nn("uponSanitizeElement",m,{tagName:$,allowedTags:yt}),m.hasChildNodes()&&!iu(m.firstElementChild)&&Ct(/<[/\w]/g,m.innerHTML)&&Ct(/<[/\w]/g,m.textContent)||m.nodeType===Wo.progressingInstruction||xa&&m.nodeType===Wo.comment&&Ct(/<[/\w]/g,m.data))return Li(m),!0;if(!yt[$]||Zo[$]){if(!Zo[$]&&ru($)&&(dt.tagNameCheck instanceof RegExp&&Ct(dt.tagNameCheck,$)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck($)))return!1;if(Pa&&!Jn[$]){let Ye=Ca(m)||m.parentNode,Nt=Wm(m)||m.childNodes;if(Nt&&Ye){let Pt=Nt.length;for(let Xt=Pt-1;Xt>=0;--Xt){let Hi=Vm(Nt[Xt],!0);Hi.__removalCount=(m.__removalCount||0)+1,Ye.insertBefore(Hi,$m(m))}}}return Li(m),!0}return m instanceof Rl&&!sg(m)||($==="noscript"||$==="noembed"||$==="noframes")&&Ct(/<\/no(script|embed|frames)/i,m.innerHTML)?(Li(m),!0):(qn&&m.nodeType===Wo.text&&(E=m.textContent,_([ba,Ma,Da],Ye=>{E=Ge(E,Ye," ")}),m.textContent!==E&&(O(G.removed,{element:m.cloneNode()}),m.textContent=E)),nn("afterSanitizeElements",m,null),!1)},ou=function(m,E,$){if(Bl&&(E==="id"||E==="name")&&($ in Re||$ in og))return!1;if(!(Ia&&!wa[E]&&Ct(qm,E))){if(!(jl&&Ct(Km,E))){if(!bt[E]||wa[E]){if(!(ru(m)&&(dt.tagNameCheck instanceof RegExp&&Ct(dt.tagNameCheck,m)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck(m))&&(dt.attributeNameCheck instanceof RegExp&&Ct(dt.attributeNameCheck,E)||dt.attributeNameCheck instanceof Function&&dt.attributeNameCheck(E))||E==="is"&&dt.allowCustomizedBuiltInElements&&(dt.tagNameCheck instanceof RegExp&&Ct(dt.tagNameCheck,$)||dt.tagNameCheck instanceof Function&&dt.tagNameCheck($))))return!1}else if(!Ea[E]){if(!Ct(Ll,Ge($,Fl,""))){if(!((E==="src"||E==="xlink:href"||E==="href")&&m!=="script"&&Tt($,"data:")===0&&Wl[m])){if(!(Ul&&!Ct(Qm,Ge($,Fl,"")))){if($)return!1}}}}}}return!0},ru=function(m){return m!=="annotation-xml"&&ue(m,Jm)},su=function(m){nn("beforeSanitizeAttributes",m,null);let{attributes:E}=m;if(!E)return;let $={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:bt},Ye=E.length;for(;Ye--;){let Nt=E[Ye],{name:Pt,namespaceURI:Xt,value:Hi}=Nt,Ko=Mt(Pt),$t=Pt==="value"?Hi:Ji(Hi);if($.attrName=Ko,$.attrValue=$t,$.keepAttr=!0,$.forceKeepAttr=void 0,nn("uponSanitizeAttribute",m,$),$t=$.attrValue,$.forceKeepAttr||(Wr(Pt,m),!$.keepAttr))continue;if(!zl&&Ct(/\/>/i,$t)){Wr(Pt,m);continue}if(xa&&Ct(/((--!?|])>)|<\/(style|title)/i,$t)){Wr(Pt,m);continue}qn&&_([ba,Ma,Da],cu=>{$t=Ge($t,cu," ")});let au=Mt(m.nodeName);if(ou(au,Ko,$t)){if(Vl&&(Ko==="id"||Ko==="name")&&(Wr(Pt,m),$t=eg+$t),Vt&&typeof jr=="object"&&typeof jr.getAttributeType=="function"&&!Xt)switch(jr.getAttributeType(au,Ko)){case"TrustedHTML":{$t=Vt.createHTML($t);break}case"TrustedScriptURL":{$t=Vt.createScriptURL($t);break}}try{Xt?m.setAttributeNS(Xt,Pt,$t):m.setAttribute(Pt,$t),tu(m)?Li(m):C(G.removed)}catch{}}}nn("afterSanitizeAttributes",m,null)},ag=function Y(m){let E=null,$=eu(m);for(nn("beforeSanitizeShadowDOM",m,null);E=$.nextNode();)nn("uponSanitizeShadowNode",E,null),!nu(E)&&(E.content instanceof en&&Y(E.content),su(E));nn("afterSanitizeShadowDOM",m,null)};return G.sanitize=function(Y){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,$=null,Ye=null,Nt=null;if(Aa=!Y,Aa&&(Y=""),typeof Y!="string"&&!iu(Y))if(typeof Y.toString=="function"){if(Y=Y.toString(),typeof Y!="string")throw $o("dirty is not a string, aborting")}else throw $o("toString is not a function");if(!G.isSupported)return Y;if(Oa||Ra(m),G.removed=[],typeof Y=="string"&&(Xo=!1),Xo){if(Y.nodeName){let Hi=Mt(Y.nodeName);if(!yt[Hi]||Zo[Hi])throw $o("root node is forbidden and cannot be sanitized in-place")}}else if(Y instanceof Ta)E=Jl(""),$=E.ownerDocument.importNode(Y,!0),$.nodeType===Wo.element&&$.nodeName==="BODY"||$.nodeName==="HTML"?E=$:E.appendChild($);else{if(!Kn&&!qn&&!An&&Y.indexOf("<")===-1)return Vt&&Br?Vt.createHTML(Y):Y;if(E=Jl(Y),!E)return Kn?null:Br?Yo:""}E&&Sa&&Li(E.firstChild);let Pt=eu(Xo?Y:E);for(;Ye=Pt.nextNode();)nu(Ye)||(Ye.content instanceof en&&ag(Ye.content),su(Ye));if(Xo)return Y;if(Kn){if(zr)for(Nt=Ym.call(E.ownerDocument);E.firstChild;)Nt.appendChild(E.firstChild);else Nt=E;return(bt.shadowroot||bt.shadowrootmode)&&(Nt=Xm.call(Ce,Nt,!0)),Nt}let Xt=An?E.outerHTML:E.innerHTML;return An&&yt["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&Ct(El,E.ownerDocument.doctype.name)&&(Xt=" +`+Xt),qn&&_([ba,Ma,Da],Hi=>{Xt=Ge(Xt,Hi," ")}),Vt&&Br?Vt.createHTML(Xt):Xt},G.setConfig=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ra(Y),Oa=!0},G.clearConfig=function(){to=null,Oa=!1},G.isValidAttribute=function(Y,m,E){to||Ra({});let $=Mt(Y),Ye=Mt(m);return ou($,Ye,E)},G.addHook=function(Y,m){typeof m=="function"&&(Fi[Y]=Fi[Y]||[],O(Fi[Y],m))},G.removeHook=function(Y){if(Fi[Y])return C(Fi[Y])},G.removeHooks=function(Y){Fi[Y]&&(Fi[Y]=[])},G.removeAllHooks=function(){Fi={}},G}var jm=kl();return jm})});var Kd="edge/";function Jb(e,n){return parseInt(n.slice(n.toLowerCase().indexOf(Kd)+Kd.length),10)i.slice(4,i.length-1).replace(/['"#]+/g,""));return Array.from(new Set(t))}function ds(e,n=ug()){return ci(e)?pg(e).reduce((i,o)=>{let r=dg(o),s=`id_${n}_${o}`;return i.replace(new RegExp(`"${r}"`,"g"),`"${s}"`).replace(new RegExp(`'${r}'`,"g"),`'${s}'`).replace(new RegExp(`url\\('#${r}'\\)`,"g"),`url('#${s}')`).replace(new RegExp(`url\\("#${r}"\\)`,"g"),`url("#${s}")`).replace(new RegExp(`url\\(#${r}\\)`,"g"),`url(#${s})`)},e):e}var Ln=new se("POLYMORPHEUS_CONTEXT"),ui=class{constructor(n,t){this.component=n,this.i=t}createInjector(n,t){return mn.create({parent:this.i||n,providers:[{provide:Ln,useValue:t}]})}},ur=(()=>{class e{constructor(t,i){this.template=t,this.cdr=i,this.polymorpheus=""}check(){this.cdr.markForCheck()}static ngTemplateContextGuard(t,i){return!0}}return e.\u0275fac=function(t){return new(t||e)(a(Kt,2),a(ft))},e.\u0275dir=w({type:e,selectors:[["ng-template","polymorpheus",""]],inputs:{polymorpheus:"polymorpheus"},exportAs:["polymorpheus"]}),e})(),ps=class{constructor(n){this.$implicit=n}get polymorpheusOutlet(){return this.$implicit}};var Je=(()=>{class e{constructor(t,i,o){this.vcr=t,this.i=i,this.t=o,this.content=""}get template(){return Ja(this.content)?this.content.template:this.content instanceof Kt?this.content:this.t}ngOnChanges({content:t}){var i;let o=this.getContext();if((i=this.c)===null||i===void 0||i.injector.get(ft).markForCheck(),!t)return;this.vcr.clear();let r=o&&new Proxy(o,{get:(s,c)=>{var d;return(d=this.getContext())===null||d===void 0?void 0:d[c]}});ep(this.content)?this.process(this.content,r):(o instanceof ps&&o.$implicit)!=null&&this.vcr.createEmbeddedView(this.template,r)}ngDoCheck(){Ja(this.content)&&this.content.check()}static ngTemplateContextGuard(t,i){return!0}getContext(){return hg(this.content)||ep(this.content)?this.context:new ps(typeof this.content=="function"?this.content(this.context):this.content)}process(t,i){let o=t.createInjector(this.i,i);this.c=this.vcr.createComponent(o.get(Qr).resolveComponentFactory(t.component),0,o)}}return e.\u0275fac=function(t){return new(t||e)(a(Ci),a(mn),a(Kt))},e.\u0275dir=w({type:e,selectors:[["","polymorpheusOutlet",""]],inputs:{content:[0,"polymorpheusOutlet","content"],context:[0,"polymorpheusOutletContext","context"]},features:[qt]}),e})();function Ja(e){return e instanceof ur}function ep(e){return e instanceof ui}function hg(e){return Ja(e)||e instanceof Kt}var lt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var fg=["viewContainer"],mg="tui_interactive_",dr=(()=>{class e{constructor(){this.pseudoHover=null,this.pseudoActive=null,this.pseudoFocus=null,this.focusable=!0,this.nativeId="",this.focusedChange=new Pe,this.focusVisibleChange=new Pe,this.focusVisible=!1,this.autoIdString=`${mg}${e.autoId++}${Date.now()}`}get computedDisabled(){return this.disabled}get computedFocusable(){return!this.computedDisabled&&(this.focusable||this.focused)}get computedFocused(){var t;return!this.computedDisabled&&((t=this.pseudoFocus)!==null&&t!==void 0?t:this.focused)}get computedFocusVisible(){var t;return!this.computedDisabled&&((t=this.pseudoFocus)!==null&&t!==void 0?t:this.focusVisible)}get id(){return this.nativeId||this.autoIdString}updateFocused(t){this.focusedChange.emit(t)}updateFocusVisible(t){this.focusVisible!==t&&(this.focusVisible=t,this.focusVisibleChange.emit(t))}}return e.autoId=0,e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,hostVars:7,hostBindings:function(t,i){t&2&&(fe("data-focused",i.pseudoFocus),J("_disabled",i.computedDisabled)("_focused",i.computedFocused)("_focus-visible",i.computedFocusVisible))},inputs:{pseudoHover:"pseudoHover",pseudoActive:"pseudoActive",pseudoFocus:"pseudoFocus",focusable:"focusable",nativeId:"nativeId"},outputs:{focusedChange:"focusedChange",focusVisibleChange:"focusVisibleChange"}}),e})(),ec=class{},Ai=(()=>{class e extends dr{constructor(t,i,o){super(),this.ngControl=t,this.cdr=i,this.valueTransformer=o,this.refresh$=new Ze,this.onTouched=Wa,this.onChange=Wa,this.fallbackValue=this.getFallbackValue(),this.destroy$=new Ze,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 t;return(t=this.previousInternalValue)!==null&&t!==void 0?t:this.fallbackValue}set value(t){this.updateValue(t)}get safeCurrentValue(){var t;return(t=this.rawValue)!==null&&t!==void 0?t:this.fallbackValue}get invalid(){return this.safeNgControlData(({invalid:t})=>t,!1)}get valid(){return this.safeNgControlData(({valid:t})=>t,!1)}get touched(){return this.safeNgControlData(({touched:t})=>t,!1)}get disabled(){return this.safeNgControlData(({disabled:t})=>t,!1)}get interactive(){return!this.readOnly&&!this.computedDisabled}get control(){return this.safeNgControlData(({control:t})=>t,null)}get computedName(){var t,i;return(i=(t=this.controlName)===null||t===void 0?void 0:t.toString())!==null&&i!==void 0?i:null}get controlName(){var t,i,o;return(o=(i=(t=this.ngControl)===null||t===void 0?void 0:t.name)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:null}get rawValue(){let{ngControl:t}=this;if(t===null)return;let i=t instanceof an&&this.previousInternalValue===void 0?t.viewModel:t.value;return this.fromControlValue(i)}ngOnInit(){this.refresh$.pipe(ri(0),it(null),b(()=>{var t;return(t=this.ngControl)===null||t===void 0?void 0:t.control}),et(Tn),oe(),Fe(t=>He(t.valueChanges,t.statusChanges)),re(this.destroy$)).subscribe(()=>{this.refreshLocalValue(this.safeCurrentValue)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}checkControlUpdate(){this.cdr.markForCheck()}registerOnChange(t){this.onChange=i=>{t(this.toControlValue(i))},this.refresh$.next()}registerOnTouched(t){this.onTouched=t}setDisabledState(){this.checkControlUpdate()}writeValue(t){let i=this.ngControl instanceof an&&this.previousInternalValue===void 0?this.ngControl.model:t;this.refreshLocalValue(this.fromControlValue(i))}updateFocused(t){t||this.controlMarkAsTouched(),super.updateFocused(t)}updateValue(t){this.disabled||this.valueIdenticalComparator(this.value,t)||(this.previousInternalValue=t,this.controlSetValue(t))}valueIdenticalComparator(t,i){return t===i}safeNgControlData(t,i){var o;return(o=this.ngControl&&t(this.ngControl))!==null&&o!==void 0?o:i}controlMarkAsTouched(){this.onTouched(),this.checkControlUpdate()}controlSetValue(t){this.onChange(t),this.checkControlUpdate()}refreshLocalValue(t){this.previousInternalValue=t,this.checkControlUpdate()}fromControlValue(t){return this.valueTransformer?this.valueTransformer.fromControlValue(t):t}toControlValue(t){return this.valueTransformer?this.valueTransformer.toControlValue(t):t}}return e.\u0275fac=function(t){return new(t||e)(a(zi,8),a(ft),a(ec,8))},e.\u0275dir=w({type:e,hostVars:4,hostBindings:function(t,i){t&2&&J("_readonly",i.readOnly)("_invalid",i.computedInvalid)},inputs:{readOnly:"readOnly",pseudoInvalid:"pseudoInvalid"},features:[W]}),e})();function tp(e){return{provide:Ai,useExisting:e}}var Yt=(()=>{class e{constructor(){this.change$=new Ze}ngOnChanges(){this.change$.next()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,features:[qt]}),e})(),hs=(()=>{class e extends _i{constructor(t){super(i=>this.dialogs$.subscribe(i)),this.idService=t,this.dialogs$=new Ke([])}open(t,i={}){return new _i(o=>{let r=c=>{o.next(c),o.complete()},s=Object.assign(Object.assign(Object.assign({},this.defaultOptions),i),{content:t,completeWith:r,$implicit:o,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(c=>c!==s))}})}}return e.\u0275fac=function(t){return new(t||e)(ye(qa))},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})();var wM=(()=>{class e extends Ai{clear(){this.value=[]}getFallbackValue(){return[]}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,features:[W]}),e})(),IM=(()=>{class e extends Ai{getFallbackValue(){return null}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,features:[W]}),e})(),Hn=(()=>{class e{get safeHost(){if(!this.host)throw new ud;return this.host}attach(t){this.host=t}add(t){return this.safeHost.addComponentChild(t)}remove({hostView:t}){t.destroyed||t.destroy()}addTemplate(t,i){return this.safeHost.addTemplateChild(t,i)}removeTemplate(t){t.destroyed||t.destroy()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),_o=(()=>{class e{constructor(t,i,o){this.injector=t,this.el=i,o.attach(this)}get clientRect(){return this.el.nativeElement.getBoundingClientRect()}addComponentChild(t){let i=t.createInjector(this.injector),r=i.get(Qr).resolveComponentFactory(t.component),s=[{provide:e,useValue:this}],c=mn.create({parent:i,providers:s}),d=this.vcr.createComponent(r,void 0,c);return d.changeDetectorRef.detectChanges(),d}addTemplateChild(t,i){return this.vcr.createEmbeddedView(t,i)}}return e.\u0275fac=function(t){return new(t||e)(a(so),a(N),a(Hn))},e.\u0275dir=w({type:e,viewQuery:function(t,i){if(t&1&&at(fg,5,Ci),t&2){let o;$e(o=We())&&(i.vcr=o.first)}}}),e})();function ip(e){return e!==null&&typeof e<"u"&&`${e}`!="false"}var SM=(()=>{class e{transform(t,i,...o){return i(t,...o)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=Ii({name:"tuiMapper",type:e,pure:!0}),e})(),PM=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();function gg(e,n){if(e&1&&(g(0,"div",3),S(1,"div",4),v()),e&2){let t=u().ngIf;J("t-bar_has-horizontal",t[1])}}function vg(e,n){if(e&1&&(g(0,"div",5),S(1,"div",6),v()),e&2){let t=u().ngIf;J("t-bar_has-vertical",t[0])}}function _g(e,n){if(e&1&&(Ie(0),T(1,gg,2,2,"div",1)(2,vg,2,2,"div",2),xe()),e&2){let t=n.ngIf;h(),l("ngIf",t[0]),h(),l("ngIf",t[1])}}function Tg(e,n){if(e&1&&(Ie(0),T(1,_g,3,2,"ng-container",0),R(2,"async"),xe()),e&2){let t=u();h(),l("ngIf",H(2,1,t.refresh$))}}var fs=24;function Cg({clientY:e},{top:n,height:t}){return(e-n)/t}function yg({clientX:e},{left:n,width:t}){return(e-n)/t}var bg=(()=>{class e{constructor(t,i,o,r,s,c){this.container=r,this.doc=s,this.el=c,this.tuiScrollbar="vertical";let{nativeElement:d}=this.el,p=pe(d,"mousedown"),_=pe(this.doc,"mousemove"),C=pe(this.doc,"mouseup"),O=pe(this.wrapper,"mousedown");He(O.pipe(b(L=>this.getScrolled(L,.5,.5))),p.pipe(Fe(L=>{let Z=d.getBoundingClientRect(),ue=Cg(L,Z),Ge=yg(L,Z);return _.pipe(b(Tt=>this.getScrolled(Tt,ue,Ge)),re(C))}))).pipe($i(t),re(i)).subscribe(([L,Z])=>{this.element.style.scrollBehavior="auto",this.tuiScrollbar==="vertical"?this.element.scrollTop=L:this.element.scrollLeft=Z,this.element.style.scrollBehavior=""}),He(o.pipe(rn(os)),md(this.element)).pipe($i(t),re(i)).subscribe(()=>{this.tuiScrollbar==="vertical"?(d.style.top=`${this.thumb*100}%`,d.style.height=`${this.view*100}%`):(d.style.left=`${this.thumb*100}%`,d.style.width=`${this.view*100}%`)})}get wrapper(){return this.el.nativeElement.parentElement}get scrolled(){let{scrollTop:t,scrollHeight:i,clientHeight:o,scrollLeft:r,scrollWidth:s,clientWidth:c}=this.element;return this.tuiScrollbar==="vertical"?t/(i-o):r/(s-c)}get compensation(){let{clientHeight:t,scrollHeight:i,clientWidth:o,scrollWidth:r}=this.element;return t*t/i>fs&&this.tuiScrollbar==="vertical"||o*o/r>fs&&this.tuiScrollbar==="horizontal"?0:this.tuiScrollbar==="vertical"?fs/t:fs/o}get thumb(){let t=this.compensation||this.view;return this.scrolled*(1-t)}get view(){let{clientHeight:t,scrollHeight:i,clientWidth:o,scrollWidth:r}=this.element;return this.tuiScrollbar==="vertical"?Math.ceil(t/i*100)/100:Math.ceil(o/r*100)/100}get element(){return this.container.nativeElement}getScrolled({clientY:t,clientX:i},o,r){let{offsetHeight:s,offsetWidth:c}=this.el.nativeElement,{top:d,left:p,width:_,height:C}=this.wrapper.getBoundingClientRect(),O=this.element.scrollHeight-C,L=this.element.scrollWidth-_,Z=(t-d-s*o)/(C-s),ue=(i-p-c*r)/(_-c);return[O*Z,L*ue]}}return e.\u0275fac=function(t){return new(t||e)(a(Xe),a(q,2),a(Cn),a(Fn),a(qe),a(N))},e.\u0275dir=w({type:e,selectors:[["","tuiScrollbar",""]],inputs:{tuiScrollbar:"tuiScrollbar"},features:[A([q])]}),e})(),np=(()=>{class e{constructor(t,i,o,r){this.isIOS=t,this.zone=i,this.scrollRef=o,this.animationFrame$=r,this.refresh$=this.animationFrame$.pipe(rn(300),b(()=>{let{clientHeight:s,scrollHeight:c,clientWidth:d,scrollWidth:p}=this.scrollRef.nativeElement;return[Math.ceil(s/c*100)<100,Math.ceil(d/p*100)<100]}),it([!1,!1]),oe((s,c)=>s[0]===c[0]&&s[1]===c[1]),Jt(this.zone))}}return e.\u0275fac=function(t){return new(t||e)(a(ln),a(Xe),a(Fn),a(Cn))},e.\u0275cmp=k({type:e,selectors:[["tui-scroll-controls"]],decls:1,vars:1,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(t,i){t&1&&T(0,Tg,3,3,"ng-container",0),t&2&&l("ngIf",!i.isIOS)},dependencies:[ee,bg,K],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 ZM=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiScrollRef",""]],features:[A([{provide:Fn,useExisting:N}])]}),e})(),op=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z]]}),e})();function Mg(e){let n=[],t=!1,i;return function(...r){return t&&n.length===r.length&&r.every((c,d)=>c===n[d])||(n=r,i=e.apply(this,r),t=!0),i}}function rp(e,n,t=!0){return function(){let o=e.call(this);return Object.defineProperty(this,n,{enumerable:t,value:o}),o}}function Zt(e,n,t){if(typeof e=="function"){let d=n;if(d.kind==="getter")return rp(e,d.name);if(d.kind==="method")return Mg(e);throw new Xa}let{get:i,enumerable:o,value:r}=t,s=n;if(i)return{configurable:!0,enumerable:o,get:rp(i,s,o)};if(typeof r!="function")throw new Xa;let c=r;return{configurable:!0,enumerable:o,get(){let d=[],p=!1,_,C=(...O)=>(p&&d.length===O.length&&O.every((Z,ue)=>Z===d[ue])||(d=O,_=c.apply(this,O),p=!0),_);return Object.defineProperty(this,s,{configurable:!0,value:C}),C}}}var gt=(()=>{class e{constructor(t,i,o,r){var s;this.active$=t,this.zone=i,this.el=o,this.directParentActiveZone=r,this.subActiveZones=[],this.tuiActiveZoneParent=null,this.tuiActiveZoneChange=this.active$.pipe(b(c=>!!c&&this.contains(c)),it(!1),oe(),hn(1),Jt(this.zone)),(s=this.directParentActiveZone)===null||s===void 0||s.addSubActiveZone(this)}set tuiActiveZoneParentSetter(t){this.setZone(t)}ngOnDestroy(){var t,i;(t=this.directParentActiveZone)===null||t===void 0||t.removeSubActiveZone(this),(i=this.tuiActiveZoneParent)===null||i===void 0||i.removeSubActiveZone(this)}contains(t){return this.el.nativeElement.contains(t)||this.subActiveZones.some((i,o,r)=>r.indexOf(i)===o&&i.contains(t))}setZone(t){var i;(i=this.tuiActiveZoneParent)===null||i===void 0||i.removeSubActiveZone(this),t==null||t.addSubActiveZone(this),this.tuiActiveZoneParent=t}addSubActiveZone(t){this.subActiveZones=[...this.subActiveZones,t]}removeSubActiveZone(t){this.subActiveZones=Xu(this.subActiveZones,this.subActiveZones.indexOf(t))}}return e.\u0275fac=function(t){return new(t||e)(a(Cd),a(Xe),a(N),a(e,12))},e.\u0275dir=w({type:e,selectors:[["","tuiActiveZone","",5,"ng-container"],["","tuiActiveZoneChange","",5,"ng-container"],["","tuiActiveZoneParent","",5,"ng-container"]],hostBindings:function(t,i){t&1&&y("mousedown.silent",function(){return 0},!1,Ni)},inputs:{tuiActiveZoneParentSetter:[0,"tuiActiveZoneParent","tuiActiveZoneParentSetter"]},outputs:{tuiActiveZoneChange:"tuiActiveZoneChange"},exportAs:["tuiActiveZone"]}),Td([Zt],e.prototype,"setZone",null),e})(),yi=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var sp=(()=>{class e{constructor(t,i){this.focusable=t,this.el=i}get element(){var t;return((t=this.focusable)===null||t===void 0?void 0:t.nativeFocusableElement)||this.el.nativeElement}get isTextFieldElement(){return this.element.matches("input, textarea, [contenteditable]")}}return e.\u0275fac=function(t){za()},e.\u0275dir=w({type:e}),e})(),Dg=1e3,wg=".ng-animating",Ig=(()=>{class e extends sp{constructor(t,i,o){super(t,i),this.animationFrame$=o}setFocus(){this.isTextFieldElement?hu(oo(Dg),this.animationFrame$.pipe(rn(os),b(()=>this.element.closest(wg)),_u(Boolean),Wt(1))).subscribe(()=>this.element.focus({preventScroll:!0})):this.element.focus({preventScroll:!0})}}return e.\u0275fac=function(t){return new(t||e)(a(ho,10),a(N),a(Cn))},e.\u0275dir=w({type:e,features:[W]}),e})(),xg=["type","inputMode","autocomplete","accept","min","max","step","pattern","size","maxlength"],Og=(()=>{class e extends sp{constructor(t,i,o,r,s){super(t,i),this.renderer=o,this.zone=r,this.win=s,this.patchCssStyles()}setFocus(){this.isTextFieldElement?this.zone.runOutsideAngular(()=>this.iosWebkitAutofocus()):this.element.focus({preventScroll:!0})}iosWebkitAutofocus(){var t;let i=this.makeFakeInput(),o=this.getDurationTimeBeforeFocus(),r=0,s=0,c=()=>i.focus({preventScroll:!0}),d=()=>{clearTimeout(r),r=this.win.setTimeout(()=>{clearTimeout(s),i.removeEventListener("blur",c),i.removeEventListener("focus",d),s=this.win.setTimeout(()=>{this.element.focus({preventScroll:!1}),i.remove()},o)})};i.addEventListener("blur",c,{once:!0}),i.addEventListener("focus",d),this.insideDialog()?this.win.document.body.appendChild(i):(t=this.element.parentElement)===null||t===void 0||t.appendChild(i),i.focus({preventScroll:!0})}makeFakeInput(){let t=this.renderer.createElement("input"),i=this.element.getBoundingClientRect();return this.patchFakeInputFromFocusableElement(t),t.style.height=Qe(i.height),t.style.width=Qe(i.width/2),t.style.position="fixed",t.style.zIndex="-99999999",t.style.caretColor="transparent",t.style.border="none",t.style.outline="none",t.style.color="transparent",t.style.background="transparent",t.style.cursor="none",t.style.fontSize=Qe(16),t.style.top=Qe(i.top),t.style.left=Qe(i.left),t}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(t=>{t.style.setProperty("overflow","auto"),t.style.setProperty("height","100%")})}patchFakeInputFromFocusableElement(t){xg.forEach(i=>{let o=this.element.getAttribute(i);Tn(o)&&t.setAttribute(i,o)})}}return e.\u0275fac=function(t){return new(t||e)(a(ho,10),a(N),a(ji),a(Xe),a(zt))},e.\u0275dir=w({type:e,features:[W]}),e})(),ap={delay:NaN},cp=ce(ap);function lp(e){return Si(cp,e,ap)}var up=new se("[TUI_AUTOFOCUS_HANDLER]"),Sg=[{provide:up,useFactory:(e,n,t,i,o,r,s)=>s?new Og(e,n,i,o,r):new Ig(e,n,t),deps:[[new tt,new fn,ho],N,Cn,ji,Xe,zt,ln]},q],ms=(()=>{class e{constructor(t,i,o){this.handler=t,this.options=i,this.destroy$=o,this.autoFocus=!0}ngAfterViewInit(){ip(this.autoFocus)&&this.focus()}focus(){Number.isNaN(this.options.delay)?Promise.resolve().then(()=>this.handler.setFocus()):oo(this.options.delay).pipe(re(this.destroy$)).subscribe(()=>this.handler.setFocus())}}return e.\u0275fac=function(t){return new(t||e)(a(up),a(cp),a(q,2))},e.\u0275dir=w({type:e,selectors:[["","tuiAutoFocus",""]],inputs:{autoFocus:[0,"tuiAutoFocus","autoFocus"]},features:[A(Sg)]}),e})(),gs=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Pg=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=k({type:e,selectors:[["ng-component"]],hostAttrs:[1,"tui-autofilled-styles"],decls:0,vars:0,template:function(t,i){},styles:[`.tui-autofill input,input.tui-autofill{transition:box-shadow .01s} +`],encapsulation:2,changeDetection:0}),e})(),dp=(()=>{class e{constructor(t){this.autofilled=!1,this.tuiAutofilledChange=new Pe,t.addComponent(Pg)}transitionStartHandler({propertyName:t,target:i}){var o;t.includes("box-shadow")&&((o=i)===null||o===void 0?void 0:o.matches("input"))&&(this.autofilled=!this.autofilled,this.tuiAutofilledChange.emit(this.autofilled))}}return e.\u0275fac=function(t){return new(t||e)(a(Sd))},e.\u0275dir=w({type:e,selectors:[["","tuiAutofilledChange",""]],hostAttrs:[1,"tui-autofill"],hostVars:2,hostBindings:function(t,i){t&1&&y("transitionstart",function(r){return i.transitionStartHandler(r)}),t&2&&J("_autofilled",i.autofilled)},outputs:{tuiAutofilledChange:"tuiAutofilledChange"}}),e})(),pp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var hp=(()=>{class e{constructor(){this.indeterminate=!1,this.checked=!1,this.tuiCheckedChange=new Pe}get isChecked(){return this.checked}get isIndeterminate(){return this.indeterminate}set tuiChecked(t){this.checked=t||!1,this.indeterminate=t===null}onChange({checked:t}){this.checked=t,this.indeterminate=!1,this.tuiCheckedChange.emit(t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["input","tuiChecked",""],["input","tuiCheckedChange",""]],hostVars:2,hostBindings:function(t,i){t&1&&y("change",function(r){return i.onChange(r.target)}),t&2&&kn("checked",i.isChecked)("indeterminate",i.isIndeterminate)},inputs:{tuiChecked:"tuiChecked"},outputs:{tuiCheckedChange:"tuiCheckedChange"}}),e})(),fp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var mp=(()=>{class e{constructor(t){this.tuiFocusVisibleChange=t}}return e.\u0275fac=function(t){return new(t||e)(a(mo))},e.\u0275dir=w({type:e,selectors:[["","tuiFocusVisibleChange",""]],outputs:{tuiFocusVisibleChange:"tuiFocusVisibleChange"},features:[A([q,mo])]}),e})(),gp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var yn=(()=>{class e{constructor(){this.focusable=!0}get tabIndex(){return this.focusable?0:-1}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiFocusable",""]],hostVars:1,hostBindings:function(t,i){t&2&&kn("tabIndex",i.tabIndex)},inputs:{focusable:[0,"tuiFocusable","focusable"]}}),e})(),bn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var vs=(()=>{class e{constructor({nativeElement:t},i){this.tuiFocusedChange=He(pe(t,"focusin"),pe(t,"focusout")).pipe(b(()=>Qt(t)),it(!1),oe(),hn(1),Jt(i))}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(Xe))},e.\u0275dir=w({type:e,selectors:[["","tuiFocusedChange",""]],outputs:{tuiFocusedChange:"tuiFocusedChange"}}),e})(),_s=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();function Eg({currentTarget:e,relatedTarget:n}){return!pt(n)||!pt(e)||!e.contains(n)}var Wi=(()=>{class e extends _i{constructor(t,i){super(o=>this.stream$.subscribe(o)),this.el=t,this.zone=i,this.stream$=He(pe(this.el.nativeElement,"mouseenter").pipe(b(Bi)),pe(this.el.nativeElement,"mouseleave").pipe(b(cn)),pe(this.el.nativeElement,"mouseout").pipe(et(Eg),b(cn))).pipe(oe(),Jt(this.zone))}}return e.\u0275fac=function(t){return new(t||e)(ye(N),ye(Xe))},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),vp=(()=>{class e{constructor(t){this.tuiHoveredChange=t}}return e.\u0275fac=function(t){return new(t||e)(a(Wi))},e.\u0275dir=w({type:e,selectors:[["","tuiHoveredChange",""]],outputs:{tuiHoveredChange:"tuiHoveredChange"},features:[A([Wi])]}),e})(),_p=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Tp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiItem",""]]}),e})(),Ts=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var ic=class{constructor(n){this.internalDirectiveInstance=n}get $implicit(){return this.internalDirectiveInstance.tuiLet}get tuiLet(){return this.internalDirectiveInstance.tuiLet}},xt=(()=>{class e{constructor(t,i){t.createEmbeddedView(i,new ic(this))}static ngTemplateContextGuard(t,i){return!0}}return e.\u0275fac=function(t){return new(t||e)(a(Ci),a(Kt))},e.\u0275dir=w({type:e,selectors:[["","tuiLet",""]],inputs:{tuiLet:"tuiLet"}}),e})(),Ot=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Cp=(()=>{class e{constructor(t,i){this.enabled$=new Ze;let o=i.pipe(b(r=>!!r&&(!t||!r.length||r.every(s=>!t.contains(s)))));this.tuiObscured=this.enabled$.pipe(po(()=>o))}set tuiObscuredEnabled(t){this.enabled$.next(t)}}return e.\u0275fac=function(t){return new(t||e)(a(gt,8),a(Ka,2))},e.\u0275dir=w({type:e,selectors:[["","tuiObscured",""]],inputs:{tuiObscuredEnabled:"tuiObscuredEnabled"},outputs:{tuiObscured:"tuiObscured"},features:[A([Ka,Pd,q])]}),e})(),yp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var bp=(()=>{class e{constructor({nativeElement:t},i,o){this.mode="scroll",pe(t,"wheel",{passive:!1}).pipe(et(()=>this.enabled),$i(i),re(o)).subscribe(r=>{this.processEvent(r,!!r.deltaY,r.deltaY?r.deltaY<0:r.deltaX<0)}),pe(t,"touchstart",{passive:!0}).pipe(Fe(({touches:r})=>{let{clientX:s,clientY:c}=r[0],d=0,p=0,_;return pe(t,"touchmove",{passive:!1}).pipe(et(()=>this.enabled),st(C=>{let O=C.changedTouches[0];d=s-O.clientX,p=c-O.clientY,s=O.clientX,c=O.clientY,_===void 0&&(_=Math.abs(p)>Math.abs(d)),this.processEvent(C,_,_?p<0:d<0)}))}),$i(i),re(o)).subscribe()}get enabled(){return this.mode!=="none"}get overscrollBehavior(){return this.enabled?"contain":null}processEvent(t,i,o){var r;let{target:s,currentTarget:c,cancelable:d}=t;if(!(!d||!pt(s)||((r=s)===null||r===void 0?void 0:r.type)==="range")){if(this.mode==="all"&&(i&&!c.contains(Ga(s))||!i&&!c.contains(Ga(s,!1)))){t.preventDefault();return}if(i&&(o&&!ar(s,c,!0,!1)||!o&&!ar(s,c,!0,!0))){t.preventDefault();return}!i&&(o&&!ar(s,c,!1,!1)||!o&&!ar(s,c,!1,!0))&&t.preventDefault()}}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(Xe),a(q,2))},e.\u0275dir=w({type:e,selectors:[["","tuiOverscroll",""]],hostVars:2,hostBindings:function(t,i){t&2&&nt("overscroll-behavior",i.overscrollBehavior)},inputs:{mode:[0,"tuiOverscroll","mode"]},features:[A([q])]}),e})(),Mp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Ag=["*"],To=(()=>{class e extends Hn{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),$w=(()=>{class e extends _o{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275cmp=k({type:e,selectors:[["tui-dropdown-host"]],features:[A([{provide:Hn,useExisting:To},{provide:_o,useExisting:e}]),W],ngContentSelectors:Ag,decls:3,vars:0,consts:[["viewContainer",""]],template:function(t,i){t&1&&(Ve(),me(0),Ut(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})(),Ww=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var eI=(()=>{class e{constructor(t,i){this.el=t,this.takeOnlyTrustedEvents=i,this.tuiPressedChange=fd(this.el.nativeElement,{onlyTrusted:this.takeOnlyTrustedEvents})}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(xd))},e.\u0275dir=w({type:e,selectors:[["","tuiPressedChange",""]],outputs:{tuiPressedChange:"tuiPressedChange"}}),e})(),Dp=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var kg=65536,nc=class{constructor(n){this.$implicit=n}},wp=(()=>{class e{constructor(t,i){this.viewContainer=t,this.templateRef=i}set tuiRepeatTimesOf(t){let i=Math.floor(_n(t,0,kg)),{length:o}=this.viewContainer;t{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Co=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}(Co||{}),ki=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}(ki||{});function mI(e,n,t){return t&&te?n:e}var gI=7;var yo=12,Cs=1,oc=0,rc=11,sc=0,ac=9999,ys=`${Vi}${Yu}${Vi}`,Rg=1e3,Fg=60,Lg=60,xp=24,Hg=Rg*Fg,Ng=Hg*Lg,vI=Ng*xp,cc=10,jg=2*cc+ys.length,_I=ce("DMY"),TI=ce("."),CI=(e,n)=>e.replace(/[^0-9A-Za-zА-Яа-я]/gi,n),pi=class e{constructor(n){this.year=n}static isValidYear(n){return Number.isInteger(n)&&sr(n,sc,ac+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,t){return t.year-n.year}static normalizeYearPart(n){return rs(n,sc,ac)}get formattedYear(){return String(this.year).padStart(4,"0")}get isLeapYear(){return e.isLeapYear(this.year)}get absoluteLeapYears(){return e.getAbsoluteLeapYears(this.year)}yearBefore({year:n}){return this.year=n}yearAfter({year:n}){return this.year>n}append({year:n=0}){let t=this.year+n;return new e(t)}toString(){return this.formattedYear}valueOf(){return this.year}[Symbol.toPrimitive](n){return Date.prototype[Symbol.toPrimitive].call(this,n)}toJSON(){return this.formattedYear}},di=class e extends pi{constructor(n,t){super(n),this.month=t}static isValidMonth(n,t){return pi.isValidYear(n)&&e.isValidMonthPart(t)}static getMonthDaysCount(n,t){switch(n){case ki.February:return t?29:28;case ki.April:case ki.June:case ki.September:case ki.November:return 30;default:return 31}}static currentLocal(){let n=new Date;return new e(n.getFullYear(),n.getMonth())}static currentUtc(){let n=new Date;return new e(n.getUTCFullYear(),n.getUTCMonth())}static lengthBetween(n,t){let i=n.month+n.year*12;return t.month+t.year*12-i}static normalizeMonthPart(n){return rs(n,oc,rc)}static isValidMonthPart(n){return Number.isInteger(n)&&sr(n,oc,rc+1)}get formattedMonthPart(){return String(this.month+1).padStart(2,"0")}get daysCount(){return e.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:t=0}){let i=(this.year+n)*yo+this.month+t;return new e(Math.floor(i/yo),i%yo)}toString(){return`${this.formattedMonthPart}.${this.formattedYear}`}valueOf(){return this.toLocalNativeDate().valueOf()}toJSON(){return`${super.toJSON()}-${this.formattedMonthPart}`}toLocalNativeDate(){return new Date(this.year,this.month)}toUtcNativeDate(){return new Date(Date.UTC(this.year,this.month))}},Nn=class e extends di{constructor(n,t,i){super(n,t),this.day=i}static fromLocalNativeDate(n){return new e(n.getFullYear(),n.getMonth(),n.getDate())}static fromUtcNativeDate(n){return new e(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate())}static isValidDay(n,t,i){return di.isValidMonth(n,t)&&Number.isInteger(i)&&sr(i,Cs,di.getMonthDaysCount(t,pi.isLeapYear(n))+1)}static currentLocal(){let n=new Date,t=n.getFullYear(),i=n.getMonth(),o=n.getDate();return new e(t,i,o)}static currentUtc(){let n=new Date,t=n.getUTCFullYear(),i=n.getUTCMonth(),o=n.getUTCDate();return new e(t,i,o)}static normalizeOf(n,t,i){let o=pi.normalizeYearPart(n),r=di.normalizeMonthPart(t),s=e.normalizeDayPart(i,r,o);return new e(o,r,s)}static lengthBetween(n,t){return Math.round((t.toLocalNativeDate().getTime()-n.toLocalNativeDate().getTime())/(1e3*60*60*24))}static parseRawDateString(n,t="DMY"){switch(t){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,t="DMY"){let{day:i,month:o,year:r}=this.parseRawDateString(n,t);return e.normalizeOf(r,o,i)}static jsonParse(n){let{day:t,month:i,year:o}=this.parseRawDateString(n,"YMD");if(!pi.isValidYear(o))throw new ld(o);if(!di.isValidMonth(o,i))throw new cd(i);if(!Number.isInteger(t)||!sr(t,Cs,di.getMonthDaysCount(i,pi.isLeapYear(o))+1))throw new ad(t);return new e(o,i,t)}static normalizeDayPart(n,t,i){let o=di.getMonthDaysCount(t,pi.isLeapYear(i));return rs(n,1,o)}get formattedDayPart(){return String(this.day).padStart(2,"0")}get isWeekend(){let n=this.dayOfWeek(!1);return n===Co.Saturday||n===Co.Sunday}dayOfWeek(n=!0){let t=n?this.toLocalNativeDate().getDay()-1:this.toLocalNativeDate().getDay();return t<0?6:t}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,t){return n!==null&&this.dayBefore(n)?n:t!==null&&this.dayAfter(t)?t:this}append({year:n=0,month:t=0,day:i=0}){let o=(this.year+n)*yo+this.month+t,r=Math.floor(o/yo),s=o%yo,c=Math.min(this.day,di.getMonthDaysCount(s,pi.isLeapYear(r)))+i;for(;c>di.getMonthDaysCount(s,pi.isLeapYear(r));)c-=di.getMonthDaysCount(s,pi.isLeapYear(r)),s===ki.December?(r++,s=ki.January):s++;for(;ce.includes(".svg#")?e:`#${e}`,MI=()=>Vu,pc={decimalLimit:1/0,decimalSeparator:",",thousandSeparator:Vi,zeroPadding:!0,rounding:"truncate",decimal:"not-zero"},Pp=["Spacebar","Backspace","Delete","ArrowLeft","ArrowRight","Left","Right","End","Home"];var DI="tui-scroll-into-view";var Ep="tui-icon-error",hc=["bottom-left","bottom","bottom-right","top-left","top","top-right","left-top","left","left-bottom","right-top","right","right-bottom"];function vc(e){return!e||typeof getComputedStyle>"u"?!1:getComputedStyle(e).getPropertyValue("position")==="fixed"||vc(e.parentElement)}function bo({document:e,innerWidth:n}){return Math.max(e.documentElement.clientWidth||0,n||0)}function bs(e){let n=e.cloneRange(),{startContainer:t,startOffset:i,endContainer:o,endOffset:r}=n,{ownerDocument:s}=t;if(!s)return n;let c=s.createTreeWalker(s.body,NodeFilter.SHOW_TEXT,Gu);c.currentNode=t;do{let d=c.currentNode,p=d.textContent||"",_=d===t?p.slice(0,Math.max(0,i+1)):p,C=Math.max(_.lastIndexOf(" "),_.lastIndexOf(Vi),_.lastIndexOf(rr))+1;if(n.setStart(d,0),C){n.setStart(d,C);break}}while(c.previousNode());c.currentNode=o;do{let d=c.currentNode,p=d.textContent||"",_=d===o?p.slice(r+1):p,C=[_.indexOf(" "),_.indexOf(Vi),_.indexOf(rr)].reduce((O,L)=>O===-1||L===-1?Math.max(O,L):Math.min(O,L),-1);if(n.setEnd(d,p.length),C!==-1){n.setEnd(d,C+p.length-_.length);break}}while(c.nextNode());return n}var fc='width="',mc='height="',gc="")));if(!(i!=null&&i.includes(fc))||!i.includes(mc))return`${t.replace(gc,``;let o=i.indexOf(fc),r=i.indexOf(mc),s=o+fc.length,c=r+mc.length,d=i.slice(s,i.indexOf('"',s)),p=i.slice(c,i.indexOf('"',c));if(!p||!d||d.includes("%")||p.includes("%")||d.includes("em")||p.includes("em"))return t.replace(gc,`${t}`}var _c=1.5,Ug=2.5;function Rp(e,n=!1,t=!1,i=!1,o="m"){let r=o==="s"?0:.25,s=0;return e&&(s+=_c+r),n&&(s+=_c+r),t&&(s+=_c+r),i&&(s+=Ug+r),s}function Ms(e){let n=e.endsWith("/")?e:`${e}/`;return t=>t.startsWith("tuiIcon")?`${n}${t}.svg${pr}#${t}`:Sp(t)}function Fp(e){return e.length===1||Pp.includes(e)}function Tc(e,n="tui-hints-host"){var t;return!!(!((t=ed(e))===null||t===void 0)&&t.some(i=>!i.closest(n)))}function Lp(e){let n=e.trim();return n.startsWith("<")&&n.endsWith(">")}function Cc(e,n){return(t,i)=>{let o=t||Object.assign({},i||n);return Object.keys(e).forEach(r=>{o[r]=e[r]}),o}}var kp={xxs:0,xs:1,s:2,m:3,l:4,xl:5,xxl:6};function Hp(e,n="s"){return kp[e]>kp[n]}function Np(e,{mobile:n}){return bo(e){var e,n,t;return(t=(n=(e=V(qe).defaultView)===null||e===void 0?void 0:e.matchMedia)===null||n===void 0?void 0:n.call(e,"(prefers-reduced-motion: reduce)").matches)!==null&&t!==void 0?t:!1}),yc=300,bc=X(()=>V(Bg)?0:yc),Do=X(()=>({value:"",params:{duration:V(bc)}})),$I=X(()=>Lu()),Vg={check:"tuiIconCheck",close:"tuiIconClose",error:"tuiIconAlertCircle",more:"tuiIconChevronRight"},wo=ce(Vg);var $g=new se("[TUI_DATA_LIST_ACCESSOR]");function jp(e){return{provide:$g,useExisting:e}}var Mc=new se("[TUI_DATA_LIST_HOST]");function WI(e){return{provide:Mc,useExisting:e}}var GI=ce(e=>e.isWeekend?"weekend":"weekday"),YI=new se("[TUI_DOCUMENT_OR_SHADOW_ROOT]"),ZI=new se("[TUI_ELEMENT_REF]"),Wg=ce(Co.Monday),Up=X(ze("months")),Ds=X(ze("close")),zp=X(ze("nothingFoundMessage")),XI=X(ze("defaultErrorMessage")),qI=X(ze("spinTexts")),Gg=X(ze("shortWeekDays")),ws="assets/taiga-ui/icons",Dc=ce(ws),Bp=ce({}),Vp=X(()=>Ms(V(Dc))),wc=ce({mobile:768,desktopSmall:1024,desktopLarge:1280}),Ic=X(()=>{let e=V(zt),n=V(wc);return pe(e,"resize").pipe(on(),it(null),b(()=>Np(e,n)),oe(),Jt(V(Xe)))}),Yg=new se("[TUI_LEGACY_MASK]"),Yi=new se("[TUI_MODE]"),Zg={info:"tuiIconInfo",success:"tuiIconCheckCircle",error:"tuiIconXCircle",warning:"tuiIconAlertCircle",neutral:"tuiIconInfo"},Xg={autoClose:3e3,label:"",status:"info",hasCloseButton:!0,icon:({$implicit:e})=>Zg[e],size:"m",hasIcon:!0,defaultAutoCloseTime:3e3},KI=ce(Xg);var QI=ce(pc);var JI=ce(B(Object.assign(Object.assign({},pc),{decimalLimit:NaN}))),$p=new se("[TUI_OPTION_CONTENT]");var qg=e=>{let n=e.length-1;return[e[n],...e.slice(0,n)]},ex=X(()=>{let e=V(Wg);return V(Gg).pipe(b(qg),b(n=>[...n.slice(e),...n.slice(0,e)]))}),Io=new se("[TUI_SANITIZER]");var Wp=X(()=>{let e=V(qe);return He(pe(e,"selectionchange"),pe(e,"mouseup"),pe(e,"mousedown").pipe(Fe(()=>pe(e,"mousemove").pipe(re(pe(e,"mouseup"))))),pe(e,"keydown"),pe(e,"keyup")).pipe(on())}),tx=ce({decrement:"tuiIconChevronLeft",increment:"tuiIconChevronRight"}),Gp=ce(ds),Yp=ce(io),Zp=ce(Gi.Textfield),Xp=new se("[TUI_TEXTFIELD_HOST]");function qp(e){return{provide:Xp,useExisting:e}}var ix=ce("Taiga"),Is=new se("[TUI_VALUE_ACCESSOR]"),jn=X(()=>{let e=V(zt);return{type:"viewport",getClientRect(){return{top:0,left:0,right:e.innerWidth,bottom:e.innerHeight,width:e.innerWidth,height:e.innerHeight}}}});function Kp(e){return{provide:jn,useExisting:e}}var hi=class extends _i{};function Zi(e){return{provide:hi,multi:!0,useExisting:e}}var Mn=class{};function xs(e){return{provide:Mn,multi:!0,useExisting:e}}var Os=(()=>{class e{constructor(t,i,o){this.destroy$=t,this.drivers=i,this.vehicles=o}ngOnInit(){let t=this.vehicles.find(({type:i})=>i===this.type);He(...this.drivers.filter(({type:i})=>i===this.type)).pipe(oe(),re(this.destroy$)).subscribe(i=>{t==null||t.toggle(i)})}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(hi),a(Mn))},e.\u0275dir=w({type:e}),e})(),Qp=(()=>{class e{constructor(t){this.host=t}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 t;return((t=this.host.value)===null||t===void 0?void 0:t.toString())||""}process(t){}}return e.\u0275fac=function(t){return new(t||e)(a(Ai))},e.\u0275dir=w({type:e}),e})();function xc(e){return(n,t)=>(n==null?void 0:n.find(i=>i!==t&&i.type===e))||t}var kt=class{};function Ss(e,n){return{provide:kt,deps:n?[[new si,new tt,kt],n]:[[new si,new tt,kt]],useFactory:xc(e)}}function Jp(e){return{provide:kt,multi:!0,useExisting:e}}var fi=class{};function Ps(e,n){return{provide:fi,deps:[[new si,new tt,fi],n],useFactory:xc(e)}}var Es=xc;function Dn(e){return{provide:fi,multi:!0,useExisting:e}}var le="primary",Sr=Symbol("RouteTitle"),Ac=class{constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let t=this.params[n];return Array.isArray(t)?t[0]:t}return null}getAll(n){if(this.has(n)){let t=this.params[n];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}};function Ao(e){return new Ac(e)}function Kg(e,n,t){let i=t.path.split("/");if(i.length>e.length||t.pathMatch==="full"&&(n.hasChildren()||i.lengthi[r]===o)}else return e===n}function ch(e){return e.length>0?e[e.length-1]:null}function In(e){return Gr(e)?e:Au(e)?wi(Promise.resolve(e)):B(e)}var Jg={exact:uh,subset:dh},lh={exact:ev,subset:tv,ignored:()=>!0};function eh(e,n,t){return Jg[t.paths](e.root,n.root,t.matrixParams)&&lh[t.queryParams](e.queryParams,n.queryParams)&&!(t.fragment==="exact"&&e.fragment!==n.fragment)}function ev(e,n){return Xi(e,n)}function uh(e,n,t){if(!zn(e.segments,n.segments)||!Rs(e.segments,n.segments,t)||e.numberOfChildren!==n.numberOfChildren)return!1;for(let i in n.children)if(!e.children[i]||!uh(e.children[i],n.children[i],t))return!1;return!0}function tv(e,n){return Object.keys(n).length<=Object.keys(e).length&&Object.keys(n).every(t=>ah(e[t],n[t]))}function dh(e,n,t){return ph(e,n,n.segments,t)}function ph(e,n,t,i){if(e.segments.length>t.length){let o=e.segments.slice(0,t.length);return!(!zn(o,t)||n.hasChildren()||!Rs(o,t,i))}else if(e.segments.length===t.length){if(!zn(e.segments,t)||!Rs(e.segments,t,i))return!1;for(let o in n.children)if(!e.children[o]||!dh(e.children[o],n.children[o],i))return!1;return!0}else{let o=t.slice(0,e.segments.length),r=t.slice(e.segments.length);return!zn(e.segments,o)||!Rs(e.segments,o,i)||!e.children[le]?!1:ph(e.children[le],n,r,i)}}function Rs(e,n,t){return n.every((i,o)=>lh[t](e[o].parameters,i.parameters))}var wn=class{constructor(n=new Ue([],{}),t={},i=null){this.root=n,this.queryParams=t,this.fragment=i}get queryParamMap(){return this._queryParamMap??(this._queryParamMap=Ao(this.queryParams)),this._queryParamMap}toString(){return ov.serialize(this)}},Ue=class{constructor(n,t){this.segments=n,this.children=t,this.parent=null,Object.values(t).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Fs(this)}},Un=class{constructor(n,t){this.path=n,this.parameters=t}get parameterMap(){return this._parameterMap??(this._parameterMap=Ao(this.parameters)),this._parameterMap}toString(){return fh(this)}};function iv(e,n){return zn(e,n)&&e.every((t,i)=>Xi(t.parameters,n[i].parameters))}function zn(e,n){return e.length!==n.length?!1:e.every((t,i)=>t.path===n[i].path)}function nv(e,n){let t=[];return Object.entries(e.children).forEach(([i,o])=>{i===le&&(t=t.concat(n(o,i)))}),Object.entries(e.children).forEach(([i,o])=>{i!==le&&(t=t.concat(n(o,i)))}),t}var rl=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:()=>new Tr,providedIn:"root"});let e=n;return e})(),Tr=class{parse(n){let t=new Fc(n);return new wn(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(n){let t=`/${hr(n.root,!0)}`,i=av(n.queryParams),o=typeof n.fragment=="string"?`#${rv(n.fragment)}`:"";return`${t}${i}${o}`}},ov=new Tr;function Fs(e){return e.segments.map(n=>fh(n)).join("/")}function hr(e,n){if(!e.hasChildren())return Fs(e);if(n){let t=e.children[le]?hr(e.children[le],!1):"",i=[];return Object.entries(e.children).forEach(([o,r])=>{o!==le&&i.push(`${o}:${hr(r,!1)}`)}),i.length>0?`${t}(${i.join("//")})`:t}else{let t=nv(e,(i,o)=>o===le?[hr(e.children[le],!1)]:[`${o}:${hr(i,!1)}`]);return Object.keys(e.children).length===1&&e.children[le]!=null?`${Fs(e)}/${t[0]}`:`${Fs(e)}/(${t.join("//")})`}}function hh(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function As(e){return hh(e).replace(/%3B/gi,";")}function rv(e){return encodeURI(e)}function Rc(e){return hh(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Ls(e){return decodeURIComponent(e)}function th(e){return Ls(e.replace(/\+/g,"%20"))}function fh(e){return`${Rc(e.path)}${sv(e.parameters)}`}function sv(e){return Object.entries(e).map(([n,t])=>`;${Rc(n)}=${Rc(t)}`).join("")}function av(e){let n=Object.entries(e).map(([t,i])=>Array.isArray(i)?i.map(o=>`${As(t)}=${As(o)}`).join("&"):`${As(t)}=${As(i)}`).filter(t=>t);return n.length?`?${n.join("&")}`:""}var cv=/^[^\/()?;#]+/;function Oc(e){let n=e.match(cv);return n?n[0]:""}var lv=/^[^\/()?;=#]+/;function uv(e){let n=e.match(lv);return n?n[0]:""}var dv=/^[^=?&#]+/;function pv(e){let n=e.match(dv);return n?n[0]:""}var hv=/^[^&#]+/;function fv(e){let n=e.match(hv);return n?n[0]:""}var Fc=class{constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Ue([],{}):new Ue([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(n.length>0||Object.keys(t).length>0)&&(i[le]=new Ue(n,t)),i}parseSegment(){let n=Oc(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new Gt(4009,!1);return this.capture(n),new Un(Ls(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let t=uv(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){let o=Oc(this.remaining);o&&(i=o,this.capture(i))}n[Ls(t)]=Ls(i)}parseQueryParam(n){let t=pv(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){let s=fv(this.remaining);s&&(i=s,this.capture(i))}let o=th(t),r=th(i);if(n.hasOwnProperty(o)){let s=n[o];Array.isArray(s)||(s=[s],n[o]=s),s.push(r)}else n[o]=r}parseParens(n){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=Oc(this.remaining),o=this.remaining[i.length];if(o!=="/"&&o!==")"&&o!==";")throw new Gt(4010,!1);let r;i.indexOf(":")>-1?(r=i.slice(0,i.indexOf(":")),this.capture(r),this.capture(":")):n&&(r=le);let s=this.parseChildren();t[r]=Object.keys(s).length===1?s[le]:new Ue([],s),this.consumeOptional("//")}return t}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new Gt(4011,!1)}};function mh(e){return e.segments.length>0?new Ue([],{[le]:e}):e}function gh(e){let n={};for(let[i,o]of Object.entries(e.children)){let r=gh(o);if(i===le&&r.segments.length===0&&r.hasChildren())for(let[s,c]of Object.entries(r.children))n[s]=c;else(r.segments.length>0||r.hasChildren())&&(n[i]=r)}let t=new Ue(e.segments,n);return mv(t)}function mv(e){if(e.numberOfChildren===1&&e.children[le]){let n=e.children[le];return new Ue(e.segments.concat(n.segments),n.children)}return e}function Cr(e){return e instanceof wn}function gv(e,n,t=null,i=null){let o=vh(e);return _h(o,n,t,i)}function vh(e){let n;function t(r){let s={};for(let d of r.children){let p=t(d);s[d.outlet]=p}let c=new Ue(r.url,s);return r===e&&(n=c),c}let i=t(e.root),o=mh(i);return n??o}function _h(e,n,t,i){let o=e;for(;o.parent;)o=o.parent;if(n.length===0)return Sc(o,o,o,t,i);let r=vv(n);if(r.toRoot())return Sc(o,o,new Ue([],{}),t,i);let s=_v(r,o,e),c=s.processChildren?gr(s.segmentGroup,s.index,r.commands):Ch(s.segmentGroup,s.index,r.commands);return Sc(o,s.segmentGroup,c,t,i)}function Hs(e){return typeof e=="object"&&e!=null&&!e.outlets&&!e.segmentPath}function yr(e){return typeof e=="object"&&e!=null&&e.outlets}function Sc(e,n,t,i,o){let r={};i&&Object.entries(i).forEach(([d,p])=>{r[d]=Array.isArray(p)?p.map(_=>`${_}`):`${p}`});let s;e===n?s=t:s=Th(e,n,t);let c=mh(gh(s));return new wn(c,r,o)}function Th(e,n,t){let i={};return Object.entries(e.children).forEach(([o,r])=>{r===n?i[o]=t:i[o]=Th(r,n,t)}),new Ue(e.segments,i)}var Ns=class{constructor(n,t,i){if(this.isAbsolute=n,this.numberOfDoubleDots=t,this.commands=i,n&&i.length>0&&Hs(i[0]))throw new Gt(4003,!1);let o=i.find(yr);if(o&&o!==ch(i))throw new Gt(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function vv(e){if(typeof e[0]=="string"&&e.length===1&&e[0]==="/")return new Ns(!0,0,e);let n=0,t=!1,i=e.reduce((o,r,s)=>{if(typeof r=="object"&&r!=null){if(r.outlets){let c={};return Object.entries(r.outlets).forEach(([d,p])=>{c[d]=typeof p=="string"?p.split("/"):p}),[...o,{outlets:c}]}if(r.segmentPath)return[...o,r.segmentPath]}return typeof r!="string"?[...o,r]:s===0?(r.split("/").forEach((c,d)=>{d==0&&c==="."||(d==0&&c===""?t=!0:c===".."?n++:c!=""&&o.push(c))}),o):[...o,r]},[]);return new Ns(t,n,i)}var So=class{constructor(n,t,i){this.segmentGroup=n,this.processChildren=t,this.index=i}};function _v(e,n,t){if(e.isAbsolute)return new So(n,!0,0);if(!t)return new So(n,!1,NaN);if(t.parent===null)return new So(t,!0,0);let i=Hs(e.commands[0])?0:1,o=t.segments.length-1+i;return Tv(t,o,e.numberOfDoubleDots)}function Tv(e,n,t){let i=e,o=n,r=t;for(;r>o;){if(r-=o,i=i.parent,!i)throw new Gt(4005,!1);o=i.segments.length}return new So(i,!1,o-r)}function Cv(e){return yr(e[0])?e[0].outlets:{[le]:e}}function Ch(e,n,t){if(e??(e=new Ue([],{})),e.segments.length===0&&e.hasChildren())return gr(e,n,t);let i=yv(e,n,t),o=t.slice(i.commandIndex);if(i.match&&i.pathIndexr!==le)&&e.children[le]&&e.numberOfChildren===1&&e.children[le].segments.length===0){let r=gr(e.children[le],n,t);return new Ue(e.segments,r.children)}return Object.entries(i).forEach(([r,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(o[r]=Ch(e.children[r],n,s))}),Object.entries(e.children).forEach(([r,s])=>{i[r]===void 0&&(o[r]=s)}),new Ue(e.segments,o)}}function yv(e,n,t){let i=0,o=n,r={match:!1,pathIndex:0,commandIndex:0};for(;o=t.length)return r;let s=e.segments[o],c=t[i];if(yr(c))break;let d=`${c}`,p=i0&&d===void 0)break;if(d&&p&&typeof p=="object"&&p.outlets===void 0){if(!nh(d,p,s))return r;i+=2}else{if(!nh(d,{},s))return r;i++}o++}return{match:!0,pathIndex:o,commandIndex:i}}function Lc(e,n,t){let i=e.segments.slice(0,n),o=0;for(;o{typeof i=="string"&&(i=[i]),i!==null&&(n[t]=Lc(new Ue([],{}),0,i))}),n}function ih(e){let n={};return Object.entries(e).forEach(([t,i])=>n[t]=`${i}`),n}function nh(e,n,t){return e==t.path&&Xi(n,t.parameters)}var vr="imperative",Rt=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(Rt||{}),bi=class{constructor(n,t){this.id=n,this.url=t}},br=class extends bi{constructor(n,t,i="imperative",o=null){super(n,t),this.type=Rt.NavigationStart,this.navigationTrigger=i,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Bn=class extends bi{constructor(n,t,i){super(n,t),this.urlAfterRedirects=i,this.type=Rt.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},gi=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(gi||{}),Hc=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(Hc||{}),un=class extends bi{constructor(n,t,i,o){super(n,t),this.reason=i,this.code=o,this.type=Rt.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Vn=class extends bi{constructor(n,t,i,o){super(n,t),this.reason=i,this.code=o,this.type=Rt.NavigationSkipped}},Mr=class extends bi{constructor(n,t,i,o){super(n,t),this.error=i,this.target=o,this.type=Rt.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},js=class extends bi{constructor(n,t,i,o){super(n,t),this.urlAfterRedirects=i,this.state=o,this.type=Rt.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Nc=class extends bi{constructor(n,t,i,o){super(n,t),this.urlAfterRedirects=i,this.state=o,this.type=Rt.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},jc=class extends bi{constructor(n,t,i,o,r){super(n,t),this.urlAfterRedirects=i,this.state=o,this.shouldActivate=r,this.type=Rt.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Uc=class extends bi{constructor(n,t,i,o){super(n,t),this.urlAfterRedirects=i,this.state=o,this.type=Rt.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},zc=class extends bi{constructor(n,t,i,o){super(n,t),this.urlAfterRedirects=i,this.state=o,this.type=Rt.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Bc=class{constructor(n){this.route=n,this.type=Rt.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Vc=class{constructor(n){this.route=n,this.type=Rt.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},$c=class{constructor(n){this.snapshot=n,this.type=Rt.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Wc=class{constructor(n){this.snapshot=n,this.type=Rt.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Gc=class{constructor(n){this.snapshot=n,this.type=Rt.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Yc=class{constructor(n){this.snapshot=n,this.type=Rt.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Dr=class{},ko=class{constructor(n,t){this.url=n,this.navigationBehaviorOptions=t}};var Zc=class{constructor(n){this.injector=n,this.outlet=null,this.route=null,this.children=new Gs(this.injector),this.attachRef=null}},Gs=(()=>{let n=class n{constructor(i){this.parentInjector=i,this.contexts=new Map}onChildOutletCreated(i,o){let r=this.getOrCreateContext(i);r.outlet=o,this.contexts.set(i,r)}onChildOutletDestroyed(i){let o=this.getContext(i);o&&(o.outlet=null,o.attachRef=null)}onOutletDeactivated(){let i=this.contexts;return this.contexts=new Map,i}onOutletReAttached(i){this.contexts=i}getOrCreateContext(i){let o=this.getContext(i);return o||(o=new Zc(this.parentInjector),this.contexts.set(i,o)),o}getContext(i){return this.contexts.get(i)||null}};n.\u0275fac=function(o){return new(o||n)(ye(Xr))},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),Us=class{constructor(n){this._root=n}get root(){return this._root.value}parent(n){let t=this.pathFromRoot(n);return t.length>1?t[t.length-2]:null}children(n){let t=Xc(n,this._root);return t?t.children.map(i=>i.value):[]}firstChild(n){let t=Xc(n,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(n){let t=qc(n,this._root);return t.length<2?[]:t[t.length-2].children.map(o=>o.value).filter(o=>o!==n)}pathFromRoot(n){return qc(n,this._root).map(t=>t.value)}};function Xc(e,n){if(e===n.value)return n;for(let t of n.children){let i=Xc(e,t);if(i)return i}return null}function qc(e,n){if(e===n.value)return[n];for(let t of n.children){let i=qc(e,t);if(i.length)return i.unshift(n),i}return[]}var mi=class{constructor(n,t){this.value=n,this.children=t}toString(){return`TreeNode(${this.value})`}};function Oo(e){let n={};return e&&e.children.forEach(t=>n[t.value.outlet]=t),n}var zs=class extends Us{constructor(n,t){super(n),this.snapshot=t,sl(this,n)}toString(){return this.snapshot.toString()}};function yh(e){let n=Mv(e),t=new Ke([new Un("",{})]),i=new Ke({}),o=new Ke({}),r=new Ke({}),s=new Ke(""),c=new Ro(t,i,r,s,o,le,e,n.root);return c.snapshot=n.root,new zs(new mi(c,[]),n)}function Mv(e){let n={},t={},i={},o="",r=new Po([],n,i,o,t,le,e,null,{});return new Vs("",new mi(r,[]))}var Ro=class{constructor(n,t,i,o,r,s,c,d){var p;this.urlSubject=n,this.paramsSubject=t,this.queryParamsSubject=i,this.fragmentSubject=o,this.dataSubject=r,this.outlet=s,this.component=c,this._futureSnapshot=d,this.title=((p=this.dataSubject)==null?void 0:p.pipe(b(_=>_[Sr])))??B(void 0),this.url=n,this.params=t,this.queryParams=i,this.fragment=o,this.data=r}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(b(n=>Ao(n)))),this._paramMap}get queryParamMap(){return this._queryParamMap??(this._queryParamMap=this.queryParams.pipe(b(n=>Ao(n)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Bs(e,n,t="emptyOnly"){var r;let i,{routeConfig:o}=e;return n!==null&&(t==="always"||(o==null?void 0:o.path)===""||!n.component&&!((r=n.routeConfig)!=null&&r.loadComponent))?i={params:te(te({},n.params),e.params),data:te(te({},n.data),e.data),resolve:te(te(te(te({},e.data),n.data),o==null?void 0:o.data),e._resolvedData)}:i={params:te({},e.params),data:te({},e.data),resolve:te(te({},e.data),e._resolvedData??{})},o&&Mh(o)&&(i.resolve[Sr]=o.title),i}var Po=class{get title(){var n;return(n=this.data)==null?void 0:n[Sr]}constructor(n,t,i,o,r,s,c,d,p){this.url=n,this.params=t,this.queryParams=i,this.fragment=o,this.data=r,this.outlet=s,this.component=c,this.routeConfig=d,this._resolve=p}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=Ao(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap??(this._queryParamMap=Ao(this.queryParams)),this._queryParamMap}toString(){let n=this.url.map(i=>i.toString()).join("/"),t=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${t}')`}},Vs=class extends Us{constructor(n,t){super(t),this.url=n,sl(this,t)}toString(){return bh(this._root)}};function sl(e,n){n.value._routerState=e,n.children.forEach(t=>sl(e,t))}function bh(e){let n=e.children.length>0?` { ${e.children.map(bh).join(", ")} } `:"";return`${e.value}${n}`}function Pc(e){if(e.snapshot){let n=e.snapshot,t=e._futureSnapshot;e.snapshot=t,Xi(n.queryParams,t.queryParams)||e.queryParamsSubject.next(t.queryParams),n.fragment!==t.fragment&&e.fragmentSubject.next(t.fragment),Xi(n.params,t.params)||e.paramsSubject.next(t.params),Qg(n.url,t.url)||e.urlSubject.next(t.url),Xi(n.data,t.data)||e.dataSubject.next(t.data)}else e.snapshot=e._futureSnapshot,e.dataSubject.next(e._futureSnapshot.data)}function Kc(e,n){let t=Xi(e.params,n.params)&&iv(e.url,n.url),i=!e.parent!=!n.parent;return t&&!i&&(!e.parent||Kc(e.parent,n.parent))}function Mh(e){return typeof e.title=="string"||e.title===null}var Dv=(()=>{let n=class n{constructor(){this.activated=null,this._activatedRoute=null,this.name=le,this.activateEvents=new Pe,this.deactivateEvents=new Pe,this.attachEvents=new Pe,this.detachEvents=new Pe,this.parentContexts=V(Gs),this.location=V(Ci),this.changeDetector=V(ft),this.inputBinder=V(al,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(i){if(i.name){let{firstChange:o,previousValue:r}=i.name;if(o)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){var i;this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),(i=this.inputBinder)==null||i.unsubscribeFromRouteData(this)}isTrackedInParentContexts(i){var o;return((o=this.parentContexts.getContext(i))==null?void 0:o.outlet)===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let i=this.parentContexts.getContext(this.name);i!=null&&i.route&&(i.attachRef?this.attach(i.attachRef,i.route):this.activateWith(i.route,i.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Gt(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Gt(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Gt(4012,!1);this.location.detach();let i=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(i.instance),i}attach(i,o){var r;this.activated=i,this._activatedRoute=o,this.location.insert(i.hostView),(r=this.inputBinder)==null||r.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(i.instance)}deactivate(){if(this.activated){let i=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(i)}}activateWith(i,o){var _;if(this.isActivated)throw new Gt(4013,!1);this._activatedRoute=i;let r=this.location,c=i.snapshot.component,d=this.parentContexts.getOrCreateContext(this.name).children,p=new Qc(i,d,r.injector);this.activated=r.createComponent(c,{index:r.length,injector:p,environmentInjector:o}),this.changeDetector.markForCheck(),(_=this.inputBinder)==null||_.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275dir=w({type:n,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[qt]});let e=n;return e})(),Qc=class e{__ngOutletInjector(n){return new e(this.route,this.childContexts,n)}constructor(n,t,i){this.route=n,this.childContexts=t,this.parent=i}get(n,t){return n===Ro?this.route:n===Gs?this.childContexts:this.parent.get(n,t)}},al=new se("");function wv(e,n,t){let i=wr(e,n._root,t?t._root:void 0);return new zs(i,n)}function wr(e,n,t){if(t&&e.shouldReuseRoute(n.value,t.value.snapshot)){let i=t.value;i._futureSnapshot=n.value;let o=Iv(e,n,t);return new mi(i,o)}else{if(e.shouldAttach(n.value)){let r=e.retrieve(n.value);if(r!==null){let s=r.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(c=>wr(e,c)),s}}let i=xv(n.value),o=n.children.map(r=>wr(e,r));return new mi(i,o)}}function Iv(e,n,t){return n.children.map(i=>{for(let o of t.children)if(e.shouldReuseRoute(i.value,o.value.snapshot))return wr(e,i,o);return wr(e,i)})}function xv(e){return new Ro(new Ke(e.url),new Ke(e.params),new Ke(e.queryParams),new Ke(e.fragment),new Ke(e.data),e.outlet,e.component,e)}var Ir=class{constructor(n,t){this.redirectTo=n,this.navigationBehaviorOptions=t}},Dh="ngNavigationCancelingError";function $s(e,n){let{redirectTo:t,navigationBehaviorOptions:i}=Cr(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,o=wh(!1,gi.Redirect);return o.url=t,o.navigationBehaviorOptions=i,o}function wh(e,n){let t=new Error(`NavigationCancelingError: ${e||""}`);return t[Dh]=!0,t.cancellationCode=n,t}function Ov(e){return Ih(e)&&Cr(e.url)}function Ih(e){return!!e&&e[Dh]}var Sv=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275cmp=k({type:n,selectors:[["ng-component"]],standalone:!0,features:[Ou],decls:1,vars:0,template:function(o,r){o&1&&S(0,"router-outlet")},dependencies:[Dv],encapsulation:2});let e=n;return e})();function Pv(e,n){return e.providers&&!e._injector&&(e._injector=wu(e.providers,n,`Route: ${e.path}`)),e._injector??n}function cl(e){let n=e.children&&e.children.map(cl),t=n?oi(te({},e),{children:n}):te({},e);return!t.component&&!t.loadComponent&&(n||t.loadChildren)&&t.outlet&&t.outlet!==le&&(t.component=Sv),t}function Ri(e){return e.outlet||le}function Ev(e,n){let t=e.filter(i=>Ri(i)===n);return t.push(...e.filter(i=>Ri(i)!==n)),t}function Pr(e){var n;if(!e)return null;if((n=e.routeConfig)!=null&&n._injector)return e.routeConfig._injector;for(let t=e.parent;t;t=t.parent){let i=t.routeConfig;if(i!=null&&i._loadedInjector)return i._loadedInjector;if(i!=null&&i._injector)return i._injector}return null}var Av=(e,n,t,i)=>b(o=>(new Jc(n,o.targetRouterState,o.currentRouterState,t,i).activate(e),o)),Jc=class{constructor(n,t,i,o,r){this.routeReuseStrategy=n,this.futureState=t,this.currState=i,this.forwardEvent=o,this.inputBindingEnabled=r}activate(n){let t=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,i,n),Pc(this.futureState.root),this.activateChildRoutes(t,i,n)}deactivateChildRoutes(n,t,i){let o=Oo(t);n.children.forEach(r=>{let s=r.value.outlet;this.deactivateRoutes(r,o[s],i),delete o[s]}),Object.values(o).forEach(r=>{this.deactivateRouteAndItsChildren(r,i)})}deactivateRoutes(n,t,i){let o=n.value,r=t?t.value:null;if(o===r)if(o.component){let s=i.getContext(o.outlet);s&&this.deactivateChildRoutes(n,t,s.children)}else this.deactivateChildRoutes(n,t,i);else r&&this.deactivateRouteAndItsChildren(t,i)}deactivateRouteAndItsChildren(n,t){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,t):this.deactivateRouteAndOutlet(n,t)}detachAndStoreRouteSubtree(n,t){let i=t.getContext(n.value.outlet),o=i&&n.value.component?i.children:t,r=Oo(n);for(let s of Object.values(r))this.deactivateRouteAndItsChildren(s,o);if(i&&i.outlet){let s=i.outlet.detach(),c=i.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:c})}}deactivateRouteAndOutlet(n,t){let i=t.getContext(n.value.outlet),o=i&&n.value.component?i.children:t,r=Oo(n);for(let s of Object.values(r))this.deactivateRouteAndItsChildren(s,o);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(n,t,i){let o=Oo(t);n.children.forEach(r=>{this.activateRoutes(r,o[r.value.outlet],i),this.forwardEvent(new Yc(r.value.snapshot))}),n.children.length&&this.forwardEvent(new Wc(n.value.snapshot))}activateRoutes(n,t,i){let o=n.value,r=t?t.value:null;if(Pc(o),o===r)if(o.component){let s=i.getOrCreateContext(o.outlet);this.activateChildRoutes(n,t,s.children)}else this.activateChildRoutes(n,t,i);else if(o.component){let s=i.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let c=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),s.children.onOutletReAttached(c.contexts),s.attachRef=c.componentRef,s.route=c.route.value,s.outlet&&s.outlet.attach(c.componentRef,c.route.value),Pc(c.route.value),this.activateChildRoutes(n,null,s.children)}else{let c=Pr(o.snapshot);s.attachRef=null,s.route=o,s.injector=c??s.injector,s.outlet&&s.outlet.activateWith(o,s.injector),this.activateChildRoutes(n,null,s.children)}}else this.activateChildRoutes(n,null,i)}},Ws=class{constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},Eo=class{constructor(n,t){this.component=n,this.route=t}};function kv(e,n,t){let i=e._root,o=n?n._root:null;return fr(i,o,t,[i.value])}function Rv(e){let n=e.routeConfig?e.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:e,guards:n}}function Lo(e,n){let t=Symbol(),i=n.get(e,t);return i===t?typeof e=="function"&&!Cu(e)?e:n.get(e):i}function fr(e,n,t,i,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=Oo(n);return e.children.forEach(s=>{Fv(s,r[s.value.outlet],t,i.concat([s.value]),o),delete r[s.value.outlet]}),Object.entries(r).forEach(([s,c])=>_r(c,t.getContext(s),o)),o}function Fv(e,n,t,i,o={canDeactivateChecks:[],canActivateChecks:[]}){let r=e.value,s=n?n.value:null,c=t?t.getContext(e.value.outlet):null;if(s&&r.routeConfig===s.routeConfig){let d=Lv(s,r,r.routeConfig.runGuardsAndResolvers);d?o.canActivateChecks.push(new Ws(i)):(r.data=s.data,r._resolvedData=s._resolvedData),r.component?fr(e,n,c?c.children:null,i,o):fr(e,n,t,i,o),d&&c&&c.outlet&&c.outlet.isActivated&&o.canDeactivateChecks.push(new Eo(c.outlet.component,s))}else s&&_r(n,c,o),o.canActivateChecks.push(new Ws(i)),r.component?fr(e,null,c?c.children:null,i,o):fr(e,null,t,i,o);return o}function Lv(e,n,t){if(typeof t=="function")return t(e,n);switch(t){case"pathParamsChange":return!zn(e.url,n.url);case"pathParamsOrQueryParamsChange":return!zn(e.url,n.url)||!Xi(e.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Kc(e,n)||!Xi(e.queryParams,n.queryParams);case"paramsChange":default:return!Kc(e,n)}}function _r(e,n,t){let i=Oo(e),o=e.value;Object.entries(i).forEach(([r,s])=>{o.component?n?_r(s,n.children.getContext(r),t):_r(s,null,t):_r(s,n,t)}),o.component?n&&n.outlet&&n.outlet.isActivated?t.canDeactivateChecks.push(new Eo(n.outlet.component,o)):t.canDeactivateChecks.push(new Eo(null,o)):t.canDeactivateChecks.push(new Eo(null,o))}function Er(e){return typeof e=="function"}function Hv(e){return typeof e=="boolean"}function Nv(e){return e&&Er(e.canLoad)}function jv(e){return e&&Er(e.canActivate)}function Uv(e){return e&&Er(e.canActivateChild)}function zv(e){return e&&Er(e.canDeactivate)}function Bv(e){return e&&Er(e.canMatch)}function xh(e){return e instanceof du||(e==null?void 0:e.name)==="EmptyError"}var ks=Symbol("INITIAL_VALUE");function Fo(){return Fe(e=>wt(e.map(n=>n.pipe(Wt(1),it(ks)))).pipe(b(n=>{for(let t of n)if(t!==!0){if(t===ks)return ks;if(t===!1||Vv(t))return t}return!0}),et(n=>n!==ks),Wt(1)))}function Vv(e){return Cr(e)||e instanceof Ir}function $v(e,n){return Ti(t=>{let{targetSnapshot:i,currentSnapshot:o,guards:{canActivateChecks:r,canDeactivateChecks:s}}=t;return s.length===0&&r.length===0?B(oi(te({},t),{guardsResult:!0})):Wv(s,i,o,e).pipe(Ti(c=>c&&Hv(c)?Gv(i,r,e,n):B(c)),b(c=>oi(te({},t),{guardsResult:c})))})}function Wv(e,n,t,i){return wi(e).pipe(Ti(o=>Kv(o.component,o.route,t,n,i)),pn(o=>o!==!0,!0))}function Gv(e,n,t,i){return wi(n).pipe(tr(o=>Yr(Zv(o.route.parent,i),Yv(o.route,i),qv(e,o.path,t),Xv(e,o.route,t))),pn(o=>o!==!0,!0))}function Yv(e,n){return e!==null&&n&&n(new Gc(e)),B(!0)}function Zv(e,n){return e!==null&&n&&n(new $c(e)),B(!0)}function Xv(e,n,t){let i=n.routeConfig?n.routeConfig.canActivate:null;if(!i||i.length===0)return B(!0);let o=i.map(r=>Jo(()=>{let s=Pr(n)??t,c=Lo(r,s),d=jv(c)?c.canActivate(n,e):sn(s,()=>c(n,e));return In(d).pipe(pn())}));return B(o).pipe(Fo())}function qv(e,n,t){let i=n[n.length-1],r=n.slice(0,n.length-1).reverse().map(s=>Rv(s)).filter(s=>s!==null).map(s=>Jo(()=>{let c=s.guards.map(d=>{let p=Pr(s.node)??t,_=Lo(d,p),C=Uv(_)?_.canActivateChild(i,e):sn(p,()=>_(i,e));return In(C).pipe(pn())});return B(c).pipe(Fo())}));return B(r).pipe(Fo())}function Kv(e,n,t,i,o){let r=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!r||r.length===0)return B(!0);let s=r.map(c=>{let d=Pr(n)??o,p=Lo(c,d),_=zv(p)?p.canDeactivate(e,n,t,i):sn(d,()=>p(e,n,t,i));return In(_).pipe(pn())});return B(s).pipe(Fo())}function Qv(e,n,t,i){let o=n.canLoad;if(o===void 0||o.length===0)return B(!0);let r=o.map(s=>{let c=Lo(s,e),d=Nv(c)?c.canLoad(n,t):sn(e,()=>c(n,t));return In(d)});return B(r).pipe(Fo(),Oh(i))}function Oh(e){return uu(st(n=>{if(typeof n!="boolean")throw $s(e,n)}),b(n=>n===!0))}function Jv(e,n,t,i){let o=n.canMatch;if(!o||o.length===0)return B(!0);let r=o.map(s=>{let c=Lo(s,e),d=Bv(c)?c.canMatch(n,t):sn(e,()=>c(n,t));return In(d)});return B(r).pipe(Fo(),Oh(i))}var xr=class{constructor(n){this.segmentGroup=n||null}},Or=class extends Error{constructor(n){super(),this.urlTree=n}};function xo(e){return Qo(new xr(e))}function e_(e){return Qo(new Gt(4e3,!1))}function t_(e){return Qo(wh(!1,gi.GuardRejected))}var el=class{constructor(n,t){this.urlSerializer=n,this.urlTree=t}lineralizeSegments(n,t){let i=[],o=t.root;for(;;){if(i=i.concat(o.segments),o.numberOfChildren===0)return B(i);if(o.numberOfChildren>1||!o.children[le])return e_(`${n.redirectTo}`);o=o.children[le]}}applyRedirectCommands(n,t,i,o,r){if(typeof t!="string"){let c=t,{queryParams:d,fragment:p,routeConfig:_,url:C,outlet:O,params:L,data:Z,title:ue}=o,Ge=sn(r,()=>c({params:L,data:Z,queryParams:d,fragment:p,routeConfig:_,url:C,outlet:O,title:ue}));if(Ge instanceof wn)throw new Or(Ge);t=Ge}let s=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),n,i);if(t[0]==="/")throw new Or(s);return s}applyRedirectCreateUrlTree(n,t,i,o){let r=this.createSegmentGroup(n,t.root,i,o);return new wn(r,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(n,t){let i={};return Object.entries(n).forEach(([o,r])=>{if(typeof r=="string"&&r[0]===":"){let c=r.substring(1);i[o]=t[c]}else i[o]=r}),i}createSegmentGroup(n,t,i,o){let r=this.createSegments(n,t.segments,i,o),s={};return Object.entries(t.children).forEach(([c,d])=>{s[c]=this.createSegmentGroup(n,d,i,o)}),new Ue(r,s)}createSegments(n,t,i,o){return t.map(r=>r.path[0]===":"?this.findPosParam(n,r,o):this.findOrReturn(r,i))}findPosParam(n,t,i){let o=i[t.path.substring(1)];if(!o)throw new Gt(4001,!1);return o}findOrReturn(n,t){let i=0;for(let o of t){if(o.path===n.path)return t.splice(i),o;i++}return n}},tl={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function i_(e,n,t,i,o){let r=ll(e,n,t);return r.matched?(i=Pv(n,i),Jv(i,n,t,o).pipe(b(s=>s===!0?r:te({},tl)))):B(r)}function ll(e,n,t){if(n.path==="**")return n_(t);if(n.path==="")return n.pathMatch==="full"&&(e.hasChildren()||t.length>0)?te({},tl):{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};let o=(n.matcher||Kg)(t,e,n);if(!o)return te({},tl);let r={};Object.entries(o.posParams??{}).forEach(([c,d])=>{r[c]=d.path});let s=o.consumed.length>0?te(te({},r),o.consumed[o.consumed.length-1].parameters):r;return{matched:!0,consumedSegments:o.consumed,remainingSegments:t.slice(o.consumed.length),parameters:s,positionalParamSegments:o.posParams??{}}}function n_(e){return{matched:!0,parameters:e.length>0?ch(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}function oh(e,n,t,i){return t.length>0&&s_(e,t,i)?{segmentGroup:new Ue(n,r_(i,new Ue(t,e.children))),slicedSegments:[]}:t.length===0&&a_(e,t,i)?{segmentGroup:new Ue(e.segments,o_(e,t,i,e.children)),slicedSegments:t}:{segmentGroup:new Ue(e.segments,e.children),slicedSegments:t}}function o_(e,n,t,i){let o={};for(let r of t)if(Ys(e,n,r)&&!i[Ri(r)]){let s=new Ue([],{});o[Ri(r)]=s}return te(te({},i),o)}function r_(e,n){let t={};t[le]=n;for(let i of e)if(i.path===""&&Ri(i)!==le){let o=new Ue([],{});t[Ri(i)]=o}return t}function s_(e,n,t){return t.some(i=>Ys(e,n,i)&&Ri(i)!==le)}function a_(e,n,t){return t.some(i=>Ys(e,n,i))}function Ys(e,n,t){return(e.hasChildren()||n.length>0)&&t.pathMatch==="full"?!1:t.path===""}function c_(e,n,t,i){return Ri(e)!==i&&(i===le||!Ys(n,t,e))?!1:ll(n,e,t).matched}function l_(e,n,t){return n.length===0&&!e.children[t]}var il=class{};function u_(e,n,t,i,o,r,s="emptyOnly"){return new nl(e,n,t,i,o,s,r).recognize()}var d_=31,nl=class{constructor(n,t,i,o,r,s,c){this.injector=n,this.configLoader=t,this.rootComponentType=i,this.config=o,this.urlTree=r,this.paramsInheritanceStrategy=s,this.urlSerializer=c,this.applyRedirects=new el(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(n){return new Gt(4002,`'${n.segmentGroup}'`)}recognize(){let n=oh(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(b(({children:t,rootSnapshot:i})=>{let o=new mi(i,t),r=new Vs("",o),s=gv(i,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,r.url=this.urlSerializer.serialize(s),{state:r,tree:s}}))}match(n){let t=new Po([],Object.freeze({}),Object.freeze(te({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),le,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,le,t).pipe(b(i=>({children:i,rootSnapshot:t})),dn(i=>{if(i instanceof Or)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof xr?this.noMatchError(i):i}))}processSegmentGroup(n,t,i,o,r){return i.segments.length===0&&i.hasChildren()?this.processChildren(n,t,i,r):this.processSegment(n,t,i,i.segments,o,!0,r).pipe(b(s=>s instanceof mi?[s]:[]))}processChildren(n,t,i,o){let r=[];for(let s of Object.keys(i.children))s==="primary"?r.unshift(s):r.push(s);return wi(r).pipe(tr(s=>{let c=i.children[s],d=Ev(t,s);return this.processSegmentGroup(n,d,c,s,o)}),vu((s,c)=>(s.push(...c),s)),Ha(null),gu(),Ti(s=>{if(s===null)return xo(i);let c=Sh(s);return p_(c),B(c)}))}processSegment(n,t,i,o,r,s,c){return wi(t).pipe(tr(d=>this.processSegmentAgainstRoute(d._injector??n,t,d,i,o,r,s,c).pipe(dn(p=>{if(p instanceof xr)return B(null);throw p}))),pn(d=>!!d),dn(d=>{if(xh(d))return l_(i,o,r)?B(new il):xo(i);throw d}))}processSegmentAgainstRoute(n,t,i,o,r,s,c,d){return c_(i,o,r,s)?i.redirectTo===void 0?this.matchSegmentAgainstRoute(n,o,i,r,s,d):this.allowRedirects&&c?this.expandSegmentAgainstRouteUsingRedirect(n,o,t,i,r,s,d):xo(o):xo(o)}expandSegmentAgainstRouteUsingRedirect(n,t,i,o,r,s,c){let{matched:d,parameters:p,consumedSegments:_,positionalParamSegments:C,remainingSegments:O}=ll(t,o,r);if(!d)return xo(t);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>d_&&(this.allowRedirects=!1));let L=new Po(r,p,Object.freeze(te({},this.urlTree.queryParams)),this.urlTree.fragment,rh(o),Ri(o),o.component??o._loadedComponent??null,o,sh(o)),Z=Bs(L,c,this.paramsInheritanceStrategy);L.params=Object.freeze(Z.params),L.data=Object.freeze(Z.data);let ue=this.applyRedirects.applyRedirectCommands(_,o.redirectTo,C,L,n);return this.applyRedirects.lineralizeSegments(o,ue).pipe(Ti(Ge=>this.processSegment(n,i,t,Ge.concat(O),s,!1,c)))}matchSegmentAgainstRoute(n,t,i,o,r,s){let c=i_(t,i,o,n,this.urlSerializer);return i.path==="**"&&(t.children={}),c.pipe(Fe(d=>d.matched?(n=i._injector??n,this.getChildConfig(n,i,o).pipe(Fe(({routes:p})=>{let _=i._loadedInjector??n,{parameters:C,consumedSegments:O,remainingSegments:L}=d,Z=new Po(O,C,Object.freeze(te({},this.urlTree.queryParams)),this.urlTree.fragment,rh(i),Ri(i),i.component??i._loadedComponent??null,i,sh(i)),ue=Bs(Z,s,this.paramsInheritanceStrategy);Z.params=Object.freeze(ue.params),Z.data=Object.freeze(ue.data);let{segmentGroup:Ge,slicedSegments:Tt}=oh(t,O,L,p);if(Tt.length===0&&Ge.hasChildren())return this.processChildren(_,p,Ge,Z).pipe(b(ut=>new mi(Z,ut)));if(p.length===0&&Tt.length===0)return B(new mi(Z,[]));let Ji=Ri(i)===r;return this.processSegment(_,p,Ge,Tt,Ji?le:r,!0,Z).pipe(b(ut=>new mi(Z,ut instanceof mi?[ut]:[])))}))):xo(t)))}getChildConfig(n,t,i){return t.children?B({routes:t.children,injector:n}):t.loadChildren?t._loadedRoutes!==void 0?B({routes:t._loadedRoutes,injector:t._loadedInjector}):Qv(n,t,i,this.urlSerializer).pipe(Ti(o=>o?this.configLoader.loadChildren(n,t).pipe(st(r=>{t._loadedRoutes=r.routes,t._loadedInjector=r.injector})):t_(t))):B({routes:[],injector:n})}};function p_(e){e.sort((n,t)=>n.value.outlet===le?-1:t.value.outlet===le?1:n.value.outlet.localeCompare(t.value.outlet))}function h_(e){let n=e.value.routeConfig;return n&&n.path===""}function Sh(e){let n=[],t=new Set;for(let i of e){if(!h_(i)){n.push(i);continue}let o=n.find(r=>i.value.routeConfig===r.value.routeConfig);o!==void 0?(o.children.push(...i.children),t.add(o)):n.push(i)}for(let i of t){let o=Sh(i.children);n.push(new mi(i.value,o))}return n.filter(i=>!t.has(i))}function rh(e){return e.data||{}}function sh(e){return e.resolve||{}}function f_(e,n,t,i,o,r){return Ti(s=>u_(e,n,t,i,s.extractedUrl,o,r).pipe(b(({state:c,tree:d})=>oi(te({},s),{targetSnapshot:c,urlAfterRedirects:d}))))}function m_(e,n){return Ti(t=>{let{targetSnapshot:i,guards:{canActivateChecks:o}}=t;if(!o.length)return B(t);let r=new Set(o.map(d=>d.route)),s=new Set;for(let d of r)if(!s.has(d))for(let p of Ph(d))s.add(p);let c=0;return wi(s).pipe(tr(d=>r.has(d)?g_(d,i,e,n):(d.data=Bs(d,d.parent,e).resolve,B(void 0))),st(()=>c++),Na(1),Ti(d=>c===s.size?B(t):Dt))})}function Ph(e){let n=e.children.map(t=>Ph(t)).flat();return[e,...n]}function g_(e,n,t,i){let o=e.routeConfig,r=e._resolve;return(o==null?void 0:o.title)!==void 0&&!Mh(o)&&(r[Sr]=o.title),v_(r,e,n,i).pipe(b(s=>(e._resolvedData=s,e.data=Bs(e,e.parent,t).resolve,null)))}function v_(e,n,t,i){let o=kc(e);if(o.length===0)return B({});let r={};return wi(o).pipe(Ti(s=>__(e[s],n,t,i).pipe(pn(),st(c=>{if(c instanceof Ir)throw $s(new Tr,c);r[s]=c}))),Na(1),mu(r),dn(s=>xh(s)?Dt:Qo(s)))}function __(e,n,t,i){let o=Pr(n)??i,r=Lo(e,o),s=r.resolve?r.resolve(n,t):sn(o,()=>r(n,t));return In(s)}function Ec(e){return Fe(n=>{let t=e(n);return t?wi(t).pipe(b(()=>n)):B(n)})}var Eh=(()=>{let n=class n{buildTitle(i){let o,r=i.root;for(;r!==void 0;)o=this.getResolvedTitleForRoute(r)??o,r=r.children.find(s=>s.outlet===le);return o}getResolvedTitleForRoute(i){return i.data[Sr]}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:()=>V(T_),providedIn:"root"});let e=n;return e})(),T_=(()=>{let n=class n extends Eh{constructor(i){super(),this.title=i}updateTitle(i){let o=this.buildTitle(i);o!==void 0&&this.title.setTitle(o)}};n.\u0275fac=function(o){return new(o||n)(ye(Bu))},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),ul=new se("",{providedIn:"root",factory:()=>({})}),dl=new se(""),C_=(()=>{let n=class n{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=V(Va)}loadComponent(i){if(this.componentLoaders.get(i))return this.componentLoaders.get(i);if(i._loadedComponent)return B(i._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(i);let o=In(i.loadComponent()).pipe(b(Ah),st(s=>{this.onLoadEndListener&&this.onLoadEndListener(i),i._loadedComponent=s}),ro(()=>{this.componentLoaders.delete(i)})),r=new La(o,()=>new Ze).pipe(Fa());return this.componentLoaders.set(i,r),r}loadChildren(i,o){if(this.childrenLoaders.get(o))return this.childrenLoaders.get(o);if(o._loadedRoutes)return B({routes:o._loadedRoutes,injector:o._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(o);let s=y_(o,this.compiler,i,this.onLoadEndListener).pipe(ro(()=>{this.childrenLoaders.delete(o)})),c=new La(s,()=>new Ze).pipe(Fa());return this.childrenLoaders.set(o,c),c}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})();function y_(e,n,t,i){return In(e.loadChildren()).pipe(b(Ah),Ti(o=>o instanceof Du||Array.isArray(o)?B(o):wi(n.compileModuleAsync(o))),b(o=>{i&&i(e);let r,s,c=!1;return Array.isArray(o)?(s=o,c=!0):(r=o.create(t).injector,s=r.get(dl,[],{optional:!0,self:!0}).flat()),{routes:s.map(cl),injector:r}}))}function b_(e){return e&&typeof e=="object"&&"default"in e}function Ah(e){return b_(e)?e.default:e}var pl=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:()=>V(M_),providedIn:"root"});let e=n;return e})(),M_=(()=>{let n=class n{shouldProcessUrl(i){return!0}extract(i){return i}merge(i,o){return i}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),D_=new se("");var w_=new se(""),I_=(()=>{let n=class n{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Ze,this.transitionAbortSubject=new Ze,this.configLoader=V(C_),this.environmentInjector=V(Xr),this.urlSerializer=V(rl),this.rootContexts=V(Gs),this.location=V(es),this.inputBindingEnabled=V(al,{optional:!0})!==null,this.titleStrategy=V(Eh),this.options=V(ul,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=V(pl),this.createViewTransition=V(D_,{optional:!0}),this.navigationErrorHandler=V(w_,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>B(void 0),this.rootComponentType=null;let i=r=>this.events.next(new Bc(r)),o=r=>this.events.next(new Vc(r));this.configLoader.onLoadEndListener=o,this.configLoader.onLoadStartListener=i}complete(){var i;(i=this.transitions)==null||i.complete()}handleNavigationRequest(i){var r;let o=++this.navigationId;(r=this.transitions)==null||r.next(oi(te(te({},this.transitions.value),i),{id:o}))}setupNavigations(i,o,r){return this.transitions=new Ke({id:0,currentUrlTree:o,currentRawUrl:o,extractedUrl:this.urlHandlingStrategy.extract(o),urlAfterRedirects:this.urlHandlingStrategy.extract(o),rawUrl:o,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:vr,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(et(s=>s.id!==0),b(s=>oi(te({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Fe(s=>{let c=!1,d=!1;return B(s).pipe(Fe(p=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",gi.SupersededByNewNavigation),Dt;this.currentTransition=s,this.currentNavigation={id:p.id,initialUrl:p.rawUrl,extractedUrl:p.extractedUrl,trigger:p.source,extras:p.extras,previousNavigation:this.lastSuccessfulNavigation?oi(te({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let _=!i.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),C=p.extras.onSameUrlNavigation??i.onSameUrlNavigation;if(!_&&C!=="reload"){let O="";return this.events.next(new Vn(p.id,this.urlSerializer.serialize(p.rawUrl),O,Hc.IgnoredSameUrlNavigation)),p.resolve(!1),Dt}if(this.urlHandlingStrategy.shouldProcessUrl(p.rawUrl))return B(p).pipe(Fe(O=>{var Z,ue;let L=(Z=this.transitions)==null?void 0:Z.getValue();return this.events.next(new br(O.id,this.urlSerializer.serialize(O.extractedUrl),O.source,O.restoredState)),L!==((ue=this.transitions)==null?void 0:ue.getValue())?Dt:Promise.resolve(O)}),f_(this.environmentInjector,this.configLoader,this.rootComponentType,i.config,this.urlSerializer,this.paramsInheritanceStrategy),st(O=>{s.targetSnapshot=O.targetSnapshot,s.urlAfterRedirects=O.urlAfterRedirects,this.currentNavigation=oi(te({},this.currentNavigation),{finalUrl:O.urlAfterRedirects});let L=new js(O.id,this.urlSerializer.serialize(O.extractedUrl),this.urlSerializer.serialize(O.urlAfterRedirects),O.targetSnapshot);this.events.next(L)}));if(_&&this.urlHandlingStrategy.shouldProcessUrl(p.currentRawUrl)){let{id:O,extractedUrl:L,source:Z,restoredState:ue,extras:Ge}=p,Tt=new br(O,this.urlSerializer.serialize(L),Z,ue);this.events.next(Tt);let Ji=yh(this.rootComponentType).snapshot;return this.currentTransition=s=oi(te({},p),{targetSnapshot:Ji,urlAfterRedirects:L,extras:oi(te({},Ge),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=L,B(s)}else{let O="";return this.events.next(new Vn(p.id,this.urlSerializer.serialize(p.extractedUrl),O,Hc.IgnoredByUrlHandlingStrategy)),p.resolve(!1),Dt}}),st(p=>{let _=new Nc(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot);this.events.next(_)}),b(p=>(this.currentTransition=s=oi(te({},p),{guards:kv(p.targetSnapshot,p.currentSnapshot,this.rootContexts)}),s)),$v(this.environmentInjector,p=>this.events.next(p)),st(p=>{if(s.guardsResult=p.guardsResult,p.guardsResult&&typeof p.guardsResult!="boolean")throw $s(this.urlSerializer,p.guardsResult);let _=new jc(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot,!!p.guardsResult);this.events.next(_)}),et(p=>p.guardsResult?!0:(this.cancelNavigationTransition(p,"",gi.GuardRejected),!1)),Ec(p=>{if(p.guards.canActivateChecks.length)return B(p).pipe(st(_=>{let C=new Uc(_.id,this.urlSerializer.serialize(_.extractedUrl),this.urlSerializer.serialize(_.urlAfterRedirects),_.targetSnapshot);this.events.next(C)}),Fe(_=>{let C=!1;return B(_).pipe(m_(this.paramsInheritanceStrategy,this.environmentInjector),st({next:()=>C=!0,complete:()=>{C||this.cancelNavigationTransition(_,"",gi.NoDataFromResolver)}}))}),st(_=>{let C=new zc(_.id,this.urlSerializer.serialize(_.extractedUrl),this.urlSerializer.serialize(_.urlAfterRedirects),_.targetSnapshot);this.events.next(C)}))}),Ec(p=>{let _=C=>{var L;let O=[];(L=C.routeConfig)!=null&&L.loadComponent&&!C.routeConfig._loadedComponent&&O.push(this.configLoader.loadComponent(C.routeConfig).pipe(st(Z=>{C.component=Z}),b(()=>{})));for(let Z of C.children)O.push(..._(Z));return O};return wt(_(p.targetSnapshot.root)).pipe(Ha(null),Wt(1))}),Ec(()=>this.afterPreactivation()),Fe(()=>{var O;let{currentSnapshot:p,targetSnapshot:_}=s,C=(O=this.createViewTransition)==null?void 0:O.call(this,this.environmentInjector,p.root,_.root);return C?wi(C).pipe(b(()=>s)):B(s)}),b(p=>{let _=wv(i.routeReuseStrategy,p.targetSnapshot,p.currentRouterState);return this.currentTransition=s=oi(te({},p),{targetRouterState:_}),this.currentNavigation.targetRouterState=_,s}),st(()=>{this.events.next(new Dr)}),Av(this.rootContexts,i.routeReuseStrategy,p=>this.events.next(p),this.inputBindingEnabled),Wt(1),st({next:p=>{var _;c=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Bn(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects))),(_=this.titleStrategy)==null||_.updateTitle(p.targetRouterState.snapshot),p.resolve(!0)},complete:()=>{c=!0}}),re(this.transitionAbortSubject.pipe(st(p=>{throw p}))),ro(()=>{var p;!c&&!d&&this.cancelNavigationTransition(s,"",gi.SupersededByNewNavigation),((p=this.currentTransition)==null?void 0:p.id)===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),dn(p=>{if(d=!0,Ih(p))this.events.next(new un(s.id,this.urlSerializer.serialize(s.extractedUrl),p.message,p.cancellationCode)),Ov(p)?this.events.next(new ko(p.url,p.navigationBehaviorOptions)):s.resolve(!1);else{let _=new Mr(s.id,this.urlSerializer.serialize(s.extractedUrl),p,s.targetSnapshot??void 0);try{let C=sn(this.environmentInjector,()=>{var O;return(O=this.navigationErrorHandler)==null?void 0:O.call(this,_)});if(C instanceof Ir){let{message:O,cancellationCode:L}=$s(this.urlSerializer,C);this.events.next(new un(s.id,this.urlSerializer.serialize(s.extractedUrl),O,L)),this.events.next(new ko(C.redirectTo,C.navigationBehaviorOptions))}else{this.events.next(_);let O=i.errorHandler(p);s.resolve(!!O)}}catch(C){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(C)}}return Dt}))}))}cancelNavigationTransition(i,o,r){let s=new un(i.id,this.urlSerializer.serialize(i.extractedUrl),o,r);this.events.next(s),i.resolve(!1)}isUpdatingInternalState(){var i,o;return((i=this.currentTransition)==null?void 0:i.extractedUrl.toString())!==((o=this.currentTransition)==null?void 0:o.currentUrlTree.toString())}isUpdatedBrowserUrl(){var o,r;return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==((o=this.currentTransition)==null?void 0:o.extractedUrl.toString())&&!((r=this.currentTransition)!=null&&r.extras.skipLocationChange)}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})();function x_(e){return e!==vr}var O_=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:()=>V(S_),providedIn:"root"});let e=n;return e})(),ol=class{shouldDetach(n){return!1}store(n,t){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,t){return n.routeConfig===t.routeConfig}},S_=(()=>{let n=class n extends ol{};n.\u0275fac=(()=>{let i;return function(r){return(i||(i=ae(n)))(r||n)}})(),n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),kh=(()=>{let n=class n{};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:()=>V(P_),providedIn:"root"});let e=n;return e})(),P_=(()=>{let n=class n extends kh{constructor(){super(...arguments),this.location=V(es),this.urlSerializer=V(rl),this.options=V(ul,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=V(pl),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new wn,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=yh(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){var i;return this.canceledNavigationResolution!=="computed"?this.currentPageId:((i=this.restoredState())==null?void 0:i.\u0275routerPageId)??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(i){return this.location.subscribe(o=>{o.type==="popstate"&&i(o.url,o.state)})}handleRouterEvent(i,o){if(i instanceof br)this.stateMemento=this.createStateMemento();else if(i instanceof Vn)this.rawUrlTree=o.initialUrl;else if(i instanceof js){if(this.urlUpdateStrategy==="eager"&&!o.extras.skipLocationChange){let r=this.urlHandlingStrategy.merge(o.finalUrl,o.initialUrl);this.setBrowserUrl(r,o)}}else i instanceof Dr?(this.currentUrlTree=o.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(o.finalUrl,o.initialUrl),this.routerState=o.targetRouterState,this.urlUpdateStrategy==="deferred"&&(o.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,o))):i instanceof un&&(i.code===gi.GuardRejected||i.code===gi.NoDataFromResolver)?this.restoreHistory(o):i instanceof Mr?this.restoreHistory(o,!0):i instanceof Bn&&(this.lastSuccessfulId=i.id,this.currentPageId=this.browserPageId)}setBrowserUrl(i,o){let r=this.urlSerializer.serialize(i);if(this.location.isCurrentPathEqualTo(r)||o.extras.replaceUrl){let s=this.browserPageId,c=te(te({},o.extras.state),this.generateNgRouterState(o.id,s));this.location.replaceState(r,"",c)}else{let s=te(te({},o.extras.state),this.generateNgRouterState(o.id,this.browserPageId+1));this.location.go(r,"",s)}}restoreHistory(i,o=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,s=this.currentPageId-r;s!==0?this.location.historyGo(s):this.currentUrlTree===i.finalUrl&&s===0&&(this.resetState(i),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(o&&this.resetState(i),this.resetUrlToCurrentUrlTree())}resetState(i){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(i,o){return this.canceledNavigationResolution==="computed"?{navigationId:i,\u0275routerPageId:o}:{navigationId:i}}};n.\u0275fac=(()=>{let i;return function(r){return(i||(i=ae(n)))(r||n)}})(),n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})(),mr=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(mr||{});function E_(e,n){e.events.pipe(et(t=>t instanceof Bn||t instanceof un||t instanceof Mr||t instanceof Vn),b(t=>t instanceof Bn||t instanceof Vn?mr.COMPLETE:(t instanceof un?t.code===gi.Redirect||t.code===gi.SupersededByNewNavigation:!1)?mr.REDIRECTING:mr.FAILED),et(t=>t!==mr.REDIRECTING),Wt(1)).subscribe(()=>{n()})}function A_(e){throw e}var k_={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},R_={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Rh=(()=>{let n=class n{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 i;this.disposed=!1,this.console=V(Eu),this.stateManager=V(kh),this.options=V(ul,{optional:!0})||{},this.pendingTasks=V(bu),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=V(I_),this.urlSerializer=V(rl),this.location=V(es),this.urlHandlingStrategy=V(pl),this._events=new Ze,this.errorHandler=this.options.errorHandler||A_,this.navigated=!1,this.routeReuseStrategy=V(O_),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=((i=V(dl,{optional:!0}))==null?void 0:i.flat())??[],this.componentInputBindingEnabled=!!V(al,{optional:!0}),this.eventsSubscription=new lu,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:o=>{this.console.warn(o)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let i=this.navigationTransitions.events.subscribe(o=>{try{let r=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(r!==null&&s!==null){if(this.stateManager.handleRouterEvent(o,s),o instanceof un&&o.code!==gi.Redirect&&o.code!==gi.SupersededByNewNavigation)this.navigated=!0;else if(o instanceof Bn)this.navigated=!0;else if(o instanceof ko){let c=o.navigationBehaviorOptions,d=this.urlHandlingStrategy.merge(o.url,r.currentRawUrl),p=te({info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||x_(r.source)},c);this.scheduleNavigation(d,vr,null,p,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}L_(o)&&this._events.next(o)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(i)}resetRootComponentType(i){this.routerState.root.component=i,this.navigationTransitions.rootComponentType=i}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),vr,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??(this.nonRouterCurrentEntryChangeSubscription=this.stateManager.registerNonRouterCurrentEntryChangeListener((i,o)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(i,"popstate",o)},0)}))}navigateToSyncWithBrowser(i,o,r){let s={replaceUrl:!0},c=r!=null&&r.navigationId?r:null;if(r){let p=te({},r);delete p.navigationId,delete p.\u0275routerPageId,Object.keys(p).length!==0&&(s.state=p)}let d=this.parseUrl(i);this.scheduleNavigation(d,o,c,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(i){this.config=i.map(cl),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(i,o={}){let{relativeTo:r,queryParams:s,fragment:c,queryParamsHandling:d,preserveFragment:p}=o,_=p?this.currentUrlTree.fragment:c,C=null;switch(d){case"merge":C=te(te({},this.currentUrlTree.queryParams),s);break;case"preserve":C=this.currentUrlTree.queryParams;break;default:C=s||null}C!==null&&(C=this.removeEmptyProps(C));let O;try{let L=r?r.snapshot:this.routerState.snapshot.root;O=vh(L)}catch{(typeof i[0]!="string"||i[0][0]!=="/")&&(i=[]),O=this.currentUrlTree.root}return _h(O,i,C,_??null)}navigateByUrl(i,o={skipLocationChange:!1}){let r=Cr(i)?i:this.parseUrl(i),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,vr,null,o)}navigate(i,o={skipLocationChange:!1}){return F_(i),this.navigateByUrl(this.createUrlTree(i,o),o)}serializeUrl(i){return this.urlSerializer.serialize(i)}parseUrl(i){try{return this.urlSerializer.parse(i)}catch{return this.urlSerializer.parse("/")}}isActive(i,o){let r;if(o===!0?r=te({},k_):o===!1?r=te({},R_):r=o,Cr(i))return eh(this.currentUrlTree,i,r);let s=this.parseUrl(i);return eh(this.currentUrlTree,s,r)}removeEmptyProps(i){return Object.entries(i).reduce((o,[r,s])=>(s!=null&&(o[r]=s),o),{})}scheduleNavigation(i,o,r,s,c){if(this.disposed)return Promise.resolve(!1);let d,p,_;c?(d=c.resolve,p=c.reject,_=c.promise):_=new Promise((O,L)=>{d=O,p=L});let C=this.pendingTasks.add();return E_(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(C))}),this.navigationTransitions.handleNavigationRequest({source:o,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:i,extras:s,resolve:d,reject:p,promise:_,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),_.catch(O=>Promise.reject(O))}};n.\u0275fac=function(o){return new(o||n)},n.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})();function F_(e){for(let n=0;nt.\u0275providers)])}function N_(e){return e.routerState.root}function j_(){let e=V(mn);return n=>{var r,s;let t=e.get(Ru);if(n!==t.components[0])return;let i=e.get(Rh),o=e.get(U_);e.get(z_)===1&&i.initialNavigation(),(r=e.get(B_,null,Ua.Optional))==null||r.setUpPreloading(),(s=e.get(H_,null,Ua.Optional))==null||s.init(),i.resetRootComponentType(t.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var U_=new se("",{factory:()=>new Ze}),z_=new se("",{providedIn:"root",factory:()=>1});var B_=new se("");var uO=(()=>{class e extends _i{constructor(t,i,o){super(r=>this.stream$.subscribe(r)),this.media=t,this.ngZone=i,this.size$=o,this.sorted=Object.values(this.media).sort((r,s)=>r-s),this.invert=Object.keys(this.media).reduce((r,s)=>Object.assign(Object.assign({},r),{[this.media[s]]:s}),{}),this.stream$=this.size$.pipe(b(({width:r})=>this.sorted.find(s=>s>r)),b(r=>this.invert[r||this.sorted[this.sorted.length-1]]),oe(),Jt(this.ngZone),Zr({bufferSize:1,refCount:!0}))}}return e.\u0275fac=function(t){return new(t||e)(ye(wc),ye(Xe),ye(Od))},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Fh=(()=>{class e{constructor(t){this.locale=t}format(t){return B(new Date(t).toLocaleTimeString(this.locale,{hour:"numeric",minute:"2-digit"}))}}return e.\u0275fac=function(t){return new(t||e)(ye(Fu))},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Lh=(()=>{class e extends Ke{constructor(){super([])}add(t){this.next(this.value.concat(t))}remove(t){this.value.includes(t)&&this.next(this.value.filter(i=>i!==t))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Ho=(()=>{class e extends _i{constructor(t,i,o,r){super(s=>i.pipe(b(()=>t.nativeElement.getBoundingClientRect()),b(c=>r.getPosition(c)),$i(o),ro(()=>r.getPosition(ai))).subscribe(s))}}return e.\u0275fac=function(t){return new(t||e)(ye(N),ye(Cn),ye(Xe),ye(kt))},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})();var Hh=(()=>{class e{constructor(t,i,o){this.tuiSanitizer=t,this.sanitizer=i,this.originals={},this.items$=new Ke(new Map),this.define(o)}define(t){let{value:i}=this.items$;Object.keys(t).forEach(o=>{this.defineIcon(o,t[o],i)}),this.items$.next(i)}getOriginal(t){return this.originals[t]||null}defineIcon(t,i,o){if(o.has(t))return;let r=this.parseSrc(t,i);r&&(o.set(t,r),this.originals=Object.assign(Object.assign({},this.originals),{[t]:i}))}parseSrc(t,i){return this.sanitize(Ap(i,t))}sanitize(t){return this.sanitizer.bypassSecurityTrustHtml((this.tuiSanitizer?this.tuiSanitizer.sanitize(xi.HTML,t):this.sanitizer.sanitize(xi.HTML,t))||"")}}return e.\u0275fac=function(t){return new(t||e)(ye(Io,8),ye(ts),ye(Bp))},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Zs=(()=>{class e{constructor(t,i){this.win=t,this.isWebkit=i}correct([t,i]){return[this.correctY(t),this.correctX(i)]}correctX(t){var i,o;return this.isWebkit?t+((o=(i=this.win.visualViewport)===null||i===void 0?void 0:i.offsetLeft)!==null&&o!==void 0?o:0):t}correctY(t){var i,o;return this.isWebkit?t+((o=(i=this.win.visualViewport)===null||i===void 0?void 0:i.offsetTop)!==null&&o!==void 0?o:0):t}}return e.\u0275fac=function(t){return new(t||e)(ye(zt),ye(wd))},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function V_(e,n){if(e&1&&S(0,"div",3),e&2){let t=u().tuiLet;l("innerHTML",t,gn)}}function $_(e,n){if(e&1){let t=F();qr(),g(0,"svg",4),y("error",function(){I(t);let o=u(2);return x(o.onError())}),S(1,"use"),v()}if(e&2){let t=u(2);h(),fe("href",t.use,null,"xlink")}}function W_(e,n){if(e&1&&(Ie(0),T(1,V_,1,1,"div",2)(2,$_,2,1,"ng-template",null,0,de),xe()),e&2){let t=j(3),i=u();h(),l("ngIf",i.isInnerHTML)("ngIfElse",t)}}var G_={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"},Y_={iconsPlace:ws,path:Ms(ws),srcProcessor:io,contentProcessor:ds,deprecated:e=>{let n=e.replace("Large","").replace("Outline",""),t=G_[n];return t?`${n}/(Large|Outline) is deprecated, use ${t}/(Large|Outline) instead`:""}},Z_=X(()=>({iconsPlace:V(Dc),path:V(Vp),deprecated:Y_.deprecated,srcProcessor:V(Yp),contentProcessor:V(Gp)})),X_=new se("[TUI_SVG_SRC_INTERCEPTORS]");var q_="Attempted to use undefined named icon",K_="External icon is missing on the given URL",Q_="Failed to load external SVG",Ft=(()=>{class e{constructor(t,i,o,r,s,c,d,p,_,C){this.doc=t,this.win=i,this.options=o,this.srcInterceptors=r,this.tuiSanitizer=s,this.svgService=c,this.staticRequestService=d,this.sanitizer=p,this.el=_,this.baseHref=C,this.src$=new no(1),this.icon="",this.innerHTML$=this.src$.pipe(Fe(()=>ci(this.icon)?this.isExternal?this.getExternalIcon(this.icon):B(this.getSafeHtml(this.icon)):B(this.icon)),it(""))}set src(t){var i;let o=this.options.deprecated(String(t));this.icon=((i=this.srcInterceptors)!==null&&i!==void 0?i:[]).reduce((r,s)=>s(r,this.options),this.options.srcProcessor(t||"")),this.src$.next()}get src(){return this.icon}get use(){return ci(this.icon)?this.icon.includes(".svg#")?this.icon:this.resolveName(this.icon,this.options.path):""}get isInnerHTML(){return!ci(this.icon)||this.isSrc||this.isExternal||this.isName&&this.isShadowDOM}get isShadowDOM(){return Ju(this.el.nativeElement)!==this.doc}get isUse(){return this.use.replace(pr,"").includes(".svg#")}get isExternal(){return this.isUrl||this.isCrossDomain}get isUrl(){return ci(this.icon)&&this.icon.replace(pr,"").endsWith(".svg")}get isSrc(){return ci(this.icon)&&Lp(this.icon)}get isName(){return!this.isUrl&&!this.isUse&&!this.isSrc}get isCrossDomain(){let{use:t,isUse:i,win:o}=this;return i&&t.startsWith("http")&&!!o.origin&&!t.startsWith(o.origin)}onError(t=K_){let{icon:i}=this,o=new CustomEvent(Ep,{bubbles:!0,detail:{message:t,icon:i}});this.el.nativeElement.dispatchEvent(o)}resolveName(t,i){return i(t,this.baseHref)}getSafeHtml(t){return this.isSrc?this.sanitize(t):this.process(t)}process(t){let i=this.svgService.getOriginal(t);return this.isName&&!i&&t&&this.onError(q_),!this.isShadowDOM||!this.isName?"":this.sanitize(i||"")}sanitize(t){return t=this.options.contentProcessor(t),this.tuiSanitizer&&ci(t)?this.sanitizer.bypassSecurityTrustHtml(this.tuiSanitizer.sanitize(xi.HTML,t)||""):t}getExternalIcon(t){let i=t.includes(".svg")?t:this.use;return this.staticRequestService.request(i).pipe(dn(()=>(this.onError(Q_),B(""))),b(o=>this.sanitize(o.replace("{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Ot]]}),e})();var ne="{{duration}}ms ease-in-out",Oe={params:{duration:300}},Bt=300,Nh=ct("tuiHeightCollapse",[ge(":enter",[P({height:0}),ie(ne,P({height:"*"}))],Oe),ge(":leave",[P({height:"*"}),ie(ne,P({height:0}))],Oe)]),AO=ct("tuiHeightCollapseList",[ge("* => *",[Et(":enter",[P({height:0}),At(Bt,[ie(ne,P({height:"*"}))])],{optional:!0}),Et(":leave",[P({height:"*"}),At(Bt,[ie(ne,P({height:0}))])],{optional:!0})],Oe)]),kO=ct("tuiWidthCollapse",[ge(":enter",[P({width:0}),ie(ne,P({width:"*"}))],Oe),ge(":leave",[P({width:"*"}),ie(ne,P({width:0}))],Oe)]),RO=ct("tuiWidthCollapseList",[ge("* => *",[Et(":enter",[P({width:0}),At(Bt,[ie(ne,P({width:"*"}))])],{optional:!0}),Et(":leave",[P({width:"*"}),At(Bt,[ie(ne,P({width:0}))])],{optional:!0})],Oe)]),No=ct("tuiFadeIn",[ge(":enter",[P({opacity:0}),ie(ne,P({opacity:1}))],Oe),ge(":leave",[P({opacity:1}),ie(ne,P({opacity:0}))],Oe)]),FO=ct("tuiFadeInList",[ge("* => *",[Et(":enter",[P({opacity:0}),At(Bt,[ie(ne,P({opacity:1}))])],{optional:!0}),Et(":leave",[P({opacity:1}),At(Bt,[ie(ne,P({opacity:0}))])],{optional:!0})],Oe)]),LO=ct("tuiFadeInTop",[ge(":enter",[P({transform:"translateY(-10px)",opacity:0}),ie(ne,P({transform:"translateY(0)",opacity:1}))],Oe),ge(":leave",[P({transform:"translateY(0)",opacity:1}),ie(ne,P({transform:"translateY(-10px)",opacity:0}))],Oe)]),HO=ct("tuiFadeInBottom",[ge(":enter",[P({transform:"translateY(10px)",opacity:0}),ie(ne,P({transform:"translateY(0)",opacity:1}))],Oe),ge(":leave",[P({transform:"translateY(0)",opacity:1}),ie(ne,P({transform:"translateY(10px)",opacity:0}))],Oe)]),jh=ct("tuiDropdownAnimation",[ge(":enter",[P({transform:"translateY(-10px)",opacity:0}),ie(ne,P({transform:"translateY(0)",opacity:1}))],Oe),ge(":leave",[P({transform:"translateY(0)",opacity:1}),ie(ne,P({transform:"translateY(-10px)",opacity:0}))],Oe)]),NO=ct("tuiScaleIn",[ge(":enter",[P({transform:"scale(0)"}),ie(ne,P({transform:"scale(1)"}))],Oe),ge(":leave",[P({transform:"scale(1)"}),ie(ne,P({transform:"scale(0)"}))],Oe)]),jO=ct("tuiPop",[ge(":enter",[P({transform:"scale(0)"}),ie(ne,P({transform:"scale(1.1)"})),ie(ne,P({transform:"scale(1)"}))],Oe),ge(":leave",[P({transform:"scale(1)"}),ie(ne,P({transform:"scale(1.1)"})),ie(ne,P({transform:"scale(0)"}))],Oe)]),UO=ct("tuiScaleInList",[ge("* => *",[Et(":enter",[P({transform:"scale(0)"}),At(Bt,[ie(ne,P({transform:"scale(1)"}))])],{optional:!0}),Et(":leave",[P({transform:"scale(1)"}),At(Bt,[ie(ne,P({transform:"scale(0)"}))])],{optional:!0})],Oe)]),zO=ct("tuiSlideIn",[ge("* => left",[P({transform:"translateX(-100%)"}),ie(ne,P({transform:"translateX(0)"}))],Oe),ge("left => *",[P({transform:"translateX(0)"}),ie(ne,P({transform:"translateX(-100%)"}))],Oe),ge("* => right",[P({transform:"translateX(100%)"}),ie(ne,P({transform:"translateX(0)"}))],Oe),ge("right => *",[P({transform:"translateX(0)"}),ie(ne,P({transform:"translateX(100%)"}))],Oe)]),BO=ct("tuiSlideInLeft",[ge(":enter",[P({transform:"translateX(-100%)"}),ie(ne,P({transform:"translateX(0)"}))],Oe),ge(":leave",[P({transform:"translateX(0)"}),ie(ne,P({transform:"translateX(-100%)"}))],Oe)]),VO=ct("tuiSlideInLeftList",[ge("* => *",[Et(":enter",[P({transform:"translateX(-100%)"}),At(Bt,[ie(ne,P({transform:"translateX(0)"}))])],{optional:!0}),Et(":leave",[P({transform:"translateX(0)"}),At(Bt,[ie(ne,P({transform:"translateX(-100%)"}))])],{optional:!0})],Oe)]),Uh=ct("tuiSlideInRight",[ge(":enter",[P({transform:"translateX(100%)"}),ie(ne,P({transform:"translateX(0)"}))],Oe),ge(":leave",[P({transform:"translateX(0)"}),ie(ne,P({transform:"translateX(100%)"}))],Oe)]),$O=ct("tuiSlideInRightList",[ge("* => *",[Et(":enter",[P({transform:"translateX(100%)"}),At(Bt,[ie(ne,P({transform:"translateX(0)"}))])],{optional:!0}),Et(":leave",[P({transform:"translateX(0)"}),At(Bt,[ie(ne,P({transform:"translateX(100%)"}))])],{optional:!0})],Oe)]),zh=ct("tuiSlideInTop",[ge(":enter",[P({transform:"translate3d(0,{{start}},0)"}),ie(ne,P({transform:"translate3d(0,{{end}},0)"}))],{params:{end:0,start:"100%",duration:300}}),ge(":leave",[P({transform:"translate3d(0,{{end}},0)",pointerEvents:"none"}),ie(ne,P({transform:"translate3d(0,{{start}},0)"}))],{params:{end:0,start:"100%",duration:300}})]),WO=ct("tuiSlideInTopList",[ge("* => *",[Et(":enter",[P({transform:"translateY(100%)"}),At(Bt,[ie(ne,P({transform:"translateY(0)"}))])],{optional:!0}),Et(":leave",[P({transform:"translateY(0)"}),At(Bt,[ie(ne,P({transform:"translateY(100%)"}))])],{optional:!0})],Oe)]),GO=ct("tuiSlideInBottom",[ge(":enter",[P({transform:"translateY(-100%)"}),ie(ne,P({transform:"translateY(0)"}))],Oe),ge(":leave",[P({transform:"translateY(0)"}),ie(ne,P({transform:"translateY(-100%)"}))],Oe)]),YO=ct("tuiSlideInBottomList",[ge("* => *",[Et(":enter",[P({transform:"translateY(-100%)"}),At(Bt,[ie(ne,P({transform:"translateY(0)"}))])],{optional:!0}),Et(":leave",[P({transform:"translateY(0)"}),At(Bt,[ie(ne,P({transform:"translateY(-100%)"}))])],{optional:!0})],Oe)]);var Mi=(()=>{class e extends Yt{constructor(){super(...arguments),this.mode=null}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiMode",""]],inputs:{mode:[0,"tuiMode","mode"]},features:[W]}),e})();var i1={provide:Ic,deps:[[new si,Ic],N],useFactory:(e,{nativeElement:n})=>(n["$.class._mobile"]=e,e)},xn={provide:Yi,deps:[[new tt,Mi],N],useFactory:(e,{nativeElement:n})=>{let t=e?e.change$.pipe(it(null),b(()=>e.mode)):B(null);return n["$.data-mode.attr"]=t,t}};var J_=["*"];function e0(e,n){e&1&&S(0,"tui-scroll-controls",2)}var jo=(()=>{class e{constructor(t,i,o,r){this.cssRef=t,this.el=i,this.userAgent=o,this.isIos=r,this.isLegacy=!this.cssRef.supports("position","sticky")||Qd(this.userAgent)&&!this.cssRef.supports("scrollbar-width","none"),this.hidden=!1,this.browserScrollRef=new N(this.el.nativeElement)}get delegated(){return this.browserScrollRef.nativeElement!==this.el.nativeElement}get showScrollbars(){return!this.hidden&&!this.isIos&&(!this.isLegacy||this.delegated)}get showNative(){return this.isLegacy&&!this.hidden&&!this.delegated}onScrollable(t){this.browserScrollRef.nativeElement=t}scrollIntoView(t){var i;if(this.delegated)return;let{nativeElement:o}=this.browserScrollRef,{offsetTop:r,offsetLeft:s}=td(o,t),{clientHeight:c,clientWidth:d}=o,{offsetHeight:p,offsetWidth:_}=t,C=r+p/2-c/2,O=s+_/2-d/2;(i=o.scrollTo)===null||i===void 0||i.call(o,O,C)}}return e.\u0275fac=function(t){return new(t||e)(a(vd),a(N),a(_d),a(ln))},e.\u0275cmp=k({type:e,selectors:[["tui-scrollbar"]],hostVars:2,hostBindings:function(t,i){t&1&&y("tui-scrollable.stop",function(r){return i.onScrollable(r.detail)})("tui-scroll-into-view.stop",function(r){return i.scrollIntoView(r.detail)}),t&2&&J("_legacy",i.showNative)},inputs:{hidden:"hidden"},features:[A([{provide:Fn,deps:[e],useFactory:({browserScrollRef:n})=>n}])],ngContentSelectors:J_,decls:3,vars:3,consts:[["class","t-bars",4,"ngIf"],[1,"t-content"],[1,"t-bars"]],template:function(t,i){t&1&&(Ve(),T(0,e0,1,0,"tui-scroll-controls",0),g(1,"div",1),me(2),v()),t&2&&(l("ngIf",i.showScrollbars),h(),J("t-content_delegated",i.delegated))},dependencies:[np,ee],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-content_delegated[_ngcontent-%COMP%]{height:100%}.t-bars[_ngcontent-%COMP%]{color:var(--tui-text-01)}"],changeDetection:0}),e})(),Uo=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,op]]}),e})();function i0(e){return e.replace(/[a-z][A-Z]/g,n=>`${n[0]}-${n[1].toLowerCase()}`)}var qi=class{supports(n){return n.includes(this.modifier)}addGlobalEventListener(){return()=>{}}unwrap(n){return n.split(".").filter(t=>!this.modifier.includes(t)).join(".")}},n0=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier="$"}addEventListener(t,i){t[i]=t[i]||Dt;let o=this.getMethod(t,i),r=this.manager.getZone().onStable,s=Yr(r.pipe(Tu(()=>t[i]===Dt)),Jo(()=>t[i])).subscribe(o);return()=>s.unsubscribe()}getMethod(t,i){let[,o,r,s=""]=i.split(".");return i.endsWith(".attr")?c=>c===null?t.removeAttribute(o):t.setAttribute(o,String(c)):o==="class"?c=>t.classList.toggle(r,!!c):o==="style"?c=>t.style.setProperty(i0(r),`${c}${s}`):c=>t[o]=c}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),o0=new se("[GLOBAL_HANDLER]: Global event target handler",{factory:()=>{let e=V(qe);return n=>n==="body"?e.body:e.defaultView[n]||e.createElement("div")}}),r0=(()=>{class e extends qi{constructor(){super(...arguments),this.handler=V(o0),this.modifier=">"}addEventListener(t,i,o){return this.manager.addEventListener(this.handler(i.split(">")[0]),i.split(">")[1],o)}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),s0=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier="capture.once.passive"}supports(t){return t.includes(".")&&!this.unwrap(t).includes(".")}addEventListener(t,i,o){return t.addEventListener(this.unwrap(i),o,{once:i.includes(".once"),passive:i.includes(".passive"),capture:i.includes(".capture")}),()=>t.removeEventListener(this.unwrap(i),o,i.includes(".capture"))}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),a0=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier=".prevent"}addEventListener(t,i,o){let r=s=>{s.preventDefault(),o(s)};return this.manager.addEventListener(t,this.unwrap(i),r)}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),c0=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier=".self"}addEventListener(t,i,o){let r=s=>{s.target===s.currentTarget&&o(s)};return this.manager.addEventListener(t,this.unwrap(i),r)}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),Xs=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier=".silent"}addEventListener(t,i,o){return e.ngZone=this.manager.getZone(),e.ngZone.runOutsideAngular(()=>this.manager.addEventListener(t,this.unwrap(i),o))}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),l0=(()=>{class e extends qi{constructor(){super(...arguments),this.modifier=".stop"}addEventListener(t,i,o){let r=s=>{s.stopPropagation(),o(s)};return this.manager.addEventListener(t,this.unwrap(i),r)}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),u0=(()=>{class e extends qi{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 n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),d0=[Xs,n0,r0,s0,a0,c0,l0,u0],p0=d0.map(e=>({provide:$a,multi:!0,useClass:e}));function qs(e){return(n,t,i)=>{let{value:o}=i;i.value=function(...r){e.apply(this,r)&&(Xs.ngZone?Xs.ngZone.run(()=>o.apply(this,r)):o.apply(this,r))}}}var D1=(()=>{class e{constructor([t]){console.assert(!(t instanceof Xs)||e.initialized,"EventPluginsModule must come after BrowserModule in imports"),e.initialized=!0}}return e.initialized=!1,e.\u0275fac=function(t){return new(t||e)(ye($a))},e.\u0275mod=D({type:e}),e.\u0275inj=M({providers:p0}),e})();var h0=e=>({$implicit:e});function f0(e,n){if(e&1&&(g(0,"div",4),Te(1),v()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t," ")}}var m0=X(()=>_0),hl=(()=>{class e{constructor(){this.tuiDropdownOpen=!1,this.tuiDropdownOpenChange=new Pe}update(t){this.tuiDropdownOpen=t,this.tuiDropdownOpenChange.emit(t)}ngOnChanges(){var t;(t=this.dropdown)===null||t===void 0||t.toggle(this.tuiDropdownOpen)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiDropdownOpen",""],["","tuiDropdownOpenChange",""]],inputs:{tuiDropdownOpen:"tuiDropdownOpen"},outputs:{tuiDropdownOpenChange:"tuiDropdownOpenChange"},features:[qt]}),e})(),ii=(()=>{class e{constructor(t,i,o,r,s,c){this.el=i,this.dropdown=o,this.injector=r,this.dropdownService=s,this.open=c,this.refresh$=new Ze,this.dropdownBoxRef=null,this.type="dropdown",this.component=new ui(this.dropdown,this.injector),this.open&&!this.open.dropdown?this.open.dropdown=this:this.open=null,this.refresh$.pipe(rn(0),re(t)).subscribe(()=>{var d,p;(d=this.dropdownBoxRef)===null||d===void 0||d.changeDetectorRef.detectChanges(),(p=this.dropdownBoxRef)===null||p===void 0||p.changeDetectorRef.markForCheck()})}get position(){return vc(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(t){var i,o;t&&this.content&&!this.dropdownBoxRef?(this.dropdownBoxRef=this.dropdownService.add(this.component),(i=this.open)===null||i===void 0||i.update(!0)):!t&&this.dropdownBoxRef&&(this.dropdownService.remove(this.dropdownBoxRef),this.dropdownBoxRef=null,(o=this.open)===null||o===void 0||o.update(!1))}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(N),a(m0),a(so),a(To),a(hl,8))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdown","",5,"ng-container"]],inputs:{content:[0,"tuiDropdown","content"]},exportAs:["tuiDropdown"],features:[A([q,Dn(e),xs(e)]),qt]}),jt([Zt],e.prototype,"position",null),e})(),g0={showDelay:200,hideDelay:500},v0=ce(g0);var fl=(()=>{class e extends hi{constructor(t,i,o){super(r=>this.stream$.subscribe(r)),this.hovered$=t,this.options=i,this.parentHover=o,this.toggle$=new Ze,this.stream$=He(this.toggle$,this.hovered$).pipe(Fe(r=>B(r).pipe(ri(r?this.showDelay:this.hideDelay))),st(r=>{this.hovered=r}),on()),this.showDelay=this.options.showDelay,this.hideDelay=this.options.hideDelay,this.hovered=!1,this.type="dropdown"}toggle(t){var i;(i=this.parentHover)===null||i===void 0||i.toggle(t),this.toggle$.next(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Wi),a(v0),a(e,12))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdownHover","",5,"ng-container"]],inputs:{showDelay:[0,"tuiDropdownShowDelay","showDelay"],hideDelay:[0,"tuiDropdownHideDelay","hideDelay"]},features:[A([Zi(e),Wi]),W]}),e})(),Bh={align:"left",direction:null,limitWidth:"auto",maxHeight:400,minHeight:80,offset:4,appearance:""},$n=ce(Bh),Vh=e=>({provide:$n,deps:[[new tt,Di],[new tt,new si,$n]],useFactory:Cc(e,Bh)}),Di=(()=>{class e{constructor(t){this.options=t,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 e.\u0275fac=function(t){return new(t||e)(a($n,4))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdownAlign",""],["","tuiDropdownAppearance",""],["","tuiDropdownDirection",""],["","tuiDropdownLimitWidth",""],["","tuiDropdownMinHeight",""],["","tuiDropdownMaxHeight",""],["","tuiDropdownOffset",""]],inputs:{align:[0,"tuiDropdownAlign","align"],appearance:[0,"tuiDropdownAppearance","appearance"],direction:[0,"tuiDropdownDirection","direction"],limitWidth:[0,"tuiDropdownLimitWidth","limitWidth"],minHeight:[0,"tuiDropdownMinHeight","minHeight"],maxHeight:[0,"tuiDropdownMaxHeight","maxHeight"],offset:[0,"tuiDropdownOffset","offset"]},features:[A([{provide:$n,useExisting:mt(()=>e)}])]}),e})(),Wn=(()=>{class e extends kt{constructor(t,i,o,r){super(),this.options=t,this.viewport=i,this.accessors=o,this.directive=r,this.type="dropdown"}getPosition({width:t,height:i}){var o,r;!t&&!i&&(this.previous=void 0);let s=(r=(o=this.accessor)===null||o===void 0?void 0:o.getClientRect())!==null&&r!==void 0?r:ai,c=this.viewport.getClientRect(),{minHeight:d,align:p,direction:_,offset:C,limitWidth:O}=this.options,L={top:c.top-C,bottom:c.bottom+C,right:c.right-C,left:c.left+C},Z=this.previous||_||"bottom",ue={top:s.top-2*C-L.top,bottom:L.bottom-s.bottom-2*C},Ge=O==="fixed"?s.width:t,Tt=Math.max(s.right-Ge,C),Ji=s.left+tue.bottom?"top":"bottom";return ue[Z]>d&&_||ue[Z]>i?[ut[Z],ut[p]]:(this.previous=Ct,[ut[Ct],ut[p]])}get accessor(){return Es("dropdown")(this.accessors,this.directive)}}return e.\u0275fac=function(t){return new(t||e)(a($n),a(jn),a(fi),a(ii))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdown",""]],features:[W]}),jt([Zt],e.prototype,"accessor",null),e})(),_0=(()=>{class e{constructor(t,i,o,r,s,c,d,p,_,C,O){this.directive=r,this.animation=s,this.el=c,this.accessor=d,this.win=p,this.mode$=_,this.options=C,this.hoverDirective=O,i.pipe(b(L=>this.directive.position==="fixed"?t.correct(L):L),re(o)).subscribe(([L,Z])=>{this.directive.el.nativeElement.isConnected?this.update(L,Z):this.directive.toggle(!1)}),this.updateWidth(this.accessor.getClientRect().width)}onHoveredChange(t){var i;(i=this.hoverDirective)===null||i===void 0||i.toggle(t)}onTopFocus(){this.moveFocusOutside(!0)}onBottomFocus(){this.moveFocusOutside(!1)}update(t,i){var o;let{style:r}=this.el.nativeElement,{right:s}=this.el.nativeElement.getBoundingClientRect(),{maxHeight:c,minHeight:d,offset:p}=this.options,{innerHeight:_}=this.win,C=(o=this.el.nativeElement.offsetParent)===null||o===void 0?void 0:o.getBoundingClientRect(),{position:O}=this.directive,L=this.accessor.getClientRect(),Z=O==="fixed"?0:-((C==null?void 0:C.left)||0),ue=O==="fixed"?0:-((C==null?void 0:C.top)||0);t+=ue,i+=Z;let Tt=iL.left&&t=L.right;r.position=O,r.top=Qe(Math.max(t,ue+p)),r.left=Qe(i),r.maxHeight=Ji?`${c}px`:Qe(Math.min(c,Math.max(Tt,d))),r.width="",r.minWidth="",this.updateWidth(L.width)}updateWidth(t){let{style:i}=this.el.nativeElement;switch(this.options.limitWidth){case"min":i.minWidth=Qe(t);break;case"fixed":i.width=Qe(t);break;case"auto":break}}moveFocusOutside(t){let{nativeElement:i}=this.directive.el,{ownerDocument:o}=i,r=o?o.body:i,s=Pi({initial:i,root:r,previous:t});for(;s!==null&&i.contains(s);)s=Pi({initial:s,root:r,previous:t});s==null||s.focus()}}return e.\u0275fac=function(t){return new(t||e)(a(Zs),a(Ho),a(q,2),a(ii),a(Do),a(N),a(fi),a(zt),a(Yi),a($n),a(fl,8))},e.\u0275cmp=k({type:e,selectors:[["tui-dropdown"]],hostVars:2,hostBindings:function(t,i){t&1&&y("$.data-mode.attr",function(){return i.mode$}),t&2&&(vn("@tuiDropdownAnimation",i.animation),fe("data-appearance",i.options.appearance))},features:[A([q,Ho,Ss("dropdown",Wn),Ps("dropdown",ii),xn])],decls:5,vars:4,consts:[["activeZone","tuiActiveZone"],["tuiActiveZone","","tuiOverscroll","all",1,"t-scroll",3,"tuiHoveredChange"],["tabindex","0",3,"focus"],["class","t-primitive",4,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-primitive"]],template:function(t,i){if(t&1){let o=F();g(0,"tui-scrollbar",1,0),y("tuiHoveredChange",function(s){return I(o),x(i.onHoveredChange(s))}),g(2,"div",2),y("focus",function(){return I(o),x(i.onTopFocus())}),v(),T(3,f0,2,1,"div",3),g(4,"div",2),y("focus",function(){return I(o),x(i.onBottomFocus())}),v()()}if(t&2){let o=j(1);h(3),l("polymorpheusOutlet",i.directive.content)("polymorpheusOutletContext",Oi(2,h0,o))}},dependencies:[jo,gt,bp,vp,Je],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}'],data:{animation:[jh]}}),e})();var Ks=(()=>{class e extends Os{constructor(t,i,o){super(t,i,o),this.type="dropdown"}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(hi),a(Mn))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdown",""]],features:[A([q]),W]}),e})();var $h=(()=>{class e extends hi{constructor(){super(t=>this.stream$.subscribe(t)),this.stream$=new Ke(!1),this.tuiDropdownManual=!1,this.type="dropdown"}ngOnChanges(){this.stream$.next(this.tuiDropdownManual)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiDropdown","","tuiDropdownManual",""]],inputs:{tuiDropdownManual:"tuiDropdownManual"},features:[A([Zi(e)]),W,qt]}),e})(),Wh=(()=>{class e extends kt{constructor(t,i,o){super(),this.options=t,this.viewport=i,this.vertical=o,this.previous=this.options.direction||"bottom",this.tuiDropdownSided="",this.tuiDropdownSidedOffset=4,this.type="dropdown"}getPosition(t){var i,o;if(this.tuiDropdownSided===!1)return this.vertical.getPosition(t);let{height:r,width:s}=t,c=(o=(i=this.vertical.accessor)===null||i===void 0?void 0:i.getClientRect())!==null&&o!==void 0?o:ai,d=this.viewport.getClientRect(),{direction:p,minHeight:_,offset:C}=this.options,O=this.options.align==="center"?"left":this.options.align,L={top:c.bottom-d.top,left:c.left-C-d.left,right:d.right-c.right-C,bottom:d.bottom-c.top},Z={top:c.bottom-r+this.tuiDropdownSidedOffset+1,left:c.left-s-C,right:c.right+C,bottom:c.top-this.tuiDropdownSidedOffset-1},ue=L.top>L.bottom?"top":"bottom",Ge=L.left>L.right?Z.left:Z.right,Tt=L[O]>s?Z[O]:Ge;return L[this.previous]>_&&p||this.previous===ue?[Z[this.previous],Tt]:(this.previous=ue,[Z[ue],Tt])}}return e.\u0275fac=function(t){return new(t||e)(a($n),a(jn),a(Wn))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdownSided",""]],inputs:{tuiDropdownSided:"tuiDropdownSided",tuiDropdownSidedOffset:"tuiDropdownSidedOffset"},features:[A([Wn,Jp(e)]),W]}),e})(),Gh=(()=>{class e extends hi{constructor(t,i,o,r,s,c){super(d=>this.stream$.subscribe(d)),this.range=t,this.doc=i,this.selection$=o,this.el=r,this.vcr=s,this.dropdown=c,this.handler$=new Ke(Bi),this.stream$=wt([this.handler$,this.selection$.pipe(b(()=>this.getRange()),oe((d,p)=>d.startOffset===p.startOffset&&d.endOffset===p.endOffset&&d.commonAncestorContainer===p.commonAncestorContainer))]).pipe(b(([d,p])=>{let _=this.el.nativeElement.contains(p.commonAncestorContainer);return this.range=_&&as(p.commonAncestorContainer)?p:this.range,_&&d(this.range)||this.inDropdown(p)})),this.position="selection",this.type="dropdown"}set tuiDropdownSelection(t){ci(t)||this.handler$.next(t)}getClientRect(){switch(this.position){case"tag":{let{commonAncestorContainer:t}=this.range,i=pt(t)?t:t.parentNode;return i&&pt(i)?i.getBoundingClientRect():ai}case"word":return bs(this.range).getBoundingClientRect();default:return this.range.getBoundingClientRect()}}ngOnDestroy(){this.ghost&&this.vcr.element.nativeElement.removeChild(this.ghost)}getRange(){let t=nd(this.doc),i=this.doc.getSelection();return(t&&Qu(t)&&this.el.nativeElement.contains(t)?this.veryVerySadInputFix(t):(i==null?void 0:i.rangeCount)&&i.getRangeAt(0)||this.range).cloneRange()}inDropdown(t){let{startContainer:i,endContainer:o}=t,{nativeElement:r}=this.el,s=this.boxContains(t.commonAncestorContainer),c=this.boxContains(o)&&r.contains(i),d=this.boxContains(i)&&r.contains(o);return s||c||d}veryVerySadInputFix(t){let{ghost:i=this.initGhost(t)}=this,{top:o,left:r,width:s,height:c}=t.getBoundingClientRect(),{selectionStart:d,selectionEnd:p,value:_}=t,C=this.doc.createRange(),O=this.el.nativeElement.getBoundingClientRect();return i.style.top=Qe(o-O.top),i.style.left=Qe(r-O.left),i.style.width=Qe(s),i.style.height=Qe(c),i.textContent=rr+_+Vi,C.setStart(i.firstChild,d||0),C.setEnd(i.firstChild,p||0),C}boxContains(t){var i;return!!(!((i=this.dropdown.dropdownBoxRef)===null||i===void 0)&&i.location.nativeElement.contains(t))}initGhost(t){let i=this.doc.createElement("div"),{font:o,letterSpacing:r,textTransform:s,padding:c}=getComputedStyle(t);return i.style.position="absolute",i.style.pointerEvents="none",i.style.opacity="0",i.style.whiteSpace="pre-wrap",i.style.font=o,i.style.letterSpacing=r,i.style.textTransform=s,i.style.padding=c,this.vcr.element.nativeElement.appendChild(i),this.ghost=i,i}}return e.\u0275fac=function(t){return new(t||e)(a(Id),a(qe),a(Wp),a(N),a(Ci),a(ii))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdown","","tuiDropdownSelection",""]],inputs:{position:[0,"tuiDropdownSelectionPosition","position"],tuiDropdownSelection:"tuiDropdownSelection"},features:[A([Zi(e),Dn(e)]),W]}),e})(),vi=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[lt,yi,Mp,Uo,_p]]}),e})();var C0=["*"];function y0(e,n){if(e&1&&S(0,"span",1),e&2){let t=n.polymorpheusOutlet;l("innerHTML",t,gn)}}var b0=X(()=>w0),M0={direction:"bottom-left",showDelay:500,hideDelay:200,appearance:"",icon:"tuiIconHelpCircle"},Gn=ce(M0);var Js=(()=>{class e extends Yt{constructor(t){super(),this.options=t,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 e.\u0275fac=function(t){return new(t||e)(a(Gn,4))},e.\u0275dir=w({type:e,selectors:[["","tuiHintContent",""]],inputs:{content:[0,"tuiHintContent","content"],direction:[0,"tuiHintDirection","direction"],appearance:[0,"tuiHintAppearance","appearance"],showDelay:[0,"tuiHintShowDelay","showDelay"],hideDelay:[0,"tuiHintHideDelay","hideDelay"]},features:[A([{provide:Gn,useExisting:mt(()=>e)}]),W]}),e})(),be=(()=>{class e{constructor(t,i,o,r,s){this.el=t,this.component=i,this.hintService=o,this.options=r,this.activeZone=s,this.tuiHintAppearance=null,this.type="hint"}set tuiHint(t){this.content=t,t||this.toggle(!1)}get appearance(){var t;return(t=this.tuiHintAppearance)!==null&&t!==void 0?t:this.options.appearance}ngOnDestroy(){this.toggle(!1)}getClientRect(){return this.el.nativeElement.getBoundingClientRect()}toggle(t){t&&this.content?this.hintService.add(this):this.hintService.remove(this)}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(ui),a(Lh),a(Gn),a(gt,8))},e.\u0275dir=w({type:e,selectors:[["","tuiHint","",5,"ng-container",5,"ng-template"]],inputs:{tuiHint:"tuiHint",context:[0,"tuiHintContext","context"],tuiHintAppearance:"tuiHintAppearance"},features:[A([Dn(e),xs(e),{provide:ui,deps:[b0,so],useClass:ui}])]}),e})(),ve=(()=>{class e extends hi{constructor(t,i,o,r){super(s=>this.stream$.subscribe(s)),this.hovered$=t,this.options=i,this.el=o,this.parent=r,this.visible=!1,this.toggle$=new Ze,this.stream$=He(this.toggle$.pipe(Fe(s=>B(s).pipe(ri(s?0:this.hideDelay))),re(this.hovered$),ja()),this.hovered$.pipe(Fe(s=>B(s).pipe(ri(s?this.showDelay:this.hideDelay))),re(this.toggle$),ja())).pipe(et(()=>this.enabled),b(s=>s&&(this.el.nativeElement.hasAttribute("tuiHintPointer")||!Tc(this.el.nativeElement))),st(s=>{this.visible=s})),this.showDelay=this.options.showDelay,this.hideDelay=this.options.hideDelay,this.type="hint",this.enabled=!0}toggle(t=!this.visible){var i;this.toggle$.next(t),(i=this.parent)===null||i===void 0||i.toggle(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Wi),a(Gn),a(N),a(e,12))},e.\u0275dir=w({type:e,selectors:[["","tuiHint","",5,"ng-container",5,"ng-template"]],inputs:{showDelay:[0,"tuiHintShowDelay","showDelay"],hideDelay:[0,"tuiHintHideDelay","hideDelay"]},exportAs:["tuiHintHover"],features:[A([Zi(e),Wi]),W]}),e})(),D0=(()=>{class e extends ve{constructor(){super(...arguments),this.currentRect=ai}onMove({clientX:t,clientY:i}){this.currentRect=Ya(t,i)}getClientRect(){return this.currentRect}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiHint","","tuiHintPointer",""]],hostBindings:function(t,i){t&1&&y("mousemove.silent",function(r){return i.onMove(r)})},features:[A([Dn(e),Zi(e)]),W]}),e})(),On=8,Qs=22,ht=0,vt=1,Se=(()=>{class e extends kt{constructor(t,i,o,r){super(),this.options=t,this.viewport=i,this.directive=o,this.accessors=r,this.points=hc.reduce((s,c)=>Object.assign(Object.assign({},s),{[c]:[0,0]}),{}),this.direction=this.options.direction,this.type="hint"}getPosition({width:t,height:i}){var o,r;let s=(r=(o=this.accessor)===null||o===void 0?void 0:o.getClientRect())!==null&&r!==void 0?r:ai,c=s.left+s.width/2,d=s.top+s.height/2;if(this.points["top-left"][ht]=s.top-i-On,this.points["top-left"][vt]=c-t+Qs,this.points.top[ht]=this.points["top-left"][ht],this.points.top[vt]=c-t/2,this.points["top-right"][ht]=this.points["top-left"][ht],this.points["top-right"][vt]=c-Qs,this.points["bottom-left"][ht]=s.bottom+On,this.points["bottom-left"][vt]=this.points["top-left"][vt],this.points.bottom[ht]=this.points["bottom-left"][ht],this.points.bottom[vt]=this.points.top[vt],this.points["bottom-right"][ht]=this.points["bottom-left"][ht],this.points["bottom-right"][vt]=this.points["top-right"][vt],this.points["left-top"][ht]=d-i+Qs,this.points["left-top"][vt]=s.left-t-On,this.points.left[ht]=d-i/2,this.points.left[vt]=this.points["left-top"][vt],this.points["left-bottom"][ht]=d-Qs,this.points["left-bottom"][vt]=this.points["left-top"][vt],this.points["right-top"][ht]=this.points["left-top"][ht],this.points["right-top"][vt]=s.right+On,this.points.right[ht]=this.points.left[ht],this.points.right[vt]=this.points["right-top"][vt],this.points["right-bottom"][ht]=this.points["left-bottom"][ht],this.points["right-bottom"][vt]=this.points["right-top"][vt],this.checkPosition(this.points[this.direction],t,i))return this.points[this.direction];let p=hc.find(_=>this.checkPosition(this.points[_],t,i));return this.points[p||this.fallback]}get accessor(){return Es("hint")(this.accessors,this.directive)}get fallback(){return this.points.top[ht]>this.viewport.getClientRect().bottom-this.points.bottom[ht]?"top":"bottom"}checkPosition([t,i],o,r){let s=this.viewport.getClientRect();return t>On/4&&i>On/4&&t+r{class e{constructor(t,i,o,r,s,c,d,p,_,C,O,L){var Z;this.animation=r,this.pointer=s,this.accessor=c,this.el=d,this.polymorpheus=p,this.hover=_,this.mode=C,this.vvs=O,this.viewport=L,this.appearance=this.polymorpheus.$implicit.appearance||((Z=this.mode)===null||Z===void 0?void 0:Z.mode),i.pipe(b(ue=>this.vvs.correct(ue)),re(o)).subscribe(([ue,Ge])=>{this.update(ue,Ge)}),t.pipe(re(o)).subscribe(ue=>this.hover.toggle(ue))}get content(){return this.polymorpheus.$implicit.content}get context(){return this.polymorpheus.$implicit.context}onClick(t){(!t.closest("tui-hint")&&!this.hover.el.nativeElement.contains(t)||Tc(this.hover.el.nativeElement))&&this.hover.toggle(!1)}update(t,i){if(!this.hover.el.nativeElement.isConnected){this.hover.toggle(!1);return}let{height:o,width:r}=this.el.nativeElement.getBoundingClientRect(),{style:s}=this.el.nativeElement,c=this.accessor.getClientRect(),d=this.viewport.getClientRect();if(c===ai)return;let p=_n(i,Yh,d.width-r-Yh),[_,C]=this.vvs.correct([c.top+c.height/2-t,c.left+c.width/2-p]);s.top=Qe(t),s.left=Qe(p),s.setProperty("--top",Qe(_n(_,.5,o-1))),s.setProperty("--left",Qe(_n(C,.5,r-1)))}}return e.\u0275fac=function(t){return new(t||e)(a(Wi),a(Ho),a(q,2),a(Do),a(D0,8),a(fi),a(N),a(Ln),a(ve),a(Mi,8),a(Zs),a(jn))},e.\u0275cmp=k({type:e,selectors:[["tui-hint"]],hostVars:4,hostBindings:function(t,i){t&1&&y("click",function(r){return i.onClick(r.target)},!1,Ni),t&2&&(vn("@tuiFadeIn",i.animation),fe("data-appearance",i.appearance),J("_untouchable",i.pointer))},features:[A([q,Ho,Wi,Ss("hint",Se),Ps("hint",be)])],ngContentSelectors:C0,decls:2,vars:2,consts:[[3,"innerHTML",4,"polymorpheusOutlet","polymorpheusOutletContext"],[3,"innerHTML"]],template:function(t,i){t&1&&(Ve(),me(0),T(1,y0,1,1,"span",0)),t&2&&(h(),l("polymorpheusOutlet",i.content)("polymorpheusOutletContext",i.context))},dependencies:[Je],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;line-height:1.25rem}[_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:[No]},changeDetection:0}),jt([Zt],e.prototype,"update",null),e})(),Ae=(()=>{class e extends hi{constructor(t,i,o){super(r=>this.stream$.subscribe(r)),this.zone=t,this.doc=i,this.el=o,this.id$=new no(1),this.stream$=this.id$.pipe(po(()=>pe(this.doc,"keydown",{capture:!0}),Tn),Fe(()=>this.focused?B(!1):He(pe(this.doc,"keyup"),pe(this.element,"blur")).pipe(b(()=>this.focused))),fu(r=>r?oo(1e3):B(null)),it(!1),oe(),hn(1),Jt(this.zone)),this.tuiHintDescribe="",this.type="hint"}ngOnChanges(){this.id$.next(this.tuiHintDescribe)}get focused(){return Qt(this.element)}get element(){return this.doc.getElementById(this.tuiHintDescribe||"")||this.el.nativeElement}}return e.\u0275fac=function(t){return new(t||e)(a(Xe),a(qe),a(N))},e.\u0275dir=w({type:e,selectors:[["","tuiHintDescribe",""]],inputs:{tuiHintDescribe:"tuiHintDescribe"},features:[A([Zi(e)]),W,qt]}),jt([Zt],e.prototype,"element",null),e})(),ke=(()=>{class e extends Os{constructor(t,i,o){super(t,i,o),this.type="hint"}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(hi),a(Mn))},e.\u0275dir=w({type:e,selectors:[["","tuiHint","",5,"ng-container",5,"ng-template"]],features:[A([q]),W]}),e})();var Le=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lt]]}),e})();var ml=class{constructor(n,t,i,o,r,s,c,d,p,_,C,O,L){this.change$=n,this.options=t,this.legacyAppearance=i,this.appearanceDirective=o,this.cleanerDirective=r,this.customContentDirective=s,this.iconDirective=c,this.iconLeftDirective=d,this.labelOutsideDirective=p,this.sizeDirective=_,this.prefixDirective=C,this.postfixDirective=O,this.fillerDirective=L}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}},x0={iconCleaner:"tuiIconClose",hintOnDisabled:!1},gl=ce(x0);var Zh=X(()=>new O0),O0=(()=>{class e extends Yt{constructor(){super(...arguments),this.appearance=""}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldAppearance",""]],inputs:{appearance:[0,"tuiTextfieldAppearance","appearance"]},features:[A([{provide:Zh,useExisting:mt(()=>e)}]),W]}),e})(),Xh=X(()=>new S0),S0=(()=>{class e extends Yt{constructor(){super(...arguments),this.cleaner=!1}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldCleaner",""]],inputs:{cleaner:[0,"tuiTextfieldCleaner","cleaner"]},features:[A([{provide:Xh,useExisting:mt(()=>e)}]),W]}),e})(),qh=X(()=>new P0),P0=(()=>{class e extends Yt{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldCustomContent",""]],inputs:{customContent:[0,"tuiTextfieldCustomContent","customContent"]},features:[A([{provide:qh,useExisting:mt(()=>e)}]),W]}),e})(),Kh=X(()=>new E0),E0=(()=>{class e extends Yt{constructor(){super(...arguments),this.filler=""}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldFiller",""]],inputs:{filler:[0,"tuiTextfieldFiller","filler"]},features:[A([{provide:Kh,useExisting:mt(()=>e)}]),W]}),e})(),Qh=X(()=>new A0),A0=(()=>{class e extends Yt{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldIcon",""]],inputs:{icon:[0,"tuiTextfieldIcon","icon"]},features:[A([{provide:Qh,useExisting:mt(()=>e)}]),W]}),e})(),Jh=X(()=>new k0),k0=(()=>{class e extends Yt{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldIconLeft",""]],inputs:{iconLeft:[0,"tuiTextfieldIconLeft","iconLeft"]},features:[A([{provide:Jh,useExisting:mt(()=>e)}]),W]}),e})(),ef=X(()=>new tf),tf=(()=>{class e extends Yt{constructor(){super(...arguments),this.labelOutside=!1}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldLabelOutside",""]],inputs:{labelOutside:[0,"tuiTextfieldLabelOutside","labelOutside"]},features:[A([{provide:ef,useExisting:mt(()=>e)}]),W]}),e})(),nf=X(()=>new of),of=(()=>{class e extends Yt{constructor(){super(...arguments),this.postfix=""}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldPostfix",""]],inputs:{postfix:[0,"tuiTextfieldPostfix","postfix"]},features:[A([{provide:nf,useExisting:mt(()=>e)}]),W]}),e})(),rf=X(()=>new R0),R0=(()=>{class e extends Yt{constructor(){super(...arguments),this.prefix=""}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldPrefix",""]],inputs:{prefix:[0,"tuiTextfieldPrefix","prefix"]},features:[A([{provide:rf,useExisting:mt(()=>e)}]),W]}),e})(),sf=X(()=>new af),af=(()=>{class e extends Yt{constructor(){super(...arguments),this.size="l"}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiTextfieldSize",""]],inputs:{size:[0,"tuiTextfieldSize","size"]},features:[A([{provide:sf,useExisting:mt(()=>e)}]),W]}),e})(),F0=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})(),kr=new se("[TUI_TEXTFIELD_WATCHED_CONTROLLER]"),ea=[q,{provide:kr,deps:[ft,q,gl,Zp,Zh,Xh,qh,Qh,Jh,ef,sf,rf,nf,Kh],useFactory:(e,n,t,i,...o)=>{let r=He(...o.map(({change$:s})=>s||pu)).pipe(gd(e),re(n));return r.subscribe(),new ml(r,t,i,...o)}}];var ta=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["input","tuiMaskAccessor",""]],features:[A([{provide:is,deps:[[new tt,Is],ao],multi:!0,useFactory:(n,t)=>n?n[0]:t}])]}),e})(),ia=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Ki=(()=>{class e{constructor(t){this.mode$=t,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?Mo.Disabled:this.readOnly?Mo.Readonly:this.active?Mo.Active:this.hover?Mo.Hover:null}get noHover(){return this.readOnly||this.hover===!1}get noActive(){return this.readOnly||this.active===!1}}return e.\u0275fac=function(t){return new(t||e)(a(Yi))},e.\u0275dir=w({type:e,selectors:[["","tuiWrapper",""]],hostVars:10,hostBindings:function(t,i){t&1&&y("$.data-mode.attr",function(){return i.mode$}),t&2&&(fe("data-appearance",i.appearance)("data-state",i.interactiveState),J("_invalid",i.computedInvalid)("_focused",i.computedFocused)("_no-hover",i.noHover)("_no-active",i.noActive))},inputs:{disabled:"disabled",readOnly:"readOnly",hover:"hover",active:"active",focus:"focus",invalid:"invalid",appearance:"appearance"},features:[A([xn])]}),e})(),Qi=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var H0=["*"];function N0(e,n){if(e&1&&(Ie(0),Te(1),xe()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t," ")}}function j0(e,n){if(e&1&&(g(0,"div",6),T(1,N0,2,1,"ng-container",7),v()),e&2){let t=u(2);J("t-text_horizontal",t.isHorizontal),h(),l("polymorpheusOutlet",t.textContent)}}function U0(e,n){if(e&1&&(g(0,"div",2),qr(),g(1,"svg",3),S(2,"circle",4),v(),T(3,j0,2,3,"div",5),v()),e&2){let t=u();J("t-loader_horizontal",t.isHorizontal)("t-loader_inherit-color",t.inheritColor),fe("data-size",t.size),h(3),l("ngIf",t.hasText)}}var z0={size:"m",inheritColor:!1,overlay:!1},B0=ce(z0);var na=(()=>{class e{constructor(t,i,o,r){this.doc=t,this.el=i,this.isIos=o,this.options=r,this.size=this.options.size,this.inheritColor=this.options.inheritColor,this.overlay=this.options.overlay,this.loading=!0,this.isApple=Jd(this.el.nativeElement)||this.isIos}set showLoader(t){t&&this.focused&&od(this.doc),this.loading=t}get hasOverlay(){return this.overlay&&this.loading}get hasText(){return!!this.textContent}get isHorizontal(){return!Hp(this.size)}get focused(){return li(this.el.nativeElement)}}return e.\u0275fac=function(t){return new(t||e)(a(qe),a(N),a(ln),a(B0))},e.\u0275cmp=k({type:e,selectors:[["tui-loader"]],hostVars:2,hostBindings:function(t,i){t&2&&J("_loading",i.loading)},inputs:{size:"size",inheritColor:"inheritColor",overlay:"overlay",textContent:"textContent",showLoader:"showLoader"},ngContentSelectors:H0,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(t,i){t&1&&(Ve(),g(0,"fieldset",0),me(1),v(),T(2,U0,4,6,"div",1)),t&2&&(J("t-content_has-overlay",i.hasOverlay)("t-content_loading",i.loading),l("disabled",i.loading&&!i.isApple),fe("inert",i.loading||null),h(2),l("ngIf",i.loading))},dependencies:[ee,Je],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})(),oa=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lt]]}),e})();var $0=["tuiButton",""],W0=["*"];function G0(e,n){e&1&&Ut(0)}function Y0(e,n){if(e&1&&S(0,"tui-svg",8),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function Z0(e,n){if(e&1&&(g(0,"span",6),T(1,Y0,1,1,"tui-svg",7),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.icon)}}function X0(e,n){if(e&1&&S(0,"tui-svg",8),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function q0(e,n){if(e&1&&(g(0,"span",9),T(1,X0,1,1,"tui-svg",7),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.iconRight)}}function K0(e,n){if(e&1&&S(0,"tui-loader",10),e&2){let t=u();l("inheritColor",!0)("size",t.loaderSize)}}var Q0={size:"l",shape:null,appearance:Gi.Primary},_l=ce(Q0);var _e=(()=>{class e extends dr{constructor(t,i,o){var r;super(),this.mode=t,this.el=i,this.options=o,this.mode$=((r=this.mode)===null||r===void 0?void 0:r.change$)||Dt,this.appearance=null,this.disabled=!1,this.shape=this.options.shape,this.showLoader=!1,this.size=this.options.size,this.appearance$=this.mode$.pipe(it(null),b(()=>this.computedAppearance),oe())}get nativeFocusableElement(){return this.nativeDisabled?null:this.el.nativeElement}get focused(){return!this.showLoader&&Qt(this.el.nativeElement)}get loaderSize(){return this.size==="l"||this.size==="xl"?"m":"s"}get computedAppearance(){var t;return(t=this.appearance)!==null&&t!==void 0?t:this.options.appearance||""}get nativeDisabled(){return this.computedDisabled||this.showLoader?"":null}get tabIndex(){return this.focusable?0:-1}onFocused(t){this.updateFocused(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Mi,8),a(N),a(_l))},e.\u0275cmp=k({type:e,selectors:[["button","tuiButton",""],["button","tuiIconButton",""],["a","tuiButton",""],["a","tuiIconButton",""]],hostVars:7,hostBindings:function(t,i){t&1&&y("focusin",function(){return i.onFocused(!0)})("focusout",function(){return i.onFocused(!1)}),t&2&&(kn("tabIndex",i.tabIndex),fe("data-shape",i.shape)("data-size",i.size)("data-appearance",i.computedAppearance)("disabled",i.nativeDisabled),J("_loading",i.showLoader))},inputs:{appearance:"appearance",disabled:"disabled",icon:"icon",iconRight:"iconRight",shape:"shape",showLoader:"showLoader",size:"size"},features:[A([ei(e),q]),W],attrs:$0,ngContentSelectors:W0,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(t,i){t&1&&(Ve(),T(0,G0,1,0,"ng-container",0),R(1,"async"),g(2,"div",1)(3,"span",2),T(4,Z0,2,1,"span",3),me(5),T(6,q0,2,1,"span",4),v(),T(7,K0,1,2,"tui-loader",5),v()),t&2&&(l("ngIf",H(1,8,i.appearance$)),h(2),l("active",i.pseudoActive)("appearance",i.computedAppearance)("disabled",i.computedDisabled)("hover",i.pseudoHover),h(2),l("ngIf",i.icon),h(2),l("ngIf",i.iconRight),h(),l("ngIf",i.showLoader))},dependencies:[Ft,na,ee,Ki,Je,K],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%], [tuiIconButton][data-appearance=link][data-size=s][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [tuiIconButton][data-appearance=link][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})(),Me=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lt,Qi,Lt,oa]]}),e})();var eT=["tuiLink",""],tT=["*"];function iT(e,n){if(e&1&&S(0,"tui-svg",3),e&2){let t=u();l("src",t.icon||"")}}function nT(e,n){if(e&1&&S(0,"tui-svg",4),e&2){let t=u();l("src",t.icon||"")}}var ra=(()=>{class e{constructor(t,i,o){this.el=t,this.mode$=i,this.pseudo=!1,this.icon="",this.iconAlign="right",this.iconRotated=!1,this.mode=null,this.focusVisible=!1,this.focusedChange=He(pe(this.el.nativeElement,"focusin").pipe(b(Bi)),pe(this.el.nativeElement,"focusout").pipe(b(cn))),o.subscribe(r=>{this.focusVisible=r})}get nativeFocusableElement(){return this.el.nativeElement}get focused(){return Qt(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(t){return new(t||e)(a(N),a(Yi),a(mo))},e.\u0275cmp=k({type:e,selectors:[["a","tuiLink",""],["button","tuiLink",""]],hostVars:7,hostBindings:function(t,i){t&1&&y("$.data-mode.attr",function(){return i.mode$}),t&2&&(fe("data-host-mode",i.mode),J("_pseudo",i.pseudo)("_icon-rotated",i.iconRotated)("_focus-visible",i.focusVisible))},inputs:{pseudo:"pseudo",icon:"icon",iconAlign:"iconAlign",iconRotated:"iconRotated",mode:"mode"},exportAs:["tuiLink"],features:[A([ei(e),mo,q,xn])],attrs:eT,ngContentSelectors:tT,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(t,i){t&1&&(Ve(),T(0,iT,1,1,"tui-svg",0),g(1,"span",1),me(2),v(),T(3,nT,1,1,"tui-svg",2)),t&2&&(l("ngIf",i.iconAlignLeft),h(3),l("ngIf",i.iconAlignRight))},dependencies:[Ft,ee],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})(),sa=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Lt]]}),e})();function oT(e,n){if(e&1&&(Ie(0),Te(1),xe()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t," ")}}function rT(e,n){if(e&1&&(g(0,"header",6),T(1,oT,2,1,"ng-container",3),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.header)("polymorpheusOutletContext",t.context)}}function sT(e,n){if(e&1){let t=F();Ie(0),S(1,"div",7),g(2,"div",8)(3,"button",9),y("click",function(){I(t);let o=u();return x(o.context.$implicit.complete())}),Te(4),v()(),xe()}if(e&2){let t=n.polymorpheusOutlet,i=u();h(),l("innerHTML",t,gn),h(3),Ne(" ",(i.context.data==null?null:i.context.data.button)||"OK"," ")}}function aT(e,n){if(e&1){let t=F();g(0,"div",10)(1,"button",11),R(2,"async"),y("click",function(){I(t);let o=u();return x(o.close$.next())})("mousedown.prevent.silent",function(){return I(t),x(0)}),v()()}if(e&2){let t=u();h(),l("appearance",t.fullscreen?"secondary":"")("icon",t.icons.close)("title",H(2,3,t.closeWord$))}}var cT={size:"m",required:!1,closeable:!0,dismissible:!0,label:"",header:""},lT=ce(Dt),uT=ce(cT);var dT=17,cf=(()=>{class e extends _i{constructor(t,i,o){super(r=>He(this.esc$,this.mousedown$).subscribe(r)),this.win=t,this.doc=i,this.el=o,this.esc$=pe(this.doc,"keydown").pipe(et(r=>{let s=uo(r);return r.key==="Escape"&&!r.defaultPrevented&&(this.element.contains(s)||this.isOutside(s))})),this.mousedown$=pe(this.doc,"mousedown").pipe(et(r=>bo(this.win)-r.clientX>dT&&this.isOutside(uo(r))),Fe(()=>pe(this.doc,"mouseup").pipe(Wt(1),b(uo),et(r=>this.isOutside(r)))))}get element(){return this.el.nativeElement}isOutside(t){return pt(t)&&(!Ku(this.element,t)||t===this.element)}}return e.\u0275fac=function(t){return new(t||e)(ye(zt),ye(qe),ye(N))},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),pT=new Error("Required dialog was dismissed");function lf(e){return Gr(e)?e:B(e)}var hT=(()=>{class e{constructor(t,i,o,r,s,c,d,p){this.duration=t,this.isMobile=i,this.context=o,this.closeWord$=d,this.icons=p,this.animation={value:"",params:{start:"40px",duration:this.duration}},this.fullscreenAnimation={value:"",params:{start:"100vh",duration:this.duration}},this.close$=new Ze,He(this.close$.pipe(Fe(()=>lf(o.closeable))),s.pipe(Fe(()=>lf(o.dismissible))),c.pipe(b(Bi))).pipe(et(Boolean),re(r)).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(pT):this.context.$implicit.complete()}}return e.\u0275fac=function(t){return new(t||e)(a(bc),a(fo),a(Ln),a(q,2),a(cf),a(lT),a(Ds),a(wo))},e.\u0275cmp=k({type:e,selectors:[["tui-dialog"]],hostVars:6,hostBindings:function(t,i){t&2&&(vn("@tuiSlideInTop",i.slideInTop)("@tuiFadeIn",i.slideInTop),fe("data-appearance",i.context.appearance)("data-size",i.size),J("_centered",i.header))},features:[A([q,cf])],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,"click","mousedown.prevent.silent","appearance","icon","title"]],template:function(t,i){t&1&&(T(0,rT,2,2,"header",0),g(1,"div",1),S(2,"h2",2),g(3,"section"),T(4,sT,5,2,"ng-container",3),v()(),S(5,"div",4),T(6,aT,3,5,"div",5)),t&2&&(l("ngIf",i.header),h(2),l("id",i.context.id)("textContent",i.context.label),h(2),l("polymorpheusOutlet",i.context.content)("polymorpheusOutletContext",i.context),h(2),l("ngIf",i.context.closeable))},dependencies:[_e,ee,Je,ms,K],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:[zh,No]}}),e})(),fT=new ui(hT),mT=(()=>{class e extends hs{constructor(){super(...arguments),this.component=fT,this.defaultOptions=Object.assign(Object.assign({},V(uT)),{data:void 0})}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var qP=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({providers:[Md(mT)],imports:[[lt,Me,z,gs]]}),e})();var uf=(()=>{class e{constructor(t){this.service=t}transform(t){return this.service.format(t.valueOf())}}return e.\u0275fac=function(t){return new(t||e)(a(Fh,16))},e.\u0275pipe=Ii({name:"tuiFormatDate",type:e,pure:!0}),e})(),df=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var gT=(()=>{class e{constructor(t){this.months$=t}transform({month:t}){return this.months$.pipe(b(i=>i[t]))}}return e.\u0275fac=function(t){return new(t||e)(a(Up,16))},e.\u0275pipe=Ii({name:"tuiMonth",type:e,pure:!0}),e})(),iE=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var vT=["tuiOption",""],pf=["*"],_T=e=>({$implicit:e});function TT(e,n){if(e&1&&(Ie(0),Te(1),xe()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t,` +`)}}function CT(e,n){if(e&1&&S(0,"tui-svg",3),e&2){let t=u(2);l("src",t.icons.more)}}function yT(e,n){if(e&1&&(me(0),T(1,CT,1,1,"tui-svg",2)),e&2){let t=u();h(),l("ngIf",t.dropdown)}}function bT(e,n){if(e&1&&(Ie(0),Te(1),xe()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t," ")}}function MT(e,n){if(e&1&&(g(0,"div",2),T(1,bT,2,1,"ng-container",3),R(2,"async"),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.emptyContent||H(2,1,t.defaultEmptyContent$))}}function DT({currentTarget:e}){return!this.isMobile&&!Qt(e)}var Sn=(()=>{class e{constructor(t,i,o,r,s,c,d){this.isMobile=t,this.content=i,this.dataList=o,this.el=r,this.host=s,this.dropdown=c,this.icons=d,this.size=null,this.role="option",this.disabled=!1}get active(){return!!this.dropdown&&!!this.dropdown.dropdownBoxRef}onClick(){this.host&&this.value!==void 0&&this.host.handleOption(this.value)}onMouseMove({currentTarget:t}){t.focus({preventScroll:!0})}ngOnDestroy(){var t;(t=this.dataList)===null||t===void 0||t.handleFocusLossIfNecessary(this.el.nativeElement)}}return e.\u0275fac=function(t){return new(t||e)(a(fo),a($p,8),a(mt(()=>Pn),8),a(N),a(Mc,8),a(ii,10),a(wo))},e.\u0275cmp=k({type:e,selectors:[["button","tuiOption",""],["a","tuiOption",""]],hostAttrs:["tabIndex","-1","type","button"],hostVars:5,hostBindings:function(t,i){t&1&&y("click",function(){return i.onClick()})("mousemove.silent",function(r){return i.onMouseMove(r)}),t&2&&(fe("disabled",i.disabled||null)("data-size",i.size)("role",i.role),J("_with-dropdown",i.active))},inputs:{size:"size",role:"role",disabled:"disabled",value:"value"},attrs:vT,ngContentSelectors:pf,decls:3,vars:4,consts:[["base",""],[4,"polymorpheusOutlet","polymorpheusOutletContext"],["class","t-arrow",3,"src",4,"ngIf"],[1,"t-arrow",3,"src"]],template:function(t,i){if(t&1&&(Ve(),T(0,TT,2,1,"ng-container",1)(1,yT,2,1,"ng-template",null,0,de)),t&2){let o=j(2);l("polymorpheusOutlet",i.content||o)("polymorpheusOutletContext",Oi(2,_T,o))}},dependencies:[Ft,Je,ee],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}'],changeDetection:0}),jt([qs(DT)],e.prototype,"onMouseMove",null),e})(),Pn=(()=>{class e{constructor(t,i,o){var r;this.controller=t,this.el=i,this.defaultEmptyContent$=o,this.options=ns,this.role="listbox",this.size=((r=this.controller)===null||r===void 0?void 0:r.size)||"m"}get empty$(){return hd(this.options).pipe(b(({length:t})=>!t))}onFocusIn(t,i){!i.contains(t)&&!this.origin&&(this.origin=t)}noop(){}onKeyDownArrow(t,i){let{elements:o}=this;Za(o.indexOf(t),o,i)}handleFocusLossIfNecessary(t=this.el.nativeElement){this.origin&&li(t)&&sd(this.origin,!0,!0)}getOptions(t=!1){return this.options.filter(({disabled:i})=>t||!i).map(({value:i})=>i).filter(Tn)}onFocus({target:t},i){if(!pt(t))return;let{elements:o}=this;Za(i?-1:o.length,o,i?1:-1),this.handleFocusLossIfNecessary(t)}get elements(){return Array.from(this.el.nativeElement.querySelectorAll("[tuiOption]"))}}return e.\u0275fac=function(t){return new(t||e)(a(kr,8),a(N),a(zp))},e.\u0275cmp=k({type:e,selectors:[["tui-data-list"]],contentQueries:function(t,i,o){if(t&1&&Rn(o,Sn,5),t&2){let r;$e(r=We())&&(i.options=r)}},hostVars:2,hostBindings:function(t,i){t&1&&y("focusin",function(r){return i.onFocusIn(r.relatedTarget,r.currentTarget)})("mousedown.prevent",function(){return i.noop()})("keydown.arrowDown.prevent",function(r){return i.onKeyDownArrow(r.target,1)})("keydown.arrowUp.prevent",function(r){return i.onKeyDownArrow(r.target,-1)})("wheel.silent.passive",function(){return i.handleFocusLossIfNecessary()})("mouseleave",function(r){return i.handleFocusLossIfNecessary(r.target)}),t&2&&fe("role",i.role)("data-list-size",i.size)},inputs:{role:"role",emptyContent:"emptyContent",size:"size"},features:[A([jp(e),ea])],ngContentSelectors:pf,decls:5,vars:3,consts:[["tabindex","0",1,"t-trap",3,"focusin"],["class","t-empty",4,"ngIf"],[1,"t-empty"],[4,"polymorpheusOutlet"]],template:function(t,i){t&1&&(Ve(),g(0,"div",0),y("focusin",function(r){return i.onFocus(r,!0)}),v(),me(1),T(2,MT,3,3,"div",1),R(3,"async"),g(4,"div",0),y("focusin",function(r){return i.onFocus(r,!1)}),v()),t&2&&(h(2),l("ngIf",H(3,1,i.empty$)))},dependencies:[ee,Je,K],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} +`],encapsulation:2,changeDetection:0}),jt([Zt],e.prototype,"empty$",null),e})(),wT=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["ng-template","tuiDataList",""]]}),e})();var hf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["tui-opt-group"]],hostAttrs:["role","group"],hostVars:1,hostBindings:function(t,i){t&2&&fe("data-label",i.label)},inputs:{label:"label"}}),e})(),Yn=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Lt,lt]]}),e})();var IT=["wrapper"],xT=["*"],OT=(e,n)=>({$implicit:e,close:n});function ST(e,n){if(e&1&&(g(0,"div",8),Te(1),v()),e&2){let t=n.polymorpheusOutlet;h(),Ne(" ",t," ")}}function PT(e,n){if(e&1){let t=F();g(0,"div",6,2),y("keydown",function(o){I(t);let r=u(2);return x(r.onKeydown(o))}),T(2,ST,2,1,"div",7),v(),S(3,"div")}if(e&2){u();let t=j(1),i=u();h(2),l("polymorpheusOutlet",i.content)("polymorpheusOutletContext",Jr(2,OT,t,i.close))}}function ET(e,n){if(e&1){let t=F();g(0,"div",4,0),y("tuiActiveZoneChange",function(o){I(t);let r=u();return x(r.onActiveZone(o))})("tuiObscured",function(o){I(t);let r=u();return x(r.onHostObscured(o))}),me(2),T(3,PT,4,5,"ng-template",5,1,de),v()}if(e&2){let t=n.tuiLet,i=j(4),o=u();l("tuiDropdown",i)("tuiDropdownManual",t&&o.canOpen)("tuiDropdownSided",o.sided)("tuiObscuredEnabled",t),h(3),l("polymorpheus",o.context)}}var ff=(()=>{class e extends kt{constructor(){super(...arguments),this.type="dummy"}getPosition(){return[0,0]}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiAccessorProxy",""]],features:[A([{provide:kt,multi:!0,deps:[[new tt,new si,e],e],useFactory:(n,t)=>n||t}]),W]}),e})(),mf=new se("[TUI_HOSTED_DROPDOWN_COMPONENT]"),AT=(()=>{class e{constructor(t,i,o,r){r==null||r.tuiDropdownOpenChange.pipe(et(s=>s&&r.dropdown===o&&!i.focused),re(t)).subscribe(()=>{var s;(s=i.nativeFocusableElement)===null||s===void 0||s.focus(),i.updateOpen(!0)})}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(mf),a(ii,2),a(hl,8))},e.\u0275dir=w({type:e,selectors:[["","tuiDropdownOpenMonitor",""]],features:[A([q])]}),e})(),kT=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiHostedDropdownHost",""]]}),e})();function RT(e){var n;return"key"in e&&e.key.toLowerCase()==="escape"&&this.canOpen&&this.open&&!(!((n=this.dropdown)===null||n===void 0)&&n.nextElementSibling)}var ot=(()=>{class e{constructor(t,i){this.hover$=t,this.el=i,this.openChange$=new Ke(!1),this.hostHover$=wt([pe(this.el.nativeElement,"mouseover").pipe(b(o=>this.computedHost.contains(uo(o))),Fe(o=>{var r,s;return B(o).pipe(ri((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$||Dt]).pipe(b(([o,r])=>o&&r)),this.sided=!1,this.canOpen=!0,this.open$=He(this.openChange$,this.hostHover$).pipe(hn(1),oe(),on()),this.focusedChange=new Pe,this.openChange=this.openChange$,this.close=()=>this.updateOpen(!1)}set open(t){this.openChange.next(t)}get open(){return this.openChange.value}get host(){var t;return((t=this.dropdownHost)===null||t===void 0?void 0:t.nativeElement)||this.el.nativeElement}get computedHost(){var t;return((t=this.dropdownHost)===null||t===void 0?void 0:t.nativeElement)||this.nativeFocusableElement||this.el.nativeElement}get dropdown(){var t,i;return(i=(t=this.dropdownDirective)===null||t===void 0?void 0:t.dropdownBoxRef)===null||i===void 0?void 0:i.location.nativeElement}get nativeFocusableElement(){return rd(this.host)?this.host:Pi({initial:this.host,root:this.el.nativeElement})}get focused(){return li(this.host)||this.open&&!!this.wrapper&&li(this.wrapper.nativeElement)}onFocusInOut(){this.el.nativeElement.classList.toggle("_hosted_dropdown_focused",this.focused)}onFocusIn(t){this.computedHost.contains(t)||this.updateOpen(!1)}onClick(t){var i;!this.hostEditable&&this.computedHost.contains(t)&&!(!((i=this.hover$)===null||i===void 0)&&i.hovered)&&this.updateOpen(!this.open)}onKeyDownEsc(t){t.preventDefault(),this.closeDropdown()}onArrow(t,i){this.focusDropdown(t,i)}onKeydown({key:t,target:i,defaultPrevented:o}){!o&&Fp(t)&&this.hostEditable&&ss(i)&&!cs(i)&&this.focusHost()}onActiveZone(t){this.updateFocused(t),t||this.updateOpen(!1)}onHostObscured(t){t&&this.closeDropdown()}updateOpen(t){(!t||this.canOpen)&&(this.open=t)}get hostEditable(){return cs(this.computedHost)}focusDropdown(t,i){let o=this.nativeFocusableElement;if(!o||!ss(o)||!pt(t.target)||!o.contains(t.target))return;if(!this.wrapper||!this.open||!this.dropdown||!ss(this.wrapper.nativeElement.nextElementSibling)){this.updateOpen(!0),cs(o)||t.preventDefault();return}let r=i?this.wrapper.nativeElement:this.wrapper.nativeElement.nextElementSibling,s=Pi({initial:r,root:this.wrapper.nativeElement,previous:!i});s&&(s.focus(),t.preventDefault())}closeDropdown(){this.focused&&this.focusHost(),this.updateOpen(!1)}focusHost(){let t=this.nativeFocusableElement;t&&t.focus({preventScroll:!0})}updateFocused(t){this.focusedChange.emit(t)}}return e.\u0275fac=function(t){return new(t||e)(a(fl,10),a(N))},e.\u0275cmp=k({type:e,selectors:[["tui-hosted-dropdown"]],contentQueries:function(t,i,o){if(t&1&&Rn(o,kT,5,N),t&2){let r;$e(r=We())&&(i.dropdownHost=r.first)}},viewQuery:function(t,i){if(t&1&&(at(IT,5,N),at(ii,5),at(gt,5)),t&2){let o;$e(o=We())&&(i.wrapper=o.first),$e(o=We())&&(i.dropdownDirective=o.first),$e(o=We())&&(i.activeZone=o.first)}},hostBindings:function(t,i){t&1&&y("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,Ni)("keydown.arrowDown",function(r){return i.onArrow(r,!0)})("keydown.arrowUp",function(r){return i.onArrow(r,!1)})},inputs:{content:"content",sided:"sided",canOpen:"canOpen",open:"open"},outputs:{open$:"openChange",focusedChange:"focusedChange"},features:[A([ei(e),{provide:ff,deps:[[new tt,new fn,kt]],useFactory:n=>n==null?void 0:n[0]},{provide:mf,useExisting:e}])],ngContentSelectors:xT,decls:2,vars:3,consts:[["activeZone","tuiActiveZone"],["dropdown","polymorpheus"],["wrapper",""],["tuiAccessorProxy","","tuiDropdownOpenMonitor","","class","t-wrapper",3,"tuiDropdown","tuiDropdownManual","tuiDropdownSided","tuiObscuredEnabled","tuiActiveZoneChange","tuiObscured",4,"tuiLet"],["tuiAccessorProxy","","tuiDropdownOpenMonitor","",1,"t-wrapper",3,"tuiActiveZoneChange","tuiObscured","tuiDropdown","tuiDropdownManual","tuiDropdownSided","tuiObscuredEnabled"],[3,"polymorpheus"],[1,"t-dropdown",3,"keydown"],["class","t-primitive",4,"polymorpheusOutlet","polymorpheusOutletContext"],[1,"t-primitive"]],template:function(t,i){if(t&1&&(Ve(),T(0,ET,5,5,"div",3),R(1,"async")),t&2){let o;l("tuiLet",(o=H(1,1,i.open$))!==null&&o!==void 0?o:i.openChange.value)}},dependencies:[xt,ff,AT,ii,Ks,Wn,$h,Wh,gt,Cp,ur,Je,K],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}),jt([qs(RT)],e.prototype,"onKeyDownEsc",null),e})(),rt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lt,Ot,yp,yi,vi]]}),e})();function FT(e,n){if(e&1&&S(0,"tui-svg",3),e&2){let t=n.polymorpheusOutlet;l("src",t)}}var gf=(()=>{class e extends Js{constructor(t,i,o,r){super(o),this.isMobile=r,this.mode=null,this.describeId="",i.pipe(re(t)).subscribe(s=>{this.mode=s})}get computedAppearance(){return this.appearance||this.mode||""}stopOnMobile(t){var i;this.isMobile&&(t.preventDefault(),t.stopPropagation()),(i=this.driver$)===null||i===void 0||i.toggle()}}return e.\u0275fac=function(t){return new(t||e)(a(q,2),a(Yi),a(Gn),a(fo))},e.\u0275cmp=k({type:e,selectors:[["tui-tooltip"]],viewQuery:function(t,i){if(t&1&&at(ve,5),t&2){let o;$e(o=We())&&(i.driver$=o.first)}},hostVars:1,hostBindings:function(t,i){t&1&&y("mousedown",function(r){return i.stopOnMobile(r)}),t&2&&fe("data-appearance",i.computedAppearance)},inputs:{content:"content",direction:"direction",appearance:"appearance",showDelay:"showDelay",hideDelay:"hideDelay",describeId:"describeId",context:"context"},features:[A([q,xn]),W],decls:4,vars:11,consts:[["driver","tuiHintHover"],["appearance","icon","automation-id","tui-tooltip__icon","tuiWrapper","",1,"t-tooltip-icon",3,"hover","tuiHint","tuiHintAppearance","tuiHintContext","tuiHintDescribe","tuiHintDirection","tuiHintHideDelay","tuiHintShowDelay"],[3,"src",4,"polymorpheusOutlet"],[3,"src"]],template:function(t,i){if(t&1&&(g(0,"span",1,0),R(2,"async"),T(3,FT,1,1,"tui-svg",2),v()),t&2){let o=j(1);l("hover",H(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),h(3),l("polymorpheusOutlet",i.icon)}},dependencies:[Ft,Ki,be,ke,ve,Se,Ae,Je,K],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}),e})(),vf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Qi,Lt,Le,lt]]}),e})();var HT=["pre"],NT=["focusableElement"],jT=[[["input"]],[["select"]],[["tuiContent"]],"*"],UT=["input","select","tuiContent","*"],Tl=e=>({$implicit:e});function zT(e,n){e&1&&Ut(0)}function BT(e,n){e&1&&Ut(0)}function VT(e,n){e&1&&(g(0,"div",17),me(1,2),v())}function $T(e,n){if(e&1&&S(0,"tui-svg",20),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function WT(e,n){if(e&1&&(g(0,"div",18),T(1,$T,1,1,"tui-svg",19),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.iconLeftContent)("polymorpheusOutletContext",Oi(2,Tl,t.size))}}function GT(e,n){if(e&1&&(g(0,"label",21),me(1,3),v()),e&2){let t=u();J("t-placeholder_raised",t.placeholderRaised),l("for",t.computedId)}}function YT(e,n){if(e&1&&S(0,"tui-svg",24),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function ZT(e,n){if(e&1&&(g(0,"div",22),T(1,YT,1,1,"tui-svg",23),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.controller.customContent)}}function XT(e,n){if(e&1&&S(0,"tui-svg",27),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function qT(e,n){if(e&1){let t=F();g(0,"span",25),y("click.stop",function(){I(t);let o=u();return x(o.clear())}),T(1,XT,1,1,"tui-svg",26),v()}if(e&2){let t=u();h(),l("polymorpheusOutlet",t.iconCleaner||t.controller.options.iconCleaner)("polymorpheusOutletContext",Oi(2,Tl,t.size))}}function KT(e,n){if(e&1&&S(0,"tui-tooltip",28),e&2){let t=u();l("content",t.hintOptions==null?null:t.hintOptions.content)("describeId",t.computedId)}}function QT(e,n){if(e&1&&S(0,"tui-svg",20),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function JT(e,n){if(e&1&&(g(0,"div",29),T(1,QT,1,1,"tui-svg",19),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.iconContent)("polymorpheusOutletContext",Oi(2,Tl,t.size))}}var eC=(()=>{class e{constructor(t,i){this.textfield=t,this.fontsReady$=i,this.prefix$=new Ke(""),this.pre$=He(this.fontsReady$,this.prefix$).pipe(ri(0),et(()=>{var o;return!!(!((o=this.pre)===null||o===void 0)&&o.nativeElement.isConnected)}),b(()=>{var o;return((o=this.pre)===null||o===void 0?void 0:o.nativeElement.offsetWidth)||0}),oe())}get isContextTable(){return this.textfield.appearance===Gi.Table}get value(){return this.textfield.value}get filler(){let{focused:t,placeholder:i,exampleText:o,value:r,textfield:s}=this;return i&&o?"":t?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 t;return((t=this.textfield.nativeFocusableElement)===null||t===void 0?void 0:t.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)?` ${this.textfield.postfix}`:this.textfield.postfix}}return e.\u0275fac=function(t){return new(t||e)(a(ho),a(Dd))},e.\u0275cmp=k({type:e,selectors:[["tui-value-decoration"]],viewQuery:function(t,i){if(t&1&&at(HT,7,N),t&2){let o;$e(o=We())&&(i.pre=o.first)}},hostVars:4,hostBindings:function(t,i){t&1&&y("animationstart",function(){return i.ngDoCheck()}),t&2&&J("_table",i.isContextTable)("_filler",i.filler)},decls:5,vars:4,consts:[["pre",""],[1,"t-prefix",3,"textContent"],[1,"t-ghost",3,"textContent"],[1,"t-filler",3,"textContent"],[1,"t-postfix",3,"textContent"]],template:function(t,i){t&1&&S(0,"span",1,0)(2,"span",2)(3,"span",3)(4,"span",4),t&2&&(l("textContent",i.prefix),h(2),l("textContent",i.value),h(),l("textContent",i.filler),h(),l("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}']}),e})(),tC={s:1.25,m:1.75,l:2.25},_f=(()=>{class e extends dr{constructor(t,i,o,r){super(),this.controller=t,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 Pe,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:t}=this.focusableElement;return t.previousElementSibling||t}get focused(){return li(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 t;return!!(!((t=this.content)===null||t===void 0)&&t.length)}get hasValue(){return!!this.value}get hasCleaner(){return this.controller.cleaner&&this.hasValue&&!this.computedDisabled&&!this.readOnly}get hasTooltip(){var t;return!!(!((t=this.hintOptions)===null||t===void 0)&&t.content)&&!this.computedDisabled}get hasCustomContent(){return!!this.controller.customContent}get placeholderVisible(){var t;let o=(((t=this.nativeFocusableElement)===null||t===void 0?void 0:t.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 Rp(!!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 t;return!!(!((t=this.hintOptions)===null||t===void 0)&&t.content)&&(this.options.hintOnDisabled||!this.computedDisabled)}get name(){var t;return((t=this.nativeFocusableElement)===null||t===void 0?void 0:t.autocomplete)==="cc-exp"?"ccexpiryyear":null}get computedId(){var t;return((t=this.nativeFocusableElement)===null||t===void 0?void 0:t.id)||""}onFocused(t){this.updateFocused(t)}getIndent$(t){return er(t,"scroll").pipe(b(()=>-1*Math.max(t.scrollLeft,0)))}clear(){this.nativeFocusableElement&&(this.nativeFocusableElement.value=""),this.updateValue("")}onMouseDown(t){let{nativeFocusableElement:i}=this;!i||t.target===i||(t.preventDefault(),i.focus())}onModelChange(t){this.updateValue(t)}onAutofilled(t){this.updateAutofilled(t)}detectRetargetFromLabel(t){id(t)&&t.stopImmediatePropagation()}get iconPaddingLeft(){return tC[this.size]}get placeholderRaisable(){return this.size!=="s"&&!this.controller.labelOutside}updateAutofilled(t){this.autofilled!==t&&(this.autofilled=t)}updateValue(t){this.value=t,this.valueChange.emit(t)}}return e.\u0275fac=function(t){return new(t||e)(a(kr),a(Js,8),a(gl),a(N))},e.\u0275cmp=k({type:e,selectors:[["tui-primitive-textfield"]],contentQueries:function(t,i,o){if(t&1&&Rn(o,Je,5),t&2){let r;$e(r=We())&&(i.content=r)}},viewQuery:function(t,i){if(t&1&&at(NT,5),t&2){let o;$e(o=We())&&(i.focusableElement=o.first)}},hostVars:15,hostBindings:function(t,i){t&1&&y("focusin",function(){return i.onFocused(!0)})("focusout",function(){return i.onFocused(!1)}),t&2&&(fe("data-size",i.size),nt("--border-start",i.borderStart,"rem")("--border-end",i.borderEnd,"rem"),J("_autofilled",i.autofilled)("_label-outside",i.controller.labelOutside)("_readonly",i.readOnly)("_invalid",i.computedInvalid)("_hidden",i.inputHidden))},inputs:{editable:"editable",textfieldFiller:[0,"filler","textfieldFiller"],iconCleaner:"iconCleaner",readOnly:"readOnly",invalid:"invalid",disabled:"disabled",textfieldPrefix:[0,"prefix","textfieldPrefix"],textfieldPostfix:[0,"postfix","textfieldPostfix"],value:"value"},outputs:{valueChange:"valueChange"},features:[A([ei(e),ea]),W],ngContentSelectors:UT,decls:24,vars:37,consts:[["focusableElement",""],["decor",""],[4,"ngIf"],["automation-id","tui-primitive-textfield__wrapper","tuiWrapper","",3,"click.prevent.silent","mousedown","tuiAutofilledChange","active","appearance","disabled","focus","hover","invalid","readOnly"],["automation-id","tui-primitive-textfield__native-input","tuiMaskAccessor","",1,"t-input",3,"ngModelChange","disabled","id","ngModel","readOnly","tuiFocusable"],["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"],[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(t,i){if(t&1){let o=F();Ve(jT),T(0,zT,1,0,"ng-container",2),R(1,"async"),T(2,BT,1,0,"ng-container",2),R(3,"async"),g(4,"div",3),R(5,"async"),y("click.prevent.silent",function(s){return I(o),x(i.detectRetargetFromLabel(s))})("mousedown",function(s){return I(o),x(i.onMouseDown(s))})("tuiAutofilledChange",function(s){return I(o),x(i.onAutofilled(s))}),me(6),me(7,1),g(8,"input",4,0),y("ngModelChange",function(s){return I(o),x(i.onModelChange(s))}),v(),T(10,VT,2,0,"div",5),g(11,"div",6),T(12,WT,2,4,"div",7),g(13,"div",8),T(14,GT,2,3,"label",9),g(15,"div",10),S(16,"tui-value-decoration",11,1),R(18,"async"),v()(),g(19,"div",12),T(20,ZT,2,1,"div",13)(21,qT,2,4,"span",14)(22,KT,1,2,"tui-tooltip",15)(23,JT,2,4,"div",16),v()()()}if(t&2){let o=j(9),r=j(17);l("ngIf",H(1,29,i.content==null?null:i.content.changes)),h(2),l("ngIf",H(3,31,i.hintOptions==null?null:i.hintOptions.change$)),h(2),nt("--text-indent",H(5,33,r.pre$),"px"),l("active",i.pseudoActive)("appearance",i.appearance)("disabled",i.disabled)("focus",i.computedFocused)("hover",i.pseudoHover)("invalid",i.computedInvalid)("readOnly",i.readOnly),h(4),l("disabled",i.computedDisabled)("id",i.id)("ngModel",i.value)("readOnly",i.readOnly||!i.editable)("tuiFocusable",i.computedFocusable),fe("aria-invalid",i.computedInvalid)("name",i.name),h(2),l("ngIf",i.inputHidden),h(2),l("ngIf",i.iconLeftContent),h(2),l("ngIf",i.hasPlaceholder),h(2),nt("text-indent",H(18,35,i.getIndent$(o)),"px"),J("t-has-value",i.value),h(4),l("ngIf",i.hasCustomContent),h(),l("ngIf",i.hasCleaner),h(),l("ngIf",i.showHint),h(),l("ngIf",i.iconContent)}},dependencies:[Ft,eC,gf,ee,Ki,dp,ta,ao,co,an,yn,Je,K],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}@supports (-webkit-touch-callout: none){.t-input[_ngcontent-%COMP%]:active{font-size:1rem}}.t-input[inputMode=none][_ngcontent-%COMP%]{caret-color:transparent}.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=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=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]{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%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-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}),jt([Zt],e.prototype,"getIndent$",null),e})(),iC=(()=>{class e extends Qp{constructor(t){super(t),this.textfield=t}get readOnly(){return this.textfield.readOnly||!this.textfield.editable}onValueChange(t){this.textfield.onModelChange(t)}}return e.\u0275fac=function(t){return new(t||e)(a(_f))},e.\u0275dir=w({type:e,selectors:[["tui-primitive-textfield"]],features:[A([qp(e)]),W]}),e})();var nC=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lo,lt,ia,bn,Qi,Lt,vf,pp]]}),e})();var oC=[[["img"]],[["tui-svg"]],"*",[["","tuiButton",""]],[["","tuiLink",""]]],rC=["img","tui-svg","*","[tuiButton]","[tuiLink]"];function sC(e,n){if(e&1){let t=F();g(0,"button",10),R(1,"async"),y("click",function(){I(t);let o=u();return x(o.close.emit())}),v()}if(e&2){let t=u();nt("border-radius",50,"%"),l("icon",t.icons.close)("title",H(1,4,t.closeWord$))}}function aC(e,n){if(e&1&&(S(0,"span",11),R(1,"tuiFormatDate"),R(2,"async")),e&2){let t=u();l("textContent",t.isString(t.timestamp)?t.timestamp:H(2,3,H(1,1,t.timestamp)))}}function cC(e,n){if(e&1&&S(0,"img",8),e&2){let t=u(2);l("src",t.context.image,Kr)}}function lC(e,n){if(e&1&&S(0,"tui-svg",9),e&2){let t=u(2);nt("color",t.context.iconColor),l("src",t.context.icon)}}function uC(e,n){if(e&1&&S(0,"div",10),e&2){let t=n.polymorpheusOutlet;l("innerHTML",t,gn)}}function dC(e,n){if(e&1){let t=F();g(0,"button",11),y("click",function(){I(t);let o=u(2);return x(o.context.$implicit.next(o.context.buttons[0]))}),Te(1),v()}if(e&2){let t=u(2);h(),Ne(" ",t.context.buttons[0]," ")}}function pC(e,n){if(e&1){let t=F();g(0,"button",12),y("click",function(){I(t);let o=u(2);return x(o.context.$implicit.next(o.context.buttons[o.context.buttons.length-1]))}),Te(1),v()}if(e&2){let t=u(2);h(),Ne(" ",t.context.buttons[t.context.buttons.length-1]," ")}}function hC(e,n){if(e&1){let t=F();g(0,"tui-push",2),y("close",function(){I(t);let o=u();return x(o.context.$implicit.complete())}),T(1,cC,1,1,"img",3)(2,lC,1,3,"tui-svg",4)(3,uC,1,1,"div",5)(4,dC,2,1,"button",6)(5,pC,2,1,"button",7),v()}if(e&2){let t=u();l("heading",t.context.heading)("timestamp",t.context.timestamp)("type",t.context.type),h(),l("ngIf",t.context.image),h(),l("ngIf",t.context.icon),h(),l("polymorpheusOutlet",t.context.content)("polymorpheusOutletContext",t.context),h(),l("ngIf",t.context.buttons.length>1),h(),l("ngIf",t.context.buttons.length)}}function fC(e,n){e&1&&Ut(0)}function mC(e,n){if(e&1&&T(0,fC,1,0,"ng-container",13),e&2){let t=u();l("polymorpheusOutlet",t.context.content)}}var gC=(()=>{class e{constructor(t,i){this.closeWord$=t,this.icons=i,this.heading="",this.type="",this.lines=2,this.timestamp="",this.close=new Pe,this.isString=ci}get closeable(){return pd(this.close)}}return e.\u0275fac=function(t){return new(t||e)(a(Ds),a(wo))},e.\u0275cmp=k({type:e,selectors:[["tui-push"]],hostVars:2,hostBindings:function(t,i){t&2&&nt("--t-lines",i.lines)},inputs:{heading:"heading",type:"type",lines:"lines",timestamp:"timestamp"},outputs:{close:"close"},ngContentSelectors:rC,decls:17,vars:4,consts:[[1,"t-image"],["appearance","","size","xs","tuiIconButton","","type","button","class","t-close",3,"icon","border-radius","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","","size","xs","tuiIconButton","","type","button",1,"t-close",3,"click","icon","title"],[1,"t-time",3,"textContent"]],template:function(t,i){t&1&&(Ve(oC),g(0,"div",0),me(1),v(),T(2,sC,2,6,"button",1),g(3,"div",2)(4,"span",3),me(5,1),v(),Te(6),T(7,aC,3,5,"span",4),v(),g(8,"h3",5),Te(9),v(),g(10,"div",6),me(11,2),v(),g(12,"div",7)(13,"span",8),me(14,3),v(),g(15,"span",9),me(16,4),v()()),t&2&&(h(2),l("ngIf",i.closeable),h(4),Ne(" ",i.type," "),h(),l("ngIf",i.timestamp),h(2),Ne(" ",i.heading,` +`))},dependencies:[_e,ee,K,uf],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:var(--t-lines);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})(),vC=(()=>{class e extends Mi{constructor(t){var i;super(),this.modeDirective=t,this.size="s",this.shape=null,this.change$=((i=this.modeDirective)===null||i===void 0?void 0:i.change$)||new Ze}get appearance(){var t;return((t=this.modeDirective)===null||t===void 0?void 0:t.mode)==="onDark"?"accent":"secondary"}}return e.\u0275fac=function(t){return new(t||e)(a(Mi,12))},e.\u0275dir=w({type:e,selectors:[["tui-push"]],features:[A([{provide:Mi,useExisting:e},{provide:_l,useExisting:e}]),W]}),e})(),_C={heading:"",type:"",timestamp:"",image:"",icon:"",iconColor:"",buttons:[]},TC=ce(_C);var CC=(()=>{class e extends ur{constructor(t,i,o,r){super(t,i),this.show$=new Ze,this.show$.pipe(po(()=>r.open(this)),re(o)).subscribe()}set tuiPush(t){this.show$.next(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Kt),a(ft),a(q,2),a(mt(()=>Tf)))},e.\u0275dir=w({type:e,selectors:[["","tuiPush",""]],inputs:{tuiPush:"tuiPush"},features:[A([q]),W]}),e})(),yC=(()=>{class e{constructor(t,i){this.animation=t,this.context=i}get isDirective(){return this.context.content instanceof CC}}return e.\u0275fac=function(t){return new(t||e)(a(Do),a(Ln))},e.\u0275cmp=k({type:e,selectors:[["tui-push-alert"]],hostAttrs:["role","alert"],hostVars:3,hostBindings:function(t,i){t&2&&vn("@tuiFadeIn",i.animation)("@tuiSlideInRight",i.animation)("@tuiHeightCollapse",i.animation)},decls:3,vars:2,consts:[["directive",""],[3,"heading","timestamp","type","close",4,"ngIf","ngIfElse"],[3,"close","heading","timestamp","type"],["alt","",3,"src",4,"ngIf"],[3,"src","color",4,"ngIf"],[3,"innerHTML",4,"polymorpheusOutlet","polymorpheusOutletContext"],["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"],[4,"polymorpheusOutlet"]],template:function(t,i){if(t&1&&T(0,hC,6,9,"tui-push",1)(1,mC,1,1,"ng-template",null,0,de),t&2){let o=j(2);l("ngIf",!i.isDirective)("ngIfElse",o)}},dependencies:[gC,Ft,_e,ra,ee,vC,Je],styles:["[_nghost-%COMP%]{max-width:calc(100% - 2rem);margin:0 1rem 1rem auto}[_nghost-%COMP%]:first-child{margin-top:auto}"],data:{animation:[No,Uh,Nh]},changeDetection:0}),e})(),Tf=(()=>{class e extends hs{constructor(){super(...arguments),this.component=new ui(yC),this.defaultOptions=V(TC)}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),nk=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({providers:[{provide:yd,useExisting:Tf,multi:!0}],imports:[[z,lt,Me,sa,Lt,df]]}),e})();var bC=["focusableElement"],Cf=e=>({$implicit:e});function MC(e,n){if(e&1&&S(0,"tui-loader",7),e&2){let t=u();l("inheritColor",!0)("showLoader",t.value)("size",t.loaderSize)}}function DC(e,n){if(e&1&&S(0,"tui-svg",10),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function wC(e,n){if(e&1&&(g(0,"span",8),T(1,DC,1,1,"tui-svg",9),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.iconOn)("polymorpheusOutletContext",Oi(2,Cf,t.size))}}function IC(e,n){if(e&1&&S(0,"tui-loader",7),e&2){let t=u();l("inheritColor",!0)("showLoader",!t.value)("size",t.loaderSize)}}function xC(e,n){if(e&1&&S(0,"tui-svg",12),e&2){let t=n.polymorpheusOutlet;l("src",t)}}function OC(e,n){if(e&1&&(g(0,"span",8),T(1,xC,1,1,"tui-svg",11),v()),e&2){let t=u();h(),l("polymorpheusOutlet",t.iconOff)("polymorpheusOutletContext",Oi(2,Cf,t.size))}}var SC={icons:{toggleOff({$implicit:e}){return e==="m"?"tuiIconToggleOff":"tuiIconToggleOffLarge"},toggleOn({$implicit:e}){return e==="m"?"tuiIconToggleOn":"tuiIconToggleOnLarge"}},appearances:{checked:Gi.Primary,unchecked:Gi.Secondary},singleColor:!1,showIcons:!1,size:"m"},PC=ce(SC);var Ck=(()=>{class e extends Ai{constructor(t,i,o,r){super(t,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 t,i;return(i=(t=this.focusableElement)===null||t===void 0?void 0:t.nativeElement)!==null&&i!==void 0?i:null}get focused(){return Qt(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 t,i;return(i=(t=this.modeDirective)===null||t===void 0?void 0:t.mode)!==null&&i!==void 0?i:null}onChecked(t){this.value=t}onFocused(t){this.updateFocused(t)}onFocusVisible(t){this.updateFocusVisible(t)}getFallbackValue(){return!1}}return e.\u0275fac=function(t){return new(t||e)(a(zi,10),a(ft),a(Mi,8),a(PC))},e.\u0275cmp=k({type:e,selectors:[["tui-toggle"]],viewQuery:function(t,i){if(t&1&&at(bC,5),t&2){let o;$e(o=We())&&(i.focusableElement=o.first)}},hostVars:4,hostBindings:function(t,i){t&2&&(fe("data-size",i.size)("data-mode",i.hostMode),J("_checked",i.value))},inputs:{singleColor:"singleColor",showIcons:"showIcons",showLoader:"showLoader",size:"size"},features:[A([ei(e),tp(e)]),W],decls:9,vars:16,consts:[["focusableElement",""],["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,"tuiCheckedChange","tuiFocusedChange","tuiFocusVisibleChange","disabled","id","tuiFocusable","tuiChecked"],[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(t,i){if(t&1){let o=F();g(0,"div",1)(1,"div",2),T(2,MC,1,3,"tui-loader",3)(3,wC,2,4,"span",4),S(4,"div",5),T(5,IC,1,3,"tui-loader",3)(6,OC,2,4,"span",4),v(),g(7,"input",6,0),or("tuiCheckedChange",function(s){return I(o),nr(i.value,s)||(i.value=s),x(s)}),y("tuiFocusedChange",function(s){return I(o),x(i.onFocused(s))})("tuiFocusVisibleChange",function(s){return I(o),x(i.onFocusVisible(s))}),v()()}t&2&&(l("active",i.pseudoActive)("appearance",i.appearance)("disabled",i.computedDisabled)("focus",i.computedFocusVisible)("hover",i.pseudoHover)("invalid",i.computedInvalid)("readOnly",i.readOnly),h(2),l("ngIf",i.showLoader),h(),l("ngIf",i.showIcons&&!i.showLoader),h(2),l("ngIf",i.showLoader),h(),l("ngIf",i.showIcons&&!i.showLoader),h(),l("disabled",i.disabled)("id",i.id)("tuiFocusable",i.focusable),ir("tuiChecked",i.value),fe("aria-checked",i.value))},dependencies:[na,Ft,Ki,ee,Je,hp,yn,vs,mp],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}@supports (-webkit-touch-callout: none){.t-checkbox[_ngcontent-%COMP%]:active{font-size:1rem}}._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}),e})(),yf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,_s,bn,Dp,gp,fp,Qi,Lt,oa,lt]]}),e})();var bf=(()=>{class e{constructor(){this.stateChange$=new Ze,this.valueChange$=new Ze}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e}),e})();function EC(e){return Array.isArray(e)&&e.length===1&&e[0].type==="paragraph"&&!e[0].hasOwnProperty("content")}var De=(()=>{class e extends bf{constructor(t){super(),this.editorRef=t,this.editorRef.subscribe(i=>{this.editor=i;let o=()=>{let r=i.getHTML(),s=i.getJSON().content,c=EC(s)?"":r;this.valueChange$.next(c),this.stateChange$.next()};i.on("transaction",o.bind(this)),i.on("update",o.bind(this))})}get isFocused(){return this.editor.isFocused}get html(){return this.editor.getHTML()}get editable(){return this.editor.isEditable}set editable(t){this.editor.setEditable(t,!1)}get state(){return this.editor.state}getOriginTiptapEditor(){return this.editor}undoDisabled(){return!this.editor.can().undo()}redoDisabled(){return!this.editor.can().redo()}getFontColor(){return this.editor.getAttributes("textStyle").fontColor||us}getFontSize(){return parseInt(this.editor.getAttributes("textStyle").fontSize,10)}setFontSize(t){this.editor.chain().setMark("textStyle",{fontSize:Qe(t)}).run()}getBackgroundColor(){var t;return((t=this.editor)===null||t===void 0?void 0:t.getAttributes("textStyle").backgroundColor)||"transparent"}getCellColor(){return this.editor.getAttributes("tableCell").background||this.editor.getAttributes("tableHeader").background}getGroupColor(){var t,i,o,r;if(this.editor.isActive("group")){let s=(i=(t=this.editor.getAttributes("group"))===null||t===void 0?void 0:t.style)!==null&&i!==void 0?i:"",c=Fd(s);return(r=(o=c["background-color"])!==null&&o!==void 0?o:c.background)!==null&&r!==void 0?r:""}return""}onAlign(t){this.editor.chain().focus().setTextAlign(t).run()}setImage(t){this.editor.chain().focus().command(({commands:i,state:o})=>{var r;let s=(r=i.setEditableImage)!==null&&r!==void 0?r:i.setImage;if(s){let c=o.selection.anchor;return s({src:t}),i.setTextSelection(c),!0}return!1}).run()}undo(){this.editor.chain().undo().run()}redo(){this.editor.chain().redo().run()}setHorizontalRule(){this.editor.chain().focus().setHorizontalRule().run()}removeFormat(){this.editor.commands.unsetAllMarks(),this.editor.commands.clearNodes()}setFontColor(t){this.editor.chain().focus().setFontColor(t).run()}setBackgroundColor(t){this.editor.chain().focus().setBackgroundColor(t).run()}toggleUnderline(){this.editor.chain().focus().toggleUnderline().run()}toggleStrike(){this.editor.chain().focus().toggleStrike().run()}toggleOrderedList(){this.editor.chain().focus().toggleOrderedList().run()}toggleUnorderedList(){this.editor.chain().focus().toggleBulletList().run()}togglePre(){this.editor.chain().focus().toggleCodeBlock().run()}toggleTaskList(){this.editor.commands.toggleTaskList()}sinkListItem(){let t=this.editor.isActive("taskList")?"taskItem":"listItem";this.editor.chain().focus().sinkListItem(t).run()}liftListItem(){let t=this.editor.isActive("taskList")?"taskItem":"listItem";this.editor.chain().focus().liftListItem(t).run()}isActive(t){return this.editor.isActive(t)}isActive$(t){return this.stateChange$.pipe(it(null),b(()=>this.isActive(t)),oe())}toggleBold(){this.editor.chain().focus().toggleBold().run()}toggleCode(){this.editor.chain().focus().toggleCode().run()}toggleItalic(){this.editor.chain().focus().toggleItalic().run()}toggleBlockquote(){this.editor.chain().focus().toggleBlockquote().run()}toggleSubscript(){this.editor.chain().focus().toggleSubscript().run()}toggleSuperscript(){this.editor.chain().focus().toggleSuperscript().run()}toggleCodeBlock(){this.editor.chain().focus().toggleCodeBlock().run()}insertTable(t,i){this.editor.chain().focus().insertTable({cols:t,rows:i}).run()}addColumnAfter(){this.editor.chain().focus().addColumnAfter().run()}addColumnBefore(){this.editor.chain().focus().addColumnBefore().run()}addRowAfter(){this.editor.chain().focus().addRowAfter().run()}addRowBefore(){this.editor.chain().focus().addRowBefore().run()}deleteColumn(){this.editor.chain().focus().deleteColumn().run()}deleteRow(){this.editor.chain().focus().deleteRow().run()}mergeCells(){this.editor.chain().focus().mergeCells().run()}splitCell(){this.editor.chain().focus().splitCell().run()}canMergeCells(){return this.editor.can().mergeCells()}canSplitCells(){return this.editor.can().splitCell()}setHeading(t){this.editor.chain().focus().setHeading({level:t}).run()}setParagraph(t){this.editor.chain().focus().setParagraph().run(),t&&this.editor.chain().setMark("textStyle",t).run()}setHardBreak(){this.editor.chain().setHardBreak().run()}setTextSelection(t){this.editor.commands.setTextSelection(t)}toggleLink(t){this.editor.chain().focus().toggleLink({href:t}).run()}setLink(t){this.editor.chain().focus().setLink({href:t}).run()}unsetLink(){this.editor.chain().focus().unsetLink().run()}focus(){this.editor.chain().focus().run()}setValue(t){t===this.html||t===""&&this.html==="

"||(this.editor.commands.setContent(t),this.editor.view.updateState(Ad.create({schema:this.editor.state.schema,doc:this.editor.state.doc,selection:this.editor.state.selection,storedMarks:this.editor.state.storedMarks,plugins:this.editor.state.plugins})))}destroy(){this.editor.destroy()}setCellColor(t){this.editor.chain().focus().setCellBackground(t).run()}selectClosest(){let t=this.editor.state.selection.anchor,{schema:i,doc:o}=this.editor.state,r=kd(o.resolve(t),i.marks.link);r&&this.editor.chain().setTextSelection(r).run()}enter(){this.editor.commands.enter()}setDetails(){this.editor.commands.setDetails()}removeDetails(){this.editor.commands.removeDetails()}setGroup(){this.editor.commands.setGroup()}removeGroup(){this.editor.commands.removeGroup()}setGroupHilite(t){this.editor.commands.setGroupHilite(t)}setAnchor(t){this.editor.commands.setAnchor(t.replace("#",""))}removeAnchor(){this.editor.commands.removeAnchor()}setFileLink(t){this.editor.commands.setFileLink(t)}setYoutubeVideo(t){this.editor.commands.setYoutubeVideo(t)}setIframe(t){this.editor.commands.setIframe(t)}removeEmptyTextStyle(){this.editor.commands.removeEmptyTextStyle()}toggleMark(t,i,o){this.editor.commands.toggleMark(t,i,o)}getHTML(){var t;return(t=this.getOriginTiptapEditor().getHTML())!==null&&t!==void 0?t:""}}return e.\u0275fac=function(t){return new(t||e)(ye(vo))},e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),zo=(()=>{class e{constructor(t,i,o,r,s,c){this.el=t,this.renderer=i,this.editor=o,this.editorContainer=r,this.editorLoaded$=s,this.valueChange=this.editor.valueChange$,this.stateChange=this.editor.stateChange$,this.editorLoaded$.pipe(re(c)).subscribe(()=>{this.renderer.appendChild(this.el.nativeElement,this.editorContainer)})}set value(t){this.editor.setValue(t)}set editable(t){this.editor.editable=t}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(ji),a(De),a(lr),a(vo),a(q,2))},e.\u0275dir=w({type:e,selectors:[["","tuiTiptapEditor",""]],inputs:{value:"value",editable:"editable"},outputs:{valueChange:"valueChange",stateChange:"stateChange"},features:[A([q])]}),e})(),Mf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();function AC(e,n){if(e&1){let t=F();g(0,"div",6)(1,"button",7),y("click",function(){I(t);let o=u(3);return x(o.editor.onAlign("left"))}),v(),g(2,"button",7),y("click",function(){I(t);let o=u(3);return x(o.editor.onAlign("center"))}),v(),g(3,"button",7),y("click",function(){I(t);let o=u(3);return x(o.editor.onAlign("right"))}),v(),g(4,"button",7),y("click",function(){I(t);let o=u(3);return x(o.editor.onAlign("justify"))}),v()()}if(e&2){let t=u().tuiLet,i=u().ngIf,o=u();h(),l("icon",o.options.icons.textAlignLeft)("pseudoActive",!!(t!=null&&t.left))("tuiHint",i.justifyLeft),h(),l("icon",o.options.icons.textAlignCenter)("pseudoActive",!!(t!=null&&t.center))("tuiHint",i.justifyCenter),h(),l("icon",o.options.icons.textAlignRight)("pseudoActive",!!(t!=null&&t.right))("tuiHint",i.justifyRight),h(),l("icon",o.options.icons.textAlignJustify)("pseudoActive",!!(t!=null&&t.justify))("tuiHint",i.justifyFull)}}function kC(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",4,0),S(2,"button",5),T(3,AC,5,12,"ng-template",null,1,de),v()),e&2){let t=j(1),i=j(4),o=u().ngIf,r=u();l("content",i),h(2),l("focusable",t.open)("icon",r.options.icons.textAlignPreview)("pseudoActive",t.open)("tuiHint",o.justify)}}function RC(e,n){if(e&1&&(Ie(0),T(1,kC,5,5,"tui-hosted-dropdown",3),R(2,"async"),xe()),e&2){let t=u();h(),l("tuiLet",H(2,1,t.alignState$))}}var Df=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.alignState$=wt([this.editor.isActive$({textAlign:"left"}),this.editor.isActive$({textAlign:"right"}),this.editor.isActive$({textAlign:"center"}),this.editor.isActive$({textAlign:"justify"})]).pipe(b(([r,s,c,d])=>({left:r,right:s,center:c,justify:d})))}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-align-content"]],decls:2,vars:3,consts:[["align",""],["alignDropdown",""],[4,"ngIf"],[3,"content",4,"tuiLet"],[3,"content"],["appearance","icon","automation-id","toolbar__align-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[1,"t-dropdown"],["appearance","icon","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","pseudoActive","tuiHint"]],template:function(t,i){t&1&&(T(0,RC,3,3,"ng-container",2),R(1,"async")),t&2&&l("ngIf",H(1,1,i.texts$))},dependencies:[ot,_e,ee,xt,Ae,be,ke,ve,Se,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),wf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Le,Ot]]}),e})();function FC(e,n){if(e&1){let t=F();g(0,"button",5),y("click",function(){let o=I(t).index,r=u(2);return x(r.onCode(!!o))}),Te(1),v()}if(e&2){let t=n.$implicit;h(),Ne(" ",t," ")}}function LC(e,n){if(e&1&&(g(0,"tui-data-list"),T(1,FC,2,1,"button",4),R(2,"async"),v()),e&2){let t=u();h(),l("ngForOf",H(2,1,t.codeOptionsTexts$))}}var If=(()=>{class e{constructor(t,i,o,r){this.options=t,this.editor=i,this.texts$=o,this.codeOptionsTexts$=r,this.hintText$=this.texts$.pipe(b(s=>s.code)),this.insideCode$=this.editor.stateChange$.pipe(b(()=>this.editor.isActive("code")||this.editor.isActive("codeBlock")),oe())}onCode(t){t?this.editor.toggleCodeBlock():this.editor.toggleCode()}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be),a(Yd))},e.\u0275cmp=k({type:e,selectors:[["tui-code"]],decls:7,vars:9,consts:[["codes",""],["codesDropdown",""],[3,"content"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["tuiOption","",3,"click",4,"ngFor","ngForOf"],["tuiOption","",3,"click"]],template:function(t,i){if(t&1&&(g(0,"tui-hosted-dropdown",2,0),S(2,"button",3),R(3,"async"),R(4,"async"),T(5,LC,3,3,"ng-template",null,1,de),v()),t&2){let o=j(1),r=j(6);l("content",r),h(2),l("focusable",o.open)("icon",i.options.icons.code)("pseudoActive",o.open||H(3,5,i.insideCode$))("tuiHint",H(4,7,i.hintText$))}},dependencies:[ot,_e,Pn,Sn,Ae,be,ke,ve,Se,Ui,K],encapsulation:2,changeDetection:0}),e})(),xf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Le,Yn]]}),e})();function HC(e,n){if(e&1){let t=F();g(0,"button",1),y("click",function(){I(t);let o=u();return x(o.setDetails())}),v()}if(e&2){let t=n.ngIf,i=u();l("focusable",!1)("icon",i.options.icons.detailsAdd)("tuiHint",t.setDetails)}}function NC(e,n){if(e&1){let t=F();g(0,"button",1),R(1,"async"),y("click",function(){I(t);let o=u();return x(o.removeDetails())}),v()}if(e&2){let t=n.ngIf,i=u();l("disabled",!!H(1,4,i.disabled$))("focusable",!1)("icon",i.options.icons.detailsRemove)("tuiHint",t.removeDetails)}}var Of=(()=>{class e{constructor(t,i,o){this.editor=t,this.texts$=i,this.options=o}setDetails(){this.editor.setDetails()}}return e.\u0275fac=function(t){return new(t||e)(a(De),a(Be),a(Ee))},e.\u0275cmp=k({type:e,selectors:[["tui-details"]],decls:2,vars:3,consts:[["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"click","focusable","icon","tuiHint"]],template:function(t,i){t&1&&(T(0,HC,1,3,"button",0),R(1,"async")),t&2&&l("ngIf",H(1,1,i.texts$))},dependencies:[_e,ee,Ae,be,ke,ve,Se,K],encapsulation:2,changeDetection:0}),e})(),Sf=(()=>{class e{constructor(t,i,o){this.editor=t,this.texts$=i,this.options=o,this.disabled$=this.editor.stateChange$.pipe(b(()=>!this.editor.isActive("details")),oe())}removeDetails(){this.editor.removeDetails()}}return e.\u0275fac=function(t){return new(t||e)(a(De),a(Be),a(Ee))},e.\u0275cmp=k({type:e,selectors:[["tui-details-remove"]],decls:2,vars:3,consts:[["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"click","disabled","focusable","icon","tuiHint"]],template:function(t,i){t&1&&(T(0,NC,2,6,"button",0),R(1,"async")),t&2&&l("ngIf",H(1,1,i.texts$))},dependencies:[_e,ee,Ae,be,ke,ve,Se,K],encapsulation:2,changeDetection:0}),e})(),Pf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Me,Le]]}),e})();var Ef=()=>({});function jC(e,n){if(e&1){let t=F();g(0,"button",5),R(1,"lowercase"),y("click",function(){let o=I(t).$implicit,r=u(2);return x(r.setFontOption(o))}),Te(2),v()}if(e&2){let t=n.$implicit;nt("font-family",t.family)("font-size",t.px,"px")("font-weight",t.weight),l("ngClass",(t==null?null:t.ngClass)||Ba(12,Ef))("ngStyle",(t==null?null:t.ngStyle)||Ba(13,Ef)),fe("automation-id","tui_font__"+H(1,10,t.name||"")),h(2),Ne(" ",t.name," ")}}function UC(e,n){if(e&1&&(g(0,"tui-data-list"),T(1,jC,3,14,"button",4),R(2,"async"),v()),e&2){let t=u();h(),l("ngForOf",H(2,1,t.fontsOptions$))}}var Af=(()=>{class e{constructor(t,i,o,r){this.options=t,this.editor=i,this.texts$=o,this.fontOptionsTexts$=r,this.fontsOptions$=this.fontOptionsTexts$.pipe(b(s=>this.options.fontOptions(s))),this.fontText$=this.texts$.pipe(b(s=>s.font))}onClick({headingLevel:t,px:i}){this.setFontOption({headingLevel:t,px:i})}setFontOption({headingLevel:t,px:i}){let o=this.editor.getFontColor();this.clearPreviousTextStyles(),t?this.editor.setHeading(t):this.editor.setParagraph({fontSize:Qe(i||0)}),o!==us&&this.editor.setFontColor(o)}clearPreviousTextStyles(){this.editor.removeEmptyTextStyle(),this.editor.toggleMark("textStyle")}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be),a(Zd))},e.\u0275cmp=k({type:e,selectors:[["tui-font-size"]],decls:6,vars:7,consts:[["fonts",""],["fontsDropdown",""],[3,"content"],["appearance","icon","automation-id","toolbar__font-size-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],["tuiOption","",3,"ngClass","ngStyle","fontFamily","fontSize","fontWeight","click",4,"ngFor","ngForOf"],["tuiOption","",3,"click","ngClass","ngStyle"]],template:function(t,i){if(t&1&&(g(0,"tui-hosted-dropdown",2,0),S(2,"button",3),R(3,"async"),T(4,UC,3,3,"ng-template",null,1,de),v()),t&2){let o=j(1),r=j(5);l("content",r),h(2),l("focusable",o.open)("icon",i.options.icons.fontSize)("pseudoActive",o.open)("tuiHint",H(3,5,i.fontText$))}},dependencies:[ot,_e,Pn,Sn,Ae,be,ke,ve,Se,Ui,Hu,Nu,K,Uu],encapsulation:2,changeDetection:0}),e})(),kf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Le,Yn]]}),e})();function zC(e,n){if(e&1){let t=F();g(0,"button",8),y("click",function(){I(t);let o=u(4);return x(o.editor.toggleBold())}),v()}if(e&2){let t=u(2).ngIf,i=u().ngIf,o=u();l("icon",o.options.icons.fontStyleBold)("pseudoActive",t.bold)("tuiHint",i.bold)}}function BC(e,n){if(e&1){let t=F();g(0,"button",8),y("click",function(){I(t);let o=u(4);return x(o.editor.toggleItalic())}),v()}if(e&2){let t=u(2).ngIf,i=u().ngIf,o=u();l("icon",o.options.icons.fontStyleItalic)("pseudoActive",t.italic)("tuiHint",i.italic)}}function VC(e,n){if(e&1){let t=F();g(0,"button",8),y("click",function(){I(t);let o=u(4);return x(o.editor.toggleUnderline())}),v()}if(e&2){let t=u(2).ngIf,i=u().ngIf,o=u();l("icon",o.options.icons.fontStyleUnderline)("pseudoActive",t.underline)("tuiHint",i.underline)}}function $C(e,n){if(e&1){let t=F();g(0,"button",8),y("click",function(){I(t);let o=u(4);return x(o.editor.toggleStrike())}),v()}if(e&2){let t=u(2).ngIf,i=u().ngIf,o=u();l("icon",o.options.icons.fontStyleStrike)("pseudoActive",t.strike)("tuiHint",i.strikeThrough)}}function WC(e,n){if(e&1&&(g(0,"div",6),T(1,zC,1,3,"button",7)(2,BC,1,3,"button",7)(3,VC,1,3,"button",7)(4,$C,1,3,"button",7),v()),e&2){let t=u(3);h(),l("ngIf",t.isEnabled(t.editorTool.Bold)),h(),l("ngIf",t.isEnabled(t.editorTool.Italic)),h(),l("ngIf",t.isEnabled(t.editorTool.Underline)),h(),l("ngIf",t.isEnabled(t.editorTool.Strikethrough))}}function GC(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",4,0),S(2,"button",5),T(3,WC,5,4,"ng-template",null,1,de),v()),e&2){let t=n.ngIf,i=j(1),o=j(4),r=u().ngIf,s=u();l("content",o),h(2),l("focusable",i.open)("icon",s.options.icons.fontStylePreview)("pseudoActive",i.open||t.bold||t.italic||t.underline||t.strike)("tuiHint",r.fontStyle)}}function YC(e,n){if(e&1&&(Ie(0),T(1,GC,5,5,"tui-hosted-dropdown",3),R(2,"async"),xe()),e&2){let t=u();h(),l("ngIf",H(2,1,t.fontStyleState$))}}var Rf=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.toolsSet=new Set(go),this.editorTool=It,this.fontStyleState$=wt([this.editor.isActive$("bold"),this.editor.isActive$("italic"),this.editor.isActive$("underline"),this.editor.isActive$("strike")]).pipe(b(([r,s,c,d])=>({bold:r,italic:s,underline:c,strike:d})))}set enabledTools(t){this.toolsSet=new Set(t)}isEnabled(t){return this.toolsSet.has(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-font-style"]],inputs:{enabledTools:"enabledTools"},decls:2,vars:3,consts:[["format",""],["formatDropdown",""],[4,"ngIf"],[3,"content",4,"ngIf"],[3,"content"],["appearance","icon","automation-id","toolbar__font-style-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[1,"t-dropdown"],["appearance","icon","size","s","tuiIconButton","","type","button","class","t-option t-option_margin",3,"icon","pseudoActive","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","pseudoActive","tuiHint"]],template:function(t,i){t&1&&(T(0,YC,3,3,"ng-container",2),R(1,"async")),t&2&&l("ngIf",H(1,1,i.texts$))},dependencies:[ot,_e,ee,Ae,be,ke,ve,Se,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),Ff=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Le]]}),e})();var Lf=(()=>{class e{constructor(t,i,o){this.editor=t,this.texts$=i,this.options=o,this.insertGroupText$=this.texts$.pipe(b(r=>r.insertGroup)),this.removeGroupText$=this.texts$.pipe(b(r=>r.removeGroup)),this.disabled$=this.editor.stateChange$.pipe(b(()=>!this.editor.isActive("group")),oe())}addGroup(){this.editor.setGroup()}removeGroup(){this.editor.removeGroup()}}return e.\u0275fac=function(t){return new(t||e)(a(De),a(Be),a(Ee))},e.\u0275cmp=k({type:e,selectors:[["tui-editor-group-tool"]],decls:5,vars:13,consts:[["appearance","icon","automation-id","toolbar__group-add-button","size","s","tuiHintDescribe","","tuiIconButton","","type","button",3,"click","focusable","icon","tuiHint"],["appearance","icon","automation-id","toolbar__group-remove-button","size","s","tuiHintDescribe","","tuiIconButton","","type","button",3,"click","disabled","focusable","icon","tuiHint"]],template:function(t,i){t&1&&(g(0,"button",0),R(1,"async"),y("click",function(){return i.addGroup()}),v(),g(2,"button",1),R(3,"async"),R(4,"async"),y("click",function(){return i.removeGroup()}),v()),t&2&&(l("focusable",!1)("icon",i.options.icons.groupAdd)("tuiHint",H(1,7,i.insertGroupText$)),h(2),l("disabled",!!H(3,9,i.disabled$))("focusable",!1)("icon",i.options.icons.groupRemove)("tuiHint",H(4,11,i.removeGroupText$)))},dependencies:[_e,Ae,be,ke,ve,Se,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),Hf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Me,Le]]}),e})();function Nf(e,n){return e?dd(e).pipe(b(t=>n?n.fromControlValue(t):t)):B(null)}var ZC=new se("[TUI_CALENDAR_DATE_STREAM]");function j2(e){return{provide:ZC,deps:[[new tt,new fn,zi],[new tt,e]],useFactory:Nf}}var XC={[f.AD]:"+376###-###",[f.AE]:"+971-##-###-####",[f.AF]:"+93##-###-####",[f.AG]:"+1(268) ###-####",[f.AI]:"+1(264) ###-####",[f.AL]:"+355(###) ###-###",[f.AM]:"+374##-###-###",[f.AO]:"+244(###) ###-###",[f.AR]:"+54(###) ####-####",[f.AT]:"+43(###) ###-####",[f.AU]:"+61#-####-####",[f.AW]:"+297###-####",[f.AZ]:"+994##-###-##-##",[f.BA]:"+387 ###-####-##",[f.BB]:"+1(246) ###-####",[f.BD]:"+880##-###-###",[f.BE]:"+32(###) ###-###",[f.BF]:"+226##-##-####",[f.BG]:"+359(###) ###-###",[f.BH]:"+973####-####",[f.BI]:"+257##-##-####",[f.BJ]:"+229##-##-####",[f.BL]:"+590 ## ## ## ## ##",[f.BM]:"+1(441) ###-####",[f.BN]:"+673###-####",[f.BO]:"+591#-###-####",[f.BQ]:"+599-###-####",[f.BR]:"+55(##) ####-#####",[f.BS]:"+1(242) ###-####",[f.BT]:"+975#-###-###",[f.BW]:"+267##-###-###",[f.BY]:"+375(##) ###-##-##",[f.BZ]:"+501###-####",[f.CA]:"+1(###) ###-####",[f.CD]:"+243(###) ###-###",[f.CF]:"+236-##-##-####",[f.CG]:"+242##-###-####",[f.CH]:"+41##-###-####",[f.CI]:"+225##-##-###-###",[f.CL]:"+56#-####-####",[f.CM]:"+237#####-####",[f.CN]:"+86(###) ####-####",[f.CO]:"+57(###) ###-####",[f.CR]:"+506####-####",[f.CU]:"+53#-###-####",[f.CV]:"+238(###) ##-##",[f.CW]:"+5999-###-####",[f.CY]:"+357##-###-###",[f.CZ]:"+420(###) ###-###",[f.DE]:"+49(###) ###-###-##",[f.DJ]:"+253##-##-##-##",[f.DK]:"+45##-##-##-##",[f.DM]:"+1(767) ###-####",[f.DO]:"+1(###) ###-####",[f.DZ]:"+213##-###-####",[f.EC]:"+593##-###-####",[f.EE]:"+372####-####",[f.EG]:"+20(###) ###-####",[f.ER]:"+291#-###-###",[f.ES]:"+34(###) ###-###",[f.ET]:"+251##-###-####",[f.FI]:"+358(###) ###-##-##",[f.FJ]:"+679##-#####",[f.FK]:"+500#####",[f.FM]:"+691###-####",[f.FR]:"+33 ## ## ## ## ##",[f.GA]:"+241##-##-##-##",[f.GB]:"+44##-####-####",[f.GD]:"+1(473) ###-####",[f.GE]:"+995(###) ###-###",[f.GF]:"+594 ## ## ## ## ##",[f.GH]:"+233(###) ###-###",[f.GI]:"+350###-#####",[f.GL]:"+299##-##-##",[f.GM]:"+220(###) ##-##",[f.GN]:"+224##-###-###",[f.GP]:"+590 ## ## ## ## ##",[f.GQ]:"+240##-###-####",[f.GR]:"+30(###) ###-####",[f.GT]:"+502#-###-####",[f.GW]:"+245#-######",[f.GY]:"+592###-####",[f.HK]:"+852####-####",[f.HN]:"+504####-####",[f.HR]:"+385##-###-####",[f.HT]:"+509##-##-####",[f.HU]:"+36(###) ###-###",[f.ID]:"+62(###) ###-##-###",[f.IE]:"+353(###) ###-###",[f.IL]:"+972##-###-####",[f.IN]:"+91(####) ###-###",[f.IQ]:"+964(###) ###-####",[f.IR]:"+98(###) ###-####",[f.IS]:"+354###-####",[f.IT]:"+39(###) ####-###",[f.JM]:"+1(876) ###-####",[f.JO]:"+962#-####-####",[f.JP]:"+81-##-####-####",[f.KE]:"+254###-######",[f.KG]:"+996(###) ###-###",[f.KH]:"+855##-###-###",[f.KM]:"+269##-#####",[f.KN]:"+1(869) ###-####",[f.KP]:"+850####-#############",[f.KR]:"+82##-###-####",[f.KW]:"+965####-####",[f.KY]:"+1(345) ###-####",[f.KZ]:"+7(###) ###-##-##",[f.LA]:"+856##-##-###-###",[f.LB]:"+961##-###-###",[f.LC]:"+1(758) ###-####",[f.LI]:"+423(###) ###-####",[f.LK]:"+94##-###-####",[f.LR]:"+231##-###-###",[f.LS]:"+266#-###-####",[f.LT]:"+370(###) ##-###",[f.LU]:"+352(###) ###-###",[f.LV]:"+371##-###-###",[f.LY]:"+218##-###-####",[f.MA]:"+212##-####-###",[f.MC]:"+377###-###-###",[f.MD]:"+373####-####",[f.ME]:"+382##-###-###",[f.MF]:"+590 ## ## ## ## ##",[f.MG]:"+261##-##-#####",[f.MK]:"+389##-###-###",[f.ML]:"+223##-##-####",[f.MM]:"+95##-###-###",[f.MN]:"+976##-##-####",[f.MO]:"+853####-####",[f.MQ]:"+596 ## ## ## ## ##",[f.MR]:"+222##-##-####",[f.MS]:"+1(664) ###-####",[f.MT]:"+356####-####",[f.MU]:"+230####-####",[f.MV]:"+960###-####",[f.MW]:"+265#-####-####",[f.MX]:"+52(###) ###-####",[f.MY]:"+60(###) ###-###",[f.MZ]:"+258##-###-###",[f.NA]:"+264##-###-####",[f.NC]:"+687 ### ###",[f.NE]:"+227##-##-####",[f.NG]:"+234(###) ###-####",[f.NI]:"+505####-####",[f.NL]:"+31##-###-####",[f.NO]:"+47(###) ##-###",[f.NP]:"+977##-###-###",[f.NZ]:"+64(###) ###-####",[f.OM]:"+968##-###-###",[f.PA]:"+507###-####",[f.PE]:"+51(###) ###-###",[f.PF]:"+689 ## ## ## ##",[f.PG]:"+675(###) ##-###",[f.PH]:"+63(###) ###-####",[f.PK]:"+92(###) ###-####",[f.PL]:"+48(###) ###-###",[f.PT]:"+351##-###-####",[f.PW]:"+680###-####",[f.PY]:"+595(###) ###-###",[f.QA]:"+974####-####",[f.RE]:"+262 ## ## ## ## ##",[f.RO]:"+40##-###-####",[f.RS]:"+381##-###-####",[f.RU]:"+7### ###-##-##",[f.RW]:"+250(###) ###-###",[f.SA]:"+966#-####-####",[f.SB]:"+677###-####",[f.SC]:"+248#-###-###",[f.SD]:"+249##-###-####",[f.SE]:"+46##-###-####",[f.SG]:"+65####-####",[f.SH]:"+290####",[f.SI]:"+386##-###-###",[f.SK]:"+421(###) ###-###",[f.SL]:"+232##-######",[f.SM]:"+378####-######",[f.SN]:"+221##-###-####",[f.SO]:"+252##-###-###",[f.SR]:"+597###-####",[f.ST]:"+239##-#####",[f.SV]:"+503##-##-####",[f.SX]:"+1(721) ###-####",[f.SY]:"+963##-####-###",[f.SZ]:"+268##-##-####",[f.TC]:"+1(649) ###-####",[f.TD]:"+235##-##-##-##",[f.TG]:"+228##-###-###",[f.TH]:"+66##-###-####",[f.TJ]:"+992##-###-####",[f.TL]:"+670###-#####",[f.TM]:"+993#-###-####",[f.TN]:"+216##-###-###",[f.TO]:"+676#####",[f.TR]:"+90(###) ###-####",[f.TT]:"+1(868) ###-####",[f.TW]:"+886#-####-####",[f.TZ]:"+255##-###-####",[f.UA]:"+380(##) ###-##-##",[f.UG]:"+256(###) ###-###",[f.US]:"+1(###) ###-####",[f.UY]:"+598#-###-##-##",[f.UZ]:"+998##-###-####",[f.VC]:"+1(784) ###-####",[f.VE]:"+58(###) ###-####",[f.VG]:"+1(284)###-####",[f.VN]:"+84(###) ####-###",[f.VU]:"+678##-#####",[f.WS]:"+685##-####",[f.XK]:"+383##-###-###",[f.YE]:"+967###-###-###",[f.YT]:"+262 ## ## ## ## ##",[f.ZA]:"+27##-###-####",[f.ZM]:"+260##-###-####",[f.ZW]:"+263#-######"},U2=ce(XC);var z2=new se("[TUI_DATE_VALUE_TRANSFORMER]"),B2=new se("[TUI_DATE_RANGE_VALUE_TRANSFORMER]"),V2=new se("[TUI_DATE_TIME_VALUE_TRANSFORMER]"),$2=X(ze("prompt")),W2=X(ze("cancel")),G2=X(ze("done")),Y2=X(ze("more")),Z2=X(ze("hide")),X2=X(ze("showAll")),q2=X(ze("otherDate")),K2=X(ze("mobileCalendarTexts")),Q2=X(ze("range")),J2=X(ze("countTexts")),eR=X(ze("time")),tR=X(ze("dateTexts")),iR=X(ze("digitalInformationUnits")),nR=X(ze("copyTexts")),oR=X(ze("passwordTexts")),rR=X(ze("shortCalendarMonths")),sR=X(ze("fileTexts")),aR=X(ze("pagination")),cR=X(ze("inputFileTexts")),lR=X(ze("multiSelectTexts")),uR=X(ze("countries")),qC={icon:({$implicit:e})=>e==="s"?"tuiIconCalendar":"tuiIconCalendarLarge",min:dc,max:Op,nativePicker:!1},dR=ce(qC);var KC={stringify:$u,identityMatcher:Wu,disabledItemHandler:cn},pR=ce(KC);var hR=new se("[TUI_MOBILE_CALENDAR]"),fR=new se("[TUI_MONTH_FORMATTER]"),mR=ce(24),gR=ce({});var Wf=e=>e.querySelector("input,textarea")||e,Lr={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"},Cl=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 t=this.now.value!==n.value,i=this.now.selection.some((o,r)=>o!==n.selection[r]);!t&&!i||(t&&(this.past.push(this.now),this.future=[]),this.now=n)}updateElement(n,t){this.now=n,this.updateElementState(n,{inputType:t,data:null})}};function QC(e,...n){return n.every(({value:t})=>t===e.value)}function JC(e,...n){return n.every(({value:t,selection:i})=>t===e.value&&i[0]===e.selection[0]&&i[1]===e.selection[1])}function ey({value:e,selection:n},t,i){let[o,r]=n,s=typeof i=="function"?i({value:e,selection:n}):i;return{value:e,selection:s==="replace"?[o,o+t.length]:[o,r]}}function ua(e){return typeof e=="string"}function jf(e,n,t,i){let o="";for(let r=n.length;r{let o=n[i];return ua(o)?t===o:t.match(o)}):n.test(e)}function ty(e,n,t){let i=null,o=null,r=Array.from(e.value).reduce((c,d,p)=>{let _=jf(n,c,d,t),C=c+_,O=n[C.length];return ua(O)?C+O:d.match(O)?(i===null&&p>=e.selection[0]&&(i=C.length),o===null&&p>=e.selection[1]&&(o=C.length),C+d):C},""),s=jf(n,r,"",t);return{value:Gf(r+s,n)?r+s:r,selection:[i??r.length,o??r.length]}}function iy({value:e,selection:n},t){let[i,o]=n,r=i,s=o;return{value:Array.from(e).reduce((d,p,_)=>{let C=d+p;return i===_&&(r=d.length),o===_&&(s=d.length),C.match(t)?C:d},""),selection:[r,s]}}function aa(e,n,t=null){if(Gf(e.value,n))return e;let{value:i,selection:o}=Array.isArray(n)?ty(e,n,t):iy(e,n);return{selection:o,value:Array.isArray(n)?i.slice(0,n.length):i}}function Uf(e,n){if(!Array.isArray(n))return e;let[t,i]=e.selection,o=[],r=Array.from(e.value).reduce((s,c,d)=>{let p=n[d];return d===t&&o.push(s.length),d===i&&o.push(s.length),ua(p)&&p===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 Fr=class{constructor(n,t){this.initialElementState=n,this.maskOptions=t,this.value="",this.selection=[0,0];let{value:i,selection:o}=aa(n,this.getMaskExpression(n));this.value=i,this.selection=o}addCharacters([n,t],i){let{value:o}=this,r=this.getMaskExpression({value:o.slice(0,n)+i+o.slice(t),selection:[n+i.length,n+i.length]}),s={value:o,selection:[n,t]},c=Uf(s,r),[d,p]=ey(c,i,this.maskOptions.overwriteMode).selection,_=c.value.slice(0,d)+i,C=_.length,O=aa({value:_+c.value.slice(p),selection:[C,C]},r,s);if(o.slice(0,d)===aa({value:_,selection:[C,C]},r,s).value||JC(this,O))throw new Error("Invalid mask value");this.value=O.value,this.selection=O.selection}deleteCharacters([n,t]){if(n===t||!t)return;let{value:i}=this,o=this.getMaskExpression({value:i.slice(0,n)+i.slice(t),selection:[n,n]}),r={value:i,selection:[n,t]},s=Uf(r,o),[c,d]=s.selection,p=s.value.slice(0,c)+s.value.slice(d),_=aa({value:p,selection:[c,c]},o,r);this.value=_.value,this.selection=_.selection}getMaskExpression(n){let{mask:t}=this.maskOptions;return typeof t=="function"?t(n):t}},yl=class{constructor(n){this.element=n,this.listeners=[]}listen(n,t,i){let o=t;this.element.addEventListener(n,o,i),this.listeners.push(()=>this.element.removeEventListener(n,o))}destroy(){this.listeners.forEach(n=>n())}};function Rr(e,n,t){return e.ctrlKey===!!(n&1)&&e.altKey===!!(n&2)&&e.shiftKey===!!(n&4)&&e.metaKey===!!(n&8)&&e.keyCode===t}function ny(e){return Rr(e,1,89)||Rr(e,5,90)||Rr(e,12,90)}function oy(e){return Rr(e,1,90)||Rr(e,8,90)}function ry(e){return"onbeforeinput"in e}function sy({key:e,ctrlKey:n,metaKey:t,altKey:i}){let o=n||t||i,r=/^.$/u.test(e);return!o&&e!=="Backspace"&&r}function ay({value:e,selection:n},t){let[i,o]=n;if(i!==o)return[i,o];let r=t?e.slice(i).indexOf(` `)+1||e.length:e.slice(0,o).lastIndexOf(` -`)+1;return[t?i:r,t?r:o]}function zf({value:e,selection:n},t){let[i,o]=n;return i!==o?[i,o]:(t?[i,o+1]:[i-1,o]).map(s=>Math.min(Math.max(s,0),e.length))}var Bf=/\s+$/g,Vf=/^\s+/g,$f=/\s/;function cy({value:e,selection:n},t){let[i,o]=n;if(i!==o)return[i,o];if(t){let d=e.slice(i),[p]=d.match(Vf)||[""],_=d.replace(Vf,"").search($f);return[i,_!==-1?i+p.length+_:e.length]}let r=e.slice(0,o),[s]=r.match(Bf)||[""],c=r.replace(Bf,"").split("").reverse().findIndex(d=>d.match($f));return[c!==-1?o-s.length-c:0,o]}function ca(e=[]){return(n,...t)=>e.reduce((i,o)=>Object.assign(Object.assign({},i),o(i,...t)),n)}function Yf(e,n){let t=Object.assign(Object.assign({},Lr),n),i=ca(t.preprocessors),o=ca(t.postprocessors),r=typeof e=="string"?{value:e,selection:[0,0]}:e,{elementState:s}=i({elementState:r,data:""},"validation"),c=new Fr(s,t),{value:d,selection:p}=o(c,r);return typeof e=="string"?d:{value:d,selection:p}}var la=class extends Cl{constructor(n,t){super(),this.element=n,this.maskitoOptions=t,this.isTextArea=this.element.nodeName==="TEXTAREA",this.eventListener=new yl(this.element),this.options=Object.assign(Object.assign({},Lr),this.maskitoOptions),this.preprocessor=ca(this.options.preprocessors),this.postprocessor=ca(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(ny(i))return i.preventDefault(),this.redo();if(oy(i))return i.preventDefault(),this.undo()}),ry(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:zf(this.elementState,o)});case"deleteWordForward":case"deleteWordBackward":return this.handleDelete({event:i,isForward:o,selection:cy(this.elementState,o),force:!0});case"deleteSoftLineBackward":case"deleteSoftLineForward":case"deleteHardLineBackward":case"deleteHardLineForward":return this.handleDelete({event:i,isForward:o,selection:ay(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:t,selectionEnd:i}=this.element;return{value:n,selection:[t||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:t},i={inputType:"insertText",data:null}){let o=this.elementState.value;this.updateValue(n),this.updateSelectionRange(t),o!==n&&this.dispatchInputEvent(i)}updateSelectionRange([n,t]){var i,o;(this.element.selectionStart!==n||this.element.selectionEnd!==t)&&((o=(i=this.element).setSelectionRange)===null||o===void 0||o.call(i,n,t))}updateValue(n){this.element.value=n}ensureValueFitsMask(){this.updateElementState(Yf(this.elementState,this.options))}dispatchInputEvent(n={inputType:"insertText",data:null}){let t=typeof window<"u"?window:globalThis;t!=null&&t.InputEvent&&this.element.dispatchEvent(new InputEvent("input",Object.assign(Object.assign({},n),{bubbles:!0,cancelable:!1})))}handleKeydown(n){let t=n.key,i=t==="Delete";switch(t){case"Backspace":case"Delete":return this.handleDelete({event:n,isForward:i,selection:zf(this.elementState,i)});case"Enter":return this.handleEnter(n)}sy(n)&&this.handleInsert(n,t)}handleDelete({event:n,selection:t,isForward:i,force:o=!1}){let r={value:this.elementState.value,selection:t},[s,c]=r.selection,{elementState:d}=this.preprocessor({elementState:r,data:""},i?"deleteForward":"deleteBackward"),p=new Fr(d,this.options),[_,y]=d.selection;p.deleteCharacters([_,y]);let O=this.postprocessor(p,r);if(r.value.slice(0,s)+r.value.slice(c)===O.value&&!o)return;if(n.preventDefault(),QC(r,d,p,O))return this.updateSelectionRange(i?[y,y]:[_,_]);let Z=i?"deleteContentForward":"deleteContentBackward";this.updateElementState(O,{inputType:"inputType"in n?n.inputType:Z,data:null}),this.updateHistory(O)}handleInsert(n,t){let i=this.elementState,{elementState:o,data:r=t}=this.preprocessor({data:t,elementState:i},"insert"),s=new Fr(o,this.options);try{s.addCharacters(o.selection,r)}catch{return n.preventDefault()}let[c,d]=o.selection,p=o.value.slice(0,c)+t+o.value.slice(d),_=this.postprocessor(s,i);if(_.value.length>this.maxLength)return n.preventDefault();p!==_.value&&(n.preventDefault(),this.updateElementState(_,{data:t,inputType:"inputType"in n?n.inputType:"insertText"}),this.updateHistory(_))}handleEnter(n){this.isTextArea&&this.handleInsert(n,` -`)}};var MR=Vh({limitWidth:"fixed",align:"right"}),da={provide:Is,deps:[[new tt,new fn,is]],useFactory:io};var IR=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiValueAccessor",""]],features:[A([da])]}),e})(),xR=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();function Zf(e,n,t,i){function o(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function c(_){try{p(i.next(_))}catch(y){s(y)}}function d(_){try{p(i.throw(_))}catch(y){s(y)}}function p(_){_.done?r(_.value):o(_.value).then(c,d)}p((i=i.apply(e,n||[])).next())})}var NR=(()=>{class e{constructor(t,i){this.ngZone=t,this.elementRef=i,this.maskedElement=null,this.maskito=Lr,this.maskitoElement=Wf}ngOnChanges(){var t;return Zf(this,void 0,void 0,function*(){(t=this.maskedElement)===null||t===void 0||t.destroy();let i=this.maskitoElement,o=yield i(this.elementRef.nativeElement);this.maskitoElement===i&&this.ngZone.runOutsideAngular(()=>{var r;this.maskedElement=new la(o,(r=this.maskito)!==null&&r!==void 0?r:Lr)})})}ngOnDestroy(){var t;(t=this.maskedElement)===null||t===void 0||t.destroy()}}return e.\u0275fac=function(t){return new(t||e)(a(Xe),a(N))},e.\u0275dir=w({type:e,selectors:[["","maskito",""]],inputs:{maskito:"maskito",maskitoElement:"maskitoElement"},features:[qt]}),e})();var jR=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var ly=["native"],uy=["text"],dy=["*"];function py(e,n){e&1&&(g(0,"span",5),me(1),v())}var Xf=(()=>{class e extends Ai{constructor(t,i){super(t,i),this.maxLength=null,this.indent=-1}get nativeFocusableElement(){return this.native?this.native.nativeElement:null}get focused(){return Qt(this.nativeFocusableElement)}get hasValue(){return this.value!==""}onValueChange(t){this.text&&(this.text.nativeElement.textContent=t,this.text.nativeElement.style.textIndent="",this.value=t)}onFocused(t){this.updateFocused(t)}onScroll(){var t;let i=((t=this.native)===null||t===void 0?void 0:t.nativeElement.scrollLeft)||0;this.indent=-1-i}getFallbackValue(){return""}}return e.\u0275fac=function(t){return new(t||e)(a(zi,10),a(ft))},e.\u0275cmp=k({type:e,selectors:[["tui-input-inline"]],viewQuery:function(t,i){if(t&1&&(at(ly,5),at(uy,5)),t&2){let o;$e(o=We())&&(i.native=o.first),$e(o=We())&&(i.text=o.first)}},inputs:{maxLength:"maxLength"},features:[A([da,ei(e)]),W],ngContentSelectors:dy,decls:5,vars:10,consts:[["text",""],["native",""],[1,"t-before",3,"textContent"],["automation-id","tui-input-inline__placeholder","class","t-placeholder",4,"ngIf"],["automation-id","tui-input-inline__native","tuiMaskAccessor","","type","text",1,"t-native",3,"ngModelChange","scroll","tuiFocusedChange","disabled","id","ngModel","readOnly","tuiFocusable"],["automation-id","tui-input-inline__placeholder",1,"t-placeholder"]],template:function(t,i){if(t&1){let o=F();Ve(),S(0,"span",2,0),T(2,py,2,0,"span",3),g(3,"input",4,1),C("ngModelChange",function(s){return I(o),x(i.onValueChange(s))})("scroll",function(){return I(o),x(i.onScroll())})("tuiFocusedChange",function(s){return I(o),x(i.onFocused(s))}),v()}t&2&&(nt("text-indent",i.indent,"px"),l("textContent",i.value),h(2),l("ngIf",!i.hasValue),h(),l("disabled",i.computedDisabled)("id",i.id)("ngModel",i.value)("readOnly",i.readOnly)("tuiFocusable",i.focusable),fe("maxLength",i.maxLength))},dependencies:[ee,ta,ao,co,an,yn,vs],styles:["[_nghost-%COMP%]{position:relative;display:inline-block;overflow:hidden;white-space:nowrap;box-sizing:border-box}.t-before[_ngcontent-%COMP%]{display:block;padding-right:.02em;margin-left:1px;white-space:pre}.t-placeholder[_ngcontent-%COMP%]{display:inline-block;min-width:1px}.t-native[_ngcontent-%COMP%]{position:absolute;top:0;left:0;background-color:transparent;padding:inherit;font:inherit;-webkit-text-fill-color:transparent;box-sizing:border-box;width:100%;height:100%;border-width:0;text-align:inherit;letter-spacing:inherit;text-indent:inherit;text-transform:inherit;outline:none}"],changeDetection:0}),e})(),qf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lo,bn,_s,ia]]}),e})();function hy(e,n){if(e&1){let t=F();g(0,"button",1),C("click",function(){let o=I(t).$implicit,r=u();return x(r.selectedColor.emit(o.value))}),v()}if(e&2){let t=n.$implicit;nt("background",t.value),l("id",t.key)("tuiHint",t.key)("tuiHintDescribe",t.key)}}var Bo=(()=>{class e{constructor(){this.colors=new Map,this.selectedColor=new Pe,this.originalOrder=(t,i)=>0}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=k({type:e,selectors:[["tui-palette"]],inputs:{colors:"colors"},outputs:{selectedColor:"selectedColor"},decls:2,vars:4,consts:[["type","button","class","t-button",3,"id","background","tuiHint","tuiHintDescribe","click",4,"ngFor","ngForOf"],["type","button",1,"t-button",3,"click","id","tuiHint","tuiHintDescribe"]],template:function(t,i){t&1&&(T(0,hy,1,5,"button",0),R(1,"keyvalue")),t&2&&l("ngForOf",Su(1,1,i.colors,i.originalOrder))},dependencies:[Ui,be,ke,ve,Se,Ae,zu],styles:["[_nghost-%COMP%]{display:flex;flex-wrap:wrap;padding:.875rem}.t-button[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;width:1.5625rem;height:1.5625rem;box-sizing:border-box;margin:.375rem;border-radius:var(--tui-radius-m);border:1px solid rgba(0,0,0,.08)}"],changeDetection:0}),e})();var Vo=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Le]]}),e})();function fy(e,n){if(e&1&&S(0,"div",6),e&2){let t=u().tuiLet;nt("background",t)}}function my(e,n){if(e&1){let t=F();g(0,"tui-palette",7),C("selectedColor",function(o){I(t);let r=u(2);return x(r.editor.setBackgroundColor(o))}),v()}if(e&2){let t=n.$implicit,i=u(2);l("colors",i.colors)("tuiActiveZoneParent",t)}}function gy(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",3,0),S(2,"button",4),R(3,"async"),T(4,fy,1,2,"div",5)(5,my,1,2,"ng-template",null,1,de),v()),e&2){let t=n.tuiLet,i=j(1),o=j(6),r=u();l("content",o)("tuiDropdownMaxHeight",999),h(2),l("focusable",i.open)("icon",r.options.icons.textHilite)("pseudoActive",i.open)("tuiHint",H(3,7,r.backColorText$)),h(2),l("ngIf",!r.isBlankColor(t||""))}}var Kf=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.colors=this.options.colors,this.backgroundColor$=this.editor.stateChange$.pipe(b(()=>this.editor.getBackgroundColor()||this.options.blankColor),oe()),this.backColorText$=this.texts$.pipe(b(r=>r.backColor))}isBlankColor(t){return t===this.options.blankColor}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-highlight-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[["hilite",""],["hiliteDropdown",""],[3,"content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"content","tuiDropdownMaxHeight"],["appearance","icon","automation-id","toolbar__hilite-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"focusable","icon","pseudoActive","tuiHint"],["class","t-plate",3,"background",4,"ngIf"],[1,"t-plate"],[1,"t-color-picker",3,"selectedColor","colors","tuiActiveZoneParent"]],template:function(t,i){t&1&&(T(0,gy,7,9,"tui-hosted-dropdown",2),R(1,"async")),t&2&&l("tuiLet",H(1,1,i.backgroundColor$))},dependencies:[ot,_e,Bo,xt,Di,Ae,be,ke,ve,Se,ee,gt,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),Qf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Vo,Le,vi,yi,Ot]]}),e})();function vy(e,n){if(e&1){let t=F();g(0,"div",6)(1,"button",7),C("click",function(){I(t);let o=u(3);return x(o.editor.toggleUnorderedList())}),v(),g(2,"button",8),C("click",function(){I(t);let o=u(3);return x(o.editor.toggleOrderedList())}),v(),g(3,"button",9),C("click",function(){I(t);let o=u(3);return x(o.editor.toggleTaskList())}),v(),g(4,"button",10),C("click",function(){I(t);let o=u(3);return x(o.sinkListItem())}),v(),g(5,"button",11),C("click",function(){I(t);let o=u(3);return x(o.liftListItem())}),v()()}if(e&2){let t=u().tuiLet,i=u().ngIf,o=u();h(),l("icon",o.options.icons.listUnOrdered)("pseudoActive",!!(t!=null&&t.unordered))("tuiHint",i.unorderedList),h(),l("icon",o.options.icons.listOrdered)("pseudoActive",!!(t!=null&&t.ordered))("tuiHint",i.orderedList),h(),l("icon",o.options.icons.taskList)("pseudoActive",!!(t!=null&&t.tasked)),h(),l("icon",o.options.icons.indent)("tuiHint",i.indent),h(),l("icon",o.options.icons.outdent)("tuiHint",i.outdent)}}function _y(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",4,0),S(2,"button",5),T(3,vy,6,12,"ng-template",null,1,de),v()),e&2){let t=n.tuiLet,i=j(1),o=j(4),r=u().ngIf,s=u();l("content",o),h(2),l("focusable",i.open)("icon",s.options.icons.listPreview)("pseudoActive",(i==null?null:i.open)||(t==null?null:t.unordered)||(t==null?null:t.ordered)||!1)("tuiHint",r.list)}}function Ty(e,n){if(e&1&&(Ie(0),T(1,_y,5,5,"tui-hosted-dropdown",3),R(2,"async"),xe()),e&2){let t=u();h(),l("tuiLet",H(2,1,t.listState$))}}var Jf=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.listState$=wt([this.editor.isActive$("orderedList"),this.editor.isActive$("bulletList"),this.editor.isActive$("taskList")]).pipe(b(([r,s,c])=>({ordered:r,unordered:s,tasked:c})))}sinkListItem(){this.editor.sinkListItem()}liftListItem(){this.editor.liftListItem()}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-list-configs"]],decls:2,vars:3,consts:[["list",""],["listDropdown",""],[4,"ngIf"],[3,"content",4,"tuiLet"],[3,"content"],["appearance","icon","automation-id","toolbar__ordering-list-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[1,"t-dropdown","t-dropdown-list"],["appearance","icon","automation-id","toolbar__un-ordered-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","pseudoActive","tuiHint"],["appearance","icon","automation-id","toolbar__ordered-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","pseudoActive","tuiHint"],["appearance","icon","automation-id","toolbar__task-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","pseudoActive"],["appearance","icon","automation-id","toolbar_indent-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","tuiHint"],["appearance","icon","automation-id","toolbar_outdent-button","size","s","tuiIconButton","","type","button",1,"t-option",3,"click","icon","tuiHint"]],template:function(t,i){t&1&&(T(0,Ty,3,3,"ng-container",2),R(1,"async")),t&2&&l("ngIf",H(1,1,i.texts$))},dependencies:[ot,_e,ee,xt,Ae,be,ke,ve,Se,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),em=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Le,Ot]]}),e})();function Cy(e,n){if(e&1&&S(0,"div",7),e&2){let t=u(2).tuiLet;nt("background",t)}}function yy(e,n){if(e&1){let t=F();g(0,"tui-palette",8),C("selectedColor",function(o){I(t),u();let r=j(1);return u(2).setCellColor(o),x(r.close())}),v()}if(e&2){let t=n.$implicit,i=u(3);l("colors",i.colors)("tuiActiveZoneParent",t)}}function by(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",4,0),S(2,"button",5),R(3,"async"),T(4,Cy,1,2,"div",6)(5,yy,1,2,"ng-template",null,1,de),v()),e&2){let t=n.tuiLet,i=j(1),o=j(6),r=u().tuiLet,s=u();l("canOpen",!!t)("content",o)("tuiDropdownMaxHeight",999),h(2),l("disabled",!t)("focusable",i.open)("icon",s.options.icons.paint)("pseudoActive",i.open)("tuiHint",H(3,9,s.colorText$)),h(2),l("ngIf",!s.isBlankColor(r||""))}}function My(e,n){if(e&1&&(Ie(0),T(1,by,7,11,"tui-hosted-dropdown",3),R(2,"async"),xe()),e&2){let t=u();h(),l("tuiLet",H(2,1,t.isActive$))}}var tm=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.colors=this.options.colors,this.colorText$=this.texts$.pipe(b(r=>this.editor.isActive("group")&&r.hiliteGroup||this.editor.isActive("table")&&r.cellColor||"")),this.isActive$=wt([this.editor.isActive$("table"),this.editor.isActive$("group")]).pipe(b(([r,s])=>r||s)),this.color$=this.editor.stateChange$.pipe(b(()=>this.editor.getCellColor()||this.editor.getGroupColor()||this.options.blankColor),oe())}isBlankColor(t){return t===this.options.blankColor}setCellColor(t){this.editor.isActive("group")?this.editor.setGroupHilite(t):this.editor.isActive("table")&&this.editor.setCellColor(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-table-cell-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[["colorSelect",""],["cellColorDropdown",""],[4,"tuiLet"],[3,"canOpen","content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"canOpen","content","tuiDropdownMaxHeight"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","pseudoActive","tuiHint"],["class","t-plate t-plate_paint",3,"background",4,"ngIf"],[1,"t-plate","t-plate_paint"],[1,"t-color-picker",3,"selectedColor","colors","tuiActiveZoneParent"]],template:function(t,i){t&1&&(T(0,My,3,3,"ng-container",2),R(1,"async")),t&2&&l("tuiLet",H(1,1,i.color$))},dependencies:[ot,_e,Bo,xt,Di,Ae,be,ke,ve,Se,ee,gt,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),im=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Vo,Me,Le,yi,vi,Ot]]}),e})();function Dy(e,n){if(e&1){let t=F();g(0,"div",4),C("click",function(){I(t);let o=u(2);return x(o.select())})("mouseenter",function(o){let r=I(t).$implicit,s=u().$implicit,c=u();return x(c.updateCurrentSize(r+1,s+1,o))}),v()}if(e&2){let t=n.$implicit,i=u().$implicit,o=u();J("t-cell_hovered",o.tableSelectHovered(t,i))}}function wy(e,n){if(e&1&&(g(0,"div",2),T(1,Dy,1,2,"div",3),v()),e&2){let t=u();h(),l("tuiRepeatTimesOf",t.rowsNumber)}}var Iy=15,xy=15,Oy=70,nm=(()=>{class e{constructor(t){this.win=t,this.selectSize=new Pe,this.onSelectSize=this.selectSize,this.tableSize={rows:1,cols:1}}get columnsNumber(){return Math.min(Math.max(3,this.tableSize.cols+1),Iy)}get rowsNumber(){return Math.min(Math.max(3,this.tableSize.rows+1),xy)}tableSelectHovered(t,i){return tOy&&(this.tableSize={rows:t,cols:i})}onClick(){this.select()}select(){this.selectSize.emit(this.tableSize)}}return e.\u0275fac=function(t){return new(t||e)(a(zt))},e.\u0275cmp=k({type:e,selectors:[["tui-table-size-selector"]],outputs:{selectSize:"selectSize",onSelectSize:"onSelectSize"},decls:3,vars:3,consts:[["class","t-column",4,"tuiRepeatTimes","tuiRepeatTimesOf"],[1,"t-description"],[1,"t-column"],["class","t-cell",3,"t-cell_hovered","click","mouseenter",4,"tuiRepeatTimes","tuiRepeatTimesOf"],[1,"t-cell",3,"click","mouseenter"]],template:function(t,i){t&1&&(T(0,wy,2,1,"div",0),g(1,"div",1),Te(2),v()),t&2&&(l("tuiRepeatTimesOf",i.columnsNumber),h(2),xu("",i.tableSize.cols,"\xD7",i.tableSize.rows,""))},dependencies:[wp],styles:["[_nghost-%COMP%]{display:block;padding:.75rem}.t-cell[_ngcontent-%COMP%]{display:inline-block;background-color:var(--tui-base-01);width:1.25rem;height:1.25rem;border-radius:.25rem;margin:.125rem;border:1px solid var(--tui-base-04);cursor:pointer}.t-cell_hovered[_ngcontent-%COMP%]{background-color:var(--tui-base-02)}.t-column[_ngcontent-%COMP%]{white-space:nowrap}.t-description[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),e})(),om=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Ip]]}),e})();function Py(e,n){if(e&1){let t=F();g(0,"tui-table-size-selector",4),C("selectSize",function(o){I(t);let r=u();return x(r.addTable(o))}),v()}}var rm=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.insertTableText$=this.texts$.pipe(b(r=>r.insertTable))}addTable({rows:t,cols:i}){this.editor.enter();let o=this.editor.state.selection.anchor;this.editor.enter(),this.editor.enter(),this.editor.setTextSelection(o),this.editor.insertTable(t,i)}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-table-create"]],decls:6,vars:6,consts:[["table",""],["tableDropdown",""],["tuiDropdownAlign","left","tuiDropdownDirection","bottom",3,"content"],["appearance","icon","automation-id","toolbar__insert-table-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","tuiHint"],[3,"selectSize"]],template:function(t,i){if(t&1&&(g(0,"tui-hosted-dropdown",2,0),S(2,"button",3),R(3,"async"),v(),T(4,Py,1,0,"ng-template",null,1,de)),t&2){let o=j(1),r=j(5);l("content",r),h(2),l("focusable",o.open)("icon",i.options.icons.insertTable)("tuiHint",H(3,4,i.insertTableText$))}},dependencies:[ot,_e,nm,Di,Ae,be,ke,ve,Se,K],encapsulation:2,changeDetection:0}),e})(),sm=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,vi,Me,Le,om]]}),e})();var Ey=(e,n)=>({mergeCells:e,splitCells:n});function Ay(e,n){if(e&1){let t=F();g(0,"button",2),C("click",function(){I(t);let o=u().tuiLet,r=u();return x(o.mergeCells?r.mergeCells():r.splitCell())}),v()}if(e&2){let t=n.ngIf,i=u().tuiLet;l("disabled",!i.mergeCells&&!i.splitCells)("focusable",!1)("icon",i.mergeCells?"tuiIconTableMergeLarge":"tuiIconTableSplitLarge")("tuiHint",i.mergeCells?t.mergeCells:t.splitCells)}}function ky(e,n){if(e&1&&(Ie(0),T(1,Ay,1,4,"button",1),R(2,"async"),xe()),e&2){let t=u();h(),l("ngIf",H(2,1,t.texts$))}}var am=(()=>{class e{constructor(t,i){this.editor=t,this.texts$=i,this.canMergeCells$=this.editor.stateChange$.pipe(b(()=>this.editor.canMergeCells()),oe()),this.canSplitCells$=this.editor.stateChange$.pipe(b(()=>this.editor.canSplitCells()),oe())}mergeCells(){this.editor.mergeCells()}splitCell(){this.editor.splitCell()}}return e.\u0275fac=function(t){return new(t||e)(a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-table-merge-cells"]],decls:3,vars:8,consts:[[4,"tuiLet"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"click","disabled","focusable","icon","tuiHint"]],template:function(t,i){t&1&&(T(0,ky,3,3,"ng-container",0),R(1,"async"),R(2,"async")),t&2&&l("tuiLet",Jr(5,Ey,H(1,1,i.canMergeCells$),H(2,3,i.canSplitCells$)))},dependencies:[_e,xt,ee,Ae,be,ke,ve,Se,K],encapsulation:2,changeDetection:0}),e})(),cm=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Me,Le,Ot]]}),e})();function Ry(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",3,1),S(2,"button",4),R(3,"async"),v()),e&2){let t=n.tuiLet,i=j(1),o=u(),r=j(3);l("canOpen",!!t)("content",r),h(2),l("disabled",!t)("focusable",i.open)("icon",o.options.icons.addRowTable)("tuiHint",H(3,6,o.rowsColumnsManagingText$))}}function Fy(e,n){if(e&1){let t=F();g(0,"button",7),C("click",function(){let o=I(t).index,r=u().index,s=u(2);return x(s.onTableOption(r*2+o))}),Te(1),v()}if(e&2){let t=n.$implicit;h(),Ne(" ",t," ")}}function Ly(e,n){if(e&1&&(g(0,"tui-opt-group"),T(1,Fy,2,1,"button",6),v()),e&2){let t=n.$implicit;h(),l("ngForOf",t)}}function Hy(e,n){if(e&1&&(g(0,"tui-data-list"),T(1,Ly,2,1,"tui-opt-group",5),R(2,"async"),v()),e&2){let t=u();h(),l("ngForOf",H(2,1,t.tableCommandTexts$))}}var Zn=function(e){return e[e.InsertColumnBefore=0]="InsertColumnBefore",e[e.InsertColumnAfter=1]="InsertColumnAfter",e[e.InsertRowBefore=2]="InsertRowBefore",e[e.InsertRowAfter=3]="InsertRowAfter",e[e.DeleteColumn=4]="DeleteColumn",e[e.DeleteRow=5]="DeleteRow",e}(Zn||{}),lm=(()=>{class e{constructor(t,i,o,r){this.options=t,this.editor=i,this.texts$=o,this.tableCommandTexts$=r,this.commandsRegistry={[Zn.InsertColumnAfter]:()=>this.editor.addColumnAfter(),[Zn.InsertColumnBefore]:()=>this.editor.addColumnBefore(),[Zn.InsertRowAfter]:()=>this.editor.addRowAfter(),[Zn.InsertRowBefore]:()=>this.editor.addRowBefore(),[Zn.DeleteColumn]:()=>this.editor.deleteColumn(),[Zn.DeleteRow]:()=>this.editor.deleteRow()},this.isActive$=this.editor.isActive$("table"),this.rowsColumnsManagingText$=this.texts$.pipe(b(s=>s.rowsColumnsManaging))}onTableOption(t){this.commandsRegistry[t]()}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be),a(Wd))},e.\u0275cmp=k({type:e,selectors:[["tui-table-row-column-manager"]],decls:4,vars:3,consts:[["tableOptionsDropdown",""],["tableCommand",""],[3,"canOpen","content",4,"tuiLet"],[3,"canOpen","content"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint"],[4,"ngFor","ngForOf"],["tuiOption","",3,"click",4,"ngFor","ngForOf"],["tuiOption","",3,"click"]],template:function(t,i){t&1&&(T(0,Ry,4,8,"tui-hosted-dropdown",2),R(1,"async"),T(2,Hy,3,3,"ng-template",null,0,de)),t&2&&l("tuiLet",H(1,1,i.isActive$))},dependencies:[ot,_e,Pn,Sn,xt,Ae,be,ke,ve,Se,Ui,hf,K],encapsulation:2,changeDetection:0}),e})(),um=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Le,Me,Yn,Ot]]}),e})();function Ny(e,n){if(e&1){let t=F();g(0,"tui-palette",6),C("selectedColor",function(o){I(t);let r=u(2);return x(r.editor.setFontColor(o))}),v()}if(e&2){let t=n.$implicit,i=u(2);l("colors",i.colors)("tuiActiveZoneParent",t)}}function jy(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",3,0),S(2,"button",4),R(3,"async"),S(4,"div",5),T(5,Ny,1,2,"ng-template",null,1,de),v()),e&2){let t=n.tuiLet,i=j(1),o=j(6),r=u();l("content",o)("tuiDropdownMaxHeight",999),h(2),l("focusable",i.open)("icon",r.options.icons.textColor)("pseudoActive",i.open)("tuiHint",H(3,8,r.foreColorText$)),h(2),nt("background",t)}}var dm=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.colors=this.options.colors,this.fontColor$=this.editor.stateChange$.pipe(b(()=>this.editor.getFontColor()||this.options.blankColor),oe()),this.foreColorText$=this.texts$.pipe(b(r=>r.foreColor))}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-text-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[["color",""],["colorDropdown",""],[3,"content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"content","tuiDropdownMaxHeight"],["appearance","icon","automation-id","toolbar__color-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[1,"t-plate"],[1,"t-color-picker",3,"selectedColor","colors","tuiActiveZoneParent"]],template:function(t,i){t&1&&(T(0,jy,7,10,"tui-hosted-dropdown",2),R(1,"async")),t&2&&l("tuiLet",H(1,1,i.fontColor$))},dependencies:[ot,_e,Bo,xt,Di,Ae,be,ke,ve,Se,gt,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),pm=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Me,rt,vi,Le,Vo,yi,Ot]]}),e})();function Uy(e,n){e&1&&(Ie(0),Te(1,"Edit anchor"),xe())}function zy(e,n){e&1&&(g(0,"span"),Te(1,"Link to anchor"),v())}function By(e,n){e&1&&(g(0,"span"),Te(1,"URL"),v())}function Vy(e,n){if(e&1&&T(0,zy,2,0,"span",4)(1,By,2,0,"ng-template",null,2,de),e&2){let t=j(2),i=u(2);l("ngIf",i.prefixIsHashMode)("ngIfElse",t)}}function $y(e,n){if(e&1&&(Ie(0),Te(1),xe()),e&2){let t=n.ngIf,i=u(2);h(),Ne(" ",i.prefixIsHashMode?t.anchorExample:t.urlExample," ")}}function Wy(e,n){if(e&1){let t=F();Ie(0),g(1,"label",6)(2,"div",7),T(3,Uy,2,0,"ng-container",4)(4,Vy,3,2,"ng-template",null,1,de),v(),g(6,"div",8)(7,"div",9),Te(8),v(),g(9,"tui-input-inline",10),or("ngModelChange",function(o){I(t);let r=u();return nr(r.url,o)||(r.url=o),x(o)}),C("input",function(o){I(t);let r=u();return x(r.onChange(o.target==null?null:o.target.value))})("keydown.backspace",function(){I(t);let o=u();return x(o.onBackspace())})("keydown.prevent.enter",function(){I(t);let o=u();return x(o.onSave())}),T(10,$y,2,1,"ng-container",5),R(11,"async"),v()()(),g(12,"tui-svg",11),C("click",function(){I(t);let o=u();return x(o.onClear())}),v(),g(13,"button",12),C("click",function(){I(t);let o=u();return x(o.onSave())}),v(),xe()}if(e&2){let t=j(5),i=u();h(3),l("ngIf",i.anchorMode)("ngIfElse",t),h(5),Iu(i.prefix),h(),J("t-input_filled",i.hasUrl),ir("ngModel",i.url),h(),l("ngIf",H(11,11,i.texts$)),h(2),J("t-cleaner_hidden",!i.hasUrl),l("src",i.options.icons.popupLinkRemove),h(),l("icon",i.options.icons.popupLinkSave)}}function Gy(e,n){if(e&1){let t=F();g(0,"a",13),Te(1),R(2,"tuiShortUrl"),v(),g(3,"button",14),C("click",function(){I(t);let o=u();return x(o.onEdit())}),v(),g(4,"button",15),C("click",function(){I(t);let o=u();return x(o.onRemove())}),v()}if(e&2){let t=u();l("href",t.href,Kr)("icon",t.prefixIsHashMode?"tuiIconHash":"tuiIconExternalLink"),h(),Ne(" ",H(2,5,t.url)," "),h(2),l("icon",t.options.icons.popupPreviewLinkEdit),h(),l("icon",t.options.icons.popupPreviewLinkClear)}}function Yy(e,n){if(e&1){let t=F();g(0,"button",19),C("click",function(){let o=I(t).$implicit,r=u(2);return x(r.setAnchor(o))}),Te(1),v()}if(e&2){let t=n.$implicit;h(),Ne(" #",t," ")}}function Zy(e,n){if(e&1&&(Ie(0),S(1,"hr",16),g(2,"tui-scrollbar")(3,"div",17),T(4,Yy,2,1,"button",18),R(5,"tuiFilterAnchors"),v()(),xe()),e&2){let t=u();h(4),l("ngForOf",Pu(5,1,t.anchorIds,t.prefix,t.url))}}function mm(e=""){var n;let t=(n=e.indexOf(cr))!==null&&n!==void 0?n:-1,[i,o]=t>-1?[e.slice(0,t+cr.length),e.slice(t+cr.length,e.length)]:["",e],r=[i,o].filter(Boolean);return o!=null&&o.includes("://")&&r.length>1?mm(o):r}function hm(e=""){let[n,t]=e.split(/:/).slice(-2).filter(Boolean);return n&&t&&!qu(e)?[`${n}:`,t]:[]}function fm(e=""){if(e.startsWith(ti))return{prefix:ti,path:e.slice(1)};let[n="",t=""]=e.includes(cr)?mm(e):hm(e);if(t.includes(jd)){let[i,o]=hm(t);if(i&&o)return{prefix:i,path:o}}return e.startsWith("/")&&!e.startsWith("//")?{prefix:e.slice(0,1),path:e.slice(1)}:e.startsWith("./")?{prefix:e.slice(0,2),path:e.slice(2)}:{prefix:n,path:n===""?e:t}}var Ml=60,gm=Ml-20,Xy=Ml-gm-10,qy=(()=>{class e{transform(t){return t.length{class e{transform(t,i,o){return i==="#"?t.filter(r=>r!==o):t}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=Ii({name:"tuiFilterAnchors",type:e,pure:!0}),e})(),pa=(()=>{class e{constructor(t,i,o,r){this.doc=t,this.texts$=i,this.editor=o,this.options=r,this.isOnlyAnchorMode=this.detectAnchorMode(),this.addLink=new Pe,this.removeLink=new Pe,this.url=this.getHrefOrAnchorId(),this.edit=!this.url,this.prefix=this.makeDefaultPrefix(),this.anchorIds=this.getAllAnchorsIds()}get defaultProtocol(){var t,i;return(i=(t=this.options.linkOptions)===null||t===void 0?void 0:t.protocol)!==null&&i!==void 0?i:Nd}set anchorMode(t){this.isOnlyAnchorMode=t,this.prefix=t?ti:this.makeDefaultPrefix()}get anchorMode(){return this.isOnlyAnchorMode}get prefixIsHashMode(){return this.prefix===ti}get hasUrl(){return!!this.url}get href(){return`${this.prefix}${this.url}`}get showAnchorsList(){return!this.anchorMode&&this.edit&&this.anchorIds.length>0}get isViewMode(){return!this.edit}onSelectionChange(){this.isViewMode&&(this.url=this.getHrefOrAnchorId(),this.anchorMode=this.detectAnchorMode())}onMouseDown(t){pt(t.target)&&!t.target.matches("a, button, input")&&t.preventDefault()}setAnchor(t){this.url=t,this.changePrefix(!0)}changePrefix(t){this.prefix=t?ti:this.defaultProtocol}onSave(){this.url?this.addLink.emit(this.href):this.removeLink.emit()}onBackspace(){this.url||(this.prefix=this.isOnlyAnchorMode?ti:this.defaultProtocol)}onEdit(){this.edit=!0}onRemove(){this.removeLink.emit()}onChange(t){this.url=this.removePrefix(t)}onClear(){this.url=""}makeDefaultPrefix(){var t,i;let o=this.getAnchorElement(),r=fm((t=o==null?void 0:o.getAttribute("href"))!==null&&t!==void 0?t:"").prefix||this.defaultProtocol;return o&&(!o.getAttribute("href")&&o.getAttribute("id")||!((i=o.getAttribute("href"))===null||i===void 0)&&i.startsWith(ti))?ti:r}detectAnchorMode(){let t=this.getAnchorElement();return!(t!=null&&t.href)&&!!(t!=null&&t.getAttribute("id"))}getFocusedParentElement(){var t,i;return((i=(t=this.doc.getSelection())===null||t===void 0?void 0:t.focusNode)===null||i===void 0?void 0:i.parentElement)||null}getAnchorElement(){var t,i,o;let r=this.getFocusedParentElement();return(o=(t=r==null?void 0:r.closest("a"))!==null&&t!==void 0?t:(i=r==null?void 0:r.querySelector("img"))===null||i===void 0?void 0:i.closest("a"))!==null&&o!==void 0?o:null}getHrefOrAnchorId(){let t=this.getAnchorElement();return t?this.removePrefix(t.getAttribute("href")||t.getAttribute("id")||""):this.url}removePrefix(t){var i;let o=t.startsWith(ti)||this.prefix===ti||t.startsWith("/")||t.startsWith("./")||t.startsWith("http")||t.startsWith("://")?t:`${(i=this.prefix)!==null&&i!==void 0?i:""}${t}`,{prefix:r,path:s}=fm(o);return this.isOnlyAnchorMode||r===ti||r===""&&this.prefix===ti?this.prefix=ti:r===""?this.prefix=this.defaultProtocol:this.prefix=r,s}getAllAnchorsIds(){var t;let i=Array.from((t=this.editor.getOriginTiptapEditor().view.dom.querySelectorAll('[data-type="jump-anchor"]'))!==null&&t!==void 0?t:[]);return Array.from(i).map(o=>o.getAttribute("id")||"").filter(Boolean)}}return e.\u0275fac=function(t){return new(t||e)(a(qe),a(Gd),a(De),a(Ee))},e.\u0275cmp=k({type:e,selectors:[["tui-edit-link"]],hostBindings:function(t,i){t&1&&C("selectionchange",function(){return i.onSelectionChange()},!1,Ni)("mousedown",function(r){return i.onMouseDown(r)})},inputs:{anchorMode:"anchorMode"},outputs:{addLink:"addLink",removeLink:"removeLink"},decls:5,vars:3,consts:[["view",""],["fullOptions",""],["urlTitle",""],[1,"t-edit-link",3,"mousedown"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"t-label"],[1,"t-label-properties"],[1,"t-url"],[1,"t-prefix"],["tuiAutoFocus","",1,"t-input",3,"ngModelChange","input","keydown.backspace","keydown.prevent.enter","ngModel"],[1,"t-cleaner",3,"click","src"],["appearance","icon","shape","rounded","size","s","title","Insert link","tuiIconButton","","type","button",1,"t-button",3,"click","icon"],["iconAlign","left","target","_blank","tuiLink","",1,"t-link",3,"href","icon"],["appearance","icon","shape","rounded","size","s","title","Change link","tuiIconButton","","type","button",1,"t-button","t-edit-button",3,"click","icon"],["appearance","icon","automation-id","toolbar__popup-link-clear-button","shape","rounded","size","s","title","Remove link","tuiIconButton","","type","button",1,"t-button",3,"click","icon"],[1,"t-hr"],[1,"t-anchor-list"],["type","button","class","t-anchor",3,"click",4,"ngFor","ngForOf"],["type","button",1,"t-anchor",3,"click"]],template:function(t,i){if(t&1){let o=F();g(0,"div",3),C("mousedown",function(s){return I(o),x(s.stopImmediatePropagation())}),T(1,Wy,14,13,"ng-container",4)(2,Gy,5,7,"ng-template",null,0,de),v(),T(4,Zy,6,5,"ng-container",5)}if(t&2){let o=j(3);h(),l("ngIf",i.edit)("ngIfElse",o),h(3),l("ngIf",i.showAnchorsList)}},dependencies:[Xf,Ft,_e,ra,jo,ee,ms,co,an,Ui,K,qy,Ky],styles:["[_nghost-%COMP%]{display:block;min-width:18.75rem}.t-edit-link[_ngcontent-%COMP%]{display:flex;min-height:4rem;align-items:center;padding-right:.75rem}.t-label[_ngcontent-%COMP%]{font:var(--tui-font-text-s);height:var(--tui-height-l);box-sizing:border-box;padding:.4375rem 1rem;min-width:12.5rem;max-width:25rem;width:100%}.t-label-properties[_ngcontent-%COMP%]{display:flex;align-items:center;max-width:8.375rem;justify-content:space-between}.t-property_inactive[_ngcontent-%COMP%]{opacity:.5}.t-url[_ngcontent-%COMP%]{display:flex;font:var(--tui-font-text-m);color:var(--tui-text-02)}.t-input[_ngcontent-%COMP%]{flex:1}.t-input_filled[_ngcontent-%COMP%]{color:var(--tui-text-01)}.t-button[_ngcontent-%COMP%]{width:2rem;height:2rem;margin:0 .25rem;transition:background .2s}.t-edit-button[_ngcontent-%COMP%]{margin-left:auto}.t-link[_ngcontent-%COMP%]{margin:0 1rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.t-cleaner[_ngcontent-%COMP%]{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;color:var(--tui-base-06);cursor:pointer;margin-left:auto}.t-cleaner[_ngcontent-%COMP%]:hover{color:var(--tui-base-07)}.t-cleaner_hidden[_ngcontent-%COMP%]{visibility:hidden}.t-anchor-list[_ngcontent-%COMP%]{display:flex;max-height:12.5rem;flex-direction:column}.t-anchor[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;min-height:2.75rem;padding:.375rem .5rem;margin:.125rem .5rem;border-radius:var(--tui-radius-m);text-align:left}.t-anchor[_ngcontent-%COMP%]:hover{background:var(--tui-base-02);cursor:pointer}"],changeDetection:0}),e})(),ha=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lo,gs,Me,Lt,sa,qf,yf,Uo]]}),e})();var Qy=["dropdown"],Jy=["*"];function eb(e,n){e&1&&Ut(0)}function tb(e,n){if(e&1){let t=F();g(0,"div",14)(1,"button",15),C("click",function(){I(t);let o=u(2);return x(o.undo())}),v(),g(2,"button",16),C("click",function(){I(t);let o=u(2);return x(o.redo())}),v()()}if(e&2){let t=u().ngIf,i=u();h(),l("disabled",i.undoDisabled)("focusable",!1)("icon",i.options.icons.undo)("tuiHint",t.undo),h(),l("disabled",i.redoDisabled)("focusable",!1)("icon",i.options.icons.redo)("tuiHint",t.redo)}}function ib(e,n){e&1&&(g(0,"div",14),S(1,"tui-font-size",17),v())}function nb(e,n){if(e&1&&S(0,"tui-font-style",23),e&2){let t=u(3);l("enabledTools",t.toolsSet)}}function ob(e,n){e&1&&S(0,"tui-align-content",17)}function rb(e,n){e&1&&S(0,"tui-list-configs",17)}function sb(e,n){if(e&1){let t=F();g(0,"button",24,0),C("click",function(){I(t);let o=u(3);return x(o.toggleQuote())}),v()}if(e&2){let t=u(2).ngIf,i=u();l("disabled",i.unorderedList||i.orderedList)("focusable",!1)("icon",i.options.icons.quote)("pseudoActive",i.blockquote)("tuiHint",t.quote)}}function ab(e,n){if(e&1){let t=F();g(0,"tui-edit-link",27,3),C("addLink",function(o){I(t),u();let r=j(1),s=u(3);return x(s.onLink(r,o))})("removeLink",function(){I(t),u();let o=j(1),r=u(3);return x(r.onLink(o))}),v()}}function cb(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",25,1),S(2,"button",26,0),T(4,ab,2,0,"ng-template",null,2,de),v()),e&2){let t=j(1),i=j(5),o=u(2).ngIf,r=u();l("canOpen",r.canOpenAnchor)("content",i),h(2),l("focusable",t.open)("icon",r.options.icons.link)("pseudoActive",t.open||r.a)("tuiHint",o.link)}}function lb(e,n){if(e&1){let t=F();g(0,"tui-edit-link",30),C("addLink",function(o){I(t),u();let r=j(1),s=u(3);return x(s.setAnchor(r,o))})("removeLink",function(){I(t);let o=u(4);return x(o.removeAnchor())}),v()}e&2&&l("anchorMode",!0)}function ub(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",28,4),S(2,"button",29),T(3,lb,1,1,"ng-template",null,5,de),v()),e&2){let t=j(1),i=j(4),o=u(2).ngIf,r=u();l("canOpen",r.canOpenAnchor)("content",i),h(2),l("focusable",!1)("icon",r.options.icons.anchor)("pseudoActive",t.open||r.jumpAnchor)("tuiHint",o.insertAnchor)}}function db(e,n){if(e&1){let t=F();Ie(0),g(1,"button",31,0),C("click",function(){I(t);let o=j(4);return x(o.click())}),v(),g(3,"input",32,6),C("change",function(){I(t);let o=j(4),r=u(3);return x(r.onAttach(o))}),v(),xe()}if(e&2){let t=u(2).ngIf,i=u();h(),l("focusable",!1)("icon",i.options.icons.attach)("tuiHint",t.attach),h(2),l("accept",i.attachOptions.accept)("multiple",i.attachOptions.multiple)("tuiFocusable",!1)}}function pb(e,n){if(e&1&&(g(0,"div",14),T(1,nb,1,1,"tui-font-style",18)(2,ob,1,0,"tui-align-content",19)(3,rb,1,0,"tui-list-configs",19)(4,sb,2,5,"button",20)(5,cb,6,6,"tui-hosted-dropdown",21)(6,ub,5,6,"tui-hosted-dropdown",22)(7,db,5,6,"ng-container",9),v()),e&2){let t=u(2);h(),l("ngIf",t.formatEnabled),h(),l("ngIf",t.enabled(t.editorTool.Align)),h(),l("ngIf",t.enabled(t.editorTool.List)),h(),l("ngIf",t.enabled(t.editorTool.Quote)),h(),l("ngIf",t.enabled(t.editorTool.Link)),h(),l("ngIf",t.enabled(t.editorTool.Anchor)),h(),l("ngIf",t.enabled(t.editorTool.Attach))}}function hb(e,n){if(e&1){let t=F();g(0,"button",34,0),C("click",function(){I(t);let o=u(3);return x(o.toggleSubscript())}),v()}if(e&2){let t=u(2).ngIf,i=u();l("focusable",!1)("icon",i.options.icons.sub)("pseudoActive",i.subscript)("tuiHint",t.subscript)}}function fb(e,n){if(e&1){let t=F();g(0,"button",34,0),C("click",function(){I(t);let o=u(3);return x(o.toggleSuperscript())}),v()}if(e&2){let t=u(2).ngIf,i=u();l("focusable",!1)("icon",i.options.icons.sup)("pseudoActive",i.superscript)("tuiHint",t.superscript)}}function mb(e,n){if(e&1&&(g(0,"div",14),T(1,hb,2,4,"button",33)(2,fb,2,4,"button",33),v()),e&2){let t=u(2);h(),l("ngIf",t.enabled(t.editorTool.Sub)),h(),l("ngIf",t.enabled(t.editorTool.Sup))}}function gb(e,n){if(e&1&&S(0,"tui-text-color",36),e&2){let t=u(3);l("colors",t.colors)}}function vb(e,n){if(e&1&&S(0,"tui-highlight-color",36),e&2){let t=u(3);l("colors",t.colors)}}function _b(e,n){if(e&1&&(g(0,"div",14),T(1,gb,1,1,"tui-text-color",35)(2,vb,1,1,"tui-highlight-color",35),v()),e&2){let t=u(2);h(),l("ngIf",t.enabled(t.editorTool.Color)),h(),l("ngIf",t.enabled(t.editorTool.Hilite))}}function Tb(e,n){e&1&&S(0,"tui-code",17)}function Cb(e,n){if(e&1){let t=F();g(0,"button",40,0),C("click",function(){I(t);let o=u(3);return x(o.onTeX())}),v()}if(e&2){let t=u(2).ngIf,i=u();l("focusable",!1)("icon",i.options.icons.tex)("tuiHint",t.tex)}}function yb(e,n){if(e&1){let t=F();g(0,"div",41)(1,"button",42,0),C("click",function(){I(t);let o=j(4);return x(o.click())}),v(),g(3,"input",43,7),C("change",function(){I(t);let o=j(4),r=u(3);return x(r.onImage(o))}),v()()}if(e&2){let t=u(2).ngIf,i=u();h(),l("focusable",!1)("icon",i.options.icons.image)("tuiHint",t.image),h(2),l("tuiFocusable",!1)}}function bb(e,n){if(e&1){let t=F();g(0,"button",31,0),C("click",function(){I(t);let o=u(3);return x(o.insertHorizontalRule())}),v()}if(e&2){let t=u(2).ngIf,i=u();l("focusable",!1)("icon",i.options.icons.hr)("tuiHint",t.insertHorizontalRule)}}function Mb(e,n){if(e&1&&(g(0,"div",14),T(1,Tb,1,0,"tui-code",19)(2,Cb,2,3,"button",37)(3,yb,5,4,"div",38)(4,bb,2,3,"button",39),v()),e&2){let t=u(2);h(),l("ngIf",t.enabled(t.editorTool.Code)),h(),l("ngIf",t.enabled(t.editorTool.Tex)),h(),l("ngIf",t.enabled(t.editorTool.Img)),h(),l("ngIf",t.enabled(t.editorTool.HR))}}function Db(e,n){if(e&1){let t=F();g(0,"div",14)(1,"button",31,0),C("click",function(){I(t);let o=u(2);return x(o.removeFormat())}),v()()}if(e&2){let t=u().ngIf,i=u();h(),l("focusable",!1)("icon",i.options.icons.clear)("tuiHint",t.clear)}}function wb(e,n){e&1&&(g(0,"div",14),S(1,"tui-details",44)(2,"tui-details-remove",44),v())}function Ib(e,n){if(e&1&&S(0,"tui-table-cell-color",36),e&2){let t=u(3);l("colors",t.colors)}}function xb(e,n){if(e&1&&(g(0,"div",14),S(1,"tui-editor-group-tool",44),T(2,Ib,1,1,"tui-table-cell-color",35),v()),e&2){let t=u(2);h(2),l("ngIf",!t.enabled(t.editorTool.Table))}}function Ob(e,n){if(e&1&&(g(0,"div",14),S(1,"tui-table-create",44)(2,"tui-table-row-column-manager",44)(3,"tui-table-merge-cells",44)(4,"tui-table-cell-color",36),v()),e&2){let t=u(2);h(4),l("colors",t.colors)}}function Sb(e,n){if(e&1&&(g(0,"section",12),T(1,tb,3,8,"div",13)(2,ib,2,0,"div",13)(3,pb,8,7,"div",13)(4,mb,3,2,"div",13)(5,_b,3,2,"div",13)(6,Mb,5,4,"div",13)(7,Db,3,3,"div",13)(8,wb,3,0,"div",13)(9,xb,3,1,"div",13)(10,Ob,5,1,"div",13),g(11,"div",14),me(12),v()()),e&2){let t=u();h(),l("ngIf",t.enabled(t.editorTool.Undo)),h(),l("ngIf",t.enabled(t.editorTool.Size)),h(),l("ngIf",t.firstBigBlockEnabled),h(),l("ngIf",t.enabled(t.editorTool.Sub)||t.enabled(t.editorTool.Sup)),h(),l("ngIf",t.enabled(t.editorTool.Color)||t.enabled(t.editorTool.Hilite)),h(),l("ngIf",t.secondBigBlockEnabled),h(),l("ngIf",t.enabled(t.editorTool.Clear)),h(),l("ngIf",t.enabled(t.editorTool.Details)),h(),l("ngIf",t.enabled(t.editorTool.Group)),h(),l("ngIf",t.enabled(t.editorTool.Table))}}var _m=(()=>{class e{constructor(t){this.el=t}get toolsContainers(){return Array.from(this.el.nativeElement.querySelectorAll("[tuiItem]"))}onHorizontalNavigation(t){let{toolsContainers:i}=this,o=i.findIndex(li),r=_n(o+(t?-1:1),0,i.length-1),s=i[r],c=t?this.findPreviousTool(s):this.findNextTool(s);c&&c.focus()}findFirstFocusableTool(t=!1){let i=t?this.toolsContainers.slice().reverse():this.toolsContainers;for(let o of i){let r=ls(o)?o:Pi({initial:o,root:o,keyboard:!1});if(r)return r}return null}findPreviousTool(t){return ls(t)?t:Pi({initial:t,root:t,keyboard:!1})||Pi({initial:t,root:this.el.nativeElement,previous:!0,keyboard:!1})}findNextTool(t){return ls(t)?t:Pi({initial:t,root:this.el.nativeElement,keyboard:!1})}}return e.\u0275fac=function(t){return new(t||e)(a(N))},e.\u0275dir=w({type:e,selectors:[["","tuiToolbarNavigationManager",""]],hostBindings:function(t,i){t&1&&C("keydown.arrowRight.prevent",function(){return i.onHorizontalNavigation(!1)})("keydown.arrowLeft.prevent",function(){return i.onHorizontalNavigation(!0)})}}),e})(),fa=(()=>{class e{constructor(t,i,o,r,s,c,d,p){this.el=t,this.editor=i,this.imageLoader=o,this.attachOptions=r,this.filesLoader=s,this.texts$=c,this.options=d,this.destroy$=p,this.dropdowns=ns,this.colors=this.options.colors,this.disabled=!1,this.linkAdded=new Pe,this.texClicked=new Pe,this.fileAttached=new Pe,this.editorTool=It,this.toolsSet=new Set(go)}set tools(t){this.toolsSet=new Set(t)}get focused(){return li(this.el.nativeElement)||!!this.dropdowns.find(({nativeElement:t})=>li(t))}get focusable(){return!this.focused&&!this.disabled}get unorderedList(){return this.editor.isActive("bulletList")}get orderedList(){return this.editor.isActive("orderedList")}get blockquote(){return this.editor.isActive("blockquote")}get a(){return this.editor.isActive("link")}get jumpAnchor(){return this.editor.isActive("jumpAnchor")}get canOpenAnchor(){return!this.a&&!this.jumpAnchor}get undoDisabled(){return this.editor.undoDisabled()}get redoDisabled(){return this.editor.redoDisabled()}get subscript(){return this.editor.isActive("subscript")}get superscript(){return this.editor.isActive("superscript")}get formatEnabled(){return this.enabled(It.Bold)||this.enabled(It.Italic)||this.enabled(It.Underline)||this.enabled(It.Strikethrough)}get firstBigBlockEnabled(){return this.formatEnabled||this.enabled(It.Align)||this.enabled(It.List)||this.enabled(It.Quote)||this.enabled(It.Link)||this.enabled(It.Anchor)||this.enabled(It.Attach)}get secondBigBlockEnabled(){return this.enabled(It.Code)||this.enabled(It.Tex)||this.enabled(It.Img)||this.enabled(It.HR)}onMouseDown(t,i){i.closest("button")||(t.preventDefault(),this.editor.focus())}onBottomFocus(){this.focusLast()}onTopFocus(){this.focusFirst()}onImage(t){var i;let o=(i=t.files)===null||i===void 0?void 0:i[0];t.value="",o&&this.imageLoader(o).pipe(Wt(1),re(this.destroy$)).subscribe(r=>this.addImage(r))}onAttach(t){var i;let o=Array.from(t.files||[]);t.value="",o&&((i=this.filesLoader)===null||i===void 0||i.call(this,o).pipe(Wt(1),re(this.destroy$)).subscribe(r=>this.fileAttached.emit(r)))}onTeX(){this.texClicked.emit()}onLink(t,i){t.open=!1,i&&this.editor.toggleLink(i)}setAnchor(t,i){t.open=!1,i&&(this.editor.setAnchor(i),this.editor.selectClosest())}removeAnchor(){this.editor.removeAnchor()}enabled(t){return this.toolsSet.has(t)}undo(){this.editor.undo()}redo(){this.editor.redo()}insertHorizontalRule(){this.editor.setHorizontalRule()}removeFormat(){this.editor.removeFormat()}toggleOrderedList(){this.editor.toggleOrderedList()}toggleQuote(){this.editor.toggleBlockquote()}toggleSubscript(){this.editor.toggleSubscript()}toggleSuperscript(){this.editor.toggleSuperscript()}addImage(t){this.editor.setImage(t)}focusFirst(){var t;let i=(t=this.navigationManager)===null||t===void 0?void 0:t.findFirstFocusableTool();i&&i.focus()}focusLast(){var t;let i=(t=this.navigationManager)===null||t===void 0?void 0:t.findFirstFocusableTool(!0);i&&i.focus()}}return e.\u0275fac=function(t){return new(t||e)(a(N,8),a(De),a(Xd),a(Vd),a($d,8),a(Be),a(Ee),a(q,2))},e.\u0275cmp=k({type:e,selectors:[["tui-toolbar"]],viewQuery:function(t,i){if(t&1&&(at(_m,5),at(Qy,5,N)),t&2){let o;$e(o=We())&&(i.navigationManager=o.first),$e(o=We())&&(i.dropdowns=o)}},hostAttrs:["role","toolbar"],hostVars:2,hostBindings:function(t,i){t&1&&C("mousedown",function(r){return i.onMouseDown(r,r.target)}),t&2&&J("_disabled",i.disabled)},inputs:{colors:"colors",disabled:"disabled",tools:"tools"},outputs:{linkAdded:"linkAdded",texClicked:"texClicked",fileAttached:"fileAttached"},features:[A([q])],ngContentSelectors:Jy,decls:7,vars:8,consts:[["button",""],["link",""],["linkDropdown",""],["dropdown",""],["anchor",""],["anchorDropdown",""],["fileUpload",""],["image",""],["type","button",1,"t-prevent-parent-label-behavior"],[4,"ngIf"],[3,"focus","tuiFocusable"],["tuiToolbarNavigationManager","","class","t-tools-wrapper",4,"ngIf"],["tuiToolbarNavigationManager","",1,"t-tools-wrapper"],["class","t-block",4,"ngIf"],[1,"t-block"],["appearance","icon","automation-id","toolbar__undo-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"click","disabled","focusable","icon","tuiHint"],["appearance","icon","automation-id","toolbar__redo-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"click","disabled","focusable","icon","tuiHint"],["tuiItem","",1,"t-tool","t-wrapper"],["tuiItem","","class","t-tool t-wrapper",3,"enabledTools",4,"ngIf"],["tuiItem","","class","t-tool t-wrapper",4,"ngIf"],["appearance","icon","automation-id","toolbar__quote-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"disabled","focusable","icon","pseudoActive","tuiHint","click",4,"ngIf"],["tuiItem","","class","t-wrapper",3,"canOpen","content",4,"ngIf"],["class","t-wrapper",3,"canOpen","content",4,"ngIf"],["tuiItem","",1,"t-tool","t-wrapper",3,"enabledTools"],["appearance","icon","automation-id","toolbar__quote-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"click","disabled","focusable","icon","pseudoActive","tuiHint"],["tuiItem","",1,"t-wrapper",3,"canOpen","content"],["appearance","icon","automation-id","toolbar__link-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"focusable","icon","pseudoActive","tuiHint"],[3,"addLink","removeLink"],[1,"t-wrapper",3,"canOpen","content"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[3,"addLink","removeLink","anchorMode"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"click","focusable","icon","tuiHint"],["type","file",1,"t-file-upload",3,"change","accept","multiple","tuiFocusable"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"focusable","icon","pseudoActive","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"click","focusable","icon","pseudoActive","tuiHint"],["tuiItem","","class","t-tool t-wrapper",3,"colors",4,"ngIf"],["tuiItem","",1,"t-tool","t-wrapper",3,"colors"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool",3,"focusable","icon","tuiHint","click",4,"ngIf"],["tuiItem","","class","t-wrapper",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool",3,"click","focusable","icon","tuiHint"],["tuiItem","",1,"t-wrapper"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"click","focusable","icon","tuiHint"],["accept","image/*","type","file",1,"t-image",3,"change","tuiFocusable"],["tuiItem","",1,"t-tool","t-tool_margin"]],template:function(t,i){t&1&&(Ve(),S(0,"button",8),T(1,eb,1,0,"ng-container",9),R(2,"async"),g(3,"div",10),C("focus",function(){return i.onTopFocus()}),v(),g(4,"div",10),C("focus",function(){return i.onBottomFocus()}),v(),T(5,Sb,13,10,"section",11),R(6,"async")),t&2&&(h(),l("ngIf",H(2,4,i.editor.stateChange$)),h(2),l("tuiFocusable",i.focusable),h(),l("tuiFocusable",i.focusable),h(),l("ngIf",H(6,6,i.texts$)))},dependencies:[_e,Af,Rf,Df,Jf,ot,pa,dm,Kf,If,Of,Sf,Lf,tm,rm,lm,am,ee,yn,_m,Ae,Tp,be,ke,ve,Se,K],styles:['.t-tools-wrapper[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none;position:-webkit-sticky;position:sticky;top:0;display:flex;padding:.25rem .75rem;overflow:auto;flex-wrap:wrap;box-shadow:0 .125rem .1875rem #0000001a}.t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar, .t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{display:none}.t-tools-wrapper._disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-block[_ngcontent-%COMP%]{display:flex;padding:.25rem 0}.t-block[_ngcontent-%COMP%]:not(:last-child):after{content:"";display:block;margin:0 .25rem;width:1px;background:var(--tui-secondary-active)}.t-tool[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}button.t-tool[_ngcontent-%COMP%]:hover, .t-tool[_ngcontent-%COMP%] button:hover{background:var(--tui-secondary-hover)}.t-tool_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-font[_ngcontent-%COMP%]{padding:.3em 0;outline:none;width:100%;pointer-events:none}.t-image[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;font-size:0;opacity:0;cursor:pointer}.t-image[_ngcontent-%COMP%]::-webkit-file-upload-button{display:none}.t-file-upload[_ngcontent-%COMP%]{display:none}.t-color-picker[_ngcontent-%COMP%] tui-hosted-dropdown, .t-color-picker[_ngcontent-%COMP%] tui-color-picker, .t-color-picker[_ngcontent-%COMP%] tui-color-edit{display:none}.t-prevent-parent-label-behavior[_ngcontent-%COMP%]{display:none}'],changeDetection:0}),e})(),Tm=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Le,bn,Me,rt,ha,cm,im,um,sm,kf,Ff,wf,em,pm,Qf,xf,Pf,Ts,Hf]]}),e})();var Cm=(()=>{class e{constructor(t,i,o,r,s,c,d){this.el=t,this.renderer=i,this.sanitizer=o,this.tuiSanitizer=r,this.document=s,this.editor=c,this.options=d}set content(t){var i;this.renderer.setProperty(this.el.nativeElement,"innerHTML",this.tuiSanitizer?this.tuiSanitizer.sanitize(xi.HTML,(i=t==null?void 0:t.replace(/colwidth/g,"width"))!==null&&i!==void 0?i:""):this.sanitizer.sanitize(xi.HTML,t??""))}click(t){var i,o;if(this.editor||!pt(t.target))return;let r=((o=(i=t.target)===null||i===void 0?void 0:i.closest("a"))===null||o===void 0?void 0:o.getAttribute("href"))||"";r.startsWith("#")&&(this.document.location.hash=r.replace("#",""),t.preventDefault())}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(ji),a(Mu),a(Io,8),a(qe),a(zo,8),a(Ee))},e.\u0275cmp=k({type:e,selectors:[["tui-editor-socket"]],hostVars:2,hostBindings:function(t,i){t&1&&C("click",function(r){return i.click(r)}),t&2&&J("tui-editor-socket",i.options.enableDefaultStyles)},inputs:{content:"content"},decls:0,vars:0,template:function(t,i){},styles:[`.tui-editor-socket{display:block;margin:0;color:var(--tui-text-01);font:var(--tui-font-text-m)}.tui-editor-socket[tuiTiptapEditor]{overflow:hidden}.tui-editor-socket .ProseMirror{min-height:5.375rem;padding:.2rem 1rem;outline:none;white-space:pre-wrap}.tui-editor-socket .resize-cursor{cursor:ew-resize;cursor:col-resize}.tui-editor-socket h1,.tui-editor-socket h2,.tui-editor-socket h3,.tui-editor-socket h4,.tui-editor-socket h5,.tui-editor-socket h6{word-break:break-word;line-height:normal}.tui-editor-socket h1:first-child,.tui-editor-socket h2:first-child,.tui-editor-socket p:last-child{margin-bottom:0}.tui-editor-socket p:last-child,.tui-editor-socket pre:last-child{margin-bottom:0}.tui-editor-socket p:empty:after{content:" ";white-space:pre}.tui-editor-socket p:first-child{margin-top:0;min-width:1px}.tui-editor-socket p{margin:1rem 0}.tui-editor-socket p>span{line-height:initial}.tui-editor-socket blockquote{margin:1.25rem 0 1.25rem 1.5rem;padding-left:1.0625rem;border-left:1px solid var(--tui-base-04)}.tui-editor-socket hr{border:none;border-top:1px solid var(--tui-base-03);margin:1rem 0}.tui-editor-socket mark{background:unset;color:inherit}.tui-editor-socket font[face="Courier New"]{display:inline-block;padding:.25rem .5rem;border-radius:.25rem;background-color:#ecf1f7;word-break:break-word}.tui-editor-socket a:not([data-type="jump-anchor"]){color:var(--tui-link);text-decoration:none;outline:none}.tui-editor-socket a:not([data-type="jump-anchor"]):hover{color:var(--tui-link-hover);text-decoration:underline}.tui-editor-socket a:not([data-type="jump-anchor"]):active{color:var(--tui-primary-active)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]{text-decoration:underline;-webkit-text-decoration-color:var(--tui-link);text-decoration-color:var(--tui-link)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:before{content:"#"}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:hover{color:var(--tui-link)}.tui-editor-socket .ProseMirror a:hover img[contenteditable=false]{cursor:pointer;outline:.25rem solid var(--tui-link)}.tui-editor-socket ul:not([data-type]),.tui-editor-socket ol:not([data-type]){list-style-type:none;margin:1rem 1rem 1rem 1.5rem;padding:0}.tui-editor-socket ul:not([data-type]) li,.tui-editor-socket ol:not([data-type]) li{margin:.75rem 0}.tui-editor-socket ul:not([data-type]) li>p,.tui-editor-socket ol:not([data-type]) li>p{display:inline;margin:0 auto;word-break:break-word}.tui-editor-socket ul:not([data-type]) li:before,.tui-editor-socket ol:not([data-type]) li:before{unicode-bidi:-webkit-isolate;unicode-bidi:isolate;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;text-transform:none;text-indent:0;text-align:start;text-align-last:start}.tui-editor-socket ul:not([data-type]) li>p{display:block}.tui-editor-socket ul:not([data-type])>li:before{content:"";display:inline-block;width:.5rem;height:.5rem;border-radius:100%;margin:.5rem .875rem .0625rem -1.375rem;background-color:var(--tui-primary);vertical-align:top;box-sizing:border-box;float:left}.tui-editor-socket li ul:not([data-type])>li:before{background:none;border:.125rem solid var(--tui-primary)}.tui-editor-socket li ul:not([data-type])>li>ul:not([data-type])>li:before{background:var(--tui-primary);border-radius:0;width:.375rem;height:.375rem}.tui-editor-socket ol:not([data-type]){counter-reset:item}.tui-editor-socket ol:not([data-type])>li:before{content:counters(item,".") ".";display:block;counter-increment:item;margin:0 .75rem 0 -1.5rem;color:var(--tui-base-05);vertical-align:top;float:left;white-space:nowrap}.tui-editor-socket [data-type=details-content] ol{counter-reset:details-item}.tui-editor-socket [data-type=details-content] ol:not([data-type])>li:before{content:counters(details-item,".") ".";counter-increment:details-item}.tui-editor-socket [data-type=details-content] ol [data-type=details-content] ol{counter-reset:details-item2}.tui-editor-socket [data-type=details-content] ol:not([data-type])>li [data-type=details-content] ol:not([data-type])>li:before{content:counters(details-item2,".") ".";counter-increment:details-item2}.tui-editor-socket ul[data-type] li[data-checked]{display:flex;grid-gap:.5rem;gap:.5rem}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]{position:relative;width:var(--t-size, 1rem);height:var(--t-size, 1rem);border-radius:var(--tui-radius-xs, .25rem);transition-property:color,background,opacity,box-shadow,border;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:.125rem solid transparent;outline-offset:-.125rem;margin-top:.25rem;cursor:pointer}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:currentColor;-webkit-mask:url('data:image/svg+xml,') center / 100%;mask:url('data:image/svg+xml,') center / 100%;transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out,-webkit-mask 0s var(--tui-duration) ease-in-out}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked{background:var(--tui-primary, #526ed3);color:var(--tui-primary-text, #fff)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked:before{-webkit-mask-image:url('data:image/svg+xml,');mask-image:url('data:image/svg+xml,');transform:scale(1)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]{box-shadow:inset 0 0 0 1px var(--tui-base-04);color:var(--tui-text-01)}.tui-editor-socket._preview-image img{cursor:pointer}.tui-editor-socket .ProseMirror video,.tui-editor-socket .ProseMirror audio{pointer-events:none}.tui-editor-socket img.ProseMirror-selectednode{outline:.25rem solid var(--tui-primary-hover)}.tui-editor-socket .t-editor-placeholder:before{content:attr(data-placeholder);float:left;color:var(--tui-base-05);pointer-events:none;height:0}.tui-editor-socket table{border-collapse:collapse;table-layout:unset;width:100%;margin:0;overflow:hidden}.tui-editor-socket table .tableWrapper{overflow-x:auto}.tui-editor-socket .tableWrapper,.tui-editor-socket .tui-table-wrapper{overflow-x:auto}.tui-editor-socket table td{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word}.tui-editor-socket table th{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word;font-weight:bold;text-align:left;background-color:var(--tui-base-02);min-height:2rem}.tui-editor-socket table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:-2px;width:4px;background-color:#adf;pointer-events:none}.tui-editor-socket table td>*{margin-top:0;margin-bottom:0}.tui-editor-socket table th>*{margin-top:0;margin-bottom:0}.tui-editor-socket .selectedCell:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--tui-selection);pointer-events:none}.tui-editor-socket summary{display:flex;align-items:center;min-height:3.5rem;width:100%;padding:0 1.25rem;box-sizing:border-box;border-radius:var(--tui-radius-l);pointer-events:none;outline:none}.tui-editor-socket summary:focus-visible{outline:2px solid var(--tui-link)}.tui-editor-socket summary p{min-width:1px;margin:0}.tui-editor-socket summary::-webkit-details-marker{display:none}.tui-editor-socket details[open] summary{border-radius:var(--tui-radius-l) var(--tui-radius-l) 0 0}.tui-editor-socket .details-arrow,.tui-editor-socket .t-details-arrow{position:absolute;top:1.5rem;right:1.25rem;height:.575rem;width:.575rem;border:1px solid var(--tui-base-06);border-width:0 2px 2px 0;transform:rotate(45deg);transition:var(--tui-duration, .3s);-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;padding:0;background:none;cursor:pointer;outline:none}.tui-editor-socket details{width:100%;border:1px solid var(--tui-base-04);border-radius:var(--tui-radius-l)}.tui-editor-socket div[data-type=details-content]{padding:1.25rem;min-height:3rem;border:1px solid var(--tui-base-04);border-width:1px 0 0}.tui-editor-socket div[data-type=details-content] h1:first-child,.tui-editor-socket div[data-type=details-content] h2:first-child,.tui-editor-socket div[data-type=details-content] pre:first-child,.tui-editor-socket div[data-type=details-content] ul:first-child,.tui-editor-socket div[data-type=details-content] ol:first-child,.tui-editor-socket div[data-type=details-content] ol li:first-child,.tui-editor-socket div[data-type=details-content] ul li:first-child{margin-top:0}.tui-editor-socket .details-wrapper,.tui-editor-socket .t-details-wrapper{margin-bottom:.5rem;position:relative;display:flex}.tui-editor-socket .details-wrapper_rendered .details-arrow,.tui-editor-socket .t-details-wrapper_rendered .details-arrow,.tui-editor-socket .details-wrapper_rendered .t-details-arrow,.tui-editor-socket .t-details-wrapper_rendered .t-details-arrow{pointer-events:none}.tui-editor-socket .details-wrapper_rendered summary,.tui-editor-socket .t-details-wrapper_rendered summary{transition:transform var(--tui-duration, .3s);cursor:pointer;pointer-events:auto}.tui-editor-socket .details-wrapper_rendered summary:hover,.tui-editor-socket .t-details-wrapper_rendered summary:hover{background:var(--tui-base-02)}.tui-editor-socket details[open]+.details-arrow,.tui-editor-socket details[open]+.t-details-arrow{top:1.75rem;transform:rotate(225deg)}.tui-editor-socket pre{white-space:pre-wrap;word-break:break-word;border-radius:.25rem;margin:1rem 0;padding:.75rem 1rem;font-family:Courier,monospace;color:var(--tui-text-02);background:var(--tui-base-02)}.tui-editor-socket .tui-group-node{display:flex;flex-direction:row}.tui-editor-socket .tui-group-node:hover>.tui-group-pointer{pointer-events:auto;opacity:1}.tui-editor-socket .tui-group-pointer{opacity:0;min-height:.8125rem;max-height:.8125rem;min-width:.8125rem;max-width:.8125rem;margin:.3125rem .3125rem 0 0;cursor:grab;background-image:url('data:image/svg+xml;charset=UTF-8,');background-repeat:no-repeat;background-size:contain;background-position:center}.tui-editor-socket [data-mode=onDark] .tui-group-pointer{background-image:url('data:image/svg+xml;charset=UTF-8,')} -`],encapsulation:2,changeDetection:0}),e})(),ym=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Ab=["*",[["tools"]],[["tools"]],[["mention"]]],kb=["*","tools","tools","mention"];function Rb(e,n){if(e&1){let t=F();g(0,"tui-toolbar",10),C("fileAttached",function(o){I(t);let r=u(2);return x(r.fileAttached.emit(o))}),me(1,1),v()}if(e&2){let t=u(2);l("disabled",!t.interactive)("tools",t.tools)}}function Fb(e,n){if(e&1&&(g(0,"div",11),Te(1),v()),e&2){let t=u(2);h(),Ne(" ",t.exampleText," ")}}function Lb(e,n){if(e&1){let t=F();g(0,"tui-scrollbar",14),C("mousedown",function(o){I(t);let r=u(3);return x(r.focus(o))}),Ut(1,15),v()}if(e&2){u();let t=j(4);h(),l("ngTemplateOutlet",t)}}function Hb(e,n){if(e&1){let t=F();g(0,"tui-scrollbar",16),C("mousedown",function(o){I(t);let r=u(3);return x(r.focus(o))}),Ut(1,15),S(2,"tui-editor-portal-host"),v()}if(e&2){u();let t=j(4);h(),l("ngTemplateOutlet",t)}}function Nb(e,n){if(e&1){let t=F();g(0,"tui-toolbar",21),C("fileAttached",function(o){I(t);let r=u(5);return x(r.fileAttached.emit(o))}),me(1,2),v()}if(e&2){let t=u().$implicit,i=u(4);l("disabled",!i.interactive)("tools",i.tools)("tuiActiveZoneParent",t)}}function jb(e,n){if(e&1){let t=F();g(0,"tui-edit-link",22,2),C("addLink",function(o){I(t);let r=j(1),s=u(5);return x(r.anchorMode?s.addAnchor(o):s.addLink(o))})("removeLink",function(){I(t);let o=j(1),r=u(5);return x(o.anchorMode?r.removeAnchor():r.removeLink())}),v()}}function Ub(e,n){e&1&&(Ie(0),me(1,3),xe())}function zb(e,n){if(e&1&&(g(0,"div"),T(1,Nb,2,3,"tui-toolbar",19)(2,jb,2,0,"tui-edit-link",20)(3,Ub,2,0,"ng-container",9),v()),e&2){let t=u(3).ngIf,i=u();J("t-floating",i.floatingToolbar),h(),l("ngIf",t&&i.floatingToolbar),h(),l("ngIf",i.isLinkSelected),h(),l("ngIf",i.isMentionMode)}}function Bb(e,n){if(e&1){let t=F();g(0,"div",17)(1,"tui-editor-socket",18),C("stateChange",function(){return I(t),x(0)})("valueChange",function(o){I(t);let r=u(3);return x(r.onModelChange(o))}),v()(),T(2,zb,4,5,"ng-template",null,1,de)}if(e&2){let t=j(3),i=u(3);l("tuiDropdown",t)("tuiToolbarDropdown",i.dropdownSelectionHandler)("tuiToolbarDropdownPosition",i.floatingToolbar?"selection":"tag"),h(),l("editable",i.interactive)("value",i.value)}}function Vb(e,n){if(e&1&&(Ie(0),T(1,Lb,2,1,"tui-scrollbar",12)(2,Hb,3,1,"tui-scrollbar",13)(3,Bb,4,5,"ng-template",null,0,de),xe()),e&2){let t=u(2);h(),l("ngIf",t.floatingToolbar),h(),l("ngIf",!t.floatingToolbar)}}function $b(e,n){if(e&1){let t=F();g(0,"div",4),C("tuiActiveZoneChange",function(o){I(t);let r=u();return x(r.onActiveZone(o))}),g(1,"div",5),T(2,Rb,2,2,"tui-toolbar",6),g(3,"div",7),me(4),v(),T(5,Fb,2,1,"div",8),v(),T(6,Vb,5,2,"ng-container",9),v()}if(e&2){let t=n.ngIf,i=u();l("appearance",i.options.appearence)("disabled",i.disabled)("focus",i.computedFocused)("hover",i.pseudoHover)("invalid",i.computedInvalid)("readOnly",i.readOnly),h(2),l("ngIf",t&&!i.floatingToolbar),h(),J("t-placeholder_raised",i.placeholderRaised),h(2),l("ngIf",i.hasExampleText),h(),l("ngIf",t)}}var Wb=(()=>{class e extends Gh{constructor(){super(...arguments),this.previousTagPosition=null,this.stream$=wt([this.handler$,this.selection$.pipe(b(()=>this.getRange()),oe((t,i)=>t.startOffset===i.startOffset&&t.endOffset===i.endOffset))]).pipe(b(([t,i])=>{var o;let r=this.el.nativeElement.contains(i.commonAncestorContainer)||((o=i.commonAncestorContainer.parentElement)===null||o===void 0?void 0:o.closest("tui-dropdown"));return this.range=r&&as(i.commonAncestorContainer)?i:this.range,r&&t(this.range)||this.inDropdown(i)})),this.position="selection"}set tuiToolbarDropdown(t){this.tuiDropdownSelection=t}getClientRect(){var t,i,o,r;switch(this.position){case"tag":{let{commonAncestorContainer:s}=this.range,c=pt(s)?s:s.parentNode;return!((t=c==null?void 0:c.parentElement)===null||t===void 0)&&t.closest("tui-dropdown")?(i=this.previousTagPosition)!==null&&i!==void 0?i:ai:(this.previousTagPosition=c&&pt(c)?((o=this.doc.querySelector(".ProseMirror-selectednode"))===null||o===void 0?void 0:o.getBoundingClientRect())||c.getBoundingClientRect():ai,this.previousTagPosition)}case"word":return bs(this.range).getBoundingClientRect();default:{let s=this.range.getBoundingClientRect();return s.x===0&&s.y===0&&s.width===0&&s.height===0?((r=this.el.nativeElement.querySelector("p"))!==null&&r!==void 0?r:this.el.nativeElement).getBoundingClientRect():s}}}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiToolbarDropdown",""]],inputs:{position:[0,"tuiToolbarDropdownPosition","position"],tuiToolbarDropdown:"tuiToolbarDropdown"},features:[A([Zi(e),Dn(e)]),W]}),e})(),bm=(()=>{class e extends Hn{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),Gb=[{provide:Qa,deps:[Ud],useFactory:e=>{let n=new no(1);return Promise.all(e).then(t=>n.next(t)),n}},{provide:lr,deps:[ji],useFactory:e=>e.createElement("div")},{provide:vo,deps:[lr,Qa,qd],useFactory:(e,n,t)=>wt([t,n]).pipe(Wt(1),b(([i,o])=>new i({element:e,extensions:o})),Zr({bufferSize:1,refCount:!0}))},De,bm],Yb=(()=>{class e extends _o{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275cmp=k({type:e,selectors:[["tui-editor-portal-host"]],features:[A([{provide:Hn,useExisting:To},{provide:_o,useExisting:e}]),W],decls:2,vars:0,consts:[["viewContainer",""]],template:function(t,i){t&1&&Ut(0,null,0)},styles:["[_nghost-%COMP%]{position:absolute;top:0;left:0;display:block;height:100%;width:100%;pointer-events:none}"],changeDetection:0}),e})(),Zb=(()=>{class e extends fi{constructor(t){super(),this.el=t,this.type="viewport"}getClientRect(){return this.el.nativeElement.getBoundingClientRect()}}return e.\u0275fac=function(t){return new(t||e)(a(N))},e.\u0275dir=w({type:e,selectors:[["","tuiEditorPortal",""]],features:[A([{provide:To,useExisting:bm},Kp(e)]),W]}),e})(),tN=(()=>{class e extends Ai{constructor(t,i,o,r,s,c,d,p,_){super(t,i,d),this.editorLoaded$=o,this.editorService=r,this.contentProcessor=s,this.doc=c,this.options=p,this.zone=_,this.exampleText="",this.tools=go,this.floatingToolbar=!1,this.fileAttached=new Pe,this.hasMentionPlugin=!1,this.focused=!1,this.openDropdownWhen=y=>this.currentFocusedNodeIsTextAnchor(y)||this.currentFocusedNodeIsImageAnchor||this.isMentionMode,this.editorLoaded$.pipe(ri(0),re(this.destroy$)).subscribe(()=>{this.hasMentionPlugin=!!this.editorService.getOriginTiptapEditor().extensionManager.extensions.find(y=>y.name==="mention"),this.patchContentEditableElement(),this.listenResizeEvents()})}get nativeFocusableElement(){var t,i;return this.computedDisabled?null:((i=(t=this.el)===null||t===void 0?void 0:t.nativeElement)===null||i===void 0?void 0:i.querySelector("[contenteditable].ProseMirror"))||null}get dropdownSelectionHandler(){return this.floatingToolbar?Bi:this.focused?this.openDropdownWhen:cn}get editor(){return this.editorService.getOriginTiptapEditor()?this.editorService:null}get placeholderRaised(){return this.computedFocused&&!this.readOnly||this.hasValue}get hasExampleText(){return!!this.exampleText&&this.computedFocused&&!this.hasValue&&!this.readOnly}get isLinkSelected(){var t,i,o;let r=(t=this.doc.getSelection())===null||t===void 0?void 0:t.focusNode,s=r==null?void 0:r.parentNode;return(s==null?void 0:s.nodeName.toLowerCase())==="a"||((i=s==null?void 0:s.parentNode)===null||i===void 0?void 0:i.nodeName.toLowerCase())==="a"||(r==null?void 0:r.nodeName.toLowerCase())==="a"||!!(!((o=s==null?void 0:s.parentElement)===null||o===void 0)&&o.closest("tui-edit-link"))}get mentionSuggestions(){let t=this.selectionState.before;return t!=null&&t.startsWith("@")&&t.length>1&&(t==null?void 0:t.replace("@",""))||""}get isMentionMode(){var t;return this.hasMentionPlugin&&((t=this.selectionState.before)===null||t===void 0?void 0:t.startsWith("@"))}writeValue(t){var i,o;if(t===this.value)return;let r=this.contentProcessor(t||"");super.writeValue(r),r!==t&&((i=this.control)===null||i===void 0||i.setValue(r,{onlySelf:!1,emitEvent:!1,emitModelToViewChange:!1,emitViewToModelChange:!1})),this.focused||(o=this.doc.getSelection())===null||o===void 0||o.removeAllRanges()}onActiveZone(t){var i;this.focused=t,this.updateFocused(t),(i=this.control)===null||i===void 0||i.updateValueAndValidity()}onModelChange(t){this.value=t}addAnchor(t){var i;(i=this.editor)===null||i===void 0||i.setAnchor(t)}removeAnchor(){var t;(t=this.editor)===null||t===void 0||t.removeAnchor()}addLink(t){var i,o;(i=this.editor)===null||i===void 0||i.selectClosest(),(o=this.editor)===null||o===void 0||o.setLink(t)}removeLink(){var t;(t=this.editor)===null||t===void 0||t.unsetLink()}get selectionState(){return Rd(this.editor)}focus(t){var i,o;!((i=this.nativeFocusableElement)===null||i===void 0)&&i.contains(t.target)||(t.preventDefault(),(o=this.nativeFocusableElement)===null||o===void 0||o.focus())}ngOnDestroy(){var t;(t=this.editor)===null||t===void 0||t.destroy()}getFallbackValue(){return""}currentFocusedNodeIsTextAnchor(t){var i,o;return!!(!((o=(i=t.startContainer.parentElement)===null||i===void 0?void 0:i.closest("a"))===null||o===void 0)&&o.contains(this.focusNode))&&Ld(t)}get focusNode(){var t,i;return(i=(t=this.doc.getSelection())===null||t===void 0?void 0:t.focusNode)!==null&&i!==void 0?i:null}get hasValue(){return!!this.value}get currentFocusedNodeIsImageAnchor(){var t,i,o;return((t=this.focusNode)===null||t===void 0?void 0:t.nodeName)==="A"&&["IMG","TUI-IMAGE-EDITOR"].includes((o=(i=this.focusNode)===null||i===void 0?void 0:i.childNodes[0])===null||o===void 0?void 0:o.nodeName)}patchContentEditableElement(){var t,i;(t=this.nativeFocusableElement)===null||t===void 0||t.setAttribute("translate",this.options.translate),(i=this.nativeFocusableElement)===null||i===void 0||i.setAttribute("spellcheck",String(this.options.spellcheck))}listenResizeEvents(){var t,i;!((t=this.el)===null||t===void 0)&&t.nativeElement&&er((i=this.el)===null||i===void 0?void 0:i.nativeElement,Hd).pipe(rn(0),$i(this.zone),re(this.destroy$)).subscribe(()=>this.editorService.valueChange$.next(this.editorService.getHTML()))}}return e.\u0275fac=function(t){return new(t||e)(a(zi,10),a(ft),a(vo),a(De),a(zd),a(qe),a(Bd,8),a(Ee),a(Xe))},e.\u0275cmp=k({type:e,selectors:[["tui-editor"]],viewQuery:function(t,i){if(t&1&&(at(zo,5,N),at(fa,5)),t&2){let o;$e(o=We())&&(i.el=o.first),$e(o=We())&&(i.toolbar=o.first)}},inputs:{exampleText:"exampleText",tools:"tools",floatingToolbar:"floatingToolbar"},outputs:{fileAttached:"fileAttached"},features:[A([ei(e),lp({delay:yc}),Gb]),W],ngContentSelectors:kb,decls:2,vars:3,consts:[["editor",""],["dropdown",""],["link",""],["tuiWrapper","","class","t-wrapper",3,"appearance","disabled","focus","hover","invalid","readOnly","tuiActiveZoneChange",4,"ngIf"],["tuiWrapper","",1,"t-wrapper",3,"tuiActiveZoneChange","appearance","disabled","focus","hover","invalid","readOnly"],[1,"t-toolbar-wrapper"],[3,"disabled","tools","fileAttached",4,"ngIf"],[1,"t-placeholder"],["class","t-example-text",4,"ngIf"],[4,"ngIf"],[3,"fileAttached","disabled","tools"],[1,"t-example-text"],["class","t-scrollbar",3,"mousedown",4,"ngIf"],["tuiEditorPortal","","class","t-scrollbar",3,"mousedown",4,"ngIf"],[1,"t-scrollbar",3,"mousedown"],[3,"ngTemplateOutlet"],["tuiEditorPortal","",1,"t-scrollbar",3,"mousedown"],["tuiDropdownLimitWidth","auto",3,"tuiDropdown","tuiToolbarDropdown","tuiToolbarDropdownPosition"],["tuiTiptapEditor","",3,"stateChange","valueChange","editable","value"],[3,"disabled","tools","tuiActiveZoneParent","fileAttached",4,"ngIf"],[3,"addLink","removeLink",4,"ngIf"],[3,"fileAttached","disabled","tools","tuiActiveZoneParent"],[3,"addLink","removeLink"]],template:function(t,i){t&1&&(Ve(Ab),T(0,$b,7,11,"div",3),R(1,"async")),t&2&&l("ngIf",H(1,1,i.editorLoaded$))},dependencies:[fa,jo,Yb,Cm,pa,ee,Ki,gt,ju,Zb,Di,ii,Ks,Wn,Wb,zo,K],styles:["[_nghost-%COMP%]{position:relative;z-index:0;display:block;font:var(--tui-font-text-m);border-radius:var(--tui-radius-m);max-height:inherit;min-height:10rem;box-sizing:border-box;overflow:clip}.t-wrapper[_ngcontent-%COMP%]{display:flex;max-height:inherit;min-height:inherit;cursor:text;overflow:clip;flex-direction:column;border-radius:inherit}.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);margin:1rem 1rem -1rem;min-height:1.625rem;width:95%;font-size:.9375rem}@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-placeholder_raised[_ngcontent-%COMP%]{width:110%}.t-placeholder[_ngcontent-%COMP%]:empty{min-height:.8rem}.t-example-text[_ngcontent-%COMP%]{position:absolute;left:1rem;margin-top:1.6rem;color:var(--tui-base-06);letter-spacing:normal;text-transform:none}.t-example-text_light[_ngcontent-%COMP%]{color:var(--tui-text-03-night)}.t-example-text_dark[_ngcontent-%COMP%]{color:var(--tui-text-03)}.t-scrollbar[_ngcontent-%COMP%]{display:flex;border-bottom:.3125rem solid transparent;padding-bottom:1.3125rem;box-sizing:border-box;flex:1}.t-floating[_ngcontent-%COMP%], .t-floating[_ngcontent-%COMP%] .t-tools-wrapper{max-width:var(--tui-floating-toolbar-max-width, 31.25rem);flex-wrap:nowrap}"],changeDetection:0}),e})(),iN=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[Ts,z,Tm,Qi,Uo,ha,yi,vi,Mf,ym]]}),e})();var Dm=lg(Mm());var Xb=new se("Config for DOMPurify",{factory:()=>({}),providedIn:"root"}),qb=new se("Hooks for DOMPurify",{factory:()=>[],providedIn:"root"}),Kb=new se("A function that sanitizes value for a CSS rule",{factory:()=>e=>e,providedIn:"root"}),Qb=Dm.default,uN=(()=>{class e{constructor(t,i,{defaultView:o},r){this.config=t,this.sanitizeStyle=i,this.domPurify=Qb(o),r.forEach(({name:s,hook:c})=>{this.domPurify.addHook(s,c)})}sanitize(t,i,o=this.config){if(t===xi.SCRIPT)throw new Error("DOMPurify does not support SCRIPT context");return t===xi.STYLE?this.sanitizeStyle(String(i)):this.domPurify.sanitize(String(i||""),o)}}return e.\u0275fac=function(t){return new(t||e)(ye(Xb),ye(Kb),ye(qe),ye(qb))},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var dN=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();export{Dv as a,Yx as b,Jb as c,Ln as d,ui as e,ur as f,Je as g,lt as h,dr as i,Ai as j,tp as k,hs as l,wM as m,IM as n,SM as o,PM as p,np as q,ZM as r,op as s,Zt as t,gt as u,yi as v,hp as w,fp as x,mp as y,gp as z,yn as A,bn as B,vs as C,_s as D,vp as E,_p as F,xt as G,Ot as H,bp as I,Mp as J,$w as K,Ww as L,eI as M,Dp as N,wp as O,Ip as P,mI as Q,gI as R,cc as S,_I as T,TI as U,CI as V,pi as W,di as X,Nn as Y,lc as Z,uc as _,dc as $,Op as aa,Qp as ba,Nh as ca,No as da,zO as ea,MI as fa,DI as ga,Hp as ha,Gi as ia,Mo as ja,zg as ka,Bg as la,bc as ma,Do as na,wo as oa,WI as pa,GI as qa,Wg as ra,Ds as sa,qI as ta,Gg as ua,Yi as va,KI as wa,Io as xa,tx as ya,Xp as za,qp as Aa,ix as Ba,uO as Ca,Lh as Da,Hh as Ea,Ft as Fa,Lt as Ga,Mi as Ha,xn as Ia,jo as Ja,Uo as Ka,D1 as La,m0 as Ma,hl as Na,vi as Oa,Js as Pa,Le as Qa,E0 as Ra,A0 as Sa,tf as Ta,sf as Ua,F0 as Va,kr as Wa,ea as Xa,Ki as Ya,Qi as Za,na as _a,oa as $a,_e as ab,Me as bb,ra as cb,sa as db,gT as eb,iE as fb,wT as gb,mT as hb,qP as ib,ot as jb,rt as kb,gf as lb,vf as mb,_f as nb,iC as ob,nC as pb,j2 as qb,z2 as rb,tR as sb,dR as tb,hR as ub,Lr as vb,MR as wb,IR as xb,xR as yb,NR as zb,jR as Ab,gC as Bb,vC as Cb,CC as Db,nk as Eb,Ck as Fb,yf as Gb,tN as Hb,iN as Ib,uN as Jb,dN as Kb}; -//# sourceMappingURL=chunk-7Z3ZNFQW.js.map +`)+1;return[t?i:r,t?r:o]}function zf({value:e,selection:n},t){let[i,o]=n;return i!==o?[i,o]:(t?[i,o+1]:[i-1,o]).map(s=>Math.min(Math.max(s,0),e.length))}var Bf=/\s+$/g,Vf=/^\s+/g,$f=/\s/;function cy({value:e,selection:n},t){let[i,o]=n;if(i!==o)return[i,o];if(t){let d=e.slice(i),[p]=d.match(Vf)||[""],_=d.replace(Vf,"").search($f);return[i,_!==-1?i+p.length+_:e.length]}let r=e.slice(0,o),[s]=r.match(Bf)||[""],c=r.replace(Bf,"").split("").reverse().findIndex(d=>d.match($f));return[c!==-1?o-s.length-c:0,o]}function ca(e=[]){return(n,...t)=>e.reduce((i,o)=>Object.assign(Object.assign({},i),o(i,...t)),n)}function Yf(e,n){let t=Object.assign(Object.assign({},Lr),n),i=ca(t.preprocessors),o=ca(t.postprocessors),r=typeof e=="string"?{value:e,selection:[0,0]}:e,{elementState:s}=i({elementState:r,data:""},"validation"),c=new Fr(s,t),{value:d,selection:p}=o(c,r);return typeof e=="string"?d:{value:d,selection:p}}var la=class extends Cl{constructor(n,t){super(),this.element=n,this.maskitoOptions=t,this.isTextArea=this.element.nodeName==="TEXTAREA",this.eventListener=new yl(this.element),this.options=Object.assign(Object.assign({},Lr),this.maskitoOptions),this.preprocessor=ca(this.options.preprocessors),this.postprocessor=ca(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(ny(i))return i.preventDefault(),this.redo();if(oy(i))return i.preventDefault(),this.undo()}),ry(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:zf(this.elementState,o)});case"deleteWordForward":case"deleteWordBackward":return this.handleDelete({event:i,isForward:o,selection:cy(this.elementState,o),force:!0});case"deleteSoftLineBackward":case"deleteSoftLineForward":case"deleteHardLineBackward":case"deleteHardLineForward":return this.handleDelete({event:i,isForward:o,selection:ay(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:t,selectionEnd:i}=this.element;return{value:n,selection:[t||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:t},i={inputType:"insertText",data:null}){let o=this.elementState.value;this.updateValue(n),this.updateSelectionRange(t),o!==n&&this.dispatchInputEvent(i)}updateSelectionRange([n,t]){var i,o;(this.element.selectionStart!==n||this.element.selectionEnd!==t)&&((o=(i=this.element).setSelectionRange)===null||o===void 0||o.call(i,n,t))}updateValue(n){this.element.value=n}ensureValueFitsMask(){this.updateElementState(Yf(this.elementState,this.options))}dispatchInputEvent(n={inputType:"insertText",data:null}){let t=typeof window<"u"?window:globalThis;t!=null&&t.InputEvent&&this.element.dispatchEvent(new InputEvent("input",Object.assign(Object.assign({},n),{bubbles:!0,cancelable:!1})))}handleKeydown(n){let t=n.key,i=t==="Delete";switch(t){case"Backspace":case"Delete":return this.handleDelete({event:n,isForward:i,selection:zf(this.elementState,i)});case"Enter":return this.handleEnter(n)}sy(n)&&this.handleInsert(n,t)}handleDelete({event:n,selection:t,isForward:i,force:o=!1}){let r={value:this.elementState.value,selection:t},[s,c]=r.selection,{elementState:d}=this.preprocessor({elementState:r,data:""},i?"deleteForward":"deleteBackward"),p=new Fr(d,this.options),[_,C]=d.selection;p.deleteCharacters([_,C]);let O=this.postprocessor(p,r);if(r.value.slice(0,s)+r.value.slice(c)===O.value&&!o)return;if(n.preventDefault(),QC(r,d,p,O))return this.updateSelectionRange(i?[C,C]:[_,_]);let Z=i?"deleteContentForward":"deleteContentBackward";this.updateElementState(O,{inputType:"inputType"in n?n.inputType:Z,data:null}),this.updateHistory(O)}handleInsert(n,t){let i=this.elementState,{elementState:o,data:r=t}=this.preprocessor({data:t,elementState:i},"insert"),s=new Fr(o,this.options);try{s.addCharacters(o.selection,r)}catch{return n.preventDefault()}let[c,d]=o.selection,p=o.value.slice(0,c)+t+o.value.slice(d),_=this.postprocessor(s,i);if(_.value.length>this.maxLength)return n.preventDefault();p!==_.value&&(n.preventDefault(),this.updateElementState(_,{data:t,inputType:"inputType"in n?n.inputType:"insertText"}),this.updateHistory(_))}handleEnter(n){this.isTextArea&&this.handleInsert(n,` +`)}};var MR=Vh({limitWidth:"fixed",align:"right"}),da={provide:Is,deps:[[new tt,new fn,is]],useFactory:io};var IR=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=w({type:e,selectors:[["","tuiValueAccessor",""]],features:[A([da])]}),e})(),xR=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();function Zf(e,n,t,i){function o(r){return r instanceof t?r:new t(function(s){s(r)})}return new(t||(t=Promise))(function(r,s){function c(_){try{p(i.next(_))}catch(C){s(C)}}function d(_){try{p(i.throw(_))}catch(C){s(C)}}function p(_){_.done?r(_.value):o(_.value).then(c,d)}p((i=i.apply(e,n||[])).next())})}var NR=(()=>{class e{constructor(t,i){this.ngZone=t,this.elementRef=i,this.maskedElement=null,this.maskito=Lr,this.maskitoElement=Wf}ngOnChanges(){var t;return Zf(this,void 0,void 0,function*(){(t=this.maskedElement)===null||t===void 0||t.destroy();let i=this.maskitoElement,o=yield i(this.elementRef.nativeElement);this.maskitoElement===i&&this.ngZone.runOutsideAngular(()=>{var r;this.maskedElement=new la(o,(r=this.maskito)!==null&&r!==void 0?r:Lr)})})}ngOnDestroy(){var t;(t=this.maskedElement)===null||t===void 0||t.destroy()}}return e.\u0275fac=function(t){return new(t||e)(a(Xe),a(N))},e.\u0275dir=w({type:e,selectors:[["","maskito",""]],inputs:{maskito:"maskito",maskitoElement:"maskitoElement"},features:[qt]}),e})();var jR=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var ly=["native"],uy=["text"],dy=["*"];function py(e,n){e&1&&(g(0,"span",5),me(1),v())}var Xf=(()=>{class e extends Ai{constructor(t,i){super(t,i),this.maxLength=null,this.indent=-1}get nativeFocusableElement(){return this.native?this.native.nativeElement:null}get focused(){return Qt(this.nativeFocusableElement)}get hasValue(){return this.value!==""}onValueChange(t){this.text&&(this.text.nativeElement.textContent=t,this.text.nativeElement.style.textIndent="",this.value=t)}onFocused(t){this.updateFocused(t)}onScroll(){var t;let i=((t=this.native)===null||t===void 0?void 0:t.nativeElement.scrollLeft)||0;this.indent=-1-i}getFallbackValue(){return""}}return e.\u0275fac=function(t){return new(t||e)(a(zi,10),a(ft))},e.\u0275cmp=k({type:e,selectors:[["tui-input-inline"]],viewQuery:function(t,i){if(t&1&&(at(ly,5),at(uy,5)),t&2){let o;$e(o=We())&&(i.native=o.first),$e(o=We())&&(i.text=o.first)}},inputs:{maxLength:"maxLength"},features:[A([da,ei(e)]),W],ngContentSelectors:dy,decls:5,vars:10,consts:[["text",""],["native",""],[1,"t-before",3,"textContent"],["automation-id","tui-input-inline__placeholder","class","t-placeholder",4,"ngIf"],["automation-id","tui-input-inline__native","tuiMaskAccessor","","type","text",1,"t-native",3,"ngModelChange","scroll","tuiFocusedChange","disabled","id","ngModel","readOnly","tuiFocusable"],["automation-id","tui-input-inline__placeholder",1,"t-placeholder"]],template:function(t,i){if(t&1){let o=F();Ve(),S(0,"span",2,0),T(2,py,2,0,"span",3),g(3,"input",4,1),y("ngModelChange",function(s){return I(o),x(i.onValueChange(s))})("scroll",function(){return I(o),x(i.onScroll())})("tuiFocusedChange",function(s){return I(o),x(i.onFocused(s))}),v()}t&2&&(nt("text-indent",i.indent,"px"),l("textContent",i.value),h(2),l("ngIf",!i.hasValue),h(),l("disabled",i.computedDisabled)("id",i.id)("ngModel",i.value)("readOnly",i.readOnly)("tuiFocusable",i.focusable),fe("maxLength",i.maxLength))},dependencies:[ee,ta,ao,co,an,yn,vs],styles:["[_nghost-%COMP%]{position:relative;display:inline-block;overflow:hidden;white-space:nowrap;box-sizing:border-box}.t-before[_ngcontent-%COMP%]{display:block;padding-right:.02em;margin-left:1px;white-space:pre}.t-placeholder[_ngcontent-%COMP%]{display:inline-block;min-width:1px}.t-native[_ngcontent-%COMP%]{position:absolute;top:0;left:0;background-color:transparent;padding:inherit;font:inherit;-webkit-text-fill-color:transparent;box-sizing:border-box;width:100%;height:100%;border-width:0;text-align:inherit;letter-spacing:inherit;text-indent:inherit;text-transform:inherit;outline:none}"],changeDetection:0}),e})(),qf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lo,bn,_s,ia]]}),e})();function hy(e,n){if(e&1){let t=F();g(0,"button",1),y("click",function(){let o=I(t).$implicit,r=u();return x(r.selectedColor.emit(o.value))}),v()}if(e&2){let t=n.$implicit;nt("background",t.value),l("id",t.key)("tuiHint",t.key)("tuiHintDescribe",t.key)}}var Bo=(()=>{class e{constructor(){this.colors=new Map,this.selectedColor=new Pe,this.originalOrder=(t,i)=>0}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=k({type:e,selectors:[["tui-palette"]],inputs:{colors:"colors"},outputs:{selectedColor:"selectedColor"},decls:2,vars:4,consts:[["type","button","class","t-button",3,"id","background","tuiHint","tuiHintDescribe","click",4,"ngFor","ngForOf"],["type","button",1,"t-button",3,"click","id","tuiHint","tuiHintDescribe"]],template:function(t,i){t&1&&(T(0,hy,1,5,"button",0),R(1,"keyvalue")),t&2&&l("ngForOf",Su(1,1,i.colors,i.originalOrder))},dependencies:[Ui,be,ke,ve,Se,Ae,zu],styles:["[_nghost-%COMP%]{display:flex;flex-wrap:wrap;padding:.875rem}.t-button[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;width:1.5625rem;height:1.5625rem;box-sizing:border-box;margin:.375rem;border-radius:var(--tui-radius-m);border:1px solid rgba(0,0,0,.08)}"],changeDetection:0}),e})();var Vo=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Le]]}),e})();function fy(e,n){if(e&1&&S(0,"div",6),e&2){let t=u().tuiLet;nt("background",t)}}function my(e,n){if(e&1){let t=F();g(0,"tui-palette",7),y("selectedColor",function(o){I(t);let r=u(2);return x(r.editor.setBackgroundColor(o))}),v()}if(e&2){let t=n.$implicit,i=u(2);l("colors",i.colors)("tuiActiveZoneParent",t)}}function gy(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",3,0),S(2,"button",4),R(3,"async"),T(4,fy,1,2,"div",5)(5,my,1,2,"ng-template",null,1,de),v()),e&2){let t=n.tuiLet,i=j(1),o=j(6),r=u();l("content",o)("tuiDropdownMaxHeight",999),h(2),l("focusable",i.open)("icon",r.options.icons.textHilite)("pseudoActive",i.open)("tuiHint",H(3,7,r.backColorText$)),h(2),l("ngIf",!r.isBlankColor(t||""))}}var Kf=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.colors=this.options.colors,this.backgroundColor$=this.editor.stateChange$.pipe(b(()=>this.editor.getBackgroundColor()||this.options.blankColor),oe()),this.backColorText$=this.texts$.pipe(b(r=>r.backColor))}isBlankColor(t){return t===this.options.blankColor}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-highlight-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[["hilite",""],["hiliteDropdown",""],[3,"content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"content","tuiDropdownMaxHeight"],["appearance","icon","automation-id","toolbar__hilite-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"focusable","icon","pseudoActive","tuiHint"],["class","t-plate",3,"background",4,"ngIf"],[1,"t-plate"],[1,"t-color-picker",3,"selectedColor","colors","tuiActiveZoneParent"]],template:function(t,i){t&1&&(T(0,gy,7,9,"tui-hosted-dropdown",2),R(1,"async")),t&2&&l("tuiLet",H(1,1,i.backgroundColor$))},dependencies:[ot,_e,Bo,xt,Di,Ae,be,ke,ve,Se,ee,gt,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),Qf=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Vo,Le,vi,yi,Ot]]}),e})();function vy(e,n){if(e&1){let t=F();g(0,"div",6)(1,"button",7),y("click",function(){I(t);let o=u(3);return x(o.editor.toggleUnorderedList())}),v(),g(2,"button",8),y("click",function(){I(t);let o=u(3);return x(o.editor.toggleOrderedList())}),v(),g(3,"button",9),y("click",function(){I(t);let o=u(3);return x(o.editor.toggleTaskList())}),v(),g(4,"button",10),y("click",function(){I(t);let o=u(3);return x(o.sinkListItem())}),v(),g(5,"button",11),y("click",function(){I(t);let o=u(3);return x(o.liftListItem())}),v()()}if(e&2){let t=u().tuiLet,i=u().ngIf,o=u();h(),l("icon",o.options.icons.listUnOrdered)("pseudoActive",!!(t!=null&&t.unordered))("tuiHint",i.unorderedList),h(),l("icon",o.options.icons.listOrdered)("pseudoActive",!!(t!=null&&t.ordered))("tuiHint",i.orderedList),h(),l("icon",o.options.icons.taskList)("pseudoActive",!!(t!=null&&t.tasked)),h(),l("icon",o.options.icons.indent)("tuiHint",i.indent),h(),l("icon",o.options.icons.outdent)("tuiHint",i.outdent)}}function _y(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",4,0),S(2,"button",5),T(3,vy,6,12,"ng-template",null,1,de),v()),e&2){let t=n.tuiLet,i=j(1),o=j(4),r=u().ngIf,s=u();l("content",o),h(2),l("focusable",i.open)("icon",s.options.icons.listPreview)("pseudoActive",(i==null?null:i.open)||(t==null?null:t.unordered)||(t==null?null:t.ordered)||!1)("tuiHint",r.list)}}function Ty(e,n){if(e&1&&(Ie(0),T(1,_y,5,5,"tui-hosted-dropdown",3),R(2,"async"),xe()),e&2){let t=u();h(),l("tuiLet",H(2,1,t.listState$))}}var Jf=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.listState$=wt([this.editor.isActive$("orderedList"),this.editor.isActive$("bulletList"),this.editor.isActive$("taskList")]).pipe(b(([r,s,c])=>({ordered:r,unordered:s,tasked:c})))}sinkListItem(){this.editor.sinkListItem()}liftListItem(){this.editor.liftListItem()}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-list-configs"]],decls:2,vars:3,consts:[["list",""],["listDropdown",""],[4,"ngIf"],[3,"content",4,"tuiLet"],[3,"content"],["appearance","icon","automation-id","toolbar__ordering-list-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[1,"t-dropdown","t-dropdown-list"],["appearance","icon","automation-id","toolbar__un-ordered-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","pseudoActive","tuiHint"],["appearance","icon","automation-id","toolbar__ordered-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","pseudoActive","tuiHint"],["appearance","icon","automation-id","toolbar__task-list-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","pseudoActive"],["appearance","icon","automation-id","toolbar_indent-button","size","s","tuiIconButton","","type","button",1,"t-option","t-option_margin",3,"click","icon","tuiHint"],["appearance","icon","automation-id","toolbar_outdent-button","size","s","tuiIconButton","","type","button",1,"t-option",3,"click","icon","tuiHint"]],template:function(t,i){t&1&&(T(0,Ty,3,3,"ng-container",2),R(1,"async")),t&2&&l("ngIf",H(1,1,i.texts$))},dependencies:[ot,_e,ee,xt,Ae,be,ke,ve,Se,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),em=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Me,Le,Ot]]}),e})();function Cy(e,n){if(e&1&&S(0,"div",7),e&2){let t=u(2).tuiLet;nt("background",t)}}function yy(e,n){if(e&1){let t=F();g(0,"tui-palette",8),y("selectedColor",function(o){I(t),u();let r=j(1);return u(2).setCellColor(o),x(r.close())}),v()}if(e&2){let t=n.$implicit,i=u(3);l("colors",i.colors)("tuiActiveZoneParent",t)}}function by(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",4,0),S(2,"button",5),R(3,"async"),T(4,Cy,1,2,"div",6)(5,yy,1,2,"ng-template",null,1,de),v()),e&2){let t=n.tuiLet,i=j(1),o=j(6),r=u().tuiLet,s=u();l("canOpen",!!t)("content",o)("tuiDropdownMaxHeight",999),h(2),l("disabled",!t)("focusable",i.open)("icon",s.options.icons.paint)("pseudoActive",i.open)("tuiHint",H(3,9,s.colorText$)),h(2),l("ngIf",!s.isBlankColor(r||""))}}function My(e,n){if(e&1&&(Ie(0),T(1,by,7,11,"tui-hosted-dropdown",3),R(2,"async"),xe()),e&2){let t=u();h(),l("tuiLet",H(2,1,t.isActive$))}}var tm=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.colors=this.options.colors,this.colorText$=this.texts$.pipe(b(r=>this.editor.isActive("group")&&r.hiliteGroup||this.editor.isActive("table")&&r.cellColor||"")),this.isActive$=wt([this.editor.isActive$("table"),this.editor.isActive$("group")]).pipe(b(([r,s])=>r||s)),this.color$=this.editor.stateChange$.pipe(b(()=>this.editor.getCellColor()||this.editor.getGroupColor()||this.options.blankColor),oe())}isBlankColor(t){return t===this.options.blankColor}setCellColor(t){this.editor.isActive("group")?this.editor.setGroupHilite(t):this.editor.isActive("table")&&this.editor.setCellColor(t)}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-table-cell-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[["colorSelect",""],["cellColorDropdown",""],[4,"tuiLet"],[3,"canOpen","content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"canOpen","content","tuiDropdownMaxHeight"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","pseudoActive","tuiHint"],["class","t-plate t-plate_paint",3,"background",4,"ngIf"],[1,"t-plate","t-plate_paint"],[1,"t-color-picker",3,"selectedColor","colors","tuiActiveZoneParent"]],template:function(t,i){t&1&&(T(0,My,3,3,"ng-container",2),R(1,"async")),t&2&&l("tuiLet",H(1,1,i.color$))},dependencies:[ot,_e,Bo,xt,Di,Ae,be,ke,ve,Se,ee,gt,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),im=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Vo,Me,Le,yi,vi,Ot]]}),e})();function Dy(e,n){if(e&1){let t=F();g(0,"div",4),y("click",function(){I(t);let o=u(2);return x(o.select())})("mouseenter",function(o){let r=I(t).$implicit,s=u().$implicit,c=u();return x(c.updateCurrentSize(r+1,s+1,o))}),v()}if(e&2){let t=n.$implicit,i=u().$implicit,o=u();J("t-cell_hovered",o.tableSelectHovered(t,i))}}function wy(e,n){if(e&1&&(g(0,"div",2),T(1,Dy,1,2,"div",3),v()),e&2){let t=u();h(),l("tuiRepeatTimesOf",t.rowsNumber)}}var Iy=15,xy=15,Oy=70,nm=(()=>{class e{constructor(t){this.win=t,this.selectSize=new Pe,this.onSelectSize=this.selectSize,this.tableSize={rows:1,cols:1}}get columnsNumber(){return Math.min(Math.max(3,this.tableSize.cols+1),Iy)}get rowsNumber(){return Math.min(Math.max(3,this.tableSize.rows+1),xy)}tableSelectHovered(t,i){return tOy&&(this.tableSize={rows:t,cols:i})}onClick(){this.select()}select(){this.selectSize.emit(this.tableSize)}}return e.\u0275fac=function(t){return new(t||e)(a(zt))},e.\u0275cmp=k({type:e,selectors:[["tui-table-size-selector"]],outputs:{selectSize:"selectSize",onSelectSize:"onSelectSize"},decls:3,vars:3,consts:[["class","t-column",4,"tuiRepeatTimes","tuiRepeatTimesOf"],[1,"t-description"],[1,"t-column"],["class","t-cell",3,"t-cell_hovered","click","mouseenter",4,"tuiRepeatTimes","tuiRepeatTimesOf"],[1,"t-cell",3,"click","mouseenter"]],template:function(t,i){t&1&&(T(0,wy,2,1,"div",0),g(1,"div",1),Te(2),v()),t&2&&(l("tuiRepeatTimesOf",i.columnsNumber),h(2),xu("",i.tableSize.cols,"\xD7",i.tableSize.rows,""))},dependencies:[wp],styles:["[_nghost-%COMP%]{display:block;padding:.75rem}.t-cell[_ngcontent-%COMP%]{display:inline-block;background-color:var(--tui-base-01);width:1.25rem;height:1.25rem;border-radius:.25rem;margin:.125rem;border:1px solid var(--tui-base-04);cursor:pointer}.t-cell_hovered[_ngcontent-%COMP%]{background-color:var(--tui-base-02)}.t-column[_ngcontent-%COMP%]{white-space:nowrap}.t-description[_ngcontent-%COMP%]{text-align:center}"],changeDetection:0}),e})(),om=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Ip]]}),e})();function Py(e,n){if(e&1){let t=F();g(0,"tui-table-size-selector",4),y("selectSize",function(o){I(t);let r=u();return x(r.addTable(o))}),v()}}var rm=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.insertTableText$=this.texts$.pipe(b(r=>r.insertTable))}addTable({rows:t,cols:i}){this.editor.enter();let o=this.editor.state.selection.anchor;this.editor.enter(),this.editor.enter(),this.editor.setTextSelection(o),this.editor.insertTable(t,i)}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-table-create"]],decls:6,vars:6,consts:[["table",""],["tableDropdown",""],["tuiDropdownAlign","left","tuiDropdownDirection","bottom",3,"content"],["appearance","icon","automation-id","toolbar__insert-table-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","tuiHint"],[3,"selectSize"]],template:function(t,i){if(t&1&&(g(0,"tui-hosted-dropdown",2,0),S(2,"button",3),R(3,"async"),v(),T(4,Py,1,0,"ng-template",null,1,de)),t&2){let o=j(1),r=j(5);l("content",r),h(2),l("focusable",o.open)("icon",i.options.icons.insertTable)("tuiHint",H(3,4,i.insertTableText$))}},dependencies:[ot,_e,nm,Di,Ae,be,ke,ve,Se,K],encapsulation:2,changeDetection:0}),e})(),sm=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,vi,Me,Le,om]]}),e})();var Ey=(e,n)=>({mergeCells:e,splitCells:n});function Ay(e,n){if(e&1){let t=F();g(0,"button",2),y("click",function(){I(t);let o=u().tuiLet,r=u();return x(o.mergeCells?r.mergeCells():r.splitCell())}),v()}if(e&2){let t=n.ngIf,i=u().tuiLet;l("disabled",!i.mergeCells&&!i.splitCells)("focusable",!1)("icon",i.mergeCells?"tuiIconTableMergeLarge":"tuiIconTableSplitLarge")("tuiHint",i.mergeCells?t.mergeCells:t.splitCells)}}function ky(e,n){if(e&1&&(Ie(0),T(1,Ay,1,4,"button",1),R(2,"async"),xe()),e&2){let t=u();h(),l("ngIf",H(2,1,t.texts$))}}var am=(()=>{class e{constructor(t,i){this.editor=t,this.texts$=i,this.canMergeCells$=this.editor.stateChange$.pipe(b(()=>this.editor.canMergeCells()),oe()),this.canSplitCells$=this.editor.stateChange$.pipe(b(()=>this.editor.canSplitCells()),oe())}mergeCells(){this.editor.mergeCells()}splitCell(){this.editor.splitCell()}}return e.\u0275fac=function(t){return new(t||e)(a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-table-merge-cells"]],decls:3,vars:8,consts:[[4,"tuiLet"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"click","disabled","focusable","icon","tuiHint"]],template:function(t,i){t&1&&(T(0,ky,3,3,"ng-container",0),R(1,"async"),R(2,"async")),t&2&&l("tuiLet",Jr(5,Ey,H(1,1,i.canMergeCells$),H(2,3,i.canSplitCells$)))},dependencies:[_e,xt,ee,Ae,be,ke,ve,Se,K],encapsulation:2,changeDetection:0}),e})(),cm=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Me,Le,Ot]]}),e})();function Ry(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",3,1),S(2,"button",4),R(3,"async"),v()),e&2){let t=n.tuiLet,i=j(1),o=u(),r=j(3);l("canOpen",!!t)("content",r),h(2),l("disabled",!t)("focusable",i.open)("icon",o.options.icons.addRowTable)("tuiHint",H(3,6,o.rowsColumnsManagingText$))}}function Fy(e,n){if(e&1){let t=F();g(0,"button",7),y("click",function(){let o=I(t).index,r=u().index,s=u(2);return x(s.onTableOption(r*2+o))}),Te(1),v()}if(e&2){let t=n.$implicit;h(),Ne(" ",t," ")}}function Ly(e,n){if(e&1&&(g(0,"tui-opt-group"),T(1,Fy,2,1,"button",6),v()),e&2){let t=n.$implicit;h(),l("ngForOf",t)}}function Hy(e,n){if(e&1&&(g(0,"tui-data-list"),T(1,Ly,2,1,"tui-opt-group",5),R(2,"async"),v()),e&2){let t=u();h(),l("ngForOf",H(2,1,t.tableCommandTexts$))}}var Zn=function(e){return e[e.InsertColumnBefore=0]="InsertColumnBefore",e[e.InsertColumnAfter=1]="InsertColumnAfter",e[e.InsertRowBefore=2]="InsertRowBefore",e[e.InsertRowAfter=3]="InsertRowAfter",e[e.DeleteColumn=4]="DeleteColumn",e[e.DeleteRow=5]="DeleteRow",e}(Zn||{}),lm=(()=>{class e{constructor(t,i,o,r){this.options=t,this.editor=i,this.texts$=o,this.tableCommandTexts$=r,this.commandsRegistry={[Zn.InsertColumnAfter]:()=>this.editor.addColumnAfter(),[Zn.InsertColumnBefore]:()=>this.editor.addColumnBefore(),[Zn.InsertRowAfter]:()=>this.editor.addRowAfter(),[Zn.InsertRowBefore]:()=>this.editor.addRowBefore(),[Zn.DeleteColumn]:()=>this.editor.deleteColumn(),[Zn.DeleteRow]:()=>this.editor.deleteRow()},this.isActive$=this.editor.isActive$("table"),this.rowsColumnsManagingText$=this.texts$.pipe(b(s=>s.rowsColumnsManaging))}onTableOption(t){this.commandsRegistry[t]()}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be),a(Wd))},e.\u0275cmp=k({type:e,selectors:[["tui-table-row-column-manager"]],decls:4,vars:3,consts:[["tableOptionsDropdown",""],["tableCommand",""],[3,"canOpen","content",4,"tuiLet"],[3,"canOpen","content"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"disabled","focusable","icon","tuiHint"],[4,"ngFor","ngForOf"],["tuiOption","",3,"click",4,"ngFor","ngForOf"],["tuiOption","",3,"click"]],template:function(t,i){t&1&&(T(0,Ry,4,8,"tui-hosted-dropdown",2),R(1,"async"),T(2,Hy,3,3,"ng-template",null,0,de)),t&2&&l("tuiLet",H(1,1,i.isActive$))},dependencies:[ot,_e,Pn,Sn,xt,Ae,be,ke,ve,Se,Ui,hf,K],encapsulation:2,changeDetection:0}),e})(),um=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,rt,Le,Me,Yn,Ot]]}),e})();function Ny(e,n){if(e&1){let t=F();g(0,"tui-palette",6),y("selectedColor",function(o){I(t);let r=u(2);return x(r.editor.setFontColor(o))}),v()}if(e&2){let t=n.$implicit,i=u(2);l("colors",i.colors)("tuiActiveZoneParent",t)}}function jy(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",3,0),S(2,"button",4),R(3,"async"),S(4,"div",5),T(5,Ny,1,2,"ng-template",null,1,de),v()),e&2){let t=n.tuiLet,i=j(1),o=j(6),r=u();l("content",o)("tuiDropdownMaxHeight",999),h(2),l("focusable",i.open)("icon",r.options.icons.textColor)("pseudoActive",i.open)("tuiHint",H(3,8,r.foreColorText$)),h(2),nt("background",t)}}var dm=(()=>{class e{constructor(t,i,o){this.options=t,this.editor=i,this.texts$=o,this.colors=this.options.colors,this.fontColor$=this.editor.stateChange$.pipe(b(()=>this.editor.getFontColor()||this.options.blankColor),oe()),this.foreColorText$=this.texts$.pipe(b(r=>r.foreColor))}}return e.\u0275fac=function(t){return new(t||e)(a(Ee),a(De),a(Be))},e.\u0275cmp=k({type:e,selectors:[["tui-text-color"]],inputs:{colors:"colors"},decls:2,vars:3,consts:[["color",""],["colorDropdown",""],[3,"content","tuiDropdownMaxHeight",4,"tuiLet"],[3,"content","tuiDropdownMaxHeight"],["appearance","icon","automation-id","toolbar__color-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[1,"t-plate"],[1,"t-color-picker",3,"selectedColor","colors","tuiActiveZoneParent"]],template:function(t,i){t&1&&(T(0,jy,7,10,"tui-hosted-dropdown",2),R(1,"async")),t&2&&l("tuiLet",H(1,1,i.fontColor$))},dependencies:[ot,_e,Bo,xt,Di,Ae,be,ke,ve,Se,gt,K],styles:[".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}"],changeDetection:0}),e})(),pm=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Me,rt,vi,Le,Vo,yi,Ot]]}),e})();function Uy(e,n){e&1&&(Ie(0),Te(1,"Edit anchor"),xe())}function zy(e,n){e&1&&(g(0,"span"),Te(1,"Link to anchor"),v())}function By(e,n){e&1&&(g(0,"span"),Te(1,"URL"),v())}function Vy(e,n){if(e&1&&T(0,zy,2,0,"span",4)(1,By,2,0,"ng-template",null,2,de),e&2){let t=j(2),i=u(2);l("ngIf",i.prefixIsHashMode)("ngIfElse",t)}}function $y(e,n){if(e&1&&(Ie(0),Te(1),xe()),e&2){let t=n.ngIf,i=u(2);h(),Ne(" ",i.prefixIsHashMode?t.anchorExample:t.urlExample," ")}}function Wy(e,n){if(e&1){let t=F();Ie(0),g(1,"label",6)(2,"div",7),T(3,Uy,2,0,"ng-container",4)(4,Vy,3,2,"ng-template",null,1,de),v(),g(6,"div",8)(7,"div",9),Te(8),v(),g(9,"tui-input-inline",10),or("ngModelChange",function(o){I(t);let r=u();return nr(r.url,o)||(r.url=o),x(o)}),y("input",function(o){I(t);let r=u();return x(r.onChange(o.target==null?null:o.target.value))})("keydown.backspace",function(){I(t);let o=u();return x(o.onBackspace())})("keydown.prevent.enter",function(){I(t);let o=u();return x(o.onSave())}),T(10,$y,2,1,"ng-container",5),R(11,"async"),v()()(),g(12,"tui-svg",11),y("click",function(){I(t);let o=u();return x(o.onClear())}),v(),g(13,"button",12),y("click",function(){I(t);let o=u();return x(o.onSave())}),v(),xe()}if(e&2){let t=j(5),i=u();h(3),l("ngIf",i.anchorMode)("ngIfElse",t),h(5),Iu(i.prefix),h(),J("t-input_filled",i.hasUrl),ir("ngModel",i.url),h(),l("ngIf",H(11,11,i.texts$)),h(2),J("t-cleaner_hidden",!i.hasUrl),l("src",i.options.icons.popupLinkRemove),h(),l("icon",i.options.icons.popupLinkSave)}}function Gy(e,n){if(e&1){let t=F();g(0,"a",13),Te(1),R(2,"tuiShortUrl"),v(),g(3,"button",14),y("click",function(){I(t);let o=u();return x(o.onEdit())}),v(),g(4,"button",15),y("click",function(){I(t);let o=u();return x(o.onRemove())}),v()}if(e&2){let t=u();l("href",t.href,Kr)("icon",t.prefixIsHashMode?"tuiIconHash":"tuiIconExternalLink"),h(),Ne(" ",H(2,5,t.url)," "),h(2),l("icon",t.options.icons.popupPreviewLinkEdit),h(),l("icon",t.options.icons.popupPreviewLinkClear)}}function Yy(e,n){if(e&1){let t=F();g(0,"button",19),y("click",function(){let o=I(t).$implicit,r=u(2);return x(r.setAnchor(o))}),Te(1),v()}if(e&2){let t=n.$implicit;h(),Ne(" #",t," ")}}function Zy(e,n){if(e&1&&(Ie(0),S(1,"hr",16),g(2,"tui-scrollbar")(3,"div",17),T(4,Yy,2,1,"button",18),R(5,"tuiFilterAnchors"),v()(),xe()),e&2){let t=u();h(4),l("ngForOf",Pu(5,1,t.anchorIds,t.prefix,t.url))}}function mm(e=""){var n;let t=(n=e.indexOf(cr))!==null&&n!==void 0?n:-1,[i,o]=t>-1?[e.slice(0,t+cr.length),e.slice(t+cr.length,e.length)]:["",e],r=[i,o].filter(Boolean);return o!=null&&o.includes("://")&&r.length>1?mm(o):r}function hm(e=""){let[n,t]=e.split(/:/).slice(-2).filter(Boolean);return n&&t&&!qu(e)?[`${n}:`,t]:[]}function fm(e=""){if(e.startsWith(ti))return{prefix:ti,path:e.slice(1)};let[n="",t=""]=e.includes(cr)?mm(e):hm(e);if(t.includes(jd)){let[i,o]=hm(t);if(i&&o)return{prefix:i,path:o}}return e.startsWith("/")&&!e.startsWith("//")?{prefix:e.slice(0,1),path:e.slice(1)}:e.startsWith("./")?{prefix:e.slice(0,2),path:e.slice(2)}:{prefix:n,path:n===""?e:t}}var Ml=60,gm=Ml-20,Xy=Ml-gm-10,qy=(()=>{class e{transform(t){return t.length{class e{transform(t,i,o){return i==="#"?t.filter(r=>r!==o):t}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=Ii({name:"tuiFilterAnchors",type:e,pure:!0}),e})(),pa=(()=>{class e{constructor(t,i,o,r){this.doc=t,this.texts$=i,this.editor=o,this.options=r,this.isOnlyAnchorMode=this.detectAnchorMode(),this.addLink=new Pe,this.removeLink=new Pe,this.url=this.getHrefOrAnchorId(),this.edit=!this.url,this.prefix=this.makeDefaultPrefix(),this.anchorIds=this.getAllAnchorsIds()}get defaultProtocol(){var t,i;return(i=(t=this.options.linkOptions)===null||t===void 0?void 0:t.protocol)!==null&&i!==void 0?i:Nd}set anchorMode(t){this.isOnlyAnchorMode=t,this.prefix=t?ti:this.makeDefaultPrefix()}get anchorMode(){return this.isOnlyAnchorMode}get prefixIsHashMode(){return this.prefix===ti}get hasUrl(){return!!this.url}get href(){return`${this.prefix}${this.url}`}get showAnchorsList(){return!this.anchorMode&&this.edit&&this.anchorIds.length>0}get isViewMode(){return!this.edit}onSelectionChange(){this.isViewMode&&(this.url=this.getHrefOrAnchorId(),this.anchorMode=this.detectAnchorMode())}onMouseDown(t){pt(t.target)&&!t.target.matches("a, button, input")&&t.preventDefault()}setAnchor(t){this.url=t,this.changePrefix(!0)}changePrefix(t){this.prefix=t?ti:this.defaultProtocol}onSave(){this.url?this.addLink.emit(this.href):this.removeLink.emit()}onBackspace(){this.url||(this.prefix=this.isOnlyAnchorMode?ti:this.defaultProtocol)}onEdit(){this.edit=!0}onRemove(){this.removeLink.emit()}onChange(t){this.url=this.removePrefix(t)}onClear(){this.url=""}makeDefaultPrefix(){var t,i;let o=this.getAnchorElement(),r=fm((t=o==null?void 0:o.getAttribute("href"))!==null&&t!==void 0?t:"").prefix||this.defaultProtocol;return o&&(!o.getAttribute("href")&&o.getAttribute("id")||!((i=o.getAttribute("href"))===null||i===void 0)&&i.startsWith(ti))?ti:r}detectAnchorMode(){let t=this.getAnchorElement();return!(t!=null&&t.href)&&!!(t!=null&&t.getAttribute("id"))}getFocusedParentElement(){var t,i;return((i=(t=this.doc.getSelection())===null||t===void 0?void 0:t.focusNode)===null||i===void 0?void 0:i.parentElement)||null}getAnchorElement(){var t,i,o;let r=this.getFocusedParentElement();return(o=(t=r==null?void 0:r.closest("a"))!==null&&t!==void 0?t:(i=r==null?void 0:r.querySelector("img"))===null||i===void 0?void 0:i.closest("a"))!==null&&o!==void 0?o:null}getHrefOrAnchorId(){let t=this.getAnchorElement();return t?this.removePrefix(t.getAttribute("href")||t.getAttribute("id")||""):this.url}removePrefix(t){var i;let o=t.startsWith(ti)||this.prefix===ti||t.startsWith("/")||t.startsWith("./")||t.startsWith("http")||t.startsWith("://")?t:`${(i=this.prefix)!==null&&i!==void 0?i:""}${t}`,{prefix:r,path:s}=fm(o);return this.isOnlyAnchorMode||r===ti||r===""&&this.prefix===ti?this.prefix=ti:r===""?this.prefix=this.defaultProtocol:this.prefix=r,s}getAllAnchorsIds(){var t;let i=Array.from((t=this.editor.getOriginTiptapEditor().view.dom.querySelectorAll('[data-type="jump-anchor"]'))!==null&&t!==void 0?t:[]);return Array.from(i).map(o=>o.getAttribute("id")||"").filter(Boolean)}}return e.\u0275fac=function(t){return new(t||e)(a(qe),a(Gd),a(De),a(Ee))},e.\u0275cmp=k({type:e,selectors:[["tui-edit-link"]],hostBindings:function(t,i){t&1&&y("selectionchange",function(){return i.onSelectionChange()},!1,Ni)("mousedown",function(r){return i.onMouseDown(r)})},inputs:{anchorMode:"anchorMode"},outputs:{addLink:"addLink",removeLink:"removeLink"},decls:5,vars:3,consts:[["view",""],["fullOptions",""],["urlTitle",""],[1,"t-edit-link"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"t-label"],[1,"t-label-properties"],[1,"t-url"],[1,"t-prefix"],["tuiAutoFocus","",1,"t-input",3,"ngModelChange","input","keydown.backspace","keydown.prevent.enter","ngModel"],[1,"t-cleaner",3,"click","src"],["appearance","icon","shape","rounded","size","s","title","Insert link","tuiIconButton","","type","button",1,"t-button",3,"click","icon"],["iconAlign","left","target","_blank","tuiLink","",1,"t-link",3,"href","icon"],["appearance","icon","shape","rounded","size","s","title","Change link","tuiIconButton","","type","button",1,"t-button","t-edit-button",3,"click","icon"],["appearance","icon","automation-id","toolbar__popup-link-clear-button","shape","rounded","size","s","title","Remove link","tuiIconButton","","type","button",1,"t-button",3,"click","icon"],[1,"t-hr"],[1,"t-anchor-list"],["type","button","class","t-anchor",3,"click",4,"ngFor","ngForOf"],["type","button",1,"t-anchor",3,"click"]],template:function(t,i){if(t&1&&(g(0,"div",3),T(1,Wy,14,13,"ng-container",4)(2,Gy,5,7,"ng-template",null,0,de),v(),T(4,Zy,6,5,"ng-container",5)),t&2){let o=j(3);h(),l("ngIf",i.edit)("ngIfElse",o),h(3),l("ngIf",i.showAnchorsList)}},dependencies:[Xf,Ft,_e,ra,jo,ee,ms,co,an,Ui,K,qy,Ky],styles:["[_nghost-%COMP%]{display:block;min-width:18.75rem}.t-edit-link[_ngcontent-%COMP%]{display:flex;min-height:4rem;align-items:center;padding-right:.75rem}.t-label[_ngcontent-%COMP%]{font:var(--tui-font-text-s);height:var(--tui-height-l);box-sizing:border-box;padding:.4375rem 1rem;min-width:12.5rem;max-width:25rem;width:100%}.t-label-properties[_ngcontent-%COMP%]{display:flex;align-items:center;max-width:8.375rem;justify-content:space-between}.t-property_inactive[_ngcontent-%COMP%]{opacity:.5}.t-url[_ngcontent-%COMP%]{display:flex;font:var(--tui-font-text-m);color:var(--tui-text-02)}.t-input[_ngcontent-%COMP%]{flex:1}.t-input_filled[_ngcontent-%COMP%]{color:var(--tui-text-01)}.t-button[_ngcontent-%COMP%]{width:2rem;height:2rem;margin:0 .25rem;transition:background .2s}.t-edit-button[_ngcontent-%COMP%]{margin-left:auto}.t-link[_ngcontent-%COMP%]{margin:0 1rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.t-cleaner[_ngcontent-%COMP%]{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;color:var(--tui-base-06);cursor:pointer;margin-left:auto}.t-cleaner[_ngcontent-%COMP%]:hover{color:var(--tui-base-07)}.t-cleaner_hidden[_ngcontent-%COMP%]{visibility:hidden}.t-anchor-list[_ngcontent-%COMP%]{display:flex;max-height:12.5rem;flex-direction:column}.t-anchor[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;min-height:2.75rem;padding:.375rem .5rem;margin:.125rem .5rem;border-radius:var(--tui-radius-m);text-align:left}.t-anchor[_ngcontent-%COMP%]:hover{background:var(--tui-base-02);cursor:pointer}"],changeDetection:0}),e})(),ha=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,lo,gs,Me,Lt,sa,qf,yf,Uo]]}),e})();var Qy=["dropdown"],Jy=["*"];function eb(e,n){e&1&&Ut(0)}function tb(e,n){if(e&1){let t=F();g(0,"div",14)(1,"button",15),y("click",function(){I(t);let o=u(2);return x(o.undo())}),v(),g(2,"button",16),y("click",function(){I(t);let o=u(2);return x(o.redo())}),v()()}if(e&2){let t=u().ngIf,i=u();h(),l("disabled",i.undoDisabled)("focusable",!1)("icon",i.options.icons.undo)("tuiHint",t.undo),h(),l("disabled",i.redoDisabled)("focusable",!1)("icon",i.options.icons.redo)("tuiHint",t.redo)}}function ib(e,n){e&1&&(g(0,"div",14),S(1,"tui-font-size",17),v())}function nb(e,n){if(e&1&&S(0,"tui-font-style",23),e&2){let t=u(3);l("enabledTools",t.toolsSet)}}function ob(e,n){e&1&&S(0,"tui-align-content",17)}function rb(e,n){e&1&&S(0,"tui-list-configs",17)}function sb(e,n){if(e&1){let t=F();g(0,"button",24,0),y("click",function(){I(t);let o=u(3);return x(o.toggleQuote())}),v()}if(e&2){let t=u(2).ngIf,i=u();l("disabled",i.unorderedList||i.orderedList)("focusable",!1)("icon",i.options.icons.quote)("pseudoActive",i.blockquote)("tuiHint",t.quote)}}function ab(e,n){if(e&1){let t=F();g(0,"tui-edit-link",27,3),y("addLink",function(o){I(t),u();let r=j(1),s=u(3);return x(s.onLink(r,o))})("removeLink",function(){I(t),u();let o=j(1),r=u(3);return x(r.onLink(o))}),v()}}function cb(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",25,1),S(2,"button",26,0),T(4,ab,2,0,"ng-template",null,2,de),v()),e&2){let t=j(1),i=j(5),o=u(2).ngIf,r=u();l("canOpen",r.canOpenAnchor)("content",i),h(2),l("focusable",t.open)("icon",r.options.icons.link)("pseudoActive",t.open||r.a)("tuiHint",o.link)}}function lb(e,n){if(e&1){let t=F();g(0,"tui-edit-link",30),y("addLink",function(o){I(t),u();let r=j(1),s=u(3);return x(s.setAnchor(r,o))})("removeLink",function(){I(t);let o=u(4);return x(o.removeAnchor())}),v()}e&2&&l("anchorMode",!0)}function ub(e,n){if(e&1&&(g(0,"tui-hosted-dropdown",28,4),S(2,"button",29),T(3,lb,1,1,"ng-template",null,5,de),v()),e&2){let t=j(1),i=j(4),o=u(2).ngIf,r=u();l("canOpen",r.canOpenAnchor)("content",i),h(2),l("focusable",!1)("icon",r.options.icons.anchor)("pseudoActive",t.open||r.jumpAnchor)("tuiHint",o.insertAnchor)}}function db(e,n){if(e&1){let t=F();Ie(0),g(1,"button",31,0),y("click",function(){I(t);let o=j(4);return x(o.click())}),v(),g(3,"input",32,6),y("change",function(){I(t);let o=j(4),r=u(3);return x(r.onAttach(o))}),v(),xe()}if(e&2){let t=u(2).ngIf,i=u();h(),l("focusable",!1)("icon",i.options.icons.attach)("tuiHint",t.attach),h(2),l("accept",i.attachOptions.accept)("multiple",i.attachOptions.multiple)("tuiFocusable",!1)}}function pb(e,n){if(e&1&&(g(0,"div",14),T(1,nb,1,1,"tui-font-style",18)(2,ob,1,0,"tui-align-content",19)(3,rb,1,0,"tui-list-configs",19)(4,sb,2,5,"button",20)(5,cb,6,6,"tui-hosted-dropdown",21)(6,ub,5,6,"tui-hosted-dropdown",22)(7,db,5,6,"ng-container",9),v()),e&2){let t=u(2);h(),l("ngIf",t.formatEnabled),h(),l("ngIf",t.enabled(t.editorTool.Align)),h(),l("ngIf",t.enabled(t.editorTool.List)),h(),l("ngIf",t.enabled(t.editorTool.Quote)),h(),l("ngIf",t.enabled(t.editorTool.Link)),h(),l("ngIf",t.enabled(t.editorTool.Anchor)),h(),l("ngIf",t.enabled(t.editorTool.Attach))}}function hb(e,n){if(e&1){let t=F();g(0,"button",34,0),y("click",function(){I(t);let o=u(3);return x(o.toggleSubscript())}),v()}if(e&2){let t=u(2).ngIf,i=u();l("focusable",!1)("icon",i.options.icons.sub)("pseudoActive",i.subscript)("tuiHint",t.subscript)}}function fb(e,n){if(e&1){let t=F();g(0,"button",34,0),y("click",function(){I(t);let o=u(3);return x(o.toggleSuperscript())}),v()}if(e&2){let t=u(2).ngIf,i=u();l("focusable",!1)("icon",i.options.icons.sup)("pseudoActive",i.superscript)("tuiHint",t.superscript)}}function mb(e,n){if(e&1&&(g(0,"div",14),T(1,hb,2,4,"button",33)(2,fb,2,4,"button",33),v()),e&2){let t=u(2);h(),l("ngIf",t.enabled(t.editorTool.Sub)),h(),l("ngIf",t.enabled(t.editorTool.Sup))}}function gb(e,n){if(e&1&&S(0,"tui-text-color",36),e&2){let t=u(3);l("colors",t.colors)}}function vb(e,n){if(e&1&&S(0,"tui-highlight-color",36),e&2){let t=u(3);l("colors",t.colors)}}function _b(e,n){if(e&1&&(g(0,"div",14),T(1,gb,1,1,"tui-text-color",35)(2,vb,1,1,"tui-highlight-color",35),v()),e&2){let t=u(2);h(),l("ngIf",t.enabled(t.editorTool.Color)),h(),l("ngIf",t.enabled(t.editorTool.Hilite))}}function Tb(e,n){e&1&&S(0,"tui-code",17)}function Cb(e,n){if(e&1){let t=F();g(0,"button",40,0),y("click",function(){I(t);let o=u(3);return x(o.onTeX())}),v()}if(e&2){let t=u(2).ngIf,i=u();l("focusable",!1)("icon",i.options.icons.tex)("tuiHint",t.tex)}}function yb(e,n){if(e&1){let t=F();g(0,"div",41)(1,"button",42,0),y("click",function(){I(t);let o=j(4);return x(o.click())}),v(),g(3,"input",43,7),y("change",function(){I(t);let o=j(4),r=u(3);return x(r.onImage(o))}),v()()}if(e&2){let t=u(2).ngIf,i=u();h(),l("focusable",!1)("icon",i.options.icons.image)("tuiHint",t.image),h(2),l("tuiFocusable",!1)}}function bb(e,n){if(e&1){let t=F();g(0,"button",31,0),y("click",function(){I(t);let o=u(3);return x(o.insertHorizontalRule())}),v()}if(e&2){let t=u(2).ngIf,i=u();l("focusable",!1)("icon",i.options.icons.hr)("tuiHint",t.insertHorizontalRule)}}function Mb(e,n){if(e&1&&(g(0,"div",14),T(1,Tb,1,0,"tui-code",19)(2,Cb,2,3,"button",37)(3,yb,5,4,"div",38)(4,bb,2,3,"button",39),v()),e&2){let t=u(2);h(),l("ngIf",t.enabled(t.editorTool.Code)),h(),l("ngIf",t.enabled(t.editorTool.Tex)),h(),l("ngIf",t.enabled(t.editorTool.Img)),h(),l("ngIf",t.enabled(t.editorTool.HR))}}function Db(e,n){if(e&1){let t=F();g(0,"div",14)(1,"button",31,0),y("click",function(){I(t);let o=u(2);return x(o.removeFormat())}),v()()}if(e&2){let t=u().ngIf,i=u();h(),l("focusable",!1)("icon",i.options.icons.clear)("tuiHint",t.clear)}}function wb(e,n){e&1&&(g(0,"div",14),S(1,"tui-details",44)(2,"tui-details-remove",44),v())}function Ib(e,n){if(e&1&&S(0,"tui-table-cell-color",36),e&2){let t=u(3);l("colors",t.colors)}}function xb(e,n){if(e&1&&(g(0,"div",14),S(1,"tui-editor-group-tool",44),T(2,Ib,1,1,"tui-table-cell-color",35),v()),e&2){let t=u(2);h(2),l("ngIf",!t.enabled(t.editorTool.Table))}}function Ob(e,n){if(e&1&&(g(0,"div",14),S(1,"tui-table-create",44)(2,"tui-table-row-column-manager",44)(3,"tui-table-merge-cells",44)(4,"tui-table-cell-color",36),v()),e&2){let t=u(2);h(4),l("colors",t.colors)}}function Sb(e,n){if(e&1&&(g(0,"section",12),T(1,tb,3,8,"div",13)(2,ib,2,0,"div",13)(3,pb,8,7,"div",13)(4,mb,3,2,"div",13)(5,_b,3,2,"div",13)(6,Mb,5,4,"div",13)(7,Db,3,3,"div",13)(8,wb,3,0,"div",13)(9,xb,3,1,"div",13)(10,Ob,5,1,"div",13),g(11,"div",14),me(12),v()()),e&2){let t=u();h(),l("ngIf",t.enabled(t.editorTool.Undo)),h(),l("ngIf",t.enabled(t.editorTool.Size)),h(),l("ngIf",t.firstBigBlockEnabled),h(),l("ngIf",t.enabled(t.editorTool.Sub)||t.enabled(t.editorTool.Sup)),h(),l("ngIf",t.enabled(t.editorTool.Color)||t.enabled(t.editorTool.Hilite)),h(),l("ngIf",t.secondBigBlockEnabled),h(),l("ngIf",t.enabled(t.editorTool.Clear)),h(),l("ngIf",t.enabled(t.editorTool.Details)),h(),l("ngIf",t.enabled(t.editorTool.Group)),h(),l("ngIf",t.enabled(t.editorTool.Table))}}var _m=(()=>{class e{constructor(t){this.el=t}get toolsContainers(){return Array.from(this.el.nativeElement.querySelectorAll("[tuiItem]"))}onHorizontalNavigation(t){let{toolsContainers:i}=this,o=i.findIndex(li),r=_n(o+(t?-1:1),0,i.length-1),s=i[r],c=t?this.findPreviousTool(s):this.findNextTool(s);c&&c.focus()}findFirstFocusableTool(t=!1){let i=t?this.toolsContainers.slice().reverse():this.toolsContainers;for(let o of i){let r=ls(o)?o:Pi({initial:o,root:o,keyboard:!1});if(r)return r}return null}findPreviousTool(t){return ls(t)?t:Pi({initial:t,root:t,keyboard:!1})||Pi({initial:t,root:this.el.nativeElement,previous:!0,keyboard:!1})}findNextTool(t){return ls(t)?t:Pi({initial:t,root:this.el.nativeElement,keyboard:!1})}}return e.\u0275fac=function(t){return new(t||e)(a(N))},e.\u0275dir=w({type:e,selectors:[["","tuiToolbarNavigationManager",""]],hostBindings:function(t,i){t&1&&y("keydown.arrowRight.prevent",function(){return i.onHorizontalNavigation(!1)})("keydown.arrowLeft.prevent",function(){return i.onHorizontalNavigation(!0)})}}),e})(),fa=(()=>{class e{constructor(t,i,o,r,s,c,d,p){this.el=t,this.editor=i,this.imageLoader=o,this.attachOptions=r,this.filesLoader=s,this.texts$=c,this.options=d,this.destroy$=p,this.dropdowns=ns,this.colors=this.options.colors,this.disabled=!1,this.linkAdded=new Pe,this.texClicked=new Pe,this.fileAttached=new Pe,this.editorTool=It,this.toolsSet=new Set(go)}set tools(t){this.toolsSet=new Set(t)}get focused(){return li(this.el.nativeElement)||!!this.dropdowns.find(({nativeElement:t})=>li(t))}get focusable(){return!this.focused&&!this.disabled}get unorderedList(){return this.editor.isActive("bulletList")}get orderedList(){return this.editor.isActive("orderedList")}get blockquote(){return this.editor.isActive("blockquote")}get a(){return this.editor.isActive("link")}get jumpAnchor(){return this.editor.isActive("jumpAnchor")}get canOpenAnchor(){return!this.a&&!this.jumpAnchor}get undoDisabled(){return this.editor.undoDisabled()}get redoDisabled(){return this.editor.redoDisabled()}get subscript(){return this.editor.isActive("subscript")}get superscript(){return this.editor.isActive("superscript")}get formatEnabled(){return this.enabled(It.Bold)||this.enabled(It.Italic)||this.enabled(It.Underline)||this.enabled(It.Strikethrough)}get firstBigBlockEnabled(){return this.formatEnabled||this.enabled(It.Align)||this.enabled(It.List)||this.enabled(It.Quote)||this.enabled(It.Link)||this.enabled(It.Anchor)||this.enabled(It.Attach)}get secondBigBlockEnabled(){return this.enabled(It.Code)||this.enabled(It.Tex)||this.enabled(It.Img)||this.enabled(It.HR)}onMouseDown(t,i){i.closest("button")||(t.preventDefault(),this.editor.focus())}onBottomFocus(){this.focusLast()}onTopFocus(){this.focusFirst()}onImage(t){var i;let o=(i=t.files)===null||i===void 0?void 0:i[0];t.value="",o&&this.imageLoader(o).pipe(Wt(1),re(this.destroy$)).subscribe(r=>this.addImage(r))}onAttach(t){var i;let o=Array.from(t.files||[]);t.value="",o&&((i=this.filesLoader)===null||i===void 0||i.call(this,o).pipe(Wt(1),re(this.destroy$)).subscribe(r=>this.fileAttached.emit(r)))}onTeX(){this.texClicked.emit()}onLink(t,i){t.open=!1,i&&this.editor.toggleLink(i)}setAnchor(t,i){t.open=!1,i&&(this.editor.setAnchor(i),this.editor.selectClosest())}removeAnchor(){this.editor.removeAnchor()}enabled(t){return this.toolsSet.has(t)}undo(){this.editor.undo()}redo(){this.editor.redo()}insertHorizontalRule(){this.editor.setHorizontalRule()}removeFormat(){this.editor.removeFormat()}toggleOrderedList(){this.editor.toggleOrderedList()}toggleQuote(){this.editor.toggleBlockquote()}toggleSubscript(){this.editor.toggleSubscript()}toggleSuperscript(){this.editor.toggleSuperscript()}addImage(t){this.editor.setImage(t)}focusFirst(){var t;let i=(t=this.navigationManager)===null||t===void 0?void 0:t.findFirstFocusableTool();i&&i.focus()}focusLast(){var t;let i=(t=this.navigationManager)===null||t===void 0?void 0:t.findFirstFocusableTool(!0);i&&i.focus()}}return e.\u0275fac=function(t){return new(t||e)(a(N,8),a(De),a(Xd),a(Vd),a($d,8),a(Be),a(Ee),a(q,2))},e.\u0275cmp=k({type:e,selectors:[["tui-toolbar"]],viewQuery:function(t,i){if(t&1&&(at(_m,5),at(Qy,5,N)),t&2){let o;$e(o=We())&&(i.navigationManager=o.first),$e(o=We())&&(i.dropdowns=o)}},hostAttrs:["role","toolbar"],hostVars:2,hostBindings:function(t,i){t&1&&y("mousedown",function(r){return i.onMouseDown(r,r.target)}),t&2&&J("_disabled",i.disabled)},inputs:{colors:"colors",disabled:"disabled",tools:"tools"},outputs:{linkAdded:"linkAdded",texClicked:"texClicked",fileAttached:"fileAttached"},features:[A([q])],ngContentSelectors:Jy,decls:7,vars:8,consts:[["button",""],["link",""],["linkDropdown",""],["dropdown",""],["anchor",""],["anchorDropdown",""],["fileUpload",""],["image",""],["type","button",1,"t-prevent-parent-label-behavior"],[4,"ngIf"],[3,"focus","tuiFocusable"],["tuiToolbarNavigationManager","","class","t-tools-wrapper",4,"ngIf"],["tuiToolbarNavigationManager","",1,"t-tools-wrapper"],["class","t-block",4,"ngIf"],[1,"t-block"],["appearance","icon","automation-id","toolbar__undo-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"click","disabled","focusable","icon","tuiHint"],["appearance","icon","automation-id","toolbar__redo-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"click","disabled","focusable","icon","tuiHint"],["tuiItem","",1,"t-tool","t-wrapper"],["tuiItem","","class","t-tool t-wrapper",3,"enabledTools",4,"ngIf"],["tuiItem","","class","t-tool t-wrapper",4,"ngIf"],["appearance","icon","automation-id","toolbar__quote-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"disabled","focusable","icon","pseudoActive","tuiHint","click",4,"ngIf"],["tuiItem","","class","t-wrapper",3,"canOpen","content",4,"ngIf"],["class","t-wrapper",3,"canOpen","content",4,"ngIf"],["tuiItem","",1,"t-tool","t-wrapper",3,"enabledTools"],["appearance","icon","automation-id","toolbar__quote-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"click","disabled","focusable","icon","pseudoActive","tuiHint"],["tuiItem","",1,"t-wrapper",3,"canOpen","content"],["appearance","icon","automation-id","toolbar__link-button","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"focusable","icon","pseudoActive","tuiHint"],[3,"addLink","removeLink"],[1,"t-wrapper",3,"canOpen","content"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",3,"focusable","icon","pseudoActive","tuiHint"],[3,"addLink","removeLink","anchorMode"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"click","focusable","icon","tuiHint"],["type","file",1,"t-file-upload",3,"change","accept","multiple","tuiFocusable"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"focusable","icon","pseudoActive","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool","t-tool_margin",3,"click","focusable","icon","pseudoActive","tuiHint"],["tuiItem","","class","t-tool t-wrapper",3,"colors",4,"ngIf"],["tuiItem","",1,"t-tool","t-wrapper",3,"colors"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool",3,"focusable","icon","tuiHint","click",4,"ngIf"],["tuiItem","","class","t-wrapper",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button","class","t-tool t-tool_margin",3,"focusable","icon","tuiHint","click",4,"ngIf"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","tuiItem","","type","button",1,"t-tool",3,"click","focusable","icon","tuiHint"],["tuiItem","",1,"t-wrapper"],["appearance","icon","size","s","tuiHintDescribe","","tuiHintDirection","top-left","tuiIconButton","","type","button",1,"t-tool",3,"click","focusable","icon","tuiHint"],["accept","image/*","type","file",1,"t-image",3,"change","tuiFocusable"],["tuiItem","",1,"t-tool","t-tool_margin"]],template:function(t,i){t&1&&(Ve(),S(0,"button",8),T(1,eb,1,0,"ng-container",9),R(2,"async"),g(3,"div",10),y("focus",function(){return i.onTopFocus()}),v(),g(4,"div",10),y("focus",function(){return i.onBottomFocus()}),v(),T(5,Sb,13,10,"section",11),R(6,"async")),t&2&&(h(),l("ngIf",H(2,4,i.editor.stateChange$)),h(2),l("tuiFocusable",i.focusable),h(),l("tuiFocusable",i.focusable),h(),l("ngIf",H(6,6,i.texts$)))},dependencies:[_e,Af,Rf,Df,Jf,ot,pa,dm,Kf,If,Of,Sf,Lf,tm,rm,lm,am,ee,yn,_m,Ae,Tp,be,ke,ve,Se,K],styles:['.t-tools-wrapper[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none;position:-webkit-sticky;position:sticky;top:0;display:flex;padding:.25rem .75rem;overflow:auto;flex-wrap:wrap;box-shadow:0 .125rem .1875rem #0000001a}.t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar, .t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{display:none}.t-tools-wrapper._disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-block[_ngcontent-%COMP%]{display:flex;padding:.25rem 0}.t-block[_ngcontent-%COMP%]:not(:last-child):after{content:"";display:block;margin:0 .25rem;width:1px;background:var(--tui-secondary-active)}.t-tool[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}button.t-tool[_ngcontent-%COMP%]:hover, .t-tool[_ngcontent-%COMP%] button:hover{background:var(--tui-secondary-hover)}.t-tool_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-font[_ngcontent-%COMP%]{padding:.3em 0;outline:none;width:100%;pointer-events:none}.t-image[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;font-size:0;opacity:0;cursor:pointer}.t-image[_ngcontent-%COMP%]::-webkit-file-upload-button{display:none}.t-file-upload[_ngcontent-%COMP%]{display:none}.t-color-picker[_ngcontent-%COMP%] tui-hosted-dropdown, .t-color-picker[_ngcontent-%COMP%] tui-color-picker, .t-color-picker[_ngcontent-%COMP%] tui-color-edit{display:none}.t-prevent-parent-label-behavior[_ngcontent-%COMP%]{display:none}'],changeDetection:0}),e})(),Tm=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[z,Le,bn,Me,rt,ha,cm,im,um,sm,kf,Ff,wf,em,pm,Qf,xf,Pf,Ts,Hf]]}),e})();var Cm=(()=>{class e{constructor(t,i,o,r,s,c,d){this.el=t,this.renderer=i,this.sanitizer=o,this.tuiSanitizer=r,this.document=s,this.editor=c,this.options=d}set content(t){var i;this.renderer.setProperty(this.el.nativeElement,"innerHTML",this.tuiSanitizer?this.tuiSanitizer.sanitize(xi.HTML,(i=t==null?void 0:t.replace(/colwidth/g,"width"))!==null&&i!==void 0?i:""):this.sanitizer.sanitize(xi.HTML,t??""))}click(t){var i,o;if(this.editor||!pt(t.target))return;let r=((o=(i=t.target)===null||i===void 0?void 0:i.closest("a"))===null||o===void 0?void 0:o.getAttribute("href"))||"";r.startsWith("#")&&(this.document.location.hash=r.replace("#",""),t.preventDefault())}}return e.\u0275fac=function(t){return new(t||e)(a(N),a(ji),a(Mu),a(Io,8),a(qe),a(zo,8),a(Ee))},e.\u0275cmp=k({type:e,selectors:[["tui-editor-socket"]],hostVars:2,hostBindings:function(t,i){t&1&&y("click",function(r){return i.click(r)}),t&2&&J("tui-editor-socket",i.options.enableDefaultStyles)},inputs:{content:"content"},decls:0,vars:0,template:function(t,i){},styles:[`.tui-editor-socket{display:block;margin:0;color:var(--tui-text-01);font:var(--tui-font-text-m)}.tui-editor-socket[tuiTiptapEditor]{overflow:hidden}.tui-editor-socket .ProseMirror{min-height:5.375rem;padding:.2rem 1rem;outline:none;white-space:pre-wrap}.tui-editor-socket .resize-cursor{cursor:ew-resize;cursor:col-resize}.tui-editor-socket h1,.tui-editor-socket h2,.tui-editor-socket h3,.tui-editor-socket h4,.tui-editor-socket h5,.tui-editor-socket h6{word-break:break-word;line-height:normal}.tui-editor-socket h1:first-child,.tui-editor-socket h2:first-child,.tui-editor-socket p:last-child{margin-bottom:0}.tui-editor-socket p:last-child,.tui-editor-socket pre:last-child{margin-bottom:0}.tui-editor-socket p:empty:after{content:" ";white-space:pre}.tui-editor-socket p:first-child{margin-top:0;min-width:1px}.tui-editor-socket p{margin:1rem 0}.tui-editor-socket p>span{line-height:initial}.tui-editor-socket blockquote{margin:1.25rem 0 1.25rem 1.5rem;padding-left:1.0625rem;border-left:1px solid var(--tui-base-04)}.tui-editor-socket hr{border:none;border-top:1px solid var(--tui-base-03);margin:1rem 0}.tui-editor-socket mark{background:unset;color:inherit}.tui-editor-socket font[face="Courier New"]{display:inline-block;padding:.25rem .5rem;border-radius:.25rem;background-color:#ecf1f7;word-break:break-word}.tui-editor-socket a:not([data-type="jump-anchor"]){color:var(--tui-link);text-decoration:none;outline:none}.tui-editor-socket a:not([data-type="jump-anchor"]):hover{color:var(--tui-link-hover);text-decoration:underline}.tui-editor-socket a:not([data-type="jump-anchor"]):active{color:var(--tui-primary-active)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]{text-decoration:underline;-webkit-text-decoration-color:var(--tui-link);text-decoration-color:var(--tui-link)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:before{content:"#"}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:hover{color:var(--tui-link)}.tui-editor-socket .ProseMirror a:hover img[contenteditable=false]{cursor:pointer;outline:.25rem solid var(--tui-link)}.tui-editor-socket ul:not([data-type]),.tui-editor-socket ol:not([data-type]){list-style-type:none;margin:1rem 1rem 1rem 1.5rem;padding:0}.tui-editor-socket ul:not([data-type]) li,.tui-editor-socket ol:not([data-type]) li{margin:.75rem 0}.tui-editor-socket ul:not([data-type]) li>p,.tui-editor-socket ol:not([data-type]) li>p{display:inline;margin:0 auto;word-break:break-word}.tui-editor-socket ul:not([data-type]) li:before,.tui-editor-socket ol:not([data-type]) li:before{unicode-bidi:-webkit-isolate;unicode-bidi:isolate;font-feature-settings:"tnum";font-variant-numeric:tabular-nums;text-transform:none;text-indent:0;text-align:start;text-align-last:start}.tui-editor-socket ul:not([data-type]) li>p{display:block}.tui-editor-socket ul:not([data-type])>li:before{content:"";display:inline-block;width:.5rem;height:.5rem;border-radius:100%;margin:.5rem .875rem .0625rem -1.375rem;background-color:var(--tui-primary);vertical-align:top;box-sizing:border-box;float:left}.tui-editor-socket li ul:not([data-type])>li:before{background:none;border:.125rem solid var(--tui-primary)}.tui-editor-socket li ul:not([data-type])>li>ul:not([data-type])>li:before{background:var(--tui-primary);border-radius:0;width:.375rem;height:.375rem}.tui-editor-socket ol:not([data-type]){counter-reset:item}.tui-editor-socket ol:not([data-type])>li:before{content:counters(item,".") ".";display:block;counter-increment:item;margin:0 .75rem 0 -1.5rem;color:var(--tui-base-05);vertical-align:top;float:left;white-space:nowrap}.tui-editor-socket [data-type=details-content] ol{counter-reset:details-item}.tui-editor-socket [data-type=details-content] ol:not([data-type])>li:before{content:counters(details-item,".") ".";counter-increment:details-item}.tui-editor-socket [data-type=details-content] ol [data-type=details-content] ol{counter-reset:details-item2}.tui-editor-socket [data-type=details-content] ol:not([data-type])>li [data-type=details-content] ol:not([data-type])>li:before{content:counters(details-item2,".") ".";counter-increment:details-item2}.tui-editor-socket ul[data-type] li[data-checked]{display:flex;grid-gap:.5rem;gap:.5rem}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]{position:relative;width:var(--t-size, 1rem);height:var(--t-size, 1rem);border-radius:var(--tui-radius-xs, .25rem);transition-property:color,background,opacity,box-shadow,border;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:.125rem solid transparent;outline-offset:-.125rem;margin-top:.25rem;cursor:pointer}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]:before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:currentColor;-webkit-mask:url('data:image/svg+xml,') center / 100%;mask:url('data:image/svg+xml,') center / 100%;transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out,-webkit-mask 0s var(--tui-duration) ease-in-out}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked{background:var(--tui-primary, #526ed3);color:var(--tui-primary-text, #fff)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked:before{-webkit-mask-image:url('data:image/svg+xml,');mask-image:url('data:image/svg+xml,');transform:scale(1)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]{box-shadow:inset 0 0 0 1px var(--tui-base-04);color:var(--tui-text-01)}.tui-editor-socket._preview-image img{cursor:pointer}.tui-editor-socket .ProseMirror video,.tui-editor-socket .ProseMirror audio{pointer-events:none}.tui-editor-socket img.ProseMirror-selectednode{outline:.25rem solid var(--tui-primary-hover)}.tui-editor-socket .t-editor-placeholder:before{content:attr(data-placeholder);float:left;color:var(--tui-base-05);pointer-events:none;height:0}.tui-editor-socket table{border-collapse:collapse;table-layout:unset;width:100%;margin:0;overflow:hidden}.tui-editor-socket table .tableWrapper{overflow-x:auto}.tui-editor-socket .tableWrapper,.tui-editor-socket .tui-table-wrapper{overflow-x:auto}.tui-editor-socket table td{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word}.tui-editor-socket table th{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word;font-weight:bold;text-align:left;background-color:var(--tui-base-02);min-height:2rem}.tui-editor-socket table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:-2px;width:4px;background-color:#adf;pointer-events:none}.tui-editor-socket table td>*{margin-top:0;margin-bottom:0}.tui-editor-socket table th>*{margin-top:0;margin-bottom:0}.tui-editor-socket .selectedCell:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--tui-selection);pointer-events:none}.tui-editor-socket summary{display:flex;align-items:center;min-height:3.5rem;width:100%;padding:0 1.25rem;box-sizing:border-box;border-radius:var(--tui-radius-l);pointer-events:none;outline:none}.tui-editor-socket summary:focus-visible{outline:2px solid var(--tui-link)}.tui-editor-socket summary p{min-width:1px;margin:0}.tui-editor-socket summary::-webkit-details-marker{display:none}.tui-editor-socket details[open] summary{border-radius:var(--tui-radius-l) var(--tui-radius-l) 0 0}.tui-editor-socket .details-arrow,.tui-editor-socket .t-details-arrow{position:absolute;top:1.5rem;right:1.25rem;height:.575rem;width:.575rem;border:1px solid var(--tui-base-06);border-width:0 2px 2px 0;transform:rotate(45deg);transition:var(--tui-duration, .3s);-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;padding:0;background:none;cursor:pointer;outline:none}.tui-editor-socket details{width:100%;border:1px solid var(--tui-base-04);border-radius:var(--tui-radius-l)}.tui-editor-socket div[data-type=details-content]{padding:1.25rem;min-height:3rem;border:1px solid var(--tui-base-04);border-width:1px 0 0}.tui-editor-socket div[data-type=details-content] h1:first-child,.tui-editor-socket div[data-type=details-content] h2:first-child,.tui-editor-socket div[data-type=details-content] pre:first-child,.tui-editor-socket div[data-type=details-content] ul:first-child,.tui-editor-socket div[data-type=details-content] ol:first-child,.tui-editor-socket div[data-type=details-content] ol li:first-child,.tui-editor-socket div[data-type=details-content] ul li:first-child{margin-top:0}.tui-editor-socket .details-wrapper,.tui-editor-socket .t-details-wrapper{margin-bottom:.5rem;position:relative;display:flex}.tui-editor-socket .details-wrapper_rendered .details-arrow,.tui-editor-socket .t-details-wrapper_rendered .details-arrow,.tui-editor-socket .details-wrapper_rendered .t-details-arrow,.tui-editor-socket .t-details-wrapper_rendered .t-details-arrow{pointer-events:none}.tui-editor-socket .details-wrapper_rendered summary,.tui-editor-socket .t-details-wrapper_rendered summary{transition:transform var(--tui-duration, .3s);cursor:pointer;pointer-events:auto}.tui-editor-socket .details-wrapper_rendered summary:hover,.tui-editor-socket .t-details-wrapper_rendered summary:hover{background:var(--tui-base-02)}.tui-editor-socket details[open]+.details-arrow,.tui-editor-socket details[open]+.t-details-arrow{top:1.75rem;transform:rotate(225deg)}.tui-editor-socket pre{white-space:pre-wrap;word-break:break-word;border-radius:.25rem;margin:1rem 0;padding:.75rem 1rem;font-family:Courier,monospace;color:var(--tui-text-02);background:var(--tui-base-02)}.tui-editor-socket .tui-group-node{display:flex;flex-direction:row}.tui-editor-socket .tui-group-node:hover>.tui-group-pointer{pointer-events:auto;opacity:1}.tui-editor-socket .tui-group-pointer{opacity:0;min-height:.8125rem;max-height:.8125rem;min-width:.8125rem;max-width:.8125rem;margin:.3125rem .3125rem 0 0;cursor:grab;background-image:url('data:image/svg+xml;charset=UTF-8,');background-repeat:no-repeat;background-size:contain;background-position:center}.tui-editor-socket [data-mode=onDark] .tui-group-pointer{background-image:url('data:image/svg+xml;charset=UTF-8,')} +`],encapsulation:2,changeDetection:0}),e})(),ym=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();var Ab=["*",[["tools"]],[["tools"]],[["mention"]]],kb=["*","tools","tools","mention"];function Rb(e,n){if(e&1){let t=F();g(0,"tui-toolbar",10),y("fileAttached",function(o){I(t);let r=u(2);return x(r.fileAttached.emit(o))}),me(1,1),v()}if(e&2){let t=u(2);l("disabled",!t.interactive)("tools",t.tools)}}function Fb(e,n){if(e&1&&(g(0,"div",11),Te(1),v()),e&2){let t=u(2);h(),Ne(" ",t.exampleText," ")}}function Lb(e,n){if(e&1){let t=F();g(0,"tui-scrollbar",14),y("mousedown",function(o){I(t);let r=u(3);return x(r.focus(o))}),Ut(1,15),v()}if(e&2){u();let t=j(4);h(),l("ngTemplateOutlet",t)}}function Hb(e,n){if(e&1){let t=F();g(0,"tui-scrollbar",16),y("mousedown",function(o){I(t);let r=u(3);return x(r.focus(o))}),Ut(1,15),S(2,"tui-editor-portal-host"),v()}if(e&2){u();let t=j(4);h(),l("ngTemplateOutlet",t)}}function Nb(e,n){if(e&1){let t=F();g(0,"tui-toolbar",21),y("fileAttached",function(o){I(t);let r=u(5);return x(r.fileAttached.emit(o))}),me(1,2),v()}if(e&2){let t=u().$implicit,i=u(4);l("disabled",!i.interactive)("tools",i.tools)("tuiActiveZoneParent",t)}}function jb(e,n){if(e&1){let t=F();g(0,"tui-edit-link",22,2),y("addLink",function(o){I(t);let r=j(1),s=u(5);return x(r.anchorMode?s.addAnchor(o):s.addLink(o))})("removeLink",function(){I(t);let o=j(1),r=u(5);return x(o.anchorMode?r.removeAnchor():r.removeLink())}),v()}}function Ub(e,n){e&1&&(Ie(0),me(1,3),xe())}function zb(e,n){if(e&1&&(g(0,"div"),T(1,Nb,2,3,"tui-toolbar",19)(2,jb,2,0,"tui-edit-link",20)(3,Ub,2,0,"ng-container",9),v()),e&2){let t=u(3).ngIf,i=u();J("t-floating",i.floatingToolbar),h(),l("ngIf",t&&i.floatingToolbar),h(),l("ngIf",i.isLinkSelected),h(),l("ngIf",i.isMentionMode)}}function Bb(e,n){if(e&1){let t=F();g(0,"div",17)(1,"tui-editor-socket",18),y("stateChange",function(){return I(t),x(0)})("valueChange",function(o){I(t);let r=u(3);return x(r.onModelChange(o))}),v()(),T(2,zb,4,5,"ng-template",null,1,de)}if(e&2){let t=j(3),i=u(3);l("tuiDropdown",t)("tuiToolbarDropdown",i.dropdownSelectionHandler)("tuiToolbarDropdownPosition",i.floatingToolbar?"selection":"tag"),h(),l("editable",i.interactive)("value",i.value)}}function Vb(e,n){if(e&1&&(Ie(0),T(1,Lb,2,1,"tui-scrollbar",12)(2,Hb,3,1,"tui-scrollbar",13)(3,Bb,4,5,"ng-template",null,0,de),xe()),e&2){let t=u(2);h(),l("ngIf",t.floatingToolbar),h(),l("ngIf",!t.floatingToolbar)}}function $b(e,n){if(e&1){let t=F();g(0,"div",4),y("tuiActiveZoneChange",function(o){I(t);let r=u();return x(r.onActiveZone(o))}),g(1,"div",5),T(2,Rb,2,2,"tui-toolbar",6),g(3,"div",7),me(4),v(),T(5,Fb,2,1,"div",8),v(),T(6,Vb,5,2,"ng-container",9),v()}if(e&2){let t=n.ngIf,i=u();l("appearance",i.options.appearence)("disabled",i.disabled)("focus",i.computedFocused)("hover",i.pseudoHover)("invalid",i.computedInvalid)("readOnly",i.readOnly),h(2),l("ngIf",t&&!i.floatingToolbar),h(),J("t-placeholder_raised",i.placeholderRaised),h(2),l("ngIf",i.hasExampleText),h(),l("ngIf",t)}}var Wb=(()=>{class e extends Gh{constructor(){super(...arguments),this.previousTagPosition=null,this.stream$=wt([this.handler$,this.selection$.pipe(b(()=>this.getRange()),oe((t,i)=>t.startOffset===i.startOffset&&t.endOffset===i.endOffset))]).pipe(b(([t,i])=>{var o;let r=this.el.nativeElement.contains(i.commonAncestorContainer)||((o=i.commonAncestorContainer.parentElement)===null||o===void 0?void 0:o.closest("tui-dropdown"));return this.range=r&&as(i.commonAncestorContainer)?i:this.range,r&&t(this.range)||this.inDropdown(i)})),this.position="selection"}set tuiToolbarDropdown(t){this.tuiDropdownSelection=t}getClientRect(){var t,i,o,r;switch(this.position){case"tag":{let{commonAncestorContainer:s}=this.range,c=pt(s)?s:s.parentNode;return!((t=c==null?void 0:c.parentElement)===null||t===void 0)&&t.closest("tui-dropdown")?(i=this.previousTagPosition)!==null&&i!==void 0?i:ai:(this.previousTagPosition=c&&pt(c)?((o=this.doc.querySelector(".ProseMirror-selectednode"))===null||o===void 0?void 0:o.getBoundingClientRect())||c.getBoundingClientRect():ai,this.previousTagPosition)}case"word":return bs(this.range).getBoundingClientRect();default:{let s=this.range.getBoundingClientRect();return s.x===0&&s.y===0&&s.width===0&&s.height===0?((r=this.el.nativeElement.querySelector("p"))!==null&&r!==void 0?r:this.el.nativeElement).getBoundingClientRect():s}}}}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275dir=w({type:e,selectors:[["","tuiToolbarDropdown",""]],inputs:{position:[0,"tuiToolbarDropdownPosition","position"],tuiToolbarDropdown:"tuiToolbarDropdown"},features:[A([Zi(e),Dn(e)]),W]}),e})(),bm=(()=>{class e extends Hn{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275prov=Q({token:e,factory:e.\u0275fac}),e})(),Gb=[{provide:Qa,deps:[Ud],useFactory:e=>{let n=new no(1);return Promise.all(e).then(t=>n.next(t)),n}},{provide:lr,deps:[ji],useFactory:e=>e.createElement("div")},{provide:vo,deps:[lr,Qa,qd],useFactory:(e,n,t)=>wt([t,n]).pipe(Wt(1),b(([i,o])=>new i({element:e,extensions:o})),Zr({bufferSize:1,refCount:!0}))},De,bm],Yb=(()=>{class e extends _o{}return e.\u0275fac=(()=>{let n;return function(i){return(n||(n=ae(e)))(i||e)}})(),e.\u0275cmp=k({type:e,selectors:[["tui-editor-portal-host"]],features:[A([{provide:Hn,useExisting:To},{provide:_o,useExisting:e}]),W],decls:2,vars:0,consts:[["viewContainer",""]],template:function(t,i){t&1&&Ut(0,null,0)},styles:["[_nghost-%COMP%]{position:absolute;top:0;left:0;display:block;height:100%;width:100%;pointer-events:none}"],changeDetection:0}),e})(),Zb=(()=>{class e extends fi{constructor(t){super(),this.el=t,this.type="viewport"}getClientRect(){return this.el.nativeElement.getBoundingClientRect()}}return e.\u0275fac=function(t){return new(t||e)(a(N))},e.\u0275dir=w({type:e,selectors:[["","tuiEditorPortal",""]],features:[A([{provide:To,useExisting:bm},Kp(e)]),W]}),e})(),tN=(()=>{class e extends Ai{constructor(t,i,o,r,s,c,d,p,_){super(t,i,d),this.editorLoaded$=o,this.editorService=r,this.contentProcessor=s,this.doc=c,this.options=p,this.zone=_,this.exampleText="",this.tools=go,this.floatingToolbar=!1,this.fileAttached=new Pe,this.hasMentionPlugin=!1,this.focused=!1,this.openDropdownWhen=C=>this.currentFocusedNodeIsTextAnchor(C)||this.currentFocusedNodeIsImageAnchor||this.isMentionMode,this.editorLoaded$.pipe(ri(0),re(this.destroy$)).subscribe(()=>{this.hasMentionPlugin=!!this.editorService.getOriginTiptapEditor().extensionManager.extensions.find(C=>C.name==="mention"),this.patchContentEditableElement(),this.listenResizeEvents()})}get nativeFocusableElement(){var t,i;return this.computedDisabled?null:((i=(t=this.el)===null||t===void 0?void 0:t.nativeElement)===null||i===void 0?void 0:i.querySelector("[contenteditable].ProseMirror"))||null}get dropdownSelectionHandler(){return this.floatingToolbar?Bi:this.focused?this.openDropdownWhen:cn}get editor(){return this.editorService.getOriginTiptapEditor()?this.editorService:null}get placeholderRaised(){return this.computedFocused&&!this.readOnly||this.hasValue}get hasExampleText(){return!!this.exampleText&&this.computedFocused&&!this.hasValue&&!this.readOnly}get isLinkSelected(){var t,i,o,r;let s=(t=this.doc.getSelection())===null||t===void 0?void 0:t.focusNode,c=s==null?void 0:s.parentNode;return(c==null?void 0:c.nodeName.toLowerCase())==="a"||((i=c==null?void 0:c.parentNode)===null||i===void 0?void 0:i.nodeName.toLowerCase())==="a"||(s==null?void 0:s.nodeName.toLowerCase())==="a"||!!(!((o=s==null?void 0:s.parentElement)===null||o===void 0)&&o.closest("tui-edit-link"))||!!(!((r=s==null?void 0:s.parentElement)===null||r===void 0)&&r.closest("tui-dropdown"))}get mentionSuggestions(){let t=this.selectionState.before;return t!=null&&t.startsWith("@")&&t.length>1&&(t==null?void 0:t.replace("@",""))||""}get isMentionMode(){var t;return this.hasMentionPlugin&&((t=this.selectionState.before)===null||t===void 0?void 0:t.startsWith("@"))}writeValue(t){var i,o;if(t===this.value)return;let r=this.contentProcessor(t||"");super.writeValue(r),r!==t&&((i=this.control)===null||i===void 0||i.setValue(r,{onlySelf:!1,emitEvent:!1,emitModelToViewChange:!1,emitViewToModelChange:!1})),this.focused||(o=this.doc.getSelection())===null||o===void 0||o.removeAllRanges()}onActiveZone(t){var i;this.focused=t,this.updateFocused(t),(i=this.control)===null||i===void 0||i.updateValueAndValidity()}onModelChange(t){this.value=t}addAnchor(t){var i;(i=this.editor)===null||i===void 0||i.setAnchor(t)}removeAnchor(){var t;(t=this.editor)===null||t===void 0||t.removeAnchor()}addLink(t){var i,o;(i=this.editor)===null||i===void 0||i.selectClosest(),(o=this.editor)===null||o===void 0||o.setLink(t)}removeLink(){var t;(t=this.editor)===null||t===void 0||t.unsetLink()}get selectionState(){return Rd(this.editor)}focus(t){var i,o;!((i=this.nativeFocusableElement)===null||i===void 0)&&i.contains(t.target)||(t.preventDefault(),(o=this.nativeFocusableElement)===null||o===void 0||o.focus())}ngOnDestroy(){var t;(t=this.editor)===null||t===void 0||t.destroy()}getFallbackValue(){return""}currentFocusedNodeIsTextAnchor(t){var i,o;return!!(!((o=(i=t.startContainer.parentElement)===null||i===void 0?void 0:i.closest("a"))===null||o===void 0)&&o.contains(this.focusNode))&&Ld(t)}get focusNode(){var t,i;return(i=(t=this.doc.getSelection())===null||t===void 0?void 0:t.focusNode)!==null&&i!==void 0?i:null}get hasValue(){return!!this.value}get currentFocusedNodeIsImageAnchor(){var t,i,o;return((t=this.focusNode)===null||t===void 0?void 0:t.nodeName)==="A"&&["IMG","TUI-IMAGE-EDITOR"].includes((o=(i=this.focusNode)===null||i===void 0?void 0:i.childNodes[0])===null||o===void 0?void 0:o.nodeName)}patchContentEditableElement(){var t,i;(t=this.nativeFocusableElement)===null||t===void 0||t.setAttribute("translate",this.options.translate),(i=this.nativeFocusableElement)===null||i===void 0||i.setAttribute("spellcheck",String(this.options.spellcheck))}listenResizeEvents(){var t,i;!((t=this.el)===null||t===void 0)&&t.nativeElement&&er((i=this.el)===null||i===void 0?void 0:i.nativeElement,Hd).pipe(rn(0),$i(this.zone),re(this.destroy$)).subscribe(()=>this.editorService.valueChange$.next(this.editorService.getHTML()))}}return e.\u0275fac=function(t){return new(t||e)(a(zi,10),a(ft),a(vo),a(De),a(zd),a(qe),a(Bd,8),a(Ee),a(Xe))},e.\u0275cmp=k({type:e,selectors:[["tui-editor"]],viewQuery:function(t,i){if(t&1&&(at(zo,5,N),at(fa,5)),t&2){let o;$e(o=We())&&(i.el=o.first),$e(o=We())&&(i.toolbar=o.first)}},inputs:{exampleText:"exampleText",tools:"tools",floatingToolbar:"floatingToolbar"},outputs:{fileAttached:"fileAttached"},features:[A([ei(e),lp({delay:yc}),Gb]),W],ngContentSelectors:kb,decls:2,vars:3,consts:[["editor",""],["dropdown",""],["link",""],["tuiWrapper","","class","t-wrapper",3,"appearance","disabled","focus","hover","invalid","readOnly","tuiActiveZoneChange",4,"ngIf"],["tuiWrapper","",1,"t-wrapper",3,"tuiActiveZoneChange","appearance","disabled","focus","hover","invalid","readOnly"],[1,"t-toolbar-wrapper"],[3,"disabled","tools","fileAttached",4,"ngIf"],[1,"t-placeholder"],["class","t-example-text",4,"ngIf"],[4,"ngIf"],[3,"fileAttached","disabled","tools"],[1,"t-example-text"],["class","t-scrollbar",3,"mousedown",4,"ngIf"],["tuiEditorPortal","","class","t-scrollbar",3,"mousedown",4,"ngIf"],[1,"t-scrollbar",3,"mousedown"],[3,"ngTemplateOutlet"],["tuiEditorPortal","",1,"t-scrollbar",3,"mousedown"],["tuiDropdownLimitWidth","auto",3,"tuiDropdown","tuiToolbarDropdown","tuiToolbarDropdownPosition"],["tuiTiptapEditor","",3,"stateChange","valueChange","editable","value"],[3,"disabled","tools","tuiActiveZoneParent","fileAttached",4,"ngIf"],[3,"addLink","removeLink",4,"ngIf"],[3,"fileAttached","disabled","tools","tuiActiveZoneParent"],[3,"addLink","removeLink"]],template:function(t,i){t&1&&(Ve(Ab),T(0,$b,7,11,"div",3),R(1,"async")),t&2&&l("ngIf",H(1,1,i.editorLoaded$))},dependencies:[fa,jo,Yb,Cm,pa,ee,Ki,gt,ju,Zb,Di,ii,Ks,Wn,Wb,zo,K],styles:["[_nghost-%COMP%]{position:relative;z-index:0;display:block;font:var(--tui-font-text-m);border-radius:var(--tui-radius-m);max-height:inherit;min-height:10rem;box-sizing:border-box;overflow:clip}.t-wrapper[_ngcontent-%COMP%]{display:flex;max-height:inherit;min-height:inherit;cursor:text;overflow:clip;flex-direction:column;border-radius:inherit}.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);margin:1rem 1rem -1rem;min-height:1.625rem;width:95%;font-size:.9375rem}@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-placeholder_raised[_ngcontent-%COMP%]{width:110%}.t-placeholder[_ngcontent-%COMP%]:empty{min-height:.8rem}.t-example-text[_ngcontent-%COMP%]{position:absolute;left:1rem;margin-top:1.6rem;color:var(--tui-base-06);letter-spacing:normal;text-transform:none}.t-example-text_light[_ngcontent-%COMP%]{color:var(--tui-text-03-night)}.t-example-text_dark[_ngcontent-%COMP%]{color:var(--tui-text-03)}.t-scrollbar[_ngcontent-%COMP%]{display:flex;border-bottom:.3125rem solid transparent;padding-bottom:1.3125rem;box-sizing:border-box;flex:1}.t-floating[_ngcontent-%COMP%], .t-floating[_ngcontent-%COMP%] .t-tools-wrapper{max-width:var(--tui-floating-toolbar-max-width, 31.25rem);flex-wrap:nowrap}"],changeDetection:0}),e})(),iN=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({imports:[[Ts,z,Tm,Qi,Uo,ha,yi,vi,Mf,ym]]}),e})();var Dm=lg(Mm());var Xb=new se("Config for DOMPurify",{factory:()=>({}),providedIn:"root"}),qb=new se("Hooks for DOMPurify",{factory:()=>[],providedIn:"root"}),Kb=new se("A function that sanitizes value for a CSS rule",{factory:()=>e=>e,providedIn:"root"}),Qb=Dm.default,uN=(()=>{class e{constructor(t,i,{defaultView:o},r){this.config=t,this.sanitizeStyle=i,this.domPurify=Qb(o),r.forEach(({name:s,hook:c})=>{this.domPurify.addHook(s,c)})}sanitize(t,i,o=this.config){if(t===xi.SCRIPT)throw new Error("DOMPurify does not support SCRIPT context");return t===xi.STYLE?this.sanitizeStyle(String(i)):this.domPurify.sanitize(String(i||""),o)}}return e.\u0275fac=function(t){return new(t||e)(ye(Xb),ye(Kb),ye(qe),ye(qb))},e.\u0275prov=Q({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var dN=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=D({type:e}),e.\u0275inj=M({}),e})();export{Dv as a,Yx as b,Jb as c,Ln as d,ui as e,ur as f,Je as g,lt as h,dr as i,Ai as j,tp as k,hs as l,wM as m,IM as n,SM as o,PM as p,np as q,ZM as r,op as s,Zt as t,gt as u,yi as v,hp as w,fp as x,mp as y,gp as z,yn as A,bn as B,vs as C,_s as D,vp as E,_p as F,xt as G,Ot as H,bp as I,Mp as J,$w as K,Ww as L,eI as M,Dp as N,wp as O,Ip as P,mI as Q,gI as R,cc as S,_I as T,TI as U,CI as V,pi as W,di as X,Nn as Y,lc as Z,uc as _,dc as $,Op as aa,Qp as ba,Nh as ca,No as da,zO as ea,MI as fa,DI as ga,Hp as ha,Gi as ia,Mo as ja,zg as ka,Bg as la,bc as ma,Do as na,wo as oa,WI as pa,GI as qa,Wg as ra,Ds as sa,qI as ta,Gg as ua,Yi as va,KI as wa,Io as xa,tx as ya,Xp as za,qp as Aa,ix as Ba,uO as Ca,Lh as Da,Hh as Ea,Ft as Fa,Lt as Ga,Mi as Ha,xn as Ia,jo as Ja,Uo as Ka,D1 as La,m0 as Ma,hl as Na,vi as Oa,Js as Pa,Le as Qa,E0 as Ra,A0 as Sa,tf as Ta,sf as Ua,F0 as Va,kr as Wa,ea as Xa,Ki as Ya,Qi as Za,na as _a,oa as $a,_e as ab,Me as bb,ra as cb,sa as db,gT as eb,iE as fb,wT as gb,mT as hb,qP as ib,ot as jb,rt as kb,gf as lb,vf as mb,_f as nb,iC as ob,nC as pb,j2 as qb,z2 as rb,tR as sb,dR as tb,hR as ub,Lr as vb,MR as wb,IR as xb,xR as yb,NR as zb,jR as Ab,gC as Bb,vC as Cb,CC as Db,nk as Eb,Ck as Fb,yf as Gb,tN as Hb,iN as Ib,uN as Jb,dN as Kb}; +//# sourceMappingURL=chunk-DFAUMSGH.js.map diff --git a/chunk-7Z3ZNFQW.js.map b/chunk-DFAUMSGH.js.map similarity index 67% rename from chunk-7Z3ZNFQW.js.map rename to chunk-DFAUMSGH.js.map index 46f6a978..cc12ef9c 100644 --- a/chunk-7Z3ZNFQW.js.map +++ b/chunk-DFAUMSGH.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/dompurify/dist/purify.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-browser.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-svg.js","node_modules/@tinkoff/ng-polymorpheus/fesm2015/tinkoff-ng-polymorpheus.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-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-item.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-let.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-obscured.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-directives-pressed.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-repeat-times.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-enums.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-date-time.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-constants.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/@taiga-ui/core/fesm2015/taiga-ui-core-components-scrollbar.js","node_modules/@tinkoff/ng-event-plugins/fesm2015/tinkoff-ng-event-plugins.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-textfield-controller.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-mask-accessor.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/core/fesm2015/taiga-ui-core-pipes-month.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-tooltip.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-primitive-textfield.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-push.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-toggle.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-abstract.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-directives-tiptap-editor.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-align-content.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-code.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-details.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-font-size.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-font-style.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-group.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/@maskito/angular/node_modules/tslib/tslib.es6.mjs","node_modules/@maskito/angular/fesm2015/maskito-angular.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-input-inline.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-color-selector.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-highlight-color.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-list-configs.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-table-cell-color.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-table-size-selector.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-table-create.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-table-merge-cells.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-table-row-column-manager.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-text-color.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-edit-link.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-editor-socket.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-editor.js","node_modules/@tinkoff/ng-dompurify/fesm2015/tinkoff-ng-dompurify.js"],"sourcesContent":["/*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/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 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 objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n\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 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 /**\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 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 /**\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 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 /**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\n function cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n return array;\n }\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 function clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n }\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 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() {\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']);\n\n // SVG\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']);\n\n // 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 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']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\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', 'popover', 'popovertarget', 'popovertargetaction', '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', 'wrap', '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\n // eslint-disable-next-line unicorn/better-regex\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\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 const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\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 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 const DOCTYPE_NAME = seal(/^html$/i);\n const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/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 CUSTOM_ELEMENT: CUSTOM_ELEMENT\n });\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n const NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5,\n // Deprecated\n entityNode: 6,\n // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12 // Deprecated\n };\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\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 const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\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 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 /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '3.1.5';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {\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');\n\n // 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 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 /**\n * Expose whether this browser supports running the full DOMPurify.\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 CUSTOM_ELEMENT\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n\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 let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n\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 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\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\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 let FORCE_BODY = false;\n\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 let RETURN_DOM = false;\n\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 let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\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 let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\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 let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\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\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\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 let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\n /* Parsing of strict XHTML documents */\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\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\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 /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\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\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\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 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? 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 = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? 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 = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\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\n /* Parse profile info */\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\n /* Merge configuration parameters */\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\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\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 }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\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 }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\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', 'annotation-xml']);\n\n // 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 const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\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 const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\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 }\n\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 if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\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 }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\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 }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n\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 return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\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 /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\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);\n\n // We void attribute values for unremovable \"is\"\" attributes\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 /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\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 if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\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 (_) {\n // 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\n /* Work on whole document or just its body */\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 /**\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 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 | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n };\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 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 /**\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 const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\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 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 /**\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 const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\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\n /* Remove any ocurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any kind of possibly harmful comments */\n if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\\w]/g, currentNode.data)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\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\n /* Keep content except for bad-listed elements */\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 const childClone = cloneNode(childNodes[i], true);\n childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n parentNode.insertBefore(childClone, getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\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\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n return false;\n };\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 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\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 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 /**\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 const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\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 const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n const {\n attributes\n } = currentNode;\n\n /* Check if we have attributes; if not we might have a text node */\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\n /* Go backwards over all attributes; safely remove bad ones */\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\n /* Execute a hook if present */\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 _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n\n /* Handle attributes that require Trusted Types */\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\n /* Handle invalid data-* attribute set by try-catching it */\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 if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n } else {\n arrayPop(DOMPurify.removed);\n }\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\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 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 IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '';\n }\n\n /* Stringify, in case dirty is an object */\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\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\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 === NODE_TYPE.element && 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\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n }\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\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\n /* Serialize doctype if allowed */\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\n /* Sanitize final string template-safe */\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 /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\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 /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\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 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 /**\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 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 /**\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 DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\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 DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n return DOMPurify;\n }\n var purify = createDOMPurify();\n return purify;\n});\n","function tuiIsEdge(userAgent) {\n return userAgent.toLowerCase().includes('edge');\n}\nconst EDGE = 'edge/';\nfunction tuiIsEdgeOlderThan(version, userAgent) {\n const currentVersion = parseInt(userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length), 10);\n return currentVersion < version;\n}\nfunction tuiIsFirefox(userAgent) {\n return userAgent.toLowerCase().includes('firefox');\n}\nfunction tuiIsSafari({\n ownerDocument: doc\n}) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const win = doc === null || doc === void 0 ? void 0 : doc.defaultView;\n const isMacOsSafari = typeof win.safari !== 'undefined' && ((_b = (_a = win.safari) === null || _a === void 0 ? void 0 : _a.pushNotification) === null || _b === void 0 ? void 0 : _b.toString()) === '[object SafariRemoteNotification]';\n const isIosSafari = !!((_d = (_c = win.navigator) === null || _c === void 0 ? void 0 : _c.vendor) === null || _d === void 0 ? void 0 : _d.includes('Apple')) && !((_f = (_e = win.navigator) === null || _e === void 0 ? void 0 : _e.userAgent) === null || _f === void 0 ? void 0 : _f.includes('CriOS')) && !((_h = (_g = win.navigator) === null || _g === void 0 ? void 0 : _g.userAgent) === null || _h === void 0 ? void 0 : _h.includes('FxiOS'));\n return isMacOsSafari || isIosSafari;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiIsEdge, tuiIsEdgeOlderThan, tuiIsFirefox, tuiIsSafari };\n","import { tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';\nfunction makeRandomSalt() {\n return Math.floor(Math.random() * Date.now());\n}\nfunction escapeRegExp(search) {\n return search.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\nfunction extractLinearGradientIdsFromSvg(svg) {\n var _a;\n const ids = ((_a = svg.match(/url\\((\"?)('*)#(.*?)('*)\\)/g)) !== null && _a !== void 0 ? _a : []).map(url => url.slice(4, url.length - 1).replace(/['\"#]+/g, ''));\n return Array.from(new Set(ids));\n}\n/**\n * @description:\n * Any ‘linearGradient’ attributes which are defined on the referenced\n * element which are not defined on this element are inherited by this element.\n * If this element has no defined gradient stops, and the referenced element does\n * (possibly due to its own ‘xlink:href’ attribute), then this element inherits\n * the gradient stop from the referenced element. Inheritance can be indirect\n * to an arbitrary level; thus, if the referenced element inherits attribute\n * or gradient stops due to its own ‘xlink:href’ attribute, then the current\n * element can inherit those attributes or gradient stops.\n *\n * Documentation: https://www.w3.org/TR/SVG11/pservers.html\n *\n */\nfunction tuiSvgLinearGradientProcessor(svg, salt = makeRandomSalt()) {\n if (tuiIsString(svg)) {\n const uniqueIds = extractLinearGradientIdsFromSvg(svg);\n return uniqueIds.reduce((newSvg, previousId) => {\n const escapedId = escapeRegExp(previousId);\n const newId = `id_${salt}_${previousId}`;\n return newSvg.replace(new RegExp(`\"${escapedId}\"`, 'g'), `\"${newId}\"`).replace(new RegExp(`'${escapedId}'`, 'g'), `'${newId}'`).replace(new RegExp(`url\\\\('#${escapedId}'\\\\)`, 'g'), `url('#${newId}')`).replace(new RegExp(`url\\\\(\"#${escapedId}\"\\\\)`, 'g'), `url(\"#${newId}\")`).replace(new RegExp(`url\\\\(#${escapedId}\\\\)`, 'g'), `url(#${newId})`);\n }, svg);\n }\n return svg;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiSvgLinearGradientProcessor };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Injector, Directive, Self, TemplateRef, ChangeDetectorRef, ComponentFactoryResolver, NgModule } from '@angular/core';\n\n/**\n * Use this token to access context within your components when\n * instantiating them through {@link PolymorpheusOutletDirective}\n */\nconst POLYMORPHEUS_CONTEXT = new InjectionToken('POLYMORPHEUS_CONTEXT');\n\n/**\n * Wrapper class for a component that will be used as content for {@link PolymorpheusOutletDirective}\n *\n * @param component — an Angular component to be dynamically created\n * @param injector — optional {@link Injector} for lazy loaded module case\n *\n * TODO: Remove second generic as it is irrelevant, remove `null` from injector type\n */\nclass PolymorpheusComponent {\n constructor(component, i) {\n this.component = component;\n this.i = i;\n }\n createInjector(injector, useValue) {\n return Injector.create({\n parent: this.i || injector,\n providers: [{\n provide: POLYMORPHEUS_CONTEXT,\n useValue\n }]\n });\n }\n}\n\n/**\n * ng-template wrapper directive also stores {@link ChangeDetectorRef} to properly handle change detection.\n */\nlet PolymorpheusTemplate = /*#__PURE__*/(() => {\n class PolymorpheusTemplate {\n constructor(template, cdr) {\n this.template = template;\n this.cdr = cdr;\n this.polymorpheus = '';\n }\n check() {\n this.cdr.markForCheck();\n }\n static ngTemplateContextGuard(_dir, _ctx) {\n return true;\n }\n }\n /** @nocollapse */\n /** @nocollapse */PolymorpheusTemplate.ɵfac = function PolymorpheusTemplate_Factory(t) {\n return new (t || PolymorpheusTemplate)(i0.ɵɵdirectiveInject(i0.TemplateRef, 2), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n PolymorpheusTemplate.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: PolymorpheusTemplate,\n selectors: [[\"ng-template\", \"polymorpheus\", \"\"]],\n inputs: {\n polymorpheus: \"polymorpheus\"\n },\n exportAs: [\"polymorpheus\"]\n });\n return PolymorpheusTemplate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass PolymorpheusContext {\n constructor($implicit) {\n this.$implicit = $implicit;\n }\n get polymorpheusOutlet() {\n return this.$implicit;\n }\n}\n/**\n * @deprecated: use {@link PolymorpheusContext} instead\n * Primitive types used as content by {@link PolymorpheusOutletDirective}\n */\nclass PrimitiveContext extends PolymorpheusContext {}\nlet PolymorpheusOutletDirective = /*#__PURE__*/(() => {\n class PolymorpheusOutletDirective {\n constructor(vcr, i, t) {\n this.vcr = vcr;\n this.i = i;\n this.t = t;\n this.content = '';\n }\n get template() {\n if (isDirective(this.content)) {\n return this.content.template;\n }\n return this.content instanceof TemplateRef ? this.content : this.t;\n }\n ngOnChanges({\n content\n }) {\n var _a;\n const context = this.getContext();\n (_a = this.c) === null || _a === void 0 ? void 0 : _a.injector.get(ChangeDetectorRef).markForCheck();\n if (!content) {\n return;\n }\n this.vcr.clear();\n const proxy = context && new Proxy(context, {\n get: (_, key) => {\n var _a;\n return (_a = this.getContext()) === null || _a === void 0 ? void 0 : _a[key];\n }\n });\n if (isComponent(this.content)) {\n this.process(this.content, proxy);\n } else if (\n // tslint:disable-next-line:triple-equals\n (context instanceof PolymorpheusContext && context.$implicit) != null) {\n this.vcr.createEmbeddedView(this.template, proxy);\n }\n }\n ngDoCheck() {\n if (isDirective(this.content)) {\n this.content.check();\n }\n }\n static ngTemplateContextGuard(_dir, _ctx) {\n return true;\n }\n getContext() {\n if (isTemplate(this.content) || isComponent(this.content)) {\n return this.context;\n }\n return new PolymorpheusContext(typeof this.content === 'function' ? this.content(this.context) : this.content);\n }\n process(content, proxy) {\n const injector = content.createInjector(this.i, proxy);\n this.c = this.vcr.createComponent(injector.get(ComponentFactoryResolver).resolveComponentFactory(content.component), 0, injector);\n }\n }\n /** @nocollapse */\n /** @nocollapse */PolymorpheusOutletDirective.ɵfac = function PolymorpheusOutletDirective_Factory(t) {\n return new (t || PolymorpheusOutletDirective)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n PolymorpheusOutletDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: PolymorpheusOutletDirective,\n selectors: [[\"\", \"polymorpheusOutlet\", \"\"]],\n inputs: {\n content: [0, \"polymorpheusOutlet\", \"content\"],\n context: [0, \"polymorpheusOutletContext\", \"context\"]\n },\n features: [i0.ɵɵNgOnChangesFeature]\n });\n return PolymorpheusOutletDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction isDirective(content) {\n return content instanceof PolymorpheusTemplate;\n}\nfunction isComponent(content) {\n return content instanceof PolymorpheusComponent;\n}\nfunction isTemplate(content) {\n return isDirective(content) || content instanceof TemplateRef;\n}\nlet PolymorpheusModule = /*#__PURE__*/(() => {\n class PolymorpheusModule {}\n /** @nocollapse */\n /** @nocollapse */\n /** @nocollapse */PolymorpheusModule.ɵfac = function PolymorpheusModule_Factory(t) {\n return new (t || PolymorpheusModule)();\n };\n PolymorpheusModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: PolymorpheusModule\n });\n PolymorpheusModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return PolymorpheusModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Public API Surface of ng-polymorpheus\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule, PolymorpheusOutletDirective, PolymorpheusTemplate };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Directive, Input, HostBinding, Output, Optional, Inject, Injectable, TemplateRef, ChangeDetectorRef, ComponentFactoryResolver, Injector, INJECTOR, ElementRef, ViewContainerRef, ViewChild } from '@angular/core';\nimport * as i1 from '@angular/forms';\nimport { NgModel } from '@angular/forms';\nimport { tuiAssert } from '@taiga-ui/cdk/classes';\nimport { EMPTY_FUNCTION } from '@taiga-ui/cdk/constants';\nimport { tuiIsPresent } from '@taiga-ui/cdk/utils';\nimport { Subject, merge, Observable, BehaviorSubject } from 'rxjs';\nimport { delay, startWith, map, filter, distinctUntilChanged, switchMap, takeUntil, ignoreElements, endWith, share } from 'rxjs/operators';\nimport { tuiIfMap } from '@taiga-ui/cdk/observables';\nimport { PolymorpheusTemplate } from '@tinkoff/ng-polymorpheus';\nimport * as i1$1 from '@taiga-ui/cdk/services';\nimport { TuiIdService } from '@taiga-ui/cdk/services';\nimport { TuiNoHostException } from '@taiga-ui/cdk/exceptions';\nimport { DOCUMENT } from '@angular/common';\nconst _c0 = [\"viewContainer\"];\nconst TUI = 'tui_interactive_';\n/**\n * The most basic class for interactive components\n */\nlet AbstractTuiInteractive = /*#__PURE__*/(() => {\n class AbstractTuiInteractive {\n constructor() {\n this.pseudoHover = null;\n this.pseudoActive = null;\n this.pseudoFocus = null;\n /**\n * Determines if component is focusable with keyboard.\n */\n this.focusable = true;\n this.nativeId = '';\n /**\n * Emits 'true' on focus and 'false' on blur.\n */\n this.focusedChange = new EventEmitter();\n this.focusVisibleChange = new EventEmitter();\n this.focusVisible = false;\n this.autoIdString = `${TUI}${AbstractTuiInteractive.autoId++}${Date.now()}`;\n }\n get computedDisabled() {\n return this.disabled;\n }\n get computedFocusable() {\n return !this.computedDisabled && (this.focusable || this.focused);\n }\n get computedFocused() {\n var _a;\n return !this.computedDisabled && ((_a = this.pseudoFocus) !== null && _a !== void 0 ? _a : this.focused);\n }\n get computedFocusVisible() {\n var _a;\n return !this.computedDisabled && ((_a = this.pseudoFocus) !== null && _a !== void 0 ? _a : this.focusVisible);\n }\n // TODO: 3.0 Consider removing since native input is exposed\n get id() {\n return this.nativeId || this.autoIdString;\n }\n updateFocused(focused) {\n this.focusedChange.emit(focused);\n }\n updateFocusVisible(focusVisible) {\n if (this.focusVisible === focusVisible) {\n return;\n }\n this.focusVisible = focusVisible;\n this.focusVisibleChange.emit(focusVisible);\n }\n }\n AbstractTuiInteractive.autoId = 0;\n AbstractTuiInteractive.ɵfac = function AbstractTuiInteractive_Factory(t) {\n return new (t || AbstractTuiInteractive)();\n };\n AbstractTuiInteractive.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiInteractive,\n hostVars: 7,\n hostBindings: function AbstractTuiInteractive_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"data-focused\", ctx.pseudoFocus);\n i0.ɵɵclassProp(\"_disabled\", ctx.computedDisabled)(\"_focused\", ctx.computedFocused)(\"_focus-visible\", ctx.computedFocusVisible);\n }\n },\n inputs: {\n pseudoHover: \"pseudoHover\",\n pseudoActive: \"pseudoActive\",\n pseudoFocus: \"pseudoFocus\",\n focusable: \"focusable\",\n nativeId: \"nativeId\"\n },\n outputs: {\n focusedChange: \"focusedChange\",\n focusVisibleChange: \"focusVisibleChange\"\n }\n });\n return AbstractTuiInteractive;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass AbstractTuiValueTransformer {}\n\n/**\n * Basic ControlValueAccessor class to build form components upon\n */\nlet AbstractTuiControl = /*#__PURE__*/(() => {\n class AbstractTuiControl extends AbstractTuiInteractive {\n constructor(ngControl, cdr, valueTransformer) {\n super();\n this.ngControl = ngControl;\n this.cdr = cdr;\n this.valueTransformer = valueTransformer;\n this.refresh$ = new Subject();\n this.onTouched = EMPTY_FUNCTION;\n this.onChange = EMPTY_FUNCTION;\n this.fallbackValue = this.getFallbackValue();\n this.destroy$ = new Subject();\n this.readOnly = false;\n this.pseudoInvalid = null;\n if (ngDevMode && this.ngControl === null) {\n tuiAssert.assert(false, `NgControl not injected in ${this.constructor.name}!\\n`, 'Use [(ngModel)] or [formControl] or formControlName for correct work.');\n }\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n get computedInvalid() {\n return this.interactive && (this.pseudoInvalid !== null ? this.pseudoInvalid : this.touched && this.invalid);\n }\n get value() {\n var _a;\n return (_a = this.previousInternalValue) !== null && _a !== void 0 ? _a : this.fallbackValue;\n }\n set value(value) {\n this.updateValue(value);\n }\n get safeCurrentValue() {\n var _a;\n return (_a = this.rawValue) !== null && _a !== void 0 ? _a : this.fallbackValue;\n }\n get invalid() {\n return this.safeNgControlData(({\n invalid\n }) => invalid, false);\n }\n get valid() {\n return this.safeNgControlData(({\n valid\n }) => valid, false);\n }\n get touched() {\n return this.safeNgControlData(({\n touched\n }) => touched, false);\n }\n get disabled() {\n return this.safeNgControlData(({\n disabled\n }) => disabled, false);\n }\n get interactive() {\n return !this.readOnly && !this.computedDisabled;\n }\n get control() {\n return this.safeNgControlData(({\n control\n }) => control, null);\n }\n get computedName() {\n var _a, _b;\n return (_b = (_a = this.controlName) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : null;\n }\n get controlName() {\n var _a, _b, _c;\n return (_c = (_b = (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : null;\n }\n get rawValue() {\n const {\n ngControl\n } = this;\n if (ngControl === null) {\n return undefined;\n }\n const controlValue = ngControl instanceof NgModel && this.previousInternalValue === undefined ? ngControl.viewModel : ngControl.value;\n return this.fromControlValue(controlValue);\n }\n ngOnInit() {\n this.refresh$.pipe(delay(0), startWith(null), map(() => {\n var _a;\n return (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.control;\n }), filter(tuiIsPresent), distinctUntilChanged(), switchMap(control => merge(control.valueChanges, control.statusChanges)), takeUntil(this.destroy$)).subscribe(() => {\n this.refreshLocalValue(this.safeCurrentValue);\n });\n }\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n checkControlUpdate() {\n this.cdr.markForCheck();\n }\n registerOnChange(onChange) {\n this.onChange = componentValue => {\n onChange(this.toControlValue(componentValue));\n };\n this.refresh$.next();\n }\n registerOnTouched(onTouched) {\n this.onTouched = onTouched;\n }\n setDisabledState() {\n this.checkControlUpdate();\n }\n writeValue(value) {\n const controlValue = this.ngControl instanceof NgModel && this.previousInternalValue === undefined ? this.ngControl.model : value;\n this.refreshLocalValue(this.fromControlValue(controlValue));\n }\n updateFocused(focused) {\n if (!focused) {\n this.controlMarkAsTouched();\n }\n super.updateFocused(focused);\n }\n /**\n * @deprecated use `value` setter\n */\n updateValue(value) {\n if (this.disabled || this.valueIdenticalComparator(this.value, value)) {\n return;\n }\n this.previousInternalValue = value;\n this.controlSetValue(value);\n }\n valueIdenticalComparator(oldValue, newValue) {\n return oldValue === newValue;\n }\n safeNgControlData(extractor, defaultFieldValue) {\n var _a;\n return (_a = this.ngControl && extractor(this.ngControl)) !== null && _a !== void 0 ? _a : defaultFieldValue;\n }\n controlMarkAsTouched() {\n this.onTouched();\n this.checkControlUpdate();\n }\n controlSetValue(value) {\n this.onChange(value);\n this.checkControlUpdate();\n }\n refreshLocalValue(value) {\n this.previousInternalValue = value;\n this.checkControlUpdate();\n }\n fromControlValue(controlValue) {\n return this.valueTransformer ? this.valueTransformer.fromControlValue(controlValue) : controlValue;\n }\n toControlValue(componentValue) {\n return this.valueTransformer ? this.valueTransformer.toControlValue(componentValue) : componentValue;\n }\n }\n AbstractTuiControl.ɵfac = function AbstractTuiControl_Factory(t) {\n return new (t || AbstractTuiControl)(i0.ɵɵdirectiveInject(i1.NgControl, 8), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(AbstractTuiValueTransformer, 8));\n };\n AbstractTuiControl.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiControl,\n hostVars: 4,\n hostBindings: function AbstractTuiControl_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"_readonly\", ctx.readOnly)(\"_invalid\", ctx.computedInvalid);\n }\n },\n inputs: {\n readOnly: \"readOnly\",\n pseudoInvalid: \"pseudoInvalid\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return AbstractTuiControl;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction tuiAsControl(useExisting) {\n return {\n provide: AbstractTuiControl,\n useExisting\n };\n}\nlet AbstractTuiController = /*#__PURE__*/(() => {\n class AbstractTuiController {\n constructor() {\n this.change$ = new Subject();\n }\n ngOnChanges() {\n this.change$.next();\n }\n }\n AbstractTuiController.ɵfac = function AbstractTuiController_Factory(t) {\n return new (t || AbstractTuiController)();\n };\n AbstractTuiController.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiController,\n features: [i0.ɵɵNgOnChangesFeature]\n });\n return AbstractTuiController;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AbstractTuiDialogService = /*#__PURE__*/(() => {\n class AbstractTuiDialogService extends Observable {\n constructor(idService) {\n super(observer => this.dialogs$.subscribe(observer));\n this.idService = idService;\n this.dialogs$ = new BehaviorSubject([]);\n }\n open(content, options = {}) {\n return new Observable(observer => {\n const completeWith = result => {\n observer.next(result);\n observer.complete();\n };\n const dialog = Object.assign(Object.assign(Object.assign({}, this.defaultOptions), options), {\n content,\n completeWith,\n $implicit: observer,\n component: this.component,\n createdAt: Date.now(),\n id: this.idService.generate()\n });\n this.dialogs$.next([...this.dialogs$.value, dialog]);\n return () => {\n this.dialogs$.next(this.dialogs$.value.filter(item => item !== dialog));\n };\n });\n }\n }\n AbstractTuiDialogService.ɵfac = function AbstractTuiDialogService_Factory(t) {\n return new (t || AbstractTuiDialogService)(i0.ɵɵinject(TuiIdService));\n };\n AbstractTuiDialogService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AbstractTuiDialogService,\n factory: AbstractTuiDialogService.ɵfac\n });\n return AbstractTuiDialogService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AbstractTuiDialogDirective = /*#__PURE__*/(() => {\n class AbstractTuiDialogDirective extends PolymorpheusTemplate {\n constructor(templateRef, cdr, service) {\n super(templateRef, cdr);\n this.service = service;\n this.open$ = new Subject();\n this.options = {};\n this.open = false;\n this.openChange = this.open$.pipe(distinctUntilChanged(), tuiIfMap(() => this.service.open(this, this.options).pipe(ignoreElements(), endWith(false))), share());\n }\n ngOnChanges() {\n this.open$.next(this.open);\n }\n }\n AbstractTuiDialogDirective.ɵfac = function AbstractTuiDialogDirective_Factory(t) {\n return new (t || AbstractTuiDialogDirective)(i0.ɵɵdirectiveInject(TemplateRef), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(AbstractTuiDialogService));\n };\n AbstractTuiDialogDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiDialogDirective,\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n return AbstractTuiDialogDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AbstractTuiMultipleControl = /*#__PURE__*/(() => {\n class AbstractTuiMultipleControl extends AbstractTuiControl {\n clear() {\n this.value = [];\n }\n getFallbackValue() {\n return [];\n }\n }\n AbstractTuiMultipleControl.ɵfac = /* @__PURE__ */(() => {\n let ɵAbstractTuiMultipleControl_BaseFactory;\n return function AbstractTuiMultipleControl_Factory(t) {\n return (ɵAbstractTuiMultipleControl_BaseFactory || (ɵAbstractTuiMultipleControl_BaseFactory = i0.ɵɵgetInheritedFactory(AbstractTuiMultipleControl)))(t || AbstractTuiMultipleControl);\n };\n })();\n AbstractTuiMultipleControl.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiMultipleControl,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return AbstractTuiMultipleControl;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AbstractTuiNullableControl = /*#__PURE__*/(() => {\n class AbstractTuiNullableControl extends AbstractTuiControl {\n getFallbackValue() {\n return null;\n }\n }\n AbstractTuiNullableControl.ɵfac = /* @__PURE__ */(() => {\n let ɵAbstractTuiNullableControl_BaseFactory;\n return function AbstractTuiNullableControl_Factory(t) {\n return (ɵAbstractTuiNullableControl_BaseFactory || (ɵAbstractTuiNullableControl_BaseFactory = i0.ɵɵgetInheritedFactory(AbstractTuiNullableControl)))(t || AbstractTuiNullableControl);\n };\n })();\n AbstractTuiNullableControl.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiNullableControl,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return AbstractTuiNullableControl;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Abstract service for displaying portals\n */\nlet AbstractTuiPortalService = /*#__PURE__*/(() => {\n class AbstractTuiPortalService {\n get safeHost() {\n if (!this.host) {\n throw new TuiNoHostException();\n }\n return this.host;\n }\n attach(host) {\n this.host = host;\n }\n add(component) {\n return this.safeHost.addComponentChild(component);\n }\n remove({\n hostView\n }) {\n if (!hostView.destroyed) {\n hostView.destroy();\n }\n }\n addTemplate(templateRef, context) {\n return this.safeHost.addTemplateChild(templateRef, context);\n }\n removeTemplate(viewRef) {\n if (!viewRef.destroyed) {\n viewRef.destroy();\n }\n }\n }\n AbstractTuiPortalService.ɵfac = function AbstractTuiPortalService_Factory(t) {\n return new (t || AbstractTuiPortalService)();\n };\n AbstractTuiPortalService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AbstractTuiPortalService,\n factory: AbstractTuiPortalService.ɵfac\n });\n return AbstractTuiPortalService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Abstract class for host element for dynamically created portals.\n */\nlet AbstractTuiPortalHostComponent = /*#__PURE__*/(() => {\n class AbstractTuiPortalHostComponent {\n constructor(injector, el, portalService) {\n this.injector = injector;\n this.el = el;\n portalService.attach(this);\n }\n /** @deprecated unused, will be removed in 4.0 **/\n get clientRect() {\n return this.el.nativeElement.getBoundingClientRect();\n }\n addComponentChild(component) {\n const parent = component.createInjector(this.injector);\n const resolver = parent.get(ComponentFactoryResolver);\n const factory = resolver.resolveComponentFactory(component.component);\n // TODO: Remove in 4.0\n const providers = [{\n provide: AbstractTuiPortalHostComponent,\n useValue: this\n }];\n const injector = Injector.create({\n parent,\n providers\n });\n const ref = this.vcr.createComponent(factory, undefined, injector);\n ref.changeDetectorRef.detectChanges();\n return ref;\n }\n addTemplateChild(templateRef, context) {\n return this.vcr.createEmbeddedView(templateRef, context);\n }\n }\n AbstractTuiPortalHostComponent.ɵfac = function AbstractTuiPortalHostComponent_Factory(t) {\n return new (t || AbstractTuiPortalHostComponent)(i0.ɵɵdirectiveInject(INJECTOR), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(AbstractTuiPortalService));\n };\n AbstractTuiPortalHostComponent.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiPortalHostComponent,\n viewQuery: function AbstractTuiPortalHostComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5, ViewContainerRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.vcr = _t.first);\n }\n }\n });\n return AbstractTuiPortalHostComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Use this abstract class to create your own toggleable themes.\n * A component extending this class must have CSS variables definitions\n * and have ViewEncapsulation set to NONE. A boolean input allows to\n * switch theme on or off.\n */\nlet AbstractTuiThemeSwitcher = /*#__PURE__*/(() => {\n class AbstractTuiThemeSwitcher {\n constructor(doc) {\n this.doc = doc;\n if (this.style !== null) {\n this.addTheme();\n return;\n }\n const styles = this.doc.head.querySelectorAll('style');\n this.constructor.style = styles[styles.length - 1];\n }\n get style() {\n return this.constructor.style;\n }\n ngOnDestroy() {\n this.removeTheme();\n }\n addTheme() {\n if (this.style) {\n this.doc.head.appendChild(this.style);\n }\n }\n removeTheme() {\n var _a;\n (_a = this.style) === null || _a === void 0 ? void 0 : _a.remove();\n }\n }\n AbstractTuiThemeSwitcher.style = null;\n AbstractTuiThemeSwitcher.ɵfac = function AbstractTuiThemeSwitcher_Factory(t) {\n return new (t || AbstractTuiThemeSwitcher)(i0.ɵɵdirectiveInject(DOCUMENT));\n };\n AbstractTuiThemeSwitcher.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiThemeSwitcher\n });\n return AbstractTuiThemeSwitcher;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractTuiControl, AbstractTuiController, AbstractTuiDialogDirective, AbstractTuiDialogService, AbstractTuiInteractive, AbstractTuiMultipleControl, AbstractTuiNullableControl, AbstractTuiPortalHostComponent, AbstractTuiPortalService, AbstractTuiThemeSwitcher, AbstractTuiValueTransformer, tuiAsControl };\n","/**\n * Coerces a data-bound value (typically a string) to a boolean.\n * @example {@link https://material.angular.io/cdk/coercion/api#functions}\n */\nfunction tuiCoerceBooleanProperty(value) {\n return value !== null && typeof value !== 'undefined' && `${value}` !== 'false';\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiCoerceBooleanProperty };\n","import * as i0 from '@angular/core';\nimport { Pipe, NgModule } from '@angular/core';\nlet TuiMapperPipe = /*#__PURE__*/(() => {\n class TuiMapperPipe {\n transform(value, mapper, ...args) {\n return mapper(value, ...args);\n }\n }\n TuiMapperPipe.ɵfac = function TuiMapperPipe_Factory(t) {\n return new (t || TuiMapperPipe)();\n };\n TuiMapperPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiMapper\",\n type: TuiMapperPipe,\n pure: true\n });\n return TuiMapperPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiMapperPipeModule = /*#__PURE__*/(() => {\n class TuiMapperPipeModule {}\n TuiMapperPipeModule.ɵfac = function TuiMapperPipeModule_Factory(t) {\n return new (t || TuiMapperPipeModule)();\n };\n TuiMapperPipeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiMapperPipeModule\n });\n TuiMapperPipeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiMapperPipeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiMapperPipe, TuiMapperPipeModule };\n","import * as i0 from '@angular/core';\nimport { NgZone, ElementRef, Directive, Inject, Self, Input, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';\nimport { ANIMATION_FRAME } from '@ng-web-apis/common';\nimport { tuiTypedFromEvent, tuiZonefree, tuiScrollFrom, tuiZoneOptimized } from '@taiga-ui/cdk/observables';\nimport { TUI_SCROLL_REF, TUI_IS_IOS } from '@taiga-ui/cdk/tokens';\nimport { map, switchMap, takeUntil, throttleTime, startWith, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1$1 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport { POLLING_TIME } from '@taiga-ui/cdk/constants';\nimport { TuiDestroyService } from '@taiga-ui/cdk/services';\nimport * as i1 from 'rxjs';\nimport { merge } from 'rxjs';\nfunction TuiScrollControlsComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 3);\n i0.ɵɵelement(1, \"div\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const bars_r1 = i0.ɵɵnextContext().ngIf;\n i0.ɵɵclassProp(\"t-bar_has-horizontal\", bars_r1[1]);\n }\n}\nfunction TuiScrollControlsComponent_ng_container_0_ng_container_1_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 5);\n i0.ɵɵelement(1, \"div\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const bars_r1 = i0.ɵɵnextContext().ngIf;\n i0.ɵɵclassProp(\"t-bar_has-vertical\", bars_r1[0]);\n }\n}\nfunction TuiScrollControlsComponent_ng_container_0_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiScrollControlsComponent_ng_container_0_ng_container_1_div_1_Template, 2, 2, \"div\", 1)(2, TuiScrollControlsComponent_ng_container_0_ng_container_1_div_2_Template, 2, 2, \"div\", 2);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const bars_r1 = ctx.ngIf;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", bars_r1[0]);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", bars_r1[1]);\n }\n}\nfunction TuiScrollControlsComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiScrollControlsComponent_ng_container_0_ng_container_1_Template, 3, 2, \"ng-container\", 0);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(2, 1, ctx_r1.refresh$));\n }\n}\nconst MIN_WIDTH = 24;\nfunction getOffsetVertical({\n clientY\n}, {\n top,\n height\n}) {\n return (clientY - top) / height;\n}\nfunction getOffsetHorizontal({\n clientX\n}, {\n left,\n width\n}) {\n return (clientX - left) / width;\n}\nlet TuiScrollbarDirective = /*#__PURE__*/(() => {\n class TuiScrollbarDirective {\n constructor(zone, destroy$, animationFrame$, container, doc, el) {\n this.container = container;\n this.doc = doc;\n this.el = el;\n this.tuiScrollbar = 'vertical';\n const {\n nativeElement\n } = this.el;\n const mousedown$ = tuiTypedFromEvent(nativeElement, 'mousedown');\n const mousemove$ = tuiTypedFromEvent(this.doc, 'mousemove');\n const mouseup$ = tuiTypedFromEvent(this.doc, 'mouseup');\n const mousedownWrapper$ = tuiTypedFromEvent(this.wrapper, 'mousedown');\n merge(mousedownWrapper$.pipe(map(event => this.getScrolled(event, 0.5, 0.5))), mousedown$.pipe(switchMap(event => {\n const rect = nativeElement.getBoundingClientRect();\n const vertical = getOffsetVertical(event, rect);\n const horizontal = getOffsetHorizontal(event, rect);\n return mousemove$.pipe(map(event => this.getScrolled(event, vertical, horizontal)), takeUntil(mouseup$));\n }))).pipe(tuiZonefree(zone), takeUntil(destroy$)).subscribe(([scrollTop, scrollLeft]) => {\n this.element.style.scrollBehavior = 'auto';\n if (this.tuiScrollbar === 'vertical') {\n this.element.scrollTop = scrollTop;\n } else {\n this.element.scrollLeft = scrollLeft;\n }\n this.element.style.scrollBehavior = '';\n });\n merge(animationFrame$.pipe(throttleTime(POLLING_TIME)), tuiScrollFrom(this.element)).pipe(tuiZonefree(zone), takeUntil(destroy$)).subscribe(() => {\n if (this.tuiScrollbar === 'vertical') {\n nativeElement.style.top = `${this.thumb * 100}%`;\n nativeElement.style.height = `${this.view * 100}%`;\n } else {\n nativeElement.style.left = `${this.thumb * 100}%`;\n nativeElement.style.width = `${this.view * 100}%`;\n }\n });\n }\n get wrapper() {\n return this.el.nativeElement.parentElement;\n }\n get scrolled() {\n const {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollLeft,\n scrollWidth,\n clientWidth\n } = this.element;\n return this.tuiScrollbar === 'vertical' ? scrollTop / (scrollHeight - clientHeight) : scrollLeft / (scrollWidth - clientWidth);\n }\n get compensation() {\n const {\n clientHeight,\n scrollHeight,\n clientWidth,\n scrollWidth\n } = this.element;\n if (clientHeight * clientHeight / scrollHeight > MIN_WIDTH && this.tuiScrollbar === 'vertical' || clientWidth * clientWidth / scrollWidth > MIN_WIDTH && this.tuiScrollbar === 'horizontal') {\n return 0;\n }\n return this.tuiScrollbar === 'vertical' ? MIN_WIDTH / clientHeight : MIN_WIDTH / clientWidth;\n }\n get thumb() {\n const compensation = this.compensation || this.view;\n return this.scrolled * (1 - compensation);\n }\n get view() {\n const {\n clientHeight,\n scrollHeight,\n clientWidth,\n scrollWidth\n } = this.element;\n return this.tuiScrollbar === 'vertical' ? Math.ceil(clientHeight / scrollHeight * 100) / 100 : Math.ceil(clientWidth / scrollWidth * 100) / 100;\n }\n get element() {\n return this.container.nativeElement;\n }\n getScrolled({\n clientY,\n clientX\n }, offsetVertical, offsetHorizontal) {\n const {\n offsetHeight,\n offsetWidth\n } = this.el.nativeElement;\n const {\n top,\n left,\n width,\n height\n } = this.wrapper.getBoundingClientRect();\n const maxTop = this.element.scrollHeight - height;\n const maxLeft = this.element.scrollWidth - width;\n const scrolledTop = (clientY - top - offsetHeight * offsetVertical) / (height - offsetHeight);\n const scrolledLeft = (clientX - left - offsetWidth * offsetHorizontal) / (width - offsetWidth);\n return [maxTop * scrolledTop, maxLeft * scrolledLeft];\n }\n }\n TuiScrollbarDirective.ɵfac = function TuiScrollbarDirective_Factory(t) {\n return new (t || TuiScrollbarDirective)(i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(ANIMATION_FRAME), i0.ɵɵdirectiveInject(TUI_SCROLL_REF), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiScrollbarDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiScrollbarDirective,\n selectors: [[\"\", \"tuiScrollbar\", \"\"]],\n inputs: {\n tuiScrollbar: \"tuiScrollbar\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])]\n });\n return TuiScrollbarDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiScrollControlsComponent = /*#__PURE__*/(() => {\n class TuiScrollControlsComponent {\n constructor(isIOS, zone, scrollRef, animationFrame$) {\n this.isIOS = isIOS;\n this.zone = zone;\n this.scrollRef = scrollRef;\n this.animationFrame$ = animationFrame$;\n this.refresh$ = this.animationFrame$.pipe(throttleTime(300), map(() => {\n const {\n clientHeight,\n scrollHeight,\n clientWidth,\n scrollWidth\n } = this.scrollRef.nativeElement;\n return [Math.ceil(clientHeight / scrollHeight * 100) < 100, Math.ceil(clientWidth / scrollWidth * 100) < 100];\n }), startWith([false, false]), distinctUntilChanged((a, b) => a[0] === b[0] && a[1] === b[1]), tuiZoneOptimized(this.zone));\n }\n }\n TuiScrollControlsComponent.ɵfac = function TuiScrollControlsComponent_Factory(t) {\n return new (t || TuiScrollControlsComponent)(i0.ɵɵdirectiveInject(TUI_IS_IOS), i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(TUI_SCROLL_REF), i0.ɵɵdirectiveInject(ANIMATION_FRAME));\n };\n TuiScrollControlsComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiScrollControlsComponent,\n selectors: [[\"tui-scroll-controls\"]],\n decls: 1,\n vars: 1,\n 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\"]],\n template: function TuiScrollControlsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiScrollControlsComponent_ng_container_0_Template, 3, 3, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", !ctx.isIOS);\n }\n },\n dependencies: [i1$1.NgIf, TuiScrollbarDirective, i1$1.AsyncPipe],\n 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}\"],\n changeDetection: 0\n });\n return TuiScrollControlsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst SCROLL_REF_SELECTOR = '[tuiScrollRef]';\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 TuiScrollControlsModule = /*#__PURE__*/(() => {\n class TuiScrollControlsModule {}\n TuiScrollControlsModule.ɵfac = function TuiScrollControlsModule_Factory(t) {\n return new (t || TuiScrollControlsModule)();\n };\n TuiScrollControlsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiScrollControlsModule\n });\n TuiScrollControlsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n });\n return TuiScrollControlsModule;\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, TuiScrollControlsComponent, TuiScrollControlsModule, TuiScrollRefDirective, TuiScrollbarDirective };\n","import { tuiAssert } from '@taiga-ui/cdk/classes';\nimport { TuiPureException } from '@taiga-ui/cdk/exceptions';\n\n/**\n * @deprecated:\n * not compatible with TypeScript 5\n */\nfunction tuiDebounce(timeout) {\n let timeoutRef;\n return function (_target, _key, descriptor) {\n const {\n value\n } = descriptor;\n descriptor.value = function (...args) {\n clearTimeout(timeoutRef);\n timeoutRef = setTimeout(() => value.apply(this, args), timeout);\n };\n return descriptor;\n };\n}\nfunction errorGetDefault(key, component) {\n return `Default value for ${String(key)} was not provided in ${component}, error in Taiga UI Angular Kit`;\n}\nfunction errorSetDefault(key, component) {\n return `Undefined was passed as ${String(key)} to ${component}, which is invalid input, using default value:`;\n}\nfunction errorSetDefaultInitial(key, component) {\n return `Undefined was passed as default value for ${String(key)} to ${component}, error in Taiga UI Angular Kit`;\n}\n/**\n * @deprecated:\n * not compatible with TypeScript 5\n *\n * Decorator for checking input values for undefined. You can also pass\n * optional assertion to check input against.\n *\n * CAUTION: This decorator overwrites other getters and setters.\n */\nfunction tuiDefaultProp(assertion, ...args) {\n return (target, key) => {\n const {\n name\n } = target.constructor;\n const errorGetDefaultMessage = ngDevMode && errorGetDefault(key, name);\n const errorSetDefaultMessage = ngDevMode && errorSetDefault(key, name);\n Object.defineProperty(target, key, {\n configurable: true,\n get() {\n ngDevMode && tuiAssert.assert(false, errorGetDefaultMessage);\n return undefined;\n },\n set(initialValue) {\n const isValid = initialValue !== undefined;\n const errorMessage = ngDevMode && errorSetDefaultInitial(key, name);\n let currentValue = initialValue;\n ngDevMode && tuiAssert.assert(isValid, errorMessage);\n if (ngDevMode && isValid && assertion && tuiAssert) {\n tuiAssert.assert(assertion.call(this, initialValue), `${String(key)} in ${name} received:`, initialValue, ...args);\n }\n Object.defineProperty(this, key, {\n configurable: true,\n get() {\n return currentValue;\n },\n set(value) {\n const isValid = value !== undefined;\n const backupValue = initialValue;\n ngDevMode && tuiAssert.assert(isValid, errorSetDefaultMessage, String(backupValue));\n if (ngDevMode && isValid && assertion && tuiAssert) {\n tuiAssert.assert(assertion.call(this, value), `${String(key)} in ${name} received:`, value, ...args);\n }\n currentValue = isValid ? value : backupValue;\n }\n });\n }\n });\n };\n}\nfunction decorateMethod(originalMethod) {\n let previousArgs = [];\n let originalFnWasCalledLeastAtOnce = false;\n let pureValue;\n return function tuiPureMethodPatched(...args) {\n const isPure = originalFnWasCalledLeastAtOnce && previousArgs.length === args.length && args.every((arg, index) => arg === previousArgs[index]);\n if (isPure) {\n return pureValue;\n }\n previousArgs = args;\n pureValue = originalMethod.apply(this, args);\n originalFnWasCalledLeastAtOnce = true;\n return pureValue;\n };\n}\nfunction decorateGetter(originalGetter, propertyKey, enumerable = true) {\n return function tuiPureGetterPatched() {\n const value = originalGetter.call(this);\n Object.defineProperty(this, propertyKey, {\n enumerable,\n value\n });\n return value;\n };\n}\nfunction tuiPure(target, propertyKeyOrContext, descriptor) {\n if (typeof target === 'function') {\n const context = propertyKeyOrContext;\n if (context.kind === 'getter') {\n return decorateGetter(target, context.name);\n }\n if (context.kind === 'method') {\n return decorateMethod(target);\n }\n throw new TuiPureException();\n }\n const {\n get,\n enumerable,\n value\n } = descriptor;\n const propertyKey = propertyKeyOrContext;\n if (get) {\n return {\n configurable: true,\n enumerable,\n get: decorateGetter(get, propertyKey, enumerable)\n };\n }\n if (typeof value !== 'function') {\n throw new TuiPureException();\n }\n const original = value;\n return {\n configurable: true,\n enumerable,\n get() {\n let previousArgs = [];\n let originalFnWasCalledLeastAtOnce = false;\n let pureValue;\n const patched = (...args) => {\n const isPure = originalFnWasCalledLeastAtOnce && previousArgs.length === args.length && args.every((arg, index) => arg === previousArgs[index]);\n if (isPure) {\n return pureValue;\n }\n previousArgs = args;\n pureValue = original.apply(this, args);\n originalFnWasCalledLeastAtOnce = true;\n return pureValue;\n };\n Object.defineProperty(this, propertyKey, {\n configurable: true,\n value: patched\n });\n return patched;\n }\n };\n}\nfunction errorSet(key, component) {\n return `Undefined was passed as ${String(key)} to ${component}, setter will not be called`;\n}\n/**\n * @deprecated:\n * not compatible with TypeScript 5\n *\n * Decorator for checking input setter values against a custom assertion which\n * takes value passed to input setter and component instance as arguments.\n * It specifically checks for undefined values and prevents calls to the\n * original setter in this case.\n */\nfunction tuiRequiredSetter(assertion, ...args) {\n return (target, key, {\n configurable,\n enumerable,\n get,\n set\n }) => {\n const {\n name\n } = target.constructor;\n return {\n configurable,\n enumerable,\n get,\n set(value) {\n if (ngDevMode && value !== undefined && assertion && tuiAssert) {\n tuiAssert.assert(assertion.call(this, value), `${String(key)} in ${name} received:`, value, ...args);\n }\n if (!set || value === undefined) {\n ngDevMode && tuiAssert.assert(value !== undefined, errorSet(key, name));\n return;\n }\n set.call(this, value);\n }\n };\n };\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiDebounce, tuiDefaultProp, tuiPure, tuiRequiredSetter };\n","import { __decorate } from 'tslib';\nimport * as i0 from '@angular/core';\nimport { NgZone, ElementRef, Directive, Inject, Optional, SkipSelf, Input, Output, NgModule } from '@angular/core';\nimport { tuiPure } from '@taiga-ui/cdk/decorators';\nimport { tuiZoneOptimized } from '@taiga-ui/cdk/observables';\nimport { TUI_ACTIVE_ELEMENT } from '@taiga-ui/cdk/tokens';\nimport { tuiArrayRemove } from '@taiga-ui/cdk/utils';\nimport { map, startWith, distinctUntilChanged, skip } from 'rxjs/operators';\nimport * as i1 from 'rxjs';\nlet TuiActiveZoneDirective = /*#__PURE__*/(() => {\n class TuiActiveZoneDirective {\n constructor(active$, zone, el, directParentActiveZone) {\n var _a;\n this.active$ = active$;\n this.zone = zone;\n this.el = el;\n this.directParentActiveZone = directParentActiveZone;\n this.subActiveZones = [];\n this.tuiActiveZoneParent = null;\n this.tuiActiveZoneChange = this.active$.pipe(map(element => !!element && this.contains(element)), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized(this.zone));\n (_a = this.directParentActiveZone) === null || _a === void 0 ? void 0 : _a.addSubActiveZone(this);\n }\n set tuiActiveZoneParentSetter(zone) {\n this.setZone(zone);\n }\n ngOnDestroy() {\n var _a, _b;\n (_a = this.directParentActiveZone) === null || _a === void 0 ? void 0 : _a.removeSubActiveZone(this);\n (_b = this.tuiActiveZoneParent) === null || _b === void 0 ? void 0 : _b.removeSubActiveZone(this);\n }\n contains(node) {\n return this.el.nativeElement.contains(node) || this.subActiveZones.some((item, index, array) => array.indexOf(item) === index && item.contains(node));\n }\n setZone(zone) {\n var _a;\n (_a = this.tuiActiveZoneParent) === null || _a === void 0 ? void 0 : _a.removeSubActiveZone(this);\n zone === null || zone === void 0 ? void 0 : zone.addSubActiveZone(this);\n this.tuiActiveZoneParent = zone;\n }\n addSubActiveZone(activeZone) {\n this.subActiveZones = [...this.subActiveZones, activeZone];\n }\n removeSubActiveZone(activeZone) {\n this.subActiveZones = tuiArrayRemove(this.subActiveZones, this.subActiveZones.indexOf(activeZone));\n }\n }\n TuiActiveZoneDirective.ɵfac = function TuiActiveZoneDirective_Factory(t) {\n return new (t || TuiActiveZoneDirective)(i0.ɵɵdirectiveInject(TUI_ACTIVE_ELEMENT), i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TuiActiveZoneDirective, 12));\n };\n TuiActiveZoneDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiActiveZoneDirective,\n selectors: [[\"\", \"tuiActiveZone\", \"\", 5, \"ng-container\"], [\"\", \"tuiActiveZoneChange\", \"\", 5, \"ng-container\"], [\"\", \"tuiActiveZoneParent\", \"\", 5, \"ng-container\"]],\n hostBindings: function TuiActiveZoneDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mousedown.silent\", function TuiActiveZoneDirective_mousedown_silent_HostBindingHandler() {\n return 0;\n }, false, i0.ɵɵresolveDocument);\n }\n },\n inputs: {\n tuiActiveZoneParentSetter: [0, \"tuiActiveZoneParent\", \"tuiActiveZoneParentSetter\"]\n },\n outputs: {\n tuiActiveZoneChange: \"tuiActiveZoneChange\"\n },\n exportAs: [\"tuiActiveZone\"]\n });\n __decorate([tuiPure], TuiActiveZoneDirective.prototype, \"setZone\", null);\n return TuiActiveZoneDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiActiveZoneModule = /*#__PURE__*/(() => {\n class TuiActiveZoneModule {}\n TuiActiveZoneModule.ɵfac = function TuiActiveZoneModule_Factory(t) {\n return new (t || TuiActiveZoneModule)();\n };\n TuiActiveZoneModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiActiveZoneModule\n });\n TuiActiveZoneModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiActiveZoneModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiActiveZoneDirective, TuiActiveZoneModule };\n","import * as i0 from '@angular/core';\nimport { Directive, ElementRef, Optional, Self, Inject, Renderer2, NgZone, InjectionToken, Input, NgModule } from '@angular/core';\nimport { tuiCoerceBooleanProperty } from '@taiga-ui/cdk/coercion';\nimport * as i1$1 from '@taiga-ui/cdk/services';\nimport { TuiDestroyService } from '@taiga-ui/cdk/services';\nimport * as i1 from 'rxjs';\nimport { race, timer } from 'rxjs';\nimport { throttleTime, map, skipWhile, take, takeUntil } from 'rxjs/operators';\nimport { ANIMATION_FRAME, WINDOW } from '@ng-web-apis/common';\nimport { TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS } from '@taiga-ui/cdk/tokens';\nimport { tuiCreateToken, tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';\nimport { POLLING_TIME } from '@taiga-ui/cdk/constants';\nimport { tuiPx, tuiIsPresent } from '@taiga-ui/cdk/utils';\nlet AbstractTuiAutofocusHandler = /*#__PURE__*/(() => {\n class AbstractTuiAutofocusHandler {\n constructor(focusable, el) {\n this.focusable = focusable;\n this.el = el;\n }\n get element() {\n var _a;\n return ((_a = this.focusable) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) || this.el.nativeElement;\n }\n get isTextFieldElement() {\n return this.element.matches('input, textarea, [contenteditable]');\n }\n }\n AbstractTuiAutofocusHandler.ɵfac = function AbstractTuiAutofocusHandler_Factory(t) {\n i0.ɵɵinvalidFactory();\n };\n AbstractTuiAutofocusHandler.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiAutofocusHandler\n });\n return AbstractTuiAutofocusHandler;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TIMEOUT = 1000;\nconst NG_ANIMATION_SELECTOR = '.ng-animating';\nlet TuiDefaultAutofocusHandler = /*#__PURE__*/(() => {\n class TuiDefaultAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(focusable, el, animationFrame$) {\n super(focusable, el);\n this.animationFrame$ = animationFrame$;\n }\n setFocus() {\n if (this.isTextFieldElement) {\n race(timer(TIMEOUT), this.animationFrame$.pipe(throttleTime(POLLING_TIME), map(() => this.element.closest(NG_ANIMATION_SELECTOR)), skipWhile(Boolean), take(1))).subscribe(() => this.element.focus({\n preventScroll: true\n }));\n } else {\n this.element.focus({\n preventScroll: true\n });\n }\n }\n }\n TuiDefaultAutofocusHandler.ɵfac = function TuiDefaultAutofocusHandler_Factory(t) {\n return new (t || TuiDefaultAutofocusHandler)(i0.ɵɵdirectiveInject(TUI_FOCUSABLE_ITEM_ACCESSOR, 10), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(ANIMATION_FRAME));\n };\n TuiDefaultAutofocusHandler.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDefaultAutofocusHandler,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDefaultAutofocusHandler;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TEXTFIELD_ATTRS = ['type', 'inputMode', 'autocomplete', 'accept', 'min', 'max', 'step', 'pattern', 'size', 'maxlength'];\nlet TuiIosAutofocusHandler = /*#__PURE__*/(() => {\n class TuiIosAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(focusable, el, renderer, zone, win) {\n super(focusable, el);\n this.renderer = renderer;\n this.zone = zone;\n this.win = win;\n this.patchCssStyles();\n }\n setFocus() {\n if (this.isTextFieldElement) {\n this.zone.runOutsideAngular(() => this.iosWebkitAutofocus());\n } else {\n this.element.focus({\n preventScroll: true\n });\n }\n }\n iosWebkitAutofocus() {\n var _a;\n const fakeInput = this.makeFakeInput();\n const duration = this.getDurationTimeBeforeFocus();\n let fakeFocusTimeoutId = 0;\n let elementFocusTimeoutId = 0;\n const blurHandler = () => fakeInput.focus({\n preventScroll: true\n });\n const focusHandler = () => {\n clearTimeout(fakeFocusTimeoutId);\n fakeFocusTimeoutId = this.win.setTimeout(() => {\n clearTimeout(elementFocusTimeoutId);\n fakeInput.removeEventListener('blur', blurHandler);\n fakeInput.removeEventListener('focus', focusHandler);\n elementFocusTimeoutId = this.win.setTimeout(() => {\n this.element.focus({\n preventScroll: false\n });\n fakeInput.remove();\n }, duration);\n });\n };\n fakeInput.addEventListener('blur', blurHandler, {\n once: true\n });\n fakeInput.addEventListener('focus', focusHandler);\n if (this.insideDialog()) {\n this.win.document.body.appendChild(fakeInput);\n } else {\n (_a = this.element.parentElement) === null || _a === void 0 ? void 0 : _a.appendChild(fakeInput);\n }\n fakeInput.focus({\n preventScroll: true\n });\n }\n /**\n * @note:\n * emulate textfield position in layout with cursor\n * before focus to real textfield element\n *\n * required note:\n * [fakeInput.readOnly = true] ~\n * don't use {readOnly: true} value, it's doesn't work for emulate autofill\n *\n * [fakeInput.style.opacity = 0] ~\n * don't use {opacity: 0}, sometimes it's doesn't work for emulate real input\n *\n * [fakeInput.style.fontSize = 16px] ~\n * disable possible auto zoom\n *\n * [fakeInput.style.top/left] ~\n * emulate position cursor before focus to real textfield element\n */\n makeFakeInput() {\n const fakeInput = this.renderer.createElement('input');\n const rect = this.element.getBoundingClientRect();\n this.patchFakeInputFromFocusableElement(fakeInput);\n fakeInput.style.height = tuiPx(rect.height);\n fakeInput.style.width = tuiPx(rect.width / 2);\n fakeInput.style.position = 'fixed';\n fakeInput.style.zIndex = '-99999999';\n fakeInput.style.caretColor = 'transparent';\n fakeInput.style.border = 'none';\n fakeInput.style.outline = 'none';\n fakeInput.style.color = 'transparent';\n fakeInput.style.background = 'transparent';\n fakeInput.style.cursor = 'none';\n fakeInput.style.fontSize = tuiPx(16);\n fakeInput.style.top = tuiPx(rect.top);\n fakeInput.style.left = tuiPx(rect.left);\n return fakeInput;\n }\n getDurationTimeBeforeFocus() {\n return parseFloat(this.win.getComputedStyle(this.element).getPropertyValue('--tui-duration')) || 0;\n }\n /**\n * @note:\n * unfortunately, in older versions of iOS\n * there is a bug that the fake input cursor\n * will move along with the dialog animation\n * and then that dialog will be shaking\n */\n insideDialog() {\n return !!this.element.closest('tui-dialog');\n }\n /**\n * @note:\n * This is necessary so that the viewport isn't recalculated\n * and then the dialogs don't shake.\n *\n * Also, we need to fixed height viewport,\n * so that when focusing the dialogs don't shake\n */\n patchCssStyles() {\n [this.win.document.documentElement, this.win.document.body].forEach(element => {\n element.style.setProperty('overflow', 'auto');\n element.style.setProperty('height', '100%');\n });\n }\n /**\n * @note:\n * inherit basic attributes values from real input\n * for help iOS detect what do you want see on keyboard,\n * for example [inputMode=numeric, autocomplete=cc-number]\n */\n patchFakeInputFromFocusableElement(fakeInput) {\n TEXTFIELD_ATTRS.forEach(attr => {\n const value = this.element.getAttribute(attr);\n if (tuiIsPresent(value)) {\n fakeInput.setAttribute(attr, value);\n }\n });\n }\n }\n TuiIosAutofocusHandler.ɵfac = function TuiIosAutofocusHandler_Factory(t) {\n return new (t || TuiIosAutofocusHandler)(i0.ɵɵdirectiveInject(TUI_FOCUSABLE_ITEM_ACCESSOR, 10), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(Renderer2), i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(WINDOW));\n };\n TuiIosAutofocusHandler.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiIosAutofocusHandler,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return TuiIosAutofocusHandler;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_AUTOFOCUS_DEFAULT_OPTIONS = {\n delay: NaN // NaN = no delay/sync\n};\nconst TUI_AUTOFOCUS_OPTIONS = tuiCreateToken(TUI_AUTOFOCUS_DEFAULT_OPTIONS);\nfunction tuiAutoFocusOptionsProvider(options) {\n return tuiProvideOptions(TUI_AUTOFOCUS_OPTIONS, options, TUI_AUTOFOCUS_DEFAULT_OPTIONS);\n}\nconst TUI_AUTOFOCUS_HANDLER = new InjectionToken('[TUI_AUTOFOCUS_HANDLER]');\nconst TUI_AUTOFOCUS_PROVIDERS = [{\n provide: TUI_AUTOFOCUS_HANDLER,\n useFactory: (focusable, el, animationFrame$, renderer, zone, win, isIos) => isIos ? new TuiIosAutofocusHandler(focusable, el, renderer, zone, win) : new TuiDefaultAutofocusHandler(focusable, el, animationFrame$),\n deps: [[new Optional(), new Self(), TUI_FOCUSABLE_ITEM_ACCESSOR], ElementRef, ANIMATION_FRAME, Renderer2, NgZone, WINDOW, TUI_IS_IOS]\n}, TuiDestroyService];\nlet TuiAutoFocusDirective = /*#__PURE__*/(() => {\n class TuiAutoFocusDirective {\n constructor(handler, options, destroy$) {\n this.handler = handler;\n this.options = options;\n this.destroy$ = destroy$;\n this.autoFocus = true;\n }\n ngAfterViewInit() {\n if (tuiCoerceBooleanProperty(this.autoFocus)) {\n this.focus();\n }\n }\n focus() {\n if (Number.isNaN(this.options.delay)) {\n void Promise.resolve().then(() => this.handler.setFocus());\n } else {\n timer(this.options.delay).pipe(takeUntil(this.destroy$)).subscribe(() => this.handler.setFocus());\n }\n }\n }\n TuiAutoFocusDirective.ɵfac = function TuiAutoFocusDirective_Factory(t) {\n return new (t || TuiAutoFocusDirective)(i0.ɵɵdirectiveInject(TUI_AUTOFOCUS_HANDLER), i0.ɵɵdirectiveInject(TUI_AUTOFOCUS_OPTIONS), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiAutoFocusDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiAutoFocusDirective,\n selectors: [[\"\", \"tuiAutoFocus\", \"\"]],\n inputs: {\n autoFocus: [0, \"tuiAutoFocus\", \"autoFocus\"]\n },\n features: [i0.ɵɵProvidersFeature(TUI_AUTOFOCUS_PROVIDERS)]\n });\n return TuiAutoFocusDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiAutoFocusModule = /*#__PURE__*/(() => {\n class TuiAutoFocusModule {}\n TuiAutoFocusModule.ɵfac = function TuiAutoFocusModule_Factory(t) {\n return new (t || TuiAutoFocusModule)();\n };\n TuiAutoFocusModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiAutoFocusModule\n });\n TuiAutoFocusModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiAutoFocusModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiSynchronousAutofocusHandler = /*#__PURE__*/(() => {\n class TuiSynchronousAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(focusable, el) {\n super(focusable, el);\n }\n setFocus() {\n this.element.focus({\n preventScroll: true\n });\n }\n }\n TuiSynchronousAutofocusHandler.ɵfac = function TuiSynchronousAutofocusHandler_Factory(t) {\n return new (t || TuiSynchronousAutofocusHandler)(i0.ɵɵdirectiveInject(TUI_FOCUSABLE_ITEM_ACCESSOR, 10), i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiSynchronousAutofocusHandler.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiSynchronousAutofocusHandler,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return TuiSynchronousAutofocusHandler;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractTuiAutofocusHandler, TUI_AUTOFOCUS_DEFAULT_OPTIONS, TUI_AUTOFOCUS_HANDLER, TUI_AUTOFOCUS_OPTIONS, TUI_AUTOFOCUS_PROVIDERS, TuiAutoFocusDirective, TuiAutoFocusModule, TuiDefaultAutofocusHandler, TuiIosAutofocusHandler, TuiSynchronousAutofocusHandler, tuiAutoFocusOptionsProvider };\n","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: [0, \"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, NgModule } from '@angular/core';\n\n/**\n * Blank directive for queries via `@ContentChildren` / `@ViewChildren` / `querySelector`\n */\nlet TuiItemDirective = /*#__PURE__*/(() => {\n class TuiItemDirective {}\n TuiItemDirective.ɵfac = function TuiItemDirective_Factory(t) {\n return new (t || TuiItemDirective)();\n };\n TuiItemDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiItemDirective,\n selectors: [[\"\", \"tuiItem\", \"\"]]\n });\n return TuiItemDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiItemModule = /*#__PURE__*/(() => {\n class TuiItemModule {}\n TuiItemModule.ɵfac = function TuiItemModule_Factory(t) {\n return new (t || TuiItemModule)();\n };\n TuiItemModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiItemModule\n });\n TuiItemModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiItemModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiItemDirective, TuiItemModule };\n","import * as i0 from '@angular/core';\nimport { ViewContainerRef, TemplateRef, Directive, Inject, Input, NgModule } from '@angular/core';\n\n/**\n * @internal\n */\nclass TuiLetContext {\n constructor(internalDirectiveInstance) {\n this.internalDirectiveInstance = internalDirectiveInstance;\n }\n get $implicit() {\n return this.internalDirectiveInstance.tuiLet;\n }\n get tuiLet() {\n return this.internalDirectiveInstance.tuiLet;\n }\n}\n\n/**\n * Works like *ngIf but does not have a condition — use it to declare\n * the result of pipes calculation (i.e. async pipe)\n */\nlet TuiLetDirective = /*#__PURE__*/(() => {\n class TuiLetDirective {\n constructor(viewContainer, templateRef) {\n viewContainer.createEmbeddedView(templateRef, new TuiLetContext(this));\n }\n /**\n * Asserts the correct type of the context for the template that `TuiLet` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `TuiLet` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard(_dir, _ctx) {\n return true;\n }\n }\n TuiLetDirective.ɵfac = function TuiLetDirective_Factory(t) {\n return new (t || TuiLetDirective)(i0.ɵɵdirectiveInject(ViewContainerRef), i0.ɵɵdirectiveInject(TemplateRef));\n };\n TuiLetDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiLetDirective,\n selectors: [[\"\", \"tuiLet\", \"\"]],\n inputs: {\n tuiLet: \"tuiLet\"\n }\n });\n return TuiLetDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLetModule = /*#__PURE__*/(() => {\n class TuiLetModule {}\n TuiLetModule.ɵfac = function TuiLetModule_Factory(t) {\n return new (t || TuiLetModule)();\n };\n TuiLetModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiLetModule\n });\n TuiLetModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiLetModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiLetContext, TuiLetDirective, TuiLetModule };\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, NgZone, Directive, Inject, Self, Input, HostBinding, NgModule } from '@angular/core';\nimport { tuiTypedFromEvent, tuiZonefree } from '@taiga-ui/cdk/observables';\nimport { TuiDestroyService } from '@taiga-ui/cdk/services';\nimport { tuiIsElement, tuiGetScrollParent, tuiCanScroll } from '@taiga-ui/cdk/utils/dom';\nimport { filter, takeUntil, switchMap, tap } from 'rxjs/operators';\nimport * as i1 from 'rxjs';\n\n/**\n * Directive to isolate scrolling, i.e. prevent body scroll behind modal dialog\n */\nlet TuiOverscrollDirective = /*#__PURE__*/(() => {\n class TuiOverscrollDirective {\n constructor({\n nativeElement\n }, zone, destroy$) {\n this.mode = 'scroll';\n tuiTypedFromEvent(nativeElement, 'wheel', {\n passive: false\n }).pipe(filter(() => this.enabled), tuiZonefree(zone), takeUntil(destroy$)).subscribe(event => {\n this.processEvent(event, !!event.deltaY, event.deltaY ? event.deltaY < 0 : event.deltaX < 0);\n });\n tuiTypedFromEvent(nativeElement, 'touchstart', {\n passive: true\n }).pipe(switchMap(({\n touches\n }) => {\n let {\n clientX,\n clientY\n } = touches[0];\n let deltaX = 0;\n let deltaY = 0;\n let vertical;\n return tuiTypedFromEvent(nativeElement, 'touchmove', {\n passive: false\n }).pipe(filter(() => this.enabled), tap(event => {\n // We have to have it in tap instead of subscribe due to variables in closure\n const changedTouch = event.changedTouches[0];\n deltaX = clientX - changedTouch.clientX;\n deltaY = clientY - changedTouch.clientY;\n clientX = changedTouch.clientX;\n clientY = changedTouch.clientY;\n if (vertical === undefined) {\n vertical = Math.abs(deltaY) > Math.abs(deltaX);\n }\n this.processEvent(event, vertical, vertical ? deltaY < 0 : deltaX < 0);\n }));\n }), tuiZonefree(zone), takeUntil(destroy$)).subscribe();\n }\n get enabled() {\n return this.mode !== 'none';\n }\n get overscrollBehavior() {\n return this.enabled ? 'contain' : null;\n }\n processEvent(event, vertical, negative) {\n var _a;\n const {\n target,\n currentTarget,\n cancelable\n } = event;\n if (!cancelable || !tuiIsElement(target) || ((_a = target) === null || _a === void 0 ? void 0 : _a.type) === 'range') {\n return;\n }\n // This is all what's needed in Chrome/Firefox thanks to CSS overscroll-behavior\n if (this.mode === 'all' && (vertical && !currentTarget.contains(tuiGetScrollParent(target)) || !vertical && !currentTarget.contains(tuiGetScrollParent(target, false)))) {\n event.preventDefault();\n return;\n }\n // This is Safari/IE/Edge fallback\n if (vertical && (negative && !tuiCanScroll(target, currentTarget, true, false) || !negative && !tuiCanScroll(target, currentTarget, true, true))) {\n event.preventDefault();\n return;\n }\n if (!vertical && (negative && !tuiCanScroll(target, currentTarget, false, false) || !negative && !tuiCanScroll(target, currentTarget, false, true))) {\n event.preventDefault();\n }\n }\n }\n TuiOverscrollDirective.ɵfac = function TuiOverscrollDirective_Factory(t) {\n return new (t || TuiOverscrollDirective)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiOverscrollDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiOverscrollDirective,\n selectors: [[\"\", \"tuiOverscroll\", \"\"]],\n hostVars: 2,\n hostBindings: function TuiOverscrollDirective_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵstyleProp(\"overscroll-behavior\", ctx.overscrollBehavior);\n }\n },\n inputs: {\n mode: [0, \"tuiOverscroll\", \"mode\"]\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])]\n });\n return TuiOverscrollDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiOverscrollModule = /*#__PURE__*/(() => {\n class TuiOverscrollModule {}\n TuiOverscrollModule.ɵfac = function TuiOverscrollModule_Factory(t) {\n return new (t || TuiOverscrollModule)();\n };\n TuiOverscrollModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiOverscrollModule\n });\n TuiOverscrollModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiOverscrollModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiOverscrollDirective, TuiOverscrollModule };\n","import * as i0 from '@angular/core';\nimport { Injectable, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';\nimport { AbstractTuiPortalService, AbstractTuiPortalHostComponent } from '@taiga-ui/cdk/abstract';\n\n/**\n * Service for displaying dropdown portals\n */\nconst _c0 = [\"*\"];\nlet TuiDropdownPortalService = /*#__PURE__*/(() => {\n class TuiDropdownPortalService extends AbstractTuiPortalService {}\n TuiDropdownPortalService.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDropdownPortalService_BaseFactory;\n return function TuiDropdownPortalService_Factory(t) {\n return (ɵTuiDropdownPortalService_BaseFactory || (ɵTuiDropdownPortalService_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDropdownPortalService)))(t || TuiDropdownPortalService);\n };\n })();\n TuiDropdownPortalService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiDropdownPortalService,\n factory: TuiDropdownPortalService.ɵfac,\n providedIn: 'root'\n });\n return TuiDropdownPortalService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Host element for dynamically created portals, for example using {@link TuiDropdownDirective}.\n */\nlet TuiDropdownHostComponent = /*#__PURE__*/(() => {\n class TuiDropdownHostComponent extends AbstractTuiPortalHostComponent {}\n TuiDropdownHostComponent.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDropdownHostComponent_BaseFactory;\n return function TuiDropdownHostComponent_Factory(t) {\n return (ɵTuiDropdownHostComponent_BaseFactory || (ɵTuiDropdownHostComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDropdownHostComponent)))(t || TuiDropdownHostComponent);\n };\n })();\n TuiDropdownHostComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiDropdownHostComponent,\n selectors: [[\"tui-dropdown-host\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: AbstractTuiPortalService,\n useExisting: TuiDropdownPortalService\n },\n // TODO: Remove in 4.0\n {\n provide: AbstractTuiPortalHostComponent,\n useExisting: TuiDropdownHostComponent\n }]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c0,\n decls: 3,\n vars: 0,\n consts: [[\"viewContainer\", \"\"]],\n template: function TuiDropdownHostComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n i0.ɵɵelementContainer(1, null, 0);\n }\n },\n 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%}\"],\n changeDetection: 0\n });\n return TuiDropdownHostComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDropdownHostModule = /*#__PURE__*/(() => {\n class TuiDropdownHostModule {}\n TuiDropdownHostModule.ɵfac = function TuiDropdownHostModule_Factory(t) {\n return new (t || TuiDropdownHostModule)();\n };\n TuiDropdownHostModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiDropdownHostModule\n });\n TuiDropdownHostModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiDropdownHostModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiDropdownHostComponent, TuiDropdownHostModule, TuiDropdownPortalService };\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 { 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","// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nvar TuiDayOfWeek = /*#__PURE__*/function (TuiDayOfWeek) {\n TuiDayOfWeek[TuiDayOfWeek[\"Sunday\"] = 0] = \"Sunday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Monday\"] = 1] = \"Monday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Tuesday\"] = 2] = \"Tuesday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Wednesday\"] = 3] = \"Wednesday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Thursday\"] = 4] = \"Thursday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Friday\"] = 5] = \"Friday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Saturday\"] = 6] = \"Saturday\";\n return TuiDayOfWeek;\n}(TuiDayOfWeek || {});\n// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nvar TuiMonthNumber = /*#__PURE__*/function (TuiMonthNumber) {\n TuiMonthNumber[TuiMonthNumber[\"January\"] = 0] = \"January\";\n TuiMonthNumber[TuiMonthNumber[\"February\"] = 1] = \"February\";\n TuiMonthNumber[TuiMonthNumber[\"March\"] = 2] = \"March\";\n TuiMonthNumber[TuiMonthNumber[\"April\"] = 3] = \"April\";\n TuiMonthNumber[TuiMonthNumber[\"May\"] = 4] = \"May\";\n TuiMonthNumber[TuiMonthNumber[\"June\"] = 5] = \"June\";\n TuiMonthNumber[TuiMonthNumber[\"July\"] = 6] = \"July\";\n TuiMonthNumber[TuiMonthNumber[\"August\"] = 7] = \"August\";\n TuiMonthNumber[TuiMonthNumber[\"September\"] = 8] = \"September\";\n TuiMonthNumber[TuiMonthNumber[\"October\"] = 9] = \"October\";\n TuiMonthNumber[TuiMonthNumber[\"November\"] = 10] = \"November\";\n TuiMonthNumber[TuiMonthNumber[\"December\"] = 11] = \"December\";\n return TuiMonthNumber;\n}(TuiMonthNumber || {});\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiDayOfWeek, TuiMonthNumber };\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 { TUI_VERSION, EMPTY_ARRAY, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk';\nconst TUI_CACHE_BUSTING_PAYLOAD = `?v=${TUI_VERSION}`;\n\n/**\n * @deprecated\n * TODO: delete in v4.0\n */\nconst TUI_DECIMAL_SYMBOLS = [',', '.'];\nconst DEFAULT_ICONS_PATH = name => name.includes('.svg#') ? name : `#${name}`;\nconst TUI_DEFAULT_MARKER_HANDLER = () => EMPTY_ARRAY;\nconst TUI_DEFAULT_NUMBER_FORMAT = {\n decimalLimit: Infinity,\n decimalSeparator: ',',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n zeroPadding: true,\n rounding: 'truncate',\n decimal: 'not-zero'\n};\nconst tuiEditingKeys = ['Spacebar', 'Backspace', 'Delete', 'ArrowLeft', 'ArrowRight', 'Left', 'Right', 'End', 'Home'];\n\n/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nconst TUI_EXPAND_LOADED = 'tui-expand-loaded';\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nconst TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nconst TUI_SCROLLABLE = 'tui-scrollable';\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nconst TUI_ICON_ERROR = 'tui-icon-error';\nconst TUI_HINT_DIRECTIONS = ['bottom-left', 'bottom', 'bottom-right', 'top-left', 'top', 'top-right', 'left-top', 'left', 'left-bottom', 'right-top', 'right', 'right-bottom'];\n\n/**\n * @deprecated Use {@link https://github.com/taiga-family/maskito Maskito}\n * TODO: delete in v4.0\n */\nconst MASK_CARET_TRAP = '[]';\nconst TUI_DIGIT_REGEXP = /\\d/;\nconst TUI_NON_DIGIT_REGEXP = /\\D/;\nconst TUI_NON_DIGITS_REGEXP = /\\D+/g;\nconst TUI_LEADING_ZEROES_REGEXP = /^0+/;\nconst TUI_MASK_SYMBOLS_REGEXP = /[ \\-_()]/g;\nconst TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nconst TUI_LATIN_REGEXP = /[A-z]/;\nconst TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DEFAULT_ICONS_PATH, MASK_CARET_TRAP, TUI_CACHE_BUSTING_PAYLOAD, TUI_DECIMAL_SYMBOLS, TUI_DEFAULT_MARKER_HANDLER, TUI_DEFAULT_NUMBER_FORMAT, TUI_DIGIT_REGEXP, TUI_EXPAND_LOADED, TUI_HINT_DIRECTIONS, TUI_ICON_ERROR, TUI_LAST_PUNCTUATION_MARK_REGEXP, TUI_LATIN_AND_NUMBERS_REGEXP, TUI_LATIN_REGEXP, TUI_LEADING_ZEROES_REGEXP, TUI_MASK_SYMBOLS_REGEXP, TUI_NON_DIGITS_REGEXP, TUI_NON_DIGIT_REGEXP, TUI_SCROLLABLE, TUI_SCROLL_INTO_VIEW, tuiEditingKeys };\n","import { svgNodeFilter, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_SPACE } from '@taiga-ui/cdk';\nfunction tuiCheckFixedPosition(element) {\n if (!element || typeof getComputedStyle === 'undefined') {\n return false;\n }\n const style = getComputedStyle(element);\n return style.getPropertyValue('position') === 'fixed' || tuiCheckFixedPosition(element.parentElement);\n}\n\n/**\n * Calculates size of safe area on mobile devices (status bars)\n *\n * ATTENTION: Only use in browser environment\n */\nfunction tuiGetSafeAreaSize() {\n if (!CSS.supports('padding-top: env(safe-area-inset-top)')) {\n return 0;\n }\n const div = document.createElement('div');\n div.style.paddingTop = 'env(safe-area-inset-top)';\n document.body.appendChild(div);\n const safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop, 10) || 0;\n document.body.removeChild(div);\n return safeAreaSize;\n}\nfunction tuiGetScreenWidth(doc) {\n return Math.max(doc.documentElement.clientWidth, doc.defaultView ? doc.defaultView.innerWidth : 0);\n}\n\n/**\n * @description:\n * Cross-browser @media (height)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (height) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nfunction tuiGetViewportHeight({\n document,\n innerHeight\n}) {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n\n/**\n * @description:\n * Cross-browser @media (width)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientWidth\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (width) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nfunction tuiGetViewportWidth({\n document,\n innerWidth\n}) {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n\n/**\n * Creates a cloned range with its boundaries set at word boundaries\n *\n * @param currentRange a range to clone\n * @return modified range\n */\nfunction tuiGetWordRange(currentRange) {\n const range = currentRange.cloneRange();\n const {\n startContainer,\n startOffset,\n endContainer,\n endOffset\n } = range;\n const {\n ownerDocument\n } = startContainer;\n if (!ownerDocument) {\n return range;\n }\n const treeWalker = ownerDocument.createTreeWalker(ownerDocument.body, NodeFilter.SHOW_TEXT, svgNodeFilter);\n treeWalker.currentNode = startContainer;\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content = container === startContainer ? textContent.slice(0, Math.max(0, startOffset + 1)) : textContent;\n const offset = Math.max(content.lastIndexOf(' '), content.lastIndexOf(CHAR_NO_BREAK_SPACE), content.lastIndexOf(CHAR_ZERO_WIDTH_SPACE)) + 1;\n range.setStart(container, 0);\n if (offset) {\n range.setStart(container, offset);\n break;\n }\n } while (treeWalker.previousNode());\n treeWalker.currentNode = endContainer;\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content = container === endContainer ? textContent.slice(endOffset + 1) : textContent;\n const offset = [content.indexOf(' '), content.indexOf(CHAR_NO_BREAK_SPACE), content.indexOf(CHAR_ZERO_WIDTH_SPACE)].reduce((result, item) => result === -1 || item === -1 ? Math.max(result, item) : Math.min(result, item), -1);\n range.setEnd(container, textContent.length);\n if (offset !== -1) {\n range.setEnd(container, offset + textContent.length - content.length);\n break;\n }\n } while (treeWalker.nextNode());\n return range;\n}\nconst WIDTH_SEARCH = 'width=\"';\nconst HEIGHT_SEARCH = 'height=\"';\nconst START = '')));\n if (!(attributes === null || attributes === void 0 ? void 0 : attributes.includes(WIDTH_SEARCH)) || !attributes.includes(HEIGHT_SEARCH)) {\n return `${src.replace(START, ``;\n }\n const indexOfWidth = attributes.indexOf(WIDTH_SEARCH);\n const indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);\n const widthOffset = indexOfWidth + WIDTH_SEARCH.length;\n const heightOffset = indexOfHeight + HEIGHT_SEARCH.length;\n const widthString = attributes.slice(widthOffset, attributes.indexOf('\"', widthOffset));\n const heightString = attributes.slice(heightOffset, attributes.indexOf('\"', heightOffset));\n if (!heightString || !widthString || widthString.includes('%') || heightString.includes('%') || widthString.includes('em') || heightString.includes('em')) {\n return src.replace(START, `${src}`;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiCheckFixedPosition, tuiGetSafeAreaSize, tuiGetScreenWidth, tuiGetViewportHeight, tuiGetViewportWidth, tuiGetWordRange, tuiProcessIcon };\n","import { TUI_CACHE_BUSTING_PAYLOAD, DEFAULT_ICONS_PATH, tuiEditingKeys } from '@taiga-ui/core/constants';\nimport { tuiGetElementObscures } from '@taiga-ui/cdk';\nconst ITEM_SIZE = 1.5;\nconst CONTENT_SIZE = 2.5;\nfunction tuiGetBorder(hasIcon, hasCleaner = false, hasTooltip = false, hasContent = false, size = 'm') {\n const offset = size === 's' ? 0 : 0.25;\n let border = 0;\n if (hasIcon) {\n border += ITEM_SIZE + offset;\n }\n if (hasCleaner) {\n border += ITEM_SIZE + offset;\n }\n if (hasTooltip) {\n border += ITEM_SIZE + offset;\n }\n if (hasContent) {\n border += CONTENT_SIZE + offset;\n }\n return border;\n}\nfunction tuiIconsPathFactory(staticPath) {\n const base = staticPath.endsWith('/') ? staticPath : `${staticPath}/`;\n return name => {\n if (name.startsWith('tuiIcon')) {\n return `${base}${name}.svg${TUI_CACHE_BUSTING_PAYLOAD}#${name}`;\n }\n return DEFAULT_ICONS_PATH(name);\n };\n}\n\n/**\n * Check if pressed key is interactive in terms of input field\n */\nfunction tuiIsEditingKey(key) {\n return key.length === 1 || tuiEditingKeys.includes(key);\n}\n\n/**\n * @internal\n */\nfunction tuiIsObscured(el, exceptSelector = 'tui-hints-host') {\n var _a;\n return !!((_a = tuiGetElementObscures(el)) === null || _a === void 0 ? void 0 : _a.some(el => !el.closest(exceptSelector)));\n}\nfunction tuiIsPresumedHTMLString(candidate) {\n const trimmed = candidate.trim();\n return trimmed.startsWith('<') && trimmed.endsWith('>');\n}\nfunction tuiOverrideOptions(override, fallback) {\n return (directive, options) => {\n const result = directive || Object.assign({}, options || fallback);\n Object.keys(override).forEach(key => {\n // Update directive props with new defaults before inputs are processed\n result[key] = override[key];\n });\n return result;\n };\n}\nconst SIZES = {\n xxs: 0,\n xs: 1,\n s: 2,\n m: 3,\n l: 4,\n xl: 5,\n xxl: 6\n};\n/**\n * Compares size constants to determine if first size is bigger than the second\n *\n * @param size size that we need to compare\n * @param biggerThanSize size to compare with, 's' by default\n */\nfunction tuiSizeBigger(size, biggerThanSize = 's') {\n return SIZES[size] > SIZES[biggerThanSize];\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiGetBorder, tuiIconsPathFactory, tuiIsEditingKey, tuiIsObscured, tuiIsPresumedHTMLString, tuiOverrideOptions, tuiSizeBigger };\n","import { tuiGetViewportWidth } from '@taiga-ui/core/utils/dom';\nfunction tuiIsMobile(win, {\n mobile\n}) {\n return tuiGetViewportWidth(win) < mobile;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiIsMobile };\n","// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nvar TuiAppearance = /*#__PURE__*/function (TuiAppearance) {\n TuiAppearance[\"Accent\"] = \"accent\";\n TuiAppearance[\"Flat\"] = \"flat\";\n TuiAppearance[\"Icon\"] = \"icon\";\n TuiAppearance[\"Outline\"] = \"outline\";\n TuiAppearance[\"Primary\"] = \"primary\";\n TuiAppearance[\"Secondary\"] = \"secondary\";\n TuiAppearance[\"SecondaryDestructive\"] = \"secondary-destructive\";\n TuiAppearance[\"Table\"] = \"table\";\n TuiAppearance[\"Textfield\"] = \"textfield\";\n TuiAppearance[\"Whiteblock\"] = \"whiteblock\";\n TuiAppearance[\"WhiteblockActive\"] = \"whiteblock-active\";\n return TuiAppearance;\n}(TuiAppearance || {});\n/** @deprecated not used anymore TODO: remove in 4.0 **/\n// eslint-disable-next-line no-restricted-syntax\nvar TuiDropdownAnimation = /*#__PURE__*/function (TuiDropdownAnimation) {\n TuiDropdownAnimation[\"FadeInBottom\"] = \"fadeInBottom\";\n TuiDropdownAnimation[\"FadeInTop\"] = \"fadeInTop\";\n return TuiDropdownAnimation;\n}(TuiDropdownAnimation || {});\n/**\n * @internal used in calendar, year picker and wrapper\n */\n// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nvar TuiInteractiveState = /*#__PURE__*/function (TuiInteractiveState) {\n TuiInteractiveState[\"Active\"] = \"active\";\n TuiInteractiveState[\"Disabled\"] = \"disabled\";\n TuiInteractiveState[\"Hover\"] = \"hover\";\n TuiInteractiveState[\"Readonly\"] = \"readonly\";\n return TuiInteractiveState;\n}(TuiInteractiveState || {});\n/**\n * @deprecated use union type TuiNotificationT instead\n */\n// eslint-disable-next-line no-restricted-syntax\nvar TuiNotification = /*#__PURE__*/function (TuiNotification) {\n TuiNotification[\"Error\"] = \"error\";\n TuiNotification[\"Info\"] = \"info\";\n TuiNotification[\"Success\"] = \"success\";\n TuiNotification[\"Warning\"] = \"warning\";\n return TuiNotification;\n}(TuiNotification || {});\n/**\n * @internal used in calendar and year picker\n */\n// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nvar TuiRangeState = /*#__PURE__*/function (TuiRangeState) {\n TuiRangeState[\"End\"] = \"end\";\n TuiRangeState[\"Single\"] = \"single\";\n TuiRangeState[\"Start\"] = \"start\";\n return TuiRangeState;\n}(TuiRangeState || {});\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiAppearance, TuiDropdownAnimation, TuiInteractiveState, TuiNotification, TuiRangeState };\n","import { inject, isDevMode, InjectionToken, NgZone } from '@angular/core';\nimport { tuiCreateTokenFromFactory, tuiCreateToken, tuiProvideOptions, TuiDayOfWeek, tuiTypedFromEvent, tuiZoneOptimized, TUI_SCROLL_REF as TUI_SCROLL_REF$1, tuiSvgLinearGradientProcessor } from '@taiga-ui/cdk';\nimport { DOCUMENT } from '@angular/common';\nimport { tuiExtractI18n } from '@taiga-ui/i18n';\nimport { tuiIconsPathFactory, tuiIsMobile } from '@taiga-ui/core/utils';\nimport { WINDOW } from '@ng-web-apis/common';\nimport { share, startWith, map, distinctUntilChanged, switchMap, takeUntil } from 'rxjs/operators';\nimport { TUI_DEFAULT_NUMBER_FORMAT } from '@taiga-ui/core/constants';\nimport { of, merge, identity } from 'rxjs';\nimport { TuiAppearance } from '@taiga-ui/core/enums';\nconst TUI_REDUCED_MOTION = tuiCreateTokenFromFactory(() => {\n var _a, _b, _c;\n return (_c = (_b = (_a = inject(DOCUMENT).defaultView) === null || _a === void 0 ? void 0 : _a.matchMedia) === null || _b === void 0 ? void 0 : _b.call(_a, '(prefers-reduced-motion: reduce)').matches) !== null && _c !== void 0 ? _c : false;\n});\nconst TUI_ANIMATIONS_DEFAULT_DURATION = 300;\n/**\n * Duration of all Taiga UI animations in ms\n */\nconst TUI_ANIMATIONS_DURATION = tuiCreateTokenFromFactory(() => inject(TUI_REDUCED_MOTION) ? 0 : TUI_ANIMATIONS_DEFAULT_DURATION);\n\n/**\n * Options for Taiga UI animations\n */\nconst TUI_ANIMATION_OPTIONS = tuiCreateTokenFromFactory(() => ({\n value: '',\n params: {\n duration: inject(TUI_ANIMATIONS_DURATION)\n }\n}));\n\n/**\n * @deprecated:\n * Flag to enable assertions across Taiga UI\n *\n * The current token no longer matters as\n * it will not be provided in production\n */\nconst TUI_ASSERT_ENABLED = tuiCreateTokenFromFactory(() => isDevMode());\nconst COMMON_ICONS = {\n check: 'tuiIconCheck',\n close: 'tuiIconClose',\n error: 'tuiIconAlertCircle',\n more: 'tuiIconChevronRight'\n};\nconst TUI_COMMON_ICONS = tuiCreateToken(COMMON_ICONS);\nfunction tuiCommonIconsProvider(icons) {\n return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);\n}\n\n/**\n * Accessor for data-list options\n */\nconst TUI_DATA_LIST_ACCESSOR = new InjectionToken('[TUI_DATA_LIST_ACCESSOR]');\nfunction tuiAsDataListAccessor(useExisting) {\n return {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting\n };\n}\n\n/**\n * DataList controller\n */\nconst TUI_DATA_LIST_HOST = new InjectionToken('[TUI_DATA_LIST_HOST]');\nfunction tuiAsDataListHost(useExisting) {\n return {\n provide: TUI_DATA_LIST_HOST,\n useExisting\n };\n}\n\n/**\n * Token for adding data-type attribute to calendar cell\n */\nconst TUI_DAY_TYPE_HANDLER = tuiCreateToken(day => day.isWeekend ? 'weekend' : 'weekday');\nconst TUI_DOCUMENT_OR_SHADOW_ROOT = new InjectionToken('[TUI_DOCUMENT_OR_SHADOW_ROOT]');\n\n/**\n * ElementRef when you cannot use @Input for single time injection\n */\nconst TUI_ELEMENT_REF = new InjectionToken('[TUI_ELEMENT_REF]');\n\n/**\n * The first day of the week index\n */\nconst TUI_FIRST_DAY_OF_WEEK = tuiCreateToken(TuiDayOfWeek.Monday);\n\n/**\n * Localized months names\n */\nconst TUI_MONTHS = tuiCreateTokenFromFactory(tuiExtractI18n('months'));\n/**\n * i18n 'close' word\n */\nconst TUI_CLOSE_WORD = tuiCreateTokenFromFactory(tuiExtractI18n('close'));\n/**\n * i18n 'Nothing found' message\n */\nconst TUI_NOTHING_FOUND_MESSAGE = tuiCreateTokenFromFactory(tuiExtractI18n('nothingFoundMessage'));\n/**\n * i18n of error message\n */\nconst TUI_DEFAULT_ERROR_MESSAGE = tuiCreateTokenFromFactory(tuiExtractI18n('defaultErrorMessage'));\n/**\n * spin i18n texts\n */\nconst TUI_SPIN_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n('spinTexts'));\n/**\n * calendars i18n texts\n */\nconst TUI_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(tuiExtractI18n('shortWeekDays'));\nconst TUI_DEFAULT_ICONS_PLACE = 'assets/taiga-ui/icons';\n/**\n * Path to icons\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nconst TUI_ICONS_PLACE = tuiCreateToken(TUI_DEFAULT_ICONS_PLACE);\n\n/**\n * A key/value dictionary of icon names and src to be defined with TuiSvgService\n */\nconst TUI_ICONS = tuiCreateToken({});\n\n/**\n * A handler to retrieve USE id for icon by name\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nconst TUI_ICONS_PATH = tuiCreateTokenFromFactory(() => tuiIconsPathFactory(inject(TUI_ICONS_PLACE)));\n\n/**\n * Token for media constant\n */\nconst TUI_MEDIA = tuiCreateToken({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280\n});\n\n/**\n * @deprecated use {@link https://taiga-ui.dev/services/breakpoint-service TuiBreakpointService}\n * TODO: drop in v4.0\n * Mobile resolution stream for private providers\n */\nconst TUI_IS_MOBILE_RES = tuiCreateTokenFromFactory(() => {\n const win = inject(WINDOW);\n const media = inject(TUI_MEDIA);\n return tuiTypedFromEvent(win, 'resize').pipe(share(), startWith(null), map(() => tuiIsMobile(win, media)), distinctUntilChanged(), tuiZoneOptimized(inject(NgZone)));\n});\n\n/**\n * @internal\n * @deprecated\n * Don't use it! Will be removed after changing the mask.\n */\nconst TUI_LEGACY_MASK = new InjectionToken('[TUI_LEGACY_MASK]');\n\n/**\n * Mode stream for private providers\n */\nconst TUI_MODE = new InjectionToken('[TUI_MODE]');\n\n/** @deprecated remove export */\nconst STATUS_ICON = {\n info: 'tuiIconInfo',\n success: 'tuiIconCheckCircle',\n error: 'tuiIconXCircle',\n warning: 'tuiIconAlertCircle',\n neutral: 'tuiIconInfo'\n};\n/** Default values for the notification options. */\nconst TUI_NOTIFICATION_DEFAULT_OPTIONS = {\n autoClose: 3000,\n label: '',\n status: 'info',\n hasCloseButton: true,\n icon: ({\n $implicit\n }) => STATUS_ICON[$implicit],\n size: 'm',\n hasIcon: true,\n defaultAutoCloseTime: 3000\n};\n/**\n * Default parameters for notification alert component\n */\nconst TUI_NOTIFICATION_OPTIONS = tuiCreateToken(TUI_NOTIFICATION_DEFAULT_OPTIONS);\nfunction tuiNotificationOptionsProvider(options) {\n return tuiProvideOptions(TUI_NOTIFICATION_OPTIONS, options, TUI_NOTIFICATION_DEFAULT_OPTIONS);\n}\n\n/**\n * Formatting configuration for displayed numbers\n */\nconst TUI_NUMBER_FORMAT = tuiCreateToken(TUI_DEFAULT_NUMBER_FORMAT);\nfunction tuiNumberFormatProvider(options) {\n return tuiProvideOptions(TUI_NUMBER_FORMAT, options, TUI_DEFAULT_NUMBER_FORMAT);\n}\n\n/**\n * Formatting configuration for displayed numbers\n */\nconst TUI_NUMBER_FORMAT_OBSERVABLE = tuiCreateToken(of(Object.assign(Object.assign({}, TUI_DEFAULT_NUMBER_FORMAT), {\n decimalLimit: NaN\n})));\n\n/**\n * Content for tuiOption component\n */\nconst TUI_OPTION_CONTENT = new InjectionToken('[TUI_OPTION_CONTENT]');\nfunction tuiAsOptionContent(useValue) {\n return {\n provide: TUI_OPTION_CONTENT,\n useValue\n };\n}\n\n/**\n * TODO: v4.0 delete the whole file\n */\nconst convertToSundayFirstWeekFormat = weekDaysNames => {\n const sundayIndex = weekDaysNames.length - 1;\n return [weekDaysNames[sundayIndex], ...weekDaysNames.slice(0, sundayIndex)];\n};\n/**\n * Ordered calendars i18n texts\n * @deprecated\n */\nconst TUI_ORDERED_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(() => {\n const firstDayOfWeekIndex = inject(TUI_FIRST_DAY_OF_WEEK);\n return inject(TUI_SHORT_WEEK_DAYS).pipe(map(convertToSundayFirstWeekFormat), map(weekDays => [...weekDays.slice(firstDayOfWeekIndex), ...weekDays.slice(0, firstDayOfWeekIndex)]));\n});\n\n/**\n * A custom Sanitizer to sanitize source before inlining\n */\nconst TUI_SANITIZER = new InjectionToken('[TUI_SANITIZER]');\n\n/**\n * @deprecated import from `@taiga-ui/cdk` instead\n */\nconst TUI_SCROLL_REF = TUI_SCROLL_REF$1;\n\n/**\n * A stream of possible selection changes\n */\nconst TUI_SELECTION_STREAM = tuiCreateTokenFromFactory(() => {\n const doc = inject(DOCUMENT);\n return merge(tuiTypedFromEvent(doc, 'selectionchange'), tuiTypedFromEvent(doc, 'mouseup'), tuiTypedFromEvent(doc, 'mousedown').pipe(switchMap(() => tuiTypedFromEvent(doc, 'mousemove').pipe(takeUntil(tuiTypedFromEvent(doc, 'mouseup'))))), tuiTypedFromEvent(doc, 'keydown'), tuiTypedFromEvent(doc, 'keyup')).pipe(share());\n});\nconst TUI_SPIN_ICONS = tuiCreateToken({\n decrement: 'tuiIconChevronLeft',\n increment: 'tuiIconChevronRight'\n});\n\n/**\n * Transform function the contents of the loaded svg file\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nconst TUI_SVG_CONTENT_PROCESSOR = tuiCreateToken(tuiSvgLinearGradientProcessor);\n\n/**\n * Source path processor for svg\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nconst TUI_SVG_SRC_PROCESSOR = tuiCreateToken(identity);\n\n/**\n * Appearance for inputs\n * @deprecated use {@link TUI_TEXTFIELD_APPEARANCE_DIRECTIVE} instead\n * TODO: Remove in 4.0\n */\nconst TUI_TEXTFIELD_APPEARANCE = tuiCreateToken(TuiAppearance.Textfield);\n\n/**\n * An interface to communicate with textfield based controls\n */\nconst TUI_TEXTFIELD_HOST = new InjectionToken('[TUI_TEXTFIELD_HOST]');\nfunction tuiAsTextfieldHost(useExisting) {\n return {\n provide: TUI_TEXTFIELD_HOST,\n useExisting\n };\n}\nconst TUI_THEME = tuiCreateToken('Taiga');\n\n/**\n * Buffer token to pass NG_VALUE_ACCESSOR to a different Injector\n */\nconst TUI_VALUE_ACCESSOR = new InjectionToken('[TUI_VALUE_ACCESSOR]');\n\n/**\n * Viewport accessor\n */\nconst TUI_VIEWPORT = tuiCreateTokenFromFactory(() => {\n const win = inject(WINDOW);\n return {\n type: 'viewport',\n getClientRect() {\n return {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: win.innerHeight\n };\n }\n };\n});\nfunction tuiAsViewport(useExisting) {\n return {\n provide: TUI_VIEWPORT,\n useExisting\n };\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { STATUS_ICON, TUI_ANIMATIONS_DEFAULT_DURATION, TUI_ANIMATIONS_DURATION, TUI_ANIMATION_OPTIONS, TUI_ASSERT_ENABLED, TUI_CLOSE_WORD, TUI_COMMON_ICONS, TUI_DATA_LIST_ACCESSOR, TUI_DATA_LIST_HOST, TUI_DAY_TYPE_HANDLER, TUI_DEFAULT_ERROR_MESSAGE, TUI_DEFAULT_ICONS_PLACE, TUI_DOCUMENT_OR_SHADOW_ROOT, TUI_ELEMENT_REF, TUI_FIRST_DAY_OF_WEEK, TUI_ICONS, TUI_ICONS_PATH, TUI_ICONS_PLACE, TUI_IS_MOBILE_RES, TUI_LEGACY_MASK, TUI_MEDIA, TUI_MODE, TUI_MONTHS, TUI_NOTHING_FOUND_MESSAGE, TUI_NOTIFICATION_DEFAULT_OPTIONS, TUI_NOTIFICATION_OPTIONS, TUI_NUMBER_FORMAT, TUI_NUMBER_FORMAT_OBSERVABLE, TUI_OPTION_CONTENT, TUI_ORDERED_SHORT_WEEK_DAYS, TUI_REDUCED_MOTION, TUI_SANITIZER, TUI_SCROLL_REF, TUI_SELECTION_STREAM, TUI_SHORT_WEEK_DAYS, TUI_SPIN_ICONS, TUI_SPIN_TEXTS, TUI_SVG_CONTENT_PROCESSOR, TUI_SVG_SRC_PROCESSOR, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_HOST, TUI_THEME, TUI_VALUE_ACCESSOR, TUI_VIEWPORT, tuiAsDataListAccessor, tuiAsDataListHost, tuiAsOptionContent, tuiAsTextfieldHost, tuiAsViewport, tuiCommonIconsProvider, tuiNotificationOptionsProvider, tuiNumberFormatProvider };\n","import * as i0 from '@angular/core';\nimport { Directive, Self, Inject, SkipSelf, Optional } from '@angular/core';\nimport { TuiDestroyService, AbstractTuiControl } from '@taiga-ui/cdk';\nimport * as i1 from 'rxjs';\nimport { Observable, merge } from 'rxjs';\nimport { distinctUntilChanged, takeUntil } from 'rxjs/operators';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass TuiDriver extends Observable {}\nfunction tuiAsDriver(useExisting) {\n return {\n provide: TuiDriver,\n multi: true,\n useExisting\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass TuiVehicle {}\nfunction tuiAsVehicle(useExisting) {\n return {\n provide: TuiVehicle,\n multi: true,\n useExisting\n };\n}\nlet AbstractTuiDriverDirective = /*#__PURE__*/(() => {\n class AbstractTuiDriverDirective {\n constructor(destroy$, drivers, vehicles) {\n this.destroy$ = destroy$;\n this.drivers = drivers;\n this.vehicles = vehicles;\n }\n ngOnInit() {\n const vehicle = this.vehicles.find(({\n type\n }) => type === this.type);\n merge(...this.drivers.filter(({\n type\n }) => type === this.type)).pipe(distinctUntilChanged(), takeUntil(this.destroy$)).subscribe(value => {\n vehicle === null || vehicle === void 0 ? void 0 : vehicle.toggle(value);\n });\n }\n }\n AbstractTuiDriverDirective.ɵfac = function AbstractTuiDriverDirective_Factory(t) {\n return new (t || AbstractTuiDriverDirective)(i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(TuiDriver), i0.ɵɵdirectiveInject(TuiVehicle));\n };\n AbstractTuiDriverDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiDriverDirective\n });\n return AbstractTuiDriverDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AbstractTuiTextfieldHost = /*#__PURE__*/(() => {\n class AbstractTuiTextfieldHost {\n constructor(host) {\n this.host = host;\n }\n get readOnly() {\n return this.host.readOnly;\n }\n get disabled() {\n return this.host.computedDisabled;\n }\n get invalid() {\n return this.host.computedInvalid;\n }\n get focusable() {\n return this.host.computedFocusable;\n }\n get inputMode() {\n return 'text';\n }\n get value() {\n var _a;\n return ((_a = this.host.value) === null || _a === void 0 ? void 0 : _a.toString()) || '';\n }\n process(_input) {}\n }\n AbstractTuiTextfieldHost.ɵfac = function AbstractTuiTextfieldHost_Factory(t) {\n return new (t || AbstractTuiTextfieldHost)(i0.ɵɵdirectiveInject(AbstractTuiControl));\n };\n AbstractTuiTextfieldHost.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiTextfieldHost\n });\n return AbstractTuiTextfieldHost;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// TODO: Drop any\nfunction tuiFallbackAccessor(type) {\n return (accessors, fallback) => (accessors === null || accessors === void 0 ? void 0 : accessors.find(accessor => accessor !== fallback && accessor.type === type)) || fallback;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass TuiPositionAccessor {}\n// TODO: Make fallback required\nfunction tuiPositionAccessorFor(type, fallback) {\n return {\n provide: TuiPositionAccessor,\n deps: fallback ? [[new SkipSelf(), new Optional(), TuiPositionAccessor], fallback] : [[new SkipSelf(), new Optional(), TuiPositionAccessor]],\n useFactory: tuiFallbackAccessor(type)\n };\n}\nfunction tuiAsPositionAccessor(useExisting) {\n return {\n provide: TuiPositionAccessor,\n multi: true,\n useExisting\n };\n}\n\n// TODO: Rename to getBoundingClientRect to match the DOM API\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass TuiRectAccessor {}\nfunction tuiRectAccessorFor(type, fallback) {\n return {\n provide: TuiRectAccessor,\n deps: [[new SkipSelf(), new Optional(), TuiRectAccessor], fallback],\n useFactory: tuiFallbackAccessor(type)\n };\n}\nconst tuiFallbackRectAccessor = tuiFallbackAccessor;\nfunction tuiAsRectAccessor(useExisting) {\n return {\n provide: TuiRectAccessor,\n multi: true,\n useExisting\n };\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractTuiDriverDirective, AbstractTuiTextfieldHost, TuiDriver, TuiPositionAccessor, TuiRectAccessor, TuiVehicle, tuiAsDriver, tuiAsPositionAccessor, tuiAsRectAccessor, tuiAsVehicle, tuiFallbackAccessor, tuiFallbackRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor };\n","/**\n * @license Angular v18.0.4\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, Directive, Input, Output, InjectionToken, reflectComponentType, Component, createEnvironmentInjector, ɵisNgModule, isStandalone, ɵisInjectable, runInInjectionContext, Compiler, NgModuleFactory, NgZone, afterNextRender, AfterRenderPhase, EnvironmentInjector, ɵConsole, ɵPendingTasks, ɵɵsanitizeUrlOrResourceUrl, booleanAttribute, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, InjectFlags, APP_INITIALIZER, SkipSelf, NgModule, Inject, Version } from '@angular/core';\nimport { isObservable, from, of, BehaviorSubject, combineLatest, EmptyError, concat, defer, pipe, throwError, EMPTY, ConnectableObservable, Subject, Subscription } from 'rxjs';\nimport * as i3 from '@angular/common';\nimport { DOCUMENT, Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';\nimport { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, defaultIfEmpty, last as last$1, takeLast, mapTo, finalize, refCount, takeUntil, mergeAll } from 'rxjs/operators';\nimport * as i1 from '@angular/platform-browser';\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nconst PRIMARY_OUTLET = 'primary';\n/**\n * A private symbol used to store the value of `Route.title` inside the `Route.data` if it is a\n * static string or `Route.resolve` if anything else. This allows us to reuse the existing route\n * data/resolvers to support the title feature without new instrumentation in the `Router` pipeline.\n */\nconst RouteTitleKey = /* @__PURE__ */Symbol('RouteTitle');\nclass ParamsAsMap {\n constructor(params) {\n this.params = params || {};\n }\n has(name) {\n return Object.prototype.hasOwnProperty.call(this.params, name);\n }\n get(name) {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n return null;\n }\n getAll(name) {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n return [];\n }\n get keys() {\n return Object.keys(this.params);\n }\n}\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nfunction convertToParamMap(params) {\n return new ParamsAsMap(params);\n}\n/**\n * Matches the route configuration (`route`) against the actual URL (`segments`).\n *\n * When no matcher is defined on a `Route`, this is the matcher used by the Router by default.\n *\n * @param segments The remaining unmatched segments in the current navigation\n * @param segmentGroup The current segment group being matched\n * @param route The `Route` to match against.\n *\n * @see {@link UrlMatchResult}\n * @see {@link Route}\n *\n * @returns The resulting match information or `null` if the `route` should not match.\n * @publicApi\n */\nfunction defaultUrlMatcher(segments, segmentGroup, route) {\n const parts = route.path.split('/');\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n const posParams = {};\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part[0] === ':';\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n } else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n return {\n consumed: segments.slice(0, parts.length),\n posParams\n };\n}\nfunction shallowEqualArrays(a, b) {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i])) return false;\n }\n return true;\n}\nfunction shallowEqual(a, b) {\n // While `undefined` should never be possible, it would sometimes be the case in IE 11\n // and pre-chromium Edge. The check below accounts for this edge case.\n const k1 = a ? getDataKeys(a) : undefined;\n const k2 = b ? getDataKeys(b) : undefined;\n if (!k1 || !k2 || k1.length != k2.length) {\n return false;\n }\n let key;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (!equalArraysOrString(a[key], b[key])) {\n return false;\n }\n }\n return true;\n}\n/**\n * Gets the keys of an object, including `symbol` keys.\n */\nfunction getDataKeys(obj) {\n return [...Object.keys(obj), ...Object.getOwnPropertySymbols(obj)];\n}\n/**\n * Test equality for arrays of strings or a string.\n */\nfunction equalArraysOrString(a, b) {\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) return false;\n const aSorted = [...a].sort();\n const bSorted = [...b].sort();\n return aSorted.every((val, index) => bSorted[index] === val);\n } else {\n return a === b;\n }\n}\n/**\n * Return the last element of an array.\n */\nfunction last(a) {\n return a.length > 0 ? a[a.length - 1] : null;\n}\nfunction wrapIntoObservable(value) {\n if (isObservable(value)) {\n return value;\n }\n if (ɵisPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n return of(value);\n}\nconst pathCompareMap = {\n 'exact': equalSegmentGroups,\n 'subset': containsSegmentGroup\n};\nconst paramCompareMap = {\n 'exact': equalParams,\n 'subset': containsParams,\n 'ignored': () => true\n};\nfunction containsTree(container, containee, options) {\n return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) && paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) && !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\nfunction equalParams(container, containee) {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\nfunction equalSegmentGroups(container, containee, matrixParams) {\n if (!equalPath(container.segments, containee.segments)) return false;\n if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n return false;\n }\n if (container.numberOfChildren !== containee.numberOfChildren) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams)) return false;\n }\n return true;\n}\nfunction containsParams(container, containee) {\n return Object.keys(containee).length <= Object.keys(container).length && Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\nfunction containsSegmentGroup(container, containee, matrixParams) {\n return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\nfunction containsSegmentGroupHelper(container, containee, containeePaths, matrixParams) {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) return false;\n if (containee.hasChildren()) return false;\n if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n return true;\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) return false;\n if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n return false;\n }\n }\n return true;\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) return false;\n if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n if (!container.children[PRIMARY_OUTLET]) return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n }\n}\nfunction matrixParamsMatch(containerPaths, containeePaths, options) {\n return containeePaths.every((containeeSegment, i) => {\n return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n });\n}\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlTree {\n constructor( /** The root segment group of the URL tree */\n root = new UrlSegmentGroup([], {}), /** The query params of the URL */\n queryParams = {}, /** The fragment of the URL */\n fragment = null) {\n this.root = root;\n this.queryParams = queryParams;\n this.fragment = fragment;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (root.segments.length > 0) {\n throw new ɵRuntimeError(4015 /* RuntimeErrorCode.INVALID_ROOT_URL_SEGMENT */, 'The root `UrlSegmentGroup` should not contain `segments`. ' + 'Instead, these segments belong in the `children` so they can be associated with a named outlet.');\n }\n }\n }\n get queryParamMap() {\n this._queryParamMap ??= convertToParamMap(this.queryParams);\n return this._queryParamMap;\n }\n /** @docsNotRequired */\n toString() {\n return DEFAULT_SERIALIZER.serialize(this);\n }\n}\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nclass UrlSegmentGroup {\n constructor( /** The URL segments of this group. See `UrlSegment` for more information */\n segments, /** The list of children of this group */\n children) {\n this.segments = segments;\n this.children = children;\n /** The parent node in the url tree */\n this.parent = null;\n Object.values(children).forEach(v => v.parent = this);\n }\n /** Whether the segment has child segments */\n hasChildren() {\n return this.numberOfChildren > 0;\n }\n /** Number of child segments */\n get numberOfChildren() {\n return Object.keys(this.children).length;\n }\n /** @docsNotRequired */\n toString() {\n return serializePaths(this);\n }\n}\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlSegment {\n constructor( /** The path part of a URL segment */\n path, /** The matrix parameters associated with a segment */\n parameters) {\n this.path = path;\n this.parameters = parameters;\n }\n get parameterMap() {\n this._parameterMap ??= convertToParamMap(this.parameters);\n return this._parameterMap;\n }\n /** @docsNotRequired */\n toString() {\n return serializePath(this);\n }\n}\nfunction equalSegments(as, bs) {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\nfunction equalPath(as, bs) {\n if (as.length !== bs.length) return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\nfunction mapChildrenIntoArray(segment, fn) {\n let res = [];\n Object.entries(segment.children).forEach(([childOutlet, child]) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n Object.entries(segment.children).forEach(([childOutlet, child]) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nlet UrlSerializer = /*#__PURE__*/(() => {\n class UrlSerializer {\n static {\n this.ɵfac = function UrlSerializer_Factory(t) {\n return new (t || UrlSerializer)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: UrlSerializer,\n factory: () => (() => new DefaultUrlSerializer())(),\n providedIn: 'root'\n });\n }\n }\n return UrlSerializer;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nclass DefaultUrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url) {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n /** Converts a `UrlTree` into a url */\n serialize(tree) {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment = typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n return `${segment}${query}${fragment}`;\n }\n}\nconst DEFAULT_SERIALIZER = /*#__PURE__*/new DefaultUrlSerializer();\nfunction serializePaths(segment) {\n return segment.segments.map(p => serializePath(p)).join('/');\n}\nfunction serializeSegment(segment, root) {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET] ? serializeSegment(segment.children[PRIMARY_OUTLET], false) : '';\n const children = [];\n Object.entries(segment.children).forEach(([k, v]) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n } else {\n const children = mapChildrenIntoArray(segment, (v, k) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n return [`${k}:${serializeSegment(v, false)}`];\n });\n // use no parenthesis if the only child is a primary outlet route\n if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n return `${serializePaths(segment)}/${children[0]}`;\n }\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s) {\n return encodeURIComponent(s).replace(/%40/g, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',');\n}\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriQuery(s) {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriFragment(s) {\n return encodeURI(s);\n}\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriSegment(s) {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\nfunction decode(s) {\n return decodeURIComponent(s);\n}\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nfunction decodeQuery(s) {\n return decode(s.replace(/\\+/g, '%20'));\n}\nfunction serializePath(path) {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\nfunction serializeMatrixParams(params) {\n return Object.entries(params).map(([key, value]) => `;${encodeUriSegment(key)}=${encodeUriSegment(value)}`).join('');\n}\nfunction serializeQueryParams(params) {\n const strParams = Object.entries(params).map(([name, value]) => {\n return Array.isArray(value) ? value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') : `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n }).filter(s => s);\n return strParams.length ? `?${strParams.join('&')}` : '';\n}\nconst SEGMENT_RE = /^[^\\/()?;#]+/;\nfunction matchSegments(str) {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\nconst MATRIX_PARAM_SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchMatrixKeySegments(str) {\n const match = str.match(MATRIX_PARAM_SEGMENT_RE);\n return match ? match[0] : '';\n}\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str) {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\nconst QUERY_PARAM_VALUE_RE = /^[^&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str) {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\nclass UrlParser {\n constructor(url) {\n this.url = url;\n this.remaining = url;\n }\n parseRootSegment() {\n this.consumeOptional('/');\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n parseQueryParams() {\n const params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n parseFragment() {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n parseChildren() {\n if (this.remaining === '') {\n return {};\n }\n this.consumeOptional('/');\n const segments = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n let children = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n let res = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n return res;\n }\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n parseSegment() {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Empty path url segment cannot have parameters: '${this.remaining}'.`);\n }\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n parseMatrixParams() {\n const params = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n parseParam(params) {\n const key = matchMatrixKeySegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n params[decode(key)] = decode(value);\n }\n // Parse a single query parameter `name[=value]`\n parseQueryParam(params) {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n } else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n // parse `(a/b//outlet_name:c/d)`\n parseParens(allowPrimary) {\n const segments = {};\n this.capture('(');\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n const next = this.remaining[path.length];\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot parse url '${this.url}'`);\n }\n let outletName = undefined;\n if (path.indexOf(':') > -1) {\n outletName = path.slice(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n } else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n const children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] : new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n return segments;\n }\n peekStartsWith(str) {\n return this.remaining.startsWith(str);\n }\n // Consumes the prefix when it is present and returns whether it has been consumed\n consumeOptional(str) {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n capture(str) {\n if (!this.consumeOptional(str)) {\n throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Expected \"${str}\".`);\n }\n }\n}\nfunction createRoot(rootCandidate) {\n return rootCandidate.segments.length > 0 ? new UrlSegmentGroup([], {\n [PRIMARY_OUTLET]: rootCandidate\n }) : rootCandidate;\n}\n/**\n * Recursively\n * - merges primary segment children into their parents\n * - drops empty children (those which have no segments and no children themselves). This latter\n * prevents serializing a group into something like `/a(aux:)`, where `aux` is an empty child\n * segment.\n * - merges named outlets without a primary segment sibling into the children. This prevents\n * serializing a URL like `//(a:a)(b:b) instead of `/(a:a//b:b)` when the aux b route lives on the\n * root but the `a` route lives under an empty path primary route.\n */\nfunction squashSegmentGroup(segmentGroup) {\n const newChildren = {};\n for (const [childOutlet, child] of Object.entries(segmentGroup.children)) {\n const childCandidate = squashSegmentGroup(child);\n // moves named children in an empty path primary child into this group\n if (childOutlet === PRIMARY_OUTLET && childCandidate.segments.length === 0 && childCandidate.hasChildren()) {\n for (const [grandChildOutlet, grandChild] of Object.entries(childCandidate.children)) {\n newChildren[grandChildOutlet] = grandChild;\n }\n } // don't add empty children\n else if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n newChildren[childOutlet] = childCandidate;\n }\n }\n const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n return mergeTrivialChildren(s);\n}\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s) {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n return s;\n}\nfunction isUrlTree(v) {\n return v instanceof UrlTree;\n}\n\n/**\n * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.\n *\n * @publicApi\n *\n *\n * @param relativeTo The `ActivatedRouteSnapshot` to apply the commands to\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the one provided in the `relativeTo` parameter.\n * @param queryParams The query parameters for the `UrlTree`. `null` if the `UrlTree` does not have\n * any query parameters.\n * @param fragment The fragment for the `UrlTree`. `null` if the `UrlTree` does not have a fragment.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * createUrlTreeFromSnapshot(snapshot, ['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * createUrlTreeFromSnapshot(snapshot, [{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right:\n * 'chat'}}], null, null);\n *\n * // remove the right secondary node\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // For the examples below, assume the current URL is for the `/team/33/user/11` and the\n * `ActivatedRouteSnapshot` points to `user/11`:\n *\n * // navigate to /team/33/user/11/details\n * createUrlTreeFromSnapshot(snapshot, ['details']);\n *\n * // navigate to /team/33/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../22']);\n *\n * // navigate to /team/44/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);\n * ```\n */\nfunction createUrlTreeFromSnapshot(relativeTo, commands, queryParams = null, fragment = null) {\n const relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeTo);\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n}\nfunction createSegmentGroupFromRoute(route) {\n let targetGroup;\n function createSegmentGroupFromRouteRecursive(currentRoute) {\n const childOutlets = {};\n for (const childSnapshot of currentRoute.children) {\n const root = createSegmentGroupFromRouteRecursive(childSnapshot);\n childOutlets[childSnapshot.outlet] = root;\n }\n const segmentGroup = new UrlSegmentGroup(currentRoute.url, childOutlets);\n if (currentRoute === route) {\n targetGroup = segmentGroup;\n }\n return segmentGroup;\n }\n const rootCandidate = createSegmentGroupFromRouteRecursive(route.root);\n const rootSegmentGroup = createRoot(rootCandidate);\n return targetGroup ?? rootSegmentGroup;\n}\nfunction createUrlTreeFromSegmentGroup(relativeTo, commands, queryParams, fragment) {\n let root = relativeTo;\n while (root.parent) {\n root = root.parent;\n }\n // There are no commands so the `UrlTree` goes to the same path as the one created from the\n // `UrlSegmentGroup`. All we need to do is update the `queryParams` and `fragment` without\n // applying any other logic.\n if (commands.length === 0) {\n return tree(root, root, root, queryParams, fragment);\n }\n const nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(root, root, new UrlSegmentGroup([], {}), queryParams, fragment);\n }\n const position = findStartingPositionForTargetGroup(nav, root, relativeTo);\n const newSegmentGroup = position.processChildren ? updateSegmentGroupChildren(position.segmentGroup, position.index, nav.commands) : updateSegmentGroup(position.segmentGroup, position.index, nav.commands);\n return tree(root, position.segmentGroup, newSegmentGroup, queryParams, fragment);\n}\nfunction isMatrixParams(command) {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command) {\n return typeof command === 'object' && command != null && command.outlets;\n}\nfunction tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment) {\n let qp = {};\n if (queryParams) {\n Object.entries(queryParams).forEach(([name, value]) => {\n qp[name] = Array.isArray(value) ? value.map(v => `${v}`) : `${value}`;\n });\n }\n let rootCandidate;\n if (oldRoot === oldSegmentGroup) {\n rootCandidate = newSegmentGroup;\n } else {\n rootCandidate = replaceSegment(oldRoot, oldSegmentGroup, newSegmentGroup);\n }\n const newRoot = createRoot(squashSegmentGroup(rootCandidate));\n return new UrlTree(newRoot, qp, fragment);\n}\n/**\n * Replaces the `oldSegment` which is located in some child of the `current` with the `newSegment`.\n * This also has the effect of creating new `UrlSegmentGroup` copies to update references. This\n * shouldn't be necessary but the fallback logic for an invalid ActivatedRoute in the creation uses\n * the Router's current url tree. If we don't create new segment groups, we end up modifying that\n * value.\n */\nfunction replaceSegment(current, oldSegment, newSegment) {\n const children = {};\n Object.entries(current.children).forEach(([outletName, c]) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n } else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\nclass Navigation {\n constructor(isAbsolute, numberOfDoubleDots, commands) {\n this.isAbsolute = isAbsolute;\n this.numberOfDoubleDots = numberOfDoubleDots;\n this.commands = commands;\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Root segment cannot have matrix parameters');\n }\n const cmdWithOutlet = commands.find(isCommandWithOutlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, (typeof ngDevMode === 'undefined' || ngDevMode) && '{outlets:{}} has to be the last command');\n }\n }\n toRoot() {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands) {\n if (typeof commands[0] === 'string' && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n const res = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets = {};\n Object.entries(cmd.outlets).forEach(([name, commands]) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, {\n outlets\n }];\n }\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n } else if (partIndex == 0 && urlPart === '') {\n // '/a'\n isAbsolute = true;\n } else if (urlPart === '..') {\n // '../a'\n numberOfDoubleDots++;\n } else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n return res;\n }\n return [...res, cmd];\n }, []);\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\nclass Position {\n constructor(segmentGroup, processChildren, index) {\n this.segmentGroup = segmentGroup;\n this.processChildren = processChildren;\n this.index = index;\n }\n}\nfunction findStartingPositionForTargetGroup(nav, root, target) {\n if (nav.isAbsolute) {\n return new Position(root, true, 0);\n }\n if (!target) {\n // `NaN` is used only to maintain backwards compatibility with incorrectly mocked\n // `ActivatedRouteSnapshot` in tests. In prior versions of this code, the position here was\n // determined based on an internal property that was rarely mocked, resulting in `NaN`. In\n // reality, this code path should _never_ be touched since `target` is not allowed to be falsey.\n return new Position(root, false, NaN);\n }\n if (target.parent === null) {\n return new Position(target, true, 0);\n }\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = target.segments.length - 1 + modifier;\n return createPositionApplyingDoubleDots(target, index, nav.numberOfDoubleDots);\n}\nfunction createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent;\n if (!g) {\n throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, (typeof ngDevMode === 'undefined' || ngDevMode) && \"Invalid number of '../'\");\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\nfunction getOutlets(commands) {\n if (isCommandWithOutlets(commands[0])) {\n return commands[0].outlets;\n }\n return {\n [PRIMARY_OUTLET]: commands\n };\n}\nfunction updateSegmentGroup(segmentGroup, startIndex, commands) {\n segmentGroup ??= new UrlSegmentGroup([], {});\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] = new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n } else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n } else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n } else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\nfunction updateSegmentGroupChildren(segmentGroup, startIndex, commands) {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else {\n const outlets = getOutlets(commands);\n const children = {};\n // If the set of commands applies to anything other than the primary outlet and the child\n // segment is an empty path primary segment on its own, we want to apply the commands to the\n // empty child path rather than here. The outcome is that the empty primary child is effectively\n // removed from the final output UrlTree. Imagine the following config:\n //\n // {path: '', children: [{path: '**', outlet: 'popup'}]}.\n //\n // Navigation to /(popup:a) will activate the child outlet correctly Given a follow-up\n // navigation with commands\n // ['/', {outlets: {'popup': 'b'}}], we _would not_ want to apply the outlet commands to the\n // root segment because that would result in\n // //(popup:a)(popup:b) since the outlet command got applied one level above where it appears in\n // the `ActivatedRoute` rather than updating the existing one.\n //\n // Because empty paths do not appear in the URL segments and the fact that the segments used in\n // the output `UrlTree` are squashed to eliminate these empty paths where possible\n // https://github.com/angular/angular/blob/13f10de40e25c6900ca55bd83b36bd533dacfa9e/packages/router/src/url_tree.ts#L755\n // it can be hard to determine what is the right thing to do when applying commands to a\n // `UrlSegmentGroup` that is created from an \"unsquashed\"/expanded `ActivatedRoute` tree.\n // This code effectively \"squashes\" empty path primary routes when they have no siblings on\n // the same level of the tree.\n if (Object.keys(outlets).some(o => o !== PRIMARY_OUTLET) && segmentGroup.children[PRIMARY_OUTLET] && segmentGroup.numberOfChildren === 1 && segmentGroup.children[PRIMARY_OUTLET].segments.length === 0) {\n const childrenOfEmptyChild = updateSegmentGroupChildren(segmentGroup.children[PRIMARY_OUTLET], startIndex, commands);\n return new UrlSegmentGroup(segmentGroup.segments, childrenOfEmptyChild.children);\n }\n Object.entries(outlets).forEach(([outlet, commands]) => {\n if (typeof commands === 'string') {\n commands = [commands];\n }\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n Object.entries(segmentGroup.children).forEach(([childOutlet, child]) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\nfunction prefixedWith(segmentGroup, startIndex, commands) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n const noMatch = {\n match: false,\n pathIndex: 0,\n commandIndex: 0\n };\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length) return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const command = commands[currentCommandIndex];\n // Do not try to consume command as part of the prefixing if it has outlets because it can\n // contain outlets other than the one being processed. Consuming the outlets command would\n // result in other outlets being ignored.\n if (isCommandWithOutlets(command)) {\n break;\n }\n const curr = `${command}`;\n const next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n if (currentPathIndex > 0 && curr === undefined) break;\n if (curr && next && typeof next === 'object' && next.outlets === undefined) {\n if (!compare(curr, next, path)) return noMatch;\n currentCommandIndex += 2;\n } else {\n if (!compare(curr, {}, path)) return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n return {\n match: true,\n pathIndex: currentPathIndex,\n commandIndex: currentCommandIndex\n };\n}\nfunction createNewSegmentGroup(segmentGroup, startIndex, commands) {\n const paths = segmentGroup.segments.slice(0, startIndex);\n let i = 0;\n while (i < commands.length) {\n const command = commands[i];\n if (isCommandWithOutlets(command)) {\n const children = createNewSegmentChildren(command.outlets);\n return new UrlSegmentGroup(paths, children);\n }\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, stringify(commands[0])));\n i++;\n continue;\n }\n const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n const next = i < commands.length - 1 ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n } else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\nfunction createNewSegmentChildren(outlets) {\n const children = {};\n Object.entries(outlets).forEach(([outlet, commands]) => {\n if (typeof commands === 'string') {\n commands = [commands];\n }\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\nfunction stringify(params) {\n const res = {};\n Object.entries(params).forEach(([k, v]) => res[k] = `${v}`);\n return res;\n}\nfunction compare(path, params, segment) {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\nconst IMPERATIVE_NAVIGATION = 'imperative';\n/**\n * Identifies the type of a router event.\n *\n * @publicApi\n */\nvar EventType = /*#__PURE__*/function (EventType) {\n EventType[EventType[\"NavigationStart\"] = 0] = \"NavigationStart\";\n EventType[EventType[\"NavigationEnd\"] = 1] = \"NavigationEnd\";\n EventType[EventType[\"NavigationCancel\"] = 2] = \"NavigationCancel\";\n EventType[EventType[\"NavigationError\"] = 3] = \"NavigationError\";\n EventType[EventType[\"RoutesRecognized\"] = 4] = \"RoutesRecognized\";\n EventType[EventType[\"ResolveStart\"] = 5] = \"ResolveStart\";\n EventType[EventType[\"ResolveEnd\"] = 6] = \"ResolveEnd\";\n EventType[EventType[\"GuardsCheckStart\"] = 7] = \"GuardsCheckStart\";\n EventType[EventType[\"GuardsCheckEnd\"] = 8] = \"GuardsCheckEnd\";\n EventType[EventType[\"RouteConfigLoadStart\"] = 9] = \"RouteConfigLoadStart\";\n EventType[EventType[\"RouteConfigLoadEnd\"] = 10] = \"RouteConfigLoadEnd\";\n EventType[EventType[\"ChildActivationStart\"] = 11] = \"ChildActivationStart\";\n EventType[EventType[\"ChildActivationEnd\"] = 12] = \"ChildActivationEnd\";\n EventType[EventType[\"ActivationStart\"] = 13] = \"ActivationStart\";\n EventType[EventType[\"ActivationEnd\"] = 14] = \"ActivationEnd\";\n EventType[EventType[\"Scroll\"] = 15] = \"Scroll\";\n EventType[EventType[\"NavigationSkipped\"] = 16] = \"NavigationSkipped\";\n return EventType;\n}(EventType || {});\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n * constructor(public router: Router) {\n * router.events.pipe(\n * filter((e: Event | RouterEvent): e is RouterEvent => e instanceof RouterEvent)\n * ).subscribe((e: RouterEvent) => {\n * // Do something\n * });\n * }\n * }\n * ```\n *\n * @see {@link Event}\n * @see [Router events summary](guide/routing/router-reference#router-events)\n * @publicApi\n */\nclass RouterEvent {\n constructor( /** A unique ID that the router assigns to every router navigation. */\n id, /** The URL that is the destination for this navigation. */\n url) {\n this.id = id;\n this.url = url;\n }\n}\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nclass NavigationStart extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n navigationTrigger = 'imperative', /** @docsNotRequired */\n restoredState = null) {\n super(id, url);\n this.type = EventType.NavigationStart;\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n }\n}\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationCancel}\n * @see {@link NavigationError}\n *\n * @publicApi\n */\nclass NavigationEnd extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.type = EventType.NavigationEnd;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n/**\n * A code for the `NavigationCancel` event of the `Router` to indicate the\n * reason a navigation failed.\n *\n * @publicApi\n */\nvar NavigationCancellationCode = /*#__PURE__*/function (NavigationCancellationCode) {\n /**\n * A navigation failed because a guard returned a `UrlTree` to redirect.\n */\n NavigationCancellationCode[NavigationCancellationCode[\"Redirect\"] = 0] = \"Redirect\";\n /**\n * A navigation failed because a more recent navigation started.\n */\n NavigationCancellationCode[NavigationCancellationCode[\"SupersededByNewNavigation\"] = 1] = \"SupersededByNewNavigation\";\n /**\n * A navigation failed because one of the resolvers completed without emitting a value.\n */\n NavigationCancellationCode[NavigationCancellationCode[\"NoDataFromResolver\"] = 2] = \"NoDataFromResolver\";\n /**\n * A navigation failed because a guard returned `false`.\n */\n NavigationCancellationCode[NavigationCancellationCode[\"GuardRejected\"] = 3] = \"GuardRejected\";\n return NavigationCancellationCode;\n}(NavigationCancellationCode || {});\n/**\n * A code for the `NavigationSkipped` event of the `Router` to indicate the\n * reason a navigation was skipped.\n *\n * @publicApi\n */\nvar NavigationSkippedCode = /*#__PURE__*/function (NavigationSkippedCode) {\n /**\n * A navigation was skipped because the navigation URL was the same as the current Router URL.\n */\n NavigationSkippedCode[NavigationSkippedCode[\"IgnoredSameUrlNavigation\"] = 0] = \"IgnoredSameUrlNavigation\";\n /**\n * A navigation was skipped because the configured `UrlHandlingStrategy` return `false` for both\n * the current Router URL and the target of the navigation.\n *\n * @see {@link UrlHandlingStrategy}\n */\n NavigationSkippedCode[NavigationSkippedCode[\"IgnoredByUrlHandlingStrategy\"] = 1] = \"IgnoredByUrlHandlingStrategy\";\n return NavigationSkippedCode;\n}(NavigationSkippedCode || {});\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationEnd}\n * @see {@link NavigationError}\n *\n * @publicApi\n */\nclass NavigationCancel extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url,\n /**\n * A description of why the navigation was cancelled. For debug purposes only. Use `code`\n * instead for a stable cancellation reason that can be used in production.\n */\n reason,\n /**\n * A code to indicate why the navigation was canceled. This cancellation code is stable for\n * the reason and can be relied on whereas the `reason` string could change and should not be\n * used in production.\n */\n code) {\n super(id, url);\n this.reason = reason;\n this.code = code;\n this.type = EventType.NavigationCancel;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n }\n}\n/**\n * An event triggered when a navigation is skipped.\n * This can happen for a couple reasons including onSameUrlHandling\n * is set to `ignore` and the navigation URL is not different than the\n * current state.\n *\n * @publicApi\n */\nclass NavigationSkipped extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url,\n /**\n * A description of why the navigation was skipped. For debug purposes only. Use `code`\n * instead for a stable skipped reason that can be used in production.\n */\n reason,\n /**\n * A code to indicate why the navigation was skipped. This code is stable for\n * the reason and can be relied on whereas the `reason` string could change and should not be\n * used in production.\n */\n code) {\n super(id, url);\n this.reason = reason;\n this.code = code;\n this.type = EventType.NavigationSkipped;\n }\n}\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationEnd}\n * @see {@link NavigationCancel}\n *\n * @publicApi\n */\nclass NavigationError extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n error,\n /**\n * The target of the navigation when the error occurred.\n *\n * Note that this can be `undefined` because an error could have occurred before the\n * `RouterStateSnapshot` was created for the navigation.\n */\n target) {\n super(id, url);\n this.error = error;\n this.target = target;\n this.type = EventType.NavigationError;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nclass RoutesRecognized extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = EventType.RoutesRecognized;\n }\n /** @docsNotRequired */\n toString() {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see {@link GuardsCheckEnd}\n *\n * @publicApi\n */\nclass GuardsCheckStart extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = EventType.GuardsCheckStart;\n }\n toString() {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see {@link GuardsCheckStart}\n *\n * @publicApi\n */\nclass GuardsCheckEnd extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state, /** @docsNotRequired */\n shouldActivate) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.shouldActivate = shouldActivate;\n this.type = EventType.GuardsCheckEnd;\n }\n toString() {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see {@link ResolveEnd}\n *\n * @publicApi\n */\nclass ResolveStart extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = EventType.ResolveStart;\n }\n toString() {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ResolveEnd extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = EventType.ResolveEnd;\n }\n toString() {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see {@link RouteConfigLoadEnd}\n *\n * @publicApi\n */\nclass RouteConfigLoadStart {\n constructor( /** @docsNotRequired */\n route) {\n this.route = route;\n this.type = EventType.RouteConfigLoadStart;\n }\n toString() {\n return `RouteConfigLoadStart(path: ${this.route.path})`;\n }\n}\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see {@link RouteConfigLoadStart}\n *\n * @publicApi\n */\nclass RouteConfigLoadEnd {\n constructor( /** @docsNotRequired */\n route) {\n this.route = route;\n this.type = EventType.RouteConfigLoadEnd;\n }\n toString() {\n return `RouteConfigLoadEnd(path: ${this.route.path})`;\n }\n}\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see {@link ChildActivationEnd}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ChildActivationStart {\n constructor( /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = EventType.ChildActivationStart;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see {@link ChildActivationStart}\n * @see {@link ResolveStart}\n * @publicApi\n */\nclass ChildActivationEnd {\n constructor( /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = EventType.ChildActivationEnd;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see {@link ActivationEnd}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ActivationStart {\n constructor( /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = EventType.ActivationStart;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see {@link ActivationStart}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ActivationEnd {\n constructor( /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = EventType.ActivationEnd;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nclass Scroll {\n constructor( /** @docsNotRequired */\n routerEvent, /** @docsNotRequired */\n position, /** @docsNotRequired */\n anchor) {\n this.routerEvent = routerEvent;\n this.position = position;\n this.anchor = anchor;\n this.type = EventType.Scroll;\n }\n toString() {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\nclass BeforeActivateRoutes {}\nclass RedirectRequest {\n constructor(url, navigationBehaviorOptions) {\n this.url = url;\n this.navigationBehaviorOptions = navigationBehaviorOptions;\n }\n}\nfunction stringifyEvent(routerEvent) {\n switch (routerEvent.type) {\n case EventType.ActivationEnd:\n return `ActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.ActivationStart:\n return `ActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.ChildActivationEnd:\n return `ChildActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.ChildActivationStart:\n return `ChildActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.GuardsCheckEnd:\n return `GuardsCheckEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state}, shouldActivate: ${routerEvent.shouldActivate})`;\n case EventType.GuardsCheckStart:\n return `GuardsCheckStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.NavigationCancel:\n return `NavigationCancel(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case EventType.NavigationSkipped:\n return `NavigationSkipped(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case EventType.NavigationEnd:\n return `NavigationEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}')`;\n case EventType.NavigationError:\n return `NavigationError(id: ${routerEvent.id}, url: '${routerEvent.url}', error: ${routerEvent.error})`;\n case EventType.NavigationStart:\n return `NavigationStart(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case EventType.ResolveEnd:\n return `ResolveEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.ResolveStart:\n return `ResolveStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.RouteConfigLoadEnd:\n return `RouteConfigLoadEnd(path: ${routerEvent.route.path})`;\n case EventType.RouteConfigLoadStart:\n return `RouteConfigLoadStart(path: ${routerEvent.route.path})`;\n case EventType.RoutesRecognized:\n return `RoutesRecognized(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.Scroll:\n const pos = routerEvent.position ? `${routerEvent.position[0]}, ${routerEvent.position[1]}` : null;\n return `Scroll(anchor: '${routerEvent.anchor}', position: '${pos}')`;\n }\n}\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nclass OutletContext {\n constructor(injector) {\n this.injector = injector;\n this.outlet = null;\n this.route = null;\n this.children = new ChildrenOutletContexts(this.injector);\n this.attachRef = null;\n }\n}\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nlet ChildrenOutletContexts = /*#__PURE__*/(() => {\n class ChildrenOutletContexts {\n /** @nodoc */\n constructor(parentInjector) {\n this.parentInjector = parentInjector;\n // contexts for child outlets, by name.\n this.contexts = new Map();\n }\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName, outlet) {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName) {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n context.attachRef = null;\n }\n }\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated() {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n onOutletReAttached(contexts) {\n this.contexts = contexts;\n }\n getOrCreateContext(childName) {\n let context = this.getContext(childName);\n if (!context) {\n context = new OutletContext(this.parentInjector);\n this.contexts.set(childName, context);\n }\n return context;\n }\n getContext(childName) {\n return this.contexts.get(childName) || null;\n }\n static {\n this.ɵfac = function ChildrenOutletContexts_Factory(t) {\n return new (t || ChildrenOutletContexts)(i0.ɵɵinject(i0.EnvironmentInjector));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ChildrenOutletContexts,\n factory: ChildrenOutletContexts.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return ChildrenOutletContexts;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass Tree {\n constructor(root) {\n this._root = root;\n }\n get root() {\n return this._root.value;\n }\n /**\n * @internal\n */\n parent(t) {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n /**\n * @internal\n */\n children(t) {\n const n = findNode(t, this._root);\n return n ? n.children.map(t => t.value) : [];\n }\n /**\n * @internal\n */\n firstChild(t) {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n /**\n * @internal\n */\n siblings(t) {\n const p = findPath(t, this._root);\n if (p.length < 2) return [];\n const c = p[p.length - 2].children.map(c => c.value);\n return c.filter(cc => cc !== t);\n }\n /**\n * @internal\n */\n pathFromRoot(t) {\n return findPath(t, this._root).map(s => s.value);\n }\n}\n// DFS for the node matching the value\nfunction findNode(value, node) {\n if (value === node.value) return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node) return node;\n }\n return null;\n}\n// Return the path to the node with the given value using DFS\nfunction findPath(value, node) {\n if (value === node.value) return [node];\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n return [];\n}\nclass TreeNode {\n constructor(value, children) {\n this.value = value;\n this.children = children;\n }\n toString() {\n return `TreeNode(${this.value})`;\n }\n}\n// Return the list of T indexed by outlet name\nfunction nodeChildrenAsMap(node) {\n const map = {};\n if (node) {\n node.children.forEach(child => map[child.value.outlet] = child);\n }\n return map;\n}\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @see {@link ActivatedRoute}\n * @see [Getting route information](guide/routing/common-router-tasks#getting-route-information)\n *\n * @publicApi\n */\nclass RouterState extends Tree {\n /** @internal */\n constructor(root, /** The current snapshot of the router state */\n snapshot) {\n super(root);\n this.snapshot = snapshot;\n setRouterState(this, root);\n }\n toString() {\n return this.snapshot.toString();\n }\n}\nfunction createEmptyState(rootComponent) {\n const snapshot = createEmptyStateSnapshot(rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject('');\n const activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode(activated, []), snapshot);\n}\nfunction createEmptyStateSnapshot(rootComponent) {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, {});\n return new RouterStateSnapshot('', new TreeNode(activated, []));\n}\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n * header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/routing/common-router-tasks#getting-route-information)\n *\n * @publicApi\n */\nclass ActivatedRoute {\n /** @internal */\n constructor( /** @internal */\n urlSubject, /** @internal */\n paramsSubject, /** @internal */\n queryParamsSubject, /** @internal */\n fragmentSubject, /** @internal */\n dataSubject, /** The outlet name of the route, a constant. */\n outlet, /** The component of the route, a constant. */\n component, futureSnapshot) {\n this.urlSubject = urlSubject;\n this.paramsSubject = paramsSubject;\n this.queryParamsSubject = queryParamsSubject;\n this.fragmentSubject = fragmentSubject;\n this.dataSubject = dataSubject;\n this.outlet = outlet;\n this.component = component;\n this._futureSnapshot = futureSnapshot;\n this.title = this.dataSubject?.pipe(map(d => d[RouteTitleKey])) ?? of(undefined);\n // TODO(atscott): Verify that these can be changed to `.asObservable()` with TGP.\n this.url = urlSubject;\n this.params = paramsSubject;\n this.queryParams = queryParamsSubject;\n this.fragment = fragmentSubject;\n this.data = dataSubject;\n }\n /** The configuration used to match this route. */\n get routeConfig() {\n return this._futureSnapshot.routeConfig;\n }\n /** The root of the router state. */\n get root() {\n return this._routerState.root;\n }\n /** The parent of this route in the router state tree. */\n get parent() {\n return this._routerState.parent(this);\n }\n /** The first child of this route in the router state tree. */\n get firstChild() {\n return this._routerState.firstChild(this);\n }\n /** The children of this route in the router state tree. */\n get children() {\n return this._routerState.children(this);\n }\n /** The path from the root of the router state tree to this route. */\n get pathFromRoot() {\n return this._routerState.pathFromRoot(this);\n }\n /**\n * An Observable that contains a map of the required and optional parameters\n * specific to the route.\n * The map supports retrieving single and multiple values from the same parameter.\n */\n get paramMap() {\n this._paramMap ??= this.params.pipe(map(p => convertToParamMap(p)));\n return this._paramMap;\n }\n /**\n * An Observable that contains a map of the query parameters available to all routes.\n * The map supports retrieving single and multiple values from the query parameter.\n */\n get queryParamMap() {\n this._queryParamMap ??= this.queryParams.pipe(map(p => convertToParamMap(p)));\n return this._queryParamMap;\n }\n toString() {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n/**\n * Returns the inherited params, data, and resolve for a given route.\n *\n * By default, we do not inherit parent data unless the current route is path-less or the parent\n * route is component-less.\n */\nfunction getInherited(route, parent, paramsInheritanceStrategy = 'emptyOnly') {\n let inherited;\n const {\n routeConfig\n } = route;\n if (parent !== null && (paramsInheritanceStrategy === 'always' ||\n // inherit parent data if route is empty path\n routeConfig?.path === '' ||\n // inherit parent data if parent was componentless\n !parent.component && !parent.routeConfig?.loadComponent)) {\n inherited = {\n params: {\n ...parent.params,\n ...route.params\n },\n data: {\n ...parent.data,\n ...route.data\n },\n resolve: {\n // Snapshots are created with data inherited from parent and guards (i.e. canActivate) can\n // change data because it's not frozen...\n // This first line could be deleted chose to break/disallow mutating the `data` object in\n // guards.\n // Note that data from parents still override this mutated data so anyone relying on this\n // might be surprised that it doesn't work if parent data is inherited but otherwise does.\n ...route.data,\n // Ensure inherited resolved data overrides inherited static data\n ...parent.data,\n // static data from the current route overrides any inherited data\n ...routeConfig?.data,\n // resolved data from current route overrides everything\n ...route._resolvedData\n }\n };\n } else {\n inherited = {\n params: {\n ...route.params\n },\n data: {\n ...route.data\n },\n resolve: {\n ...route.data,\n ...(route._resolvedData ?? {})\n }\n };\n }\n if (routeConfig && hasStaticTitle(routeConfig)) {\n inherited.resolve[RouteTitleKey] = routeConfig.title;\n }\n return inherited;\n}\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass ActivatedRouteSnapshot {\n /** The resolved route title */\n get title() {\n // Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be\n // available at the time of class instantiation.\n return this.data?.[RouteTitleKey];\n }\n /** @internal */\n constructor( /** The URL segments matched by this route */\n url,\n /**\n * The matrix parameters scoped to this route.\n *\n * You can compute all params (or data) in the router state or to get params outside\n * of an activated component by traversing the `RouterState` tree as in the following\n * example:\n * ```\n * collectRouteParams(router: Router) {\n * let params = {};\n * let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n * while (stack.length > 0) {\n * const route = stack.pop()!;\n * params = {...params, ...route.params};\n * stack.push(...route.children);\n * }\n * return params;\n * }\n * ```\n */\n params, /** The query parameters shared by all the routes */\n queryParams, /** The URL fragment shared by all the routes */\n fragment, /** The static and resolved data of this route */\n data, /** The outlet name of the route */\n outlet, /** The component of the route */\n component, routeConfig, resolve) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this.routeConfig = routeConfig;\n this._resolve = resolve;\n }\n /** The root of the router state */\n get root() {\n return this._routerState.root;\n }\n /** The parent of this route in the router state tree */\n get parent() {\n return this._routerState.parent(this);\n }\n /** The first child of this route in the router state tree */\n get firstChild() {\n return this._routerState.firstChild(this);\n }\n /** The children of this route in the router state tree */\n get children() {\n return this._routerState.children(this);\n }\n /** The path from the root of the router state tree to this route */\n get pathFromRoot() {\n return this._routerState.pathFromRoot(this);\n }\n get paramMap() {\n this._paramMap ??= convertToParamMap(this.params);\n return this._paramMap;\n }\n get queryParamMap() {\n this._queryParamMap ??= convertToParamMap(this.queryParams);\n return this._queryParamMap;\n }\n toString() {\n const url = this.url.map(segment => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass RouterStateSnapshot extends Tree {\n /** @internal */\n constructor( /** The url from which this snapshot was created */\n url, root) {\n super(root);\n this.url = url;\n setRouterState(this, root);\n }\n toString() {\n return serializeNode(this._root);\n }\n}\nfunction setRouterState(state, node) {\n node.value._routerState = state;\n node.children.forEach(c => setRouterState(state, c));\n}\nfunction serializeNode(node) {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nfunction advanceActivatedRoute(route) {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n route.queryParamsSubject.next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n route.fragmentSubject.next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n route.paramsSubject.next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n route.urlSubject.next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n route.dataSubject.next(nextSnapshot.data);\n }\n } else {\n route.snapshot = route._futureSnapshot;\n // this is for resolved data\n route.dataSubject.next(route._futureSnapshot.data);\n }\n}\nfunction equalParamsAndUrlSegments(a, b) {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n return equalUrlParams && !parentsMismatch && (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));\n}\nfunction hasStaticTitle(config) {\n return typeof config.title === 'string' || config.title === null;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * \n * \n * \n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: , component: , outlet: }`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * deactivate event when a component is destroyed.\n * An attached event emits when the `RouteReuseStrategy` instructs the outlet to reattach the\n * subtree, and the detached event emits when the `RouteReuseStrategy` instructs the outlet to\n * detach the subtree.\n *\n * ```\n * \n * ```\n *\n * @see {@link RouterLink}\n * @see {@link Route}\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet RouterOutlet = /*#__PURE__*/(() => {\n class RouterOutlet {\n constructor() {\n this.activated = null;\n this._activatedRoute = null;\n /**\n * The name of the outlet\n *\n */\n this.name = PRIMARY_OUTLET;\n this.activateEvents = new EventEmitter();\n this.deactivateEvents = new EventEmitter();\n /**\n * Emits an attached component instance when the `RouteReuseStrategy` instructs to re-attach a\n * previously detached subtree.\n **/\n this.attachEvents = new EventEmitter();\n /**\n * Emits a detached component instance when the `RouteReuseStrategy` instructs to detach the\n * subtree.\n */\n this.detachEvents = new EventEmitter();\n this.parentContexts = inject(ChildrenOutletContexts);\n this.location = inject(ViewContainerRef);\n this.changeDetector = inject(ChangeDetectorRef);\n this.inputBinder = inject(INPUT_BINDER, {\n optional: true\n });\n /** @nodoc */\n this.supportsBindingToComponentInputs = true;\n }\n /** @internal */\n get activatedComponentRef() {\n return this.activated;\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (changes['name']) {\n const {\n firstChange,\n previousValue\n } = changes['name'];\n if (firstChange) {\n // The first change is handled by ngOnInit. Because ngOnChanges doesn't get called when no\n // input is set at all, we need to centrally handle the first change there.\n return;\n }\n // unregister with the old name\n if (this.isTrackedInParentContexts(previousValue)) {\n this.deactivate();\n this.parentContexts.onChildOutletDestroyed(previousValue);\n }\n // register the new name\n this.initializeOutletWithName();\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n // Ensure that the registered outlet is this one before removing it on the context.\n if (this.isTrackedInParentContexts(this.name)) {\n this.parentContexts.onChildOutletDestroyed(this.name);\n }\n this.inputBinder?.unsubscribeFromRouteData(this);\n }\n isTrackedInParentContexts(outletName) {\n return this.parentContexts.getContext(outletName)?.outlet === this;\n }\n /** @nodoc */\n ngOnInit() {\n this.initializeOutletWithName();\n }\n initializeOutletWithName() {\n this.parentContexts.onChildOutletCreated(this.name, this);\n if (this.activated) {\n return;\n }\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context?.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n } else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.injector);\n }\n }\n }\n get isActivated() {\n return !!this.activated;\n }\n /**\n * @returns The currently activated component instance.\n * @throws An error if the outlet is not activated.\n */\n get component() {\n if (!this.activated) throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');\n return this.activated.instance;\n }\n get activatedRoute() {\n if (!this.activated) throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');\n return this._activatedRoute;\n }\n get activatedRouteData() {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach() {\n if (!this.activated) throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n this.detachEvents.emit(cmp.instance);\n return cmp;\n }\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref, activatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n this.inputBinder?.bindActivatedRouteToOutletComponent(this);\n this.attachEvents.emit(ref.instance);\n }\n deactivate() {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n activateWith(activatedRoute, environmentInjector) {\n if (this.isActivated) {\n throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const location = this.location;\n const snapshot = activatedRoute.snapshot;\n const component = snapshot.component;\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, location.injector);\n this.activated = location.createComponent(component, {\n index: location.length,\n injector,\n environmentInjector: environmentInjector\n });\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.inputBinder?.bindActivatedRouteToOutletComponent(this);\n this.activateEvents.emit(this.activated.instance);\n }\n static {\n this.ɵfac = function RouterOutlet_Factory(t) {\n return new (t || RouterOutlet)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: RouterOutlet,\n selectors: [[\"router-outlet\"]],\n inputs: {\n name: \"name\"\n },\n outputs: {\n activateEvents: \"activate\",\n deactivateEvents: \"deactivate\",\n attachEvents: \"attach\",\n detachEvents: \"detach\"\n },\n exportAs: [\"outlet\"],\n standalone: true,\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return RouterOutlet;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass OutletInjector {\n /**\n * This injector has a special handing for the `ActivatedRoute` and\n * `ChildrenOutletContexts` tokens: it returns corresponding values for those\n * tokens dynamically. This behavior is different from the regular injector logic,\n * when we initialize and store a value, which is later returned for all inject\n * requests.\n *\n * In some cases (e.g. when using `@defer`), this dynamic behavior requires special\n * handling. This function allows to identify an instance of the `OutletInjector` and\n * create an instance of it without referring to the class itself (so this logic can\n * be invoked from the `core` package). This helps to retain dynamic behavior for the\n * mentioned tokens.\n *\n * Note: it's a temporary solution and we should explore how to support this case better.\n */\n __ngOutletInjector(parentInjector) {\n return new OutletInjector(this.route, this.childContexts, parentInjector);\n }\n constructor(route, childContexts, parent) {\n this.route = route;\n this.childContexts = childContexts;\n this.parent = parent;\n }\n get(token, notFoundValue) {\n if (token === ActivatedRoute) {\n return this.route;\n }\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n return this.parent.get(token, notFoundValue);\n }\n}\nconst INPUT_BINDER = /*#__PURE__*/new InjectionToken('');\n/**\n * Injectable used as a tree-shakable provider for opting in to binding router data to component\n * inputs.\n *\n * The RouterOutlet registers itself with this service when an `ActivatedRoute` is attached or\n * activated. When this happens, the service subscribes to the `ActivatedRoute` observables (params,\n * queryParams, data) and sets the inputs of the component using `ComponentRef.setInput`.\n * Importantly, when an input does not have an item in the route data with a matching key, this\n * input is set to `undefined`. If it were not done this way, the previous information would be\n * retained if the data got removed from the route (i.e. if a query parameter is removed).\n *\n * The `RouterOutlet` should unregister itself when destroyed via `unsubscribeFromRouteData` so that\n * the subscriptions are cleaned up.\n */\nlet RoutedComponentInputBinder = /*#__PURE__*/(() => {\n class RoutedComponentInputBinder {\n constructor() {\n this.outletDataSubscriptions = new Map();\n }\n bindActivatedRouteToOutletComponent(outlet) {\n this.unsubscribeFromRouteData(outlet);\n this.subscribeToRouteData(outlet);\n }\n unsubscribeFromRouteData(outlet) {\n this.outletDataSubscriptions.get(outlet)?.unsubscribe();\n this.outletDataSubscriptions.delete(outlet);\n }\n subscribeToRouteData(outlet) {\n const {\n activatedRoute\n } = outlet;\n const dataSubscription = combineLatest([activatedRoute.queryParams, activatedRoute.params, activatedRoute.data]).pipe(switchMap(([queryParams, params, data], index) => {\n data = {\n ...queryParams,\n ...params,\n ...data\n };\n // Get the first result from the data subscription synchronously so it's available to\n // the component as soon as possible (and doesn't require a second change detection).\n if (index === 0) {\n return of(data);\n }\n // Promise.resolve is used to avoid synchronously writing the wrong data when\n // two of the Observables in the `combineLatest` stream emit one after\n // another.\n return Promise.resolve(data);\n })).subscribe(data => {\n // Outlet may have been deactivated or changed names to be associated with a different\n // route\n if (!outlet.isActivated || !outlet.activatedComponentRef || outlet.activatedRoute !== activatedRoute || activatedRoute.component === null) {\n this.unsubscribeFromRouteData(outlet);\n return;\n }\n const mirror = reflectComponentType(activatedRoute.component);\n if (!mirror) {\n this.unsubscribeFromRouteData(outlet);\n return;\n }\n for (const {\n templateName\n } of mirror.inputs) {\n outlet.activatedComponentRef.setInput(templateName, data[templateName]);\n }\n });\n this.outletDataSubscriptions.set(outlet, dataSubscription);\n }\n static {\n this.ɵfac = function RoutedComponentInputBinder_Factory(t) {\n return new (t || RoutedComponentInputBinder)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: RoutedComponentInputBinder,\n factory: RoutedComponentInputBinder.ɵfac\n });\n }\n }\n return RoutedComponentInputBinder;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction createRouterState(routeReuseStrategy, curr, prevState) {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\nfunction createNode(routeReuseStrategy, curr, prevState) {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode(value, children);\n } else {\n if (routeReuseStrategy.shouldAttach(curr.value)) {\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle !== null) {\n const tree = detachedRouteHandle.route;\n tree.value._futureSnapshot = curr.value;\n tree.children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return tree;\n }\n }\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return new TreeNode(value, children);\n }\n}\nfunction createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n return curr.children.map(child => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\nfunction createActivatedRoute(c) {\n return new ActivatedRoute(new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams), new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n\n/**\n * Can be returned by a `Router` guard to instruct the `Router` to redirect rather than continue\n * processing the path of the in-flight navigation. The `redirectTo` indicates _where_ the new\n * navigation should go to and the optional `navigationBehaviorOptions` can provide more information\n * about _how_ to perform the navigation.\n *\n * ```ts\n * const route: Route = {\n * path: \"user/:userId\",\n * component: User,\n * canActivate: [\n * () => {\n * const router = inject(Router);\n * const authService = inject(AuthenticationService);\n *\n * if (!authService.isLoggedIn()) {\n * const loginPath = router.parseUrl(\"/login\");\n * return new RedirectCommand(loginPath, {\n * skipLocationChange: \"true\",\n * });\n * }\n *\n * return true;\n * },\n * ],\n * };\n * ```\n * @see [Routing guide](guide/routing/common-router-tasks#preventing-unauthorized-access)\n *\n * @publicApi\n */\nclass RedirectCommand {\n constructor(redirectTo, navigationBehaviorOptions) {\n this.redirectTo = redirectTo;\n this.navigationBehaviorOptions = navigationBehaviorOptions;\n }\n}\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\nfunction redirectingNavigationError(urlSerializer, redirect) {\n const {\n redirectTo,\n navigationBehaviorOptions\n } = isUrlTree(redirect) ? {\n redirectTo: redirect,\n navigationBehaviorOptions: undefined\n } : redirect;\n const error = navigationCancelingError(ngDevMode && `Redirecting to \"${urlSerializer.serialize(redirectTo)}\"`, NavigationCancellationCode.Redirect);\n error.url = redirectTo;\n error.navigationBehaviorOptions = navigationBehaviorOptions;\n return error;\n}\nfunction navigationCancelingError(message, code) {\n const error = new Error(`NavigationCancelingError: ${message || ''}`);\n error[NAVIGATION_CANCELING_ERROR] = true;\n error.cancellationCode = code;\n return error;\n}\nfunction isRedirectingNavigationCancelingError(error) {\n return isNavigationCancelingError(error) && isUrlTree(error.url);\n}\nfunction isNavigationCancelingError(error) {\n return !!error && error[NAVIGATION_CANCELING_ERROR];\n}\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\nlet ɵEmptyOutletComponent = /*#__PURE__*/(() => {\n class ɵEmptyOutletComponent {\n static {\n this.ɵfac = function ɵEmptyOutletComponent_Factory(t) {\n return new (t || ɵEmptyOutletComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ɵEmptyOutletComponent,\n selectors: [[\"ng-component\"]],\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n decls: 1,\n vars: 0,\n template: function _EmptyOutletComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"router-outlet\");\n }\n },\n dependencies: [RouterOutlet],\n encapsulation: 2\n });\n }\n }\n return ɵEmptyOutletComponent;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Creates an `EnvironmentInjector` if the `Route` has providers and one does not already exist\n * and returns the injector. Otherwise, if the `Route` does not have `providers`, returns the\n * `currentInjector`.\n *\n * @param route The route that might have providers\n * @param currentInjector The parent injector of the `Route`\n */\nfunction getOrCreateRouteInjectorIfNeeded(route, currentInjector) {\n if (route.providers && !route._injector) {\n route._injector = createEnvironmentInjector(route.providers, currentInjector, `Route: ${route.path}`);\n }\n return route._injector ?? currentInjector;\n}\nfunction getLoadedRoutes(route) {\n return route._loadedRoutes;\n}\nfunction getLoadedInjector(route) {\n return route._loadedInjector;\n}\nfunction getLoadedComponent(route) {\n return route._loadedComponent;\n}\nfunction getProvidersInjector(route) {\n return route._injector;\n}\nfunction validateConfig(config, parentPath = '', requireStandaloneComponents = false) {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route = config[i];\n const fullPath = getFullPath(parentPath, route);\n validateNode(route, fullPath, requireStandaloneComponents);\n }\n}\nfunction assertStandalone(fullPath, component) {\n if (component && ɵisNgModule(component)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` + `but it must be used with standalone components. Use 'loadChildren' instead.`);\n } else if (component && !isStandalone(component)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);\n }\n}\nfunction validateNode(route, fullPath, requireStandaloneComponents) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!route) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);\n }\n if (Array.isArray(route)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.redirectTo && !route.component && !route.loadComponent && !route.children && !route.loadChildren && route.outlet && route.outlet !== PRIMARY_OUTLET) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n }\n if (route.redirectTo && route.children) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && (route.component || route.loadComponent)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`);\n }\n if (route.component && route.loadComponent) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`);\n }\n if (route.redirectTo && route.canActivate) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` + `so canActivate will never be executed.`);\n }\n if (route.path && route.matcher) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.loadComponent && !route.children && !route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, loadComponent, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (requireStandaloneComponents) {\n assertStandalone(fullPath, route.component);\n }\n }\n if (route.children) {\n validateConfig(route.children, fullPath, requireStandaloneComponents);\n }\n}\nfunction getFullPath(parentPath, currentRoute) {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n } else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n } else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n } else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nfunction standardizeConfig(r) {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? {\n ...r,\n children\n } : {\n ...r\n };\n if (!c.component && !c.loadComponent && (children || c.loadChildren) && c.outlet && c.outlet !== PRIMARY_OUTLET) {\n c.component = ɵEmptyOutletComponent;\n }\n return c;\n}\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nfunction getOutlet(route) {\n return route.outlet || PRIMARY_OUTLET;\n}\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nfunction sortByMatchingOutlets(routes, outletName) {\n const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n return sortedConfig;\n}\n/**\n * Gets the first injector in the snapshot's parent tree.\n *\n * If the `Route` has a static list of providers, the returned injector will be the one created from\n * those. If it does not exist, the returned injector may come from the parents, which may be from a\n * loaded config or their static providers.\n *\n * Returns `null` if there is neither this nor any parents have a stored injector.\n *\n * Generally used for retrieving the injector to use for getting tokens for guards/resolvers and\n * also used for getting the correct injector to use for creating components.\n */\nfunction getClosestRouteInjector(snapshot) {\n if (!snapshot) return null;\n // If the current route has its own injector, which is created from the static providers on the\n // route itself, we should use that. Otherwise, we start at the parent since we do not want to\n // include the lazy loaded injector from this route.\n if (snapshot.routeConfig?._injector) {\n return snapshot.routeConfig._injector;\n }\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n // Note that the order here is important. `_loadedInjector` stored on the route with\n // `loadChildren: () => NgModule` so it applies to child routes with priority. The `_injector`\n // is created from the static providers on that parent route, so it applies to the children as\n // well, but only if there is no lazy loaded NgModuleRef injector.\n if (route?._loadedInjector) return route._loadedInjector;\n if (route?._injector) return route._injector;\n }\n return null;\n}\nlet warnedAboutUnsupportedInputBinding = false;\nconst activateRoutes = (rootContexts, routeReuseStrategy, forwardEvent, inputBindingEnabled) => map(t => {\n new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent, inputBindingEnabled).activate(rootContexts);\n return t;\n});\nclass ActivateRoutes {\n constructor(routeReuseStrategy, futureState, currState, forwardEvent, inputBindingEnabled) {\n this.routeReuseStrategy = routeReuseStrategy;\n this.futureState = futureState;\n this.currState = currState;\n this.forwardEvent = forwardEvent;\n this.inputBindingEnabled = inputBindingEnabled;\n }\n activate(parentContexts) {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n // De-activate the child route that are not re-used for the future state\n deactivateChildRoutes(futureNode, currNode, contexts) {\n const children = nodeChildrenAsMap(currNode);\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(futureChild => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n // De-activate the routes that will not be re-used\n Object.values(children).forEach(v => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n deactivateRoutes(futureNode, currNode, parentContext) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n } else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n deactivateRouteAndItsChildren(route, parentContexts) {\n // If there is no component, the Route is never attached to an outlet (because there is no\n // component to attach).\n if (route.value.component && this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n } else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n detachAndStoreRouteSubtree(route, parentContexts) {\n const context = parentContexts.getContext(route.value.outlet);\n const contexts = context && route.value.component ? context.children : parentContexts;\n const children = nodeChildrenAsMap(route);\n for (const treeNode of Object.values(children)) {\n this.deactivateRouteAndItsChildren(treeNode, contexts);\n }\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, {\n componentRef,\n route,\n contexts\n });\n }\n }\n deactivateRouteAndOutlet(route, parentContexts) {\n const context = parentContexts.getContext(route.value.outlet);\n // The context could be `null` if we are on a componentless route but there may still be\n // children that need deactivating.\n const contexts = context && route.value.component ? context.children : parentContexts;\n const children = nodeChildrenAsMap(route);\n for (const treeNode of Object.values(children)) {\n this.deactivateRouteAndItsChildren(treeNode, contexts);\n }\n if (context) {\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n // Clear the information about the attached component on the context but keep the reference to\n // the outlet. Clear even if outlet was not yet activated to avoid activating later with old\n // info\n context.attachRef = null;\n context.route = null;\n }\n }\n activateChildRoutes(futureNode, currNode, contexts) {\n const children = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n activateRoutes(futureNode, currNode, parentContexts) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n advanceActivatedRoute(future);\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n } else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored = this.routeReuseStrategy.retrieve(future.snapshot);\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRoute(stored.route.value);\n this.activateChildRoutes(futureNode, null, context.children);\n } else {\n const injector = getClosestRouteInjector(future.snapshot);\n context.attachRef = null;\n context.route = future;\n context.injector = injector ?? context.injector;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, context.injector);\n }\n this.activateChildRoutes(futureNode, null, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const context = parentContexts.getOrCreateContext(future.outlet);\n const outlet = context.outlet;\n if (outlet && this.inputBindingEnabled && !outlet.supportsBindingToComponentInputs && !warnedAboutUnsupportedInputBinding) {\n console.warn(`'withComponentInputBinding' feature is enabled but ` + `this application is using an outlet that may not support binding to component inputs.`);\n warnedAboutUnsupportedInputBinding = true;\n }\n }\n }\n}\nclass CanActivate {\n constructor(path) {\n this.path = path;\n this.route = this.path[this.path.length - 1];\n }\n}\nclass CanDeactivate {\n constructor(component, route) {\n this.component = component;\n this.route = route;\n }\n}\nfunction getAllRouteGuards(future, curr, parentContexts) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\nfunction getCanActivateChild(p) {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0) return null;\n return {\n node: p,\n guards: canActivateChild\n };\n}\nfunction getTokenOrFunctionIdentity(tokenOrFunction, injector) {\n const NOT_FOUND = Symbol();\n const result = injector.get(tokenOrFunction, NOT_FOUND);\n if (result === NOT_FOUND) {\n if (typeof tokenOrFunction === 'function' && !ɵisInjectable(tokenOrFunction)) {\n // We think the token is just a function so return it as-is\n return tokenOrFunction;\n } else {\n // This will throw the not found error\n return injector.get(tokenOrFunction);\n }\n }\n return result;\n}\nfunction getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n}) {\n const prevChildren = nodeChildrenAsMap(currNode);\n // Process the children of the future route\n futureNode.children.forEach(c => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n // Process any children left from the current route (not active for the future route)\n Object.entries(prevChildren).forEach(([k, v]) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks));\n return checks;\n}\nfunction getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n}) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n } else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n }\n } else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n return checks;\n}\nfunction shouldRunGuardsAndResolvers(curr, future, mode) {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) || !shallowEqual(curr.queryParams, future.queryParams);\n case 'always':\n return true;\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) || !shallowEqual(curr.queryParams, future.queryParams);\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\nfunction deactivateRouteAndItsChildren(route, context, checks) {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n Object.entries(children).forEach(([childName, node]) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n } else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n } else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n } else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n } else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n}\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nfunction isFunction(v) {\n return typeof v === 'function';\n}\nfunction isBoolean(v) {\n return typeof v === 'boolean';\n}\nfunction isCanLoad(guard) {\n return guard && isFunction(guard.canLoad);\n}\nfunction isCanActivate(guard) {\n return guard && isFunction(guard.canActivate);\n}\nfunction isCanActivateChild(guard) {\n return guard && isFunction(guard.canActivateChild);\n}\nfunction isCanDeactivate(guard) {\n return guard && isFunction(guard.canDeactivate);\n}\nfunction isCanMatch(guard) {\n return guard && isFunction(guard.canMatch);\n}\nfunction isEmptyError(e) {\n return e instanceof EmptyError || e?.name === 'EmptyError';\n}\nconst INITIAL_VALUE = /* @__PURE__ */Symbol('INITIAL_VALUE');\nfunction prioritizedGuardValue() {\n return switchMap(obs => {\n return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE)))).pipe(map(results => {\n for (const result of results) {\n if (result === true) {\n // If result is true, check the next one\n continue;\n } else if (result === INITIAL_VALUE) {\n // If guard has not finished, we need to stop processing.\n return INITIAL_VALUE;\n } else if (result === false || isRedirect(result)) {\n // Result finished and was not true. Return the result.\n // Note that we only allow false/UrlTree/RedirectCommand. Other values are considered invalid and\n // ignored.\n return result;\n }\n }\n // Everything resolved to true. Return true.\n return true;\n }), filter(item => item !== INITIAL_VALUE), take(1));\n });\n}\nfunction isRedirect(val) {\n return isUrlTree(val) || val instanceof RedirectCommand;\n}\nfunction checkGuards(injector, forwardEvent) {\n return mergeMap(t => {\n const {\n targetSnapshot,\n currentSnapshot,\n guards: {\n canActivateChecks,\n canDeactivateChecks\n }\n } = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of({\n ...t,\n guardsResult: true\n });\n }\n return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, injector).pipe(mergeMap(canDeactivate => {\n return canDeactivate && isBoolean(canDeactivate) ? runCanActivateChecks(targetSnapshot, canActivateChecks, injector, forwardEvent) : of(canDeactivate);\n }), map(guardsResult => ({\n ...t,\n guardsResult\n })));\n });\n}\nfunction runCanDeactivateChecks(checks, futureRSS, currRSS, injector) {\n return from(checks).pipe(mergeMap(check => runCanDeactivate(check.component, check.route, currRSS, futureRSS, injector)), first(result => {\n return result !== true;\n }, true));\n}\nfunction runCanActivateChecks(futureSnapshot, checks, injector, forwardEvent) {\n return from(checks).pipe(concatMap(check => {\n return concat(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, injector), runCanActivate(futureSnapshot, check.route, injector));\n }), first(result => {\n return result !== true;\n }, true));\n}\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of(true);\n}\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of(true);\n}\nfunction runCanActivate(futureRSS, futureARS, injector) {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0) return of(true);\n const canActivateObservables = canActivate.map(canActivate => {\n return defer(() => {\n const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n const guard = getTokenOrFunctionIdentity(canActivate, closestInjector);\n const guardVal = isCanActivate(guard) ? guard.canActivate(futureARS, futureRSS) : runInInjectionContext(closestInjector, () => guard(futureARS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n });\n return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanActivateChild(futureRSS, path, injector) {\n const futureARS = path[path.length - 1];\n const canActivateChildGuards = path.slice(0, path.length - 1).reverse().map(p => getCanActivateChild(p)).filter(_ => _ !== null);\n const canActivateChildGuardsMapped = canActivateChildGuards.map(d => {\n return defer(() => {\n const guardsMapped = d.guards.map(canActivateChild => {\n const closestInjector = getClosestRouteInjector(d.node) ?? injector;\n const guard = getTokenOrFunctionIdentity(canActivateChild, closestInjector);\n const guardVal = isCanActivateChild(guard) ? guard.canActivateChild(futureARS, futureRSS) : runInInjectionContext(closestInjector, () => guard(futureARS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n return of(guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\nfunction runCanDeactivate(component, currARS, currRSS, futureRSS, injector) {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0) return of(true);\n const canDeactivateObservables = canDeactivate.map(c => {\n const closestInjector = getClosestRouteInjector(currARS) ?? injector;\n const guard = getTokenOrFunctionIdentity(c, closestInjector);\n const guardVal = isCanDeactivate(guard) ? guard.canDeactivate(component, currARS, currRSS, futureRSS) : runInInjectionContext(closestInjector, () => guard(component, currARS, currRSS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanLoadGuards(injector, route, segments, urlSerializer) {\n const canLoad = route.canLoad;\n if (canLoad === undefined || canLoad.length === 0) {\n return of(true);\n }\n const canLoadObservables = canLoad.map(injectionToken => {\n const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n const guardVal = isCanLoad(guard) ? guard.canLoad(route, segments) : runInInjectionContext(injector, () => guard(route, segments));\n return wrapIntoObservable(guardVal);\n });\n return of(canLoadObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\nfunction redirectIfUrlTree(urlSerializer) {\n return pipe(tap(result => {\n if (typeof result === 'boolean') return;\n throw redirectingNavigationError(urlSerializer, result);\n }), map(result => result === true));\n}\nfunction runCanMatchGuards(injector, route, segments, urlSerializer) {\n const canMatch = route.canMatch;\n if (!canMatch || canMatch.length === 0) return of(true);\n const canMatchObservables = canMatch.map(injectionToken => {\n const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n const guardVal = isCanMatch(guard) ? guard.canMatch(route, segments) : runInInjectionContext(injector, () => guard(route, segments));\n return wrapIntoObservable(guardVal);\n });\n return of(canMatchObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\nclass NoMatch {\n constructor(segmentGroup) {\n this.segmentGroup = segmentGroup || null;\n }\n}\nclass AbsoluteRedirect extends Error {\n constructor(urlTree) {\n super();\n this.urlTree = urlTree;\n }\n}\nfunction noMatch$1(segmentGroup) {\n return throwError(new NoMatch(segmentGroup));\n}\nfunction absoluteRedirect(newTree) {\n return throwError(new AbsoluteRedirect(newTree));\n}\nfunction namedOutletsRedirect(redirectTo) {\n return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`));\n}\nfunction canLoadFails(route) {\n return throwError(navigationCancelingError((typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`, NavigationCancellationCode.GuardRejected));\n}\nclass ApplyRedirects {\n constructor(urlSerializer, urlTree) {\n this.urlSerializer = urlSerializer;\n this.urlTree = urlTree;\n }\n lineralizeSegments(route, urlTree) {\n let res = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of(res);\n }\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(`${route.redirectTo}`);\n }\n c = c.children[PRIMARY_OUTLET];\n }\n }\n applyRedirectCommands(segments, redirectTo, posParams, currentSnapshot, injector) {\n if (typeof redirectTo !== 'string') {\n const redirectToFn = redirectTo;\n const {\n queryParams,\n fragment,\n routeConfig,\n url,\n outlet,\n params,\n data,\n title\n } = currentSnapshot;\n const newRedirect = runInInjectionContext(injector, () => redirectToFn({\n params,\n data,\n queryParams,\n fragment,\n routeConfig,\n url,\n outlet,\n title\n }));\n if (newRedirect instanceof UrlTree) {\n throw new AbsoluteRedirect(newRedirect);\n }\n redirectTo = newRedirect;\n }\n const newTree = this.applyRedirectCreateUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n if (redirectTo[0] === '/') {\n throw new AbsoluteRedirect(newTree);\n }\n return newTree;\n }\n applyRedirectCreateUrlTree(redirectTo, urlTree, segments, posParams) {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n }\n createQueryParams(redirectToParams, actualParams) {\n const res = {};\n Object.entries(redirectToParams).forEach(([k, v]) => {\n const copySourceValue = typeof v === 'string' && v[0] === ':';\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n } else {\n res[k] = v;\n }\n });\n return res;\n }\n createSegmentGroup(redirectTo, group, segments, posParams) {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n let children = {};\n Object.entries(group.children).forEach(([name, child]) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n return new UrlSegmentGroup(updatedSegments, children);\n }\n createSegments(redirectTo, redirectToSegments, actualSegments, posParams) {\n return redirectToSegments.map(s => s.path[0] === ':' ? this.findPosParam(redirectTo, s, posParams) : this.findOrReturn(s, actualSegments));\n }\n findPosParam(redirectTo, redirectToUrlSegment, posParams) {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos) throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n return pos;\n }\n findOrReturn(redirectToUrlSegment, actualSegments) {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\n }\n}\nconst noMatch = {\n matched: false,\n consumedSegments: [],\n remainingSegments: [],\n parameters: {},\n positionalParamSegments: {}\n};\nfunction matchWithChecks(segmentGroup, route, segments, injector, urlSerializer) {\n const result = match(segmentGroup, route, segments);\n if (!result.matched) {\n return of(result);\n }\n // Only create the Route's `EnvironmentInjector` if it matches the attempted\n // navigation\n injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n return runCanMatchGuards(injector, route, segments, urlSerializer).pipe(map(v => v === true ? result : {\n ...noMatch\n }));\n}\nfunction match(segmentGroup, route, segments) {\n if (route.path === '**') {\n return createWildcardMatchResult(segments);\n }\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n return {\n ...noMatch\n };\n }\n return {\n matched: true,\n consumedSegments: [],\n remainingSegments: segments,\n parameters: {},\n positionalParamSegments: {}\n };\n }\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res) return {\n ...noMatch\n };\n const posParams = {};\n Object.entries(res.posParams ?? {}).forEach(([k, v]) => {\n posParams[k] = v.path;\n });\n const parameters = res.consumed.length > 0 ? {\n ...posParams,\n ...res.consumed[res.consumed.length - 1].parameters\n } : posParams;\n return {\n matched: true,\n consumedSegments: res.consumed,\n remainingSegments: segments.slice(res.consumed.length),\n // TODO(atscott): investigate combining parameters and positionalParamSegments\n parameters,\n positionalParamSegments: res.posParams ?? {}\n };\n}\nfunction createWildcardMatchResult(segments) {\n return {\n matched: true,\n parameters: segments.length > 0 ? last(segments).parameters : {},\n consumedSegments: segments,\n remainingSegments: [],\n positionalParamSegments: {}\n };\n}\nfunction split(segmentGroup, consumedSegments, slicedSegments, config) {\n if (slicedSegments.length > 0 && containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return {\n segmentGroup: s,\n slicedSegments: []\n };\n }\n if (slicedSegments.length === 0 && containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children));\n return {\n segmentGroup: s,\n slicedSegments\n };\n }\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n return {\n segmentGroup: s,\n slicedSegments\n };\n}\nfunction addEmptyPathsToChildrenIfNeeded(segmentGroup, slicedSegments, routes, children) {\n const res = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n res[getOutlet(r)] = s;\n }\n }\n return {\n ...children,\n ...res\n };\n}\nfunction createChildrenForEmptyPaths(routes, primarySegment) {\n const res = {};\n res[PRIMARY_OUTLET] = primarySegment;\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\nfunction containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\nfunction containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\nfunction emptyPathMatch(segmentGroup, slicedSegments, r) {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '';\n}\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nfunction isImmediateMatch(route, rawSegment, segments, outlet) {\n // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n // a config like\n // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n // or even\n // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n //\n // The exception here is when the segment outlet is for the primary outlet. This would\n // result in a match inside the named outlet because all children there are written as primary\n // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n // This should only match if the url is `/(x:b)`.\n if (getOutlet(route) !== outlet && (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n return false;\n }\n return match(rawSegment, route, segments).matched;\n}\nfunction noLeftoversInUrl(segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n}\n\n/**\n * Class used to indicate there were no additional route config matches but that all segments of\n * the URL were consumed during matching so the route was URL matched. When this happens, we still\n * try to match child configs in case there are empty path children.\n */\nclass NoLeftoversInUrl {}\nfunction recognize$1(injector, configLoader, rootComponentType, config, urlTree, urlSerializer, paramsInheritanceStrategy = 'emptyOnly') {\n return new Recognizer(injector, configLoader, rootComponentType, config, urlTree, paramsInheritanceStrategy, urlSerializer).recognize();\n}\nconst MAX_ALLOWED_REDIRECTS = 31;\nclass Recognizer {\n constructor(injector, configLoader, rootComponentType, config, urlTree, paramsInheritanceStrategy, urlSerializer) {\n this.injector = injector;\n this.configLoader = configLoader;\n this.rootComponentType = rootComponentType;\n this.config = config;\n this.urlTree = urlTree;\n this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n this.urlSerializer = urlSerializer;\n this.applyRedirects = new ApplyRedirects(this.urlSerializer, this.urlTree);\n this.absoluteRedirectCount = 0;\n this.allowRedirects = true;\n }\n noMatchError(e) {\n return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, typeof ngDevMode === 'undefined' || ngDevMode ? `Cannot match any routes. URL Segment: '${e.segmentGroup}'` : `'${e.segmentGroup}'`);\n }\n recognize() {\n const rootSegmentGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n return this.match(rootSegmentGroup).pipe(map(({\n children,\n rootSnapshot\n }) => {\n const rootNode = new TreeNode(rootSnapshot, children);\n const routeState = new RouterStateSnapshot('', rootNode);\n const tree = createUrlTreeFromSnapshot(rootSnapshot, [], this.urlTree.queryParams, this.urlTree.fragment);\n // https://github.com/angular/angular/issues/47307\n // Creating the tree stringifies the query params\n // We don't want to do this here so reassign them to the original.\n tree.queryParams = this.urlTree.queryParams;\n routeState.url = this.urlSerializer.serialize(tree);\n return {\n state: routeState,\n tree\n };\n }));\n }\n match(rootSegmentGroup) {\n // Use Object.freeze to prevent readers of the Router state from modifying it outside\n // of a navigation, resulting in the router being out of sync with the browser.\n const rootSnapshot = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze({\n ...this.urlTree.queryParams\n }), this.urlTree.fragment, Object.freeze({}), PRIMARY_OUTLET, this.rootComponentType, null, {});\n return this.processSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET, rootSnapshot).pipe(map(children => {\n return {\n children,\n rootSnapshot\n };\n }), catchError(e => {\n if (e instanceof AbsoluteRedirect) {\n this.urlTree = e.urlTree;\n return this.match(e.urlTree.root);\n }\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n throw e;\n }));\n }\n processSegmentGroup(injector, config, segmentGroup, outlet, parentRoute) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(injector, config, segmentGroup, parentRoute);\n }\n return this.processSegment(injector, config, segmentGroup, segmentGroup.segments, outlet, true, parentRoute).pipe(map(child => child instanceof TreeNode ? [child] : []));\n }\n /**\n * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n * we cannot find a match for _any_ of the children.\n *\n * @param config - The `Routes` to match against\n * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n * config.\n */\n processChildren(injector, config, segmentGroup, parentRoute) {\n // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n // because an absolute redirect from the primary outlet takes precedence.\n const childOutlets = [];\n for (const child of Object.keys(segmentGroup.children)) {\n if (child === 'primary') {\n childOutlets.unshift(child);\n } else {\n childOutlets.push(child);\n }\n }\n return from(childOutlets).pipe(concatMap(childOutlet => {\n const child = segmentGroup.children[childOutlet];\n // Sort the config so that routes with outlets that match the one being activated\n // appear first, followed by routes for other outlets, which might match if they have\n // an empty path.\n const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n return this.processSegmentGroup(injector, sortedConfig, child, childOutlet, parentRoute);\n }), scan((children, outletChildren) => {\n children.push(...outletChildren);\n return children;\n }), defaultIfEmpty(null), last$1(), mergeMap(children => {\n if (children === null) return noMatch$1(segmentGroup);\n // Because we may have matched two outlets to the same empty path segment, we can have\n // multiple activated results for the same outlet. We should merge the children of\n // these results so the final return value is only one `TreeNode` per outlet.\n const mergedChildren = mergeEmptyPathMatches(children);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // This should really never happen - we are only taking the first match for each\n // outlet and merge the empty path matches.\n checkOutletNameUniqueness(mergedChildren);\n }\n sortActivatedRouteSnapshots(mergedChildren);\n return of(mergedChildren);\n }));\n }\n processSegment(injector, routes, segmentGroup, segments, outlet, allowRedirects, parentRoute) {\n return from(routes).pipe(concatMap(r => {\n return this.processSegmentAgainstRoute(r._injector ?? injector, routes, r, segmentGroup, segments, outlet, allowRedirects, parentRoute).pipe(catchError(e => {\n if (e instanceof NoMatch) {\n return of(null);\n }\n throw e;\n }));\n }), first(x => !!x), catchError(e => {\n if (isEmptyError(e)) {\n if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of(new NoLeftoversInUrl());\n }\n return noMatch$1(segmentGroup);\n }\n throw e;\n }));\n }\n processSegmentAgainstRoute(injector, routes, route, rawSegment, segments, outlet, allowRedirects, parentRoute) {\n if (!isImmediateMatch(route, rawSegment, segments, outlet)) return noMatch$1(rawSegment);\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(injector, rawSegment, route, segments, outlet, parentRoute);\n }\n if (this.allowRedirects && allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(injector, rawSegment, routes, route, segments, outlet, parentRoute);\n }\n return noMatch$1(rawSegment);\n }\n expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet, parentRoute) {\n const {\n matched,\n parameters,\n consumedSegments,\n positionalParamSegments,\n remainingSegments\n } = match(segmentGroup, route, segments);\n if (!matched) return noMatch$1(segmentGroup);\n // TODO(atscott): Move all of this under an if(ngDevMode) as a breaking change and allow stack\n // size exceeded in production\n if (typeof route.redirectTo === 'string' && route.redirectTo[0] === '/') {\n this.absoluteRedirectCount++;\n if (this.absoluteRedirectCount > MAX_ALLOWED_REDIRECTS) {\n if (ngDevMode) {\n throw new ɵRuntimeError(4016 /* RuntimeErrorCode.INFINITE_REDIRECT */, `Detected possible infinite redirect when redirecting from '${this.urlTree}' to '${route.redirectTo}'.\\n` + `This is currently a dev mode only error but will become a` + ` call stack size exceeded error in production in a future major version.`);\n }\n this.allowRedirects = false;\n }\n }\n const currentSnapshot = new ActivatedRouteSnapshot(segments, parameters, Object.freeze({\n ...this.urlTree.queryParams\n }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getResolve(route));\n const inherited = getInherited(currentSnapshot, parentRoute, this.paramsInheritanceStrategy);\n currentSnapshot.params = Object.freeze(inherited.params);\n currentSnapshot.data = Object.freeze(inherited.data);\n const newTree = this.applyRedirects.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments, currentSnapshot, injector);\n return this.applyRedirects.lineralizeSegments(route, newTree).pipe(mergeMap(newSegments => {\n return this.processSegment(injector, routes, segmentGroup, newSegments.concat(remainingSegments), outlet, false, parentRoute);\n }));\n }\n matchSegmentAgainstRoute(injector, rawSegment, route, segments, outlet, parentRoute) {\n const matchResult = matchWithChecks(rawSegment, route, segments, injector, this.urlSerializer);\n if (route.path === '**') {\n // Prior versions of the route matching algorithm would stop matching at the wildcard route.\n // We should investigate a better strategy for any existing children. Otherwise, these\n // child segments are silently dropped from the navigation.\n // https://github.com/angular/angular/issues/40089\n rawSegment.children = {};\n }\n return matchResult.pipe(switchMap(result => {\n if (!result.matched) {\n return noMatch$1(rawSegment);\n }\n // If the route has an injector created from providers, we should start using that.\n injector = route._injector ?? injector;\n return this.getChildConfig(injector, route, segments).pipe(switchMap(({\n routes: childConfig\n }) => {\n const childInjector = route._loadedInjector ?? injector;\n const {\n parameters,\n consumedSegments,\n remainingSegments\n } = result;\n const snapshot = new ActivatedRouteSnapshot(consumedSegments, parameters, Object.freeze({\n ...this.urlTree.queryParams\n }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getResolve(route));\n const inherited = getInherited(snapshot, parentRoute, this.paramsInheritanceStrategy);\n snapshot.params = Object.freeze(inherited.params);\n snapshot.data = Object.freeze(inherited.data);\n const {\n segmentGroup,\n slicedSegments\n } = split(rawSegment, consumedSegments, remainingSegments, childConfig);\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(childInjector, childConfig, segmentGroup, snapshot).pipe(map(children => {\n return new TreeNode(snapshot, children);\n }));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of(new TreeNode(snapshot, []));\n }\n const matchedOnOutlet = getOutlet(route) === outlet;\n // If we matched a config due to empty path match on a different outlet, we need to\n // continue passing the current outlet for the segment rather than switch to PRIMARY.\n // Note that we switch to primary when we have a match because outlet configs look like\n // this: {path: 'a', outlet: 'a', children: [\n // {path: 'b', component: B},\n // {path: 'c', component: C},\n // ]}\n // Notice that the children of the named outlet are configured with the primary outlet\n return this.processSegment(childInjector, childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet, true, snapshot).pipe(map(child => {\n return new TreeNode(snapshot, child instanceof TreeNode ? [child] : []);\n }));\n }));\n }));\n }\n getChildConfig(injector, route, segments) {\n if (route.children) {\n // The children belong to the same module\n return of({\n routes: route.children,\n injector\n });\n }\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedRoutes !== undefined) {\n return of({\n routes: route._loadedRoutes,\n injector: route._loadedInjector\n });\n }\n return runCanLoadGuards(injector, route, segments, this.urlSerializer).pipe(mergeMap(shouldLoadResult => {\n if (shouldLoadResult) {\n return this.configLoader.loadChildren(injector, route).pipe(tap(cfg => {\n route._loadedRoutes = cfg.routes;\n route._loadedInjector = cfg.injector;\n }));\n }\n return canLoadFails(route);\n }));\n }\n return of({\n routes: [],\n injector\n });\n }\n}\nfunction sortActivatedRouteSnapshots(nodes) {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET) return -1;\n if (b.value.outlet === PRIMARY_OUTLET) return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\nfunction hasEmptyPathConfig(node) {\n const config = node.value.routeConfig;\n return config && config.path === '';\n}\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with\n * the children from each duplicate. This is necessary because different outlets can match a\n * single empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes) {\n const result = [];\n // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n const mergedNodes = new Set();\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n mergedNodes.add(duplicateEmptyPathNode);\n } else {\n result.push(node);\n }\n }\n // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n // by also merging those children. This is necessary when there are multiple empty path configs\n // in a row. Put another way: whenever we combine children of two nodes, we need to also check\n // if any of those children can be combined into a single node as well.\n for (const mergedNode of mergedNodes) {\n const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n result.push(new TreeNode(mergedNode.value, mergedChildren));\n }\n return result.filter(n => !mergedNodes.has(n));\n}\nfunction checkOutletNameUniqueness(nodes) {\n const names = {};\n nodes.forEach(n => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n const c = n.value.url.map(s => s.toString()).join('/');\n throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n }\n names[n.value.outlet] = n.value;\n });\n}\nfunction getData(route) {\n return route.data || {};\n}\nfunction getResolve(route) {\n return route.resolve || {};\n}\nfunction recognize(injector, configLoader, rootComponentType, config, serializer, paramsInheritanceStrategy) {\n return mergeMap(t => recognize$1(injector, configLoader, rootComponentType, config, t.extractedUrl, serializer, paramsInheritanceStrategy).pipe(map(({\n state: targetSnapshot,\n tree: urlAfterRedirects\n }) => {\n return {\n ...t,\n targetSnapshot,\n urlAfterRedirects\n };\n })));\n}\nfunction resolveData(paramsInheritanceStrategy, injector) {\n return mergeMap(t => {\n const {\n targetSnapshot,\n guards: {\n canActivateChecks\n }\n } = t;\n if (!canActivateChecks.length) {\n return of(t);\n }\n // Iterating a Set in javascript happens in insertion order so it is safe to use a `Set` to\n // preserve the correct order that the resolvers should run in.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#description\n const routesWithResolversToRun = new Set(canActivateChecks.map(check => check.route));\n const routesNeedingDataUpdates = new Set();\n for (const route of routesWithResolversToRun) {\n if (routesNeedingDataUpdates.has(route)) {\n continue;\n }\n // All children under the route with a resolver to run need to recompute inherited data.\n for (const newRoute of flattenRouteTree(route)) {\n routesNeedingDataUpdates.add(newRoute);\n }\n }\n let routesProcessed = 0;\n return from(routesNeedingDataUpdates).pipe(concatMap(route => {\n if (routesWithResolversToRun.has(route)) {\n return runResolve(route, targetSnapshot, paramsInheritanceStrategy, injector);\n } else {\n route.data = getInherited(route, route.parent, paramsInheritanceStrategy).resolve;\n return of(void 0);\n }\n }), tap(() => routesProcessed++), takeLast(1), mergeMap(_ => routesProcessed === routesNeedingDataUpdates.size ? of(t) : EMPTY));\n });\n}\n/**\n * Returns the `ActivatedRouteSnapshot` tree as an array, using DFS to traverse the route tree.\n */\nfunction flattenRouteTree(route) {\n const descendants = route.children.map(child => flattenRouteTree(child)).flat();\n return [route, ...descendants];\n}\nfunction runResolve(futureARS, futureRSS, paramsInheritanceStrategy, injector) {\n const config = futureARS.routeConfig;\n const resolve = futureARS._resolve;\n if (config?.title !== undefined && !hasStaticTitle(config)) {\n resolve[RouteTitleKey] = config.title;\n }\n return resolveNode(resolve, futureARS, futureRSS, injector).pipe(map(resolvedData => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = getInherited(futureARS, futureARS.parent, paramsInheritanceStrategy).resolve;\n return null;\n }));\n}\nfunction resolveNode(resolve, futureARS, futureRSS, injector) {\n const keys = getDataKeys(resolve);\n if (keys.length === 0) {\n return of({});\n }\n const data = {};\n return from(keys).pipe(mergeMap(key => getResolver(resolve[key], futureARS, futureRSS, injector).pipe(first(), tap(value => {\n if (value instanceof RedirectCommand) {\n throw redirectingNavigationError(new DefaultUrlSerializer(), value);\n }\n data[key] = value;\n }))), takeLast(1), mapTo(data), catchError(e => isEmptyError(e) ? EMPTY : throwError(e)));\n}\nfunction getResolver(injectionToken, futureARS, futureRSS, injector) {\n const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n const resolver = getTokenOrFunctionIdentity(injectionToken, closestInjector);\n const resolverValue = resolver.resolve ? resolver.resolve(futureARS, futureRSS) : runInInjectionContext(closestInjector, () => resolver(futureARS, futureRSS));\n return wrapIntoObservable(resolverValue);\n}\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nfunction switchTap(next) {\n return switchMap(v => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return of(v);\n });\n}\n\n/**\n * Provides a strategy for setting the page title after a router navigation.\n *\n * The built-in implementation traverses the router state snapshot and finds the deepest primary\n * outlet with `title` property. Given the `Routes` below, navigating to\n * `/base/child(popup:aux)` would result in the document title being set to \"child\".\n * ```\n * [\n * {path: 'base', title: 'base', children: [\n * {path: 'child', title: 'child'},\n * ],\n * {path: 'aux', outlet: 'popup', title: 'popupTitle'}\n * ]\n * ```\n *\n * This class can be used as a base class for custom title strategies. That is, you can create your\n * own class that extends the `TitleStrategy`. Note that in the above example, the `title`\n * from the named outlet is never used. However, a custom strategy might be implemented to\n * incorporate titles in named outlets.\n *\n * @publicApi\n * @see [Page title guide](guide/routing/common-router-tasks#setting-the-page-title)\n */\nlet TitleStrategy = /*#__PURE__*/(() => {\n class TitleStrategy {\n /**\n * @returns The `title` of the deepest primary route.\n */\n buildTitle(snapshot) {\n let pageTitle;\n let route = snapshot.root;\n while (route !== undefined) {\n pageTitle = this.getResolvedTitleForRoute(route) ?? pageTitle;\n route = route.children.find(child => child.outlet === PRIMARY_OUTLET);\n }\n return pageTitle;\n }\n /**\n * Given an `ActivatedRouteSnapshot`, returns the final value of the\n * `Route.title` property, which can either be a static string or a resolved value.\n */\n getResolvedTitleForRoute(snapshot) {\n return snapshot.data[RouteTitleKey];\n }\n static {\n this.ɵfac = function TitleStrategy_Factory(t) {\n return new (t || TitleStrategy)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TitleStrategy,\n factory: () => (() => inject(DefaultTitleStrategy))(),\n providedIn: 'root'\n });\n }\n }\n return TitleStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * The default `TitleStrategy` used by the router that updates the title using the `Title` service.\n */\nlet DefaultTitleStrategy = /*#__PURE__*/(() => {\n class DefaultTitleStrategy extends TitleStrategy {\n constructor(title) {\n super();\n this.title = title;\n }\n /**\n * Sets the title of the browser to the given value.\n *\n * @param title The `pageTitle` from the deepest primary route.\n */\n updateTitle(snapshot) {\n const title = this.buildTitle(snapshot);\n if (title !== undefined) {\n this.title.setTitle(title);\n }\n }\n static {\n this.ɵfac = function DefaultTitleStrategy_Factory(t) {\n return new (t || DefaultTitleStrategy)(i0.ɵɵinject(i1.Title));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DefaultTitleStrategy,\n factory: DefaultTitleStrategy.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DefaultTitleStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * A DI token for the router service.\n *\n * @publicApi\n */\nconst ROUTER_CONFIGURATION = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'router config' : '', {\n providedIn: 'root',\n factory: () => ({})\n});\n\n/**\n * The DI token for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `provideRouter`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nconst ROUTES = /*#__PURE__*/new InjectionToken(ngDevMode ? 'ROUTES' : '');\nlet RouterConfigLoader = /*#__PURE__*/(() => {\n class RouterConfigLoader {\n constructor() {\n this.componentLoaders = new WeakMap();\n this.childrenLoaders = new WeakMap();\n this.compiler = inject(Compiler);\n }\n loadComponent(route) {\n if (this.componentLoaders.get(route)) {\n return this.componentLoaders.get(route);\n } else if (route._loadedComponent) {\n return of(route._loadedComponent);\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const loadRunner = wrapIntoObservable(route.loadComponent()).pipe(map(maybeUnwrapDefaultExport), tap(component => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n (typeof ngDevMode === 'undefined' || ngDevMode) && assertStandalone(route.path ?? '', component);\n route._loadedComponent = component;\n }), finalize(() => {\n this.componentLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n this.componentLoaders.set(route, loader);\n return loader;\n }\n loadChildren(parentInjector, route) {\n if (this.childrenLoaders.get(route)) {\n return this.childrenLoaders.get(route);\n } else if (route._loadedRoutes) {\n return of({\n routes: route._loadedRoutes,\n injector: route._loadedInjector\n });\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const moduleFactoryOrRoutes$ = loadChildren(route, this.compiler, parentInjector, this.onLoadEndListener);\n const loadRunner = moduleFactoryOrRoutes$.pipe(finalize(() => {\n this.childrenLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n this.childrenLoaders.set(route, loader);\n return loader;\n }\n static {\n this.ɵfac = function RouterConfigLoader_Factory(t) {\n return new (t || RouterConfigLoader)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: RouterConfigLoader,\n factory: RouterConfigLoader.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return RouterConfigLoader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Executes a `route.loadChildren` callback and converts the result to an array of child routes and\n * an injector if that callback returned a module.\n *\n * This function is used for the route discovery during prerendering\n * in @angular-devkit/build-angular. If there are any updates to the contract here, it will require\n * an update to the extractor.\n */\nfunction loadChildren(route, compiler, parentInjector, onLoadEndListener) {\n return wrapIntoObservable(route.loadChildren()).pipe(map(maybeUnwrapDefaultExport), mergeMap(t => {\n if (t instanceof NgModuleFactory || Array.isArray(t)) {\n return of(t);\n } else {\n return from(compiler.compileModuleAsync(t));\n }\n }), map(factoryOrRoutes => {\n if (onLoadEndListener) {\n onLoadEndListener(route);\n }\n // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is\n // no injector associated with lazy loading a `Route` array.\n let injector;\n let rawRoutes;\n let requireStandaloneComponents = false;\n if (Array.isArray(factoryOrRoutes)) {\n rawRoutes = factoryOrRoutes;\n requireStandaloneComponents = true;\n } else {\n injector = factoryOrRoutes.create(parentInjector).injector;\n // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n // will get stuck in an infinite loop. The child module's Injector will look to\n // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n // for it's parent module instead.\n rawRoutes = injector.get(ROUTES, [], {\n optional: true,\n self: true\n }).flat();\n }\n const routes = rawRoutes.map(standardizeConfig);\n (typeof ngDevMode === 'undefined' || ngDevMode) && validateConfig(routes, route.path, requireStandaloneComponents);\n return {\n routes,\n injector\n };\n }));\n}\nfunction isWrappedDefaultExport(value) {\n // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be\n // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that\n // `default` will be a renamed property.\n return value && typeof value === 'object' && 'default' in value;\n}\nfunction maybeUnwrapDefaultExport(input) {\n // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not\n // subject to property renaming, so we reference it with bracket access.\n return isWrappedDefaultExport(input) ? input['default'] : input;\n}\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nlet UrlHandlingStrategy = /*#__PURE__*/(() => {\n class UrlHandlingStrategy {\n static {\n this.ɵfac = function UrlHandlingStrategy_Factory(t) {\n return new (t || UrlHandlingStrategy)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: UrlHandlingStrategy,\n factory: () => (() => inject(DefaultUrlHandlingStrategy))(),\n providedIn: 'root'\n });\n }\n }\n return UrlHandlingStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @publicApi\n */\nlet DefaultUrlHandlingStrategy = /*#__PURE__*/(() => {\n class DefaultUrlHandlingStrategy {\n shouldProcessUrl(url) {\n return true;\n }\n extract(url) {\n return url;\n }\n merge(newUrlPart, wholeUrl) {\n return newUrlPart;\n }\n static {\n this.ɵfac = function DefaultUrlHandlingStrategy_Factory(t) {\n return new (t || DefaultUrlHandlingStrategy)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DefaultUrlHandlingStrategy,\n factory: DefaultUrlHandlingStrategy.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DefaultUrlHandlingStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/// \nconst CREATE_VIEW_TRANSITION = /*#__PURE__*/new InjectionToken(ngDevMode ? 'view transition helper' : '');\nconst VIEW_TRANSITION_OPTIONS = /*#__PURE__*/new InjectionToken(ngDevMode ? 'view transition options' : '');\n/**\n * A helper function for using browser view transitions. This function skips the call to\n * `startViewTransition` if the browser does not support it.\n *\n * @returns A Promise that resolves when the view transition callback begins.\n */\nfunction createViewTransition(injector, from, to) {\n const transitionOptions = injector.get(VIEW_TRANSITION_OPTIONS);\n const document = injector.get(DOCUMENT);\n // Create promises outside the Angular zone to avoid causing extra change detections\n return injector.get(NgZone).runOutsideAngular(() => {\n if (!document.startViewTransition || transitionOptions.skipNextTransition) {\n transitionOptions.skipNextTransition = false;\n // The timing of `startViewTransition` is closer to a macrotask. It won't be called\n // until the current event loop exits so we use a promise resolved in a timeout instead\n // of Promise.resolve().\n return new Promise(resolve => setTimeout(resolve));\n }\n let resolveViewTransitionStarted;\n const viewTransitionStarted = new Promise(resolve => {\n resolveViewTransitionStarted = resolve;\n });\n const transition = document.startViewTransition(() => {\n resolveViewTransitionStarted();\n // We don't actually update dom within the transition callback. The resolving of the above\n // promise unblocks the Router navigation, which synchronously activates and deactivates\n // routes (the DOM update). This view transition waits for the next change detection to\n // complete (below), which includes the update phase of the routed components.\n return createRenderPromise(injector);\n });\n const {\n onViewTransitionCreated\n } = transitionOptions;\n if (onViewTransitionCreated) {\n runInInjectionContext(injector, () => onViewTransitionCreated({\n transition,\n from,\n to\n }));\n }\n return viewTransitionStarted;\n });\n}\n/**\n * Creates a promise that resolves after next render.\n */\nfunction createRenderPromise(injector) {\n return new Promise(resolve => {\n // Wait for the microtask queue to empty after the next render happens (by waiting a macrotask).\n // This ensures any follow-up renders in the microtask queue are completed before the\n // view transition starts animating.\n afterNextRender(() => setTimeout(resolve), {\n injector,\n phase: AfterRenderPhase.Read\n });\n });\n}\nconst NAVIGATION_ERROR_HANDLER = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'navigation error handler' : '');\nlet NavigationTransitions = /*#__PURE__*/(() => {\n class NavigationTransitions {\n get hasRequestedNavigation() {\n return this.navigationId !== 0;\n }\n constructor() {\n this.currentNavigation = null;\n this.currentTransition = null;\n this.lastSuccessfulNavigation = null;\n /**\n * These events are used to communicate back to the Router about the state of the transition. The\n * Router wants to respond to these events in various ways. Because the `NavigationTransition`\n * class is not public, this event subject is not publicly exposed.\n */\n this.events = new Subject();\n /**\n * Used to abort the current transition with an error.\n */\n this.transitionAbortSubject = new Subject();\n this.configLoader = inject(RouterConfigLoader);\n this.environmentInjector = inject(EnvironmentInjector);\n this.urlSerializer = inject(UrlSerializer);\n this.rootContexts = inject(ChildrenOutletContexts);\n this.location = inject(Location);\n this.inputBindingEnabled = inject(INPUT_BINDER, {\n optional: true\n }) !== null;\n this.titleStrategy = inject(TitleStrategy);\n this.options = inject(ROUTER_CONFIGURATION, {\n optional: true\n }) || {};\n this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';\n this.urlHandlingStrategy = inject(UrlHandlingStrategy);\n this.createViewTransition = inject(CREATE_VIEW_TRANSITION, {\n optional: true\n });\n this.navigationErrorHandler = inject(NAVIGATION_ERROR_HANDLER, {\n optional: true\n });\n this.navigationId = 0;\n /**\n * Hook that enables you to pause navigation after the preactivation phase.\n * Used by `RouterModule`.\n *\n * @internal\n */\n this.afterPreactivation = () => of(void 0);\n /** @internal */\n this.rootComponentType = null;\n const onLoadStart = r => this.events.next(new RouteConfigLoadStart(r));\n const onLoadEnd = r => this.events.next(new RouteConfigLoadEnd(r));\n this.configLoader.onLoadEndListener = onLoadEnd;\n this.configLoader.onLoadStartListener = onLoadStart;\n }\n complete() {\n this.transitions?.complete();\n }\n handleNavigationRequest(request) {\n const id = ++this.navigationId;\n this.transitions?.next({\n ...this.transitions.value,\n ...request,\n id\n });\n }\n setupNavigations(router, initialUrlTree, initialRouterState) {\n this.transitions = new BehaviorSubject({\n id: 0,\n currentUrlTree: initialUrlTree,\n currentRawUrl: initialUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(initialUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(initialUrlTree),\n rawUrl: initialUrlTree,\n extras: {},\n resolve: () => {},\n reject: () => {},\n promise: Promise.resolve(true),\n source: IMPERATIVE_NAVIGATION,\n restoredState: null,\n currentSnapshot: initialRouterState.snapshot,\n targetSnapshot: null,\n currentRouterState: initialRouterState,\n targetRouterState: null,\n guards: {\n canActivateChecks: [],\n canDeactivateChecks: []\n },\n guardsResult: null\n });\n return this.transitions.pipe(filter(t => t.id !== 0),\n // Extract URL\n map(t => ({\n ...t,\n extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)\n })),\n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(overallTransitionState => {\n let completed = false;\n let errored = false;\n return of(overallTransitionState).pipe(switchMap(t => {\n // It is possible that `switchMap` fails to cancel previous navigations if a new one happens synchronously while the operator\n // is processing the `next` notification of that previous navigation. This can happen when a new navigation (say 2) cancels a\n // previous one (1) and yet another navigation (3) happens synchronously in response to the `NavigationCancel` event for (1).\n // https://github.com/ReactiveX/rxjs/issues/7455\n if (this.navigationId > overallTransitionState.id) {\n const cancellationReason = typeof ngDevMode === 'undefined' || ngDevMode ? `Navigation ID ${overallTransitionState.id} is not equal to the current navigation id ${this.navigationId}` : '';\n this.cancelNavigationTransition(overallTransitionState, cancellationReason, NavigationCancellationCode.SupersededByNewNavigation);\n return EMPTY;\n }\n this.currentTransition = overallTransitionState;\n // Store the Navigation object\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.rawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: !this.lastSuccessfulNavigation ? null : {\n ...this.lastSuccessfulNavigation,\n previousNavigation: null\n }\n };\n const urlTransition = !router.navigated || this.isUpdatingInternalState() || this.isUpdatedBrowserUrl();\n const onSameUrlNavigation = t.extras.onSameUrlNavigation ?? router.onSameUrlNavigation;\n if (!urlTransition && onSameUrlNavigation !== 'reload') {\n const reason = typeof ngDevMode === 'undefined' || ngDevMode ? `Navigation to ${t.rawUrl} was ignored because it is the same as the current Router URL.` : '';\n this.events.next(new NavigationSkipped(t.id, this.urlSerializer.serialize(t.rawUrl), reason, NavigationSkippedCode.IgnoredSameUrlNavigation));\n t.resolve(false);\n return EMPTY;\n }\n if (this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {\n return of(t).pipe(\n // Fire NavigationStart event\n switchMap(t => {\n const transition = this.transitions?.getValue();\n this.events.next(new NavigationStart(t.id, this.urlSerializer.serialize(t.extractedUrl), t.source, t.restoredState));\n if (transition !== this.transitions?.getValue()) {\n return EMPTY;\n }\n // This delay is required to match old behavior that forced\n // navigation to always be async\n return Promise.resolve(t);\n }),\n // Recognize\n recognize(this.environmentInjector, this.configLoader, this.rootComponentType, router.config, this.urlSerializer, this.paramsInheritanceStrategy),\n // Update URL if in `eager` update mode\n tap(t => {\n overallTransitionState.targetSnapshot = t.targetSnapshot;\n overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;\n this.currentNavigation = {\n ...this.currentNavigation,\n finalUrl: t.urlAfterRedirects\n };\n // Fire RoutesRecognized\n const routesRecognized = new RoutesRecognized(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(routesRecognized);\n }));\n } else if (urlTransition && this.urlHandlingStrategy.shouldProcessUrl(t.currentRawUrl)) {\n /* When the current URL shouldn't be processed, but the previous one\n * was, we handle this \"error condition\" by navigating to the\n * previously successful URL, but leaving the URL intact.*/\n const {\n id,\n extractedUrl,\n source,\n restoredState,\n extras\n } = t;\n const navStart = new NavigationStart(id, this.urlSerializer.serialize(extractedUrl), source, restoredState);\n this.events.next(navStart);\n const targetSnapshot = createEmptyState(this.rootComponentType).snapshot;\n this.currentTransition = overallTransitionState = {\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: {\n ...extras,\n skipLocationChange: false,\n replaceUrl: false\n }\n };\n this.currentNavigation.finalUrl = extractedUrl;\n return of(overallTransitionState);\n } else {\n /* When neither the current or previous URL can be processed, do\n * nothing other than update router's internal reference to the\n * current \"settled\" URL. This way the next navigation will be coming\n * from the current URL in the browser.\n */\n const reason = typeof ngDevMode === 'undefined' || ngDevMode ? `Navigation was ignored because the UrlHandlingStrategy` + ` indicated neither the current URL ${t.currentRawUrl} nor target URL ${t.rawUrl} should be processed.` : '';\n this.events.next(new NavigationSkipped(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, NavigationSkippedCode.IgnoredByUrlHandlingStrategy));\n t.resolve(false);\n return EMPTY;\n }\n }),\n // --- GUARDS ---\n tap(t => {\n const guardsStart = new GuardsCheckStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(guardsStart);\n }), map(t => {\n this.currentTransition = overallTransitionState = {\n ...t,\n guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts)\n };\n return overallTransitionState;\n }), checkGuards(this.environmentInjector, evt => this.events.next(evt)), tap(t => {\n overallTransitionState.guardsResult = t.guardsResult;\n if (t.guardsResult && typeof t.guardsResult !== 'boolean') {\n throw redirectingNavigationError(this.urlSerializer, t.guardsResult);\n }\n const guardsEnd = new GuardsCheckEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);\n this.events.next(guardsEnd);\n }), filter(t => {\n if (!t.guardsResult) {\n this.cancelNavigationTransition(t, '', NavigationCancellationCode.GuardRejected);\n return false;\n }\n return true;\n }),\n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of(t).pipe(tap(t => {\n const resolveStart = new ResolveStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(resolveStart);\n }), switchMap(t => {\n let dataResolved = false;\n return of(t).pipe(resolveData(this.paramsInheritanceStrategy, this.environmentInjector), tap({\n next: () => dataResolved = true,\n complete: () => {\n if (!dataResolved) {\n this.cancelNavigationTransition(t, typeof ngDevMode === 'undefined' || ngDevMode ? `At least one route resolver didn't emit any value.` : '', NavigationCancellationCode.NoDataFromResolver);\n }\n }\n }));\n }), tap(t => {\n const resolveEnd = new ResolveEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(resolveEnd);\n }));\n }\n return undefined;\n }),\n // --- LOAD COMPONENTS ---\n switchTap(t => {\n const loadComponents = route => {\n const loaders = [];\n if (route.routeConfig?.loadComponent && !route.routeConfig._loadedComponent) {\n loaders.push(this.configLoader.loadComponent(route.routeConfig).pipe(tap(loadedComponent => {\n route.component = loadedComponent;\n }), map(() => void 0)));\n }\n for (const child of route.children) {\n loaders.push(...loadComponents(child));\n }\n return loaders;\n };\n return combineLatest(loadComponents(t.targetSnapshot.root)).pipe(defaultIfEmpty(null), take(1));\n }), switchTap(() => this.afterPreactivation()), switchMap(() => {\n const {\n currentSnapshot,\n targetSnapshot\n } = overallTransitionState;\n const viewTransitionStarted = this.createViewTransition?.(this.environmentInjector, currentSnapshot.root, targetSnapshot.root);\n // If view transitions are enabled, block the navigation until the view\n // transition callback starts. Otherwise, continue immediately.\n return viewTransitionStarted ? from(viewTransitionStarted).pipe(map(() => overallTransitionState)) : of(overallTransitionState);\n }), map(t => {\n const targetRouterState = createRouterState(router.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n this.currentTransition = overallTransitionState = {\n ...t,\n targetRouterState\n };\n this.currentNavigation.targetRouterState = targetRouterState;\n return overallTransitionState;\n }), tap(() => {\n this.events.next(new BeforeActivateRoutes());\n }), activateRoutes(this.rootContexts, router.routeReuseStrategy, evt => this.events.next(evt), this.inputBindingEnabled),\n // Ensure that if some observable used to drive the transition doesn't\n // complete, the navigation still finalizes This should never happen, but\n // this is done as a safety measure to avoid surfacing this error (#49567).\n take(1), tap({\n next: t => {\n completed = true;\n this.lastSuccessfulNavigation = this.currentNavigation;\n this.events.next(new NavigationEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects)));\n this.titleStrategy?.updateTitle(t.targetRouterState.snapshot);\n t.resolve(true);\n },\n complete: () => {\n completed = true;\n }\n }),\n // There used to be a lot more logic happening directly within the\n // transition Observable. Some of this logic has been refactored out to\n // other places but there may still be errors that happen there. This gives\n // us a way to cancel the transition from the outside. This may also be\n // required in the future to support something like the abort signal of the\n // Navigation API where the navigation gets aborted from outside the\n // transition.\n takeUntil(this.transitionAbortSubject.pipe(tap(err => {\n throw err;\n }))), finalize(() => {\n /* When the navigation stream finishes either through error or success,\n * we set the `completed` or `errored` flag. However, there are some\n * situations where we could get here without either of those being set.\n * For instance, a redirect during NavigationStart. Therefore, this is a\n * catch-all to make sure the NavigationCancel event is fired when a\n * navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n const cancelationReason = typeof ngDevMode === 'undefined' || ngDevMode ? `Navigation ID ${overallTransitionState.id} is not equal to the current navigation id ${this.navigationId}` : '';\n this.cancelNavigationTransition(overallTransitionState, cancelationReason, NavigationCancellationCode.SupersededByNewNavigation);\n }\n // Only clear current navigation if it is still set to the one that\n // finalized.\n if (this.currentTransition?.id === overallTransitionState.id) {\n this.currentNavigation = null;\n this.currentTransition = null;\n }\n }), catchError(e => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a\n * cancellation rather than an error. */\n if (isNavigationCancelingError(e)) {\n this.events.next(new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e.message, e.cancellationCode));\n // When redirecting, we need to delay resolving the navigation\n // promise and push it to the redirect navigation\n if (!isRedirectingNavigationCancelingError(e)) {\n overallTransitionState.resolve(false);\n } else {\n this.events.next(new RedirectRequest(e.url, e.navigationBehaviorOptions));\n }\n /* All other errors should reset to the router's internal URL reference\n * to the pre-error state. */\n } else {\n const navigationError = new NavigationError(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);\n try {\n const navigationErrorHandlerResult = runInInjectionContext(this.environmentInjector, () => this.navigationErrorHandler?.(navigationError));\n if (navigationErrorHandlerResult instanceof RedirectCommand) {\n const {\n message,\n cancellationCode\n } = redirectingNavigationError(this.urlSerializer, navigationErrorHandlerResult);\n this.events.next(new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), message, cancellationCode));\n this.events.next(new RedirectRequest(navigationErrorHandlerResult.redirectTo, navigationErrorHandlerResult.navigationBehaviorOptions));\n } else {\n this.events.next(navigationError);\n // TODO(atscott): remove deprecation on errorHandler in RouterModule.forRoot and change behavior to provide NAVIGATION_ERROR_HANDLER\n // Note: Still remove public `Router.errorHandler` property, as this is supposed to be configured in DI.\n const errorHandlerResult = router.errorHandler(e);\n overallTransitionState.resolve(!!errorHandlerResult);\n }\n } catch (ee) {\n // TODO(atscott): consider flipping the default behavior of\n // resolveNavigationPromiseOnError to be `resolve(false)` when\n // undefined. This is the most sane thing to do given that\n // applications very rarely handle the promise rejection and, as a\n // result, would get \"unhandled promise rejection\" console logs.\n // The vast majority of applications would not be affected by this\n // change so omitting a migration seems reasonable. Instead,\n // applications that rely on rejection can specifically opt-in to the\n // old behavior.\n if (this.options.resolveNavigationPromiseOnError) {\n overallTransitionState.resolve(false);\n } else {\n overallTransitionState.reject(ee);\n }\n }\n }\n return EMPTY;\n }));\n // casting because `pipe` returns observable({}) when called with 8+ arguments\n }));\n }\n cancelNavigationTransition(t, reason, code) {\n const navCancel = new NavigationCancel(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, code);\n this.events.next(navCancel);\n t.resolve(false);\n }\n /**\n * @returns Whether we're navigating to somewhere that is not what the Router is\n * currently set to.\n */\n isUpdatingInternalState() {\n // TODO(atscott): The serializer should likely be used instead of\n // `UrlTree.toString()`. Custom serializers are often written to handle\n // things better than the default one (objects, for example will be\n // [Object object] with the custom serializer and be \"the same\" when they\n // aren't).\n // (Same for isUpdatedBrowserUrl)\n return this.currentTransition?.extractedUrl.toString() !== this.currentTransition?.currentUrlTree.toString();\n }\n /**\n * @returns Whether we're updating the browser URL to something new (navigation is going\n * to somewhere not displayed in the URL bar and we will update the URL\n * bar if navigation succeeds).\n */\n isUpdatedBrowserUrl() {\n // The extracted URL is the part of the URL that this application cares about. `extract` may\n // return only part of the browser URL and that part may have not changed even if some other\n // portion of the URL did.\n const extractedBrowserUrl = this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(true)));\n return extractedBrowserUrl.toString() !== this.currentTransition?.extractedUrl.toString() && !this.currentTransition?.extras.skipLocationChange;\n }\n static {\n this.ɵfac = function NavigationTransitions_Factory(t) {\n return new (t || NavigationTransitions)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NavigationTransitions,\n factory: NavigationTransitions.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return NavigationTransitions;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction isBrowserTriggeredNavigation(source) {\n return source !== IMPERATIVE_NAVIGATION;\n}\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nlet RouteReuseStrategy = /*#__PURE__*/(() => {\n class RouteReuseStrategy {\n static {\n this.ɵfac = function RouteReuseStrategy_Factory(t) {\n return new (t || RouteReuseStrategy)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: RouteReuseStrategy,\n factory: () => (() => inject(DefaultRouteReuseStrategy))(),\n providedIn: 'root'\n });\n }\n }\n return RouteReuseStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the route parameters, query parameters or fragment change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nclass BaseRouteReuseStrategy {\n /**\n * Whether the given route should detach for later reuse.\n * Always returns false for `BaseRouteReuseStrategy`.\n * */\n shouldDetach(route) {\n return false;\n }\n /**\n * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n */\n store(route, detachedTree) {}\n /** Returns `false`, meaning the route (and its subtree) is never reattached */\n shouldAttach(route) {\n return false;\n }\n /** Returns `null` because this strategy does not store routes for later re-use. */\n retrieve(route) {\n return null;\n }\n /**\n * Determines if a route should be reused.\n * This strategy returns `true` when the future route config and current route config are\n * identical.\n */\n shouldReuseRoute(future, curr) {\n return future.routeConfig === curr.routeConfig;\n }\n}\nlet DefaultRouteReuseStrategy = /*#__PURE__*/(() => {\n class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵDefaultRouteReuseStrategy_BaseFactory;\n return function DefaultRouteReuseStrategy_Factory(t) {\n return (ɵDefaultRouteReuseStrategy_BaseFactory || (ɵDefaultRouteReuseStrategy_BaseFactory = i0.ɵɵgetInheritedFactory(DefaultRouteReuseStrategy)))(t || DefaultRouteReuseStrategy);\n };\n })();\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DefaultRouteReuseStrategy,\n factory: DefaultRouteReuseStrategy.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DefaultRouteReuseStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StateManager = /*#__PURE__*/(() => {\n class StateManager {\n static {\n this.ɵfac = function StateManager_Factory(t) {\n return new (t || StateManager)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StateManager,\n factory: () => (() => inject(HistoryStateManager))(),\n providedIn: 'root'\n });\n }\n }\n return StateManager;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet HistoryStateManager = /*#__PURE__*/(() => {\n class HistoryStateManager extends StateManager {\n constructor() {\n super(...arguments);\n this.location = inject(Location);\n this.urlSerializer = inject(UrlSerializer);\n this.options = inject(ROUTER_CONFIGURATION, {\n optional: true\n }) || {};\n this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';\n this.urlHandlingStrategy = inject(UrlHandlingStrategy);\n this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n this.currentUrlTree = new UrlTree();\n this.rawUrlTree = this.currentUrlTree;\n /**\n * The id of the currently active page in the router.\n * Updated to the transition's target id on a successful navigation.\n *\n * This is used to track what page the router last activated. When an attempted navigation fails,\n * the router can then use this to compute how to restore the state back to the previously active\n * page.\n */\n this.currentPageId = 0;\n this.lastSuccessfulId = -1;\n this.routerState = createEmptyState(null);\n this.stateMemento = this.createStateMemento();\n }\n getCurrentUrlTree() {\n return this.currentUrlTree;\n }\n getRawUrlTree() {\n return this.rawUrlTree;\n }\n restoredState() {\n return this.location.getState();\n }\n /**\n * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n * important for computing the target page id for new navigations because we need to ensure each\n * page id in the browser history is 1 more than the previous entry.\n */\n get browserPageId() {\n if (this.canceledNavigationResolution !== 'computed') {\n return this.currentPageId;\n }\n return this.restoredState()?.ɵrouterPageId ?? this.currentPageId;\n }\n getRouterState() {\n return this.routerState;\n }\n createStateMemento() {\n return {\n rawUrlTree: this.rawUrlTree,\n currentUrlTree: this.currentUrlTree,\n routerState: this.routerState\n };\n }\n registerNonRouterCurrentEntryChangeListener(listener) {\n return this.location.subscribe(event => {\n if (event['type'] === 'popstate') {\n listener(event['url'], event.state);\n }\n });\n }\n handleRouterEvent(e, currentTransition) {\n if (e instanceof NavigationStart) {\n this.stateMemento = this.createStateMemento();\n } else if (e instanceof NavigationSkipped) {\n this.rawUrlTree = currentTransition.initialUrl;\n } else if (e instanceof RoutesRecognized) {\n if (this.urlUpdateStrategy === 'eager') {\n if (!currentTransition.extras.skipLocationChange) {\n const rawUrl = this.urlHandlingStrategy.merge(currentTransition.finalUrl, currentTransition.initialUrl);\n this.setBrowserUrl(rawUrl, currentTransition);\n }\n }\n } else if (e instanceof BeforeActivateRoutes) {\n this.currentUrlTree = currentTransition.finalUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(currentTransition.finalUrl, currentTransition.initialUrl);\n this.routerState = currentTransition.targetRouterState;\n if (this.urlUpdateStrategy === 'deferred') {\n if (!currentTransition.extras.skipLocationChange) {\n this.setBrowserUrl(this.rawUrlTree, currentTransition);\n }\n }\n } else if (e instanceof NavigationCancel && (e.code === NavigationCancellationCode.GuardRejected || e.code === NavigationCancellationCode.NoDataFromResolver)) {\n this.restoreHistory(currentTransition);\n } else if (e instanceof NavigationError) {\n this.restoreHistory(currentTransition, true);\n } else if (e instanceof NavigationEnd) {\n this.lastSuccessfulId = e.id;\n this.currentPageId = this.browserPageId;\n }\n }\n setBrowserUrl(url, transition) {\n const path = this.urlSerializer.serialize(url);\n if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {\n // replacements do not update the target page\n const currentBrowserPageId = this.browserPageId;\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, currentBrowserPageId)\n };\n this.location.replaceState(path, '', state);\n } else {\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, this.browserPageId + 1)\n };\n this.location.go(path, '', state);\n }\n }\n /**\n * Performs the necessary rollback action to restore the browser URL to the\n * state before the transition.\n */\n restoreHistory(navigation, restoringFromCaughtError = false) {\n if (this.canceledNavigationResolution === 'computed') {\n const currentBrowserPageId = this.browserPageId;\n const targetPagePosition = this.currentPageId - currentBrowserPageId;\n if (targetPagePosition !== 0) {\n this.location.historyGo(targetPagePosition);\n } else if (this.currentUrlTree === navigation.finalUrl && targetPagePosition === 0) {\n // We got to the activation stage (where currentUrlTree is set to the navigation's\n // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n // We still need to reset the router state back to what it was when the navigation started.\n this.resetState(navigation);\n this.resetUrlToCurrentUrlTree();\n } else {\n // The browser URL and router state was not updated before the navigation cancelled so\n // there's no restoration needed.\n }\n } else if (this.canceledNavigationResolution === 'replace') {\n // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n // for `deferred` navigations that haven't change the internal state yet because guards\n // reject. For 'eager' navigations, it seems like we also really should reset the state\n // because the navigation was cancelled. Investigate if this can be done by running TGP.\n if (restoringFromCaughtError) {\n this.resetState(navigation);\n }\n this.resetUrlToCurrentUrlTree();\n }\n }\n resetState(navigation) {\n this.routerState = this.stateMemento.routerState;\n this.currentUrlTree = this.stateMemento.currentUrlTree;\n // Note here that we use the urlHandlingStrategy to get the reset `rawUrlTree` because it may be\n // configured to handle only part of the navigation URL. This means we would only want to reset\n // the part of the navigation handled by the Angular router rather than the whole URL. In\n // addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL\n // when merging, such as the query params so they are not lost on a refresh.\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, navigation.finalUrl ?? this.rawUrlTree);\n }\n resetUrlToCurrentUrlTree() {\n this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n }\n generateNgRouterState(navigationId, routerPageId) {\n if (this.canceledNavigationResolution === 'computed') {\n return {\n navigationId,\n ɵrouterPageId: routerPageId\n };\n }\n return {\n navigationId\n };\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵHistoryStateManager_BaseFactory;\n return function HistoryStateManager_Factory(t) {\n return (ɵHistoryStateManager_BaseFactory || (ɵHistoryStateManager_BaseFactory = i0.ɵɵgetInheritedFactory(HistoryStateManager)))(t || HistoryStateManager);\n };\n })();\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: HistoryStateManager,\n factory: HistoryStateManager.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return HistoryStateManager;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar NavigationResult = /*#__PURE__*/function (NavigationResult) {\n NavigationResult[NavigationResult[\"COMPLETE\"] = 0] = \"COMPLETE\";\n NavigationResult[NavigationResult[\"FAILED\"] = 1] = \"FAILED\";\n NavigationResult[NavigationResult[\"REDIRECTING\"] = 2] = \"REDIRECTING\";\n return NavigationResult;\n}(NavigationResult || {});\n/**\n * Performs the given action once the router finishes its next/current navigation.\n *\n * The navigation is considered complete under the following conditions:\n * - `NavigationCancel` event emits and the code is not `NavigationCancellationCode.Redirect` or\n * `NavigationCancellationCode.SupersededByNewNavigation`. In these cases, the\n * redirecting/superseding navigation must finish.\n * - `NavigationError`, `NavigationEnd`, or `NavigationSkipped` event emits\n */\nfunction afterNextNavigation(router, action) {\n router.events.pipe(filter(e => e instanceof NavigationEnd || e instanceof NavigationCancel || e instanceof NavigationError || e instanceof NavigationSkipped), map(e => {\n if (e instanceof NavigationEnd || e instanceof NavigationSkipped) {\n return NavigationResult.COMPLETE;\n }\n const redirecting = e instanceof NavigationCancel ? e.code === NavigationCancellationCode.Redirect || e.code === NavigationCancellationCode.SupersededByNewNavigation : false;\n return redirecting ? NavigationResult.REDIRECTING : NavigationResult.FAILED;\n }), filter(result => result !== NavigationResult.REDIRECTING), take(1)).subscribe(() => {\n action();\n });\n}\nfunction defaultErrorHandler(error) {\n throw error;\n}\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nconst exactMatchOptions = {\n paths: 'exact',\n fragment: 'ignored',\n matrixParams: 'ignored',\n queryParams: 'exact'\n};\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nconst subsetMatchOptions = {\n paths: 'subset',\n fragment: 'ignored',\n matrixParams: 'ignored',\n queryParams: 'subset'\n};\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see {@link Route}\n * @see [Routing and Navigation Guide](guide/routing/common-router-tasks).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet Router = /*#__PURE__*/(() => {\n class Router {\n get currentUrlTree() {\n return this.stateManager.getCurrentUrlTree();\n }\n get rawUrlTree() {\n return this.stateManager.getRawUrlTree();\n }\n /**\n * An event stream for routing events.\n */\n get events() {\n // TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal\n // cleanup: tests are doing `(route.events as Subject).next(...)`. This isn't\n // allowed/supported but we still have to fix these or file bugs against the teams before making\n // the change.\n return this._events;\n }\n /**\n * The current state of routing in this NgModule.\n */\n get routerState() {\n return this.stateManager.getRouterState();\n }\n constructor() {\n this.disposed = false;\n this.console = inject(ɵConsole);\n this.stateManager = inject(StateManager);\n this.options = inject(ROUTER_CONFIGURATION, {\n optional: true\n }) || {};\n this.pendingTasks = inject(ɵPendingTasks);\n this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n this.navigationTransitions = inject(NavigationTransitions);\n this.urlSerializer = inject(UrlSerializer);\n this.location = inject(Location);\n this.urlHandlingStrategy = inject(UrlHandlingStrategy);\n /**\n * The private `Subject` type for the public events exposed in the getter. This is used internally\n * to push events to. The separate field allows us to expose separate types in the public API\n * (i.e., an Observable rather than the Subject).\n */\n this._events = new Subject();\n /**\n * A handler for navigation errors in this NgModule.\n *\n * @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.\n * `provideRouter` has the `withNavigationErrorHandler` feature to make this easier.\n * @see {@link withNavigationErrorHandler}\n */\n this.errorHandler = this.options.errorHandler || defaultErrorHandler;\n /**\n * True if at least one navigation event has occurred,\n * false otherwise.\n */\n this.navigated = false;\n /**\n * A strategy for re-using routes.\n *\n * @deprecated Configure using `providers` instead:\n * `{provide: RouteReuseStrategy, useClass: MyStrategy}`.\n */\n this.routeReuseStrategy = inject(RouteReuseStrategy);\n /**\n * How to handle a navigation request to the current URL.\n *\n *\n * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see {@link withRouterConfig}\n * @see {@link provideRouter}\n * @see {@link RouterModule}\n */\n this.onSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';\n this.config = inject(ROUTES, {\n optional: true\n })?.flat() ?? [];\n /**\n * Indicates whether the application has opted in to binding Router data to component inputs.\n *\n * This option is enabled by the `withComponentInputBinding` feature of `provideRouter` or\n * `bindToComponentInputs` in the `ExtraOptions` of `RouterModule.forRoot`.\n */\n this.componentInputBindingEnabled = !!inject(INPUT_BINDER, {\n optional: true\n });\n this.eventsSubscription = new Subscription();\n this.resetConfig(this.config);\n this.navigationTransitions.setupNavigations(this, this.currentUrlTree, this.routerState).subscribe({\n error: e => {\n this.console.warn(ngDevMode ? `Unhandled Navigation Error: ${e}` : e);\n }\n });\n this.subscribeToNavigationEvents();\n }\n subscribeToNavigationEvents() {\n const subscription = this.navigationTransitions.events.subscribe(e => {\n try {\n const currentTransition = this.navigationTransitions.currentTransition;\n const currentNavigation = this.navigationTransitions.currentNavigation;\n if (currentTransition !== null && currentNavigation !== null) {\n this.stateManager.handleRouterEvent(e, currentNavigation);\n if (e instanceof NavigationCancel && e.code !== NavigationCancellationCode.Redirect && e.code !== NavigationCancellationCode.SupersededByNewNavigation) {\n // It seems weird that `navigated` is set to `true` when the navigation is rejected,\n // however it's how things were written initially. Investigation would need to be done\n // to determine if this can be removed.\n this.navigated = true;\n } else if (e instanceof NavigationEnd) {\n this.navigated = true;\n } else if (e instanceof RedirectRequest) {\n const opts = e.navigationBehaviorOptions;\n const mergedTree = this.urlHandlingStrategy.merge(e.url, currentTransition.currentRawUrl);\n const extras = {\n // Persist transient navigation info from the original navigation request.\n info: currentTransition.extras.info,\n skipLocationChange: currentTransition.extras.skipLocationChange,\n // The URL is already updated at this point if we have 'eager' URL\n // updates or if the navigation was triggered by the browser (back\n // button, URL bar, etc). We want to replace that item in history\n // if the navigation is rejected.\n replaceUrl: currentTransition.extras.replaceUrl || this.urlUpdateStrategy === 'eager' || isBrowserTriggeredNavigation(currentTransition.source),\n // allow developer to override default options with RedirectCommand\n ...opts\n };\n this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras, {\n resolve: currentTransition.resolve,\n reject: currentTransition.reject,\n promise: currentTransition.promise\n });\n }\n }\n // Note that it's important to have the Router process the events _before_ the event is\n // pushed through the public observable. This ensures the correct router state is in place\n // before applications observe the events.\n if (isPublicRouterEvent(e)) {\n this._events.next(e);\n }\n } catch (e) {\n this.navigationTransitions.transitionAbortSubject.next(e);\n }\n });\n this.eventsSubscription.add(subscription);\n }\n /** @internal */\n resetRootComponentType(rootComponentType) {\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = rootComponentType;\n this.navigationTransitions.rootComponentType = rootComponentType;\n }\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation() {\n this.setUpLocationChangeListener();\n if (!this.navigationTransitions.hasRequestedNavigation) {\n this.navigateToSyncWithBrowser(this.location.path(true), IMPERATIVE_NAVIGATION, this.stateManager.restoredState());\n }\n }\n /**\n * Sets up the location change listener. This listener detects navigations triggered from outside\n * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n * navigation so that the correct events, guards, etc. are triggered.\n */\n setUpLocationChangeListener() {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n this.nonRouterCurrentEntryChangeSubscription ??= this.stateManager.registerNonRouterCurrentEntryChangeListener((url, state) => {\n // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n // hybrid apps.\n setTimeout(() => {\n this.navigateToSyncWithBrowser(url, 'popstate', state);\n }, 0);\n });\n }\n /**\n * Schedules a router navigation to synchronize Router state with the browser state.\n *\n * This is done as a response to a popstate event and the initial navigation. These\n * two scenarios represent times when the browser URL/state has been updated and\n * the Router needs to respond to ensure its internal state matches.\n */\n navigateToSyncWithBrowser(url, source, state) {\n const extras = {\n replaceUrl: true\n };\n // TODO: restoredState should always include the entire state, regardless\n // of navigationId. This requires a breaking change to update the type on\n // NavigationStart’s restoredState, which currently requires navigationId\n // to always be present. The Router used to only restore history state if\n // a navigationId was present.\n // The stored navigationId is used by the RouterScroller to retrieve the scroll\n // position for the page.\n const restoredState = state?.navigationId ? state : null;\n // Separate to NavigationStart.restoredState, we must also restore the state to\n // history.state and generate a new navigationId, since it will be overwritten\n if (state) {\n const stateCopy = {\n ...state\n };\n delete stateCopy.navigationId;\n delete stateCopy.ɵrouterPageId;\n if (Object.keys(stateCopy).length !== 0) {\n extras.state = stateCopy;\n }\n }\n const urlTree = this.parseUrl(url);\n this.scheduleNavigation(urlTree, source, restoredState, extras);\n }\n /** The current URL. */\n get url() {\n return this.serializeUrl(this.currentUrlTree);\n }\n /**\n * Returns the current `Navigation` object when the router is navigating,\n * and `null` when idle.\n */\n getCurrentNavigation() {\n return this.navigationTransitions.currentNavigation;\n }\n /**\n * The `Navigation` object of the most recent navigation to succeed and `null` if there\n * has not been a successful navigation yet.\n */\n get lastSuccessfulNavigation() {\n return this.navigationTransitions.lastSuccessfulNavigation;\n }\n /**\n * Resets the route configuration used for navigation and generating links.\n *\n * @param config The route array for the new configuration.\n *\n * @usageNotes\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config) {\n (typeof ngDevMode === 'undefined' || ngDevMode) && validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n }\n /** @nodoc */\n ngOnDestroy() {\n this.dispose();\n }\n /** Disposes of the router. */\n dispose() {\n this.navigationTransitions.complete();\n if (this.nonRouterCurrentEntryChangeSubscription) {\n this.nonRouterCurrentEntryChangeSubscription.unsubscribe();\n this.nonRouterCurrentEntryChangeSubscription = undefined;\n }\n this.disposed = true;\n this.eventsSubscription.unsubscribe();\n }\n /**\n * Appends URL segments to the current URL tree to create a new URL tree.\n *\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the current URL tree or the one provided in the `relativeTo`\n * property of the options object, if supplied.\n * @param navigationExtras Options that control the navigation strategy.\n * @returns The new URL tree.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n *\n * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n * tree should be created relative to the root.\n * ```\n */\n createUrlTree(commands, navigationExtras = {}) {\n const {\n relativeTo,\n queryParams,\n fragment,\n queryParamsHandling,\n preserveFragment\n } = navigationExtras;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q = null;\n switch (queryParamsHandling) {\n case 'merge':\n q = {\n ...this.currentUrlTree.queryParams,\n ...queryParams\n };\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n let relativeToUrlSegmentGroup;\n try {\n const relativeToSnapshot = relativeTo ? relativeTo.snapshot : this.routerState.snapshot.root;\n relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);\n } catch (e) {\n // This is strictly for backwards compatibility with tests that create\n // invalid `ActivatedRoute` mocks.\n // Note: the difference between having this fallback for invalid `ActivatedRoute` setups and\n // just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at\n // the moment.\n if (typeof commands[0] !== 'string' || commands[0][0] !== '/') {\n // Navigations that were absolute in the old way of creating UrlTrees\n // would still work because they wouldn't attempt to match the\n // segments in the `ActivatedRoute` to the `currentUrlTree` but\n // instead just replace the root segment with the navigation result.\n // Non-absolute navigations would fail to apply the commands because\n // the logic could not find the segment to replace (so they'd act like there were no\n // commands).\n commands = [];\n }\n relativeToUrlSegmentGroup = this.currentUrlTree.root;\n }\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, q, f ?? null);\n }\n /**\n * Navigates to a view using an absolute route path.\n *\n * @param url An absolute path for a defined route. The function does not apply any delta to the\n * current URL.\n * @param extras An object containing properties that modify the navigation strategy.\n *\n * @returns A Promise that resolves to 'true' when navigation succeeds,\n * to 'false' when navigation fails, or is rejected on error.\n *\n * @usageNotes\n *\n * The following calls request navigation to an absolute path.\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n *\n */\n navigateByUrl(url, extras = {\n skipLocationChange: false\n }) {\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n return this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras);\n }\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * @param commands An array of URL fragments with which to construct the target URL.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the current URL or the one provided in the `relativeTo` property\n * of the options object, if supplied.\n * @param extras An options object that determines how the URL should be constructed or\n * interpreted.\n *\n * @returns A Promise that resolves to `true` when navigation succeeds, or `false` when navigation\n * fails. The Promise is rejected when an error occurs if `resolveNavigationPromiseOnError` is\n * not `true`.\n *\n * @usageNotes\n *\n * The following calls request navigation to a dynamic route path relative to the current URL.\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL, overriding the default behavior\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n *\n */\n navigate(commands, extras = {\n skipLocationChange: false\n }) {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url) {\n return this.urlSerializer.serialize(url);\n }\n /** Parses a string into a `UrlTree` */\n parseUrl(url) {\n try {\n return this.urlSerializer.parse(url);\n } catch {\n return this.urlSerializer.parse('/');\n }\n }\n isActive(url, matchOptions) {\n let options;\n if (matchOptions === true) {\n options = {\n ...exactMatchOptions\n };\n } else if (matchOptions === false) {\n options = {\n ...subsetMatchOptions\n };\n } else {\n options = matchOptions;\n }\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, options);\n }\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, options);\n }\n removeEmptyProps(params) {\n return Object.entries(params).reduce((result, [key, value]) => {\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {\n if (this.disposed) {\n return Promise.resolve(false);\n }\n let resolve;\n let reject;\n let promise;\n if (priorPromise) {\n resolve = priorPromise.resolve;\n reject = priorPromise.reject;\n promise = priorPromise.promise;\n } else {\n promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n }\n // Indicate that the navigation is happening.\n const taskId = this.pendingTasks.add();\n afterNextNavigation(this, () => {\n // Remove pending task in a microtask to allow for cancelled\n // initial navigations and redirects within the same task.\n queueMicrotask(() => this.pendingTasks.remove(taskId));\n });\n this.navigationTransitions.handleNavigationRequest({\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n rawUrl,\n extras,\n resolve: resolve,\n reject: reject,\n promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch(e => {\n return Promise.reject(e);\n });\n }\n static {\n this.ɵfac = function Router_Factory(t) {\n return new (t || Router)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: Router,\n factory: Router.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return Router;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction validateCommands(commands) {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new ɵRuntimeError(4008 /* RuntimeErrorCode.NULLISH_COMMAND */, (typeof ngDevMode === 'undefined' || ngDevMode) && `The requested path contains ${cmd} segment at index ${i}`);\n }\n }\n}\nfunction isPublicRouterEvent(e) {\n return !(e instanceof BeforeActivateRoutes) && !(e instanceof RedirectRequest);\n}\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `link to user component`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segments.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `Jim` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n * looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * \n * link to user component\n * \n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n * - `'merge'`: Merge the given `queryParams` into the current query params.\n * - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * \n * link to user component\n * \n * ```\n *\n * See {@link UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * \n * link to user component\n * \n * ```\n *\n * Use {@link Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet RouterLink = /*#__PURE__*/(() => {\n class RouterLink {\n constructor(router, route, tabIndexAttribute, renderer, el, locationStrategy) {\n this.router = router;\n this.route = route;\n this.tabIndexAttribute = tabIndexAttribute;\n this.renderer = renderer;\n this.el = el;\n this.locationStrategy = locationStrategy;\n /**\n * Represents an `href` attribute value applied to a host element,\n * when a host element is ``. For other tags, the value is `null`.\n */\n this.href = null;\n this.commands = null;\n /** @internal */\n this.onChanges = new Subject();\n /**\n * Passed to {@link Router#createUrlTree} as part of the\n * `UrlCreationOptions`.\n * @see {@link UrlCreationOptions#preserveFragment}\n * @see {@link Router#createUrlTree}\n */\n this.preserveFragment = false;\n /**\n * Passed to {@link Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#skipLocationChange}\n * @see {@link Router#navigateByUrl}\n */\n this.skipLocationChange = false;\n /**\n * Passed to {@link Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#replaceUrl}\n * @see {@link Router#navigateByUrl}\n */\n this.replaceUrl = false;\n const tagName = el.nativeElement.tagName?.toLowerCase();\n this.isAnchorElement = tagName === 'a' || tagName === 'area';\n if (this.isAnchorElement) {\n this.subscription = router.events.subscribe(s => {\n if (s instanceof NavigationEnd) {\n this.updateHref();\n }\n });\n } else {\n this.setTabIndexIfNotOnNativeEl('0');\n }\n }\n /**\n * Modifies the tab index if there was not a tabindex attribute on the element during\n * instantiation.\n */\n setTabIndexIfNotOnNativeEl(newTabIndex) {\n if (this.tabIndexAttribute != null /* both `null` and `undefined` */ || this.isAnchorElement) {\n return;\n }\n this.applyAttributeValue('tabindex', newTabIndex);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (this.isAnchorElement) {\n this.updateHref();\n }\n // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n // to the RouterLinks it's tracking.\n this.onChanges.next(this);\n }\n /**\n * Commands to pass to {@link Router#createUrlTree}.\n * - **array**: commands to pass to {@link Router#createUrlTree}.\n * - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n * - **null|undefined**: effectively disables the `routerLink`\n * @see {@link Router#createUrlTree}\n */\n set routerLink(commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n this.setTabIndexIfNotOnNativeEl('0');\n } else {\n this.commands = null;\n this.setTabIndexIfNotOnNativeEl(null);\n }\n }\n /** @nodoc */\n onClick(button, ctrlKey, shiftKey, altKey, metaKey) {\n const urlTree = this.urlTree;\n if (urlTree === null) {\n return true;\n }\n if (this.isAnchorElement) {\n if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n return true;\n }\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n }\n const extras = {\n skipLocationChange: this.skipLocationChange,\n replaceUrl: this.replaceUrl,\n state: this.state,\n info: this.info\n };\n this.router.navigateByUrl(urlTree, extras);\n // Return `false` for `` elements to prevent default action\n // and cancel the native behavior, since the navigation is handled\n // by the Router.\n return !this.isAnchorElement;\n }\n /** @nodoc */\n ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n updateHref() {\n const urlTree = this.urlTree;\n this.href = urlTree !== null && this.locationStrategy ? this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(urlTree)) : null;\n const sanitizedValue = this.href === null ? null :\n // This class represents a directive that can be added to both `` elements,\n // as well as other elements. As a result, we can't define security context at\n // compile time. So the security context is deferred to runtime.\n // The `ɵɵsanitizeUrlOrResourceUrl` selects the necessary sanitizer function\n // based on the tag and property names. The logic mimics the one from\n // `packages/compiler/src/schema/dom_security_schema.ts`, which is used at compile time.\n //\n // Note: we should investigate whether we can switch to using `@HostBinding('attr.href')`\n // instead of applying a value via a renderer, after a final merge of the\n // `RouterLinkWithHref` directive.\n ɵɵsanitizeUrlOrResourceUrl(this.href, this.el.nativeElement.tagName.toLowerCase(), 'href');\n this.applyAttributeValue('href', sanitizedValue);\n }\n applyAttributeValue(attrName, attrValue) {\n const renderer = this.renderer;\n const nativeElement = this.el.nativeElement;\n if (attrValue !== null) {\n renderer.setAttribute(nativeElement, attrName, attrValue);\n } else {\n renderer.removeAttribute(nativeElement, attrName);\n }\n }\n get urlTree() {\n if (this.commands === null) {\n return null;\n }\n return this.router.createUrlTree(this.commands, {\n // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n // Otherwise, we should use the value provided by the user in the input.\n relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: this.preserveFragment\n });\n }\n static {\n this.ɵfac = function RouterLink_Factory(t) {\n return new (t || RouterLink)(i0.ɵɵdirectiveInject(Router), i0.ɵɵdirectiveInject(ActivatedRoute), i0.ɵɵinjectAttribute('tabindex'), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i3.LocationStrategy));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: RouterLink,\n selectors: [[\"\", \"routerLink\", \"\"]],\n hostVars: 1,\n hostBindings: function RouterLink_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function RouterLink_click_HostBindingHandler($event) {\n return ctx.onClick($event.button, $event.ctrlKey, $event.shiftKey, $event.altKey, $event.metaKey);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"target\", ctx.target);\n }\n },\n inputs: {\n target: \"target\",\n queryParams: \"queryParams\",\n fragment: \"fragment\",\n queryParamsHandling: \"queryParamsHandling\",\n state: \"state\",\n info: \"info\",\n relativeTo: \"relativeTo\",\n preserveFragment: [2, \"preserveFragment\", \"preserveFragment\", booleanAttribute],\n skipLocationChange: [2, \"skipLocationChange\", \"skipLocationChange\", booleanAttribute],\n replaceUrl: [2, \"replaceUrl\", \"replaceUrl\", booleanAttribute],\n routerLink: \"routerLink\"\n },\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return RouterLink;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * Bob\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * Bob\n * Bob\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * Bob\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * \n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * \n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `
` parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n *
\n * Jim\n * Bob\n *
\n * ```\n *\n * The `RouterLinkActive` directive can also be used to set the aria-current attribute\n * to provide an alternative distinction for active elements to visually impaired users.\n *\n * For example, the following code adds the 'active' class to the Home Page link when it is\n * indeed active and in such case also sets its aria-current attribute to 'page':\n *\n * ```\n * Home Page\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet RouterLinkActive = /*#__PURE__*/(() => {\n class RouterLinkActive {\n get isActive() {\n return this._isActive;\n }\n constructor(router, element, renderer, cdr, link) {\n this.router = router;\n this.element = element;\n this.renderer = renderer;\n this.cdr = cdr;\n this.link = link;\n this.classes = [];\n this._isActive = false;\n /**\n * Options to configure how to determine if the router link is active.\n *\n * These options are passed to the `Router.isActive()` function.\n *\n * @see {@link Router#isActive}\n */\n this.routerLinkActiveOptions = {\n exact: false\n };\n /**\n *\n * You can use the output `isActiveChange` to get notified each time the link becomes\n * active or inactive.\n *\n * Emits:\n * true -> Route is active\n * false -> Route is inactive\n *\n * ```\n * Bob\n * ```\n */\n this.isActiveChange = new EventEmitter();\n this.routerEventsSubscription = router.events.subscribe(s => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n /** @nodoc */\n ngAfterContentInit() {\n // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n of(this.links.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n this.update();\n this.subscribeToEachLinkOnChanges();\n });\n }\n subscribeToEachLinkOnChanges() {\n this.linkInputChangesSubscription?.unsubscribe();\n const allLinkChanges = [...this.links.toArray(), this.link].filter(link => !!link).map(link => link.onChanges);\n this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n if (this._isActive !== this.isLinkActive(this.router)(link)) {\n this.update();\n }\n });\n }\n set routerLinkActive(data) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(c => !!c);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n this.update();\n }\n /** @nodoc */\n ngOnDestroy() {\n this.routerEventsSubscription.unsubscribe();\n this.linkInputChangesSubscription?.unsubscribe();\n }\n update() {\n if (!this.links || !this.router.navigated) return;\n queueMicrotask(() => {\n const hasActiveLinks = this.hasActiveLinks();\n this.classes.forEach(c => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {\n this.renderer.setAttribute(this.element.nativeElement, 'aria-current', this.ariaCurrentWhenActive.toString());\n } else {\n this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');\n }\n // Only emit change if the active state changed.\n if (this._isActive !== hasActiveLinks) {\n this._isActive = hasActiveLinks;\n this.cdr.markForCheck();\n // Emit on isActiveChange after classes are updated\n this.isActiveChange.emit(hasActiveLinks);\n }\n });\n }\n isLinkActive(router) {\n const options = isActiveMatchOptions(this.routerLinkActiveOptions) ? this.routerLinkActiveOptions :\n // While the types should disallow `undefined` here, it's possible without strict inputs\n this.routerLinkActiveOptions.exact || false;\n return link => {\n const urlTree = link.urlTree;\n return urlTree ? router.isActive(urlTree, options) : false;\n };\n }\n hasActiveLinks() {\n const isActiveCheckFn = this.isLinkActive(this.router);\n return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);\n }\n static {\n this.ɵfac = function RouterLinkActive_Factory(t) {\n return new (t || RouterLinkActive)(i0.ɵɵdirectiveInject(Router), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RouterLink, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: RouterLinkActive,\n selectors: [[\"\", \"routerLinkActive\", \"\"]],\n contentQueries: function RouterLinkActive_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, RouterLink, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.links = _t);\n }\n },\n inputs: {\n routerLinkActiveOptions: \"routerLinkActiveOptions\",\n ariaCurrentWhenActive: \"ariaCurrentWhenActive\",\n routerLinkActive: \"routerLinkActive\"\n },\n outputs: {\n isActiveChange: \"isActiveChange\"\n },\n exportAs: [\"routerLinkActive\"],\n standalone: true,\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return RouterLinkActive;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options) {\n return !!options.paths;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nclass PreloadingStrategy {}\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nlet PreloadAllModules = /*#__PURE__*/(() => {\n class PreloadAllModules {\n preload(route, fn) {\n return fn().pipe(catchError(() => of(null)));\n }\n static {\n this.ɵfac = function PreloadAllModules_Factory(t) {\n return new (t || PreloadAllModules)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: PreloadAllModules,\n factory: PreloadAllModules.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return PreloadAllModules;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nlet NoPreloading = /*#__PURE__*/(() => {\n class NoPreloading {\n preload(route, fn) {\n return of(null);\n }\n static {\n this.ɵfac = function NoPreloading_Factory(t) {\n return new (t || NoPreloading)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NoPreloading,\n factory: NoPreloading.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return NoPreloading;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\nlet RouterPreloader = /*#__PURE__*/(() => {\n class RouterPreloader {\n constructor(router, compiler, injector, preloadingStrategy, loader) {\n this.router = router;\n this.injector = injector;\n this.preloadingStrategy = preloadingStrategy;\n this.loader = loader;\n }\n setUpPreloading() {\n this.subscription = this.router.events.pipe(filter(e => e instanceof NavigationEnd), concatMap(() => this.preload())).subscribe(() => {});\n }\n preload() {\n return this.processRoutes(this.injector, this.router.config);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n processRoutes(injector, routes) {\n const res = [];\n for (const route of routes) {\n if (route.providers && !route._injector) {\n route._injector = createEnvironmentInjector(route.providers, injector, `Route: ${route.path}`);\n }\n const injectorForCurrentRoute = route._injector ?? injector;\n const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute;\n // Note that `canLoad` is only checked as a condition that prevents `loadChildren` and not\n // `loadComponent`. `canLoad` guards only block loading of child routes by design. This\n // happens as a consequence of needing to descend into children for route matching immediately\n // while component loading is deferred until route activation. Because `canLoad` guards can\n // have side effects, we cannot execute them here so we instead skip preloading altogether\n // when present. Lastly, it remains to be decided whether `canLoad` should behave this way\n // at all. Code splitting and lazy loading is separate from client-side authorization checks\n // and should not be used as a security measure to prevent loading of code.\n if (route.loadChildren && !route._loadedRoutes && route.canLoad === undefined || route.loadComponent && !route._loadedComponent) {\n res.push(this.preloadConfig(injectorForCurrentRoute, route));\n }\n if (route.children || route._loadedRoutes) {\n res.push(this.processRoutes(injectorForChildren, route.children ?? route._loadedRoutes));\n }\n }\n return from(res).pipe(mergeAll());\n }\n preloadConfig(injector, route) {\n return this.preloadingStrategy.preload(route, () => {\n let loadedChildren$;\n if (route.loadChildren && route.canLoad === undefined) {\n loadedChildren$ = this.loader.loadChildren(injector, route);\n } else {\n loadedChildren$ = of(null);\n }\n const recursiveLoadChildren$ = loadedChildren$.pipe(mergeMap(config => {\n if (config === null) {\n return of(void 0);\n }\n route._loadedRoutes = config.routes;\n route._loadedInjector = config.injector;\n // If the loaded config was a module, use that as the module/module injector going\n // forward. Otherwise, continue using the current module/module injector.\n return this.processRoutes(config.injector ?? injector, config.routes);\n }));\n if (route.loadComponent && !route._loadedComponent) {\n const loadComponent$ = this.loader.loadComponent(route);\n return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());\n } else {\n return recursiveLoadChildren$;\n }\n });\n }\n static {\n this.ɵfac = function RouterPreloader_Factory(t) {\n return new (t || RouterPreloader)(i0.ɵɵinject(Router), i0.ɵɵinject(i0.Compiler), i0.ɵɵinject(i0.EnvironmentInjector), i0.ɵɵinject(PreloadingStrategy), i0.ɵɵinject(RouterConfigLoader));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: RouterPreloader,\n factory: RouterPreloader.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return RouterPreloader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst ROUTER_SCROLLER = /*#__PURE__*/new InjectionToken('');\nlet RouterScroller = /*#__PURE__*/(() => {\n class RouterScroller {\n /** @nodoc */\n constructor(urlSerializer, transitions, viewportScroller, zone, options = {}) {\n this.urlSerializer = urlSerializer;\n this.transitions = transitions;\n this.viewportScroller = viewportScroller;\n this.zone = zone;\n this.options = options;\n this.lastId = 0;\n this.lastSource = 'imperative';\n this.restoredId = 0;\n this.store = {};\n this.environmentInjector = inject(EnvironmentInjector);\n // Default both options to 'disabled'\n options.scrollPositionRestoration ||= 'disabled';\n options.anchorScrolling ||= 'disabled';\n }\n init() {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n createScrollEvents() {\n return this.transitions.events.subscribe(e => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n } else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.urlSerializer.parse(e.urlAfterRedirects).fragment);\n } else if (e instanceof NavigationSkipped && e.code === NavigationSkippedCode.IgnoredSameUrlNavigation) {\n this.lastSource = undefined;\n this.restoredId = 0;\n this.scheduleScrollEvent(e, this.urlSerializer.parse(e.url).fragment);\n }\n });\n }\n consumeScrollEvents() {\n return this.transitions.events.subscribe(e => {\n if (!(e instanceof Scroll)) return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n } else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n } else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n } else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n scheduleScrollEvent(routerEvent, anchor) {\n this.zone.runOutsideAngular(async () => {\n // The scroll event needs to be delayed until after change detection. Otherwise we may\n // attempt to restore the scroll position before the router outlet has fully rendered the\n // component by executing its update block of the template function.\n await new Promise(resolve => {\n // TODO(atscott): Attempt to remove the setTimeout in a future PR.\n setTimeout(() => {\n resolve();\n });\n afterNextRender(() => {\n resolve();\n }, {\n injector: this.environmentInjector\n });\n });\n this.zone.run(() => {\n this.transitions.events.next(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n });\n });\n }\n /** @nodoc */\n ngOnDestroy() {\n this.routerEventsSubscription?.unsubscribe();\n this.scrollEventsSubscription?.unsubscribe();\n }\n static {\n this.ɵfac = function RouterScroller_Factory(t) {\n i0.ɵɵinvalidFactory();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: RouterScroller,\n factory: RouterScroller.ɵfac\n });\n }\n }\n return RouterScroller;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Sets up providers necessary to enable `Router` functionality for the application.\n * Allows to configure a set of routes as well as extra features that should be enabled.\n *\n * @usageNotes\n *\n * Basic example of how you can add a Router to your application:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent, {\n * providers: [provideRouter(appRoutes)]\n * });\n * ```\n *\n * You can also enable optional features in the Router by adding functions from the `RouterFeatures`\n * type:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes,\n * withDebugTracing(),\n * withRouterConfig({paramsInheritanceStrategy: 'always'}))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link RouterFeatures}\n *\n * @publicApi\n * @param routes A set of `Route`s to use for the application routing table.\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to setup a Router.\n */\nfunction provideRouter(routes, ...features) {\n return makeEnvironmentProviders([{\n provide: ROUTES,\n multi: true,\n useValue: routes\n }, typeof ngDevMode === 'undefined' || ngDevMode ? {\n provide: ROUTER_IS_PROVIDED,\n useValue: true\n } : [], {\n provide: ActivatedRoute,\n useFactory: rootRoute,\n deps: [Router]\n }, {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: getBootstrapListener\n }, features.map(feature => feature.ɵproviders)]);\n}\nfunction rootRoute(router) {\n return router.routerState.root;\n}\n/**\n * Helper function to create an object that represents a Router feature.\n */\nfunction routerFeature(kind, providers) {\n return {\n ɵkind: kind,\n ɵproviders: providers\n };\n}\n/**\n * An Injection token used to indicate whether `provideRouter` or `RouterModule.forRoot` was ever\n * called.\n */\nconst ROUTER_IS_PROVIDED = /*#__PURE__*/new InjectionToken('', {\n providedIn: 'root',\n factory: () => false\n});\nconst routerIsProvidedDevModeCheck = {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory() {\n return () => {\n if (!inject(ROUTER_IS_PROVIDED)) {\n console.warn('`provideRoutes` was called without `provideRouter` or `RouterModule.forRoot`. ' + 'This is likely a mistake.');\n }\n };\n }\n};\n/**\n * Registers a DI provider for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n * providers: [provideRoutes(ROUTES)]\n * })\n * class LazyLoadedChildModule {}\n * ```\n *\n * @deprecated If necessary, provide routes using the `ROUTES` `InjectionToken`.\n * @see {@link ROUTES}\n * @publicApi\n */\nfunction provideRoutes(routes) {\n return [{\n provide: ROUTES,\n multi: true,\n useValue: routes\n }, typeof ngDevMode === 'undefined' || ngDevMode ? routerIsProvidedDevModeCheck : []];\n}\n/**\n * Enables customizable scrolling behavior for router navigations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable scrolling feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withInMemoryScrolling())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n * @see {@link ViewportScroller}\n *\n * @publicApi\n * @param options Set of configuration parameters to customize scrolling behavior, see\n * `InMemoryScrollingOptions` for additional information.\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withInMemoryScrolling(options = {}) {\n const providers = [{\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, options);\n }\n }];\n return routerFeature(4 /* RouterFeatureKind.InMemoryScrollingFeature */, providers);\n}\nfunction getBootstrapListener() {\n const injector = inject(Injector);\n return bootstrappedComponentRef => {\n const ref = injector.get(ApplicationRef);\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n if (injector.get(INITIAL_NAVIGATION) === 1 /* InitialNavigation.EnabledNonBlocking */) {\n router.initialNavigation();\n }\n injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)?.setUpPreloading();\n injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)?.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n if (!bootstrapDone.closed) {\n bootstrapDone.next();\n bootstrapDone.complete();\n bootstrapDone.unsubscribe();\n }\n };\n}\n/**\n * A subject used to indicate that the bootstrapping phase is done. When initial navigation is\n * `enabledBlocking`, the first navigation waits until bootstrapping is finished before continuing\n * to the activation phase.\n */\nconst BOOTSTRAP_DONE = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'bootstrap done indicator' : '', {\n factory: () => {\n return new Subject();\n }\n});\nconst INITIAL_NAVIGATION = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'initial navigation' : '', {\n providedIn: 'root',\n factory: () => 1 /* InitialNavigation.EnabledNonBlocking */\n});\n/**\n * Configures initial navigation to start before the root component is created.\n *\n * The bootstrap is blocked until the initial navigation is complete. This value is required for\n * [server-side rendering](guide/ssr) to work.\n *\n * @usageNotes\n *\n * Basic example of how you can enable this navigation behavior:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withEnabledBlockingInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @publicApi\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withEnabledBlockingInitialNavigation() {\n const providers = [{\n provide: INITIAL_NAVIGATION,\n useValue: 0 /* InitialNavigation.EnabledBlocking */\n }, {\n provide: APP_INITIALIZER,\n multi: true,\n deps: [Injector],\n useFactory: injector => {\n const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve());\n return () => {\n return locationInitialized.then(() => {\n return new Promise(resolve => {\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n afterNextNavigation(router, () => {\n // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n // without a redirect.\n resolve(true);\n });\n injector.get(NavigationTransitions).afterPreactivation = () => {\n // Unblock APP_INITIALIZER once we get to `afterPreactivation`. At this point, we\n // assume activation will complete successfully (even though this is not\n // guaranteed).\n resolve(true);\n return bootstrapDone.closed ? of(void 0) : bootstrapDone;\n };\n router.initialNavigation();\n });\n });\n };\n }\n }];\n return routerFeature(2 /* RouterFeatureKind.EnabledBlockingInitialNavigationFeature */, providers);\n}\n/**\n * Disables initial navigation.\n *\n * Use if there is a reason to have more control over when the router starts its initial navigation\n * due to some complex initialization logic.\n *\n * @usageNotes\n *\n * Basic example of how you can disable initial navigation:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withDisabledInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDisabledInitialNavigation() {\n const providers = [{\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => {\n router.setUpLocationChangeListener();\n };\n }\n }, {\n provide: INITIAL_NAVIGATION,\n useValue: 2 /* InitialNavigation.Disabled */\n }];\n return routerFeature(3 /* RouterFeatureKind.DisabledInitialNavigationFeature */, providers);\n}\n/**\n * Enables logging of all internal navigation events to the console.\n * Extra logging might be useful for debugging purposes to inspect Router event sequence.\n *\n * @usageNotes\n *\n * Basic example of how you can enable debug tracing:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withDebugTracing())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDebugTracing() {\n let providers = [];\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n providers = [{\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => router.events.subscribe(e => {\n // tslint:disable:no-console\n console.group?.(`Router Event: ${e.constructor.name}`);\n console.log(stringifyEvent(e));\n console.log(e);\n console.groupEnd?.();\n // tslint:enable:no-console\n });\n }\n }];\n } else {\n providers = [];\n }\n return routerFeature(1 /* RouterFeatureKind.DebugTracingFeature */, providers);\n}\nconst ROUTER_PRELOADER = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'router preloader' : '');\n/**\n * Allows to configure a preloading strategy to use. The strategy is configured by providing a\n * reference to a class that implements a `PreloadingStrategy`.\n *\n * @usageNotes\n *\n * Basic example of how you can configure preloading:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withPreloading(PreloadAllModules))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @param preloadingStrategy A reference to a class that implements a `PreloadingStrategy` that\n * should be used.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withPreloading(preloadingStrategy) {\n const providers = [{\n provide: ROUTER_PRELOADER,\n useExisting: RouterPreloader\n }, {\n provide: PreloadingStrategy,\n useExisting: preloadingStrategy\n }];\n return routerFeature(0 /* RouterFeatureKind.PreloadingFeature */, providers);\n}\n/**\n * Allows to provide extra parameters to configure Router.\n *\n * @usageNotes\n *\n * Basic example of how you can provide extra configuration options:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withRouterConfig({\n * onSameUrlNavigation: 'reload'\n * }))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @param options A set of parameters to configure Router, see `RouterConfigOptions` for\n * additional information.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withRouterConfig(options) {\n const providers = [{\n provide: ROUTER_CONFIGURATION,\n useValue: options\n }];\n return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);\n}\n/**\n * Provides the location strategy that uses the URL fragment instead of the history API.\n *\n * @usageNotes\n *\n * Basic example of how you can use the hash location option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withHashLocation())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n * @see {@link HashLocationStrategy}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withHashLocation() {\n const providers = [{\n provide: LocationStrategy,\n useClass: HashLocationStrategy\n }];\n return routerFeature(6 /* RouterFeatureKind.RouterHashLocationFeature */, providers);\n}\n/**\n * Provides a function which is called when a navigation error occurs.\n *\n * This function is run inside application's [injection context](guide/di/dependency-injection-context)\n * so you can use the [`inject`](api/core/inject) function.\n *\n * This function can return a `RedirectCommand` to convert the error to a redirect, similar to returning\n * a `UrlTree` or `RedirectCommand` from a guard. This will also prevent the `Router` from emitting\n * `NavigationError`; it will instead emit `NavigationCancel` with code NavigationCancellationCode.Redirect.\n * Return values other than `RedirectCommand` are ignored and do not change any behavior with respect to\n * how the `Router` handles the error.\n *\n * @usageNotes\n *\n * Basic example of how you can use the error handler option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withNavigationErrorHandler((e: NavigationError) =>\n * inject(MyErrorTracker).trackError(e)))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link NavigationError}\n * @see {@link core/inject}\n * @see {@link runInInjectionContext}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withNavigationErrorHandler(handler) {\n const providers = [{\n provide: NAVIGATION_ERROR_HANDLER,\n useValue: handler\n }];\n return routerFeature(7 /* RouterFeatureKind.NavigationErrorHandlerFeature */, providers);\n}\n/**\n * Enables binding information from the `Router` state directly to the inputs of the component in\n * `Route` configurations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable the feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withComponentInputBinding())\n * ]\n * }\n * );\n * ```\n *\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withComponentInputBinding() {\n const providers = [RoutedComponentInputBinder, {\n provide: INPUT_BINDER,\n useExisting: RoutedComponentInputBinder\n }];\n return routerFeature(8 /* RouterFeatureKind.ComponentInputBindingFeature */, providers);\n}\n/**\n * Enables view transitions in the Router by running the route activation and deactivation inside of\n * `document.startViewTransition`.\n *\n * Note: The View Transitions API is not available in all browsers. If the browser does not support\n * view transitions, the Router will not attempt to start a view transition and continue processing\n * the navigation as usual.\n *\n * @usageNotes\n *\n * Basic example of how you can enable the feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withViewTransitions())\n * ]\n * }\n * );\n * ```\n *\n * @returns A set of providers for use with `provideRouter`.\n * @see https://developer.chrome.com/docs/web-platform/view-transitions/\n * @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API\n * @experimental\n */\nfunction withViewTransitions(options) {\n const providers = [{\n provide: CREATE_VIEW_TRANSITION,\n useValue: createViewTransition\n }, {\n provide: VIEW_TRANSITION_OPTIONS,\n useValue: {\n skipNextTransition: !!options?.skipInitialTransition,\n ...options\n }\n }];\n return routerFeature(9 /* RouterFeatureKind.ViewTransitionsFeature */, providers);\n}\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent];\n/**\n * @docsNotRequired\n */\nconst ROUTER_FORROOT_GUARD = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'router duplicate forRoot guard' : 'ROUTER_FORROOT_GUARD');\n// TODO(atscott): All of these except `ActivatedRoute` are `providedIn: 'root'`. They are only kept\n// here to avoid a breaking change whereby the provider order matters based on where the\n// `RouterModule`/`RouterTestingModule` is imported. These can/should be removed as a \"breaking\"\n// change in a major version.\nconst ROUTER_PROVIDERS = [Location, {\n provide: UrlSerializer,\n useClass: DefaultUrlSerializer\n}, Router, ChildrenOutletContexts, {\n provide: ActivatedRoute,\n useFactory: rootRoute,\n deps: [Router]\n}, RouterConfigLoader,\n// Only used to warn when `provideRoutes` is used without `RouterModule` or `provideRouter`. Can\n// be removed when `provideRoutes` is removed.\ntypeof ngDevMode === 'undefined' || ngDevMode ? {\n provide: ROUTER_IS_PROVIDED,\n useValue: true\n} : []];\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\nlet RouterModule = /*#__PURE__*/(() => {\n class RouterModule {\n constructor(guard) {}\n /**\n * Creates and configures a module with all the router providers and directives.\n * Optionally sets up an application listener to perform an initial navigation.\n *\n * When registering the NgModule at the root, import as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @param routes An array of `Route` objects that define the navigation paths for the application.\n * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n * @return The new `NgModule`.\n *\n */\n static forRoot(routes, config) {\n return {\n ngModule: RouterModule,\n providers: [ROUTER_PROVIDERS, typeof ngDevMode === 'undefined' || ngDevMode ? config?.enableTracing ? withDebugTracing().ɵproviders : [] : [], {\n provide: ROUTES,\n multi: true,\n useValue: routes\n }, {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n }, {\n provide: ROUTER_CONFIGURATION,\n useValue: config ? config : {}\n }, config?.useHash ? provideHashLocationStrategy() : providePathLocationStrategy(), provideRouterScroller(), config?.preloadingStrategy ? withPreloading(config.preloadingStrategy).ɵproviders : [], config?.initialNavigation ? provideInitialNavigation(config) : [], config?.bindToComponentInputs ? withComponentInputBinding().ɵproviders : [], config?.enableViewTransitions ? withViewTransitions().ɵproviders : [], provideRouterInitializer()]\n };\n }\n /**\n * Creates a module with all the router directives and a provider registering routes,\n * without creating a new Router service.\n * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n * @return The new NgModule.\n *\n */\n static forChild(routes) {\n return {\n ngModule: RouterModule,\n providers: [{\n provide: ROUTES,\n multi: true,\n useValue: routes\n }]\n };\n }\n static {\n this.ɵfac = function RouterModule_Factory(t) {\n return new (t || RouterModule)(i0.ɵɵinject(ROUTER_FORROOT_GUARD, 8));\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: RouterModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return RouterModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * For internal use by `RouterModule` only. Note that this differs from `withInMemoryRouterScroller`\n * because it reads from the `ExtraOptions` which should not be used in the standalone world.\n */\nfunction provideRouterScroller() {\n return {\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const config = inject(ROUTER_CONFIGURATION);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, config);\n }\n };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` should\n// provide hash location directly via `{provide: LocationStrategy, useClass: HashLocationStrategy}`.\nfunction provideHashLocationStrategy() {\n return {\n provide: LocationStrategy,\n useClass: HashLocationStrategy\n };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` does not\n// need this at all because `PathLocationStrategy` is the default factory for `LocationStrategy`.\nfunction providePathLocationStrategy() {\n return {\n provide: LocationStrategy,\n useClass: PathLocationStrategy\n };\n}\nfunction provideForRootGuard(router) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n throw new ɵRuntimeError(4007 /* RuntimeErrorCode.FOR_ROOT_CALLED_TWICE */, `The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector.` + ` Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n// Note: For internal use only with `RouterModule`. Standalone router setup with `provideRouter`\n// users call `withXInitialNavigation` directly.\nfunction provideInitialNavigation(config) {\n return [config.initialNavigation === 'disabled' ? withDisabledInitialNavigation().ɵproviders : [], config.initialNavigation === 'enabledBlocking' ? withEnabledBlockingInitialNavigation().ɵproviders : []];\n}\n// TODO(atscott): This should not be in the public API\n/**\n * A DI token for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nconst ROUTER_INITIALIZER = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'Router Initializer' : '');\nfunction provideRouterInitializer() {\n return [\n // ROUTER_INITIALIZER token should be removed. It's public API but shouldn't be. We can just\n // have `getBootstrapListener` directly attached to APP_BOOTSTRAP_LISTENER.\n {\n provide: ROUTER_INITIALIZER,\n useFactory: getBootstrapListener\n }, {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useExisting: ROUTER_INITIALIZER\n }];\n}\n\n/**\n * Maps an array of injectable classes with canMatch functions to an array of equivalent\n * `CanMatchFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanMatch(providers) {\n return providers.map(provider => (...params) => inject(provider).canMatch(...params));\n}\n/**\n * Maps an array of injectable classes with canActivate functions to an array of equivalent\n * `CanActivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanActivate(providers) {\n return providers.map(provider => (...params) => inject(provider).canActivate(...params));\n}\n/**\n * Maps an array of injectable classes with canActivateChild functions to an array of equivalent\n * `CanActivateChildFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanActivateChild(providers) {\n return providers.map(provider => (...params) => inject(provider).canActivateChild(...params));\n}\n/**\n * Maps an array of injectable classes with canDeactivate functions to an array of equivalent\n * `CanDeactivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanDeactivate(providers) {\n return providers.map(provider => (...params) => inject(provider).canDeactivate(...params));\n}\n/**\n * Maps an injectable class with a resolve function to an equivalent `ResolveFn`\n * for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='Resolve'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToResolve(provider) {\n return (...params) => inject(provider).resolve(...params);\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n/**\n * @publicApi\n */\nconst VERSION = /*#__PURE__*/new Version('18.0.4');\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, EventType, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, RedirectCommand, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation, loadChildren as ɵloadChildren };\n","import * as i0 from '@angular/core';\nimport { NgZone, Injectable, Inject, LOCALE_ID, ElementRef, Optional, Self, SecurityContext } from '@angular/core';\nimport * as i3 from '@taiga-ui/cdk';\nimport { tuiZoneOptimized, TUI_WINDOW_SIZE, tuiZonefree, EMPTY_CLIENT_RECT, TuiDestroyService, tuiAssert, TUI_IS_WEBKIT } from '@taiga-ui/cdk';\nimport { TUI_MEDIA, TUI_SANITIZER, TUI_ICONS } from '@taiga-ui/core/tokens';\nimport * as i1 from 'rxjs';\nimport { Observable, of, BehaviorSubject, fromEvent, merge, timer, EMPTY } from 'rxjs';\nimport { map, distinctUntilChanged, shareReplay, startWith, share, finalize, takeUntil } from 'rxjs/operators';\nimport { WINDOW, ANIMATION_FRAME } from '@ng-web-apis/common';\nimport * as i2 from '@taiga-ui/core/abstract';\nimport { TuiPositionAccessor } from '@taiga-ui/core/abstract';\nimport * as i1$1 from '@angular/router';\nimport { RouterLinkActive } from '@angular/router';\nimport * as i1$2 from '@angular/platform-browser';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { tuiProcessIcon } from '@taiga-ui/core/utils/dom';\n\n/**\n * Service to provide the current breakpoint based on Taiga UI's media queries\n */\nlet TuiBreakpointService = /*#__PURE__*/(() => {\n class TuiBreakpointService extends Observable {\n constructor(media, ngZone, size$) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.media = media;\n this.ngZone = ngZone;\n this.size$ = size$;\n this.sorted = Object.values(this.media).sort((a, b) => a - b);\n this.invert = Object.keys(this.media).reduce((ret, key) => Object.assign(Object.assign({}, ret), {\n [this.media[key]]: key\n }), {});\n this.stream$ = this.size$.pipe(map(({\n width\n }) => this.sorted.find(size => size > width)), map(key => this.invert[key || this.sorted[this.sorted.length - 1]]), distinctUntilChanged(), tuiZoneOptimized(this.ngZone), shareReplay({\n bufferSize: 1,\n refCount: true\n }));\n }\n }\n TuiBreakpointService.ɵfac = function TuiBreakpointService_Factory(t) {\n return new (t || TuiBreakpointService)(i0.ɵɵinject(TUI_MEDIA), i0.ɵɵinject(NgZone), i0.ɵɵinject(TUI_WINDOW_SIZE));\n };\n TuiBreakpointService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiBreakpointService,\n factory: TuiBreakpointService.ɵfac,\n providedIn: 'root'\n });\n return TuiBreakpointService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFormatDateService = /*#__PURE__*/(() => {\n class TuiFormatDateService {\n constructor(locale) {\n this.locale = locale;\n }\n format(timestamp) {\n return of(new Date(timestamp).toLocaleTimeString(this.locale, {\n hour: 'numeric',\n minute: '2-digit'\n }));\n }\n }\n TuiFormatDateService.ɵfac = function TuiFormatDateService_Factory(t) {\n return new (t || TuiFormatDateService)(i0.ɵɵinject(LOCALE_ID));\n };\n TuiFormatDateService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiFormatDateService,\n factory: TuiFormatDateService.ɵfac,\n providedIn: 'root'\n });\n return TuiFormatDateService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Service for displaying hints/tooltips\n */\nlet TuiHintService = /*#__PURE__*/(() => {\n class TuiHintService extends BehaviorSubject {\n constructor() {\n super([]);\n }\n add(directive) {\n this.next(this.value.concat(directive));\n }\n remove(directive) {\n if (this.value.includes(directive)) {\n this.next(this.value.filter(hint => hint !== directive));\n }\n }\n }\n TuiHintService.ɵfac = function TuiHintService_Factory(t) {\n return new (t || TuiHintService)();\n };\n TuiHintService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiHintService,\n factory: TuiHintService.ɵfac,\n providedIn: 'root'\n });\n return TuiHintService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiNightThemeService = /*#__PURE__*/(() => {\n class TuiNightThemeService extends Observable {\n constructor(win) {\n const media = win.matchMedia('(prefers-color-scheme: dark)');\n const media$ = fromEvent(media, 'change').pipe(startWith(null), map(() => media.matches), share());\n super(subscriber => media$.subscribe(subscriber));\n }\n }\n TuiNightThemeService.ɵfac = function TuiNightThemeService_Factory(t) {\n return new (t || TuiNightThemeService)(i0.ɵɵinject(WINDOW));\n };\n TuiNightThemeService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiNightThemeService,\n factory: TuiNightThemeService.ɵfac,\n providedIn: 'root'\n });\n return TuiNightThemeService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPositionService = /*#__PURE__*/(() => {\n class TuiPositionService extends Observable {\n constructor(\n // Destructuring here causes memory leak\n el, animationFrame, zone, accessor) {\n super(subscriber => animationFrame.pipe(map(() => el.nativeElement.getBoundingClientRect()), map(rect => accessor.getPosition(rect)), tuiZonefree(zone), finalize(() => accessor.getPosition(EMPTY_CLIENT_RECT))).subscribe(subscriber));\n }\n }\n TuiPositionService.ɵfac = function TuiPositionService_Factory(t) {\n return new (t || TuiPositionService)(i0.ɵɵinject(ElementRef), i0.ɵɵinject(ANIMATION_FRAME), i0.ɵɵinject(NgZone), i0.ɵɵinject(TuiPositionAccessor));\n };\n TuiPositionService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiPositionService,\n factory: TuiPositionService.ɵfac\n });\n return TuiPositionService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// TODO: Remove when Angular is update and `RouterLinkActive` has output\nlet TuiRouterLinkActiveService = /*#__PURE__*/(() => {\n class TuiRouterLinkActiveService extends Observable {\n constructor(routerLinkActive, zone, animationFrame$, destroy$) {\n const stream$ = routerLinkActive ? merge(timer(0),\n // SSR (animationFrame$ never emits value during SSR)\n animationFrame$).pipe(map(() => routerLinkActive.isActive), distinctUntilChanged(), tuiZoneOptimized(zone), takeUntil(destroy$)) : EMPTY;\n super(subscriber => stream$.subscribe(subscriber));\n }\n }\n TuiRouterLinkActiveService.ɵfac = function TuiRouterLinkActiveService_Factory(t) {\n return new (t || TuiRouterLinkActiveService)(i0.ɵɵinject(RouterLinkActive, 8), i0.ɵɵinject(NgZone), i0.ɵɵinject(ANIMATION_FRAME), i0.ɵɵinject(TuiDestroyService, 2));\n };\n TuiRouterLinkActiveService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiRouterLinkActiveService,\n factory: TuiRouterLinkActiveService.ɵfac\n });\n return TuiRouterLinkActiveService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Service for reusing SVGs without inlining each instance\n */\nlet TuiSvgService = /*#__PURE__*/(() => {\n class TuiSvgService {\n constructor(tuiSanitizer, sanitizer, icons) {\n this.tuiSanitizer = tuiSanitizer;\n this.sanitizer = sanitizer;\n this.originals = {};\n this.items$ = new BehaviorSubject(new Map());\n this.define(icons);\n }\n define(icons) {\n const {\n value\n } = this.items$;\n Object.keys(icons).forEach(key => {\n this.defineIcon(key, icons[key], value);\n });\n this.items$.next(value);\n }\n getOriginal(name) {\n return this.originals[name] || null;\n }\n defineIcon(name, src, map) {\n if (map.has(name)) {\n return;\n }\n const parsed = this.parseSrc(name, src);\n if (!parsed) {\n ngDevMode && tuiAssert.assert(false, 'Unable to parse given SVG src');\n return;\n }\n map.set(name, parsed);\n this.originals = Object.assign(Object.assign({}, this.originals), {\n [name]: src\n });\n }\n parseSrc(name, src) {\n return this.sanitize(tuiProcessIcon(src, name));\n }\n sanitize(src) {\n return this.sanitizer.bypassSecurityTrustHtml((this.tuiSanitizer ? this.tuiSanitizer.sanitize(SecurityContext.HTML, src) : this.sanitizer.sanitize(SecurityContext.HTML, src)) || '');\n }\n }\n TuiSvgService.ɵfac = function TuiSvgService_Factory(t) {\n return new (t || TuiSvgService)(i0.ɵɵinject(TUI_SANITIZER, 8), i0.ɵɵinject(DomSanitizer), i0.ɵɵinject(TUI_ICONS));\n };\n TuiSvgService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiSvgService,\n factory: TuiSvgService.ɵfac,\n providedIn: 'root'\n });\n return TuiSvgService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiVisualViewportService = /*#__PURE__*/(() => {\n class TuiVisualViewportService {\n constructor(win, isWebkit) {\n this.win = win;\n this.isWebkit = isWebkit;\n }\n // https://bugs.webkit.org/show_bug.cgi?id=207089\n correct([y, x]) {\n return [this.correctY(y), this.correctX(x)];\n }\n correctX(x) {\n var _a, _b;\n return this.isWebkit ? x + ((_b = (_a = this.win.visualViewport) === null || _a === void 0 ? void 0 : _a.offsetLeft) !== null && _b !== void 0 ? _b : 0) : x;\n }\n correctY(y) {\n var _a, _b;\n return this.isWebkit ? y + ((_b = (_a = this.win.visualViewport) === null || _a === void 0 ? void 0 : _a.offsetTop) !== null && _b !== void 0 ? _b : 0) : y;\n }\n }\n TuiVisualViewportService.ɵfac = function TuiVisualViewportService_Factory(t) {\n return new (t || TuiVisualViewportService)(i0.ɵɵinject(WINDOW), i0.ɵɵinject(TUI_IS_WEBKIT));\n };\n TuiVisualViewportService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiVisualViewportService,\n factory: TuiVisualViewportService.ɵfac,\n providedIn: 'root'\n });\n return TuiVisualViewportService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiBreakpointService, TuiFormatDateService, TuiHintService, TuiNightThemeService, TuiPositionService, TuiRouterLinkActiveService, TuiSvgService, TuiVisualViewportService };\n","import { __decorate } from 'tslib';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, InjectionToken, SkipSelf, Optional, SecurityContext, ElementRef, Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';\nimport * as i4 from '@angular/platform-browser';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { WINDOW } from '@ng-web-apis/common';\nimport * as i1 from '@taiga-ui/cdk';\nimport { tuiSvgLinearGradientProcessor, tuiCreateTokenFromFactory, tuiIsString, tuiAssert, tuiGetDocumentOrShadowRoot, TuiStaticRequestService, TUI_BASE_HREF, tuiPure, TuiLetModule } from '@taiga-ui/cdk';\nimport { TUI_CACHE_BUSTING_PAYLOAD, TUI_ICON_ERROR } from '@taiga-ui/core/constants';\nimport * as i3 from '@taiga-ui/core/services';\nimport { TuiSvgService } from '@taiga-ui/core/services';\nimport { TUI_DEFAULT_ICONS_PLACE, TUI_ICONS_PLACE, TUI_ICONS_PATH, TUI_SVG_SRC_PROCESSOR, TUI_SVG_CONTENT_PROCESSOR, TUI_SANITIZER } from '@taiga-ui/core/tokens';\nimport { tuiIsPresumedHTMLString } from '@taiga-ui/core/utils/miscellaneous';\nimport { identity, ReplaySubject, of } from 'rxjs';\nimport { switchMap, startWith, catchError, map } from 'rxjs/operators';\nimport { tuiIconsPathFactory } from '@taiga-ui/core/utils';\nfunction TuiSvgComponent_ng_container_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 3);\n }\n if (rf & 2) {\n const innerHTML_r1 = i0.ɵɵnextContext().tuiLet;\n i0.ɵɵproperty(\"innerHTML\", innerHTML_r1, i0.ɵɵsanitizeHtml);\n }\n}\nfunction TuiSvgComponent_ng_container_0_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 4);\n i0.ɵɵlistener(\"error\", function TuiSvgComponent_ng_container_0_ng_template_2_Template_svg_error_0_listener() {\n i0.ɵɵrestoreView(_r2);\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.onError());\n });\n i0.ɵɵelement(1, \"use\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"href\", ctx_r2.use, null, \"xlink\");\n }\n}\nfunction TuiSvgComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiSvgComponent_ng_container_0_div_1_Template, 1, 1, \"div\", 2)(2, TuiSvgComponent_ng_container_0_ng_template_2_Template, 2, 1, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const useTemplate_r4 = i0.ɵɵreference(3);\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isInnerHTML)(\"ngIfElse\", useTemplate_r4);\n }\n}\nconst TUI_DEPRECATED_ICONS = {\n tuiIconAttach: 'tuiIconPaperclip',\n tuiIconAttention: 'tuiIconAlertCircle',\n tuiIconBackCircle: 'tuiIconArrowLeftCircle',\n tuiIconCall: 'tuiIconPhone',\n tuiIconCallIn: 'tuiIconPhoneIncoming',\n tuiIconCallOut: 'tuiIconPhoneOutgoing',\n tuiIconCallTransfer: 'tuiIconPhoneForwarded',\n tuiIconCancel: 'tuiIconXCircle',\n tuiIconCancelCircle: 'tuiIconSlash',\n tuiIconCard: 'tuiIconCreditCard',\n tuiIconCards: 'tuiIconCreditCard',\n tuiIconChartBar: 'tuiIconBarChart',\n tuiIconChart: 'tuiIconBarChart',\n tuiIconCheckList: 'tuiIconClipboard',\n tuiIconCloseCircle: 'tuiIconXCircle',\n tuiIconCollapse: 'tuiIconMinimize',\n tuiIconComment: 'tuiIconMessageSquare',\n tuiIconCommentFw: 'tuiIconMessageForward',\n tuiIconCompany: 'tuiIconBriefcase',\n tuiIconDefaultDoc: 'tuiIconFile',\n tuiIconDesktop: 'tuiIconMonitor',\n tuiIconDesktopOff: 'tuiIconMonitorOff',\n tuiIconDislike: 'tuiIconThumbsDown',\n tuiIconDone: 'tuiIconCheckCircle',\n tuiIconDraft: 'tuiIconEdit2',\n tuiIconEyeOpen: 'tuiIconEye',\n tuiIconEyeClosed: 'tuiIconEyeOff',\n tuiIconExpand: 'tuiIconMaximize',\n tuiIconExternal: 'tuiIconExternalLink',\n tuiIconFrame: 'tuiIconLayout',\n tuiIconGeo: 'tuiIconMapPin',\n tuiIconHeartFilled: 'tuiIconHeart',\n tuiIconHide: 'tuiIconEyeOff',\n tuiIconImg: 'tuiIconImage',\n tuiIconInfoCircle: 'tuiIconInfo',\n tuiIconLike: 'tuiIconThumbsUp',\n tuiIconLockOpen: 'tuiIconUnlock',\n tuiIconMobile: 'tuiIconSmartphone',\n tuiIconMoreHor: 'tuiIconMoreHorizontal',\n tuiIconMoreVer: 'tuiIconMoreVertical',\n tuiIconMoreVert: 'tuiIconMoreVertical',\n tuiIconPicture: 'tuiIconImage',\n tuiIconPin: 'tuiIconMapPin',\n tuiIconPrint: 'tuiIconPrinter',\n tuiIconRefresh: 'tuiIconRefreshCw',\n tuiIconRemove: 'tuiIconX',\n tuiIconShow: 'tuiIconEye',\n tuiIconSound: 'tuiIconVolume',\n tuiIconSoundOff: 'tuiIconVolumeX',\n tuiIconStarFilled: 'tuiIconStar',\n tuiIconStop: 'tuiIconSquare',\n tuiIconStructure: 'tuiIconGrid',\n tuiIconTime: 'tuiIconClock',\n tuiIconTooltip: 'tuiIconHelpCircle',\n tuiIconViewList: 'tuiIconList',\n tuiIconWifiOn: 'tuiIconWifi'\n};\nconst TUI_SVG_DEFAULT_OPTIONS = {\n iconsPlace: TUI_DEFAULT_ICONS_PLACE,\n path: tuiIconsPathFactory(TUI_DEFAULT_ICONS_PLACE),\n srcProcessor: identity,\n contentProcessor: tuiSvgLinearGradientProcessor,\n deprecated: src => {\n const oldIcon = src.replace('Large', '').replace('Outline', '');\n const newIcon = TUI_DEPRECATED_ICONS[oldIcon];\n return newIcon ? `${oldIcon}/(Large|Outline) is deprecated, use ${newIcon}/(Large|Outline) instead` : '';\n }\n};\n/**\n * SVG component options\n */\nconst TUI_SVG_OPTIONS = tuiCreateTokenFromFactory(() => ({\n iconsPlace: inject(TUI_ICONS_PLACE),\n path: inject(TUI_ICONS_PATH),\n deprecated: TUI_SVG_DEFAULT_OPTIONS.deprecated,\n srcProcessor: inject(TUI_SVG_SRC_PROCESSOR),\n contentProcessor: inject(TUI_SVG_CONTENT_PROCESSOR)\n}));\nconst TUI_SVG_SRC_INTERCEPTORS = new InjectionToken('[TUI_SVG_SRC_INTERCEPTORS]');\nfunction tuiSvgSrcInterceptors(interceptor) {\n return {\n provide: TUI_SVG_SRC_INTERCEPTORS,\n useValue: interceptor,\n multi: true\n };\n}\nconst tuiSvgOptionsProvider = options => ({\n provide: TUI_SVG_OPTIONS,\n deps: [[new SkipSelf(), new Optional(), TUI_SVG_OPTIONS], [new Optional(), TUI_ICONS_PLACE], [new Optional(), TUI_ICONS_PATH], [new Optional(), TUI_SVG_SRC_PROCESSOR], [new Optional(), TUI_SVG_CONTENT_PROCESSOR]],\n useFactory: (fallback, iconsPlace, path, srcProcessor, contentProcessor) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\n return {\n iconsPlace: (_c = (_b = (_a = options.iconsPlace) !== null && _a !== void 0 ? _a : fallback === null || fallback === void 0 ? void 0 : fallback.iconsPlace) !== null && _b !== void 0 ? _b : iconsPlace) !== null && _c !== void 0 ? _c : TUI_SVG_DEFAULT_OPTIONS.iconsPlace,\n path: tuiIsString(options.path) ? tuiIconsPathFactory(options.path) : (_f = (_e = (_d = options.path) !== null && _d !== void 0 ? _d : fallback === null || fallback === void 0 ? void 0 : fallback.path) !== null && _e !== void 0 ? _e : path) !== null && _f !== void 0 ? _f : TUI_SVG_DEFAULT_OPTIONS.path,\n deprecated: (_h = (_g = options.deprecated) !== null && _g !== void 0 ? _g : fallback === null || fallback === void 0 ? void 0 : fallback.deprecated) !== null && _h !== void 0 ? _h : TUI_SVG_DEFAULT_OPTIONS.deprecated,\n srcProcessor: (_l = (_k = (_j = options.srcProcessor) !== null && _j !== void 0 ? _j : fallback === null || fallback === void 0 ? void 0 : fallback.srcProcessor) !== null && _k !== void 0 ? _k : srcProcessor) !== null && _l !== void 0 ? _l : TUI_SVG_DEFAULT_OPTIONS.srcProcessor,\n contentProcessor: (_p = (_o = (_m = options.contentProcessor) !== null && _m !== void 0 ? _m : fallback === null || fallback === void 0 ? void 0 : fallback.contentProcessor) !== null && _o !== void 0 ? _o : contentProcessor) !== null && _p !== void 0 ? _p : TUI_SVG_DEFAULT_OPTIONS.contentProcessor\n };\n }\n});\nconst UNDEFINED_NAMED_ICON = 'Attempted to use undefined named icon';\nconst MISSING_EXTERNAL_ICON = 'External icon is missing on the given URL';\nconst FAILED_EXTERNAL_ICON = 'Failed to load external SVG';\n// TODO: Consider moving to CDK along with SvgService and SvgDefsHostComponent\nlet TuiSvgComponent = /*#__PURE__*/(() => {\n class TuiSvgComponent {\n constructor(doc, win, options, srcInterceptors, tuiSanitizer, svgService, staticRequestService, sanitizer, el, baseHref) {\n this.doc = doc;\n this.win = win;\n this.options = options;\n this.srcInterceptors = srcInterceptors;\n this.tuiSanitizer = tuiSanitizer;\n this.svgService = svgService;\n this.staticRequestService = staticRequestService;\n this.sanitizer = sanitizer;\n this.el = el;\n this.baseHref = baseHref;\n this.src$ = new ReplaySubject(1);\n this.icon = '';\n this.innerHTML$ = this.src$.pipe(switchMap(() => {\n if (tuiIsString(this.icon)) {\n return this.isExternal ? this.getExternalIcon(this.icon) : of(this.getSafeHtml(this.icon));\n }\n return of(this.icon);\n }), startWith(''));\n }\n set src(src) {\n var _a;\n const deprecated = this.options.deprecated(String(src));\n ngDevMode && tuiAssert.assert(!deprecated, deprecated);\n this.icon = ((_a = this.srcInterceptors) !== null && _a !== void 0 ? _a : []).reduce((newSrc, interceptor) => interceptor(newSrc, this.options), this.options.srcProcessor(src || ''));\n this.src$.next();\n }\n get src() {\n return this.icon;\n }\n get use() {\n if (tuiIsString(this.icon)) {\n return this.icon.includes('.svg#') ? this.icon : this.resolveName(this.icon, this.options.path);\n }\n return '';\n }\n get isInnerHTML() {\n return !tuiIsString(this.icon) || this.isSrc || this.isExternal || this.isName && this.isShadowDOM;\n }\n get isShadowDOM() {\n return tuiGetDocumentOrShadowRoot(this.el.nativeElement) !== this.doc;\n }\n get isUse() {\n return this.use.replace(TUI_CACHE_BUSTING_PAYLOAD, '').includes('.svg#');\n }\n get isExternal() {\n return this.isUrl || this.isCrossDomain;\n }\n get isUrl() {\n return tuiIsString(this.icon) && this.icon.replace(TUI_CACHE_BUSTING_PAYLOAD, '').endsWith('.svg');\n }\n get isSrc() {\n return tuiIsString(this.icon) && tuiIsPresumedHTMLString(this.icon);\n }\n get isName() {\n return !this.isUrl && !this.isUse && !this.isSrc;\n }\n get isCrossDomain() {\n const {\n use,\n isUse,\n win\n } = this;\n return isUse && use.startsWith('http') && !!win.origin && !use.startsWith(win.origin);\n }\n onError(message = MISSING_EXTERNAL_ICON) {\n const {\n icon\n } = this;\n const event = new CustomEvent(TUI_ICON_ERROR, {\n bubbles: true,\n detail: {\n message,\n icon: icon\n }\n });\n ngDevMode && tuiAssert.assert(false, message, icon);\n this.el.nativeElement.dispatchEvent(event);\n }\n resolveName(name, iconsPath) {\n return iconsPath(name, this.baseHref);\n }\n getSafeHtml(src) {\n return this.isSrc ? this.sanitize(src) : this.process(src);\n }\n process(src) {\n const icon = this.svgService.getOriginal(src);\n if (this.isName && !icon && !!src) {\n this.onError(UNDEFINED_NAMED_ICON);\n }\n // Empty line for innerHTML when icon is shown through USE tag\n return !this.isShadowDOM || !this.isName ? '' : this.sanitize(icon || '');\n }\n sanitize(src) {\n src = this.options.contentProcessor(src);\n return this.tuiSanitizer && tuiIsString(src) ? this.sanitizer.bypassSecurityTrustHtml(this.tuiSanitizer.sanitize(SecurityContext.HTML, src) || '') : src;\n }\n getExternalIcon(src) {\n const url = src.includes('.svg') ? src : this.use;\n return this.staticRequestService.request(url).pipe(catchError(() => {\n this.onError(FAILED_EXTERNAL_ICON);\n return of('');\n }), map(response => this.sanitize(response.replace(' {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiSvgModule = /*#__PURE__*/(() => {\n class TuiSvgModule {}\n TuiSvgModule.ɵfac = function TuiSvgModule_Factory(t) {\n return new (t || TuiSvgModule)();\n };\n TuiSvgModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiSvgModule\n });\n TuiSvgModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiLetModule]]\n });\n return TuiSvgModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_DEPRECATED_ICONS, TUI_SVG_DEFAULT_OPTIONS, TUI_SVG_OPTIONS, TUI_SVG_SRC_INTERCEPTORS, TuiSvgComponent, TuiSvgModule, tuiSvgOptionsProvider, tuiSvgSrcInterceptors };\n","import { trigger, transition, style, animate, query, stagger } from '@angular/animations';\nconst TRANSITION = '{{duration}}ms ease-in-out';\nconst DURATION = {\n params: {\n duration: 300\n }\n};\nconst STAGGER = 300;\nconst tuiHeightCollapse = trigger('tuiHeightCollapse', [transition(':enter', [style({\n height: 0\n}), animate(TRANSITION, style({\n height: '*'\n}))], DURATION), transition(':leave', [style({\n height: '*'\n}), animate(TRANSITION, style({\n height: 0\n}))], DURATION)]);\nconst tuiHeightCollapseList = trigger('tuiHeightCollapseList', [transition('* => *', [query(':enter', [style({\n height: 0\n}), stagger(STAGGER, [animate(TRANSITION, style({\n height: '*'\n}))])], {\n optional: true\n}), query(':leave', [style({\n height: '*'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n height: 0\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiWidthCollapse = trigger('tuiWidthCollapse', [transition(':enter', [style({\n width: 0\n}), animate(TRANSITION, style({\n width: '*'\n}))], DURATION), transition(':leave', [style({\n width: '*'\n}), animate(TRANSITION, style({\n width: 0\n}))], DURATION)]);\nconst tuiWidthCollapseList = trigger('tuiWidthCollapseList', [transition('* => *', [query(':enter', [style({\n width: 0\n}), stagger(STAGGER, [animate(TRANSITION, style({\n width: '*'\n}))])], {\n optional: true\n}), query(':leave', [style({\n width: '*'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n width: 0\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiFadeIn = trigger('tuiFadeIn', [transition(':enter', [style({\n opacity: 0\n}), animate(TRANSITION, style({\n opacity: 1\n}))], DURATION), transition(':leave', [style({\n opacity: 1\n}), animate(TRANSITION, style({\n opacity: 0\n}))], DURATION)]);\nconst tuiFadeInList = trigger('tuiFadeInList', [transition('* => *', [query(':enter', [style({\n opacity: 0\n}), stagger(STAGGER, [animate(TRANSITION, style({\n opacity: 1\n}))])], {\n optional: true\n}), query(':leave', [style({\n opacity: 1\n}), stagger(STAGGER, [animate(TRANSITION, style({\n opacity: 0\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiFadeInTop = trigger('tuiFadeInTop', [transition(':enter', [style({\n transform: 'translateY(-10px)',\n opacity: 0\n}), animate(TRANSITION, style({\n transform: 'translateY(0)',\n opacity: 1\n}))], DURATION), transition(':leave', [style({\n transform: 'translateY(0)',\n opacity: 1\n}), animate(TRANSITION, style({\n transform: 'translateY(-10px)',\n opacity: 0\n}))], DURATION)]);\nconst tuiFadeInBottom = trigger('tuiFadeInBottom', [transition(':enter', [style({\n transform: 'translateY(10px)',\n opacity: 0\n}), animate(TRANSITION, style({\n transform: 'translateY(0)',\n opacity: 1\n}))], DURATION), transition(':leave', [style({\n transform: 'translateY(0)',\n opacity: 1\n}), animate(TRANSITION, style({\n transform: 'translateY(10px)',\n opacity: 0\n}))], DURATION)]);\nconst tuiDropdownAnimation = trigger('tuiDropdownAnimation', [transition(':enter', [style({\n transform: 'translateY(-10px)',\n opacity: 0\n}), animate(TRANSITION, style({\n transform: 'translateY(0)',\n opacity: 1\n}))], DURATION), transition(':leave', [style({\n transform: 'translateY(0)',\n opacity: 1\n}), animate(TRANSITION, style({\n transform: 'translateY(-10px)',\n opacity: 0\n}))], DURATION)]);\nconst tuiScaleIn = trigger('tuiScaleIn', [transition(':enter', [style({\n transform: 'scale(0)'\n}), animate(TRANSITION, style({\n transform: 'scale(1)'\n}))], DURATION), transition(':leave', [style({\n transform: 'scale(1)'\n}), animate(TRANSITION, style({\n transform: 'scale(0)'\n}))], DURATION)]);\nconst tuiPop = trigger('tuiPop', [transition(':enter', [style({\n transform: 'scale(0)'\n}), animate(TRANSITION, style({\n transform: 'scale(1.1)'\n})), animate(TRANSITION, style({\n transform: 'scale(1)'\n}))], DURATION), transition(':leave', [style({\n transform: 'scale(1)'\n}), animate(TRANSITION, style({\n transform: 'scale(1.1)'\n})), animate(TRANSITION, style({\n transform: 'scale(0)'\n}))], DURATION)]);\nconst tuiScaleInList = trigger('tuiScaleInList', [transition('* => *', [query(':enter', [style({\n transform: 'scale(0)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'scale(1)'\n}))])], {\n optional: true\n}), query(':leave', [style({\n transform: 'scale(1)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'scale(0)'\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiSlideIn = trigger('tuiSlideIn', [transition('* => left', [style({\n transform: 'translateX(-100%)'\n}), animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))], DURATION), transition('left => *', [style({\n transform: 'translateX(0)'\n}), animate(TRANSITION, style({\n transform: 'translateX(-100%)'\n}))], DURATION), transition('* => right', [style({\n transform: 'translateX(100%)'\n}), animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))], DURATION), transition('right => *', [style({\n transform: 'translateX(0)'\n}), animate(TRANSITION, style({\n transform: 'translateX(100%)'\n}))], DURATION)]);\nconst tuiSlideInLeft = trigger('tuiSlideInLeft', [transition(':enter', [style({\n transform: 'translateX(-100%)'\n}), animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))], DURATION), transition(':leave', [style({\n transform: 'translateX(0)'\n}), animate(TRANSITION, style({\n transform: 'translateX(-100%)'\n}))], DURATION)]);\nconst tuiSlideInLeftList = trigger('tuiSlideInLeftList', [transition('* => *', [query(':enter', [style({\n transform: 'translateX(-100%)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))])], {\n optional: true\n}), query(':leave', [style({\n transform: 'translateX(0)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateX(-100%)'\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiSlideInRight = trigger('tuiSlideInRight', [transition(':enter', [style({\n transform: 'translateX(100%)'\n}), animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))], DURATION), transition(':leave', [style({\n transform: 'translateX(0)'\n}), animate(TRANSITION, style({\n transform: 'translateX(100%)'\n}))], DURATION)]);\nconst tuiSlideInRightList = trigger('tuiSlideInRightList', [transition('* => *', [query(':enter', [style({\n transform: 'translateX(100%)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))])], {\n optional: true\n}), query(':leave', [style({\n transform: 'translateX(0)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateX(100%)'\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiSlideInTop = trigger('tuiSlideInTop', [transition(':enter', [style({\n transform: 'translate3d(0,{{start}},0)'\n}), animate(TRANSITION, style({\n transform: 'translate3d(0,{{end}},0)'\n}))], {\n params: {\n end: 0,\n start: '100%',\n duration: 300\n }\n}), transition(':leave', [style({\n transform: 'translate3d(0,{{end}},0)',\n pointerEvents: 'none'\n}), animate(TRANSITION, style({\n transform: 'translate3d(0,{{start}},0)'\n}))], {\n params: {\n end: 0,\n start: '100%',\n duration: 300\n }\n})]);\nconst tuiSlideInTopList = trigger('tuiSlideInTopList', [transition('* => *', [query(':enter', [style({\n transform: 'translateY(100%)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateY(0)'\n}))])], {\n optional: true\n}), query(':leave', [style({\n transform: 'translateY(0)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateY(100%)'\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiSlideInBottom = trigger('tuiSlideInBottom', [transition(':enter', [style({\n transform: 'translateY(-100%)'\n}), animate(TRANSITION, style({\n transform: 'translateY(0)'\n}))], DURATION), transition(':leave', [style({\n transform: 'translateY(0)'\n}), animate(TRANSITION, style({\n transform: 'translateY(-100%)'\n}))], DURATION)]);\nconst tuiSlideInBottomList = trigger('tuiSlideInBottomList', [transition('* => *', [query(':enter', [style({\n transform: 'translateY(-100%)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateY(0)'\n}))])], {\n optional: true\n}), query(':leave', [style({\n transform: 'translateY(0)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateY(-100%)'\n}))])], {\n optional: true\n})], DURATION)]);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiDropdownAnimation, tuiFadeIn, tuiFadeInBottom, tuiFadeInList, tuiFadeInTop, tuiHeightCollapse, tuiHeightCollapseList, tuiPop, tuiScaleIn, tuiScaleInList, tuiSlideIn, tuiSlideInBottom, tuiSlideInBottomList, tuiSlideInLeft, tuiSlideInLeftList, tuiSlideInRight, tuiSlideInRightList, tuiSlideInTop, tuiSlideInTopList, tuiWidthCollapse, tuiWidthCollapseList };\n","import * as i0 from '@angular/core';\nimport { Directive, Input, NgModule } from '@angular/core';\nimport { AbstractTuiController } from '@taiga-ui/cdk';\nlet TuiModeDirective = /*#__PURE__*/(() => {\n class TuiModeDirective extends AbstractTuiController {\n constructor() {\n super(...arguments);\n this.mode = null;\n }\n }\n TuiModeDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiModeDirective_BaseFactory;\n return function TuiModeDirective_Factory(t) {\n return (ɵTuiModeDirective_BaseFactory || (ɵTuiModeDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiModeDirective)))(t || TuiModeDirective);\n };\n })();\n TuiModeDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiModeDirective,\n selectors: [[\"\", \"tuiMode\", \"\"]],\n inputs: {\n mode: [0, \"tuiMode\", \"mode\"]\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return TuiModeDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiModeModule = /*#__PURE__*/(() => {\n class TuiModeModule {}\n TuiModeModule.ɵfac = function TuiModeModule_Factory(t) {\n return new (t || TuiModeModule)();\n };\n TuiModeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiModeModule\n });\n TuiModeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiModeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiModeDirective, TuiModeModule };\n","import { SkipSelf, ElementRef, Optional } from '@angular/core';\nimport { TUI_IS_MOBILE_RES, TUI_MODE } from '@taiga-ui/core/tokens';\nimport { TuiModeDirective } from '@taiga-ui/core/directives/mode';\nimport { of } from 'rxjs';\nimport { startWith, map, takeUntil } from 'rxjs/operators';\nimport { tuiWatch } from '@taiga-ui/cdk';\n\n/**\n * @deprecated: drop in v4.0\n */\nconst TUI_IS_MOBILE_RES_PROVIDER = {\n provide: TUI_IS_MOBILE_RES,\n deps: [[new SkipSelf(), TUI_IS_MOBILE_RES], ElementRef],\n useFactory: (mobile$, {\n nativeElement\n }) => {\n nativeElement['$.class._mobile'] = mobile$;\n return mobile$;\n }\n};\nconst MODE_PROVIDER = {\n provide: TUI_MODE,\n deps: [[new Optional(), TuiModeDirective], ElementRef],\n useFactory: (mode, {\n nativeElement\n }) => {\n const mode$ = mode ? mode.change$.pipe(startWith(null), map(() => mode.mode)) : of(null);\n nativeElement['$.data-mode.attr'] = mode$;\n return mode$;\n }\n};\nfunction tuiWatchedControllerFactory(controller, cdr, destroy$) {\n controller.change$.pipe(tuiWatch(cdr), takeUntil(destroy$)).subscribe();\n return controller;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MODE_PROVIDER, TUI_IS_MOBILE_RES_PROVIDER, tuiWatchedControllerFactory };\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 */\nconst _c0 = [\"*\"];\nfunction TuiScrollbarComponent_tui_scroll_controls_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-scroll-controls\", 2);\n }\n}\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.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 delegated() {\n return this.browserScrollRef.nativeElement !== 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.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: 3,\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 i0.ɵɵadvance();\n i0.ɵɵclassProp(\"t-content_delegated\", ctx.delegated);\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-content_delegated[_ngcontent-%COMP%]{height:100%}.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 { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';\nimport * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, inject, NgModule, Inject } from '@angular/core';\nimport { EMPTY, concat, defer } from 'rxjs';\nimport { takeWhile } from 'rxjs/operators';\nimport { DOCUMENT } from '@angular/common';\nfunction dasharize(camel) {\n return camel.replace(/[a-z][A-Z]/g, letterLetter => {\n return `${letterLetter[0]}-${letterLetter[1].toLowerCase()}`;\n });\n}\nclass AbstractEventPlugin {\n supports(event) {\n return event.includes(this.modifier);\n }\n /** This is not used in Ivy anymore */\n addGlobalEventListener() {\n return () => {};\n }\n unwrap(event) {\n return event.split('.').filter(v => !this.modifier.includes(v)).join('.');\n }\n}\nlet BindEventPlugin = /*#__PURE__*/(() => {\n class BindEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '$';\n }\n addEventListener(element, event) {\n element[event] = element[event] || EMPTY;\n const method = this.getMethod(element, event);\n const zone$ = this.manager.getZone().onStable;\n const sub = concat(zone$.pipe(takeWhile(() => element[event] === EMPTY)), defer(() => element[event])).subscribe(method);\n return () => sub.unsubscribe();\n }\n getMethod(element, event) {\n const [, key, value, unit = ''] = event.split('.');\n if (event.endsWith('.attr')) {\n return v => v === null ? element.removeAttribute(key) : element.setAttribute(key, String(v));\n }\n if (key === 'class') {\n return v => element.classList.toggle(value, !!v);\n }\n if (key === 'style') {\n return v => element.style.setProperty(dasharize(value), `${v}${unit}`);\n }\n return v => element[key] = v;\n }\n }\n /** @nocollapse */\n /** @nocollapse */BindEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵBindEventPlugin_BaseFactory;\n return function BindEventPlugin_Factory(t) {\n return (ɵBindEventPlugin_BaseFactory || (ɵBindEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(BindEventPlugin)))(t || BindEventPlugin);\n };\n })();\n BindEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: BindEventPlugin,\n factory: BindEventPlugin.ɵfac\n });\n return BindEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst GLOBAL_HANDLER = new InjectionToken('[GLOBAL_HANDLER]: Global event target handler', {\n factory: () => {\n const document = inject(DOCUMENT);\n return name => name === 'body' ? document.body : document.defaultView[name] || document.createElement('div');\n }\n});\nlet GlobalEventPlugin = /*#__PURE__*/(() => {\n class GlobalEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.handler = inject(GLOBAL_HANDLER);\n this.modifier = '>';\n }\n addEventListener(_, event, handler) {\n return this.manager.addEventListener(this.handler(event.split('>')[0]), event.split('>')[1], handler);\n }\n }\n /** @nocollapse */\n /** @nocollapse */GlobalEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵGlobalEventPlugin_BaseFactory;\n return function GlobalEventPlugin_Factory(t) {\n return (ɵGlobalEventPlugin_BaseFactory || (ɵGlobalEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(GlobalEventPlugin)))(t || GlobalEventPlugin);\n };\n })();\n GlobalEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: GlobalEventPlugin,\n factory: GlobalEventPlugin.ɵfac\n });\n return GlobalEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet OptionsEventPlugin = /*#__PURE__*/(() => {\n class OptionsEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = 'capture.once.passive';\n }\n supports(event) {\n return event.includes('.') && !this.unwrap(event).includes('.');\n }\n addEventListener(element, event, handler) {\n element.addEventListener(this.unwrap(event), handler, {\n once: event.includes('.once'),\n passive: event.includes('.passive'),\n capture: event.includes('.capture')\n });\n return () => element.removeEventListener(this.unwrap(event), handler, event.includes('.capture'));\n }\n }\n /** @nocollapse */\n /** @nocollapse */OptionsEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵOptionsEventPlugin_BaseFactory;\n return function OptionsEventPlugin_Factory(t) {\n return (ɵOptionsEventPlugin_BaseFactory || (ɵOptionsEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(OptionsEventPlugin)))(t || OptionsEventPlugin);\n };\n })();\n OptionsEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: OptionsEventPlugin,\n factory: OptionsEventPlugin.ɵfac\n });\n return OptionsEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet PreventEventPlugin = /*#__PURE__*/(() => {\n class PreventEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '.prevent';\n }\n addEventListener(element, event, handler) {\n const wrapped = event => {\n event.preventDefault();\n handler(event);\n };\n return this.manager.addEventListener(element, this.unwrap(event), wrapped);\n }\n }\n /** @nocollapse */\n /** @nocollapse */PreventEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵPreventEventPlugin_BaseFactory;\n return function PreventEventPlugin_Factory(t) {\n return (ɵPreventEventPlugin_BaseFactory || (ɵPreventEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(PreventEventPlugin)))(t || PreventEventPlugin);\n };\n })();\n PreventEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: PreventEventPlugin,\n factory: PreventEventPlugin.ɵfac\n });\n return PreventEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SelfEventPlugin = /*#__PURE__*/(() => {\n class SelfEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '.self';\n }\n addEventListener(element, event, handler) {\n const wrapped = event => {\n if (event.target === event.currentTarget) {\n handler(event);\n }\n };\n return this.manager.addEventListener(element, this.unwrap(event), wrapped);\n }\n }\n /** @nocollapse */\n /** @nocollapse */SelfEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵSelfEventPlugin_BaseFactory;\n return function SelfEventPlugin_Factory(t) {\n return (ɵSelfEventPlugin_BaseFactory || (ɵSelfEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(SelfEventPlugin)))(t || SelfEventPlugin);\n };\n })();\n SelfEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SelfEventPlugin,\n factory: SelfEventPlugin.ɵfac\n });\n return SelfEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SilentEventPlugin = /*#__PURE__*/(() => {\n class SilentEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '.silent';\n }\n addEventListener(element, event, handler) {\n SilentEventPlugin.ngZone = this.manager.getZone();\n return SilentEventPlugin.ngZone.runOutsideAngular(() => this.manager.addEventListener(element, this.unwrap(event), handler));\n }\n }\n /** @nocollapse */\n /** @nocollapse */SilentEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵSilentEventPlugin_BaseFactory;\n return function SilentEventPlugin_Factory(t) {\n return (ɵSilentEventPlugin_BaseFactory || (ɵSilentEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(SilentEventPlugin)))(t || SilentEventPlugin);\n };\n })();\n SilentEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SilentEventPlugin,\n factory: SilentEventPlugin.ɵfac\n });\n return SilentEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StopEventPlugin = /*#__PURE__*/(() => {\n class StopEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '.stop';\n }\n addEventListener(element, event, handler) {\n const wrapped = event => {\n event.stopPropagation();\n handler(event);\n };\n return this.manager.addEventListener(element, this.unwrap(event), wrapped);\n }\n }\n /** @nocollapse */\n /** @nocollapse */StopEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵStopEventPlugin_BaseFactory;\n return function StopEventPlugin_Factory(t) {\n return (ɵStopEventPlugin_BaseFactory || (ɵStopEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(StopEventPlugin)))(t || StopEventPlugin);\n };\n })();\n StopEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StopEventPlugin,\n factory: StopEventPlugin.ɵfac\n });\n return StopEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\r\n * TODO: Remove in v4.0.0\r\n * @deprecated\r\n */\nlet ZoneEventPlugin = /*#__PURE__*/(() => {\n class ZoneEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '.init';\n }\n addEventListener() {\n console.warn('.init plugin is no longer necessary as of v3.1.0');\n return () => {};\n }\n }\n /** @nocollapse */\n /** @nocollapse */ZoneEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵZoneEventPlugin_BaseFactory;\n return function ZoneEventPlugin_Factory(t) {\n return (ɵZoneEventPlugin_BaseFactory || (ɵZoneEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(ZoneEventPlugin)))(t || ZoneEventPlugin);\n };\n })();\n ZoneEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ZoneEventPlugin,\n factory: ZoneEventPlugin.ɵfac\n });\n return ZoneEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst PLUGINS = [SilentEventPlugin, BindEventPlugin, GlobalEventPlugin, OptionsEventPlugin, PreventEventPlugin, SelfEventPlugin, StopEventPlugin, ZoneEventPlugin];\nconst NG_EVENT_PLUGINS = PLUGINS.map(useClass => ({\n provide: EVENT_MANAGER_PLUGINS,\n multi: true,\n useClass\n}));\nfunction shouldCall(predicate) {\n return (_target, _key, desc) => {\n const {\n value\n } = desc;\n desc.value = function (...args) {\n if (!predicate.apply(this, args)) {\n return;\n }\n if (SilentEventPlugin.ngZone) {\n SilentEventPlugin.ngZone.run(() => value.apply(this, args));\n } else {\n value.apply(this, args);\n }\n };\n };\n}\nfunction asCallable(a) {\n return a;\n}\nlet EventPluginsModule = /*#__PURE__*/(() => {\n class EventPluginsModule {\n constructor([plugin]) {\n console.assert(!(plugin instanceof SilentEventPlugin) || EventPluginsModule.initialized, 'EventPluginsModule must come after BrowserModule in imports');\n EventPluginsModule.initialized = true;\n }\n }\n EventPluginsModule.initialized = false;\n /** @nocollapse */\n /** @nocollapse */\n /** @nocollapse */\n EventPluginsModule.ɵfac = function EventPluginsModule_Factory(t) {\n return new (t || EventPluginsModule)(i0.ɵɵinject(EVENT_MANAGER_PLUGINS));\n };\n EventPluginsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: EventPluginsModule\n });\n EventPluginsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: NG_EVENT_PLUGINS\n });\n return EventPluginsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\r\n * Public API Surface of @tinkoff/ng-event-plugins\r\n */\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { BindEventPlugin, EventPluginsModule, GLOBAL_HANDLER, GlobalEventPlugin, NG_EVENT_PLUGINS, OptionsEventPlugin, PreventEventPlugin, SilentEventPlugin, StopEventPlugin, ZoneEventPlugin, asCallable, shouldCall };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Directive, Input, Output, ElementRef, INJECTOR, Self, Inject, Optional, SkipSelf, forwardRef, Component, ChangeDetectionStrategy, HostBinding, 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, EMPTY_CLIENT_RECT, tuiPx, tuiGetClosestFocusable, tuiPointToClientRect, TuiActiveZoneDirective, TUI_IS_IOS, TUI_TOUCH_SUPPORTED, 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$1 from '@taiga-ui/core/abstract';\nimport { tuiAsRectAccessor, tuiAsVehicle, TuiDriver, tuiAsDriver, TuiPositionAccessor, tuiFallbackRectAccessor, TuiRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor, AbstractTuiDriverDirective, TuiVehicle, 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_VIEWPORT, TUI_ANIMATION_OPTIONS, TUI_MODE, 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$2 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 */\nconst _c0 = a0 => ({\n $implicit: a0\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();\n i0.ɵɵtextInterpolate1(\" \", text_r2, \" \");\n }\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: [0, \"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: [0, \"tuiDropdownShowDelay\", \"showDelay\"],\n hideDelay: [0, \"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: [0, \"tuiDropdownAlign\", \"align\"],\n appearance: [0, \"tuiDropdownAppearance\", \"appearance\"],\n direction: [0, \"tuiDropdownDirection\", \"direction\"],\n limitWidth: [0, \"tuiDropdownLimitWidth\", \"limitWidth\"],\n minHeight: [0, \"tuiDropdownMinHeight\", \"minHeight\"],\n maxHeight: [0, \"tuiDropdownMaxHeight\", \"maxHeight\"],\n offset: [0, \"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})();\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 limitWidth\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 rectWidth = limitWidth === 'fixed' ? hostRect.width : width;\n const right = Math.max(hostRect.right - rectWidth, 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\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n __decorate([tuiPure], TuiDropdownPositionDirective.prototype, \"accessor\", null);\n return TuiDropdownPositionDirective;\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(vvs, 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' ? vvs.correct(point) : point), takeUntil(destroy$)).subscribe(([top, left]) => {\n if (this.directive.el.nativeElement.isConnected) {\n this.update(top, left);\n } else {\n this.directive.toggle(false);\n }\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 minHeight,\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 const sided = right <= rect.left || left >= rect.right;\n style.position = position;\n style.top = tuiPx(Math.max(top, offsetY + offset));\n style.left = tuiPx(left);\n style.maxHeight = sided ? `${maxHeight}px` : tuiPx(Math.min(maxHeight, Math.max(available, minHeight)));\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.ɵɵsyntheticHostProperty(\"@tuiDropdownAnimation\", ctx.animation);\n i0.ɵɵattribute(\"data-appearance\", ctx.options.appearance);\n }\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPositionService, tuiPositionAccessorFor('dropdown', TuiDropdownPositionDirective), tuiRectAccessorFor('dropdown', TuiDropdownDirective), MODE_PROVIDER])],\n decls: 5,\n vars: 4,\n consts: [[\"activeZone\", \"tuiActiveZone\"], [\"tuiActiveZone\", \"\", \"tuiOverscroll\", \"all\", 1, \"t-scroll\", 3, \"tuiHoveredChange\"], [\"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 const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-scrollbar\", 1, 0);\n i0.ɵɵlistener(\"tuiHoveredChange\", function TuiDropdownComponent_Template_tui_scrollbar_tuiHoveredChange_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onHoveredChange($event));\n });\n i0.ɵɵelementStart(2, \"div\", 2);\n i0.ɵɵlistener(\"focus\", function TuiDropdownComponent_Template_div_focus_2_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(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 i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onBottomFocus());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const activeZone_r3 = i0.ɵɵreference(1);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.directive.content)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c0, activeZone_r3));\n }\n },\n dependencies: [i1$2.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}\nconst TAP_DELAY = 700;\nconst MOVE_THRESHOLD = 15;\nlet TuiDropdownContextDirective = /*#__PURE__*/(() => {\n class TuiDropdownContextDirective extends TuiDriver {\n constructor(activeZone, isIOS, isTouch) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.activeZone = activeZone;\n this.isIOS = isIOS;\n this.isTouch = isTouch;\n this.stream$ = new Subject();\n this.currentRect = EMPTY_CLIENT_RECT;\n this.longTapTimeout = NaN;\n this.type = 'dropdown';\n }\n get userSelect() {\n return this.isTouch ? 'none' : null;\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 this.currentRect = EMPTY_CLIENT_RECT;\n }\n onTouchMove(x, y) {\n if (this.isIOS && this.isTouch && this.currentRect !== EMPTY_CLIENT_RECT && Math.hypot(x - this.currentRect.x, y - this.currentRect.y) > MOVE_THRESHOLD) {\n this.onTouchEnd();\n }\n }\n onTouchStart(x, y) {\n if (!this.isIOS || !this.isTouch || this.currentRect !== EMPTY_CLIENT_RECT) {\n return;\n }\n this.currentRect = tuiPointToClientRect(x, y);\n this.longTapTimeout = setTimeout(() => {\n this.stream$.next(true);\n }, TAP_DELAY);\n }\n onTouchEnd() {\n if (this.isIOS && this.isTouch) {\n clearTimeout(this.longTapTimeout);\n }\n }\n getClientRect() {\n return this.currentRect;\n }\n }\n TuiDropdownContextDirective.ɵfac = function TuiDropdownContextDirective_Factory(t) {\n return new (t || TuiDropdownContextDirective)(i0.ɵɵdirectiveInject(TuiActiveZoneDirective), i0.ɵɵdirectiveInject(TUI_IS_IOS), i0.ɵɵdirectiveInject(TUI_TOUCH_SUPPORTED));\n };\n TuiDropdownContextDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownContextDirective,\n selectors: [[\"\", \"tuiDropdown\", \"\", \"tuiDropdownContext\", \"\"]],\n hostVars: 6,\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)(\"touchmove.silent.passive\", function TuiDropdownContextDirective_touchmove_silent_passive_HostBindingHandler($event) {\n return ctx.onTouchMove($event.touches[0].clientX, $event.touches[0].clientY);\n })(\"touchstart.silent.passive\", function TuiDropdownContextDirective_touchstart_silent_passive_HostBindingHandler($event) {\n return ctx.onTouchStart($event.touches[0].clientX, $event.touches[0].clientY);\n })(\"touchend.silent.passive\", function TuiDropdownContextDirective_touchend_silent_passive_HostBindingHandler() {\n return ctx.onTouchEnd();\n })(\"touchcancel.silent.passive\", function TuiDropdownContextDirective_touchcancel_silent_passive_HostBindingHandler() {\n return ctx.onTouchEnd();\n });\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"user-select\", ctx.userSelect)(\"-webkit-touch-callout\", ctx.userSelect)(\"-webkit-user-select\", ctx.userSelect);\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 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 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((x, y) => x.startOffset === y.startOffset && x.endOffset === y.endOffset && x.commonAncestorContainer === y.commonAncestorContainer))]).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 const range = active && tuiIsTextfield(active) && this.el.nativeElement.contains(active) ? this.veryVerySadInputFix(active) : (selection === null || selection === void 0 ? void 0 : selection.rangeCount) && selection.getRangeAt(0) || this.range;\n return range.cloneRange();\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 * 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 * 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: [0, \"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, tuiPure, tuiClamp, tuiPx, TuiDestroyService, tuiIfMap, tuiTypedFromEvent, tuiIsPresent, tuiZoneOptimized, tuiIsNativeFocused, TUI_PARENT_ANIMATION } from '@taiga-ui/cdk';\nimport * as i1$1 from '@taiga-ui/core/abstract';\nimport { tuiAsRectAccessor, tuiAsVehicle, TuiDriver, tuiAsDriver, TuiPositionAccessor, tuiFallbackRectAccessor, TuiRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor, AbstractTuiDriverDirective, TuiVehicle } 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_VIEWPORT, TUI_ANIMATION_OPTIONS } 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 { TUI_HINT_DIRECTIONS } from '@taiga-ui/core/constants';\nimport { DOCUMENT, CommonModule } from '@angular/common';\n\n/**\n * A component to display a hint\n */\nconst _c0 = [\"*\"];\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}\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: [0, \"tuiHintContent\", \"content\"],\n direction: [0, \"tuiHintDirection\", \"direction\"],\n appearance: [0, \"tuiHintAppearance\", \"appearance\"],\n showDelay: [0, \"tuiHintShowDelay\", \"showDelay\"],\n hideDelay: [0, \"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 set tuiHint(content) {\n this.content = content;\n if (!content) {\n this.toggle(false);\n }\n }\n get appearance() {\n var _a;\n return (_a = this.tuiHintAppearance) !== null && _a !== void 0 ? _a : this.options.appearance;\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 tuiHint: \"tuiHint\",\n context: [0, \"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 }])]\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, parent) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.hovered$ = hovered$;\n this.options = options;\n this.el = el;\n this.parent = parent;\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 && (this.el.nativeElement.hasAttribute('tuiHintPointer') || !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 var _a;\n this.toggle$.next(visible);\n (_a = this.parent) === null || _a === void 0 ? void 0 : _a.toggle(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), i0.ɵɵdirectiveInject(TuiHintHoverDirective, 12));\n };\n TuiHintHoverDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintHoverDirective,\n selectors: [[\"\", \"tuiHint\", \"\", 5, \"ng-container\", 5, \"ng-template\"]],\n inputs: {\n showDelay: [0, \"tuiHintShowDelay\", \"showDelay\"],\n hideDelay: [0, \"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 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 / 4 && left > OFFSET / 4 && top + height < viewport.bottom - OFFSET / 4 && left + width < viewport.right - OFFSET / 4;\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\", \"\", 5, \"ng-container\", 5, \"ng-template\"]],\n inputs: {\n direction: [0, \"tuiHintDirection\", \"direction\"]\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n __decorate([tuiPure], TuiHintPositionDirective.prototype, \"accessor\", null);\n return TuiHintPositionDirective;\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, vvs, 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.vvs = vvs;\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.vvs.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 (!target.closest('tui-hint') && !this.hover.el.nativeElement.contains(target) || tuiIsObscured(this.hover.el.nativeElement)) {\n this.hover.toggle(false);\n }\n }\n update(top, left) {\n if (!this.hover.el.nativeElement.isConnected) {\n this.hover.toggle(false);\n return;\n }\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.vvs.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.ɵɵsyntheticHostProperty(\"@tuiFadeIn\", ctx.animation);\n i0.ɵɵattribute(\"data-appearance\", ctx.appearance);\n i0.ɵɵclassProp(\"_untouchable\", ctx.pointer);\n }\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPositionService, TuiHoveredService, tuiPositionAccessorFor('hint', TuiHintPositionDirective), 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();\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;line-height:1.25rem}[_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})();\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 { 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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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 { 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 { Directive, Inject, Input, HostBinding, NgModule } from '@angular/core';\nimport { TuiInteractiveState } from '@taiga-ui/core/enums';\nimport { MODE_PROVIDER } from '@taiga-ui/core/providers';\nimport { TUI_MODE } from '@taiga-ui/core/tokens';\nimport * as i1 from 'rxjs';\nlet TuiWrapperDirective = /*#__PURE__*/(() => {\n class TuiWrapperDirective {\n constructor(mode$) {\n this.mode$ = mode$;\n this.disabled = false;\n this.readOnly = false;\n this.hover = null;\n this.active = null;\n this.focus = false;\n this.invalid = false;\n this.appearance = '';\n }\n get computedInvalid() {\n return !this.disabled && !this.readOnly && this.invalid;\n }\n get computedFocused() {\n return this.focus && !this.disabled;\n }\n get interactiveState() {\n if (this.disabled) {\n return TuiInteractiveState.Disabled;\n }\n if (this.readOnly) {\n return TuiInteractiveState.Readonly;\n }\n if (this.active) {\n return TuiInteractiveState.Active;\n }\n if (this.hover) {\n return TuiInteractiveState.Hover;\n }\n return null;\n }\n get noHover() {\n return this.readOnly || this.hover === false;\n }\n get noActive() {\n return this.readOnly || this.active === false;\n }\n }\n TuiWrapperDirective.ɵfac = function TuiWrapperDirective_Factory(t) {\n return new (t || TuiWrapperDirective)(i0.ɵɵdirectiveInject(TUI_MODE));\n };\n TuiWrapperDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiWrapperDirective,\n selectors: [[\"\", \"tuiWrapper\", \"\"]],\n hostVars: 10,\n hostBindings: function TuiWrapperDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"$.data-mode.attr\", function TuiWrapperDirective___data_mode_attr_HostBindingHandler() {\n return ctx.mode$;\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-appearance\", ctx.appearance)(\"data-state\", ctx.interactiveState);\n i0.ɵɵclassProp(\"_invalid\", ctx.computedInvalid)(\"_focused\", ctx.computedFocused)(\"_no-hover\", ctx.noHover)(\"_no-active\", ctx.noActive);\n }\n },\n inputs: {\n disabled: \"disabled\",\n readOnly: \"readOnly\",\n hover: \"hover\",\n active: \"active\",\n focus: \"focus\",\n invalid: \"invalid\",\n appearance: \"appearance\"\n },\n features: [i0.ɵɵProvidersFeature([MODE_PROVIDER])]\n });\n return TuiWrapperDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiWrapperModule = /*#__PURE__*/(() => {\n class TuiWrapperModule {}\n TuiWrapperModule.ɵfac = function TuiWrapperModule_Factory(t) {\n return new (t || TuiWrapperModule)();\n };\n TuiWrapperModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiWrapperModule\n });\n TuiWrapperModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiWrapperModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiWrapperDirective, TuiWrapperModule };\n","import * as i1 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { ElementRef, Component, ChangeDetectionStrategy, Inject, Input, HostBinding, NgModule } from '@angular/core';\nimport { tuiCreateToken, tuiProvideOptions, tuiIsSafari, tuiBlurNativeFocused, tuiIsNativeFocusedIn, TUI_IS_IOS } from '@taiga-ui/cdk';\nimport { tuiSizeBigger } from '@taiga-ui/core/utils/miscellaneous';\nimport * as i2 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\n\n/** Default values for the loader options. */\nconst _c0 = [\"*\"];\nfunction TuiLoaderComponent_div_2_div_3_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_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", text_r1, \" \");\n }\n}\nfunction TuiLoaderComponent_div_2_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵtemplate(1, TuiLoaderComponent_div_2_div_3_ng_container_1_Template, 2, 1, \"ng-container\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵclassProp(\"t-text_horizontal\", ctx_r1.isHorizontal);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.textContent);\n }\n}\nfunction TuiLoaderComponent_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"svg\", 3);\n i0.ɵɵelement(2, \"circle\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(3, TuiLoaderComponent_div_2_div_3_Template, 2, 3, \"div\", 5);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-loader_horizontal\", ctx_r1.isHorizontal)(\"t-loader_inherit-color\", ctx_r1.inheritColor);\n i0.ɵɵattribute(\"data-size\", ctx_r1.size);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx_r1.hasText);\n }\n}\nconst TUI_LOADER_DEFAULT_OPTIONS = {\n size: 'm',\n inheritColor: false,\n overlay: false\n};\n/**\n * Default parameters for loader component\n */\nconst TUI_LOADER_OPTIONS = tuiCreateToken(TUI_LOADER_DEFAULT_OPTIONS);\nfunction tuiLoaderOptionsProvider(options) {\n return tuiProvideOptions(TUI_LOADER_OPTIONS, options, TUI_LOADER_DEFAULT_OPTIONS);\n}\nlet TuiLoaderComponent = /*#__PURE__*/(() => {\n class TuiLoaderComponent {\n constructor(doc, el, isIos, options) {\n this.doc = doc;\n this.el = el;\n this.isIos = isIos;\n this.options = options;\n this.size = this.options.size;\n this.inheritColor = this.options.inheritColor;\n this.overlay = this.options.overlay;\n this.loading = true;\n this.isApple = tuiIsSafari(this.el.nativeElement) || this.isIos;\n }\n set showLoader(value) {\n // @bad TODO: https://github.com/angular/angular/issues/32083 think of a better way\n if (value && this.focused) {\n tuiBlurNativeFocused(this.doc);\n }\n this.loading = value;\n }\n get hasOverlay() {\n return this.overlay && this.loading;\n }\n get hasText() {\n return !!this.textContent;\n }\n get isHorizontal() {\n return !tuiSizeBigger(this.size);\n }\n get focused() {\n return tuiIsNativeFocusedIn(this.el.nativeElement);\n }\n }\n TuiLoaderComponent.ɵfac = function TuiLoaderComponent_Factory(t) {\n return new (t || TuiLoaderComponent)(i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_IS_IOS), i0.ɵɵdirectiveInject(TUI_LOADER_OPTIONS));\n };\n TuiLoaderComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiLoaderComponent,\n selectors: [[\"tui-loader\"]],\n hostVars: 2,\n hostBindings: function TuiLoaderComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"_loading\", ctx.loading);\n }\n },\n inputs: {\n size: \"size\",\n inheritColor: \"inheritColor\",\n overlay: \"overlay\",\n textContent: \"textContent\",\n showLoader: \"showLoader\"\n },\n ngContentSelectors: _c0,\n decls: 3,\n vars: 7,\n 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\"]],\n template: function TuiLoaderComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"fieldset\", 0);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, TuiLoaderComponent_div_2_Template, 4, 6, \"div\", 1);\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"t-content_has-overlay\", ctx.hasOverlay)(\"t-content_loading\", ctx.loading);\n i0.ɵɵproperty(\"disabled\", ctx.loading && !ctx.isApple);\n i0.ɵɵattribute(\"inert\", ctx.loading || null);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.loading);\n }\n },\n dependencies: [i1.NgIf, i2.PolymorpheusOutletDirective],\n 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}\"],\n changeDetection: 0\n });\n return TuiLoaderComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLoaderModule = /*#__PURE__*/(() => {\n class TuiLoaderModule {}\n TuiLoaderModule.ɵfac = function TuiLoaderModule_Factory(t) {\n return new (t || TuiLoaderModule)();\n };\n TuiLoaderModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiLoaderModule\n });\n TuiLoaderModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, PolymorpheusModule]]\n });\n return TuiLoaderModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_LOADER_DEFAULT_OPTIONS, TUI_LOADER_OPTIONS, TuiLoaderComponent, TuiLoaderModule, tuiLoaderOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Component, ChangeDetectionStrategy, Optional, Inject, Input, HostBinding, HostListener, NgModule } from '@angular/core';\nimport { tuiCreateToken, tuiProvideOptions, AbstractTuiInteractive, tuiIsNativeFocused, tuiAsFocusableItemAccessor, TuiDestroyService } from '@taiga-ui/cdk';\nimport * as i6 from '@taiga-ui/core/directives';\nimport { TuiModeDirective } from '@taiga-ui/core/directives';\nimport { EMPTY } from 'rxjs';\nimport { startWith, map, distinctUntilChanged } from 'rxjs/operators';\nimport { TuiAppearance } from '@taiga-ui/core/enums';\nimport * as i1 from '@taiga-ui/core/components/svg';\nimport { TuiSvgModule } from '@taiga-ui/core/components/svg';\nimport * as i2 from '@taiga-ui/core/components/loader';\nimport { TuiLoaderModule } from '@taiga-ui/core/components/loader';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from '@taiga-ui/core/directives/wrapper';\nimport { TuiWrapperModule } from '@taiga-ui/core/directives/wrapper';\nimport * as i5 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nconst _c0 = [\"tuiButton\", \"\"];\nconst _c1 = [\"*\"];\nfunction TuiButtonComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction TuiButtonComponent_span_4_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 8);\n }\n if (rf & 2) {\n const text_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", text_r1);\n }\n}\nfunction TuiButtonComponent_span_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 6);\n i0.ɵɵtemplate(1, TuiButtonComponent_span_4_tui_svg_1_Template, 1, 1, \"tui-svg\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.icon);\n }\n}\nfunction TuiButtonComponent_span_6_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 8);\n }\n if (rf & 2) {\n const text_r3 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", text_r3);\n }\n}\nfunction TuiButtonComponent_span_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 9);\n i0.ɵɵtemplate(1, TuiButtonComponent_span_6_tui_svg_1_Template, 1, 1, \"tui-svg\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.iconRight);\n }\n}\nfunction TuiButtonComponent_tui_loader_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-loader\", 10);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"inheritColor\", true)(\"size\", ctx_r1.loaderSize);\n }\n}\nconst TUI_BUTTON_DEFAULT_OPTIONS = {\n size: 'l',\n shape: null,\n appearance: TuiAppearance.Primary\n};\n/**\n * Default parameters for button component\n */\nconst TUI_BUTTON_OPTIONS = tuiCreateToken(TUI_BUTTON_DEFAULT_OPTIONS);\nfunction tuiButtonOptionsProvider(options) {\n return tuiProvideOptions(TUI_BUTTON_OPTIONS, options, TUI_BUTTON_DEFAULT_OPTIONS);\n}\nlet TuiButtonComponent = /*#__PURE__*/(() => {\n class TuiButtonComponent extends AbstractTuiInteractive {\n constructor(mode, el, options) {\n var _a;\n super();\n this.mode = mode;\n this.el = el;\n this.options = options;\n this.mode$ = ((_a = this.mode) === null || _a === void 0 ? void 0 : _a.change$) || EMPTY;\n this.appearance = null;\n this.disabled = false;\n this.shape = this.options.shape;\n this.showLoader = false;\n this.size = this.options.size;\n this.appearance$ = this.mode$.pipe(startWith(null), map(() => this.computedAppearance), distinctUntilChanged());\n }\n get nativeFocusableElement() {\n return this.nativeDisabled ? null : this.el.nativeElement;\n }\n get focused() {\n return !this.showLoader && tuiIsNativeFocused(this.el.nativeElement);\n }\n get loaderSize() {\n return this.size === 'l' || this.size === 'xl' ? 'm' : 's';\n }\n get computedAppearance() {\n var _a;\n return (_a = this.appearance) !== null && _a !== void 0 ? _a : this.options.appearance || '';\n }\n get nativeDisabled() {\n return this.computedDisabled || this.showLoader ? '' : null;\n }\n get tabIndex() {\n return this.focusable ? 0 : -1;\n }\n onFocused(focused) {\n this.updateFocused(focused);\n }\n }\n TuiButtonComponent.ɵfac = function TuiButtonComponent_Factory(t) {\n return new (t || TuiButtonComponent)(i0.ɵɵdirectiveInject(TuiModeDirective, 8), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_BUTTON_OPTIONS));\n };\n TuiButtonComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiButtonComponent,\n selectors: [[\"button\", \"tuiButton\", \"\"], [\"button\", \"tuiIconButton\", \"\"], [\"a\", \"tuiButton\", \"\"], [\"a\", \"tuiIconButton\", \"\"]],\n hostVars: 7,\n hostBindings: function TuiButtonComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focusin\", function TuiButtonComponent_focusin_HostBindingHandler() {\n return ctx.onFocused(true);\n })(\"focusout\", function TuiButtonComponent_focusout_HostBindingHandler() {\n return ctx.onFocused(false);\n });\n }\n if (rf & 2) {\n i0.ɵɵhostProperty(\"tabIndex\", ctx.tabIndex);\n i0.ɵɵattribute(\"data-shape\", ctx.shape)(\"data-size\", ctx.size)(\"data-appearance\", ctx.computedAppearance)(\"disabled\", ctx.nativeDisabled);\n i0.ɵɵclassProp(\"_loading\", ctx.showLoader);\n }\n },\n inputs: {\n appearance: \"appearance\",\n disabled: \"disabled\",\n icon: \"icon\",\n iconRight: \"iconRight\",\n shape: \"shape\",\n showLoader: \"showLoader\",\n size: \"size\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiButtonComponent), TuiDestroyService]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c0,\n ngContentSelectors: _c1,\n decls: 8,\n vars: 10,\n 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\"]],\n template: function TuiButtonComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, TuiButtonComponent_ng_container_0_Template, 1, 0, \"ng-container\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵelementStart(2, \"div\", 1)(3, \"span\", 2);\n i0.ɵɵtemplate(4, TuiButtonComponent_span_4_Template, 2, 1, \"span\", 3);\n i0.ɵɵprojection(5);\n i0.ɵɵtemplate(6, TuiButtonComponent_span_6_Template, 2, 1, \"span\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(7, TuiButtonComponent_tui_loader_7_Template, 1, 2, \"tui-loader\", 5);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 8, ctx.appearance$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"active\", ctx.pseudoActive)(\"appearance\", ctx.computedAppearance)(\"disabled\", ctx.computedDisabled)(\"hover\", ctx.pseudoHover);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.icon);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.iconRight);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showLoader);\n }\n },\n dependencies: [i1.TuiSvgComponent, i2.TuiLoaderComponent, i3.NgIf, i4.TuiWrapperDirective, i5.PolymorpheusOutletDirective, i3.AsyncPipe],\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;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%], [tuiIconButton][data-appearance=link][data-size=s][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [tuiIconButton][data-appearance=link][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}\"],\n changeDetection: 0\n });\n return TuiButtonComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiButtonModule = /*#__PURE__*/(() => {\n class TuiButtonModule {}\n TuiButtonModule.ɵfac = function TuiButtonModule_Factory(t) {\n return new (t || TuiButtonModule)();\n };\n TuiButtonModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiButtonModule\n });\n TuiButtonModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, PolymorpheusModule, TuiWrapperModule, TuiSvgModule, TuiLoaderModule]]\n });\n return TuiButtonModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_BUTTON_DEFAULT_OPTIONS, TUI_BUTTON_OPTIONS, TuiButtonComponent, TuiButtonModule, tuiButtonOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Component, ChangeDetectionStrategy, Inject, Input, HostBinding, NgModule } from '@angular/core';\nimport * as i4 from '@taiga-ui/cdk';\nimport { tuiTypedFromEvent, ALWAYS_TRUE_HANDLER, ALWAYS_FALSE_HANDLER, tuiIsNativeFocused, TuiFocusVisibleService, tuiAsFocusableItemAccessor, TuiDestroyService } from '@taiga-ui/cdk';\nimport { MODE_PROVIDER } from '@taiga-ui/core/providers';\nimport { TUI_MODE } from '@taiga-ui/core/tokens';\nimport * as i3 from 'rxjs';\nimport { merge } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core/components/svg';\nimport { TuiSvgModule } from '@taiga-ui/core/components/svg';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\n\n// @bad TODO: Think about extending Interactive\nconst _c0 = [\"tuiLink\", \"\"];\nconst _c1 = [\"*\"];\nfunction TuiLinkComponent_tui_svg_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 3);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"src\", ctx_r0.icon || \"\");\n }\n}\nfunction TuiLinkComponent_tui_svg_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 4);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"src\", ctx_r0.icon || \"\");\n }\n}\nlet TuiLinkComponent = /*#__PURE__*/(() => {\n class TuiLinkComponent {\n constructor(el, mode$, focusVisible$) {\n this.el = el;\n this.mode$ = mode$;\n this.pseudo = false;\n this.icon = '';\n this.iconAlign = 'right';\n this.iconRotated = false;\n this.mode = null;\n this.focusVisible = false;\n this.focusedChange = merge(tuiTypedFromEvent(this.el.nativeElement, 'focusin').pipe(map(ALWAYS_TRUE_HANDLER)), tuiTypedFromEvent(this.el.nativeElement, 'focusout').pipe(map(ALWAYS_FALSE_HANDLER)));\n focusVisible$.subscribe(visible => {\n this.focusVisible = visible;\n });\n }\n get nativeFocusableElement() {\n return this.el.nativeElement;\n }\n get focused() {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n get hasIcon() {\n return !!this.icon;\n }\n get iconAlignLeft() {\n return this.hasIcon && this.iconAlign === 'left';\n }\n get iconAlignRight() {\n return this.hasIcon && this.iconAlign === 'right';\n }\n }\n TuiLinkComponent.ɵfac = function TuiLinkComponent_Factory(t) {\n return new (t || TuiLinkComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_MODE), i0.ɵɵdirectiveInject(TuiFocusVisibleService));\n };\n TuiLinkComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiLinkComponent,\n selectors: [[\"a\", \"tuiLink\", \"\"], [\"button\", \"tuiLink\", \"\"]],\n hostVars: 7,\n hostBindings: function TuiLinkComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"$.data-mode.attr\", function TuiLinkComponent___data_mode_attr_HostBindingHandler() {\n return ctx.mode$;\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-host-mode\", ctx.mode);\n i0.ɵɵclassProp(\"_pseudo\", ctx.pseudo)(\"_icon-rotated\", ctx.iconRotated)(\"_focus-visible\", ctx.focusVisible);\n }\n },\n inputs: {\n pseudo: \"pseudo\",\n icon: \"icon\",\n iconAlign: \"iconAlign\",\n iconRotated: \"iconRotated\",\n mode: \"mode\"\n },\n exportAs: [\"tuiLink\"],\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiLinkComponent), TuiFocusVisibleService, TuiDestroyService, MODE_PROVIDER])],\n attrs: _c0,\n ngContentSelectors: _c1,\n decls: 4,\n vars: 2,\n 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\"]],\n template: function TuiLinkComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, TuiLinkComponent_tui_svg_0_Template, 1, 1, \"tui-svg\", 0);\n i0.ɵɵelementStart(1, \"span\", 1);\n i0.ɵɵprojection(2);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(3, TuiLinkComponent_tui_svg_3_Template, 1, 1, \"tui-svg\", 2);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.iconAlignLeft);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx.iconAlignRight);\n }\n },\n dependencies: [i1.TuiSvgComponent, i2.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: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)}\"],\n changeDetection: 0\n });\n return TuiLinkComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLinkModule = /*#__PURE__*/(() => {\n class TuiLinkModule {}\n TuiLinkModule.ɵfac = function TuiLinkModule_Factory(t) {\n return new (t || TuiLinkModule)();\n };\n TuiLinkModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiLinkModule\n });\n TuiLinkModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiSvgModule]]\n });\n return TuiLinkModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiLinkComponent, TuiLinkModule };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Injectable, Inject, Component, ChangeDetectionStrategy, Self, HostBinding, inject, Directive, NgModule } from '@angular/core';\nimport * as i4 from '@taiga-ui/cdk';\nimport { tuiCreateToken, tuiProvideOptions, tuiTypedFromEvent, tuiGetActualTarget, tuiIsElement, tuiContainsOrAfter, ALWAYS_TRUE_HANDLER, TUI_IS_MOBILE, TuiDestroyService, AbstractTuiDialogService, AbstractTuiDialogDirective, TuiAutoFocusModule, tuiAsDialog } from '@taiga-ui/cdk';\nimport { tuiSlideInTop, tuiFadeIn } from '@taiga-ui/core/animations';\nimport { TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';\nimport * as i3 from '@tinkoff/ng-polymorpheus';\nimport { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport * as i5 from 'rxjs';\nimport { EMPTY, Observable, merge, isObservable, of, Subject } from 'rxjs';\nimport { filter, switchMap, take, map, takeUntil } from 'rxjs/operators';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport { WINDOW } from '@ng-web-apis/common';\nimport { tuiGetViewportWidth } from '@taiga-ui/core/utils';\nimport * as i1 from '@taiga-ui/core/components/button';\nimport { TuiButtonModule } from '@taiga-ui/core/components/button';\nfunction TuiDialogComponent_header_0_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_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", text_r1, \" \");\n }\n}\nfunction TuiDialogComponent_header_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"header\", 6);\n i0.ɵɵtemplate(1, TuiDialogComponent_header_0_ng_container_1_Template, 2, 1, \"ng-container\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.header)(\"polymorpheusOutletContext\", ctx_r1.context);\n }\n}\nfunction TuiDialogComponent_ng_container_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelement(1, \"div\", 7);\n i0.ɵɵelementStart(2, \"div\", 8)(3, \"button\", 9);\n i0.ɵɵlistener(\"click\", function TuiDialogComponent_ng_container_4_Template_button_click_3_listener() {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.context.$implicit.complete());\n });\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const text_r4 = ctx.polymorpheusOutlet;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"innerHTML\", text_r4, i0.ɵɵsanitizeHtml);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate1(\" \", (ctx_r1.context.data == null ? null : ctx_r1.context.data.button) || \"OK\", \" \");\n }\n}\nfunction TuiDialogComponent_div_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 10)(1, \"button\", 11);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵlistener(\"click\", function TuiDialogComponent_div_6_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.close$.next());\n })(\"mousedown.prevent.silent\", function TuiDialogComponent_div_6_Template_button_mousedown_prevent_silent_1_listener() {\n i0.ɵɵrestoreView(_r5);\n return i0.ɵɵresetView(0);\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"appearance\", ctx_r1.fullscreen ? \"secondary\" : \"\")(\"icon\", ctx_r1.icons.close)(\"title\", i0.ɵɵpipeBind1(2, 3, ctx_r1.closeWord$));\n }\n}\nconst TUI_DIALOG_DEFAULT_OPTIONS = {\n size: 'm',\n required: false,\n closeable: true,\n dismissible: true,\n label: '',\n header: ''\n};\n/**\n * A stream to close dialogs\n */\nconst TUI_DIALOGS_CLOSE = tuiCreateToken(EMPTY);\n/**\n * Default parameters for dialog component\n */\nconst TUI_DIALOG_OPTIONS = tuiCreateToken(TUI_DIALOG_DEFAULT_OPTIONS);\nfunction tuiDialogOptionsProvider(options) {\n return tuiProvideOptions(TUI_DIALOG_OPTIONS, options, TUI_DIALOG_DEFAULT_OPTIONS);\n}\nconst SCROLLBAR_PLACEHOLDER = 17;\nlet TuiDialogCloseService = /*#__PURE__*/(() => {\n class TuiDialogCloseService extends Observable {\n constructor(win, doc, el) {\n super(subscriber => merge(this.esc$, this.mousedown$).subscribe(subscriber));\n this.win = win;\n this.doc = doc;\n this.el = el;\n this.esc$ = tuiTypedFromEvent(this.doc, 'keydown').pipe(filter(event => {\n const target = tuiGetActualTarget(event);\n return event.key === 'Escape' && !event.defaultPrevented && (this.element.contains(target) || this.isOutside(target));\n }));\n this.mousedown$ = tuiTypedFromEvent(this.doc, 'mousedown').pipe(filter(event => tuiGetViewportWidth(this.win) - event.clientX > SCROLLBAR_PLACEHOLDER && this.isOutside(tuiGetActualTarget(event))), switchMap(() => tuiTypedFromEvent(this.doc, 'mouseup').pipe(take(1), map(tuiGetActualTarget), filter(target => this.isOutside(target)))));\n }\n get element() {\n return this.el.nativeElement;\n }\n isOutside(target) {\n return tuiIsElement(target) && (!tuiContainsOrAfter(this.element, target) || target === this.element);\n }\n }\n TuiDialogCloseService.ɵfac = function TuiDialogCloseService_Factory(t) {\n return new (t || TuiDialogCloseService)(i0.ɵɵinject(WINDOW), i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(ElementRef));\n };\n TuiDialogCloseService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiDialogCloseService,\n factory: TuiDialogCloseService.ɵfac\n });\n return TuiDialogCloseService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\nfunction toObservable(valueOrStream) {\n return isObservable(valueOrStream) ? valueOrStream : of(valueOrStream);\n}\nlet TuiDialogComponent = /*#__PURE__*/(() => {\n class TuiDialogComponent {\n constructor(duration, isMobile, context, destroy$, dialogClose$, close$, closeWord$, icons) {\n this.duration = duration;\n this.isMobile = isMobile;\n this.context = context;\n this.closeWord$ = closeWord$;\n this.icons = icons;\n this.animation = {\n value: '',\n params: {\n start: '40px',\n duration: this.duration\n }\n };\n this.fullscreenAnimation = {\n value: '',\n params: {\n start: '100vh',\n duration: this.duration\n }\n };\n this.close$ = new Subject();\n merge(this.close$.pipe(switchMap(() => toObservable(context.closeable))), dialogClose$.pipe(switchMap(() => toObservable(context.dismissible))), close$.pipe(map(ALWAYS_TRUE_HANDLER))).pipe(filter(Boolean), takeUntil(destroy$)).subscribe(() => {\n this.close();\n });\n }\n get size() {\n return this.context.size;\n }\n get header() {\n return this.context.header;\n }\n get slideInTop() {\n return this.fullscreen || this.isMobile ? this.fullscreenAnimation : this.animation;\n }\n get fullscreen() {\n return !this.isMobile && (this.size === 'fullscreen' || this.size === 'page');\n }\n close() {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n }\n TuiDialogComponent.ɵfac = function TuiDialogComponent_Factory(t) {\n return new (t || TuiDialogComponent)(i0.ɵɵdirectiveInject(TUI_ANIMATIONS_DURATION), i0.ɵɵdirectiveInject(TUI_IS_MOBILE), i0.ɵɵdirectiveInject(POLYMORPHEUS_CONTEXT), i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(TuiDialogCloseService), i0.ɵɵdirectiveInject(TUI_DIALOGS_CLOSE), i0.ɵɵdirectiveInject(TUI_CLOSE_WORD), i0.ɵɵdirectiveInject(TUI_COMMON_ICONS));\n };\n TuiDialogComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiDialogComponent,\n selectors: [[\"tui-dialog\"]],\n hostVars: 6,\n hostBindings: function TuiDialogComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵsyntheticHostProperty(\"@tuiSlideInTop\", ctx.slideInTop)(\"@tuiFadeIn\", ctx.slideInTop);\n i0.ɵɵattribute(\"data-appearance\", ctx.context.appearance)(\"data-size\", ctx.size);\n i0.ɵɵclassProp(\"_centered\", ctx.header);\n }\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiDialogCloseService])],\n decls: 7,\n vars: 6,\n 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, \"click\", \"mousedown.prevent.silent\", \"appearance\", \"icon\", \"title\"]],\n template: function TuiDialogComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiDialogComponent_header_0_Template, 2, 2, \"header\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵelement(2, \"h2\", 2);\n i0.ɵɵelementStart(3, \"section\");\n i0.ɵɵtemplate(4, TuiDialogComponent_ng_container_4_Template, 5, 2, \"ng-container\", 3);\n i0.ɵɵelementEnd()();\n i0.ɵɵelement(5, \"div\", 4);\n i0.ɵɵtemplate(6, TuiDialogComponent_div_6_Template, 3, 5, \"div\", 5);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.header);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"id\", ctx.context.id)(\"textContent\", ctx.context.label);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.context.content)(\"polymorpheusOutletContext\", ctx.context);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.context.closeable);\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.NgIf, i3.PolymorpheusOutletDirective, i4.TuiAutoFocusDirective, i2.AsyncPipe],\n 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}\"],\n data: {\n animation: [tuiSlideInTop, tuiFadeIn]\n }\n });\n return TuiDialogComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst DIALOG = new PolymorpheusComponent(TuiDialogComponent);\nlet TuiDialogService = /*#__PURE__*/(() => {\n class TuiDialogService extends AbstractTuiDialogService {\n constructor() {\n super(...arguments);\n this.component = DIALOG;\n this.defaultOptions = Object.assign(Object.assign({}, inject(TUI_DIALOG_OPTIONS)), {\n data: undefined\n });\n }\n }\n TuiDialogService.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDialogService_BaseFactory;\n return function TuiDialogService_Factory(t) {\n return (ɵTuiDialogService_BaseFactory || (ɵTuiDialogService_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDialogService)))(t || TuiDialogService);\n };\n })();\n TuiDialogService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiDialogService,\n factory: TuiDialogService.ɵfac,\n providedIn: 'root'\n });\n return TuiDialogService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDialogDirective = /*#__PURE__*/(() => {\n class TuiDialogDirective extends AbstractTuiDialogDirective {}\n TuiDialogDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDialogDirective_BaseFactory;\n return function TuiDialogDirective_Factory(t) {\n return (ɵTuiDialogDirective_BaseFactory || (ɵTuiDialogDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDialogDirective)))(t || TuiDialogDirective);\n };\n })();\n TuiDialogDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDialogDirective,\n selectors: [[\"ng-template\", \"tuiDialog\", \"\"]],\n inputs: {\n options: [0, \"tuiDialogOptions\", \"options\"],\n open: [0, \"tuiDialog\", \"open\"]\n },\n outputs: {\n openChange: \"tuiDialogChange\"\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: AbstractTuiDialogService,\n useExisting: TuiDialogService\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDialogDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDialogModule = /*#__PURE__*/(() => {\n class TuiDialogModule {}\n TuiDialogModule.ɵfac = function TuiDialogModule_Factory(t) {\n return new (t || TuiDialogModule)();\n };\n TuiDialogModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiDialogModule\n });\n TuiDialogModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [tuiAsDialog(TuiDialogService)],\n imports: [[PolymorpheusModule, TuiButtonModule, CommonModule, TuiAutoFocusModule]]\n });\n return TuiDialogModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_DIALOGS_CLOSE, TUI_DIALOG_DEFAULT_OPTIONS, TUI_DIALOG_OPTIONS, TuiDialogCloseService, TuiDialogComponent, TuiDialogDirective, TuiDialogModule, TuiDialogService, tuiDialogOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { Pipe, Inject, NgModule } from '@angular/core';\nimport * as i1 from '@taiga-ui/core/services';\nimport { TuiFormatDateService } from '@taiga-ui/core/services';\nlet TuiFormatDatePipe = /*#__PURE__*/(() => {\n class TuiFormatDatePipe {\n constructor(service) {\n this.service = service;\n }\n transform(timestampOrDate) {\n return this.service.format(timestampOrDate.valueOf());\n }\n }\n TuiFormatDatePipe.ɵfac = function TuiFormatDatePipe_Factory(t) {\n return new (t || TuiFormatDatePipe)(i0.ɵɵdirectiveInject(TuiFormatDateService, 16));\n };\n TuiFormatDatePipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiFormatDate\",\n type: TuiFormatDatePipe,\n pure: true\n });\n return TuiFormatDatePipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFormatDatePipeModule = /*#__PURE__*/(() => {\n class TuiFormatDatePipeModule {}\n TuiFormatDatePipeModule.ɵfac = function TuiFormatDatePipeModule_Factory(t) {\n return new (t || TuiFormatDatePipeModule)();\n };\n TuiFormatDatePipeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFormatDatePipeModule\n });\n TuiFormatDatePipeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiFormatDatePipeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiFormatDatePipe, TuiFormatDatePipeModule };\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 { __decorate } from 'tslib';\nimport * as i0 from '@angular/core';\nimport { forwardRef, ElementRef, Component, ChangeDetectionStrategy, Inject, Optional, Self, Input, HostBinding, HostListener, ViewEncapsulation, ContentChildren, Directive, NgModule } from '@angular/core';\nimport { tuiIsNativeFocused, TUI_IS_MOBILE, 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\", \"\"];\nconst _c1 = [\"*\"];\nconst _c2 = a0 => ({\n $implicit: a0\n});\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_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", text_r1, \"\\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_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"src\", ctx_r1.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();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.dropdown);\n }\n}\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_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", text_r1, \" \");\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_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.emptyContent || i0.ɵɵpipeBind1(2, 1, ctx_r1.defaultEmptyContent$));\n }\n}\nfunction shouldFocus({\n currentTarget\n}) {\n return !this.isMobile && !tuiIsNativeFocused(currentTarget);\n}\n// TODO: Consider all use cases for aria roles\nlet TuiOptionComponent = /*#__PURE__*/(() => {\n class TuiOptionComponent {\n constructor(isMobile, content, dataList, el, host, dropdown, icons) {\n this.isMobile = isMobile;\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_IS_MOBILE), 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: _c1,\n decls: 3,\n vars: 4,\n consts: [[\"base\", \"\"], [4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"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\", 1)(1, TuiOptionComponent_ng_template_1_Template, 2, 1, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const base_r3 = i0.ɵɵreference(2);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.content || base_r3)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c2, base_r3));\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: _c1,\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\"];\nconst _c1 = [\"*\"];\nconst _c2 = (a0, a1) => ({\n $implicit: a0,\n close: a1\n});\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_r4 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", text_r4, \" \");\n }\n}\nfunction TuiHostedDropdownComponent_div_0_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6, 2);\n i0.ɵɵlistener(\"keydown\", function TuiHostedDropdownComponent_div_0_ng_template_3_Template_div_keydown_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.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 activeZone_r5 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.content)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction2(2, _c2, activeZone_r5, ctx_r1.close));\n }\n}\nfunction TuiHostedDropdownComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 4, 0);\n i0.ɵɵlistener(\"tuiActiveZoneChange\", function TuiHostedDropdownComponent_div_0_Template_div_tuiActiveZoneChange_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onActiveZone($event));\n })(\"tuiObscured\", function TuiHostedDropdownComponent_div_0_Template_div_tuiObscured_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onHostObscured($event));\n });\n i0.ɵɵprojection(2);\n i0.ɵɵtemplate(3, TuiHostedDropdownComponent_div_0_ng_template_3_Template, 4, 5, \"ng-template\", 5, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const isOpen_r6 = ctx.tuiLet;\n const dropdown_r7 = i0.ɵɵreference(4);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"tuiDropdown\", dropdown_r7)(\"tuiDropdownManual\", isOpen_r6 && ctx_r1.canOpen)(\"tuiDropdownSided\", ctx_r1.sided)(\"tuiObscuredEnabled\", isOpen_r6);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"polymorpheus\", ctx_r1.context);\n }\n}\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 /** 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.el.nativeElement.classList.toggle('_hosted_dropdown_focused', 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 hostBindings: function TuiHostedDropdownComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"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 },\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: _c1,\n decls: 2,\n vars: 3,\n consts: [[\"activeZone\", \"tuiActiveZone\"], [\"dropdown\", \"polymorpheus\"], [\"wrapper\", \"\"], [\"tuiAccessorProxy\", \"\", \"tuiDropdownOpenMonitor\", \"\", \"class\", \"t-wrapper\", 3, \"tuiDropdown\", \"tuiDropdownManual\", \"tuiDropdownSided\", \"tuiObscuredEnabled\", \"tuiActiveZoneChange\", \"tuiObscured\", 4, \"tuiLet\"], [\"tuiAccessorProxy\", \"\", \"tuiDropdownOpenMonitor\", \"\", 1, \"t-wrapper\", 3, \"tuiActiveZoneChange\", \"tuiObscured\", \"tuiDropdown\", \"tuiDropdownManual\", \"tuiDropdownSided\", \"tuiObscuredEnabled\"], [3, \"polymorpheus\"], [1, \"t-dropdown\", 3, \"keydown\"], [\"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\", 3);\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.TuiDropdownPositionDirective, 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 * 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_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r1);\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: [[\"driver\", \"tuiHintHover\"], [\"appearance\", \"icon\", \"automation-id\", \"tui-tooltip__icon\", \"tuiWrapper\", \"\", 1, \"t-tooltip-icon\", 3, \"hover\", \"tuiHint\", \"tuiHintAppearance\", \"tuiHintContext\", \"tuiHintDescribe\", \"tuiHintDirection\", \"tuiHintHideDelay\", \"tuiHintShowDelay\"], [3, \"src\", 4, \"polymorpheusOutlet\"], [3, \"src\"]],\n template: function TuiTooltipComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 1, 0);\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 driver_r2 = i0.ɵɵreference(1);\n i0.ɵɵproperty(\"hover\", i0.ɵɵpipeBind1(2, 9, driver_r2) || 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\"];\nconst _c2 = [[[\"input\"]], [[\"select\"]], [[\"tuiContent\"]], \"*\"];\nconst _c3 = [\"input\", \"select\", \"tuiContent\", \"*\"];\nconst _c4 = a0 => ({\n $implicit: a0\n});\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_r2 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r2);\n }\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_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r2.iconLeftContent)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c4, ctx_r2.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_r2 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-placeholder_raised\", ctx_r2.placeholderRaised);\n i0.ɵɵproperty(\"for\", ctx_r2.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_r4 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r4);\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_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r2.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_r6 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r6);\n }\n}\nfunction TuiPrimitiveTextfieldComponent_span_21_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = 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(_r5);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.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_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r2.iconCleaner || ctx_r2.controller.options.iconCleaner)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c4, ctx_r2.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_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", ctx_r2.hintOptions == null ? null : ctx_r2.hintOptions.content)(\"describeId\", ctx_r2.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_r7 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r7);\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_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r2.iconContent)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c4, ctx_r2.size));\n }\n}\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: [[\"pre\", \"\"], [1, \"t-prefix\", 3, \"textContent\"], [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\", 1, 0)(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();\n i0.ɵɵproperty(\"textContent\", ctx.filler);\n i0.ɵɵadvance();\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: [0, \"filler\", \"textfieldFiller\"],\n iconCleaner: \"iconCleaner\",\n readOnly: \"readOnly\",\n invalid: \"invalid\",\n disabled: \"disabled\",\n textfieldPrefix: [0, \"prefix\", \"textfieldPrefix\"],\n textfieldPostfix: [0, \"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: _c3,\n decls: 24,\n vars: 37,\n consts: [[\"focusableElement\", \"\"], [\"decor\", \"\"], [4, \"ngIf\"], [\"automation-id\", \"tui-primitive-textfield__wrapper\", \"tuiWrapper\", \"\", 3, \"click.prevent.silent\", \"mousedown\", \"tuiAutofilledChange\", \"active\", \"appearance\", \"disabled\", \"focus\", \"hover\", \"invalid\", \"readOnly\"], [\"automation-id\", \"tui-primitive-textfield__native-input\", \"tuiMaskAccessor\", \"\", 1, \"t-input\", 3, \"ngModelChange\", \"disabled\", \"id\", \"ngModel\", \"readOnly\", \"tuiFocusable\"], [\"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\"], [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 const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef(_c2);\n i0.ɵɵtemplate(0, TuiPrimitiveTextfieldComponent_ng_container_0_Template, 1, 0, \"ng-container\", 2);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵtemplate(2, TuiPrimitiveTextfieldComponent_ng_container_2_Template, 1, 0, \"ng-container\", 2);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementStart(4, \"div\", 3);\n i0.ɵɵpipe(5, \"async\");\n i0.ɵɵlistener(\"click.prevent.silent\", function TuiPrimitiveTextfieldComponent_Template_div_click_prevent_silent_4_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.detectRetargetFromLabel($event));\n })(\"mousedown\", function TuiPrimitiveTextfieldComponent_Template_div_mousedown_4_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onMouseDown($event));\n })(\"tuiAutofilledChange\", function TuiPrimitiveTextfieldComponent_Template_div_tuiAutofilledChange_4_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onAutofilled($event));\n });\n i0.ɵɵprojection(6);\n i0.ɵɵprojection(7, 1);\n i0.ɵɵelementStart(8, \"input\", 4, 0);\n i0.ɵɵlistener(\"ngModelChange\", function TuiPrimitiveTextfieldComponent_Template_input_ngModelChange_8_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onModelChange($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(10, TuiPrimitiveTextfieldComponent_div_10_Template, 2, 0, \"div\", 5);\n i0.ɵɵelementStart(11, \"div\", 6);\n i0.ɵɵtemplate(12, TuiPrimitiveTextfieldComponent_div_12_Template, 2, 4, \"div\", 7);\n i0.ɵɵelementStart(13, \"div\", 8);\n i0.ɵɵtemplate(14, TuiPrimitiveTextfieldComponent_label_14_Template, 2, 3, \"label\", 9);\n i0.ɵɵelementStart(15, \"div\", 10);\n i0.ɵɵelement(16, \"tui-value-decoration\", 11, 1);\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 focusableElement_r8 = i0.ɵɵreference(9);\n const decor_r9 = 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, decor_r9.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$(focusableElement_r8)), \"px\");\n i0.ɵɵclassProp(\"t-has-value\", ctx.value);\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"ngIf\", ctx.hasCustomContent);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.hasCleaner);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showHint);\n i0.ɵɵadvance();\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}@supports (-webkit-touch-callout: none){.t-input[_ngcontent-%COMP%]:active{font-size:1rem}}.t-input[inputMode=none][_ngcontent-%COMP%]{caret-color:transparent}.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=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=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]{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%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-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 const mode = this.el.nativeElement.inputMode || this.host.inputMode;\n return mode === 'text' ? null : mode;\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}@supports (-webkit-touch-callout: none){[_nghost-%COMP%]:active{font-size:1rem}}[inputMode=none][_nghost-%COMP%]{caret-color:transparent}[_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=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=l][_nghost-%COMP%]:not(._label-outside) -shadowcsshost{padding-top:1.25rem}[data-size=l][_nghost-%COMP%]:not(._label-outside) [_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) [_ngcontent-%COMP%]:-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","import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, Directive, Optional, SkipSelf, TemplateRef, ChangeDetectorRef, forwardRef, Self, inject, Injectable, NgModule } from '@angular/core';\nimport { tuiIsString, tuiIsObserved, tuiCreateToken, tuiProvideOptions, tuiIfMap, TuiDestroyService, AbstractTuiDialogService, TUI_ALERTS } from '@taiga-ui/cdk';\nimport * as i1 from '@taiga-ui/core';\nimport { TUI_CLOSE_WORD, TUI_COMMON_ICONS, TuiModeDirective, TUI_BUTTON_OPTIONS, TUI_ANIMATION_OPTIONS, tuiFadeIn, tuiSlideInRight, tuiHeightCollapse, TuiButtonModule, TuiLinkModule, TuiSvgModule, TuiFormatDatePipeModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from 'rxjs';\nimport { Subject } from 'rxjs';\nimport * as i5 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusTemplate, POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport { takeUntil } from 'rxjs/operators';\nconst _c0 = [[[\"img\"]], [[\"tui-svg\"]], \"*\", [[\"\", \"tuiButton\", \"\"]], [[\"\", \"tuiLink\", \"\"]]];\nconst _c1 = [\"img\", \"tui-svg\", \"*\", \"[tuiButton]\", \"[tuiLink]\"];\nfunction TuiPushComponent_button_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 10);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵlistener(\"click\", function TuiPushComponent_button_2_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.close.emit());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"border-radius\", 50, \"%\");\n i0.ɵɵproperty(\"icon\", ctx_r1.icons.close)(\"title\", i0.ɵɵpipeBind1(1, 4, ctx_r1.closeWord$));\n }\n}\nfunction TuiPushComponent_span_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 11);\n i0.ɵɵpipe(1, \"tuiFormatDate\");\n i0.ɵɵpipe(2, \"async\");\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"textContent\", ctx_r1.isString(ctx_r1.timestamp) ? ctx_r1.timestamp : i0.ɵɵpipeBind1(2, 3, i0.ɵɵpipeBind1(1, 1, ctx_r1.timestamp)));\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_img_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"img\", 8);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"src\", ctx_r1.context.image, i0.ɵɵsanitizeUrl);\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_tui_svg_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 9);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵstyleProp(\"color\", ctx_r1.context.iconColor);\n i0.ɵɵproperty(\"src\", ctx_r1.context.icon);\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 10);\n }\n if (rf & 2) {\n const text_r3 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"innerHTML\", text_r3, i0.ɵɵsanitizeHtml);\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 11);\n i0.ɵɵlistener(\"click\", function TuiPushAlertComponent_tui_push_0_button_4_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.context.$implicit.next(ctx_r1.context.buttons[0]));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.context.buttons[0], \" \");\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_button_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 12);\n i0.ɵɵlistener(\"click\", function TuiPushAlertComponent_tui_push_0_button_5_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.context.$implicit.next(ctx_r1.context.buttons[ctx_r1.context.buttons.length - 1]));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.context.buttons[ctx_r1.context.buttons.length - 1], \" \");\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-push\", 2);\n i0.ɵɵlistener(\"close\", function TuiPushAlertComponent_tui_push_0_Template_tui_push_close_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.context.$implicit.complete());\n });\n i0.ɵɵtemplate(1, TuiPushAlertComponent_tui_push_0_img_1_Template, 1, 1, \"img\", 3)(2, TuiPushAlertComponent_tui_push_0_tui_svg_2_Template, 1, 3, \"tui-svg\", 4)(3, TuiPushAlertComponent_tui_push_0_div_3_Template, 1, 1, \"div\", 5)(4, TuiPushAlertComponent_tui_push_0_button_4_Template, 2, 1, \"button\", 6)(5, TuiPushAlertComponent_tui_push_0_button_5_Template, 2, 1, \"button\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"heading\", ctx_r1.context.heading)(\"timestamp\", ctx_r1.context.timestamp)(\"type\", ctx_r1.context.type);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.context.image);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.context.icon);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.context.content)(\"polymorpheusOutletContext\", ctx_r1.context);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.context.buttons.length > 1);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.context.buttons.length);\n }\n}\nfunction TuiPushAlertComponent_ng_template_1_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction TuiPushAlertComponent_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiPushAlertComponent_ng_template_1_ng_container_0_Template, 1, 0, \"ng-container\", 13);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.context.content);\n }\n}\nlet TuiPushComponent = /*#__PURE__*/(() => {\n class TuiPushComponent {\n constructor(closeWord$, icons) {\n this.closeWord$ = closeWord$;\n this.icons = icons;\n this.heading = '';\n this.type = '';\n this.lines = 2;\n this.timestamp = '';\n this.close = new EventEmitter();\n this.isString = tuiIsString;\n }\n get closeable() {\n return tuiIsObserved(this.close);\n }\n }\n TuiPushComponent.ɵfac = function TuiPushComponent_Factory(t) {\n return new (t || TuiPushComponent)(i0.ɵɵdirectiveInject(TUI_CLOSE_WORD), i0.ɵɵdirectiveInject(TUI_COMMON_ICONS));\n };\n TuiPushComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPushComponent,\n selectors: [[\"tui-push\"]],\n hostVars: 2,\n hostBindings: function TuiPushComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵstyleProp(\"--t-lines\", ctx.lines);\n }\n },\n inputs: {\n heading: \"heading\",\n type: \"type\",\n lines: \"lines\",\n timestamp: \"timestamp\"\n },\n outputs: {\n close: \"close\"\n },\n ngContentSelectors: _c1,\n decls: 17,\n vars: 4,\n consts: [[1, \"t-image\"], [\"appearance\", \"\", \"size\", \"xs\", \"tuiIconButton\", \"\", \"type\", \"button\", \"class\", \"t-close\", 3, \"icon\", \"border-radius\", \"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\", \"\", \"size\", \"xs\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-close\", 3, \"click\", \"icon\", \"title\"], [1, \"t-time\", 3, \"textContent\"]],\n template: function TuiPushComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c0);\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, TuiPushComponent_button_2_Template, 2, 6, \"button\", 1);\n i0.ɵɵelementStart(3, \"div\", 2)(4, \"span\", 3);\n i0.ɵɵprojection(5, 1);\n i0.ɵɵelementEnd();\n i0.ɵɵtext(6);\n i0.ɵɵtemplate(7, TuiPushComponent_span_7_Template, 3, 5, \"span\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(8, \"h3\", 5);\n i0.ɵɵtext(9);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(10, \"div\", 6);\n i0.ɵɵprojection(11, 2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(12, \"div\", 7)(13, \"span\", 8);\n i0.ɵɵprojection(14, 3);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(15, \"span\", 9);\n i0.ɵɵprojection(16, 4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.closeable);\n i0.ɵɵadvance(4);\n i0.ɵɵtextInterpolate1(\" \", ctx.type, \" \");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.timestamp);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", ctx.heading, \"\\n\");\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.NgIf, i2.AsyncPipe, i1.TuiFormatDatePipe],\n 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:var(--t-lines);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}\"],\n changeDetection: 0\n });\n return TuiPushComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPushDirective = /*#__PURE__*/(() => {\n class TuiPushDirective extends TuiModeDirective {\n constructor(modeDirective) {\n var _a;\n super();\n this.modeDirective = modeDirective;\n this.size = 's';\n this.shape = null;\n this.change$ = ((_a = this.modeDirective) === null || _a === void 0 ? void 0 : _a.change$) || new Subject();\n }\n get appearance() {\n var _a;\n return ((_a = this.modeDirective) === null || _a === void 0 ? void 0 : _a.mode) === 'onDark' ? 'accent' : 'secondary';\n }\n }\n TuiPushDirective.ɵfac = function TuiPushDirective_Factory(t) {\n return new (t || TuiPushDirective)(i0.ɵɵdirectiveInject(TuiModeDirective, 12));\n };\n TuiPushDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiPushDirective,\n selectors: [[\"tui-push\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: TuiModeDirective,\n useExisting: TuiPushDirective\n }, {\n provide: TUI_BUTTON_OPTIONS,\n useExisting: TuiPushDirective\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiPushDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_PUSH_DEFAULT_OPTIONS = {\n heading: '',\n type: '',\n timestamp: '',\n image: '',\n icon: '',\n iconColor: '',\n buttons: []\n};\n/**\n * Default parameters for Push component\n */\nconst TUI_PUSH_OPTIONS = tuiCreateToken(TUI_PUSH_DEFAULT_OPTIONS);\nfunction tuiPushOptionsProvider(options) {\n return tuiProvideOptions(TUI_PUSH_OPTIONS, options, TUI_PUSH_DEFAULT_OPTIONS);\n}\nlet TuiPushAlertDirective = /*#__PURE__*/(() => {\n class TuiPushAlertDirective extends PolymorpheusTemplate {\n constructor(template, cdr, destroy$, push) {\n super(template, cdr);\n this.show$ = new Subject();\n this.show$.pipe(tuiIfMap(() => push.open(this)), takeUntil(destroy$)).subscribe();\n }\n set tuiPush(show) {\n this.show$.next(show);\n }\n }\n TuiPushAlertDirective.ɵfac = function TuiPushAlertDirective_Factory(t) {\n return new (t || TuiPushAlertDirective)(i0.ɵɵdirectiveInject(TemplateRef), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(forwardRef(() => TuiPushService)));\n };\n TuiPushAlertDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiPushAlertDirective,\n selectors: [[\"\", \"tuiPush\", \"\"]],\n inputs: {\n tuiPush: \"tuiPush\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiPushAlertDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPushAlertComponent = /*#__PURE__*/(() => {\n class TuiPushAlertComponent {\n constructor(animation, context) {\n this.animation = animation;\n this.context = context;\n }\n get isDirective() {\n return this.context.content instanceof TuiPushAlertDirective;\n }\n }\n TuiPushAlertComponent.ɵfac = function TuiPushAlertComponent_Factory(t) {\n return new (t || TuiPushAlertComponent)(i0.ɵɵdirectiveInject(TUI_ANIMATION_OPTIONS), i0.ɵɵdirectiveInject(POLYMORPHEUS_CONTEXT));\n };\n TuiPushAlertComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPushAlertComponent,\n selectors: [[\"tui-push-alert\"]],\n hostAttrs: [\"role\", \"alert\"],\n hostVars: 3,\n hostBindings: function TuiPushAlertComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵsyntheticHostProperty(\"@tuiFadeIn\", ctx.animation)(\"@tuiSlideInRight\", ctx.animation)(\"@tuiHeightCollapse\", ctx.animation);\n }\n },\n decls: 3,\n vars: 2,\n consts: [[\"directive\", \"\"], [3, \"heading\", \"timestamp\", \"type\", \"close\", 4, \"ngIf\", \"ngIfElse\"], [3, \"close\", \"heading\", \"timestamp\", \"type\"], [\"alt\", \"\", 3, \"src\", 4, \"ngIf\"], [3, \"src\", \"color\", 4, \"ngIf\"], [3, \"innerHTML\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"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\"], [4, \"polymorpheusOutlet\"]],\n template: function TuiPushAlertComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiPushAlertComponent_tui_push_0_Template, 6, 9, \"tui-push\", 1)(1, TuiPushAlertComponent_ng_template_1_Template, 1, 1, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const directive_r6 = i0.ɵɵreference(2);\n i0.ɵɵproperty(\"ngIf\", !ctx.isDirective)(\"ngIfElse\", directive_r6);\n }\n },\n dependencies: [TuiPushComponent, i1.TuiSvgComponent, i1.TuiButtonComponent, i1.TuiLinkComponent, i2.NgIf, TuiPushDirective, i5.PolymorpheusOutletDirective],\n styles: [\"[_nghost-%COMP%]{max-width:calc(100% - 2rem);margin:0 1rem 1rem auto}[_nghost-%COMP%]:first-child{margin-top:auto}\"],\n data: {\n animation: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse]\n },\n changeDetection: 0\n });\n return TuiPushAlertComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPushService = /*#__PURE__*/(() => {\n class TuiPushService extends AbstractTuiDialogService {\n constructor() {\n super(...arguments);\n this.component = new PolymorpheusComponent(TuiPushAlertComponent);\n this.defaultOptions = inject(TUI_PUSH_OPTIONS);\n }\n }\n TuiPushService.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiPushService_BaseFactory;\n return function TuiPushService_Factory(t) {\n return (ɵTuiPushService_BaseFactory || (ɵTuiPushService_BaseFactory = i0.ɵɵgetInheritedFactory(TuiPushService)))(t || TuiPushService);\n };\n })();\n TuiPushService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiPushService,\n factory: TuiPushService.ɵfac,\n providedIn: 'root'\n });\n return TuiPushService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPushModule = /*#__PURE__*/(() => {\n class TuiPushModule {}\n TuiPushModule.ɵfac = function TuiPushModule_Factory(t) {\n return new (t || TuiPushModule)();\n };\n TuiPushModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPushModule\n });\n TuiPushModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: TUI_ALERTS,\n useExisting: TuiPushService,\n multi: true\n }],\n imports: [[CommonModule, PolymorpheusModule, TuiButtonModule, TuiLinkModule, TuiSvgModule, TuiFormatDatePipeModule]]\n });\n return TuiPushModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_PUSH_DEFAULT_OPTIONS, TUI_PUSH_OPTIONS, TuiPushAlertComponent, TuiPushAlertDirective, TuiPushComponent, TuiPushDirective, TuiPushModule, TuiPushService, tuiPushOptionsProvider };\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\"];\nconst _c1 = a0 => ({\n $implicit: a0\n});\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_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"inheritColor\", true)(\"showLoader\", ctx_r1.value)(\"size\", ctx_r1.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_r3 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r3);\n }\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();\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_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"inheritColor\", true)(\"showLoader\", !ctx_r1.value)(\"size\", ctx_r1.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_r4 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r4);\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_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.iconOff)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c1, ctx_r1.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: [[\"focusableElement\", \"\"], [\"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, \"tuiCheckedChange\", \"tuiFocusedChange\", \"tuiFocusVisibleChange\", \"disabled\", \"id\", \"tuiFocusable\", \"tuiChecked\"], [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 const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 1)(1, \"div\", 2);\n i0.ɵɵtemplate(2, TuiToggleComponent_tui_loader_2_Template, 1, 3, \"tui-loader\", 3)(3, TuiToggleComponent_span_3_Template, 2, 4, \"span\", 4);\n i0.ɵɵelement(4, \"div\", 5);\n i0.ɵɵtemplate(5, TuiToggleComponent_tui_loader_5_Template, 1, 3, \"tui-loader\", 3)(6, TuiToggleComponent_span_6_Template, 2, 4, \"span\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(7, \"input\", 6, 0);\n i0.ɵɵtwoWayListener(\"tuiCheckedChange\", function TuiToggleComponent_Template_input_tuiCheckedChange_7_listener($event) {\n i0.ɵɵrestoreView(_r1);\n i0.ɵɵtwoWayBindingSet(ctx.value, $event) || (ctx.value = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵlistener(\"tuiFocusedChange\", function TuiToggleComponent_Template_input_tuiFocusedChange_7_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onFocused($event));\n })(\"tuiFocusVisibleChange\", function TuiToggleComponent_Template_input_tuiFocusVisibleChange_7_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(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();\n i0.ɵɵproperty(\"ngIf\", ctx.showIcons && !ctx.showLoader);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.showLoader);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showIcons && !ctx.showLoader);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"disabled\", ctx.disabled)(\"id\", ctx.id)(\"tuiFocusable\", ctx.focusable);\n i0.ɵɵtwoWayProperty(\"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}@supports (-webkit-touch-callout: none){.t-checkbox[_ngcontent-%COMP%]:active{font-size:1rem}}._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 * as i0 from '@angular/core';\nimport { Directive } from '@angular/core';\nimport { Subject } from 'rxjs';\nlet AbstractTuiEditor = /*#__PURE__*/(() => {\n class AbstractTuiEditor {\n constructor() {\n this.stateChange$ = new Subject();\n this.valueChange$ = new Subject();\n }\n }\n AbstractTuiEditor.ɵfac = function AbstractTuiEditor_Factory(t) {\n return new (t || AbstractTuiEditor)();\n };\n AbstractTuiEditor.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiEditor\n });\n return AbstractTuiEditor;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractTuiEditor };\n","import * as i0 from '@angular/core';\nimport { Injectable, Inject, ElementRef, Renderer2, Directive, Self, Input, Output, NgModule } from '@angular/core';\nimport * as i3 from '@taiga-ui/cdk';\nimport { tuiPx, TuiDestroyService } from '@taiga-ui/cdk';\nimport { TIPTAP_EDITOR, INITIALIZATION_TIPTAP_CONTAINER } from '@tinkoff/tui-editor/tokens';\nimport { startWith, map, distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport * as i1$1 from '@tinkoff/tui-editor/abstract';\nimport { AbstractTuiEditor } from '@tinkoff/tui-editor/abstract';\nimport { EDITOR_BLANK_COLOR } from '@tinkoff/tui-editor/constants';\nimport { tuiParseStyle, tuiGetMarkRange } from '@tinkoff/tui-editor/utils';\nimport { EditorState } from 'prosemirror-state';\nimport * as i1 from 'rxjs';\nfunction tuiIsEmptyParagraph(json) {\n return Array.isArray(json) && json.length === 1 && json[0].type === `paragraph` && !json[0].hasOwnProperty(`content`);\n}\nlet TuiTiptapEditorService = /*#__PURE__*/(() => {\n class TuiTiptapEditorService extends AbstractTuiEditor {\n constructor(editorRef) {\n super();\n this.editorRef = editorRef;\n this.editorRef.subscribe(editor => {\n this.editor = editor;\n const update = () => {\n const content = editor.getHTML();\n const json = editor.getJSON().content;\n const value = tuiIsEmptyParagraph(json) ? `` : content;\n this.valueChange$.next(value);\n this.stateChange$.next();\n };\n editor.on(`transaction`, update.bind(this));\n editor.on(`update`, update.bind(this));\n });\n }\n get isFocused() {\n return this.editor.isFocused;\n }\n get html() {\n return this.editor.getHTML();\n }\n get editable() {\n return this.editor.isEditable;\n }\n set editable(editable) {\n this.editor.setEditable(editable, false);\n }\n get state() {\n return this.editor.state;\n }\n getOriginTiptapEditor() {\n return this.editor;\n }\n undoDisabled() {\n return !this.editor.can().undo();\n }\n redoDisabled() {\n return !this.editor.can().redo();\n }\n getFontColor() {\n return this.editor.getAttributes(`textStyle`).fontColor || EDITOR_BLANK_COLOR;\n }\n getFontSize() {\n return parseInt(this.editor.getAttributes(`textStyle`).fontSize, 10);\n }\n setFontSize(size) {\n this.editor.chain().setMark(`textStyle`, {\n fontSize: tuiPx(size)\n }).run();\n }\n getBackgroundColor() {\n var _a;\n return ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.getAttributes(`textStyle`).backgroundColor) || `transparent`;\n }\n getCellColor() {\n return this.editor.getAttributes(`tableCell`).background || this.editor.getAttributes(`tableHeader`).background;\n }\n getGroupColor() {\n var _a, _b, _c, _d;\n if (this.editor.isActive(`group`)) {\n const style = (_b = (_a = this.editor.getAttributes(`group`)) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : ``;\n const styles = tuiParseStyle(style);\n return (_d = (_c = styles[`background-color`]) !== null && _c !== void 0 ? _c : styles[`background`]) !== null && _d !== void 0 ? _d : ``;\n }\n return ``;\n }\n onAlign(align) {\n this.editor.chain().focus().setTextAlign(align).run();\n }\n setImage(src) {\n this.editor.chain().focus().command(({\n commands,\n state\n }) => {\n var _a;\n const setImage = (_a = commands.setEditableImage) !== null && _a !== void 0 ? _a : commands.setImage;\n if (setImage) {\n const anchor = state.selection.anchor;\n setImage({\n src\n });\n commands.setTextSelection(anchor);\n return true;\n }\n return false;\n }).run();\n }\n undo() {\n this.editor.chain().undo().run();\n }\n redo() {\n this.editor.chain().redo().run();\n }\n setHorizontalRule() {\n this.editor.chain().focus().setHorizontalRule().run();\n }\n removeFormat() {\n this.editor.commands.unsetAllMarks();\n this.editor.commands.clearNodes();\n }\n setFontColor(color) {\n this.editor.chain().focus().setFontColor(color).run();\n }\n setBackgroundColor(color) {\n this.editor.chain().focus().setBackgroundColor(color).run();\n }\n toggleUnderline() {\n this.editor.chain().focus().toggleUnderline().run();\n }\n toggleStrike() {\n this.editor.chain().focus().toggleStrike().run();\n }\n toggleOrderedList() {\n this.editor.chain().focus().toggleOrderedList().run();\n }\n toggleUnorderedList() {\n this.editor.chain().focus().toggleBulletList().run();\n }\n togglePre() {\n this.editor.chain().focus().toggleCodeBlock().run();\n }\n toggleTaskList() {\n this.editor.commands.toggleTaskList();\n }\n sinkListItem() {\n const type = this.editor.isActive(`taskList`) ? `taskItem` : `listItem`;\n this.editor.chain().focus().sinkListItem(type).run();\n }\n liftListItem() {\n const type = this.editor.isActive(`taskList`) ? `taskItem` : `listItem`;\n this.editor.chain().focus().liftListItem(type).run();\n }\n isActive(nameOrAttributes) {\n return this.editor.isActive(nameOrAttributes);\n }\n isActive$(nameOrAttributes) {\n return this.stateChange$.pipe(startWith(null), map(() => this.isActive(nameOrAttributes)), distinctUntilChanged());\n }\n toggleBold() {\n this.editor.chain().focus().toggleBold().run();\n }\n toggleCode() {\n this.editor.chain().focus().toggleCode().run();\n }\n toggleItalic() {\n this.editor.chain().focus().toggleItalic().run();\n }\n toggleBlockquote() {\n this.editor.chain().focus().toggleBlockquote().run();\n }\n toggleSubscript() {\n this.editor.chain().focus().toggleSubscript().run();\n }\n toggleSuperscript() {\n this.editor.chain().focus().toggleSuperscript().run();\n }\n toggleCodeBlock() {\n this.editor.chain().focus().toggleCodeBlock().run();\n }\n insertTable(cols, rows) {\n this.editor.chain().focus().insertTable({\n cols,\n rows\n }).run();\n }\n addColumnAfter() {\n this.editor.chain().focus().addColumnAfter().run();\n }\n addColumnBefore() {\n this.editor.chain().focus().addColumnBefore().run();\n }\n addRowAfter() {\n this.editor.chain().focus().addRowAfter().run();\n }\n addRowBefore() {\n this.editor.chain().focus().addRowBefore().run();\n }\n deleteColumn() {\n this.editor.chain().focus().deleteColumn().run();\n }\n deleteRow() {\n this.editor.chain().focus().deleteRow().run();\n }\n mergeCells() {\n this.editor.chain().focus().mergeCells().run();\n }\n splitCell() {\n this.editor.chain().focus().splitCell().run();\n }\n canMergeCells() {\n return this.editor.can().mergeCells();\n }\n canSplitCells() {\n return this.editor.can().splitCell();\n }\n setHeading(level) {\n this.editor.chain().focus().setHeading({\n level\n }).run();\n }\n setParagraph(options) {\n this.editor.chain().focus().setParagraph().run();\n if (options) {\n this.editor.chain().setMark(`textStyle`, options).run();\n }\n }\n setHardBreak() {\n this.editor.chain().setHardBreak().run();\n }\n setTextSelection(value) {\n this.editor.commands.setTextSelection(value);\n }\n toggleLink(href) {\n this.editor.chain().focus().toggleLink({\n href\n }).run();\n }\n setLink(href) {\n this.editor.chain().focus().setLink({\n href\n }).run();\n }\n unsetLink() {\n this.editor.chain().focus().unsetLink().run();\n }\n focus() {\n this.editor.chain().focus().run();\n }\n setValue(value) {\n if (value === this.html || value === `` && this.html === `

`) {\n return;\n }\n this.editor.commands.setContent(value);\n this.editor.view.updateState(EditorState.create({\n schema: this.editor.state.schema,\n doc: this.editor.state.doc,\n selection: this.editor.state.selection,\n storedMarks: this.editor.state.storedMarks,\n plugins: this.editor.state.plugins\n }));\n }\n destroy() {\n this.editor.destroy();\n }\n setCellColor(color) {\n this.editor.chain().focus().setCellBackground(color).run();\n }\n selectClosest() {\n const pos = this.editor.state.selection.anchor;\n const {\n schema,\n doc\n } = this.editor.state;\n const range = tuiGetMarkRange(doc.resolve(pos), schema.marks.link);\n if (range) {\n this.editor.chain().setTextSelection(range).run();\n }\n }\n enter() {\n this.editor.commands.enter();\n }\n setDetails() {\n this.editor.commands.setDetails();\n }\n removeDetails() {\n this.editor.commands.removeDetails();\n }\n setGroup() {\n this.editor.commands.setGroup();\n }\n removeGroup() {\n this.editor.commands.removeGroup();\n }\n setGroupHilite(color) {\n this.editor.commands.setGroupHilite(color);\n }\n setAnchor(anchor) {\n this.editor.commands.setAnchor(anchor.replace(`#`, ``));\n }\n removeAnchor() {\n this.editor.commands.removeAnchor();\n }\n setFileLink(preview) {\n this.editor.commands.setFileLink(preview);\n }\n setYoutubeVideo(options) {\n this.editor.commands.setYoutubeVideo(options);\n }\n setIframe(options) {\n this.editor.commands.setIframe(options);\n }\n removeEmptyTextStyle() {\n this.editor.commands.removeEmptyTextStyle();\n }\n toggleMark(typeOrName, attributes, options) {\n this.editor.commands.toggleMark(typeOrName, attributes, options);\n }\n getHTML() {\n var _a;\n return (_a = this.getOriginTiptapEditor().getHTML()) !== null && _a !== void 0 ? _a : ``;\n }\n }\n TuiTiptapEditorService.ɵfac = function TuiTiptapEditorService_Factory(t) {\n return new (t || TuiTiptapEditorService)(i0.ɵɵinject(TIPTAP_EDITOR));\n };\n TuiTiptapEditorService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiTiptapEditorService,\n factory: TuiTiptapEditorService.ɵfac\n });\n return TuiTiptapEditorService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTiptapEditorDirective = /*#__PURE__*/(() => {\n class TuiTiptapEditorDirective {\n constructor(el, renderer, editor, editorContainer, editorLoaded$, destroy$) {\n this.el = el;\n this.renderer = renderer;\n this.editor = editor;\n this.editorContainer = editorContainer;\n this.editorLoaded$ = editorLoaded$;\n this.valueChange = this.editor.valueChange$;\n this.stateChange = this.editor.stateChange$;\n this.editorLoaded$.pipe(takeUntil(destroy$)).subscribe(() => {\n this.renderer.appendChild(this.el.nativeElement, this.editorContainer);\n });\n }\n set value(value) {\n this.editor.setValue(value);\n }\n set editable(editable) {\n this.editor.editable = editable;\n }\n }\n TuiTiptapEditorDirective.ɵfac = function TuiTiptapEditorDirective_Factory(t) {\n return new (t || TuiTiptapEditorDirective)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(Renderer2), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(INITIALIZATION_TIPTAP_CONTAINER), i0.ɵɵdirectiveInject(TIPTAP_EDITOR), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiTiptapEditorDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTiptapEditorDirective,\n selectors: [[\"\", \"tuiTiptapEditor\", \"\"]],\n inputs: {\n value: \"value\",\n editable: \"editable\"\n },\n outputs: {\n valueChange: \"valueChange\",\n stateChange: \"stateChange\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])]\n });\n return TuiTiptapEditorDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTiptapEditorModule = /*#__PURE__*/(() => {\n class TuiTiptapEditorModule {}\n TuiTiptapEditorModule.ɵfac = function TuiTiptapEditorModule_Factory(t) {\n return new (t || TuiTiptapEditorModule)();\n };\n TuiTiptapEditorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTiptapEditorModule\n });\n TuiTiptapEditorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiTiptapEditorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTiptapEditorDirective, TuiTiptapEditorModule, TuiTiptapEditorService };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport * as i5 from 'rxjs';\nimport { combineLatest } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@taiga-ui/cdk';\nimport { TuiLetModule } from '@taiga-ui/cdk';\nimport * as i4 from '@tinkoff/tui-editor/abstract';\nfunction TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6)(1, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.onAlign(\"left\"));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_2_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.onAlign(\"center\"));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_3_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.onAlign(\"right\"));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_4_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.onAlign(\"justify\"));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const alignState_r3 = i0.ɵɵnextContext().tuiLet;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.textAlignLeft)(\"pseudoActive\", !!(alignState_r3 == null ? null : alignState_r3.left))(\"tuiHint\", texts_r4.justifyLeft);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.textAlignCenter)(\"pseudoActive\", !!(alignState_r3 == null ? null : alignState_r3.center))(\"tuiHint\", texts_r4.justifyCenter);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.textAlignRight)(\"pseudoActive\", !!(alignState_r3 == null ? null : alignState_r3.right))(\"tuiHint\", texts_r4.justifyRight);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.textAlignJustify)(\"pseudoActive\", !!(alignState_r3 == null ? null : alignState_r3.justify))(\"tuiHint\", texts_r4.justifyFull);\n }\n}\nfunction TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 4, 0);\n i0.ɵɵelement(2, \"button\", 5);\n i0.ɵɵtemplate(3, TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template, 5, 12, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const align_r5 = i0.ɵɵreference(1);\n const alignDropdown_r6 = i0.ɵɵreference(4);\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", alignDropdown_r6);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", align_r5.open)(\"icon\", ctx_r1.options.icons.textAlignPreview)(\"pseudoActive\", align_r5.open)(\"tuiHint\", texts_r4.justify);\n }\n}\nfunction TuiAlignContentComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_Template, 5, 5, \"tui-hosted-dropdown\", 3);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(2, 1, ctx_r1.alignState$));\n }\n}\nlet TuiAlignContentComponent = /*#__PURE__*/(() => {\n class TuiAlignContentComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.alignState$ = combineLatest([this.editor.isActive$({\n textAlign: 'left'\n }), this.editor.isActive$({\n textAlign: 'right'\n }), this.editor.isActive$({\n textAlign: 'center'\n }), this.editor.isActive$({\n textAlign: 'justify'\n })]).pipe(map(([left, right, center, justify]) => ({\n left,\n right,\n center,\n justify\n })));\n }\n }\n TuiAlignContentComponent.ɵfac = function TuiAlignContentComponent_Factory(t) {\n return new (t || TuiAlignContentComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiAlignContentComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiAlignContentComponent,\n selectors: [[\"tui-align-content\"]],\n decls: 2,\n vars: 3,\n consts: [[\"align\", \"\"], [\"alignDropdown\", \"\"], [4, \"ngIf\"], [3, \"content\", 4, \"tuiLet\"], [3, \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__align-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [1, \"t-dropdown\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"pseudoActive\", \"tuiHint\"]],\n template: function TuiAlignContentComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiAlignContentComponent_ng_container_0_Template, 3, 3, \"ng-container\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.texts$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.NgIf, i3.TuiLetDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiAlignContentComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiAlignContentModule = /*#__PURE__*/(() => {\n class TuiAlignContentModule {}\n TuiAlignContentModule.ɵfac = function TuiAlignContentModule_Factory(t) {\n return new (t || TuiAlignContentModule)();\n };\n TuiAlignContentModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiAlignContentModule\n });\n TuiAlignContentModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiLetModule]]\n });\n return TuiAlignContentModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiAlignContentComponent, TuiAlignContentModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_CODE_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDataListModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/tui-editor/abstract';\nimport * as i4 from 'rxjs';\nfunction TuiCodeComponent_ng_template_5_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 5);\n i0.ɵɵlistener(\"click\", function TuiCodeComponent_ng_template_5_button_1_Template_button_click_0_listener() {\n const index_r2 = i0.ɵɵrestoreView(_r1).index;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.onCode(!!index_r2));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r4 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", item_r4, \" \");\n }\n}\nfunction TuiCodeComponent_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-data-list\");\n i0.ɵɵtemplate(1, TuiCodeComponent_ng_template_5_button_1_Template, 2, 1, \"button\", 4);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(2, 1, ctx_r2.codeOptionsTexts$));\n }\n}\nlet TuiCodeComponent = /*#__PURE__*/(() => {\n class TuiCodeComponent {\n constructor(options, editor, texts$, codeOptionsTexts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.codeOptionsTexts$ = codeOptionsTexts$;\n this.hintText$ = this.texts$.pipe(map(texts => texts.code));\n this.insideCode$ = this.editor.stateChange$.pipe(map(() => this.editor.isActive('code') || this.editor.isActive('codeBlock')), distinctUntilChanged());\n }\n onCode(isCodeBlock) {\n if (isCodeBlock) {\n this.editor.toggleCodeBlock();\n } else {\n this.editor.toggleCode();\n }\n }\n }\n TuiCodeComponent.ɵfac = function TuiCodeComponent_Factory(t) {\n return new (t || TuiCodeComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_CODE_OPTIONS));\n };\n TuiCodeComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiCodeComponent,\n selectors: [[\"tui-code\"]],\n decls: 7,\n vars: 9,\n consts: [[\"codes\", \"\"], [\"codesDropdown\", \"\"], [3, \"content\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"tuiOption\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"tuiOption\", \"\", 3, \"click\"]],\n template: function TuiCodeComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 2, 0);\n i0.ɵɵelement(2, \"button\", 3);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵpipe(4, \"async\");\n i0.ɵɵtemplate(5, TuiCodeComponent_ng_template_5_Template, 3, 3, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const codes_r5 = i0.ɵɵreference(1);\n const codesDropdown_r6 = i0.ɵɵreference(6);\n i0.ɵɵproperty(\"content\", codesDropdown_r6);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", codes_r5.open)(\"icon\", ctx.options.icons.code)(\"pseudoActive\", codes_r5.open || i0.ɵɵpipeBind1(3, 5, ctx.insideCode$))(\"tuiHint\", i0.ɵɵpipeBind1(4, 7, ctx.hintText$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i1.TuiDataListComponent, i1.TuiOptionComponent, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.NgForOf, i2.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiCodeComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiCodeModule = /*#__PURE__*/(() => {\n class TuiCodeModule {}\n TuiCodeModule.ɵfac = function TuiCodeModule_Factory(t) {\n return new (t || TuiCodeModule)();\n };\n TuiCodeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiCodeModule\n });\n TuiCodeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDataListModule]]\n });\n return TuiCodeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiCodeComponent, TuiCodeModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/tui-editor/abstract';\nimport * as i4 from 'rxjs';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nfunction TuiDetailsComponent_button_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 1);\n i0.ɵɵlistener(\"click\", function TuiDetailsComponent_button_0_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.setDetails());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const text_r3 = ctx.ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.detailsAdd)(\"tuiHint\", text_r3.setDetails);\n }\n}\nfunction TuiDetailsRemoveComponent_button_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 1);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵlistener(\"click\", function TuiDetailsRemoveComponent_button_0_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.removeDetails());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const text_r3 = ctx.ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"disabled\", !!i0.ɵɵpipeBind1(1, 4, ctx_r1.disabled$))(\"focusable\", false)(\"icon\", ctx_r1.options.icons.detailsRemove)(\"tuiHint\", text_r3.removeDetails);\n }\n}\nlet TuiDetailsComponent = /*#__PURE__*/(() => {\n class TuiDetailsComponent {\n constructor(editor, texts$, options) {\n this.editor = editor;\n this.texts$ = texts$;\n this.options = options;\n }\n setDetails() {\n this.editor.setDetails();\n }\n }\n TuiDetailsComponent.ɵfac = function TuiDetailsComponent_Factory(t) {\n return new (t || TuiDetailsComponent)(i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS));\n };\n TuiDetailsComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiDetailsComponent,\n selectors: [[\"tui-details\"]],\n decls: 2,\n vars: 3,\n consts: [[\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"click\", \"focusable\", \"icon\", \"tuiHint\"]],\n template: function TuiDetailsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiDetailsComponent_button_0_Template, 1, 3, \"button\", 0);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.texts$));\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.NgIf, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiDetailsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDetailsRemoveComponent = /*#__PURE__*/(() => {\n class TuiDetailsRemoveComponent {\n constructor(editor, texts$, options) {\n this.editor = editor;\n this.texts$ = texts$;\n this.options = options;\n this.disabled$ = this.editor.stateChange$.pipe(map(() => !this.editor.isActive('details')), distinctUntilChanged());\n }\n removeDetails() {\n this.editor.removeDetails();\n }\n }\n TuiDetailsRemoveComponent.ɵfac = function TuiDetailsRemoveComponent_Factory(t) {\n return new (t || TuiDetailsRemoveComponent)(i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS));\n };\n TuiDetailsRemoveComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiDetailsRemoveComponent,\n selectors: [[\"tui-details-remove\"]],\n decls: 2,\n vars: 3,\n consts: [[\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"disabled\", \"focusable\", \"icon\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"tuiHint\"]],\n template: function TuiDetailsRemoveComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiDetailsRemoveComponent_button_0_Template, 2, 6, \"button\", 0);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.texts$));\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.NgIf, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiDetailsRemoveComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDetailsModule = /*#__PURE__*/(() => {\n class TuiDetailsModule {}\n TuiDetailsModule.ɵfac = function TuiDetailsModule_Factory(t) {\n return new (t || TuiDetailsModule)();\n };\n TuiDetailsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiDetailsModule\n });\n TuiDetailsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule, TuiHintModule]]\n });\n return TuiDetailsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiDetailsComponent, TuiDetailsModule, TuiDetailsRemoveComponent };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { tuiPx } from '@taiga-ui/cdk';\nimport { EDITOR_BLANK_COLOR } from '@tinkoff/tui-editor/constants';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_FONT_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDataListModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/tui-editor/abstract';\nimport * as i4 from 'rxjs';\nconst _c0 = () => ({});\nfunction TuiFontSizeComponent_ng_template_4_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 5);\n i0.ɵɵpipe(1, \"lowercase\");\n i0.ɵɵlistener(\"click\", function TuiFontSizeComponent_ng_template_4_button_1_Template_button_click_0_listener() {\n const item_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.setFontOption(item_r2));\n });\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r2 = ctx.$implicit;\n i0.ɵɵstyleProp(\"font-family\", item_r2.family)(\"font-size\", item_r2.px, \"px\")(\"font-weight\", item_r2.weight);\n i0.ɵɵproperty(\"ngClass\", (item_r2 == null ? null : item_r2.ngClass) || i0.ɵɵpureFunction0(12, _c0))(\"ngStyle\", (item_r2 == null ? null : item_r2.ngStyle) || i0.ɵɵpureFunction0(13, _c0));\n i0.ɵɵattribute(\"automation-id\", \"tui_font__\" + i0.ɵɵpipeBind1(1, 10, item_r2.name || \"\"));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", item_r2.name, \" \");\n }\n}\nfunction TuiFontSizeComponent_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-data-list\");\n i0.ɵɵtemplate(1, TuiFontSizeComponent_ng_template_4_button_1_Template, 3, 14, \"button\", 4);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(2, 1, ctx_r2.fontsOptions$));\n }\n}\nlet TuiFontSizeComponent = /*#__PURE__*/(() => {\n class TuiFontSizeComponent {\n constructor(options, editor, texts$, fontOptionsTexts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.fontOptionsTexts$ = fontOptionsTexts$;\n this.fontsOptions$ = this.fontOptionsTexts$.pipe(map(texts => this.options.fontOptions(texts)));\n this.fontText$ = this.texts$.pipe(map(texts => texts.font));\n }\n /**\n * @deprecated:\n * use {@link setFontOption}\n */\n onClick({\n headingLevel,\n px\n }) {\n this.setFontOption({\n headingLevel,\n px\n });\n }\n setFontOption({\n headingLevel,\n px\n }) {\n const color = this.editor.getFontColor();\n this.clearPreviousTextStyles();\n if (headingLevel) {\n this.editor.setHeading(headingLevel);\n } else {\n this.editor.setParagraph({\n fontSize: tuiPx(px || 0)\n });\n }\n if (color !== EDITOR_BLANK_COLOR) {\n this.editor.setFontColor(color);\n }\n }\n clearPreviousTextStyles() {\n this.editor.removeEmptyTextStyle();\n this.editor.toggleMark('textStyle');\n }\n }\n TuiFontSizeComponent.ɵfac = function TuiFontSizeComponent_Factory(t) {\n return new (t || TuiFontSizeComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_FONT_OPTIONS));\n };\n TuiFontSizeComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiFontSizeComponent,\n selectors: [[\"tui-font-size\"]],\n decls: 6,\n vars: 7,\n consts: [[\"fonts\", \"\"], [\"fontsDropdown\", \"\"], [3, \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__font-size-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"tuiOption\", \"\", 3, \"ngClass\", \"ngStyle\", \"fontFamily\", \"fontSize\", \"fontWeight\", \"click\", 4, \"ngFor\", \"ngForOf\"], [\"tuiOption\", \"\", 3, \"click\", \"ngClass\", \"ngStyle\"]],\n template: function TuiFontSizeComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 2, 0);\n i0.ɵɵelement(2, \"button\", 3);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵtemplate(4, TuiFontSizeComponent_ng_template_4_Template, 3, 3, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const fonts_r4 = i0.ɵɵreference(1);\n const fontsDropdown_r5 = i0.ɵɵreference(5);\n i0.ɵɵproperty(\"content\", fontsDropdown_r5);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", fonts_r4.open)(\"icon\", ctx.options.icons.fontSize)(\"pseudoActive\", fonts_r4.open)(\"tuiHint\", i0.ɵɵpipeBind1(3, 5, ctx.fontText$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i1.TuiDataListComponent, i1.TuiOptionComponent, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.NgForOf, i2.NgClass, i2.NgStyle, i2.AsyncPipe, i2.LowerCasePipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiFontSizeComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFontSizeModule = /*#__PURE__*/(() => {\n class TuiFontSizeModule {}\n TuiFontSizeModule.ɵfac = function TuiFontSizeModule_Factory(t) {\n return new (t || TuiFontSizeModule)();\n };\n TuiFontSizeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFontSizeModule\n });\n TuiFontSizeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDataListModule]]\n });\n return TuiFontSizeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiFontSizeComponent, TuiFontSizeModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';\nimport { defaultEditorTools } from '@tinkoff/tui-editor/constants';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TuiEditorTool } from '@tinkoff/tui-editor/enums';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport * as i4 from 'rxjs';\nimport { combineLatest } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/tui-editor/abstract';\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 8);\n i0.ɵɵlistener(\"click\", function TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_1_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r1.editor.toggleBold());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = i0.ɵɵnextContext(2).ngIf;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.fontStyleBold)(\"pseudoActive\", state_r3.bold)(\"tuiHint\", texts_r4.bold);\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 8);\n i0.ɵɵlistener(\"click\", function TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_2_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r1.editor.toggleItalic());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = i0.ɵɵnextContext(2).ngIf;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.fontStyleItalic)(\"pseudoActive\", state_r3.italic)(\"tuiHint\", texts_r4.italic);\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 8);\n i0.ɵɵlistener(\"click\", function TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_3_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r1.editor.toggleUnderline());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = i0.ɵɵnextContext(2).ngIf;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.fontStyleUnderline)(\"pseudoActive\", state_r3.underline)(\"tuiHint\", texts_r4.underline);\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 8);\n i0.ɵɵlistener(\"click\", function TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_4_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r7);\n const ctx_r1 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r1.editor.toggleStrike());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = i0.ɵɵnextContext(2).ngIf;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.fontStyleStrike)(\"pseudoActive\", state_r3.strike)(\"tuiHint\", texts_r4.strikeThrough);\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵtemplate(1, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_1_Template, 1, 3, \"button\", 7)(2, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_2_Template, 1, 3, \"button\", 7)(3, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_3_Template, 1, 3, \"button\", 7)(4, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_4_Template, 1, 3, \"button\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isEnabled(ctx_r1.editorTool.Bold));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isEnabled(ctx_r1.editorTool.Italic));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isEnabled(ctx_r1.editorTool.Underline));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isEnabled(ctx_r1.editorTool.Strikethrough));\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 4, 0);\n i0.ɵɵelement(2, \"button\", 5);\n i0.ɵɵtemplate(3, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template, 5, 4, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = ctx.ngIf;\n const format_r8 = i0.ɵɵreference(1);\n const formatDropdown_r9 = i0.ɵɵreference(4);\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", formatDropdown_r9);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", format_r8.open)(\"icon\", ctx_r1.options.icons.fontStylePreview)(\"pseudoActive\", format_r8.open || state_r3.bold || state_r3.italic || state_r3.underline || state_r3.strike)(\"tuiHint\", texts_r4.fontStyle);\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_Template, 5, 5, \"tui-hosted-dropdown\", 3);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(2, 1, ctx_r1.fontStyleState$));\n }\n}\nlet TuiFontStyleComponent = /*#__PURE__*/(() => {\n class TuiFontStyleComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.toolsSet = new Set(defaultEditorTools);\n this.editorTool = TuiEditorTool;\n this.fontStyleState$ = combineLatest([this.editor.isActive$('bold'), this.editor.isActive$('italic'), this.editor.isActive$('underline'), this.editor.isActive$('strike')]).pipe(map(([bold, italic, underline, strike]) => ({\n bold,\n italic,\n underline,\n strike\n })));\n }\n set enabledTools(value) {\n this.toolsSet = new Set(value);\n }\n isEnabled(tool) {\n return this.toolsSet.has(tool);\n }\n }\n TuiFontStyleComponent.ɵfac = function TuiFontStyleComponent_Factory(t) {\n return new (t || TuiFontStyleComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiFontStyleComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiFontStyleComponent,\n selectors: [[\"tui-font-style\"]],\n inputs: {\n enabledTools: \"enabledTools\"\n },\n decls: 2,\n vars: 3,\n consts: [[\"format\", \"\"], [\"formatDropdown\", \"\"], [4, \"ngIf\"], [3, \"content\", 4, \"ngIf\"], [3, \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__font-style-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [1, \"t-dropdown\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", \"class\", \"t-option t-option_margin\", 3, \"icon\", \"pseudoActive\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"pseudoActive\", \"tuiHint\"]],\n template: function TuiFontStyleComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiFontStyleComponent_ng_container_0_Template, 3, 3, \"ng-container\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.texts$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.NgIf, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiFontStyleComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFontStyleModule = /*#__PURE__*/(() => {\n class TuiFontStyleModule {}\n TuiFontStyleModule.ɵfac = function TuiFontStyleModule_Factory(t) {\n return new (t || TuiFontStyleModule)();\n };\n TuiFontStyleModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFontStyleModule\n });\n TuiFontStyleModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiHintModule]]\n });\n return TuiFontStyleModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiFontStyleComponent, TuiFontStyleModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/tui-editor/abstract';\nimport * as i4 from 'rxjs';\nlet TuiEditorGroupToolComponent = /*#__PURE__*/(() => {\n class TuiEditorGroupToolComponent {\n constructor(editor, texts$, options) {\n this.editor = editor;\n this.texts$ = texts$;\n this.options = options;\n this.insertGroupText$ = this.texts$.pipe(map(texts => texts.insertGroup));\n this.removeGroupText$ = this.texts$.pipe(map(texts => texts.removeGroup));\n this.disabled$ = this.editor.stateChange$.pipe(map(() => !this.editor.isActive('group')), distinctUntilChanged());\n }\n addGroup() {\n this.editor.setGroup();\n }\n removeGroup() {\n this.editor.removeGroup();\n }\n }\n TuiEditorGroupToolComponent.ɵfac = function TuiEditorGroupToolComponent_Factory(t) {\n return new (t || TuiEditorGroupToolComponent)(i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS));\n };\n TuiEditorGroupToolComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiEditorGroupToolComponent,\n selectors: [[\"tui-editor-group-tool\"]],\n decls: 5,\n vars: 13,\n consts: [[\"appearance\", \"icon\", \"automation-id\", \"toolbar__group-add-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"click\", \"focusable\", \"icon\", \"tuiHint\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__group-remove-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"tuiHint\"]],\n template: function TuiEditorGroupToolComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"button\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵlistener(\"click\", function TuiEditorGroupToolComponent_Template_button_click_0_listener() {\n return ctx.addGroup();\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"button\", 1);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵpipe(4, \"async\");\n i0.ɵɵlistener(\"click\", function TuiEditorGroupToolComponent_Template_button_click_2_listener() {\n return ctx.removeGroup();\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx.options.icons.groupAdd)(\"tuiHint\", i0.ɵɵpipeBind1(1, 7, ctx.insertGroupText$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"disabled\", !!i0.ɵɵpipeBind1(3, 9, ctx.disabled$))(\"focusable\", false)(\"icon\", ctx.options.icons.groupRemove)(\"tuiHint\", i0.ɵɵpipeBind1(4, 11, ctx.removeGroupText$));\n }\n },\n dependencies: [i1.TuiButtonComponent, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiEditorGroupToolComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorToolGroup = /*#__PURE__*/(() => {\n class TuiEditorToolGroup {}\n TuiEditorToolGroup.ɵfac = function TuiEditorToolGroup_Factory(t) {\n return new (t || TuiEditorToolGroup)();\n };\n TuiEditorToolGroup.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiEditorToolGroup\n });\n TuiEditorToolGroup.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule, TuiHintModule]]\n });\n return TuiEditorToolGroup;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiEditorGroupToolComponent, TuiEditorToolGroup };\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, tuiProvideOptions, tuiCreateTokenFromFactory, TUI_FIRST_DAY, TUI_LAST_DAY, 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_DEFAULT_MASKS = {\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};\nconst TUI_COUNTRIES_MASKS = tuiCreateToken(TUI_COUNTRIES_DEFAULT_MASKS);\nfunction tuiCountriesMasksProvider(options) {\n return tuiProvideOptions(TUI_COUNTRIES_MASKS, options, TUI_COUNTRIES_DEFAULT_MASKS);\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_DEFAULT_MASKS, 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, tuiCountriesMasksProvider, 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}\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 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","/******************************************************************************\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};","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 * as i0 from '@angular/core';\nimport { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, NgModule } from '@angular/core';\nimport * as i3 from '@angular/forms';\nimport { NgControl, FormsModule } from '@angular/forms';\nimport * as i4 from '@taiga-ui/cdk';\nimport { AbstractTuiControl, tuiIsNativeFocused, tuiAsFocusableItemAccessor, TuiFocusableModule, TuiFocusedModule } from '@taiga-ui/cdk';\nimport { TUI_VALUE_ACCESSOR_PROVIDER } from '@taiga-ui/kit/providers';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i2 from '@taiga-ui/core';\nimport { TuiMaskAccessorModule } from '@taiga-ui/core';\nconst _c0 = [\"native\"];\nconst _c1 = [\"text\"];\nconst _c2 = [\"*\"];\nfunction TuiInputInlineComponent_span_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 5);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n }\n}\nlet TuiInputInlineComponent = /*#__PURE__*/(() => {\n class TuiInputInlineComponent extends AbstractTuiControl {\n constructor(control, cdr) {\n super(control, cdr);\n this.maxLength = null;\n this.indent = -1;\n }\n get nativeFocusableElement() {\n return !this.native ? null : this.native.nativeElement;\n }\n get focused() {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n get hasValue() {\n return this.value !== '';\n }\n onValueChange(value) {\n if (!this.text) {\n return;\n }\n // Sync update so width is calculated immediately\n this.text.nativeElement.textContent = value;\n this.text.nativeElement.style.textIndent = '';\n this.value = value;\n }\n onFocused(focused) {\n this.updateFocused(focused);\n }\n onScroll() {\n var _a;\n const indent = ((_a = this.native) === null || _a === void 0 ? void 0 : _a.nativeElement.scrollLeft) || 0;\n // -1 for Safari (see styles)\n this.indent = -1 - indent;\n }\n getFallbackValue() {\n return '';\n }\n }\n TuiInputInlineComponent.ɵfac = function TuiInputInlineComponent_Factory(t) {\n return new (t || TuiInputInlineComponent)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(ChangeDetectorRef));\n };\n TuiInputInlineComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiInputInlineComponent,\n selectors: [[\"tui-input-inline\"]],\n viewQuery: function TuiInputInlineComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n i0.ɵɵviewQuery(_c1, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.native = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.text = _t.first);\n }\n },\n inputs: {\n maxLength: \"maxLength\"\n },\n features: [i0.ɵɵProvidersFeature([TUI_VALUE_ACCESSOR_PROVIDER, tuiAsFocusableItemAccessor(TuiInputInlineComponent)]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c2,\n decls: 5,\n vars: 10,\n consts: [[\"text\", \"\"], [\"native\", \"\"], [1, \"t-before\", 3, \"textContent\"], [\"automation-id\", \"tui-input-inline__placeholder\", \"class\", \"t-placeholder\", 4, \"ngIf\"], [\"automation-id\", \"tui-input-inline__native\", \"tuiMaskAccessor\", \"\", \"type\", \"text\", 1, \"t-native\", 3, \"ngModelChange\", \"scroll\", \"tuiFocusedChange\", \"disabled\", \"id\", \"ngModel\", \"readOnly\", \"tuiFocusable\"], [\"automation-id\", \"tui-input-inline__placeholder\", 1, \"t-placeholder\"]],\n template: function TuiInputInlineComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef();\n i0.ɵɵelement(0, \"span\", 2, 0);\n i0.ɵɵtemplate(2, TuiInputInlineComponent_span_2_Template, 2, 0, \"span\", 3);\n i0.ɵɵelementStart(3, \"input\", 4, 1);\n i0.ɵɵlistener(\"ngModelChange\", function TuiInputInlineComponent_Template_input_ngModelChange_3_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onValueChange($event));\n })(\"scroll\", function TuiInputInlineComponent_Template_input_scroll_3_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onScroll());\n })(\"tuiFocusedChange\", function TuiInputInlineComponent_Template_input_tuiFocusedChange_3_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onFocused($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"text-indent\", ctx.indent, \"px\");\n i0.ɵɵproperty(\"textContent\", ctx.value);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !ctx.hasValue);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"disabled\", ctx.computedDisabled)(\"id\", ctx.id)(\"ngModel\", ctx.value)(\"readOnly\", ctx.readOnly)(\"tuiFocusable\", ctx.focusable);\n i0.ɵɵattribute(\"maxLength\", ctx.maxLength);\n }\n },\n dependencies: [i1.NgIf, i2.TuiMaskAccessorDirective, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i4.TuiFocusableDirective, i4.TuiFocusedDirective],\n styles: [\"[_nghost-%COMP%]{position:relative;display:inline-block;overflow:hidden;white-space:nowrap;box-sizing:border-box}.t-before[_ngcontent-%COMP%]{display:block;padding-right:.02em;margin-left:1px;white-space:pre}.t-placeholder[_ngcontent-%COMP%]{display:inline-block;min-width:1px}.t-native[_ngcontent-%COMP%]{position:absolute;top:0;left:0;background-color:transparent;padding:inherit;font:inherit;-webkit-text-fill-color:transparent;box-sizing:border-box;width:100%;height:100%;border-width:0;text-align:inherit;letter-spacing:inherit;text-indent:inherit;text-transform:inherit;outline:none}\"],\n changeDetection: 0\n });\n return TuiInputInlineComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiInputInlineModule = /*#__PURE__*/(() => {\n class TuiInputInlineModule {}\n TuiInputInlineModule.ɵfac = function TuiInputInlineModule_Factory(t) {\n return new (t || TuiInputInlineModule)();\n };\n TuiInputInlineModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiInputInlineModule\n });\n TuiInputInlineModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, FormsModule, TuiFocusableModule, TuiFocusedModule, TuiMaskAccessorModule]]\n });\n return TuiInputInlineModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiInputInlineComponent, TuiInputInlineModule };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule, Inject, HostListener } from '@angular/core';\nimport { tuiRgbToHex, tuiHexToRgb, TuiDestroyService, tuiRgbToHsv, tuiHsvToRgb, tuiRound, tuiPure, tuiDefaultSort, tuiParseColor, TuiActiveZoneModule } from '@taiga-ui/cdk';\nimport * as i1 from '@taiga-ui/kit';\nimport { TuiValueAccessorModule, TuiSelectModule, TuiInputNumberModule } from '@taiga-ui/kit';\nimport * as i2 from '@taiga-ui/core';\nimport { TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiDropdownModule, TuiDataListModule, TuiHintModule, TuiButtonModule, TuiHostedDropdownModule, TuiSvgModule, TuiGroupModule } from '@taiga-ui/core';\nimport * as i3 from '@angular/forms';\nimport { FormsModule } from '@angular/forms';\nimport * as i1$1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@maskito/angular';\nimport { MaskitoModule } from '@maskito/angular';\nimport { __decorate } from 'tslib';\nimport * as i3$1 from '@angular/platform-browser';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { TuiPickerService } from '@tinkoff/tui-editor/services';\nimport * as i1$2 from 'rxjs';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_COLOR_SELECTOR_MODE_NAMES } from '@tinkoff/tui-editor/tokens';\nimport { tuiParseGradient, tuiGetGradientData } from '@tinkoff/tui-editor/utils';\nfunction TuiColorEditComponent_tui_data_list_1_button_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"button\", 7);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r2 = ctx.$implicit;\n i0.ɵɵproperty(\"value\", item_r2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", item_r2, \" \");\n }\n}\nfunction TuiColorEditComponent_tui_data_list_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-data-list\", 5);\n i0.ɵɵtemplate(1, TuiColorEditComponent_tui_data_list_1_button_1_Template, 2, 2, \"button\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r2.modes);\n }\n}\nfunction TuiColorEditComponent_tui_primitive_textfield_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-primitive-textfield\", 8);\n i0.ɵɵlistener(\"valueChange\", function TuiColorEditComponent_tui_primitive_textfield_2_Template_tui_primitive_textfield_valueChange_0_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onHexChange($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"maskito\", ctx_r2.hexMask)(\"tuiTextfieldLabelOutside\", true)(\"value\", ctx_r2.hex);\n }\n}\nfunction TuiColorEditComponent_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-input-number\", 9);\n i0.ɵɵlistener(\"ngModelChange\", function TuiColorEditComponent_ng_template_3_Template_tui_input_number_ngModelChange_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onRgbChange($event, ctx_r2.color[1], ctx_r2.color[2], ctx_r2.color[3]));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(1, \"tui-input-number\", 9);\n i0.ɵɵlistener(\"ngModelChange\", function TuiColorEditComponent_ng_template_3_Template_tui_input_number_ngModelChange_1_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onRgbChange(ctx_r2.color[0], $event, ctx_r2.color[2], ctx_r2.color[3]));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"tui-input-number\", 9);\n i0.ɵɵlistener(\"ngModelChange\", function TuiColorEditComponent_ng_template_3_Template_tui_input_number_ngModelChange_2_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onRgbChange(ctx_r2.color[0], ctx_r2.color[1], $event, ctx_r2.color[3]));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"max\", 255)(\"min\", 0)(\"ngModel\", ctx_r2.color[0])(\"tuiTextfieldLabelOutside\", true);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"max\", 255)(\"min\", 0)(\"ngModel\", ctx_r2.color[1])(\"tuiTextfieldLabelOutside\", true);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"max\", 255)(\"min\", 0)(\"ngModel\", ctx_r2.color[2])(\"tuiTextfieldLabelOutside\", true);\n }\n}\nfunction TuiLinearMultiPickerComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 1);\n i0.ɵɵlistener(\"dblclick\", function TuiLinearMultiPickerComponent_div_0_Template_div_dblclick_0_listener() {\n const index_r2 = i0.ɵɵrestoreView(_r1).index;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onClick(index_r2));\n })(\"mousedown\", function TuiLinearMultiPickerComponent_div_0_Template_div_mousedown_0_listener() {\n const index_r2 = i0.ɵɵrestoreView(_r1).index;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onMouseDown(index_r2));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r4 = ctx.$implicit;\n i0.ɵɵstyleProp(\"left\", item_r4 * 100, \"%\");\n }\n}\nconst _c0 = \"[_nghost-%COMP%]{position:relative;display:block;height:1rem;box-sizing:border-box}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\";\nfunction TuiPaletteComponent_button_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 1);\n i0.ɵɵlistener(\"click\", function TuiPaletteComponent_button_0_Template_button_click_0_listener() {\n const color_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.selectedColor.emit(color_r2.value));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const color_r2 = ctx.$implicit;\n i0.ɵɵstyleProp(\"background\", color_r2.value);\n i0.ɵɵproperty(\"id\", color_r2.key)(\"tuiHint\", color_r2.key)(\"tuiHintDescribe\", color_r2.key);\n }\n}\nfunction TuiColorSelectorComponent_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 9);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n const dropdown_r3 = i0.ɵɵreference(1);\n i0.ɵɵclassProp(\"t-arrow_rotated\", dropdown_r3.open);\n i0.ɵɵproperty(\"src\", ctx_r1.options.icons.colorSelectorDropdownChevron);\n }\n}\nfunction TuiColorSelectorComponent_ng_template_6_button_1_tui_svg_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 14);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"src\", ctx_r1.options.icons.colorSelectorDropdownCheck);\n }\n}\nfunction TuiColorSelectorComponent_ng_template_6_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 12);\n i0.ɵɵlistener(\"click\", function TuiColorSelectorComponent_ng_template_6_button_1_Template_button_click_0_listener() {\n const mode_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n const dropdown_r3 = i0.ɵɵreference(1);\n return i0.ɵɵresetView(ctx_r1.onModeSelect(mode_r5, dropdown_r3));\n })(\"keydown.enter.prevent\", function TuiColorSelectorComponent_ng_template_6_button_1_Template_button_keydown_enter_prevent_0_listener() {\n const mode_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n const dropdown_r3 = i0.ɵɵreference(1);\n return i0.ɵɵresetView(ctx_r1.onModeSelect(mode_r5, dropdown_r3));\n })(\"keydown.space.prevent\", function TuiColorSelectorComponent_ng_template_6_button_1_Template_button_keydown_space_prevent_0_listener() {\n const mode_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n const dropdown_r3 = i0.ɵɵreference(1);\n return i0.ɵɵresetView(ctx_r1.onModeSelect(mode_r5, dropdown_r3));\n });\n i0.ɵɵtext(1);\n i0.ɵɵtemplate(2, TuiColorSelectorComponent_ng_template_6_button_1_tui_svg_2_Template, 1, 1, \"tui-svg\", 13);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const mode_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵattribute(\"aria-checked\", ctx_r1.isModeActive(mode_r5));\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", mode_r5, \" \");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isModeActive(mode_r5));\n }\n}\nfunction TuiColorSelectorComponent_ng_template_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-data-list\", 10);\n i0.ɵɵtemplate(1, TuiColorSelectorComponent_ng_template_6_button_1_Template, 3, 3, \"button\", 11);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.modes);\n }\n}\nfunction TuiColorSelectorComponent_ng_container_8_button_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 20);\n i0.ɵɵlistener(\"click\", function TuiColorSelectorComponent_ng_container_8_button_5_Template_button_click_0_listener() {\n const button_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDirectionChange(button_r8));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const button_r8 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵclassProp(\"t-direction_active\", ctx_r1.isDirectionActive(button_r8));\n i0.ɵɵproperty(\"icon\", ctx_r1.getIcon(button_r8))(\"tuiHint\", button_r8);\n }\n}\nfunction TuiColorSelectorComponent_ng_container_8_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelement(1, \"hr\", 15);\n i0.ɵɵelementStart(2, \"div\", 16)(3, \"tui-linear-multi-picker\", 17);\n i0.ɵɵlistener(\"indexChange\", function TuiColorSelectorComponent_ng_container_8_Template_tui_linear_multi_picker_indexChange_3_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onIndexChange($event));\n })(\"valueChange\", function TuiColorSelectorComponent_ng_container_8_Template_tui_linear_multi_picker_valueChange_3_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onStopsChange($event));\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(4, \"div\", 18);\n i0.ɵɵtemplate(5, TuiColorSelectorComponent_ng_container_8_button_5_Template, 1, 4, \"button\", 19);\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵstyleProp(\"background\", ctx_r1.gradient);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"value\", ctx_r1.stopsKeys);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.buttons);\n }\n}\nfunction TuiColorSelectorComponent_tui_color_edit_10_Template(rf, ctx) {\n if (rf & 1) {\n const _r9 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-color-edit\", 21);\n i0.ɵɵlistener(\"colorChange\", function TuiColorSelectorComponent_tui_color_edit_10_Template_tui_color_edit_colorChange_0_listener($event) {\n i0.ɵɵrestoreView(_r9);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onColorChange($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"color\", ctx_r1.color);\n }\n}\nfunction TuiColorSelectorComponent_tui_palette_11_Template(rf, ctx) {\n if (rf & 1) {\n const _r10 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-palette\", 22);\n i0.ɵɵlistener(\"selectedColor\", function TuiColorSelectorComponent_tui_palette_11_Template_tui_palette_selectedColor_0_listener($event) {\n i0.ɵɵrestoreView(_r10);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onPalettePick($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"colors\", ctx_r1.palette);\n }\n}\nconst HEX_MODE_LENGTH = 6;\nlet TuiColorEditComponent = /*#__PURE__*/(() => {\n class TuiColorEditComponent {\n constructor() {\n this.color = [0, 0, 0, 1];\n this.colorChange = new EventEmitter();\n this.hexMask = {\n mask: new RegExp(`^[A-F\\\\d]{0,${HEX_MODE_LENGTH}}$`, 'gi')\n };\n this.modes = ['HEX', 'RGB'];\n this.mode = this.modes[0];\n }\n get isHex() {\n return this.mode === this.modes[0];\n }\n get hex() {\n return tuiRgbToHex(this.color[0], this.color[1], this.color[2]).replace('#', '');\n }\n get opacity() {\n return Math.round(this.color[3] * 100);\n }\n onHexChange(hex) {\n if (hex.length !== HEX_MODE_LENGTH) {\n return;\n }\n const rgb = tuiHexToRgb(hex);\n this.updateColor([rgb[0], rgb[1], rgb[2], this.color[3]]);\n }\n onRgbChange(...rgba) {\n this.updateColor(rgba);\n }\n updateColor(color) {\n this.color = color;\n this.colorChange.emit(color);\n }\n }\n TuiColorEditComponent.ɵfac = function TuiColorEditComponent_Factory(t) {\n return new (t || TuiColorEditComponent)();\n };\n TuiColorEditComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiColorEditComponent,\n selectors: [[\"tui-color-edit\"]],\n inputs: {\n color: \"color\"\n },\n outputs: {\n colorChange: \"colorChange\"\n },\n decls: 6,\n vars: 8,\n consts: [[\"rgb\", \"\"], [\"tuiDropdownAlign\", \"left\", \"tuiDropdownLimitWidth\", \"min\", \"tuiTextfieldSize\", \"m\", 1, \"t-select\", \"tui-group__auto-width-item\", 3, \"ngModelChange\", \"tuiTextfieldLabelOutside\", \"ngModel\"], [\"size\", \"s\", 4, \"tuiDataList\"], [\"tuiTextfieldSize\", \"m\", \"tuiValueAccessor\", \"\", 3, \"maskito\", \"tuiTextfieldLabelOutside\", \"value\", \"valueChange\", 4, \"ngIf\", \"ngIfElse\"], [\"decimal\", \"never\", \"tuiTextfieldPostfix\", \"%\", \"tuiTextfieldSize\", \"m\", 1, \"t-opacity\", \"tui-group__auto-width-item\", 3, \"ngModelChange\", \"max\", \"min\", \"ngModel\", \"tuiTextfieldLabelOutside\"], [\"size\", \"s\"], [\"tuiOption\", \"\", 3, \"value\", 4, \"ngFor\", \"ngForOf\"], [\"tuiOption\", \"\", 3, \"value\"], [\"tuiTextfieldSize\", \"m\", \"tuiValueAccessor\", \"\", 3, \"valueChange\", \"maskito\", \"tuiTextfieldLabelOutside\", \"value\"], [\"decimal\", \"never\", \"tuiTextfieldSize\", \"m\", 1, \"t-rgb\", 3, \"ngModelChange\", \"max\", \"min\", \"ngModel\", \"tuiTextfieldLabelOutside\"]],\n template: function TuiColorEditComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-select\", 1);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function TuiColorEditComponent_Template_tui_select_ngModelChange_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n i0.ɵɵtwoWayBindingSet(ctx.mode, $event) || (ctx.mode = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵtemplate(1, TuiColorEditComponent_tui_data_list_1_Template, 2, 1, \"tui-data-list\", 2);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, TuiColorEditComponent_tui_primitive_textfield_2_Template, 1, 3, \"tui-primitive-textfield\", 3)(3, TuiColorEditComponent_ng_template_3_Template, 3, 12, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementStart(5, \"tui-input-number\", 4);\n i0.ɵɵlistener(\"ngModelChange\", function TuiColorEditComponent_Template_tui_input_number_ngModelChange_5_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onRgbChange(ctx.color[0], ctx.color[1], ctx.color[2], $event / 100));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const rgb_r6 = i0.ɵɵreference(4);\n i0.ɵɵproperty(\"tuiTextfieldLabelOutside\", true);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx.mode);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.isHex)(\"ngIfElse\", rgb_r6);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"max\", 100)(\"min\", 0)(\"ngModel\", ctx.opacity)(\"tuiTextfieldLabelOutside\", true);\n }\n },\n dependencies: [i1.TuiSelectComponent, i2.TuiDataListComponent, i2.TuiOptionComponent, i2.TuiPrimitiveTextfieldComponent, i1.TuiInputNumberComponent, i1.TuiSelectDirective, i2.TuiDropdownOptionsDirective, i2.TuiTextfieldSizeDirective, i2.TuiTextfieldLabelOutsideDirective, i3.NgControlStatus, i3.NgModel, i2.TuiDataListDirective, i1$1.NgForOf, i1$1.NgIf, i2.TuiPrimitiveTextfieldDirective, i1.TuiValueAccessorDirective, i5.MaskitoDirective, i1.TuiInputNumberDirective, i2.TuiTextfieldPostfixDirective],\n styles: [\"[_nghost-%COMP%]{display:flex}.t-select[_ngcontent-%COMP%]{width:5.875rem}.t-opacity[_ngcontent-%COMP%]{width:4.275rem}.t-rgb[_ngcontent-%COMP%], .t-opacity[_ngcontent-%COMP%]{text-align:center}\"],\n changeDetection: 0\n });\n return TuiColorEditComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiColorEditModule = /*#__PURE__*/(() => {\n class TuiColorEditModule {}\n TuiColorEditModule.ɵfac = function TuiColorEditModule_Factory(t) {\n return new (t || TuiColorEditModule)();\n };\n TuiColorEditModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiColorEditModule\n });\n TuiColorEditModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, FormsModule, MaskitoModule, TuiValueAccessorModule, TuiSelectModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiDropdownModule, TuiDataListModule, TuiInputNumberModule]]\n });\n return TuiColorEditModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFlatPickerComponent = /*#__PURE__*/(() => {\n class TuiFlatPickerComponent {\n constructor(point$) {\n this.value = [0, 0];\n this.valueChange = new EventEmitter();\n point$.subscribe(point => {\n this.value = point;\n this.valueChange.emit([point[0], point[1]]);\n });\n }\n get left() {\n return this.value[0] * 100;\n }\n get top() {\n return this.value[1] * 100;\n }\n }\n TuiFlatPickerComponent.ɵfac = function TuiFlatPickerComponent_Factory(t) {\n return new (t || TuiFlatPickerComponent)(i0.ɵɵdirectiveInject(TuiPickerService));\n };\n TuiFlatPickerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiFlatPickerComponent,\n selectors: [[\"tui-flat-picker\"]],\n inputs: {\n value: \"value\"\n },\n outputs: {\n valueChange: \"valueChange\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPickerService])],\n decls: 1,\n vars: 4,\n consts: [[1, \"t-circle\"]],\n template: function TuiFlatPickerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"left\", ctx.left, \"%\")(\"top\", ctx.top, \"%\");\n }\n },\n styles: [\"[_nghost-%COMP%]{position:relative;display:block}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:-.5rem 0 0 -.5rem;box-shadow:inset 0 0 0 1px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\"],\n changeDetection: 0\n });\n return TuiFlatPickerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLinearPickerComponent = /*#__PURE__*/(() => {\n class TuiLinearPickerComponent {\n constructor(point$) {\n this.value = 0;\n this.valueChange = new EventEmitter();\n point$.subscribe(([x]) => {\n this.value = x;\n this.valueChange.emit(x);\n });\n }\n get left() {\n return this.value * 100;\n }\n }\n TuiLinearPickerComponent.ɵfac = function TuiLinearPickerComponent_Factory(t) {\n return new (t || TuiLinearPickerComponent)(i0.ɵɵdirectiveInject(TuiPickerService));\n };\n TuiLinearPickerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiLinearPickerComponent,\n selectors: [[\"tui-linear-picker\"]],\n inputs: {\n value: \"value\"\n },\n outputs: {\n valueChange: \"valueChange\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPickerService])],\n decls: 1,\n vars: 2,\n consts: [[1, \"t-circle\"]],\n template: function TuiLinearPickerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"left\", ctx.left, \"%\");\n }\n },\n styles: [\"[_nghost-%COMP%]{position:relative;display:block;height:1rem;box-sizing:border-box}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\"],\n changeDetection: 0\n });\n return TuiLinearPickerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiColorPickerComponent = /*#__PURE__*/(() => {\n class TuiColorPickerComponent {\n constructor(sanitizer) {\n this.sanitizer = sanitizer;\n this.colorChange = new EventEmitter();\n this.point = [0, 1];\n this.hue = 0;\n this.opacity = 1;\n }\n set color(color) {\n if (this.currentColor.every((item, index) => item === color[index]) && color[3] === this.opacity) {\n return;\n }\n const [h, s, v] = tuiRgbToHsv(color[0], color[1], color[2]);\n this.opacity = color[3];\n this.hue = h / 360;\n this.point = [s, 1 - v / 255];\n }\n get currentColor() {\n return this.getCurrentColor(this.hue, this.point);\n }\n get base() {\n return `rgb(${tuiHsvToRgb(this.hue * 360, 1, 255)})`;\n }\n get gradient() {\n return this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to right, rgba(${this.currentColor.join(',')}, 0), rgb(${this.currentColor.join(',')}))`);\n }\n onPointChange(point) {\n this.point = point;\n this.updateColor();\n }\n onHueChange(hue) {\n this.hue = hue;\n this.updateColor();\n }\n onOpacityChange(opacity) {\n this.opacity = tuiRound(opacity, 2);\n this.updateColor();\n }\n getCurrentColor(hue, point) {\n return tuiHsvToRgb(hue * 360, point[0], (1 - point[1]) * 255);\n }\n updateColor() {\n this.colorChange.emit([...this.currentColor, this.opacity]);\n }\n }\n TuiColorPickerComponent.ɵfac = function TuiColorPickerComponent_Factory(t) {\n return new (t || TuiColorPickerComponent)(i0.ɵɵdirectiveInject(DomSanitizer));\n };\n TuiColorPickerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiColorPickerComponent,\n selectors: [[\"tui-color-picker\"]],\n inputs: {\n color: \"color\"\n },\n outputs: {\n colorChange: \"colorChange\"\n },\n decls: 5,\n vars: 7,\n consts: [[1, \"t-flat\", 3, \"valueChange\", \"value\"], [1, \"t-wrapper\", \"t-wrapper_hue\"], [1, \"t-hue\", 3, \"valueChange\", \"value\"], [1, \"t-wrapper\", \"t-wrapper_opacity\"], [1, \"t-opacity\", 3, \"valueChange\", \"value\"]],\n template: function TuiColorPickerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-flat-picker\", 0);\n i0.ɵɵlistener(\"valueChange\", function TuiColorPickerComponent_Template_tui_flat_picker_valueChange_0_listener($event) {\n return ctx.onPointChange($event);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(1, \"div\", 1)(2, \"tui-linear-picker\", 2);\n i0.ɵɵlistener(\"valueChange\", function TuiColorPickerComponent_Template_tui_linear_picker_valueChange_2_listener($event) {\n return ctx.onHueChange($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(3, \"div\", 3)(4, \"tui-linear-picker\", 4);\n i0.ɵɵlistener(\"valueChange\", function TuiColorPickerComponent_Template_tui_linear_picker_valueChange_4_listener($event) {\n return ctx.onOpacityChange($event);\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"background-color\", ctx.base);\n i0.ɵɵproperty(\"value\", ctx.point);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"value\", ctx.hue);\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"background\", ctx.gradient);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"value\", ctx.opacity);\n }\n },\n dependencies: [TuiFlatPickerComponent, TuiLinearPickerComponent],\n styles: [\"[_nghost-%COMP%]{position:relative;z-index:0;display:block}.t-flat[_ngcontent-%COMP%]{height:14rem;background:linear-gradient(rgba(0,0,0,0),#000000),linear-gradient(to right,#ffffff,rgba(255,255,255,0));margin-bottom:.25rem;overflow:hidden}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:1rem 1.25rem;border-radius:.5rem}.t-wrapper[_ngcontent-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%;content:\\\"\\\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper_hue[_ngcontent-%COMP%]{background:#ff0000}.t-wrapper_opacity[_ngcontent-%COMP%]:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\\\"\\\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hue[_ngcontent-%COMP%]{background:linear-gradient(to right,#ff0000,#ffff00,#00ff00,#00ffff,#0000ff,#ff00ff,#ff0000);border-radius:inherit;margin:0 .5rem}.t-opacity[_ngcontent-%COMP%]{border-radius:inherit;margin:0 .5rem}\"],\n changeDetection: 0\n });\n __decorate([tuiPure], TuiColorPickerComponent.prototype, \"getCurrentColor\", null);\n return TuiColorPickerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFlatPickerModule = /*#__PURE__*/(() => {\n class TuiFlatPickerModule {}\n TuiFlatPickerModule.ɵfac = function TuiFlatPickerModule_Factory(t) {\n return new (t || TuiFlatPickerModule)();\n };\n TuiFlatPickerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFlatPickerModule\n });\n TuiFlatPickerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n });\n return TuiFlatPickerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLinearPickerModule = /*#__PURE__*/(() => {\n class TuiLinearPickerModule {}\n TuiLinearPickerModule.ɵfac = function TuiLinearPickerModule_Factory(t) {\n return new (t || TuiLinearPickerModule)();\n };\n TuiLinearPickerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiLinearPickerModule\n });\n TuiLinearPickerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n });\n return TuiLinearPickerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiColorPickerModule = /*#__PURE__*/(() => {\n class TuiColorPickerModule {}\n TuiColorPickerModule.ɵfac = function TuiColorPickerModule_Factory(t) {\n return new (t || TuiColorPickerModule)();\n };\n TuiColorPickerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiColorPickerModule\n });\n TuiColorPickerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiFlatPickerModule, TuiLinearPickerModule]]\n });\n return TuiColorPickerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLinearMultiPickerComponent = /*#__PURE__*/(() => {\n class TuiLinearMultiPickerComponent {\n constructor(point$) {\n this.value = [0, 1];\n this.valueChange = new EventEmitter();\n this.indexChange = new EventEmitter();\n this.index = NaN;\n point$.subscribe(([x]) => {\n this.onPicker(x);\n });\n }\n onMouseUp() {\n this.index = NaN;\n }\n onMouseDown(index) {\n this.updateIndex(index);\n }\n onClick(index) {\n if (this.value.length > 2) {\n this.updateValue(this.value.filter((_, i) => i !== index));\n }\n }\n onPicker(x) {\n if (Number.isNaN(this.index)) {\n this.updateIndex(this.value.length);\n this.value = [...this.value, 0];\n }\n if (this.value.some((item, index) => item === x && index !== this.index)) {\n return;\n }\n this.updateValue(this.value.map((item, index) => index === this.index ? x : item));\n }\n updateIndex(index) {\n this.index = index;\n this.indexChange.emit(index);\n }\n updateValue(value) {\n this.value = value;\n this.valueChange.emit(value);\n }\n }\n TuiLinearMultiPickerComponent.ɵfac = function TuiLinearMultiPickerComponent_Factory(t) {\n return new (t || TuiLinearMultiPickerComponent)(i0.ɵɵdirectiveInject(TuiPickerService));\n };\n TuiLinearMultiPickerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiLinearMultiPickerComponent,\n selectors: [[\"tui-linear-multi-picker\"]],\n hostBindings: function TuiLinearMultiPickerComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mouseup\", function TuiLinearMultiPickerComponent_mouseup_HostBindingHandler() {\n return ctx.onMouseUp();\n }, false, i0.ɵɵresolveDocument);\n }\n },\n inputs: {\n value: \"value\"\n },\n outputs: {\n valueChange: \"valueChange\",\n indexChange: \"indexChange\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPickerService])],\n decls: 1,\n vars: 1,\n consts: [[\"class\", \"t-circle\", 3, \"left\", \"dblclick\", \"mousedown\", 4, \"ngFor\", \"ngForOf\"], [1, \"t-circle\", 3, \"dblclick\", \"mousedown\"]],\n template: function TuiLinearMultiPickerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiLinearMultiPickerComponent_div_0_Template, 1, 2, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngForOf\", ctx.value);\n }\n },\n dependencies: [i1$1.NgForOf],\n styles: [_c0],\n changeDetection: 0\n });\n return TuiLinearMultiPickerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPaletteComponent = /*#__PURE__*/(() => {\n class TuiPaletteComponent {\n constructor() {\n this.colors = new Map();\n this.selectedColor = new EventEmitter();\n this.originalOrder = (_a, _b) => 0;\n }\n }\n TuiPaletteComponent.ɵfac = function TuiPaletteComponent_Factory(t) {\n return new (t || TuiPaletteComponent)();\n };\n TuiPaletteComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPaletteComponent,\n selectors: [[\"tui-palette\"]],\n inputs: {\n colors: \"colors\"\n },\n outputs: {\n selectedColor: \"selectedColor\"\n },\n decls: 2,\n vars: 4,\n consts: [[\"type\", \"button\", \"class\", \"t-button\", 3, \"id\", \"background\", \"tuiHint\", \"tuiHintDescribe\", \"click\", 4, \"ngFor\", \"ngForOf\"], [\"type\", \"button\", 1, \"t-button\", 3, \"click\", \"id\", \"tuiHint\", \"tuiHintDescribe\"]],\n template: function TuiPaletteComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiPaletteComponent_button_0_Template, 1, 5, \"button\", 0);\n i0.ɵɵpipe(1, \"keyvalue\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind2(1, 1, ctx.colors, ctx.originalOrder));\n }\n },\n dependencies: [i1$1.NgForOf, i2.TuiHintDirective, i2.TuiHintDriverDirective, i2.TuiHintHoverDirective, i2.TuiHintPositionDirective, i2.TuiHintDescribeDirective, i1$1.KeyValuePipe],\n styles: [\"[_nghost-%COMP%]{display:flex;flex-wrap:wrap;padding:.875rem}.t-button[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;width:1.5625rem;height:1.5625rem;box-sizing:border-box;margin:.375rem;border-radius:var(--tui-radius-m);border:1px solid rgba(0,0,0,.08)}\"],\n changeDetection: 0\n });\n return TuiPaletteComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst EMPTY_STOP = [0, 0, 0, 0];\nconst DEFAULT_STEPS = [[0, [0, 0, 0, 1]], [1, [255, 255, 255, 1]]];\nconst ICONS = {\n 'to top right': 'tuiIconArrowUpRight',\n 'to right': 'tuiIconArrowRight',\n 'to bottom right': 'tuiIconArrowDownRight',\n 'to bottom': 'tuiIconArrowDown',\n 'to bottom left': 'tuiIconArrowDownLeft',\n 'to left': 'tuiIconArrowLeft',\n 'to top left': 'tuiIconArrowUpLeft',\n 'to top': 'tuiIconArrowUp'\n};\nlet TuiColorSelectorComponent = /*#__PURE__*/(() => {\n class TuiColorSelectorComponent {\n constructor(options, sanitizer, modes) {\n this.options = options;\n this.sanitizer = sanitizer;\n this.modes = modes;\n this.stops = new Map(DEFAULT_STEPS);\n this.currentStop = 0;\n this.direction = 'to bottom';\n this.colors = new Map();\n this.colorChange = new EventEmitter();\n this.color = [0, 0, 0, 1];\n this.currentMode = this.modes[0];\n this.buttons = ['to top right', 'to right', 'to bottom right', 'to bottom', 'to bottom left', 'to left', 'to top left', 'to top'];\n }\n set colorSetter(color) {\n this.parse(color);\n }\n get palette() {\n return this.filterPalette(this.colors, this.isGradient);\n }\n get stopsKeys() {\n return this.getStopsKeys(this.stops);\n }\n get currentColor() {\n return this.isGradient ? this.getStop(this.currentStop) : this.color;\n }\n get gradient() {\n return this.sanitizer.bypassSecurityTrustStyle(this.getGradient('to right'));\n }\n get isGradient() {\n return this.currentMode === this.modes[1];\n }\n getIcon(direction) {\n return ICONS[direction];\n }\n isModeActive(mode) {\n return this.currentMode === mode;\n }\n isDirectionActive(direction) {\n return this.direction === direction;\n }\n onPalettePick(color) {\n this.updateColor(color);\n }\n onDirectionChange(direction) {\n this.direction = direction;\n this.updateColor(this.getGradient(direction));\n }\n onModeSelect(mode, dropdown) {\n this.currentMode = mode;\n dropdown.open = false;\n this.updateColor(mode === this.modes[0] ? `rgba(${this.color.join(', ')})` : this.getGradient(this.direction));\n }\n onIndexChange(index) {\n this.currentStop = this.stopsKeys[index];\n }\n onColorChange(color) {\n if (!this.isGradient) {\n this.updateColor(`rgba(${color.join(', ')})`);\n return;\n }\n this.stops.set(this.currentStop, color);\n this.updateColor(this.getGradient(this.direction));\n }\n onStopsChange(stopsKeys) {\n const removed = this.stopsKeys.find(item => !stopsKeys.includes(item));\n const added = stopsKeys.find(item => !this.stopsKeys.includes(item));\n if (removed === undefined && added !== undefined) {\n this.addStop(added);\n }\n if (removed !== undefined && added === undefined) {\n this.removeStop(removed);\n }\n if (removed !== undefined && added !== undefined) {\n this.replaceStop(removed, added);\n }\n this.updateColor(this.getGradient(this.direction));\n }\n getStopsKeys(stops) {\n return Array.from(stops.keys());\n }\n filterPalette(colors, isGradient) {\n const map = new Map(colors);\n map.forEach((value, key) => {\n if (value.startsWith('linear-gradient') && !isGradient || !value.startsWith('linear-gradient') && isGradient) {\n map.delete(key);\n }\n });\n return map;\n }\n updateColor(color) {\n this.colorChange.emit(color);\n }\n getGradient(direction) {\n return `linear-gradient(${direction}, ${[...this.stopsKeys].sort(tuiDefaultSort).map(key => `rgba(${this.getStop(key).join(', ')}) ${key * 100}%`).join(', ')})`;\n }\n getStop(stop) {\n return this.stops.get(stop) || EMPTY_STOP;\n }\n addStop(stop) {\n const closest = this.stopsKeys.reduce((prev, curr) => Math.abs(curr - stop) < Math.abs(prev - stop) ? curr : prev, this.stopsKeys[0]);\n this.stops.set(stop, this.getStop(closest));\n this.stops = new Map(this.stops);\n this.currentStop = stop;\n }\n removeStop(stop) {\n this.stops.delete(stop);\n this.stops = new Map(this.stops);\n this.currentStop = this.stopsKeys[0];\n }\n replaceStop(removed, added) {\n const value = this.getStop(removed);\n this.currentStop = added;\n this.stops = new Map(this.stopsKeys.map(key => key === removed ? [added, value] : [key, this.getStop(key)]));\n }\n parse(color) {\n if (color.startsWith('linear-gradient')) {\n this.parseGradient(color);\n } else {\n this.parseColor(color);\n }\n }\n parseGradient(color) {\n if (color === this.getGradient(this.direction)) {\n return;\n }\n const gradient = tuiParseGradient(tuiGetGradientData(color));\n this.currentMode = this.modes[1];\n this.direction = gradient.side;\n this.currentStop = 0;\n this.stops = new Map(gradient.stops.length ? gradient.stops.map(({\n color,\n position\n }) => [parseFloat(position) / 100, tuiParseColor(color)]) : DEFAULT_STEPS);\n }\n parseColor(color) {\n this.currentMode = this.modes[0];\n this.currentStop = 0;\n this.color = tuiParseColor(color);\n }\n }\n TuiColorSelectorComponent.ɵfac = function TuiColorSelectorComponent_Factory(t) {\n return new (t || TuiColorSelectorComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(DomSanitizer), i0.ɵɵdirectiveInject(TUI_EDITOR_COLOR_SELECTOR_MODE_NAMES));\n };\n TuiColorSelectorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiColorSelectorComponent,\n selectors: [[\"tui-color-selector\"]],\n inputs: {\n colors: \"colors\",\n colorSetter: [0, \"color\", \"colorSetter\"]\n },\n outputs: {\n colorChange: \"colorChange\"\n },\n decls: 12,\n vars: 7,\n consts: [[\"dropdown\", \"\"], [\"arrow\", \"\"], [\"menu\", \"\"], [1, \"t-select\", 3, \"content\"], [\"appearance\", \"\", \"size\", \"s\", \"tuiButton\", \"\", \"type\", \"button\", 3, \"iconRight\"], [4, \"ngIf\"], [3, \"colorChange\", \"color\"], [\"tuiGroup\", \"\", \"class\", \"t-edit\", 3, \"color\", \"colorChange\", 4, \"ngIf\"], [\"class\", \"t-palette\", 3, \"colors\", \"selectedColor\", 4, \"ngIf\"], [1, \"t-arrow\", 3, \"src\"], [\"role\", \"menu\", \"size\", \"s\", 1, \"t-menu\"], [\"role\", \"menuitemradio\", \"tuiOption\", \"\", 3, \"click\", \"keydown.enter.prevent\", \"keydown.space.prevent\", 4, \"ngFor\", \"ngForOf\"], [\"role\", \"menuitemradio\", \"tuiOption\", \"\", 3, \"click\", \"keydown.enter.prevent\", \"keydown.space.prevent\"], [\"class\", \"t-checkmark\", 3, \"src\", 4, \"ngIf\"], [1, \"t-checkmark\", 3, \"src\"], [1, \"t-hr\"], [1, \"t-wrapper\"], [1, \"t-gradient\", 3, \"indexChange\", \"valueChange\", \"value\"], [1, \"t-buttons\"], [\"appearance\", \"\", \"size\", \"xs\", \"tuiHintDescribe\", \"\", \"tuiIconButton\", \"\", \"type\", \"button\", \"class\", \"t-direction\", 3, \"t-direction_active\", \"icon\", \"tuiHint\", \"click\", 4, \"ngFor\", \"ngForOf\"], [\"appearance\", \"\", \"size\", \"xs\", \"tuiHintDescribe\", \"\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-direction\", 3, \"click\", \"icon\", \"tuiHint\"], [\"tuiGroup\", \"\", 1, \"t-edit\", 3, \"colorChange\", \"color\"], [1, \"t-palette\", 3, \"selectedColor\", \"colors\"]],\n template: function TuiColorSelectorComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 3, 0)(2, \"button\", 4);\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(4, TuiColorSelectorComponent_ng_template_4_Template, 1, 3, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor)(6, TuiColorSelectorComponent_ng_template_6_Template, 2, 1, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(8, TuiColorSelectorComponent_ng_container_8_Template, 6, 4, \"ng-container\", 5);\n i0.ɵɵelementStart(9, \"tui-color-picker\", 6);\n i0.ɵɵlistener(\"colorChange\", function TuiColorSelectorComponent_Template_tui_color_picker_colorChange_9_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onColorChange($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(10, TuiColorSelectorComponent_tui_color_edit_10_Template, 1, 1, \"tui-color-edit\", 7)(11, TuiColorSelectorComponent_tui_palette_11_Template, 1, 1, \"tui-palette\", 8);\n }\n if (rf & 2) {\n const arrow_r11 = i0.ɵɵreference(5);\n const menu_r12 = i0.ɵɵreference(7);\n i0.ɵɵproperty(\"content\", menu_r12);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"iconRight\", arrow_r11);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx.currentMode, \" \");\n i0.ɵɵadvance(5);\n i0.ɵɵproperty(\"ngIf\", ctx.isGradient);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"color\", ctx.currentColor);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.isGradient);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.palette.size);\n }\n },\n dependencies: [i2.TuiHostedDropdownComponent, i2.TuiButtonComponent, i2.TuiSvgComponent, i2.TuiDataListComponent, i2.TuiOptionComponent, TuiLinearMultiPickerComponent, TuiColorPickerComponent, TuiColorEditComponent, TuiPaletteComponent, i1$1.NgForOf, i1$1.NgIf, i2.TuiHintDescribeDirective, i2.TuiHintDirective, i2.TuiHintDriverDirective, i2.TuiHintHoverDirective, i2.TuiHintPositionDirective, i2.TuiGroupDirective],\n styles: [\"[_nghost-%COMP%]{position:relative;z-index:0;display:block;width:22.6rem}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:1.25rem;border-radius:.5rem}.t-wrapper[_ngcontent-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%;content:\\\"\\\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper[_ngcontent-%COMP%]:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\\\"\\\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hr[_ngcontent-%COMP%]{height:1px;margin:0 0 0 -1px;border:none;background:var(--tui-base-03)}.t-gradient[_ngcontent-%COMP%]{margin:0 .5rem;border-radius:inherit}.t-select[_ngcontent-%COMP%]{margin:.75rem .5rem}.t-arrow[_ngcontent-%COMP%]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-arrow_rotated[_ngcontent-%COMP%]{transform:rotate(180deg)}.t-menu[_ngcontent-%COMP%]{width:11.25rem}.t-checkmark[_ngcontent-%COMP%]{margin-left:auto;width:1rem;height:1rem}.t-buttons[_ngcontent-%COMP%]{display:flex;padding:0 .75rem 1.25rem}.t-direction[_ngcontent-%COMP%]{color:var(--tui-text-02);margin:0 .375rem}.t-direction[_ngcontent-%COMP%]:hover, .t-direction_active[_ngcontent-%COMP%]{color:var(--tui-text-01);background:var(--tui-secondary-hover)}.t-edit[_ngcontent-%COMP%]{margin:1.25rem}.t-palette[_ngcontent-%COMP%]{box-sizing:border-box;box-shadow:inset 0 1px var(--tui-base-03)}\"],\n changeDetection: 0\n });\n __decorate([tuiPure], TuiColorSelectorComponent.prototype, \"getStopsKeys\", null);\n __decorate([tuiPure], TuiColorSelectorComponent.prototype, \"filterPalette\", null);\n return TuiColorSelectorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLinearMultiPickerModule = /*#__PURE__*/(() => {\n class TuiLinearMultiPickerModule {}\n TuiLinearMultiPickerModule.ɵfac = function TuiLinearMultiPickerModule_Factory(t) {\n return new (t || TuiLinearMultiPickerModule)();\n };\n TuiLinearMultiPickerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiLinearMultiPickerModule\n });\n TuiLinearMultiPickerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n });\n return TuiLinearMultiPickerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPaletteModule = /*#__PURE__*/(() => {\n class TuiPaletteModule {}\n TuiPaletteModule.ɵfac = function TuiPaletteModule_Factory(t) {\n return new (t || TuiPaletteModule)();\n };\n TuiPaletteModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPaletteModule\n });\n TuiPaletteModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHintModule]]\n });\n return TuiPaletteModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiColorSelectorModule = /*#__PURE__*/(() => {\n class TuiColorSelectorModule {}\n TuiColorSelectorModule.ɵfac = function TuiColorSelectorModule_Factory(t) {\n return new (t || TuiColorSelectorModule)();\n };\n TuiColorSelectorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiColorSelectorModule\n });\n TuiColorSelectorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule, TuiHostedDropdownModule, TuiColorPickerModule, TuiLinearMultiPickerModule, TuiHintModule, TuiSvgModule, TuiDataListModule, TuiActiveZoneModule, TuiColorEditModule, TuiGroupModule, TuiPaletteModule]]\n });\n return TuiColorSelectorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiColorEditComponent, TuiColorEditModule, TuiColorPickerComponent, TuiColorPickerModule, TuiColorSelectorComponent, TuiColorSelectorModule, TuiFlatPickerComponent, TuiFlatPickerModule, TuiLinearMultiPickerComponent, TuiLinearMultiPickerModule, TuiLinearPickerComponent, TuiLinearPickerModule, TuiPaletteComponent, TuiPaletteModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDropdownModule } from '@taiga-ui/core';\nimport * as i2 from '@tinkoff/tui-editor/components/color-selector';\nimport { TuiPaletteModule } from '@tinkoff/tui-editor/components/color-selector';\nimport * as i3 from '@taiga-ui/cdk';\nimport { TuiActiveZoneModule, TuiLetModule } from '@taiga-ui/cdk';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@tinkoff/tui-editor/abstract';\nimport * as i6 from 'rxjs';\nfunction TuiHighlightColorComponent_tui_hosted_dropdown_0_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 6);\n }\n if (rf & 2) {\n const selectedColor_r1 = i0.ɵɵnextContext().tuiLet;\n i0.ɵɵstyleProp(\"background\", selectedColor_r1);\n }\n}\nfunction TuiHighlightColorComponent_tui_hosted_dropdown_0_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-palette\", 7);\n i0.ɵɵlistener(\"selectedColor\", function TuiHighlightColorComponent_tui_hosted_dropdown_0_ng_template_5_Template_tui_palette_selectedColor_0_listener($event) {\n i0.ɵɵrestoreView(_r2);\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.editor.setBackgroundColor($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const activeZone_r4 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"colors\", ctx_r2.colors)(\"tuiActiveZoneParent\", activeZone_r4);\n }\n}\nfunction TuiHighlightColorComponent_tui_hosted_dropdown_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 3, 0);\n i0.ɵɵelement(2, \"button\", 4);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵtemplate(4, TuiHighlightColorComponent_tui_hosted_dropdown_0_div_4_Template, 1, 2, \"div\", 5)(5, TuiHighlightColorComponent_tui_hosted_dropdown_0_ng_template_5_Template, 1, 2, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const selectedColor_r1 = ctx.tuiLet;\n const hilite_r5 = i0.ɵɵreference(1);\n const hiliteDropdown_r6 = i0.ɵɵreference(6);\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", hiliteDropdown_r6)(\"tuiDropdownMaxHeight\", 999);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", hilite_r5.open)(\"icon\", ctx_r2.options.icons.textHilite)(\"pseudoActive\", hilite_r5.open)(\"tuiHint\", i0.ɵɵpipeBind1(3, 7, ctx_r2.backColorText$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !ctx_r2.isBlankColor(selectedColor_r1 || \"\"));\n }\n}\nlet TuiHighlightColorComponent = /*#__PURE__*/(() => {\n class TuiHighlightColorComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.colors = this.options.colors;\n this.backgroundColor$ = this.editor.stateChange$.pipe(map(() => this.editor.getBackgroundColor() || this.options.blankColor), distinctUntilChanged());\n this.backColorText$ = this.texts$.pipe(map(texts => texts.backColor));\n }\n isBlankColor(color) {\n return color === this.options.blankColor;\n }\n }\n TuiHighlightColorComponent.ɵfac = function TuiHighlightColorComponent_Factory(t) {\n return new (t || TuiHighlightColorComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiHighlightColorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiHighlightColorComponent,\n selectors: [[\"tui-highlight-color\"]],\n inputs: {\n colors: \"colors\"\n },\n decls: 2,\n vars: 3,\n consts: [[\"hilite\", \"\"], [\"hiliteDropdown\", \"\"], [3, \"content\", \"tuiDropdownMaxHeight\", 4, \"tuiLet\"], [3, \"content\", \"tuiDropdownMaxHeight\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__hilite-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-tool\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"class\", \"t-plate\", 3, \"background\", 4, \"ngIf\"], [1, \"t-plate\"], [1, \"t-color-picker\", 3, \"selectedColor\", \"colors\", \"tuiActiveZoneParent\"]],\n template: function TuiHighlightColorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiHighlightColorComponent_tui_hosted_dropdown_0_Template, 7, 9, \"tui-hosted-dropdown\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(1, 1, ctx.backgroundColor$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.TuiPaletteComponent, i3.TuiLetDirective, i1.TuiDropdownOptionsDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i4.NgIf, i3.TuiActiveZoneDirective, i4.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiHighlightColorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHighlightColorModule = /*#__PURE__*/(() => {\n class TuiHighlightColorModule {}\n TuiHighlightColorModule.ɵfac = function TuiHighlightColorModule_Factory(t) {\n return new (t || TuiHighlightColorModule)();\n };\n TuiHighlightColorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiHighlightColorModule\n });\n TuiHighlightColorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiPaletteModule, TuiHintModule, TuiDropdownModule, TuiActiveZoneModule, TuiLetModule]]\n });\n return TuiHighlightColorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiHighlightColorComponent, TuiHighlightColorModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport * as i5 from 'rxjs';\nimport { combineLatest } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@taiga-ui/cdk';\nimport { TuiLetModule } from '@taiga-ui/cdk';\nimport * as i4 from '@tinkoff/tui-editor/abstract';\nfunction TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6)(1, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.toggleUnorderedList());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"button\", 8);\n i0.ɵɵlistener(\"click\", function TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_2_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.toggleOrderedList());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"button\", 9);\n i0.ɵɵlistener(\"click\", function TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_3_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.toggleTaskList());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"button\", 10);\n i0.ɵɵlistener(\"click\", function TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_4_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.sinkListItem());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"button\", 11);\n i0.ɵɵlistener(\"click\", function TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_5_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.liftListItem());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const state_r3 = i0.ɵɵnextContext().tuiLet;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.listUnOrdered)(\"pseudoActive\", !!(state_r3 == null ? null : state_r3.unordered))(\"tuiHint\", texts_r4.unorderedList);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.listOrdered)(\"pseudoActive\", !!(state_r3 == null ? null : state_r3.ordered))(\"tuiHint\", texts_r4.orderedList);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.taskList)(\"pseudoActive\", !!(state_r3 == null ? null : state_r3.tasked));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.indent)(\"tuiHint\", texts_r4.indent);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.outdent)(\"tuiHint\", texts_r4.outdent);\n }\n}\nfunction TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 4, 0);\n i0.ɵɵelement(2, \"button\", 5);\n i0.ɵɵtemplate(3, TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template, 6, 12, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = ctx.tuiLet;\n const list_r5 = i0.ɵɵreference(1);\n const listDropdown_r6 = i0.ɵɵreference(4);\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", listDropdown_r6);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", list_r5.open)(\"icon\", ctx_r1.options.icons.listPreview)(\"pseudoActive\", (list_r5 == null ? null : list_r5.open) || (state_r3 == null ? null : state_r3.unordered) || (state_r3 == null ? null : state_r3.ordered) || false)(\"tuiHint\", texts_r4.list);\n }\n}\nfunction TuiListConfigsComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_Template, 5, 5, \"tui-hosted-dropdown\", 3);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(2, 1, ctx_r1.listState$));\n }\n}\nlet TuiListConfigsComponent = /*#__PURE__*/(() => {\n class TuiListConfigsComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.listState$ = combineLatest([this.editor.isActive$('orderedList'), this.editor.isActive$('bulletList'), this.editor.isActive$('taskList')]).pipe(map(([ordered, unordered, tasked]) => ({\n ordered,\n unordered,\n tasked\n })));\n }\n sinkListItem() {\n this.editor.sinkListItem();\n }\n liftListItem() {\n this.editor.liftListItem();\n }\n }\n TuiListConfigsComponent.ɵfac = function TuiListConfigsComponent_Factory(t) {\n return new (t || TuiListConfigsComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiListConfigsComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiListConfigsComponent,\n selectors: [[\"tui-list-configs\"]],\n decls: 2,\n vars: 3,\n consts: [[\"list\", \"\"], [\"listDropdown\", \"\"], [4, \"ngIf\"], [3, \"content\", 4, \"tuiLet\"], [3, \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__ordering-list-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [1, \"t-dropdown\", \"t-dropdown-list\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__un-ordered-list-button\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__ordered-list-button\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__task-list-button\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"pseudoActive\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar_indent-button\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"tuiHint\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar_outdent-button\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", 3, \"click\", \"icon\", \"tuiHint\"]],\n template: function TuiListConfigsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiListConfigsComponent_ng_container_0_Template, 3, 3, \"ng-container\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.texts$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.NgIf, i3.TuiLetDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiListConfigsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiListConfigsModule = /*#__PURE__*/(() => {\n class TuiListConfigsModule {}\n TuiListConfigsModule.ɵfac = function TuiListConfigsModule_Factory(t) {\n return new (t || TuiListConfigsModule)();\n };\n TuiListConfigsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiListConfigsModule\n });\n TuiListConfigsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiLetModule]]\n });\n return TuiListConfigsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiListConfigsComponent, TuiListConfigsModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport * as i6 from 'rxjs';\nimport { combineLatest } from 'rxjs';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDropdownModule } from '@taiga-ui/core';\nimport * as i2 from '@tinkoff/tui-editor/components/color-selector';\nimport { TuiPaletteModule } from '@tinkoff/tui-editor/components/color-selector';\nimport * as i3 from '@taiga-ui/cdk';\nimport { TuiActiveZoneModule, TuiLetModule } from '@taiga-ui/cdk';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@tinkoff/tui-editor/abstract';\nfunction TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 7);\n }\n if (rf & 2) {\n const color_r1 = i0.ɵɵnextContext(2).tuiLet;\n i0.ɵɵstyleProp(\"background\", color_r1);\n }\n}\nfunction TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-palette\", 8);\n i0.ɵɵlistener(\"selectedColor\", function TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_5_Template_tui_palette_selectedColor_0_listener($event) {\n i0.ɵɵrestoreView(_r2);\n i0.ɵɵnextContext();\n const colorSelect_r3 = i0.ɵɵreference(1);\n const ctx_r3 = i0.ɵɵnextContext(2);\n ctx_r3.setCellColor($event);\n return i0.ɵɵresetView(colorSelect_r3.close());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const activeZone_r5 = ctx.$implicit;\n const ctx_r3 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"colors\", ctx_r3.colors)(\"tuiActiveZoneParent\", activeZone_r5);\n }\n}\nfunction TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 4, 0);\n i0.ɵɵelement(2, \"button\", 5);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵtemplate(4, TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_div_4_Template, 1, 2, \"div\", 6)(5, TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_5_Template, 1, 2, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const isActive_r6 = ctx.tuiLet;\n const colorSelect_r3 = i0.ɵɵreference(1);\n const cellColorDropdown_r7 = i0.ɵɵreference(6);\n const color_r1 = i0.ɵɵnextContext().tuiLet;\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"canOpen\", !!isActive_r6)(\"content\", cellColorDropdown_r7)(\"tuiDropdownMaxHeight\", 999);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"disabled\", !isActive_r6)(\"focusable\", colorSelect_r3.open)(\"icon\", ctx_r3.options.icons.paint)(\"pseudoActive\", colorSelect_r3.open)(\"tuiHint\", i0.ɵɵpipeBind1(3, 9, ctx_r3.colorText$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !ctx_r3.isBlankColor(color_r1 || \"\"));\n }\n}\nfunction TuiTableCellColorComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_Template, 7, 11, \"tui-hosted-dropdown\", 3);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(2, 1, ctx_r3.isActive$));\n }\n}\nlet TuiTableCellColorComponent = /*#__PURE__*/(() => {\n class TuiTableCellColorComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.colors = this.options.colors;\n this.colorText$ = this.texts$.pipe(map(texts => this.editor.isActive('group') && texts.hiliteGroup || this.editor.isActive('table') && texts.cellColor || ''));\n this.isActive$ = combineLatest([this.editor.isActive$('table'), this.editor.isActive$('group')]).pipe(map(([table, group]) => table || group));\n this.color$ = this.editor.stateChange$.pipe(map(() => this.editor.getCellColor() || this.editor.getGroupColor() || this.options.blankColor), distinctUntilChanged());\n }\n isBlankColor(color) {\n return color === this.options.blankColor;\n }\n setCellColor(color) {\n if (this.editor.isActive('group')) {\n this.editor.setGroupHilite(color);\n } else if (this.editor.isActive('table')) {\n this.editor.setCellColor(color);\n }\n }\n }\n TuiTableCellColorComponent.ɵfac = function TuiTableCellColorComponent_Factory(t) {\n return new (t || TuiTableCellColorComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiTableCellColorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTableCellColorComponent,\n selectors: [[\"tui-table-cell-color\"]],\n inputs: {\n colors: \"colors\"\n },\n decls: 2,\n vars: 3,\n consts: [[\"colorSelect\", \"\"], [\"cellColorDropdown\", \"\"], [4, \"tuiLet\"], [3, \"canOpen\", \"content\", \"tuiDropdownMaxHeight\", 4, \"tuiLet\"], [3, \"canOpen\", \"content\", \"tuiDropdownMaxHeight\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"disabled\", \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"class\", \"t-plate t-plate_paint\", 3, \"background\", 4, \"ngIf\"], [1, \"t-plate\", \"t-plate_paint\"], [1, \"t-color-picker\", 3, \"selectedColor\", \"colors\", \"tuiActiveZoneParent\"]],\n template: function TuiTableCellColorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiTableCellColorComponent_ng_container_0_Template, 3, 3, \"ng-container\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(1, 1, ctx.color$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.TuiPaletteComponent, i3.TuiLetDirective, i1.TuiDropdownOptionsDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i4.NgIf, i3.TuiActiveZoneDirective, i4.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiTableCellColorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTableCellColorModule = /*#__PURE__*/(() => {\n class TuiTableCellColorModule {}\n TuiTableCellColorModule.ɵfac = function TuiTableCellColorModule_Factory(t) {\n return new (t || TuiTableCellColorModule)();\n };\n TuiTableCellColorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTableCellColorModule\n });\n TuiTableCellColorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiPaletteModule, TuiButtonModule, TuiHintModule, TuiActiveZoneModule, TuiDropdownModule, TuiLetModule]]\n });\n return TuiTableCellColorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTableCellColorComponent, TuiTableCellColorModule };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, Inject, Output, NgModule } from '@angular/core';\nimport { WINDOW } from '@ng-web-apis/common';\nimport { tuiGetViewportWidth } from '@taiga-ui/core';\nimport * as i1 from '@taiga-ui/cdk';\nimport { TuiRepeatTimesModule } from '@taiga-ui/cdk';\nimport { CommonModule } from '@angular/common';\nfunction TuiTableSizeSelectorComponent_div_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵlistener(\"click\", function TuiTableSizeSelectorComponent_div_0_div_1_Template_div_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.select());\n })(\"mouseenter\", function TuiTableSizeSelectorComponent_div_0_div_1_Template_div_mouseenter_0_listener($event) {\n const y_r3 = i0.ɵɵrestoreView(_r1).$implicit;\n const x_r4 = i0.ɵɵnextContext().$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateCurrentSize(y_r3 + 1, x_r4 + 1, $event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const y_r3 = ctx.$implicit;\n const x_r4 = i0.ɵɵnextContext().$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-cell_hovered\", ctx_r1.tableSelectHovered(y_r3, x_r4));\n }\n}\nfunction TuiTableSizeSelectorComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵtemplate(1, TuiTableSizeSelectorComponent_div_0_div_1_Template, 1, 2, \"div\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tuiRepeatTimesOf\", ctx_r1.rowsNumber);\n }\n}\nconst MAX_COLS_NUMBER = 15;\nconst MAX_ROWS_NUMBER = 15;\nconst MIN_DISTANCE_PX = 70;\nlet TuiTableSizeSelectorComponent = /*#__PURE__*/(() => {\n class TuiTableSizeSelectorComponent {\n constructor(win) {\n this.win = win;\n this.selectSize = new EventEmitter();\n /**\n * @deprecated use {@link selectSize}\n * TODO: remove in v4.0\n */\n this.onSelectSize = this.selectSize;\n this.tableSize = {\n rows: 1,\n cols: 1\n };\n }\n get columnsNumber() {\n return Math.min(Math.max(3, this.tableSize.cols + 1), MAX_COLS_NUMBER);\n }\n get rowsNumber() {\n return Math.min(Math.max(3, this.tableSize.rows + 1), MAX_ROWS_NUMBER);\n }\n tableSelectHovered(x, y) {\n return x < this.tableSize.rows && y < this.tableSize.cols;\n }\n updateCurrentSize(rows, cols, event) {\n if (tuiGetViewportWidth(this.win) - event.clientX > MIN_DISTANCE_PX) {\n this.tableSize = {\n rows,\n cols\n };\n }\n }\n /**\n * @deprecated use {@link select}\n * TODO: remove in v4.0\n */\n onClick() {\n this.select();\n }\n select() {\n this.selectSize.emit(this.tableSize);\n }\n }\n TuiTableSizeSelectorComponent.ɵfac = function TuiTableSizeSelectorComponent_Factory(t) {\n return new (t || TuiTableSizeSelectorComponent)(i0.ɵɵdirectiveInject(WINDOW));\n };\n TuiTableSizeSelectorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTableSizeSelectorComponent,\n selectors: [[\"tui-table-size-selector\"]],\n outputs: {\n selectSize: \"selectSize\",\n onSelectSize: \"onSelectSize\"\n },\n decls: 3,\n vars: 3,\n consts: [[\"class\", \"t-column\", 4, \"tuiRepeatTimes\", \"tuiRepeatTimesOf\"], [1, \"t-description\"], [1, \"t-column\"], [\"class\", \"t-cell\", 3, \"t-cell_hovered\", \"click\", \"mouseenter\", 4, \"tuiRepeatTimes\", \"tuiRepeatTimesOf\"], [1, \"t-cell\", 3, \"click\", \"mouseenter\"]],\n template: function TuiTableSizeSelectorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiTableSizeSelectorComponent_div_0_Template, 2, 1, \"div\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiRepeatTimesOf\", ctx.columnsNumber);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate2(\"\", ctx.tableSize.cols, \"\\xD7\", ctx.tableSize.rows, \"\");\n }\n },\n dependencies: [i1.TuiRepeatTimesDirective],\n styles: [\"[_nghost-%COMP%]{display:block;padding:.75rem}.t-cell[_ngcontent-%COMP%]{display:inline-block;background-color:var(--tui-base-01);width:1.25rem;height:1.25rem;border-radius:.25rem;margin:.125rem;border:1px solid var(--tui-base-04);cursor:pointer}.t-cell_hovered[_ngcontent-%COMP%]{background-color:var(--tui-base-02)}.t-column[_ngcontent-%COMP%]{white-space:nowrap}.t-description[_ngcontent-%COMP%]{text-align:center}\"],\n changeDetection: 0\n });\n return TuiTableSizeSelectorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTableSizeSelectorModule = /*#__PURE__*/(() => {\n class TuiTableSizeSelectorModule {}\n TuiTableSizeSelectorModule.ɵfac = function TuiTableSizeSelectorModule_Factory(t) {\n return new (t || TuiTableSizeSelectorModule)();\n };\n TuiTableSizeSelectorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTableSizeSelectorModule\n });\n TuiTableSizeSelectorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiRepeatTimesModule]]\n });\n return TuiTableSizeSelectorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTableSizeSelectorComponent, TuiTableSizeSelectorModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiDropdownModule, TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@tinkoff/tui-editor/components/toolbar-tools/table-size-selector';\nimport { TuiTableSizeSelectorModule } from '@tinkoff/tui-editor/components/toolbar-tools/table-size-selector';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from '@tinkoff/tui-editor/abstract';\nimport * as i5 from 'rxjs';\nfunction TuiTableCreateComponent_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-table-size-selector\", 4);\n i0.ɵɵlistener(\"selectSize\", function TuiTableCreateComponent_ng_template_4_Template_tui_table_size_selector_selectSize_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.addTable($event));\n });\n i0.ɵɵelementEnd();\n }\n}\nlet TuiTableCreateComponent = /*#__PURE__*/(() => {\n class TuiTableCreateComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.insertTableText$ = this.texts$.pipe(map(texts => texts.insertTable));\n }\n addTable({\n rows,\n cols\n }) {\n this.editor.enter(); // @note: clear previous styles\n const prevLine = this.editor.state.selection.anchor;\n // @note: don't use `setHardBreak`,\n // it inherits styles of previous lines\n // required two line after\n this.editor.enter();\n this.editor.enter();\n this.editor.setTextSelection(prevLine);\n this.editor.insertTable(rows, cols);\n }\n }\n TuiTableCreateComponent.ɵfac = function TuiTableCreateComponent_Factory(t) {\n return new (t || TuiTableCreateComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiTableCreateComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTableCreateComponent,\n selectors: [[\"tui-table-create\"]],\n decls: 6,\n vars: 6,\n consts: [[\"table\", \"\"], [\"tableDropdown\", \"\"], [\"tuiDropdownAlign\", \"left\", \"tuiDropdownDirection\", \"bottom\", 3, \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__insert-table-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"tuiHint\"], [3, \"selectSize\"]],\n template: function TuiTableCreateComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 2, 0);\n i0.ɵɵelement(2, \"button\", 3);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(4, TuiTableCreateComponent_ng_template_4_Template, 1, 0, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const table_r3 = i0.ɵɵreference(1);\n const tableDropdown_r4 = i0.ɵɵreference(5);\n i0.ɵɵproperty(\"content\", tableDropdown_r4);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", table_r3.open)(\"icon\", ctx.options.icons.insertTable)(\"tuiHint\", i0.ɵɵpipeBind1(3, 4, ctx.insertTableText$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.TuiTableSizeSelectorComponent, i1.TuiDropdownOptionsDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i3.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiTableCreateComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTableCreateModule = /*#__PURE__*/(() => {\n class TuiTableCreateModule {}\n TuiTableCreateModule.ɵfac = function TuiTableCreateModule_Factory(t) {\n return new (t || TuiTableCreateModule)();\n };\n TuiTableCreateModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTableCreateModule\n });\n TuiTableCreateModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiDropdownModule, TuiButtonModule, TuiHintModule, TuiTableSizeSelectorModule]]\n });\n return TuiTableCreateModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTableCreateComponent, TuiTableCreateModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@taiga-ui/cdk';\nimport { TuiLetModule } from '@taiga-ui/cdk';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from '@tinkoff/tui-editor/abstract';\nimport * as i5 from 'rxjs';\nconst _c0 = (a0, a1) => ({\n mergeCells: a0,\n splitCells: a1\n});\nfunction TuiTableMergeCellsComponent_ng_container_0_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 2);\n i0.ɵɵlistener(\"click\", function TuiTableMergeCellsComponent_ng_container_0_button_1_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const can_r2 = i0.ɵɵnextContext().tuiLet;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(can_r2.mergeCells ? ctx_r2.mergeCells() : ctx_r2.splitCell());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r4 = ctx.ngIf;\n const can_r2 = i0.ɵɵnextContext().tuiLet;\n i0.ɵɵproperty(\"disabled\", !can_r2.mergeCells && !can_r2.splitCells)(\"focusable\", false)(\"icon\", can_r2.mergeCells ? \"tuiIconTableMergeLarge\" : \"tuiIconTableSplitLarge\")(\"tuiHint\", can_r2.mergeCells ? texts_r4.mergeCells : texts_r4.splitCells);\n }\n}\nfunction TuiTableMergeCellsComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiTableMergeCellsComponent_ng_container_0_button_1_Template, 1, 4, \"button\", 1);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(2, 1, ctx_r2.texts$));\n }\n}\nlet TuiTableMergeCellsComponent = /*#__PURE__*/(() => {\n class TuiTableMergeCellsComponent {\n constructor(editor, texts$) {\n this.editor = editor;\n this.texts$ = texts$;\n this.canMergeCells$ = this.editor.stateChange$.pipe(map(() => this.editor.canMergeCells()), distinctUntilChanged());\n this.canSplitCells$ = this.editor.stateChange$.pipe(map(() => this.editor.canSplitCells()), distinctUntilChanged());\n }\n mergeCells() {\n this.editor.mergeCells();\n }\n splitCell() {\n this.editor.splitCell();\n }\n }\n TuiTableMergeCellsComponent.ɵfac = function TuiTableMergeCellsComponent_Factory(t) {\n return new (t || TuiTableMergeCellsComponent)(i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiTableMergeCellsComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTableMergeCellsComponent,\n selectors: [[\"tui-table-merge-cells\"]],\n decls: 3,\n vars: 8,\n consts: [[4, \"tuiLet\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"disabled\", \"focusable\", \"icon\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"tuiHint\"]],\n template: function TuiTableMergeCellsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiTableMergeCellsComponent_ng_container_0_Template, 3, 3, \"ng-container\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵpipe(2, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpureFunction2(5, _c0, i0.ɵɵpipeBind1(1, 1, ctx.canMergeCells$), i0.ɵɵpipeBind1(2, 3, ctx.canSplitCells$)));\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.TuiLetDirective, i3.NgIf, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i3.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiTableMergeCellsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTableMergeCellsModule = /*#__PURE__*/(() => {\n class TuiTableMergeCellsModule {}\n TuiTableMergeCellsModule.ɵfac = function TuiTableMergeCellsModule_Factory(t) {\n return new (t || TuiTableMergeCellsModule)();\n };\n TuiTableMergeCellsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTableMergeCellsModule\n });\n TuiTableMergeCellsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule, TuiHintModule, TuiLetModule]]\n });\n return TuiTableMergeCellsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTableMergeCellsComponent, TuiTableMergeCellsModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_TABLE_COMMANDS } from '@tinkoff/tui-editor/tokens';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiHintModule, TuiButtonModule, TuiDataListModule } from '@taiga-ui/core';\nimport * as i2 from '@taiga-ui/cdk';\nimport { TuiLetModule } from '@taiga-ui/cdk';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from '@tinkoff/tui-editor/abstract';\nimport * as i5 from 'rxjs';\n\n// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nfunction TuiTableRowColumnManagerComponent_tui_hosted_dropdown_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 3, 1);\n i0.ɵɵelement(2, \"button\", 4);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const active_r1 = ctx.tuiLet;\n const tableCommand_r2 = i0.ɵɵreference(1);\n const ctx_r2 = i0.ɵɵnextContext();\n const tableOptionsDropdown_r4 = i0.ɵɵreference(3);\n i0.ɵɵproperty(\"canOpen\", !!active_r1)(\"content\", tableOptionsDropdown_r4);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"disabled\", !active_r1)(\"focusable\", tableCommand_r2.open)(\"icon\", ctx_r2.options.icons.addRowTable)(\"tuiHint\", i0.ɵɵpipeBind1(3, 6, ctx_r2.rowsColumnsManagingText$));\n }\n}\nfunction TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_button_1_Template_button_click_0_listener() {\n const j_r6 = i0.ɵɵrestoreView(_r5).index;\n const i_r7 = i0.ɵɵnextContext().index;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.onTableOption(i_r7 * 2 + j_r6));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r8 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", item_r8, \" \");\n }\n}\nfunction TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-opt-group\");\n i0.ɵɵtemplate(1, TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_button_1_Template, 2, 1, \"button\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const group_r9 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", group_r9);\n }\n}\nfunction TuiTableRowColumnManagerComponent_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-data-list\");\n i0.ɵɵtemplate(1, TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_Template, 2, 1, \"tui-opt-group\", 5);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(2, 1, ctx_r2.tableCommandTexts$));\n }\n}\nvar TuiTableCommands = /*#__PURE__*/function (TuiTableCommands) {\n TuiTableCommands[TuiTableCommands[\"InsertColumnBefore\"] = 0] = \"InsertColumnBefore\";\n TuiTableCommands[TuiTableCommands[\"InsertColumnAfter\"] = 1] = \"InsertColumnAfter\";\n TuiTableCommands[TuiTableCommands[\"InsertRowBefore\"] = 2] = \"InsertRowBefore\";\n TuiTableCommands[TuiTableCommands[\"InsertRowAfter\"] = 3] = \"InsertRowAfter\";\n TuiTableCommands[TuiTableCommands[\"DeleteColumn\"] = 4] = \"DeleteColumn\";\n TuiTableCommands[TuiTableCommands[\"DeleteRow\"] = 5] = \"DeleteRow\";\n return TuiTableCommands;\n}(TuiTableCommands || {});\nlet TuiTableRowColumnManagerComponent = /*#__PURE__*/(() => {\n class TuiTableRowColumnManagerComponent {\n constructor(options, editor, texts$, tableCommandTexts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.tableCommandTexts$ = tableCommandTexts$;\n this.commandsRegistry = {\n [TuiTableCommands.InsertColumnAfter]: () => this.editor.addColumnAfter(),\n [TuiTableCommands.InsertColumnBefore]: () => this.editor.addColumnBefore(),\n [TuiTableCommands.InsertRowAfter]: () => this.editor.addRowAfter(),\n [TuiTableCommands.InsertRowBefore]: () => this.editor.addRowBefore(),\n [TuiTableCommands.DeleteColumn]: () => this.editor.deleteColumn(),\n [TuiTableCommands.DeleteRow]: () => this.editor.deleteRow()\n };\n this.isActive$ = this.editor.isActive$('table');\n this.rowsColumnsManagingText$ = this.texts$.pipe(map(texts => texts.rowsColumnsManaging));\n }\n onTableOption(command) {\n this.commandsRegistry[command]();\n }\n }\n TuiTableRowColumnManagerComponent.ɵfac = function TuiTableRowColumnManagerComponent_Factory(t) {\n return new (t || TuiTableRowColumnManagerComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_TABLE_COMMANDS));\n };\n TuiTableRowColumnManagerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTableRowColumnManagerComponent,\n selectors: [[\"tui-table-row-column-manager\"]],\n decls: 4,\n vars: 3,\n consts: [[\"tableOptionsDropdown\", \"\"], [\"tableCommand\", \"\"], [3, \"canOpen\", \"content\", 4, \"tuiLet\"], [3, \"canOpen\", \"content\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"disabled\", \"focusable\", \"icon\", \"tuiHint\"], [4, \"ngFor\", \"ngForOf\"], [\"tuiOption\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"tuiOption\", \"\", 3, \"click\"]],\n template: function TuiTableRowColumnManagerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiTableRowColumnManagerComponent_tui_hosted_dropdown_0_Template, 4, 8, \"tui-hosted-dropdown\", 2);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵtemplate(2, TuiTableRowColumnManagerComponent_ng_template_2_Template, 3, 3, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(1, 1, ctx.isActive$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i1.TuiDataListComponent, i1.TuiOptionComponent, i2.TuiLetDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i3.NgForOf, i1.TuiOptGroupDirective, i3.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiTableRowColumnManagerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTableRowColumnManagerModule = /*#__PURE__*/(() => {\n class TuiTableRowColumnManagerModule {}\n TuiTableRowColumnManagerModule.ɵfac = function TuiTableRowColumnManagerModule_Factory(t) {\n return new (t || TuiTableRowColumnManagerModule)();\n };\n TuiTableRowColumnManagerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTableRowColumnManagerModule\n });\n TuiTableRowColumnManagerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiHintModule, TuiButtonModule, TuiDataListModule, TuiLetModule]]\n });\n return TuiTableRowColumnManagerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTableCommands, TuiTableRowColumnManagerComponent, TuiTableRowColumnManagerModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiButtonModule, TuiHostedDropdownModule, TuiDropdownModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@tinkoff/tui-editor/components/color-selector';\nimport { TuiPaletteModule } from '@tinkoff/tui-editor/components/color-selector';\nimport * as i3 from '@taiga-ui/cdk';\nimport { TuiActiveZoneModule, TuiLetModule } from '@taiga-ui/cdk';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@tinkoff/tui-editor/abstract';\nimport * as i6 from 'rxjs';\nfunction TuiTextColorComponent_tui_hosted_dropdown_0_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-palette\", 6);\n i0.ɵɵlistener(\"selectedColor\", function TuiTextColorComponent_tui_hosted_dropdown_0_ng_template_5_Template_tui_palette_selectedColor_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.editor.setFontColor($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const activeZone_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"colors\", ctx_r1.colors)(\"tuiActiveZoneParent\", activeZone_r3);\n }\n}\nfunction TuiTextColorComponent_tui_hosted_dropdown_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 3, 0);\n i0.ɵɵelement(2, \"button\", 4);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelement(4, \"div\", 5);\n i0.ɵɵtemplate(5, TuiTextColorComponent_tui_hosted_dropdown_0_ng_template_5_Template, 1, 2, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const selectedColor_r4 = ctx.tuiLet;\n const color_r5 = i0.ɵɵreference(1);\n const colorDropdown_r6 = i0.ɵɵreference(6);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", colorDropdown_r6)(\"tuiDropdownMaxHeight\", 999);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", color_r5.open)(\"icon\", ctx_r1.options.icons.textColor)(\"pseudoActive\", color_r5.open)(\"tuiHint\", i0.ɵɵpipeBind1(3, 8, ctx_r1.foreColorText$));\n i0.ɵɵadvance(2);\n i0.ɵɵstyleProp(\"background\", selectedColor_r4);\n }\n}\nlet TuiTextColorComponent = /*#__PURE__*/(() => {\n class TuiTextColorComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.colors = this.options.colors;\n this.fontColor$ = this.editor.stateChange$.pipe(map(() => this.editor.getFontColor() || this.options.blankColor), distinctUntilChanged());\n this.foreColorText$ = this.texts$.pipe(map(texts => texts.foreColor));\n }\n }\n TuiTextColorComponent.ɵfac = function TuiTextColorComponent_Factory(t) {\n return new (t || TuiTextColorComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiTextColorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTextColorComponent,\n selectors: [[\"tui-text-color\"]],\n inputs: {\n colors: \"colors\"\n },\n decls: 2,\n vars: 3,\n consts: [[\"color\", \"\"], [\"colorDropdown\", \"\"], [3, \"content\", \"tuiDropdownMaxHeight\", 4, \"tuiLet\"], [3, \"content\", \"tuiDropdownMaxHeight\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__color-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [1, \"t-plate\"], [1, \"t-color-picker\", 3, \"selectedColor\", \"colors\", \"tuiActiveZoneParent\"]],\n template: function TuiTextColorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiTextColorComponent_tui_hosted_dropdown_0_Template, 7, 10, \"tui-hosted-dropdown\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(1, 1, ctx.fontColor$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.TuiPaletteComponent, i3.TuiLetDirective, i1.TuiDropdownOptionsDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i3.TuiActiveZoneDirective, i4.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiTextColorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTextColorModule = /*#__PURE__*/(() => {\n class TuiTextColorModule {}\n TuiTextColorModule.ɵfac = function TuiTextColorModule_Factory(t) {\n return new (t || TuiTextColorModule)();\n };\n TuiTextColorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTextColorModule\n });\n TuiTextColorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule, TuiHostedDropdownModule, TuiDropdownModule, TuiHintModule, TuiPaletteModule, TuiActiveZoneModule, TuiLetModule]]\n });\n return TuiTextColorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTextColorComponent, TuiTextColorModule };\n","import * as i3 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Pipe, EventEmitter, Component, ChangeDetectionStrategy, Inject, Output, Input, HostListener, NgModule } from '@angular/core';\nimport * as i4 from '@taiga-ui/cdk';\nimport { tuiIsValidUrl, tuiIsElement, TuiAutoFocusModule } from '@taiga-ui/cdk';\nimport { TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER, TUI_EDITOR_LINK_HASH_PREFIX, TUI_EDITOR_LINK_SIMPLE_PROTOCOL_DIVIDER, TUI_EDITOR_LINK_HTTPS_PREFIX } from '@tinkoff/tui-editor/constants';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_LINK_TEXTS, TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport * as i1 from '@taiga-ui/kit';\nimport { TuiInputInlineModule, TuiToggleModule } from '@taiga-ui/kit';\nimport * as i2 from '@taiga-ui/core';\nimport { TuiButtonModule, TuiSvgModule, TuiLinkModule, TuiScrollbarModule } from '@taiga-ui/core';\nimport * as i5 from '@angular/forms';\nimport { FormsModule } from '@angular/forms';\nimport * as i8 from '@tinkoff/tui-editor/abstract';\nfunction TuiEditLinkComponent_ng_container_1_ng_container_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1, \"Edit anchor\");\n i0.ɵɵelementContainerEnd();\n }\n}\nfunction TuiEditLinkComponent_ng_container_1_ng_template_4_span_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\");\n i0.ɵɵtext(1, \"Link to anchor\");\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiEditLinkComponent_ng_container_1_ng_template_4_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\");\n i0.ɵɵtext(1, \"URL\");\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiEditLinkComponent_ng_container_1_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiEditLinkComponent_ng_container_1_ng_template_4_span_0_Template, 2, 0, \"span\", 4)(1, TuiEditLinkComponent_ng_container_1_ng_template_4_ng_template_1_Template, 2, 0, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const urlTitle_r3 = i0.ɵɵreference(2);\n const ctx_r3 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"ngIf\", ctx_r3.prefixIsHashMode)(\"ngIfElse\", urlTitle_r3);\n }\n}\nfunction TuiEditLinkComponent_ng_container_1_ng_container_10_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.ngIf;\n const ctx_r3 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r3.prefixIsHashMode ? text_r5.anchorExample : text_r5.urlExample, \" \");\n }\n}\nfunction TuiEditLinkComponent_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"label\", 6)(2, \"div\", 7);\n i0.ɵɵtemplate(3, TuiEditLinkComponent_ng_container_1_ng_container_3_Template, 2, 0, \"ng-container\", 4)(4, TuiEditLinkComponent_ng_container_1_ng_template_4_Template, 3, 2, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(6, \"div\", 8)(7, \"div\", 9);\n i0.ɵɵtext(8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(9, \"tui-input-inline\", 10);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function TuiEditLinkComponent_ng_container_1_Template_tui_input_inline_ngModelChange_9_listener($event) {\n i0.ɵɵrestoreView(_r2);\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r3.url, $event) || (ctx_r3.url = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵlistener(\"input\", function TuiEditLinkComponent_ng_container_1_Template_tui_input_inline_input_9_listener($event) {\n i0.ɵɵrestoreView(_r2);\n const ctx_r3 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r3.onChange($event.target == null ? null : $event.target.value));\n })(\"keydown.backspace\", function TuiEditLinkComponent_ng_container_1_Template_tui_input_inline_keydown_backspace_9_listener() {\n i0.ɵɵrestoreView(_r2);\n const ctx_r3 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r3.onBackspace());\n })(\"keydown.prevent.enter\", function TuiEditLinkComponent_ng_container_1_Template_tui_input_inline_keydown_prevent_enter_9_listener() {\n i0.ɵɵrestoreView(_r2);\n const ctx_r3 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r3.onSave());\n });\n i0.ɵɵtemplate(10, TuiEditLinkComponent_ng_container_1_ng_container_10_Template, 2, 1, \"ng-container\", 5);\n i0.ɵɵpipe(11, \"async\");\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(12, \"tui-svg\", 11);\n i0.ɵɵlistener(\"click\", function TuiEditLinkComponent_ng_container_1_Template_tui_svg_click_12_listener() {\n i0.ɵɵrestoreView(_r2);\n const ctx_r3 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r3.onClear());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(13, \"button\", 12);\n i0.ɵɵlistener(\"click\", function TuiEditLinkComponent_ng_container_1_Template_button_click_13_listener() {\n i0.ɵɵrestoreView(_r2);\n const ctx_r3 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r3.onSave());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const fullOptions_r6 = i0.ɵɵreference(5);\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx_r3.anchorMode)(\"ngIfElse\", fullOptions_r6);\n i0.ɵɵadvance(5);\n i0.ɵɵtextInterpolate(ctx_r3.prefix);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"t-input_filled\", ctx_r3.hasUrl);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r3.url);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(11, 11, ctx_r3.texts$));\n i0.ɵɵadvance(2);\n i0.ɵɵclassProp(\"t-cleaner_hidden\", !ctx_r3.hasUrl);\n i0.ɵɵproperty(\"src\", ctx_r3.options.icons.popupLinkRemove);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r3.options.icons.popupLinkSave);\n }\n}\nfunction TuiEditLinkComponent_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"a\", 13);\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"tuiShortUrl\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"button\", 14);\n i0.ɵɵlistener(\"click\", function TuiEditLinkComponent_ng_template_2_Template_button_click_3_listener() {\n i0.ɵɵrestoreView(_r7);\n const ctx_r3 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r3.onEdit());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"button\", 15);\n i0.ɵɵlistener(\"click\", function TuiEditLinkComponent_ng_template_2_Template_button_click_4_listener() {\n i0.ɵɵrestoreView(_r7);\n const ctx_r3 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r3.onRemove());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"href\", ctx_r3.href, i0.ɵɵsanitizeUrl)(\"icon\", ctx_r3.prefixIsHashMode ? \"tuiIconHash\" : \"tuiIconExternalLink\");\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(2, 5, ctx_r3.url), \" \");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"icon\", ctx_r3.options.icons.popupPreviewLinkEdit);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r3.options.icons.popupPreviewLinkClear);\n }\n}\nfunction TuiEditLinkComponent_ng_container_4_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r8 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 19);\n i0.ɵɵlistener(\"click\", function TuiEditLinkComponent_ng_container_4_button_4_Template_button_click_0_listener() {\n const id_r9 = i0.ɵɵrestoreView(_r8).$implicit;\n const ctx_r3 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r3.setAnchor(id_r9));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const id_r9 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" #\", id_r9, \" \");\n }\n}\nfunction TuiEditLinkComponent_ng_container_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelement(1, \"hr\", 16);\n i0.ɵɵelementStart(2, \"tui-scrollbar\")(3, \"div\", 17);\n i0.ɵɵtemplate(4, TuiEditLinkComponent_ng_container_4_button_4_Template, 2, 1, \"button\", 18);\n i0.ɵɵpipe(5, \"tuiFilterAnchors\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind3(5, 1, ctx_r3.anchorIds, ctx_r3.prefix, ctx_r3.url));\n }\n}\nfunction splitOsiProtocol(url = ``) {\n var _a;\n const protocolPosition = (_a = url.indexOf(TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER)) !== null && _a !== void 0 ? _a : -1;\n const [prefix, path] = protocolPosition > -1 ? [url.slice(0, protocolPosition + TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER.length), url.slice(protocolPosition + TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER.length, url.length)] : [``, url];\n const result = [prefix, path].filter(Boolean);\n return (path === null || path === void 0 ? void 0 : path.includes(`://`)) && result.length > 1 ? splitOsiProtocol(path) : result;\n}\nfunction splitSimpleProtocol(url = ``) {\n const [prefix, path] = url.split(/:/).slice(-2).filter(Boolean);\n return prefix && path && !tuiIsValidUrl(url) ? [`${prefix}:`, path] : [];\n}\nfunction tuiEditLinkParseUrl(url = ``) {\n if (url.startsWith(TUI_EDITOR_LINK_HASH_PREFIX)) {\n return {\n prefix: TUI_EDITOR_LINK_HASH_PREFIX,\n path: url.slice(1)\n };\n }\n const [prefix = ``, path = ``] = url.includes(TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER) ? splitOsiProtocol(url) : splitSimpleProtocol(url);\n if (path.includes(TUI_EDITOR_LINK_SIMPLE_PROTOCOL_DIVIDER)) {\n const [protocol, otherPart] = splitSimpleProtocol(path);\n if (protocol && otherPart) {\n return {\n prefix: protocol,\n path: otherPart\n };\n }\n }\n if (url.startsWith(`/`) && !url.startsWith(`//`)) {\n return {\n prefix: url.slice(0, 1),\n path: url.slice(1)\n };\n }\n if (url.startsWith(`./`)) {\n return {\n prefix: url.slice(0, 2),\n path: url.slice(2)\n };\n }\n return {\n prefix,\n path: prefix === `` ? url : path\n };\n}\nconst MAX_LENGTH = 60;\nconst START = MAX_LENGTH - 20;\nconst END = MAX_LENGTH - START - 10;\nlet TuiShortUrlPipe = /*#__PURE__*/(() => {\n class TuiShortUrlPipe {\n transform(url) {\n return url.length < MAX_LENGTH ? url : `${url.slice(0, Math.max(0, START))}...${url.slice(url.length - END)}`;\n }\n }\n TuiShortUrlPipe.ɵfac = function TuiShortUrlPipe_Factory(t) {\n return new (t || TuiShortUrlPipe)();\n };\n TuiShortUrlPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiShortUrl\",\n type: TuiShortUrlPipe,\n pure: true\n });\n return TuiShortUrlPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFilterAnchorsPipe = /*#__PURE__*/(() => {\n class TuiFilterAnchorsPipe {\n transform(anchors, prefix, currentUrl) {\n return prefix === `#` ? anchors.filter(anchor => anchor !== currentUrl) : anchors;\n }\n }\n TuiFilterAnchorsPipe.ɵfac = function TuiFilterAnchorsPipe_Factory(t) {\n return new (t || TuiFilterAnchorsPipe)();\n };\n TuiFilterAnchorsPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiFilterAnchors\",\n type: TuiFilterAnchorsPipe,\n pure: true\n });\n return TuiFilterAnchorsPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditLinkComponent = /*#__PURE__*/(() => {\n class TuiEditLinkComponent {\n constructor(doc, texts$, editor, options) {\n this.doc = doc;\n this.texts$ = texts$;\n this.editor = editor;\n this.options = options;\n this.isOnlyAnchorMode = this.detectAnchorMode();\n this.addLink = new EventEmitter();\n this.removeLink = new EventEmitter();\n this.url = this.getHrefOrAnchorId();\n this.edit = !this.url;\n this.prefix = this.makeDefaultPrefix();\n this.anchorIds = this.getAllAnchorsIds();\n }\n get defaultProtocol() {\n var _a, _b;\n return (_b = (_a = this.options.linkOptions) === null || _a === void 0 ? void 0 : _a.protocol) !== null && _b !== void 0 ? _b : TUI_EDITOR_LINK_HTTPS_PREFIX;\n }\n set anchorMode(mode) {\n this.isOnlyAnchorMode = mode;\n this.prefix = mode ? TUI_EDITOR_LINK_HASH_PREFIX : this.makeDefaultPrefix();\n }\n get anchorMode() {\n return this.isOnlyAnchorMode;\n }\n get prefixIsHashMode() {\n return this.prefix === TUI_EDITOR_LINK_HASH_PREFIX;\n }\n get hasUrl() {\n return !!this.url;\n }\n get href() {\n return `${this.prefix}${this.url}`;\n }\n get showAnchorsList() {\n return !this.anchorMode && this.edit && this.anchorIds.length > 0;\n }\n get isViewMode() {\n return !this.edit;\n }\n onSelectionChange() {\n if (this.isViewMode) {\n this.url = this.getHrefOrAnchorId();\n this.anchorMode = this.detectAnchorMode();\n }\n }\n onMouseDown(event) {\n if (tuiIsElement(event.target) && !event.target.matches('a, button, input')) {\n event.preventDefault();\n }\n }\n setAnchor(anchor) {\n this.url = anchor;\n this.changePrefix(true);\n }\n changePrefix(isPrefix) {\n this.prefix = isPrefix ? TUI_EDITOR_LINK_HASH_PREFIX : this.defaultProtocol;\n }\n onSave() {\n if (this.url) {\n this.addLink.emit(this.href);\n } else {\n this.removeLink.emit();\n }\n }\n onBackspace() {\n if (!this.url) {\n this.prefix = this.isOnlyAnchorMode ? TUI_EDITOR_LINK_HASH_PREFIX : this.defaultProtocol;\n }\n }\n onEdit() {\n this.edit = true;\n }\n onRemove() {\n this.removeLink.emit();\n }\n onChange(url) {\n this.url = this.removePrefix(url);\n }\n onClear() {\n this.url = '';\n }\n makeDefaultPrefix() {\n var _a, _b;\n const a = this.getAnchorElement();\n const defaultPrefix = tuiEditLinkParseUrl((_a = a === null || a === void 0 ? void 0 : a.getAttribute('href')) !== null && _a !== void 0 ? _a : '').prefix || this.defaultProtocol;\n if (a) {\n return !a.getAttribute('href') && a.getAttribute('id') || ((_b = a.getAttribute('href')) === null || _b === void 0 ? void 0 : _b.startsWith(TUI_EDITOR_LINK_HASH_PREFIX)) ? TUI_EDITOR_LINK_HASH_PREFIX : defaultPrefix;\n }\n return defaultPrefix;\n }\n detectAnchorMode() {\n const a = this.getAnchorElement();\n return !(a === null || a === void 0 ? void 0 : a.href) && !!(a === null || a === void 0 ? void 0 : a.getAttribute('id'));\n }\n getFocusedParentElement() {\n var _a, _b;\n return ((_b = (_a = this.doc.getSelection()) === null || _a === void 0 ? void 0 : _a.focusNode) === null || _b === void 0 ? void 0 : _b.parentElement) || null;\n }\n getAnchorElement() {\n var _a, _b, _c;\n const focusable = this.getFocusedParentElement();\n return (_c = (_a = focusable === null || focusable === void 0 ? void 0 : focusable.closest('a')) !== null && _a !== void 0 ? _a : (_b = focusable === null || focusable === void 0 ? void 0 : focusable.querySelector('img')) === null || _b === void 0 ? void 0 : _b.closest('a')) !== null && _c !== void 0 ? _c : null;\n }\n getHrefOrAnchorId() {\n const a = this.getAnchorElement();\n return a ? this.removePrefix(a.getAttribute('href') || a.getAttribute('id') || '') : this.url;\n }\n removePrefix(url) {\n var _a;\n const fullPath = url.startsWith(TUI_EDITOR_LINK_HASH_PREFIX) || this.prefix === TUI_EDITOR_LINK_HASH_PREFIX || url.startsWith('/') || url.startsWith('./') || url.startsWith('http') || url.startsWith('://') ? url : `${(_a = this.prefix) !== null && _a !== void 0 ? _a : ''}${url}`;\n const {\n prefix,\n path\n } = tuiEditLinkParseUrl(fullPath);\n const expectAnchorMode = this.isOnlyAnchorMode || prefix === TUI_EDITOR_LINK_HASH_PREFIX || prefix === '' && this.prefix === TUI_EDITOR_LINK_HASH_PREFIX;\n if (expectAnchorMode) {\n this.prefix = TUI_EDITOR_LINK_HASH_PREFIX;\n } else if (prefix === '') {\n this.prefix = this.defaultProtocol;\n } else {\n this.prefix = prefix;\n }\n return path;\n }\n getAllAnchorsIds() {\n var _a;\n const nodes = Array.from((_a = this.editor.getOriginTiptapEditor().view.dom.querySelectorAll('[data-type=\"jump-anchor\"]')) !== null && _a !== void 0 ? _a : []);\n return Array.from(nodes).map(node => node.getAttribute('id') || '').filter(Boolean);\n }\n }\n TuiEditLinkComponent.ɵfac = function TuiEditLinkComponent_Factory(t) {\n return new (t || TuiEditLinkComponent)(i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(TUI_EDITOR_LINK_TEXTS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS));\n };\n TuiEditLinkComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiEditLinkComponent,\n selectors: [[\"tui-edit-link\"]],\n hostBindings: function TuiEditLinkComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"selectionchange\", function TuiEditLinkComponent_selectionchange_HostBindingHandler() {\n return ctx.onSelectionChange();\n }, false, i0.ɵɵresolveDocument)(\"mousedown\", function TuiEditLinkComponent_mousedown_HostBindingHandler($event) {\n return ctx.onMouseDown($event);\n });\n }\n },\n inputs: {\n anchorMode: \"anchorMode\"\n },\n outputs: {\n addLink: \"addLink\",\n removeLink: \"removeLink\"\n },\n decls: 5,\n vars: 3,\n consts: [[\"view\", \"\"], [\"fullOptions\", \"\"], [\"urlTitle\", \"\"], [1, \"t-edit-link\", 3, \"mousedown\"], [4, \"ngIf\", \"ngIfElse\"], [4, \"ngIf\"], [1, \"t-label\"], [1, \"t-label-properties\"], [1, \"t-url\"], [1, \"t-prefix\"], [\"tuiAutoFocus\", \"\", 1, \"t-input\", 3, \"ngModelChange\", \"input\", \"keydown.backspace\", \"keydown.prevent.enter\", \"ngModel\"], [1, \"t-cleaner\", 3, \"click\", \"src\"], [\"appearance\", \"icon\", \"shape\", \"rounded\", \"size\", \"s\", \"title\", \"Insert link\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-button\", 3, \"click\", \"icon\"], [\"iconAlign\", \"left\", \"target\", \"_blank\", \"tuiLink\", \"\", 1, \"t-link\", 3, \"href\", \"icon\"], [\"appearance\", \"icon\", \"shape\", \"rounded\", \"size\", \"s\", \"title\", \"Change link\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-button\", \"t-edit-button\", 3, \"click\", \"icon\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__popup-link-clear-button\", \"shape\", \"rounded\", \"size\", \"s\", \"title\", \"Remove link\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-button\", 3, \"click\", \"icon\"], [1, \"t-hr\"], [1, \"t-anchor-list\"], [\"type\", \"button\", \"class\", \"t-anchor\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"type\", \"button\", 1, \"t-anchor\", 3, \"click\"]],\n template: function TuiEditLinkComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 3);\n i0.ɵɵlistener(\"mousedown\", function TuiEditLinkComponent_Template_div_mousedown_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView($event.stopImmediatePropagation());\n });\n i0.ɵɵtemplate(1, TuiEditLinkComponent_ng_container_1_Template, 14, 13, \"ng-container\", 4)(2, TuiEditLinkComponent_ng_template_2_Template, 5, 7, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(4, TuiEditLinkComponent_ng_container_4_Template, 6, 5, \"ng-container\", 5);\n }\n if (rf & 2) {\n const view_r10 = i0.ɵɵreference(3);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.edit)(\"ngIfElse\", view_r10);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx.showAnchorsList);\n }\n },\n dependencies: [i1.TuiInputInlineComponent, i2.TuiSvgComponent, i2.TuiButtonComponent, i2.TuiLinkComponent, i2.TuiScrollbarComponent, i3.NgIf, i4.TuiAutoFocusDirective, i5.NgControlStatus, i5.NgModel, i3.NgForOf, i3.AsyncPipe, TuiShortUrlPipe, TuiFilterAnchorsPipe],\n styles: [\"[_nghost-%COMP%]{display:block;min-width:18.75rem}.t-edit-link[_ngcontent-%COMP%]{display:flex;min-height:4rem;align-items:center;padding-right:.75rem}.t-label[_ngcontent-%COMP%]{font:var(--tui-font-text-s);height:var(--tui-height-l);box-sizing:border-box;padding:.4375rem 1rem;min-width:12.5rem;max-width:25rem;width:100%}.t-label-properties[_ngcontent-%COMP%]{display:flex;align-items:center;max-width:8.375rem;justify-content:space-between}.t-property_inactive[_ngcontent-%COMP%]{opacity:.5}.t-url[_ngcontent-%COMP%]{display:flex;font:var(--tui-font-text-m);color:var(--tui-text-02)}.t-input[_ngcontent-%COMP%]{flex:1}.t-input_filled[_ngcontent-%COMP%]{color:var(--tui-text-01)}.t-button[_ngcontent-%COMP%]{width:2rem;height:2rem;margin:0 .25rem;transition:background .2s}.t-edit-button[_ngcontent-%COMP%]{margin-left:auto}.t-link[_ngcontent-%COMP%]{margin:0 1rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.t-cleaner[_ngcontent-%COMP%]{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;color:var(--tui-base-06);cursor:pointer;margin-left:auto}.t-cleaner[_ngcontent-%COMP%]:hover{color:var(--tui-base-07)}.t-cleaner_hidden[_ngcontent-%COMP%]{visibility:hidden}.t-anchor-list[_ngcontent-%COMP%]{display:flex;max-height:12.5rem;flex-direction:column}.t-anchor[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;min-height:2.75rem;padding:.375rem .5rem;margin:.125rem .5rem;border-radius:var(--tui-radius-m);text-align:left}.t-anchor[_ngcontent-%COMP%]:hover{background:var(--tui-base-02);cursor:pointer}\"],\n changeDetection: 0\n });\n return TuiEditLinkComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditLinkModule = /*#__PURE__*/(() => {\n class TuiEditLinkModule {}\n TuiEditLinkModule.ɵfac = function TuiEditLinkModule_Factory(t) {\n return new (t || TuiEditLinkModule)();\n };\n TuiEditLinkModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiEditLinkModule\n });\n TuiEditLinkModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, FormsModule, TuiAutoFocusModule, TuiButtonModule, TuiSvgModule, TuiLinkModule, TuiInputInlineModule, TuiToggleModule, TuiScrollbarModule]]\n });\n return TuiEditLinkModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiEditLinkComponent, TuiEditLinkModule, TuiFilterAnchorsPipe, TuiShortUrlPipe, tuiEditLinkParseUrl };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Directive, Inject, HostListener, EventEmitter, Component, ChangeDetectionStrategy, Optional, Self, ViewChildren, ViewChild, Input, HostBinding, Output, NgModule } from '@angular/core';\nimport * as i5 from '@taiga-ui/cdk';\nimport { tuiIsNativeFocusedIn, tuiClamp, tuiIsNativeMouseFocusable, tuiGetClosestFocusable, EMPTY_QUERY, tuiAssert, TuiDestroyService, TuiFocusableModule, TuiItemModule, TuiItemDirective } from '@taiga-ui/cdk';\nimport { defaultEditorTools } from '@tinkoff/tui-editor/constants';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TuiEditorTool } from '@tinkoff/tui-editor/enums';\nimport { TUI_IMAGE_LOADER, TUI_ATTACH_FILES_OPTIONS, TUI_ATTACH_FILES_LOADER, TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport { take, takeUntil } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHintModule, TuiButtonModule, TuiHostedDropdownModule } from '@taiga-ui/core';\nimport * as i2 from '@tinkoff/tui-editor/components/toolbar-tools';\nimport { TuiTableMergeCellsModule, TuiTableCellColorModule, TuiTableRowColumnManagerModule, TuiTableCreateModule, TuiFontSizeModule, TuiFontStyleModule, TuiAlignContentModule, TuiListConfigsModule, TuiTextColorModule, TuiHighlightColorModule, TuiCodeModule, TuiDetailsModule, TuiEditorToolGroup } from '@tinkoff/tui-editor/components/toolbar-tools';\nimport * as i3 from '@tinkoff/tui-editor/components/edit-link';\nimport { TuiEditLinkModule } from '@tinkoff/tui-editor/components/edit-link';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i7 from '@tinkoff/tui-editor/abstract';\nimport * as i8 from 'rxjs';\nconst _c0 = [\"dropdown\"];\nconst _c1 = [\"*\"];\nfunction TuiToolbarComponent_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction TuiToolbarComponent_section_5_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 14)(1, \"button\", 15);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_1_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.undo());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"button\", 16);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_1_Template_button_click_2_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.redo());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"disabled\", ctx_r1.undoDisabled)(\"focusable\", false)(\"icon\", ctx_r1.options.icons.undo)(\"tuiHint\", texts_r3.undo);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"disabled\", ctx_r1.redoDisabled)(\"focusable\", false)(\"icon\", ctx_r1.options.icons.redo)(\"tuiHint\", texts_r3.redo);\n }\n}\nfunction TuiToolbarComponent_section_5_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵelement(1, \"tui-font-size\", 17);\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_font_style_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-font-style\", 23);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"enabledTools\", ctx_r1.toolsSet);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_align_content_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-align-content\", 17);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_list_configs_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-list-configs\", 17);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 24, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_3_button_4_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.toggleQuote());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"disabled\", ctx_r1.unorderedList || ctx_r1.orderedList)(\"focusable\", false)(\"icon\", ctx_r1.options.icons.quote)(\"pseudoActive\", ctx_r1.blockquote)(\"tuiHint\", texts_r3.quote);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-edit-link\", 27, 3);\n i0.ɵɵlistener(\"addLink\", function TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_ng_template_4_Template_tui_edit_link_addLink_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n i0.ɵɵnextContext();\n const link_r6 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onLink(link_r6, $event));\n })(\"removeLink\", function TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_ng_template_4_Template_tui_edit_link_removeLink_0_listener() {\n i0.ɵɵrestoreView(_r5);\n i0.ɵɵnextContext();\n const link_r6 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onLink(link_r6));\n });\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 25, 1);\n i0.ɵɵelement(2, \"button\", 26, 0);\n i0.ɵɵtemplate(4, TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_ng_template_4_Template, 2, 0, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const link_r6 = i0.ɵɵreference(1);\n const linkDropdown_r7 = i0.ɵɵreference(5);\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"canOpen\", ctx_r1.canOpenAnchor)(\"content\", linkDropdown_r7);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", link_r6.open)(\"icon\", ctx_r1.options.icons.link)(\"pseudoActive\", link_r6.open || ctx_r1.a)(\"tuiHint\", texts_r3.link);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r8 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-edit-link\", 30);\n i0.ɵɵlistener(\"addLink\", function TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_ng_template_3_Template_tui_edit_link_addLink_0_listener($event) {\n i0.ɵɵrestoreView(_r8);\n i0.ɵɵnextContext();\n const anchor_r9 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.setAnchor(anchor_r9, $event));\n })(\"removeLink\", function TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_ng_template_3_Template_tui_edit_link_removeLink_0_listener() {\n i0.ɵɵrestoreView(_r8);\n const ctx_r1 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r1.removeAnchor());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"anchorMode\", true);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 28, 4);\n i0.ɵɵelement(2, \"button\", 29);\n i0.ɵɵtemplate(3, TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_ng_template_3_Template, 1, 1, \"ng-template\", null, 5, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const anchor_r9 = i0.ɵɵreference(1);\n const anchorDropdown_r10 = i0.ɵɵreference(4);\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"canOpen\", ctx_r1.canOpenAnchor)(\"content\", anchorDropdown_r10);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.anchor)(\"pseudoActive\", anchor_r9.open || ctx_r1.jumpAnchor)(\"tuiHint\", texts_r3.insertAnchor);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_ng_container_7_Template(rf, ctx) {\n if (rf & 1) {\n const _r11 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"button\", 31, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_3_ng_container_7_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r11);\n const fileUpload_r12 = i0.ɵɵreference(4);\n return i0.ɵɵresetView(fileUpload_r12.click());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"input\", 32, 6);\n i0.ɵɵlistener(\"change\", function TuiToolbarComponent_section_5_div_3_ng_container_7_Template_input_change_3_listener() {\n i0.ɵɵrestoreView(_r11);\n const fileUpload_r12 = i0.ɵɵreference(4);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onAttach(fileUpload_r12));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.attach)(\"tuiHint\", texts_r3.attach);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"accept\", ctx_r1.attachOptions.accept)(\"multiple\", ctx_r1.attachOptions.multiple)(\"tuiFocusable\", false);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵtemplate(1, TuiToolbarComponent_section_5_div_3_tui_font_style_1_Template, 1, 1, \"tui-font-style\", 18)(2, TuiToolbarComponent_section_5_div_3_tui_align_content_2_Template, 1, 0, \"tui-align-content\", 19)(3, TuiToolbarComponent_section_5_div_3_tui_list_configs_3_Template, 1, 0, \"tui-list-configs\", 19)(4, TuiToolbarComponent_section_5_div_3_button_4_Template, 2, 5, \"button\", 20)(5, TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_Template, 6, 6, \"tui-hosted-dropdown\", 21)(6, TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_Template, 5, 6, \"tui-hosted-dropdown\", 22)(7, TuiToolbarComponent_section_5_div_3_ng_container_7_Template, 5, 6, \"ng-container\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.formatEnabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Align));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.List));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Quote));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Link));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Anchor));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Attach));\n }\n}\nfunction TuiToolbarComponent_section_5_div_4_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r13 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 34, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_4_button_1_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r13);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.toggleSubscript());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.sub)(\"pseudoActive\", ctx_r1.subscript)(\"tuiHint\", texts_r3.subscript);\n }\n}\nfunction TuiToolbarComponent_section_5_div_4_button_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r14 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 34, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_4_button_2_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r14);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.toggleSuperscript());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.sup)(\"pseudoActive\", ctx_r1.superscript)(\"tuiHint\", texts_r3.superscript);\n }\n}\nfunction TuiToolbarComponent_section_5_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵtemplate(1, TuiToolbarComponent_section_5_div_4_button_1_Template, 2, 4, \"button\", 33)(2, TuiToolbarComponent_section_5_div_4_button_2_Template, 2, 4, \"button\", 33);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Sub));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Sup));\n }\n}\nfunction TuiToolbarComponent_section_5_div_5_tui_text_color_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-text-color\", 36);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"colors\", ctx_r1.colors);\n }\n}\nfunction TuiToolbarComponent_section_5_div_5_tui_highlight_color_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-highlight-color\", 36);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"colors\", ctx_r1.colors);\n }\n}\nfunction TuiToolbarComponent_section_5_div_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵtemplate(1, TuiToolbarComponent_section_5_div_5_tui_text_color_1_Template, 1, 1, \"tui-text-color\", 35)(2, TuiToolbarComponent_section_5_div_5_tui_highlight_color_2_Template, 1, 1, \"tui-highlight-color\", 35);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Color));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Hilite));\n }\n}\nfunction TuiToolbarComponent_section_5_div_6_tui_code_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-code\", 17);\n }\n}\nfunction TuiToolbarComponent_section_5_div_6_button_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r15 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 40, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_6_button_2_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r15);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onTeX());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.tex)(\"tuiHint\", texts_r3.tex);\n }\n}\nfunction TuiToolbarComponent_section_5_div_6_div_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r16 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 41)(1, \"button\", 42, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_6_div_3_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r16);\n const image_r17 = i0.ɵɵreference(4);\n return i0.ɵɵresetView(image_r17.click());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"input\", 43, 7);\n i0.ɵɵlistener(\"change\", function TuiToolbarComponent_section_5_div_6_div_3_Template_input_change_3_listener() {\n i0.ɵɵrestoreView(_r16);\n const image_r17 = i0.ɵɵreference(4);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onImage(image_r17));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.image)(\"tuiHint\", texts_r3.image);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"tuiFocusable\", false);\n }\n}\nfunction TuiToolbarComponent_section_5_div_6_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r18 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 31, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_6_button_4_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r18);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.insertHorizontalRule());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.hr)(\"tuiHint\", texts_r3.insertHorizontalRule);\n }\n}\nfunction TuiToolbarComponent_section_5_div_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵtemplate(1, TuiToolbarComponent_section_5_div_6_tui_code_1_Template, 1, 0, \"tui-code\", 19)(2, TuiToolbarComponent_section_5_div_6_button_2_Template, 2, 3, \"button\", 37)(3, TuiToolbarComponent_section_5_div_6_div_3_Template, 5, 4, \"div\", 38)(4, TuiToolbarComponent_section_5_div_6_button_4_Template, 2, 3, \"button\", 39);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Code));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Tex));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Img));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.HR));\n }\n}\nfunction TuiToolbarComponent_section_5_div_7_Template(rf, ctx) {\n if (rf & 1) {\n const _r19 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 14)(1, \"button\", 31, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_7_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r19);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.removeFormat());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.clear)(\"tuiHint\", texts_r3.clear);\n }\n}\nfunction TuiToolbarComponent_section_5_div_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵelement(1, \"tui-details\", 44)(2, \"tui-details-remove\", 44);\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiToolbarComponent_section_5_div_9_tui_table_cell_color_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-table-cell-color\", 36);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"colors\", ctx_r1.colors);\n }\n}\nfunction TuiToolbarComponent_section_5_div_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵelement(1, \"tui-editor-group-tool\", 44);\n i0.ɵɵtemplate(2, TuiToolbarComponent_section_5_div_9_tui_table_cell_color_2_Template, 1, 1, \"tui-table-cell-color\", 35);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !ctx_r1.enabled(ctx_r1.editorTool.Table));\n }\n}\nfunction TuiToolbarComponent_section_5_div_10_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵelement(1, \"tui-table-create\", 44)(2, \"tui-table-row-column-manager\", 44)(3, \"tui-table-merge-cells\", 44)(4, \"tui-table-cell-color\", 36);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"colors\", ctx_r1.colors);\n }\n}\nfunction TuiToolbarComponent_section_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"section\", 12);\n i0.ɵɵtemplate(1, TuiToolbarComponent_section_5_div_1_Template, 3, 8, \"div\", 13)(2, TuiToolbarComponent_section_5_div_2_Template, 2, 0, \"div\", 13)(3, TuiToolbarComponent_section_5_div_3_Template, 8, 7, \"div\", 13)(4, TuiToolbarComponent_section_5_div_4_Template, 3, 2, \"div\", 13)(5, TuiToolbarComponent_section_5_div_5_Template, 3, 2, \"div\", 13)(6, TuiToolbarComponent_section_5_div_6_Template, 5, 4, \"div\", 13)(7, TuiToolbarComponent_section_5_div_7_Template, 3, 3, \"div\", 13)(8, TuiToolbarComponent_section_5_div_8_Template, 3, 0, \"div\", 13)(9, TuiToolbarComponent_section_5_div_9_Template, 3, 1, \"div\", 13)(10, TuiToolbarComponent_section_5_div_10_Template, 5, 1, \"div\", 13);\n i0.ɵɵelementStart(11, \"div\", 14);\n i0.ɵɵprojection(12);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Undo));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Size));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.firstBigBlockEnabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Sub) || ctx_r1.enabled(ctx_r1.editorTool.Sup));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Color) || ctx_r1.enabled(ctx_r1.editorTool.Hilite));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.secondBigBlockEnabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Clear));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Details));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Group));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Table));\n }\n}\nlet TuiToolbarNavigationManagerDirective = /*#__PURE__*/(() => {\n class TuiToolbarNavigationManagerDirective {\n constructor(el) {\n this.el = el;\n }\n get toolsContainers() {\n return Array.from(this.el.nativeElement.querySelectorAll('[tuiItem]'));\n }\n onHorizontalNavigation(toPrevious) {\n const {\n toolsContainers\n } = this;\n const focusedToolIndex = toolsContainers.findIndex(tuiIsNativeFocusedIn);\n const targetToolIndex = tuiClamp(focusedToolIndex + (toPrevious ? -1 : 1), 0, toolsContainers.length - 1);\n const targetToolWrapper = toolsContainers[targetToolIndex];\n const targetTool = toPrevious ? this.findPreviousTool(targetToolWrapper) : this.findNextTool(targetToolWrapper);\n if (targetTool) {\n targetTool.focus();\n }\n }\n findFirstFocusableTool(reversed = false) {\n const tools = reversed ? this.toolsContainers.slice().reverse() : this.toolsContainers;\n for (const el of tools) {\n const focusableElement = tuiIsNativeMouseFocusable(el) ? el : tuiGetClosestFocusable({\n initial: el,\n root: el,\n keyboard: false\n });\n if (focusableElement) {\n return focusableElement;\n }\n }\n return null;\n }\n findPreviousTool(wrapper) {\n if (tuiIsNativeMouseFocusable(wrapper)) {\n return wrapper;\n }\n const lookedInside = tuiGetClosestFocusable({\n initial: wrapper,\n root: wrapper,\n keyboard: false\n });\n return lookedInside || tuiGetClosestFocusable({\n initial: wrapper,\n root: this.el.nativeElement,\n previous: true,\n keyboard: false\n });\n }\n findNextTool(wrapper) {\n return tuiIsNativeMouseFocusable(wrapper) ? wrapper : tuiGetClosestFocusable({\n initial: wrapper,\n root: this.el.nativeElement,\n keyboard: false\n });\n }\n }\n TuiToolbarNavigationManagerDirective.ɵfac = function TuiToolbarNavigationManagerDirective_Factory(t) {\n return new (t || TuiToolbarNavigationManagerDirective)(i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiToolbarNavigationManagerDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiToolbarNavigationManagerDirective,\n selectors: [[\"\", \"tuiToolbarNavigationManager\", \"\"]],\n hostBindings: function TuiToolbarNavigationManagerDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"keydown.arrowRight.prevent\", function TuiToolbarNavigationManagerDirective_keydown_arrowRight_prevent_HostBindingHandler() {\n return ctx.onHorizontalNavigation(false);\n })(\"keydown.arrowLeft.prevent\", function TuiToolbarNavigationManagerDirective_keydown_arrowLeft_prevent_HostBindingHandler() {\n return ctx.onHorizontalNavigation(true);\n });\n }\n }\n });\n return TuiToolbarNavigationManagerDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiToolbarComponent = /*#__PURE__*/(() => {\n class TuiToolbarComponent {\n constructor(el, editor, imageLoader, attachOptions, filesLoader, texts$, options, destroy$) {\n this.el = el;\n this.editor = editor;\n this.imageLoader = imageLoader;\n this.attachOptions = attachOptions;\n this.filesLoader = filesLoader;\n this.texts$ = texts$;\n this.options = options;\n this.destroy$ = destroy$;\n this.dropdowns = EMPTY_QUERY;\n this.colors = this.options.colors;\n this.disabled = false;\n this.linkAdded = new EventEmitter();\n this.texClicked = new EventEmitter();\n this.fileAttached = new EventEmitter();\n this.editorTool = TuiEditorTool;\n this.toolsSet = new Set(defaultEditorTools);\n }\n set tools(value) {\n this.toolsSet = new Set(value);\n }\n get focused() {\n return tuiIsNativeFocusedIn(this.el.nativeElement) || !!this.dropdowns.find(({\n nativeElement\n }) => tuiIsNativeFocusedIn(nativeElement));\n }\n get focusable() {\n return !this.focused && !this.disabled;\n }\n get unorderedList() {\n return this.editor.isActive('bulletList');\n }\n get orderedList() {\n return this.editor.isActive('orderedList');\n }\n get blockquote() {\n return this.editor.isActive('blockquote');\n }\n get a() {\n return this.editor.isActive('link');\n }\n get jumpAnchor() {\n return this.editor.isActive('jumpAnchor');\n }\n get canOpenAnchor() {\n return !this.a && !this.jumpAnchor;\n }\n get undoDisabled() {\n return this.editor.undoDisabled();\n }\n get redoDisabled() {\n return this.editor.redoDisabled();\n }\n get subscript() {\n return this.editor.isActive('subscript');\n }\n get superscript() {\n return this.editor.isActive('superscript');\n }\n get formatEnabled() {\n return this.enabled(TuiEditorTool.Bold) || this.enabled(TuiEditorTool.Italic) || this.enabled(TuiEditorTool.Underline) || this.enabled(TuiEditorTool.Strikethrough);\n }\n get firstBigBlockEnabled() {\n return this.formatEnabled || this.enabled(TuiEditorTool.Align) || this.enabled(TuiEditorTool.List) || this.enabled(TuiEditorTool.Quote) || this.enabled(TuiEditorTool.Link) || this.enabled(TuiEditorTool.Anchor) || this.enabled(TuiEditorTool.Attach);\n }\n get secondBigBlockEnabled() {\n return this.enabled(TuiEditorTool.Code) || this.enabled(TuiEditorTool.Tex) || this.enabled(TuiEditorTool.Img) || this.enabled(TuiEditorTool.HR);\n }\n onMouseDown(event, target) {\n if (target.closest('button')) {\n return;\n }\n event.preventDefault();\n this.editor.focus();\n }\n onBottomFocus() {\n this.focusLast();\n }\n onTopFocus() {\n this.focusFirst();\n }\n onImage(input) {\n var _a;\n const file = (_a = input.files) === null || _a === void 0 ? void 0 : _a[0];\n input.value = '';\n if (!file) {\n return;\n }\n this.imageLoader(file).pipe(take(1), takeUntil(this.destroy$)).subscribe(image => this.addImage(image));\n }\n onAttach(input) {\n var _a;\n const files = Array.from(input.files || []);\n input.value = '';\n if (!files) {\n return;\n }\n ngDevMode && tuiAssert.assert(!!this.filesLoader, 'Please provide TUI_ATTACH_FILES_LOADER');\n (_a = this.filesLoader) === null || _a === void 0 ? void 0 : _a.call(this, files).pipe(take(1), takeUntil(this.destroy$)).subscribe(attachedFiles => this.fileAttached.emit(attachedFiles));\n }\n onTeX() {\n this.texClicked.emit();\n }\n onLink(hosted, url) {\n hosted.open = false;\n if (url) {\n this.editor.toggleLink(url);\n }\n }\n setAnchor(hosted, anchor) {\n hosted.open = false;\n if (anchor) {\n this.editor.setAnchor(anchor);\n this.editor.selectClosest();\n }\n }\n removeAnchor() {\n this.editor.removeAnchor();\n }\n enabled(tool) {\n return this.toolsSet.has(tool);\n }\n undo() {\n this.editor.undo();\n }\n redo() {\n this.editor.redo();\n }\n insertHorizontalRule() {\n this.editor.setHorizontalRule();\n }\n removeFormat() {\n this.editor.removeFormat();\n }\n toggleOrderedList() {\n this.editor.toggleOrderedList();\n }\n toggleQuote() {\n this.editor.toggleBlockquote();\n }\n toggleSubscript() {\n this.editor.toggleSubscript();\n }\n toggleSuperscript() {\n this.editor.toggleSuperscript();\n }\n addImage(image) {\n this.editor.setImage(image);\n }\n focusFirst() {\n var _a;\n const firstButton = (_a = this.navigationManager) === null || _a === void 0 ? void 0 : _a.findFirstFocusableTool();\n if (firstButton) {\n firstButton.focus();\n }\n }\n focusLast() {\n var _a;\n const lastButton = (_a = this.navigationManager) === null || _a === void 0 ? void 0 : _a.findFirstFocusableTool(true);\n if (lastButton) {\n lastButton.focus();\n }\n }\n }\n TuiToolbarComponent.ɵfac = function TuiToolbarComponent_Factory(t) {\n return new (t || TuiToolbarComponent)(i0.ɵɵdirectiveInject(ElementRef, 8), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_IMAGE_LOADER), i0.ɵɵdirectiveInject(TUI_ATTACH_FILES_OPTIONS), i0.ɵɵdirectiveInject(TUI_ATTACH_FILES_LOADER, 8), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiToolbarComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiToolbarComponent,\n selectors: [[\"tui-toolbar\"]],\n viewQuery: function TuiToolbarComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TuiToolbarNavigationManagerDirective, 5);\n i0.ɵɵviewQuery(_c0, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.navigationManager = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dropdowns = _t);\n }\n },\n hostAttrs: [\"role\", \"toolbar\"],\n hostVars: 2,\n hostBindings: function TuiToolbarComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mousedown\", function TuiToolbarComponent_mousedown_HostBindingHandler($event) {\n return ctx.onMouseDown($event, $event.target);\n });\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"_disabled\", ctx.disabled);\n }\n },\n inputs: {\n colors: \"colors\",\n disabled: \"disabled\",\n tools: \"tools\"\n },\n outputs: {\n linkAdded: \"linkAdded\",\n texClicked: \"texClicked\",\n fileAttached: \"fileAttached\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])],\n ngContentSelectors: _c1,\n decls: 7,\n vars: 8,\n consts: [[\"button\", \"\"], [\"link\", \"\"], [\"linkDropdown\", \"\"], [\"dropdown\", \"\"], [\"anchor\", \"\"], [\"anchorDropdown\", \"\"], [\"fileUpload\", \"\"], [\"image\", \"\"], [\"type\", \"button\", 1, \"t-prevent-parent-label-behavior\"], [4, \"ngIf\"], [3, \"focus\", \"tuiFocusable\"], [\"tuiToolbarNavigationManager\", \"\", \"class\", \"t-tools-wrapper\", 4, \"ngIf\"], [\"tuiToolbarNavigationManager\", \"\", 1, \"t-tools-wrapper\"], [\"class\", \"t-block\", 4, \"ngIf\"], [1, \"t-block\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__undo-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", \"t-tool_margin\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"tuiHint\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__redo-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", \"t-tool_margin\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"tuiHint\"], [\"tuiItem\", \"\", 1, \"t-tool\", \"t-wrapper\"], [\"tuiItem\", \"\", \"class\", \"t-tool t-wrapper\", 3, \"enabledTools\", 4, \"ngIf\"], [\"tuiItem\", \"\", \"class\", \"t-tool t-wrapper\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__quote-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", \"class\", \"t-tool t-tool_margin\", 3, \"disabled\", \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"tuiItem\", \"\", \"class\", \"t-wrapper\", 3, \"canOpen\", \"content\", 4, \"ngIf\"], [\"class\", \"t-wrapper\", 3, \"canOpen\", \"content\", 4, \"ngIf\"], [\"tuiItem\", \"\", 1, \"t-tool\", \"t-wrapper\", 3, \"enabledTools\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__quote-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", \"t-tool_margin\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"tuiItem\", \"\", 1, \"t-wrapper\", 3, \"canOpen\", \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__link-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-tool\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [3, \"addLink\", \"removeLink\"], [1, \"t-wrapper\", 3, \"canOpen\", \"content\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [3, \"addLink\", \"removeLink\", \"anchorMode\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", \"t-tool_margin\", 3, \"click\", \"focusable\", \"icon\", \"tuiHint\"], [\"type\", \"file\", 1, \"t-file-upload\", 3, \"change\", \"accept\", \"multiple\", \"tuiFocusable\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", \"class\", \"t-tool t-tool_margin\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", \"t-tool_margin\", 3, \"click\", \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"tuiItem\", \"\", \"class\", \"t-tool t-wrapper\", 3, \"colors\", 4, \"ngIf\"], [\"tuiItem\", \"\", 1, \"t-tool\", \"t-wrapper\", 3, \"colors\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", \"class\", \"t-tool\", 3, \"focusable\", \"icon\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"tuiItem\", \"\", \"class\", \"t-wrapper\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", \"class\", \"t-tool t-tool_margin\", 3, \"focusable\", \"icon\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", 3, \"click\", \"focusable\", \"icon\", \"tuiHint\"], [\"tuiItem\", \"\", 1, \"t-wrapper\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-tool\", 3, \"click\", \"focusable\", \"icon\", \"tuiHint\"], [\"accept\", \"image/*\", \"type\", \"file\", 1, \"t-image\", 3, \"change\", \"tuiFocusable\"], [\"tuiItem\", \"\", 1, \"t-tool\", \"t-tool_margin\"]],\n template: function TuiToolbarComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelement(0, \"button\", 8);\n i0.ɵɵtemplate(1, TuiToolbarComponent_ng_container_1_Template, 1, 0, \"ng-container\", 9);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementStart(3, \"div\", 10);\n i0.ɵɵlistener(\"focus\", function TuiToolbarComponent_Template_div_focus_3_listener() {\n return ctx.onTopFocus();\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"div\", 10);\n i0.ɵɵlistener(\"focus\", function TuiToolbarComponent_Template_div_focus_4_listener() {\n return ctx.onBottomFocus();\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(5, TuiToolbarComponent_section_5_Template, 13, 10, \"section\", 11);\n i0.ɵɵpipe(6, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(2, 4, ctx.editor.stateChange$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"tuiFocusable\", ctx.focusable);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tuiFocusable\", ctx.focusable);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(6, 6, ctx.texts$));\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.TuiFontSizeComponent, i2.TuiFontStyleComponent, i2.TuiAlignContentComponent, i2.TuiListConfigsComponent, i1.TuiHostedDropdownComponent, i3.TuiEditLinkComponent, i2.TuiTextColorComponent, i2.TuiHighlightColorComponent, i2.TuiCodeComponent, i2.TuiDetailsComponent, i2.TuiDetailsRemoveComponent, i2.TuiEditorGroupToolComponent, i2.TuiTableCellColorComponent, i2.TuiTableCreateComponent, i2.TuiTableRowColumnManagerComponent, i2.TuiTableMergeCellsComponent, i4.NgIf, i5.TuiFocusableDirective, TuiToolbarNavigationManagerDirective, i1.TuiHintDescribeDirective, i5.TuiItemDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i4.AsyncPipe],\n styles: [\".t-tools-wrapper[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none;position:-webkit-sticky;position:sticky;top:0;display:flex;padding:.25rem .75rem;overflow:auto;flex-wrap:wrap;box-shadow:0 .125rem .1875rem #0000001a}.t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar, .t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{display:none}.t-tools-wrapper._disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-block[_ngcontent-%COMP%]{display:flex;padding:.25rem 0}.t-block[_ngcontent-%COMP%]:not(:last-child):after{content:\\\"\\\";display:block;margin:0 .25rem;width:1px;background:var(--tui-secondary-active)}.t-tool[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}button.t-tool[_ngcontent-%COMP%]:hover, .t-tool[_ngcontent-%COMP%] button:hover{background:var(--tui-secondary-hover)}.t-tool_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-font[_ngcontent-%COMP%]{padding:.3em 0;outline:none;width:100%;pointer-events:none}.t-image[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;font-size:0;opacity:0;cursor:pointer}.t-image[_ngcontent-%COMP%]::-webkit-file-upload-button{display:none}.t-file-upload[_ngcontent-%COMP%]{display:none}.t-color-picker[_ngcontent-%COMP%] tui-hosted-dropdown, .t-color-picker[_ngcontent-%COMP%] tui-color-picker, .t-color-picker[_ngcontent-%COMP%] tui-color-edit{display:none}.t-prevent-parent-label-behavior[_ngcontent-%COMP%]{display:none}\"],\n changeDetection: 0\n });\n return TuiToolbarComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiToolbarModule = /*#__PURE__*/(() => {\n class TuiToolbarModule {}\n TuiToolbarModule.ɵfac = function TuiToolbarModule_Factory(t) {\n return new (t || TuiToolbarModule)();\n };\n TuiToolbarModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiToolbarModule\n });\n TuiToolbarModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHintModule, TuiFocusableModule, TuiButtonModule, TuiHostedDropdownModule, TuiEditLinkModule, TuiTableMergeCellsModule, TuiTableCellColorModule, TuiTableRowColumnManagerModule, TuiTableCreateModule, TuiFontSizeModule, TuiFontStyleModule, TuiAlignContentModule, TuiListConfigsModule, TuiTextColorModule, TuiHighlightColorModule, TuiCodeModule, TuiDetailsModule, TuiItemModule, TuiEditorToolGroup]]\n });\n return TuiToolbarModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiToolbarComponent, TuiToolbarModule, TuiToolbarNavigationManagerDirective };\n","import { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { SecurityContext, ElementRef, Renderer2, Sanitizer, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Optional, Input, HostListener, NgModule } from '@angular/core';\nimport { tuiIsElement } from '@taiga-ui/cdk';\nimport { TUI_SANITIZER } from '@taiga-ui/core';\nimport * as i1 from '@tinkoff/tui-editor/directives/tiptap-editor';\nimport { TuiTiptapEditorDirective } from '@tinkoff/tui-editor/directives/tiptap-editor';\nimport { TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nlet TuiEditorSocketComponent = /*#__PURE__*/(() => {\n class TuiEditorSocketComponent {\n constructor(el, renderer, sanitizer, tuiSanitizer, document, editor, options) {\n this.el = el;\n this.renderer = renderer;\n this.sanitizer = sanitizer;\n this.tuiSanitizer = tuiSanitizer;\n this.document = document;\n this.editor = editor;\n this.options = options;\n }\n set content(content) {\n var _a;\n this.renderer.setProperty(this.el.nativeElement, 'innerHTML', this.tuiSanitizer ? this.tuiSanitizer.sanitize(SecurityContext.HTML, (_a = content === null || content === void 0 ? void 0 : content.replace(/colwidth/g, 'width')) !== null && _a !== void 0 ? _a : '') : this.sanitizer.sanitize(SecurityContext.HTML, content !== null && content !== void 0 ? content : ''));\n }\n /**\n * @description:\n * the main problem is that the external environment editor can use different base href=\"../\"\n * More information: https://rogerkeays.com/blog/using-base-href-with-anchors\n */\n click(event) {\n var _a, _b;\n if (this.editor || !tuiIsElement(event.target)) {\n return;\n }\n const href = ((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest('a')) === null || _b === void 0 ? void 0 : _b.getAttribute('href')) || '';\n if (!href.startsWith('#')) {\n return;\n }\n this.document.location.hash = href.replace('#', '');\n event.preventDefault();\n }\n }\n TuiEditorSocketComponent.ɵfac = function TuiEditorSocketComponent_Factory(t) {\n return new (t || TuiEditorSocketComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(Renderer2), i0.ɵɵdirectiveInject(Sanitizer), i0.ɵɵdirectiveInject(TUI_SANITIZER, 8), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(TuiTiptapEditorDirective, 8), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS));\n };\n TuiEditorSocketComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiEditorSocketComponent,\n selectors: [[\"tui-editor-socket\"]],\n hostVars: 2,\n hostBindings: function TuiEditorSocketComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function TuiEditorSocketComponent_click_HostBindingHandler($event) {\n return ctx.click($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"tui-editor-socket\", ctx.options.enableDefaultStyles);\n }\n },\n inputs: {\n content: \"content\"\n },\n decls: 0,\n vars: 0,\n template: function TuiEditorSocketComponent_Template(rf, ctx) {},\n styles: [\".tui-editor-socket{display:block;margin:0;color:var(--tui-text-01);font:var(--tui-font-text-m)}.tui-editor-socket[tuiTiptapEditor]{overflow:hidden}.tui-editor-socket .ProseMirror{min-height:5.375rem;padding:.2rem 1rem;outline:none;white-space:pre-wrap}.tui-editor-socket .resize-cursor{cursor:ew-resize;cursor:col-resize}.tui-editor-socket h1,.tui-editor-socket h2,.tui-editor-socket h3,.tui-editor-socket h4,.tui-editor-socket h5,.tui-editor-socket h6{word-break:break-word;line-height:normal}.tui-editor-socket h1:first-child,.tui-editor-socket h2:first-child,.tui-editor-socket p:last-child{margin-bottom:0}.tui-editor-socket p:last-child,.tui-editor-socket pre:last-child{margin-bottom:0}.tui-editor-socket p:empty:after{content:\\\" \\\";white-space:pre}.tui-editor-socket p:first-child{margin-top:0;min-width:1px}.tui-editor-socket p{margin:1rem 0}.tui-editor-socket p>span{line-height:initial}.tui-editor-socket blockquote{margin:1.25rem 0 1.25rem 1.5rem;padding-left:1.0625rem;border-left:1px solid var(--tui-base-04)}.tui-editor-socket hr{border:none;border-top:1px solid var(--tui-base-03);margin:1rem 0}.tui-editor-socket mark{background:unset;color:inherit}.tui-editor-socket font[face=\\\"Courier New\\\"]{display:inline-block;padding:.25rem .5rem;border-radius:.25rem;background-color:#ecf1f7;word-break:break-word}.tui-editor-socket a:not([data-type=\\\"jump-anchor\\\"]){color:var(--tui-link);text-decoration:none;outline:none}.tui-editor-socket a:not([data-type=\\\"jump-anchor\\\"]):hover{color:var(--tui-link-hover);text-decoration:underline}.tui-editor-socket a:not([data-type=\\\"jump-anchor\\\"]):active{color:var(--tui-primary-active)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]{text-decoration:underline;-webkit-text-decoration-color:var(--tui-link);text-decoration-color:var(--tui-link)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:before{content:\\\"#\\\"}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:hover{color:var(--tui-link)}.tui-editor-socket .ProseMirror a:hover img[contenteditable=false]{cursor:pointer;outline:.25rem solid var(--tui-link)}.tui-editor-socket ul:not([data-type]),.tui-editor-socket ol:not([data-type]){list-style-type:none;margin:1rem 1rem 1rem 1.5rem;padding:0}.tui-editor-socket ul:not([data-type]) li,.tui-editor-socket ol:not([data-type]) li{margin:.75rem 0}.tui-editor-socket ul:not([data-type]) li>p,.tui-editor-socket ol:not([data-type]) li>p{display:inline;margin:0 auto;word-break:break-word}.tui-editor-socket ul:not([data-type]) li:before,.tui-editor-socket ol:not([data-type]) li:before{unicode-bidi:-webkit-isolate;unicode-bidi:isolate;font-feature-settings:\\\"tnum\\\";font-variant-numeric:tabular-nums;text-transform:none;text-indent:0;text-align:start;text-align-last:start}.tui-editor-socket ul:not([data-type]) li>p{display:block}.tui-editor-socket ul:not([data-type])>li:before{content:\\\"\\\";display:inline-block;width:.5rem;height:.5rem;border-radius:100%;margin:.5rem .875rem .0625rem -1.375rem;background-color:var(--tui-primary);vertical-align:top;box-sizing:border-box;float:left}.tui-editor-socket li ul:not([data-type])>li:before{background:none;border:.125rem solid var(--tui-primary)}.tui-editor-socket li ul:not([data-type])>li>ul:not([data-type])>li:before{background:var(--tui-primary);border-radius:0;width:.375rem;height:.375rem}.tui-editor-socket ol:not([data-type]){counter-reset:item}.tui-editor-socket ol:not([data-type])>li:before{content:counters(item,\\\".\\\") \\\".\\\";display:block;counter-increment:item;margin:0 .75rem 0 -1.5rem;color:var(--tui-base-05);vertical-align:top;float:left;white-space:nowrap}.tui-editor-socket [data-type=details-content] ol{counter-reset:details-item}.tui-editor-socket [data-type=details-content] ol:not([data-type])>li:before{content:counters(details-item,\\\".\\\") \\\".\\\";counter-increment:details-item}.tui-editor-socket [data-type=details-content] ol [data-type=details-content] ol{counter-reset:details-item2}.tui-editor-socket [data-type=details-content] ol:not([data-type])>li [data-type=details-content] ol:not([data-type])>li:before{content:counters(details-item2,\\\".\\\") \\\".\\\";counter-increment:details-item2}.tui-editor-socket ul[data-type] li[data-checked]{display:flex;grid-gap:.5rem;gap:.5rem}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]{position:relative;width:var(--t-size, 1rem);height:var(--t-size, 1rem);border-radius:var(--tui-radius-xs, .25rem);transition-property:color,background,opacity,box-shadow,border;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:.125rem solid transparent;outline-offset:-.125rem;margin-top:.25rem;cursor:pointer}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]:before{content:\\\"\\\";position:absolute;top:0;left:0;width:100%;height:100%;background:currentColor;-webkit-mask:url('data:image/svg+xml,') center / 100%;mask:url('data:image/svg+xml,') center / 100%;transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out,-webkit-mask 0s var(--tui-duration) ease-in-out}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked{background:var(--tui-primary, #526ed3);color:var(--tui-primary-text, #fff)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked:before{-webkit-mask-image:url('data:image/svg+xml,');mask-image:url('data:image/svg+xml,');transform:scale(1)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]{box-shadow:inset 0 0 0 1px var(--tui-base-04);color:var(--tui-text-01)}.tui-editor-socket._preview-image img{cursor:pointer}.tui-editor-socket .ProseMirror video,.tui-editor-socket .ProseMirror audio{pointer-events:none}.tui-editor-socket img.ProseMirror-selectednode{outline:.25rem solid var(--tui-primary-hover)}.tui-editor-socket .t-editor-placeholder:before{content:attr(data-placeholder);float:left;color:var(--tui-base-05);pointer-events:none;height:0}.tui-editor-socket table{border-collapse:collapse;table-layout:unset;width:100%;margin:0;overflow:hidden}.tui-editor-socket table .tableWrapper{overflow-x:auto}.tui-editor-socket .tableWrapper,.tui-editor-socket .tui-table-wrapper{overflow-x:auto}.tui-editor-socket table td{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word}.tui-editor-socket table th{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word;font-weight:bold;text-align:left;background-color:var(--tui-base-02);min-height:2rem}.tui-editor-socket table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:-2px;width:4px;background-color:#adf;pointer-events:none}.tui-editor-socket table td>*{margin-top:0;margin-bottom:0}.tui-editor-socket table th>*{margin-top:0;margin-bottom:0}.tui-editor-socket .selectedCell:after{content:\\\"\\\";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--tui-selection);pointer-events:none}.tui-editor-socket summary{display:flex;align-items:center;min-height:3.5rem;width:100%;padding:0 1.25rem;box-sizing:border-box;border-radius:var(--tui-radius-l);pointer-events:none;outline:none}.tui-editor-socket summary:focus-visible{outline:2px solid var(--tui-link)}.tui-editor-socket summary p{min-width:1px;margin:0}.tui-editor-socket summary::-webkit-details-marker{display:none}.tui-editor-socket details[open] summary{border-radius:var(--tui-radius-l) var(--tui-radius-l) 0 0}.tui-editor-socket .details-arrow,.tui-editor-socket .t-details-arrow{position:absolute;top:1.5rem;right:1.25rem;height:.575rem;width:.575rem;border:1px solid var(--tui-base-06);border-width:0 2px 2px 0;transform:rotate(45deg);transition:var(--tui-duration, .3s);-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;padding:0;background:none;cursor:pointer;outline:none}.tui-editor-socket details{width:100%;border:1px solid var(--tui-base-04);border-radius:var(--tui-radius-l)}.tui-editor-socket div[data-type=details-content]{padding:1.25rem;min-height:3rem;border:1px solid var(--tui-base-04);border-width:1px 0 0}.tui-editor-socket div[data-type=details-content] h1:first-child,.tui-editor-socket div[data-type=details-content] h2:first-child,.tui-editor-socket div[data-type=details-content] pre:first-child,.tui-editor-socket div[data-type=details-content] ul:first-child,.tui-editor-socket div[data-type=details-content] ol:first-child,.tui-editor-socket div[data-type=details-content] ol li:first-child,.tui-editor-socket div[data-type=details-content] ul li:first-child{margin-top:0}.tui-editor-socket .details-wrapper,.tui-editor-socket .t-details-wrapper{margin-bottom:.5rem;position:relative;display:flex}.tui-editor-socket .details-wrapper_rendered .details-arrow,.tui-editor-socket .t-details-wrapper_rendered .details-arrow,.tui-editor-socket .details-wrapper_rendered .t-details-arrow,.tui-editor-socket .t-details-wrapper_rendered .t-details-arrow{pointer-events:none}.tui-editor-socket .details-wrapper_rendered summary,.tui-editor-socket .t-details-wrapper_rendered summary{transition:transform var(--tui-duration, .3s);cursor:pointer;pointer-events:auto}.tui-editor-socket .details-wrapper_rendered summary:hover,.tui-editor-socket .t-details-wrapper_rendered summary:hover{background:var(--tui-base-02)}.tui-editor-socket details[open]+.details-arrow,.tui-editor-socket details[open]+.t-details-arrow{top:1.75rem;transform:rotate(225deg)}.tui-editor-socket pre{white-space:pre-wrap;word-break:break-word;border-radius:.25rem;margin:1rem 0;padding:.75rem 1rem;font-family:Courier,monospace;color:var(--tui-text-02);background:var(--tui-base-02)}.tui-editor-socket .tui-group-node{display:flex;flex-direction:row}.tui-editor-socket .tui-group-node:hover>.tui-group-pointer{pointer-events:auto;opacity:1}.tui-editor-socket .tui-group-pointer{opacity:0;min-height:.8125rem;max-height:.8125rem;min-width:.8125rem;max-width:.8125rem;margin:.3125rem .3125rem 0 0;cursor:grab;background-image:url('data:image/svg+xml;charset=UTF-8,');background-repeat:no-repeat;background-size:contain;background-position:center}.tui-editor-socket [data-mode=onDark] .tui-group-pointer{background-image:url('data:image/svg+xml;charset=UTF-8,')}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiEditorSocketComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorSocketModule = /*#__PURE__*/(() => {\n class TuiEditorSocketModule {}\n TuiEditorSocketModule.ɵfac = function TuiEditorSocketModule_Factory(t) {\n return new (t || TuiEditorSocketModule)();\n };\n TuiEditorSocketModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiEditorSocketModule\n });\n TuiEditorSocketModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiEditorSocketModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiEditorSocketComponent, TuiEditorSocketModule };\n","import * as i0 from '@angular/core';\nimport { Directive, Input, Injectable, Renderer2, Component, ChangeDetectionStrategy, ElementRef, Inject, EventEmitter, ChangeDetectorRef, NgZone, Optional, Self, ViewChild, Output, NgModule } from '@angular/core';\nimport * as i7 from '@taiga-ui/cdk';\nimport { tuiIsTextNode, tuiIsElement, EMPTY_CLIENT_RECT, AbstractTuiPortalService, AbstractTuiPortalHostComponent, TuiDropdownPortalService, AbstractTuiControl, ALWAYS_TRUE_HANDLER, ALWAYS_FALSE_HANDLER, tuiZonefree, tuiAsFocusableItemAccessor, tuiAutoFocusOptionsProvider, TuiItemModule, TuiActiveZoneModule } from '@taiga-ui/cdk';\nimport * as i2 from '@taiga-ui/core';\nimport { TuiDropdownSelectionDirective, tuiGetWordRange, tuiAsDriver, tuiAsRectAccessor, TuiRectAccessor, tuiAsViewport, TUI_ANIMATIONS_DEFAULT_DURATION, TuiWrapperModule, TuiScrollbarModule, TuiDropdownModule } from '@taiga-ui/core';\nimport * as i12 from 'rxjs';\nimport { combineLatest, ReplaySubject, fromEvent } from 'rxjs';\nimport { map, distinctUntilChanged, take, shareReplay, delay, takeUntil, throttleTime } from 'rxjs/operators';\nimport * as i6 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i11 from '@angular/forms';\nimport { NgControl } from '@angular/forms';\nimport * as i1 from '@tinkoff/tui-editor/components/toolbar';\nimport { TuiToolbarComponent, TuiToolbarModule } from '@tinkoff/tui-editor/components/toolbar';\nimport { defaultEditorTools, TUI_EDITOR_RESIZE_EVENT } from '@tinkoff/tui-editor/constants';\nimport * as i10 from '@tinkoff/tui-editor/directives';\nimport { TuiTiptapEditorService, TuiTiptapEditorDirective, TuiTiptapEditorModule } from '@tinkoff/tui-editor/directives';\nimport { LAZY_EDITOR_EXTENSIONS, TUI_EDITOR_EXTENSIONS, INITIALIZATION_TIPTAP_CONTAINER, TIPTAP_EDITOR, LAZY_TIPTAP_EDITOR, TUI_EDITOR_CONTENT_PROCESSOR, TUI_EDITOR_VALUE_TRANSFORMER, TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport { tuiGetSelectionState, tuiIsSafeLinkRange } from '@tinkoff/tui-editor/utils';\nimport * as i4 from '@tinkoff/tui-editor/components/editor-socket';\nimport { TuiEditorSocketModule } from '@tinkoff/tui-editor/components/editor-socket';\nimport * as i5 from '@tinkoff/tui-editor/components/edit-link';\nimport { TuiEditLinkModule } from '@tinkoff/tui-editor/components/edit-link';\nimport * as i13 from '@tinkoff/tui-editor/abstract';\nconst _c0 = [\"*\", [[\"tools\"]], [[\"tools\"]], [[\"mention\"]]];\nconst _c1 = [\"*\", \"tools\", \"tools\", \"mention\"];\nfunction TuiEditorComponent_div_0_tui_toolbar_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-toolbar\", 10);\n i0.ɵɵlistener(\"fileAttached\", function TuiEditorComponent_div_0_tui_toolbar_2_Template_tui_toolbar_fileAttached_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.fileAttached.emit($event));\n });\n i0.ɵɵprojection(1, 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"disabled\", !ctx_r1.interactive)(\"tools\", ctx_r1.tools);\n }\n}\nfunction TuiEditorComponent_div_0_div_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 11);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.exampleText, \" \");\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-scrollbar\", 14);\n i0.ɵɵlistener(\"mousedown\", function TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_1_Template_tui_scrollbar_mousedown_0_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.focus($event));\n });\n i0.ɵɵelementContainer(1, 15);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const editor_r5 = i0.ɵɵreference(4);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", editor_r5);\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-scrollbar\", 16);\n i0.ɵɵlistener(\"mousedown\", function TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_2_Template_tui_scrollbar_mousedown_0_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.focus($event));\n });\n i0.ɵɵelementContainer(1, 15);\n i0.ɵɵelement(2, \"tui-editor-portal-host\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const editor_r5 = i0.ɵɵreference(4);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", editor_r5);\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_toolbar_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r8 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-toolbar\", 21);\n i0.ɵɵlistener(\"fileAttached\", function TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_toolbar_1_Template_tui_toolbar_fileAttached_0_listener($event) {\n i0.ɵɵrestoreView(_r8);\n const ctx_r1 = i0.ɵɵnextContext(5);\n return i0.ɵɵresetView(ctx_r1.fileAttached.emit($event));\n });\n i0.ɵɵprojection(1, 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const activeZone_r9 = i0.ɵɵnextContext().$implicit;\n const ctx_r1 = i0.ɵɵnextContext(4);\n i0.ɵɵproperty(\"disabled\", !ctx_r1.interactive)(\"tools\", ctx_r1.tools)(\"tuiActiveZoneParent\", activeZone_r9);\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_edit_link_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r10 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-edit-link\", 22, 2);\n i0.ɵɵlistener(\"addLink\", function TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_edit_link_2_Template_tui_edit_link_addLink_0_listener($event) {\n i0.ɵɵrestoreView(_r10);\n const link_r11 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext(5);\n return i0.ɵɵresetView(link_r11.anchorMode ? ctx_r1.addAnchor($event) : ctx_r1.addLink($event));\n })(\"removeLink\", function TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_edit_link_2_Template_tui_edit_link_removeLink_0_listener() {\n i0.ɵɵrestoreView(_r10);\n const link_r11 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext(5);\n return i0.ɵɵresetView(link_r11.anchorMode ? ctx_r1.removeAnchor() : ctx_r1.removeLink());\n });\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_ng_container_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵprojection(1, 3);\n i0.ɵɵelementContainerEnd();\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵtemplate(1, TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_toolbar_1_Template, 2, 3, \"tui-toolbar\", 19)(2, TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_edit_link_2_Template, 2, 0, \"tui-edit-link\", 20)(3, TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_ng_container_3_Template, 2, 0, \"ng-container\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const editorLoaded_r12 = i0.ɵɵnextContext(3).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-floating\", ctx_r1.floatingToolbar);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", editorLoaded_r12 && ctx_r1.floatingToolbar);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isLinkSelected);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isMentionMode);\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 17)(1, \"tui-editor-socket\", 18);\n i0.ɵɵlistener(\"stateChange\", function TuiEditorComponent_div_0_ng_container_6_ng_template_3_Template_tui_editor_socket_stateChange_1_listener() {\n i0.ɵɵrestoreView(_r7);\n return i0.ɵɵresetView(0);\n })(\"valueChange\", function TuiEditorComponent_div_0_ng_container_6_ng_template_3_Template_tui_editor_socket_valueChange_1_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onModelChange($event));\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵtemplate(2, TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_Template, 4, 5, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const dropdown_r13 = i0.ɵɵreference(3);\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"tuiDropdown\", dropdown_r13)(\"tuiToolbarDropdown\", ctx_r1.dropdownSelectionHandler)(\"tuiToolbarDropdownPosition\", ctx_r1.floatingToolbar ? \"selection\" : \"tag\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"editable\", ctx_r1.interactive)(\"value\", ctx_r1.value);\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_1_Template, 2, 1, \"tui-scrollbar\", 12)(2, TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_2_Template, 3, 1, \"tui-scrollbar\", 13)(3, TuiEditorComponent_div_0_ng_container_6_ng_template_3_Template, 4, 5, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.floatingToolbar);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r1.floatingToolbar);\n }\n}\nfunction TuiEditorComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵlistener(\"tuiActiveZoneChange\", function TuiEditorComponent_div_0_Template_div_tuiActiveZoneChange_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onActiveZone($event));\n });\n i0.ɵɵelementStart(1, \"div\", 5);\n i0.ɵɵtemplate(2, TuiEditorComponent_div_0_tui_toolbar_2_Template, 2, 2, \"tui-toolbar\", 6);\n i0.ɵɵelementStart(3, \"div\", 7);\n i0.ɵɵprojection(4);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(5, TuiEditorComponent_div_0_div_5_Template, 2, 1, \"div\", 8);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(6, TuiEditorComponent_div_0_ng_container_6_Template, 5, 2, \"ng-container\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const editorLoaded_r12 = ctx.ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"appearance\", ctx_r1.options.appearence)(\"disabled\", ctx_r1.disabled)(\"focus\", ctx_r1.computedFocused)(\"hover\", ctx_r1.pseudoHover)(\"invalid\", ctx_r1.computedInvalid)(\"readOnly\", ctx_r1.readOnly);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", editorLoaded_r12 && !ctx_r1.floatingToolbar);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"t-placeholder_raised\", ctx_r1.placeholderRaised);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx_r1.hasExampleText);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", editorLoaded_r12);\n }\n}\nlet TuiDropdownToolbarDirective = /*#__PURE__*/(() => {\n class TuiDropdownToolbarDirective extends TuiDropdownSelectionDirective {\n constructor() {\n super(...arguments);\n this.previousTagPosition = null;\n this.stream$ = combineLatest([this.handler$, this.selection$.pipe(map(() => this.getRange()), distinctUntilChanged((x, y) => x.startOffset === y.startOffset && x.endOffset === y.endOffset))]).pipe(map(([handler, range]) => {\n var _a;\n const contained = this.el.nativeElement.contains(range.commonAncestorContainer) || ((_a = range.commonAncestorContainer.parentElement) === null || _a === void 0 ? void 0 : _a.closest('tui-dropdown'));\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 }\n set tuiToolbarDropdown(visible) {\n this.tuiDropdownSelection = visible;\n }\n getClientRect() {\n var _a, _b, _c, _d;\n switch (this.position) {\n case 'tag':\n {\n const {\n commonAncestorContainer\n } = this.range;\n const element = tuiIsElement(commonAncestorContainer) ? commonAncestorContainer : commonAncestorContainer.parentNode;\n if ((_a = element === null || element === void 0 ? void 0 : element.parentElement) === null || _a === void 0 ? void 0 : _a.closest('tui-dropdown')) {\n return (_b = this.previousTagPosition) !== null && _b !== void 0 ? _b : EMPTY_CLIENT_RECT;\n }\n this.previousTagPosition = element && tuiIsElement(element) ? ((_c = this.doc.querySelector('.ProseMirror-selectednode')) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect()) || element.getBoundingClientRect() : EMPTY_CLIENT_RECT;\n return this.previousTagPosition;\n }\n case 'word':\n return tuiGetWordRange(this.range).getBoundingClientRect();\n default:\n {\n const rect = this.range.getBoundingClientRect();\n if (rect.x === 0 && rect.y === 0 && rect.width === 0 && rect.height === 0) {\n return ((_d = this.el.nativeElement.querySelector('p')) !== null && _d !== void 0 ? _d : this.el.nativeElement).getBoundingClientRect();\n }\n return rect;\n }\n }\n }\n }\n TuiDropdownToolbarDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDropdownToolbarDirective_BaseFactory;\n return function TuiDropdownToolbarDirective_Factory(t) {\n return (ɵTuiDropdownToolbarDirective_BaseFactory || (ɵTuiDropdownToolbarDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDropdownToolbarDirective)))(t || TuiDropdownToolbarDirective);\n };\n })();\n TuiDropdownToolbarDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownToolbarDirective,\n selectors: [[\"\", \"tuiToolbarDropdown\", \"\"]],\n inputs: {\n position: [0, \"tuiToolbarDropdownPosition\", \"position\"],\n tuiToolbarDropdown: \"tuiToolbarDropdown\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsDriver(TuiDropdownToolbarDirective), tuiAsRectAccessor(TuiDropdownToolbarDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDropdownToolbarDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorPortalService = /*#__PURE__*/(() => {\n class TuiEditorPortalService extends AbstractTuiPortalService {}\n TuiEditorPortalService.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiEditorPortalService_BaseFactory;\n return function TuiEditorPortalService_Factory(t) {\n return (ɵTuiEditorPortalService_BaseFactory || (ɵTuiEditorPortalService_BaseFactory = i0.ɵɵgetInheritedFactory(TuiEditorPortalService)))(t || TuiEditorPortalService);\n };\n })();\n TuiEditorPortalService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiEditorPortalService,\n factory: TuiEditorPortalService.ɵfac\n });\n return TuiEditorPortalService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_EDITOR_PROVIDERS = [{\n provide: LAZY_EDITOR_EXTENSIONS,\n deps: [TUI_EDITOR_EXTENSIONS],\n useFactory: extensions => {\n const extensions$ = new ReplaySubject(1);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n Promise.all(extensions).then(extensions => extensions$.next(extensions));\n return extensions$;\n }\n}, {\n provide: INITIALIZATION_TIPTAP_CONTAINER,\n deps: [Renderer2],\n useFactory: renderer => renderer.createElement(`div`)\n}, {\n provide: TIPTAP_EDITOR,\n deps: [INITIALIZATION_TIPTAP_CONTAINER, LAZY_EDITOR_EXTENSIONS, LAZY_TIPTAP_EDITOR],\n useFactory: (element, extensions, editor) => combineLatest([editor, extensions]).pipe(take(1), map(([LazyEditor, extensions]) => new LazyEditor({\n element,\n extensions\n })), shareReplay({\n bufferSize: 1,\n refCount: true\n }))\n}, TuiTiptapEditorService, TuiEditorPortalService];\nlet TuiEditorPortalHostComponent = /*#__PURE__*/(() => {\n class TuiEditorPortalHostComponent extends AbstractTuiPortalHostComponent {}\n TuiEditorPortalHostComponent.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiEditorPortalHostComponent_BaseFactory;\n return function TuiEditorPortalHostComponent_Factory(t) {\n return (ɵTuiEditorPortalHostComponent_BaseFactory || (ɵTuiEditorPortalHostComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TuiEditorPortalHostComponent)))(t || TuiEditorPortalHostComponent);\n };\n })();\n TuiEditorPortalHostComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiEditorPortalHostComponent,\n selectors: [[\"tui-editor-portal-host\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: AbstractTuiPortalService,\n useExisting: TuiDropdownPortalService\n }, {\n provide: AbstractTuiPortalHostComponent,\n useExisting: TuiEditorPortalHostComponent\n }]), i0.ɵɵInheritDefinitionFeature],\n decls: 2,\n vars: 0,\n consts: [[\"viewContainer\", \"\"]],\n template: function TuiEditorPortalHostComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0, null, 0);\n }\n },\n styles: [\"[_nghost-%COMP%]{position:absolute;top:0;left:0;display:block;height:100%;width:100%;pointer-events:none}\"],\n changeDetection: 0\n });\n return TuiEditorPortalHostComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorPortalDirective = /*#__PURE__*/(() => {\n class TuiEditorPortalDirective extends TuiRectAccessor {\n constructor(el) {\n super();\n this.el = el;\n this.type = 'viewport';\n }\n getClientRect() {\n return this.el.nativeElement.getBoundingClientRect();\n }\n }\n TuiEditorPortalDirective.ɵfac = function TuiEditorPortalDirective_Factory(t) {\n return new (t || TuiEditorPortalDirective)(i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiEditorPortalDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiEditorPortalDirective,\n selectors: [[\"\", \"tuiEditorPortal\", \"\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: TuiDropdownPortalService,\n useExisting: TuiEditorPortalService\n }, tuiAsViewport(TuiEditorPortalDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiEditorPortalDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorComponent = /*#__PURE__*/(() => {\n class TuiEditorComponent extends AbstractTuiControl {\n constructor(control, cdr, editorLoaded$, editorService, contentProcessor, doc, transformer, options, zone) {\n super(control, cdr, transformer);\n this.editorLoaded$ = editorLoaded$;\n this.editorService = editorService;\n this.contentProcessor = contentProcessor;\n this.doc = doc;\n this.options = options;\n this.zone = zone;\n this.exampleText = '';\n this.tools = defaultEditorTools;\n this.floatingToolbar = false;\n this.fileAttached = new EventEmitter();\n this.hasMentionPlugin = false;\n this.focused = false;\n this.openDropdownWhen = range => this.currentFocusedNodeIsTextAnchor(range) || this.currentFocusedNodeIsImageAnchor || this.isMentionMode;\n this.editorLoaded$.pipe(delay(0), takeUntil(this.destroy$)).subscribe(() => {\n this.hasMentionPlugin = !!this.editorService.getOriginTiptapEditor().extensionManager.extensions.find(extension => extension.name === 'mention');\n this.patchContentEditableElement();\n this.listenResizeEvents();\n });\n }\n get nativeFocusableElement() {\n var _a, _b;\n return this.computedDisabled ? null : ((_b = (_a = this.el) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.querySelector('[contenteditable].ProseMirror')) || null;\n }\n get dropdownSelectionHandler() {\n if (this.floatingToolbar) {\n return ALWAYS_TRUE_HANDLER;\n }\n return this.focused ? this.openDropdownWhen : ALWAYS_FALSE_HANDLER;\n }\n get editor() {\n return this.editorService.getOriginTiptapEditor() ? this.editorService : null;\n }\n get placeholderRaised() {\n return this.computedFocused && !this.readOnly || this.hasValue;\n }\n get hasExampleText() {\n return !!this.exampleText && this.computedFocused && !this.hasValue && !this.readOnly;\n }\n get isLinkSelected() {\n var _a, _b, _c;\n const focusElement = (_a = this.doc.getSelection()) === null || _a === void 0 ? void 0 : _a.focusNode;\n const parentFocusElement = focusElement === null || focusElement === void 0 ? void 0 : focusElement.parentNode;\n return (parentFocusElement === null || parentFocusElement === void 0 ? void 0 : parentFocusElement.nodeName.toLowerCase()) === 'a' || ((_b = parentFocusElement === null || parentFocusElement === void 0 ? void 0 : parentFocusElement.parentNode) === null || _b === void 0 ? void 0 : _b.nodeName.toLowerCase()) === 'a' || (focusElement === null || focusElement === void 0 ? void 0 : focusElement.nodeName.toLowerCase()) === 'a' || !!((_c = parentFocusElement === null || parentFocusElement === void 0 ? void 0 : parentFocusElement.parentElement) === null || _c === void 0 ? void 0 : _c.closest('tui-edit-link'));\n }\n get mentionSuggestions() {\n const before = this.selectionState.before;\n return (before === null || before === void 0 ? void 0 : before.startsWith('@')) && before.length > 1 ? (before === null || before === void 0 ? void 0 : before.replace('@', '')) || '' : '';\n }\n get isMentionMode() {\n var _a;\n return this.hasMentionPlugin && ((_a = this.selectionState.before) === null || _a === void 0 ? void 0 : _a.startsWith('@'));\n }\n writeValue(value) {\n var _a, _b;\n if (value === this.value) {\n return;\n }\n const processed = this.contentProcessor(value || '');\n super.writeValue(processed);\n if (processed !== value) {\n (_a = this.control) === null || _a === void 0 ? void 0 : _a.setValue(processed, {\n onlySelf: false,\n emitEvent: false,\n emitModelToViewChange: false,\n emitViewToModelChange: false\n });\n }\n if (!this.focused) {\n (_b = this.doc.getSelection()) === null || _b === void 0 ? void 0 : _b.removeAllRanges();\n }\n }\n onActiveZone(focused) {\n var _a;\n this.focused = focused;\n this.updateFocused(focused);\n (_a = this.control) === null || _a === void 0 ? void 0 : _a.updateValueAndValidity();\n }\n onModelChange(value) {\n this.value = value;\n }\n addAnchor(anchor) {\n var _a;\n (_a = this.editor) === null || _a === void 0 ? void 0 : _a.setAnchor(anchor);\n }\n removeAnchor() {\n var _a;\n (_a = this.editor) === null || _a === void 0 ? void 0 : _a.removeAnchor();\n }\n addLink(link) {\n var _a, _b;\n (_a = this.editor) === null || _a === void 0 ? void 0 : _a.selectClosest();\n (_b = this.editor) === null || _b === void 0 ? void 0 : _b.setLink(link);\n }\n removeLink() {\n var _a;\n (_a = this.editor) === null || _a === void 0 ? void 0 : _a.unsetLink();\n }\n get selectionState() {\n return tuiGetSelectionState(this.editor);\n }\n focus(event) {\n var _a, _b;\n if ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.contains(event.target)) {\n return;\n }\n event.preventDefault();\n (_b = this.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.focus();\n }\n ngOnDestroy() {\n var _a;\n (_a = this.editor) === null || _a === void 0 ? void 0 : _a.destroy();\n }\n getFallbackValue() {\n return '';\n }\n /**\n * @description:\n * The commonAncestorContainer not always relevant node element in Range,\n * so the focusNode is used for the correct behaviour from the selection,\n * which is the actual element at the moment\n */\n currentFocusedNodeIsTextAnchor(range) {\n var _a, _b;\n return !!((_b = (_a = range.startContainer.parentElement) === null || _a === void 0 ? void 0 : _a.closest('a')) === null || _b === void 0 ? void 0 : _b.contains(this.focusNode)) && tuiIsSafeLinkRange(range);\n }\n get focusNode() {\n var _a, _b;\n return (_b = (_a = this.doc.getSelection()) === null || _a === void 0 ? void 0 : _a.focusNode) !== null && _b !== void 0 ? _b : null;\n }\n get hasValue() {\n return !!this.value;\n }\n get currentFocusedNodeIsImageAnchor() {\n var _a, _b, _c;\n return ((_a = this.focusNode) === null || _a === void 0 ? void 0 : _a.nodeName) === 'A' && ['IMG', 'TUI-IMAGE-EDITOR'].includes((_c = (_b = this.focusNode) === null || _b === void 0 ? void 0 : _b.childNodes[0]) === null || _c === void 0 ? void 0 : _c.nodeName);\n }\n patchContentEditableElement() {\n var _a, _b;\n (_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.setAttribute('translate', this.options.translate);\n (_b = this.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.setAttribute('spellcheck', String(this.options.spellcheck));\n }\n listenResizeEvents() {\n var _a, _b;\n ((_a = this.el) === null || _a === void 0 ? void 0 : _a.nativeElement) && fromEvent((_b = this.el) === null || _b === void 0 ? void 0 : _b.nativeElement, TUI_EDITOR_RESIZE_EVENT).pipe(throttleTime(0), tuiZonefree(this.zone), takeUntil(this.destroy$)).subscribe(() => this.editorService.valueChange$.next(this.editorService.getHTML()));\n }\n }\n TuiEditorComponent.ɵfac = function TuiEditorComponent_Factory(t) {\n return new (t || TuiEditorComponent)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(TIPTAP_EDITOR), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_CONTENT_PROCESSOR), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(TUI_EDITOR_VALUE_TRANSFORMER, 8), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(NgZone));\n };\n TuiEditorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiEditorComponent,\n selectors: [[\"tui-editor\"]],\n viewQuery: function TuiEditorComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TuiTiptapEditorDirective, 5, ElementRef);\n i0.ɵɵviewQuery(TuiToolbarComponent, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.el = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.toolbar = _t.first);\n }\n },\n inputs: {\n exampleText: \"exampleText\",\n tools: \"tools\",\n floatingToolbar: \"floatingToolbar\"\n },\n outputs: {\n fileAttached: \"fileAttached\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiEditorComponent), tuiAutoFocusOptionsProvider({\n delay: TUI_ANIMATIONS_DEFAULT_DURATION\n }), TUI_EDITOR_PROVIDERS]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c1,\n decls: 2,\n vars: 3,\n consts: [[\"editor\", \"\"], [\"dropdown\", \"\"], [\"link\", \"\"], [\"tuiWrapper\", \"\", \"class\", \"t-wrapper\", 3, \"appearance\", \"disabled\", \"focus\", \"hover\", \"invalid\", \"readOnly\", \"tuiActiveZoneChange\", 4, \"ngIf\"], [\"tuiWrapper\", \"\", 1, \"t-wrapper\", 3, \"tuiActiveZoneChange\", \"appearance\", \"disabled\", \"focus\", \"hover\", \"invalid\", \"readOnly\"], [1, \"t-toolbar-wrapper\"], [3, \"disabled\", \"tools\", \"fileAttached\", 4, \"ngIf\"], [1, \"t-placeholder\"], [\"class\", \"t-example-text\", 4, \"ngIf\"], [4, \"ngIf\"], [3, \"fileAttached\", \"disabled\", \"tools\"], [1, \"t-example-text\"], [\"class\", \"t-scrollbar\", 3, \"mousedown\", 4, \"ngIf\"], [\"tuiEditorPortal\", \"\", \"class\", \"t-scrollbar\", 3, \"mousedown\", 4, \"ngIf\"], [1, \"t-scrollbar\", 3, \"mousedown\"], [3, \"ngTemplateOutlet\"], [\"tuiEditorPortal\", \"\", 1, \"t-scrollbar\", 3, \"mousedown\"], [\"tuiDropdownLimitWidth\", \"auto\", 3, \"tuiDropdown\", \"tuiToolbarDropdown\", \"tuiToolbarDropdownPosition\"], [\"tuiTiptapEditor\", \"\", 3, \"stateChange\", \"valueChange\", \"editable\", \"value\"], [3, \"disabled\", \"tools\", \"tuiActiveZoneParent\", \"fileAttached\", 4, \"ngIf\"], [3, \"addLink\", \"removeLink\", 4, \"ngIf\"], [3, \"fileAttached\", \"disabled\", \"tools\", \"tuiActiveZoneParent\"], [3, \"addLink\", \"removeLink\"]],\n template: function TuiEditorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c0);\n i0.ɵɵtemplate(0, TuiEditorComponent_div_0_Template, 7, 11, \"div\", 3);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.editorLoaded$));\n }\n },\n dependencies: [i1.TuiToolbarComponent, i2.TuiScrollbarComponent, TuiEditorPortalHostComponent, i4.TuiEditorSocketComponent, i5.TuiEditLinkComponent, i6.NgIf, i2.TuiWrapperDirective, i7.TuiActiveZoneDirective, i6.NgTemplateOutlet, TuiEditorPortalDirective, i2.TuiDropdownOptionsDirective, i2.TuiDropdownDirective, i2.TuiDropdownDriverDirective, i2.TuiDropdownPositionDirective, TuiDropdownToolbarDirective, i10.TuiTiptapEditorDirective, i6.AsyncPipe],\n styles: [\"[_nghost-%COMP%]{position:relative;z-index:0;display:block;font:var(--tui-font-text-m);border-radius:var(--tui-radius-m);max-height:inherit;min-height:10rem;box-sizing:border-box;overflow:clip}.t-wrapper[_ngcontent-%COMP%]{display:flex;max-height:inherit;min-height:inherit;cursor:text;overflow:clip;flex-direction:column;border-radius:inherit}.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);margin:1rem 1rem -1rem;min-height:1.625rem;width:95%;font-size:.9375rem}@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-placeholder_raised[_ngcontent-%COMP%]{width:110%}.t-placeholder[_ngcontent-%COMP%]:empty{min-height:.8rem}.t-example-text[_ngcontent-%COMP%]{position:absolute;left:1rem;margin-top:1.6rem;color:var(--tui-base-06);letter-spacing:normal;text-transform:none}.t-example-text_light[_ngcontent-%COMP%]{color:var(--tui-text-03-night)}.t-example-text_dark[_ngcontent-%COMP%]{color:var(--tui-text-03)}.t-scrollbar[_ngcontent-%COMP%]{display:flex;border-bottom:.3125rem solid transparent;padding-bottom:1.3125rem;box-sizing:border-box;flex:1}.t-floating[_ngcontent-%COMP%], .t-floating[_ngcontent-%COMP%] .t-tools-wrapper{max-width:var(--tui-floating-toolbar-max-width, 31.25rem);flex-wrap:nowrap}\"],\n changeDetection: 0\n });\n return TuiEditorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorModule = /*#__PURE__*/(() => {\n class TuiEditorModule {}\n TuiEditorModule.ɵfac = function TuiEditorModule_Factory(t) {\n return new (t || TuiEditorModule)();\n };\n TuiEditorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiEditorModule\n });\n TuiEditorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[TuiItemModule, CommonModule, TuiToolbarModule, TuiWrapperModule, TuiScrollbarModule, TuiEditLinkModule, TuiActiveZoneModule, TuiDropdownModule, TuiTiptapEditorModule, TuiEditorSocketModule]]\n });\n return TuiEditorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_EDITOR_PROVIDERS, TuiDropdownToolbarDirective, TuiEditorComponent, TuiEditorModule, TuiEditorPortalDirective, TuiEditorPortalHostComponent, TuiEditorPortalService };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, SecurityContext, Injectable, Inject, Pipe, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport dompurify from 'dompurify';\nimport * as i2 from '@angular/platform-browser';\n\n/**\n * Token for {@link NgDompurifyConfig}\n */\nconst DOMPURIFY_CONFIG = new InjectionToken('Config for DOMPurify', {\n factory: () => ({}),\n providedIn: 'root'\n});\n\n/**\n * Token for adding hooks to DOMPurify, see {@link addHook}\n */\nconst DOMPURIFY_HOOKS = new InjectionToken('Hooks for DOMPurify', {\n factory: () => [],\n providedIn: 'root'\n});\n\n/**\n * A function that takes style rule value as input and returns a sanitized string\n *\n * NOTE: Angular 10 removed CSS sanitation so by default this method does nothing\n */\nconst SANITIZE_STYLE = new InjectionToken('A function that sanitizes value for a CSS rule', {\n factory: () => value => value,\n providedIn: 'root'\n});\nconst createDOMPurify = dompurify;\n/**\n * Implementation of Angular {@link Sanitizer} purifying via DOMPurify\n *\n * use {@link DOMPURIFY_CONFIG} token to provide config ({@link NgDompurifyConfig})\n * use {@link SANITIZE_STYLE} token to provide a style sanitizing method ({@link SanitizeStyle})\n * use {@link DOMPURIFY_HOOKS} token to provide a hooks for DOMPurify ({@link addHook})\n *\n * Ambient type cannot be used without @dynamic https://github.com/angular/angular/issues/23395\n * @dynamic\n */\nlet NgDompurifySanitizer = /*#__PURE__*/(() => {\n class NgDompurifySanitizer {\n constructor(config, sanitizeStyle, {\n defaultView\n }, hooks) {\n this.config = config;\n this.sanitizeStyle = sanitizeStyle;\n this.domPurify = createDOMPurify(defaultView);\n hooks.forEach(({\n name,\n hook\n }) => {\n this.domPurify.addHook(name, hook);\n });\n }\n sanitize(context, value, config = this.config) {\n if (context === SecurityContext.SCRIPT) {\n throw new Error('DOMPurify does not support SCRIPT context');\n }\n return context === SecurityContext.STYLE ? this.sanitizeStyle(String(value)) : this.domPurify.sanitize(String(value || ''), config);\n }\n }\n NgDompurifySanitizer.ɵfac = function NgDompurifySanitizer_Factory(t) {\n return new (t || NgDompurifySanitizer)(i0.ɵɵinject(DOMPURIFY_CONFIG), i0.ɵɵinject(SANITIZE_STYLE), i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(DOMPURIFY_HOOKS));\n };\n NgDompurifySanitizer.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NgDompurifySanitizer,\n factory: NgDompurifySanitizer.ɵfac,\n providedIn: 'root'\n });\n return NgDompurifySanitizer;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Pipe that transforms dirty content to clean via {@link NgDompurifySanitizer}\n */\nlet NgDompurifyPipe = /*#__PURE__*/(() => {\n class NgDompurifyPipe {\n constructor(sanitizer, domSanitizer) {\n this.sanitizer = sanitizer;\n this.domSanitizer = domSanitizer;\n }\n transform(value, context = SecurityContext.HTML, config) {\n return this.bypassSecurityTrust(context, this.sanitizer.sanitize(context, value, config));\n }\n bypassSecurityTrust(context, purifiedValue) {\n switch (context) {\n case SecurityContext.HTML:\n return this.domSanitizer.bypassSecurityTrustHtml(purifiedValue);\n case SecurityContext.STYLE:\n return this.domSanitizer.bypassSecurityTrustStyle(purifiedValue);\n case SecurityContext.URL:\n return this.domSanitizer.bypassSecurityTrustUrl(purifiedValue);\n case SecurityContext.RESOURCE_URL:\n return this.domSanitizer.bypassSecurityTrustResourceUrl(purifiedValue);\n default:\n return null;\n }\n }\n }\n NgDompurifyPipe.ɵfac = function NgDompurifyPipe_Factory(t) {\n return new (t || NgDompurifyPipe)(i0.ɵɵdirectiveInject(NgDompurifySanitizer, 16), i0.ɵɵdirectiveInject(i2.DomSanitizer, 16));\n };\n NgDompurifyPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"dompurify\",\n type: NgDompurifyPipe,\n pure: true\n });\n return NgDompurifyPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet NgDompurifyModule = /*#__PURE__*/(() => {\n class NgDompurifyModule {}\n NgDompurifyModule.ɵfac = function NgDompurifyModule_Factory(t) {\n return new (t || NgDompurifyModule)();\n };\n NgDompurifyModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: NgDompurifyModule\n });\n NgDompurifyModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return NgDompurifyModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Public API Surface of @tinkoff/ng-dompurify\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DOMPURIFY_CONFIG, DOMPURIFY_HOOKS, NgDompurifyModule, NgDompurifyPipe, NgDompurifySanitizer, SANITIZE_STYLE };\n"],"mappings":"mlFAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,eAEC,SAAUC,EAAQC,EAAS,CAC1B,OAAOH,IAAY,UAAY,OAAOC,GAAW,IAAcA,GAAO,QAAUE,EAAQ,EAAI,OAAO,QAAW,YAAc,OAAO,IAAM,OAAOA,CAAO,GAAKD,EAAS,OAAO,WAAe,IAAc,WAAaA,GAAU,KAAMA,EAAO,UAAYC,EAAQ,EACnQ,GAAGH,GAAM,UAAY,CACnB,aAEA,GAAM,CACJ,QAAAI,EACA,eAAAC,EACA,SAAAC,EACA,eAAAC,EACA,yBAAAC,CACF,EAAI,OACA,CACF,OAAAC,EACA,KAAAC,EACA,OAAAC,CACF,EAAI,OACA,CACF,MAAAC,EACA,UAAAC,CACF,EAAI,OAAO,QAAY,KAAe,QACjCJ,IACHA,EAAS,SAAgBK,EAAG,CAC1B,OAAOA,CACT,GAEGJ,IACHA,EAAO,SAAcI,EAAG,CACtB,OAAOA,CACT,GAEGF,IACHA,EAAQ,SAAeG,EAAKC,GAAWC,GAAM,CAC3C,OAAOF,EAAI,MAAMC,GAAWC,EAAI,CAClC,GAEGJ,IACHA,EAAY,SAAmBK,EAAMD,GAAM,CACzC,OAAO,IAAIC,EAAK,GAAGD,EAAI,CACzB,GAEF,IAAME,EAAeC,GAAQ,MAAM,UAA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","module","global","factory","entries","setPrototypeOf","isFrozen","getPrototypeOf","getOwnPropertyDescriptor","freeze","seal","create","apply","construct","x","fun","thisValue","args","Func","arrayForEach","unapply","arrayPop","arrayPush","stringToLowerCase","stringToString","stringMatch","stringReplace","stringIndexOf","stringTrim","objectHasOwnProperty","regExpTest","typeErrorCreate","unconstruct","func","thisArg","_len","_key","_len2","_key2","addToSet","set","array","transformCaseFunc","l","element","lcElement","cleanArray","index","clone","object","newObject","property","value","lookupGetter","prop","desc","fallbackValue","html$1","svg$1","svgFilters","svgDisallowed","mathMl$1","mathMlDisallowed","text","html","svg","mathMl","xml","MUSTACHE_EXPR","ERB_EXPR","TMPLIT_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","DOCTYPE_NAME","CUSTOM_ELEMENT","EXPRESSIONS","NODE_TYPE","getGlobal","_createTrustedTypesPolicy","trustedTypes","purifyHostElement","suffix","ATTR_NAME","policyName","scriptUrl","createDOMPurify","window","DOMPurify","root","document","originalDocument","currentScript","DocumentFragment","HTMLTemplateElement","Node","Element","NodeFilter","NamedNodeMap","HTMLFormElement","DOMParser","ElementPrototype","cloneNode","getNextSibling","getChildNodes","getParentNode","template","trustedTypesPolicy","emptyHTML","implementation","createNodeIterator","createDocumentFragment","getElementsByTagName","importNode","hooks","IS_ALLOWED_URI$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","CUSTOM_ELEMENT_HANDLING","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","ALLOW_SELF_CLOSE_IN_ATTR","SAFE_FOR_TEMPLATES","SAFE_FOR_XML","WHOLE_DOCUMENT","SET_CONFIG","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_TRUSTED_TYPE","SANITIZE_DOM","SANITIZE_NAMED_PROPS","SANITIZE_NAMED_PROPS_PREFIX","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DEFAULT_FORBID_CONTENTS","DATA_URI_TAGS","DEFAULT_DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","DEFAULT_URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","HTML_NAMESPACE","NAMESPACE","IS_EMPTY_INPUT","ALLOWED_NAMESPACES","DEFAULT_ALLOWED_NAMESPACES","PARSER_MEDIA_TYPE","SUPPORTED_PARSER_MEDIA_TYPES","DEFAULT_PARSER_MEDIA_TYPE","CONFIG","formElement","isRegexOrFunction","testValue","_parseConfig","cfg","MATHML_TEXT_INTEGRATION_POINTS","HTML_INTEGRATION_POINTS","COMMON_SVG_AND_HTML_ELEMENTS","ALL_SVG_TAGS","ALL_MATHML_TAGS","_checkValidNamespace","parent","tagName","parentTagName","_forceRemove","node","_removeAttribute","name","_initDocument","dirty","doc","leadingWhitespace","matches","dirtyPayload","body","_createNodeIterator","_isClobbered","elm","_isNode","_executeHook","entryPoint","currentNode","data","hook","_sanitizeElements","content","_isBasicCustomElement","parentNode","childNodes","childCount","i","childClone","expr","_isValidAttribute","lcTag","lcName","_sanitizeAttributes","attributes","hookEvent","attr","namespaceURI","attrValue","_sanitizeShadowDOM","fragment","shadowNode","shadowIterator","importedNode","returnNode","nodeIterator","serializedHTML","tag","hookFunction","purify","EDGE","tuiIsEdgeOlderThan","version","userAgent","tuiIsFirefox","tuiIsSafari","doc","_a","_b","_c","_d","_e","_f","_g","_h","win","isMacOsSafari","isIosSafari","makeRandomSalt","escapeRegExp","search","extractLinearGradientIdsFromSvg","svg","_a","ids","url","tuiSvgLinearGradientProcessor","salt","tuiIsString","newSvg","previousId","escapedId","newId","POLYMORPHEUS_CONTEXT","InjectionToken","PolymorpheusComponent","component","i","injector","useValue","Injector","PolymorpheusTemplate","template","cdr","_dir","_ctx","ɵɵdirectiveInject","TemplateRef","ChangeDetectorRef","ɵɵdefineDirective","PolymorpheusContext","$implicit","PolymorpheusOutletDirective","vcr","t","isDirective","TemplateRef","content","_a","context","ChangeDetectorRef","proxy","_","key","isComponent","PolymorpheusContext","_dir","_ctx","isTemplate","injector","ComponentFactoryResolver$1","ɵɵdirectiveInject","ViewContainerRef","Injector","ɵɵdefineDirective","ɵɵNgOnChangesFeature","PolymorpheusTemplate","PolymorpheusComponent","PolymorpheusModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","TUI","AbstractTuiInteractive","EventEmitter","_a","focused","focusVisible","ɵɵdefineDirective","rf","ctx","ɵɵattribute","ɵɵclassProp","AbstractTuiValueTransformer","AbstractTuiControl","ngControl","cdr","valueTransformer","Subject","EMPTY_FUNCTION","value","invalid","valid","touched","disabled","control","_b","_c","controlValue","NgModel","delay","startWith","map","filter","tuiIsPresent","distinctUntilChanged","switchMap","merge","takeUntil","onChange","componentValue","onTouched","oldValue","newValue","extractor","defaultFieldValue","ɵɵdirectiveInject","NgControl","ChangeDetectorRef","ɵɵInheritDefinitionFeature","tuiAsControl","useExisting","AbstractTuiController","ɵɵNgOnChangesFeature","AbstractTuiDialogService","Observable","idService","observer","BehaviorSubject","content","options","completeWith","result","dialog","item","ɵɵinject","TuiIdService","ɵɵdefineInjectable","AbstractTuiMultipleControl","AbstractTuiControl","ɵAbstractTuiMultipleControl_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineDirective","ɵɵInheritDefinitionFeature","AbstractTuiNullableControl","ɵAbstractTuiNullableControl_BaseFactory","AbstractTuiPortalService","TuiNoHostException","host","component","hostView","templateRef","context","viewRef","ɵɵdefineInjectable","AbstractTuiPortalHostComponent","injector","el","portalService","parent","factory","ComponentFactoryResolver$1","providers","Injector","ref","ɵɵdirectiveInject","INJECTOR$1","ElementRef","rf","ctx","ɵɵviewQuery","_c0","ViewContainerRef","_t","ɵɵqueryRefresh","ɵɵloadQuery","tuiCoerceBooleanProperty","value","TuiMapperPipe","value","mapper","args","ɵɵdefinePipe","TuiMapperPipeModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiScrollControlsComponent_ng_container_0_ng_container_1_div_1_Template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","bars_r1","ɵɵnextContext","ɵɵclassProp","TuiScrollControlsComponent_ng_container_0_ng_container_1_div_2_Template","TuiScrollControlsComponent_ng_container_0_ng_container_1_Template","ɵɵelementContainerStart","ɵɵtemplate","ɵɵelementContainerEnd","ɵɵadvance","ɵɵproperty","TuiScrollControlsComponent_ng_container_0_Template","ɵɵpipe","ctx_r1","ɵɵpipeBind1","MIN_WIDTH","getOffsetVertical","clientY","top","height","getOffsetHorizontal","clientX","left","width","TuiScrollbarDirective","zone","destroy$","animationFrame$","container","doc","el","nativeElement","mousedown$","tuiTypedFromEvent","mousemove$","mouseup$","mousedownWrapper$","merge","map","event","switchMap","rect","vertical","horizontal","takeUntil","tuiZonefree","scrollTop","scrollLeft","throttleTime","POLLING_TIME","tuiScrollFrom","scrollHeight","clientHeight","scrollWidth","clientWidth","compensation","offsetVertical","offsetHorizontal","offsetHeight","offsetWidth","maxTop","maxLeft","scrolledTop","scrolledLeft","ɵɵdirectiveInject","NgZone","TuiDestroyService","ANIMATION_FRAME","TUI_SCROLL_REF","DOCUMENT","ElementRef","ɵɵdefineDirective","ɵɵProvidersFeature","TuiScrollControlsComponent","isIOS","scrollRef","startWith","distinctUntilChanged","a","b","tuiZoneOptimized","TUI_IS_IOS","ɵɵdefineComponent","NgIf","AsyncPipe","TuiScrollRefDirective","ɵɵdefineDirective","ɵɵProvidersFeature","TUI_SCROLL_REF","ElementRef","TuiScrollControlsModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","decorateMethod","originalMethod","previousArgs","originalFnWasCalledLeastAtOnce","pureValue","args","arg","index","decorateGetter","originalGetter","propertyKey","enumerable","value","tuiPure","target","propertyKeyOrContext","descriptor","context","TuiPureException","get","original","patched","TuiActiveZoneDirective","active$","zone","el","directParentActiveZone","_a","map","element","startWith","distinctUntilChanged","skip","tuiZoneOptimized","_b","node","item","index","array","activeZone","tuiArrayRemove","ɵɵdirectiveInject","TUI_ACTIVE_ELEMENT","NgZone","ElementRef","ɵɵdefineDirective","rf","ctx","ɵɵlistener","ɵɵresolveDocument","__decorate","tuiPure","TuiActiveZoneModule","ɵɵdefineNgModule","ɵɵdefineInjector","AbstractTuiAutofocusHandler","focusable","el","_a","ɵɵinvalidFactory","ɵɵdefineDirective","TIMEOUT","NG_ANIMATION_SELECTOR","TuiDefaultAutofocusHandler","animationFrame$","race","timer","throttleTime","POLLING_TIME","map","skipWhile","take","ɵɵdirectiveInject","TUI_FOCUSABLE_ITEM_ACCESSOR","ElementRef","ANIMATION_FRAME","ɵɵInheritDefinitionFeature","TEXTFIELD_ATTRS","TuiIosAutofocusHandler","renderer","zone","win","fakeInput","duration","fakeFocusTimeoutId","elementFocusTimeoutId","blurHandler","focusHandler","rect","tuiPx","element","attr","value","tuiIsPresent","Renderer2","NgZone","WINDOW","TUI_AUTOFOCUS_DEFAULT_OPTIONS","TUI_AUTOFOCUS_OPTIONS","tuiCreateToken","tuiAutoFocusOptionsProvider","options","tuiProvideOptions","TUI_AUTOFOCUS_HANDLER","InjectionToken","TUI_AUTOFOCUS_PROVIDERS","isIos","Optional","Self","TUI_IS_IOS","TuiDestroyService","TuiAutoFocusDirective","handler","destroy$","tuiCoerceBooleanProperty","takeUntil","ɵɵProvidersFeature","TuiAutoFocusModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiAutofilledStyleComponent","ɵɵdefineComponent","rf","ctx","TuiAutofilledDirective","directiveStyles","EventEmitter","propertyName","target","_a","ɵɵdirectiveInject","TuiDirectiveStylesService","ɵɵdefineDirective","ɵɵlistener","$event","ɵɵclassProp","TuiAutofilledModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiCheckedDirective","EventEmitter","checked","ɵɵdefineDirective","rf","ctx","ɵɵlistener","$event","ɵɵhostProperty","TuiCheckedModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiFocusVisibleDirective","tuiFocusVisibleChange","ɵɵdirectiveInject","TuiFocusVisibleService","ɵɵdefineDirective","ɵɵProvidersFeature","TuiDestroyService","TuiFocusVisibleModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiFocusableDirective","ɵɵdefineDirective","rf","ctx","ɵɵhostProperty","TuiFocusableModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiFocusedDirective","nativeElement","zone","merge","tuiTypedFromEvent","map","tuiIsNativeFocused","startWith","distinctUntilChanged","skip","tuiZoneOptimized","ɵɵ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","ɵɵinject","ElementRef","NgZone","ɵɵdefineInjectable","TuiHoveredDirective","tuiHoveredChange","ɵɵdirectiveInject","ɵɵdefineDirective","ɵɵProvidersFeature","TuiHoveredModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiItemDirective","ɵɵdefineDirective","TuiItemModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiLetContext","internalDirectiveInstance","TuiLetDirective","viewContainer","templateRef","_dir","_ctx","ɵɵdirectiveInject","ViewContainerRef","TemplateRef","ɵɵdefineDirective","TuiLetModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiObscuredDirective","activeZone","obscured$","Subject","mapped$","map","obscuredBy","element","tuiIfMap","enabled","ɵɵdirectiveInject","TuiActiveZoneDirective","TuiObscuredService","ɵɵdefineDirective","ɵɵProvidersFeature","TuiParentsScrollService","TuiDestroyService","TuiObscuredModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiOverscrollDirective","nativeElement","zone","destroy$","tuiTypedFromEvent","filter","tuiZonefree","takeUntil","event","switchMap","touches","clientX","clientY","deltaX","deltaY","vertical","tap","changedTouch","negative","_a","target","currentTarget","cancelable","tuiIsElement","tuiGetScrollParent","tuiCanScroll","ɵɵdirectiveInject","ElementRef","NgZone","TuiDestroyService","ɵɵdefineDirective","rf","ctx","ɵɵstyleProp","ɵɵProvidersFeature","TuiOverscrollModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","TuiDropdownPortalService","AbstractTuiPortalService","ɵTuiDropdownPortalService_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineInjectable","TuiDropdownHostComponent","AbstractTuiPortalHostComponent","ɵTuiDropdownHostComponent_BaseFactory","ɵɵdefineComponent","ɵɵProvidersFeature","ɵɵInheritDefinitionFeature","rf","ctx","ɵɵprojectionDef","ɵɵprojection","ɵɵelementContainer","TuiDropdownHostModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiPressedDirective","el","takeOnlyTrustedEvents","tuiPressedObservable","ɵɵdirectiveInject","ElementRef","TUI_TAKE_ONLY_TRUSTED_EVENTS","ɵɵdefineDirective","TuiPressedModule","ɵɵdefineNgModule","ɵɵdefineInjector","MAX_VALUE","TuiRepeatTimesContext","$implicit","TuiRepeatTimesDirective","viewContainer","templateRef","count","safeCount","tuiClamp","length","index","amount","ɵɵdirectiveInject","ViewContainerRef","TemplateRef","ɵɵdefineDirective","TuiRepeatTimesModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiDayOfWeek","TuiMonthNumber","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","TUI_CACHE_BUSTING_PAYLOAD","TUI_VERSION","DEFAULT_ICONS_PATH","name","TUI_DEFAULT_MARKER_HANDLER","EMPTY_ARRAY","TUI_DEFAULT_NUMBER_FORMAT","CHAR_NO_BREAK_SPACE","tuiEditingKeys","TUI_SCROLL_INTO_VIEW","TUI_ICON_ERROR","TUI_HINT_DIRECTIONS","tuiCheckFixedPosition","element","tuiGetViewportWidth","document","innerWidth","tuiGetWordRange","currentRange","range","startContainer","startOffset","endContainer","endOffset","ownerDocument","treeWalker","svgNodeFilter","container","textContent","content","offset","CHAR_NO_BREAK_SPACE","CHAR_ZERO_WIDTH_SPACE","result","item","WIDTH_SEARCH","HEIGHT_SEARCH","START","tuiProcessIcon","source","name","src","attributes","indexOfWidth","indexOfHeight","widthOffset","heightOffset","widthString","heightString","width","height","ITEM_SIZE","CONTENT_SIZE","tuiGetBorder","hasIcon","hasCleaner","hasTooltip","hasContent","size","offset","border","tuiIconsPathFactory","staticPath","base","name","TUI_CACHE_BUSTING_PAYLOAD","DEFAULT_ICONS_PATH","tuiIsEditingKey","key","tuiEditingKeys","tuiIsObscured","el","exceptSelector","_a","tuiGetElementObscures","tuiIsPresumedHTMLString","candidate","trimmed","tuiOverrideOptions","override","fallback","directive","options","result","SIZES","tuiSizeBigger","biggerThanSize","tuiIsMobile","win","mobile","tuiGetViewportWidth","TuiAppearance","TuiInteractiveState","TuiRangeState","TUI_REDUCED_MOTION","tuiCreateTokenFromFactory","_a","_b","_c","inject","DOCUMENT","TUI_ANIMATIONS_DEFAULT_DURATION","TUI_ANIMATIONS_DURATION","TUI_ANIMATION_OPTIONS","TUI_ASSERT_ENABLED","isDevMode","COMMON_ICONS","TUI_COMMON_ICONS","tuiCreateToken","TUI_DATA_LIST_ACCESSOR","InjectionToken","tuiAsDataListAccessor","useExisting","TUI_DATA_LIST_HOST","tuiAsDataListHost","TUI_DAY_TYPE_HANDLER","tuiCreateToken","day","TUI_DOCUMENT_OR_SHADOW_ROOT","TUI_ELEMENT_REF","TUI_FIRST_DAY_OF_WEEK","TuiDayOfWeek","TUI_MONTHS","tuiCreateTokenFromFactory","tuiExtractI18n","TUI_CLOSE_WORD","TUI_NOTHING_FOUND_MESSAGE","TUI_DEFAULT_ERROR_MESSAGE","TUI_SPIN_TEXTS","TUI_SHORT_WEEK_DAYS","TUI_DEFAULT_ICONS_PLACE","TUI_ICONS_PLACE","TUI_ICONS","TUI_ICONS_PATH","tuiIconsPathFactory","inject","TUI_MEDIA","TUI_IS_MOBILE_RES","win","WINDOW","media","tuiTypedFromEvent","share","startWith","map","tuiIsMobile","distinctUntilChanged","tuiZoneOptimized","NgZone","TUI_LEGACY_MASK","TUI_MODE","STATUS_ICON","TUI_NOTIFICATION_DEFAULT_OPTIONS","$implicit","TUI_NOTIFICATION_OPTIONS","TUI_NUMBER_FORMAT","tuiCreateToken","TUI_DEFAULT_NUMBER_FORMAT","TUI_NUMBER_FORMAT_OBSERVABLE","tuiCreateToken","of","TUI_DEFAULT_NUMBER_FORMAT","TUI_OPTION_CONTENT","InjectionToken","convertToSundayFirstWeekFormat","weekDaysNames","sundayIndex","TUI_ORDERED_SHORT_WEEK_DAYS","tuiCreateTokenFromFactory","firstDayOfWeekIndex","inject","TUI_FIRST_DAY_OF_WEEK","TUI_SHORT_WEEK_DAYS","map","weekDays","TUI_SANITIZER","InjectionToken","TUI_SELECTION_STREAM","tuiCreateTokenFromFactory","doc","inject","DOCUMENT","merge","tuiTypedFromEvent","switchMap","takeUntil","share","TUI_SPIN_ICONS","tuiCreateToken","TUI_SVG_CONTENT_PROCESSOR","tuiSvgLinearGradientProcessor","TUI_SVG_SRC_PROCESSOR","identity","TUI_TEXTFIELD_APPEARANCE","TuiAppearance","TUI_TEXTFIELD_HOST","InjectionToken","tuiAsTextfieldHost","useExisting","TUI_THEME","TUI_VALUE_ACCESSOR","TUI_VIEWPORT","win","WINDOW","tuiAsViewport","TuiDriver","Observable","tuiAsDriver","useExisting","TuiVehicle","tuiAsVehicle","AbstractTuiDriverDirective","destroy$","drivers","vehicles","vehicle","type","merge","distinctUntilChanged","takeUntil","value","ɵɵdirectiveInject","TuiDestroyService","ɵɵdefineDirective","AbstractTuiTextfieldHost","host","_a","_input","AbstractTuiControl","tuiFallbackAccessor","accessors","fallback","accessor","TuiPositionAccessor","tuiPositionAccessorFor","SkipSelf","Optional","tuiAsPositionAccessor","TuiRectAccessor","tuiRectAccessorFor","tuiFallbackRectAccessor","tuiAsRectAccessor","PRIMARY_OUTLET","RouteTitleKey","ParamsAsMap","params","name","v","convertToParamMap","defaultUrlMatcher","segments","segmentGroup","route","parts","posParams","index","part","segment","shallowEqualArrays","a","b","i","shallowEqual","k1","getDataKeys","k2","key","equalArraysOrString","obj","aSorted","bSorted","val","last","wrapIntoObservable","value","isObservable","isPromise","from","of","pathCompareMap","equalSegmentGroups","containsSegmentGroup","paramCompareMap","equalParams","containsParams","containsTree","container","containee","options","matrixParams","equalPath","matrixParamsMatch","c","containsSegmentGroupHelper","containeePaths","current","next","containerPaths","containeeSegment","UrlTree","root","UrlSegmentGroup","queryParams","fragment","DEFAULT_SERIALIZER","children","serializePaths","UrlSegment","path","parameters","serializePath","equalSegments","as","bs","mapChildrenIntoArray","fn","res","childOutlet","child","UrlSerializer","_UrlSerializer","t","ɵɵdefineInjectable","DefaultUrlSerializer","url","p","UrlParser","tree","serializeSegment","query","serializeQueryParams","encodeUriFragment","primary","k","encodeUriString","s","encodeUriQuery","encodeUriSegment","decode","decodeQuery","serializeMatrixParams","strParams","SEGMENT_RE","matchSegments","str","match","MATRIX_PARAM_SEGMENT_RE","matchMatrixKeySegments","QUERY_PARAM_RE","matchQueryParams","QUERY_PARAM_VALUE_RE","matchUrlQueryParamValue","RuntimeError","valueMatch","decodedKey","decodedVal","currentVal","allowPrimary","outletName","createRoot","rootCandidate","squashSegmentGroup","newChildren","childCandidate","grandChildOutlet","grandChild","mergeTrivialChildren","isUrlTree","createUrlTreeFromSnapshot","relativeTo","commands","relativeToUrlSegmentGroup","createSegmentGroupFromRoute","createUrlTreeFromSegmentGroup","targetGroup","createSegmentGroupFromRouteRecursive","currentRoute","childOutlets","childSnapshot","rootSegmentGroup","nav","computeNavigation","position","findStartingPositionForTargetGroup","newSegmentGroup","updateSegmentGroupChildren","updateSegmentGroup","isMatrixParams","command","isCommandWithOutlets","oldRoot","oldSegmentGroup","qp","replaceSegment","newRoot","oldSegment","newSegment","Navigation","isAbsolute","numberOfDoubleDots","cmdWithOutlet","cmd","cmdIdx","outlets","urlPart","partIndex","Position","processChildren","target","modifier","createPositionApplyingDoubleDots","group","g","ci","dd","getOutlets","startIndex","m","prefixedWith","slicedCommands","createNewSegmentGroup","o","childrenOfEmptyChild","outlet","currentCommandIndex","currentPathIndex","noMatch","curr","compare","paths","createNewSegmentChildren","stringify","IMPERATIVE_NAVIGATION","EventType","RouterEvent","id","NavigationStart","navigationTrigger","restoredState","NavigationEnd","urlAfterRedirects","NavigationCancellationCode","NavigationSkippedCode","NavigationCancel","reason","code","NavigationSkipped","NavigationError","error","RoutesRecognized","state","GuardsCheckStart","GuardsCheckEnd","shouldActivate","ResolveStart","ResolveEnd","RouteConfigLoadStart","RouteConfigLoadEnd","ChildActivationStart","snapshot","ChildActivationEnd","ActivationStart","ActivationEnd","BeforeActivateRoutes","RedirectRequest","url","navigationBehaviorOptions","OutletContext","injector","ChildrenOutletContexts","_ChildrenOutletContexts","parentInjector","childName","outlet","context","contexts","t","ɵɵinject","EnvironmentInjector","ɵɵdefineInjectable","Tree","root","p","n","findNode","findPath","c","cc","s","value","node","child","path","TreeNode","children","nodeChildrenAsMap","map","RouterState","snapshot","setRouterState","createEmptyState","rootComponent","createEmptyStateSnapshot","emptyUrl","BehaviorSubject","UrlSegment","emptyParams","emptyData","emptyQueryParams","fragment","activated","ActivatedRoute","PRIMARY_OUTLET","ActivatedRouteSnapshot","RouterStateSnapshot","urlSubject","paramsSubject","queryParamsSubject","fragmentSubject","dataSubject","component","futureSnapshot","_a","d","RouteTitleKey","of","convertToParamMap","getInherited","route","parent","paramsInheritanceStrategy","inherited","routeConfig","__spreadValues","hasStaticTitle","url","params","queryParams","data","resolve","segment","matched","serializeNode","state","advanceActivatedRoute","currentSnapshot","nextSnapshot","shallowEqual","shallowEqualArrays","equalParamsAndUrlSegments","a","b","equalUrlParams","equalSegments","parentsMismatch","config","RouterOutlet","_RouterOutlet","EventEmitter","inject","ViewContainerRef","ChangeDetectorRef","INPUT_BINDER","changes","firstChange","previousValue","outletName","RuntimeError","cmp","ref","activatedRoute","environmentInjector","location","childContexts","OutletInjector","ɵɵdefineDirective","ɵɵNgOnChangesFeature","_OutletInjector","token","notFoundValue","InjectionToken","createRouterState","routeReuseStrategy","curr","prevState","root","createNode","RouterState","value","children","createOrReuseChildren","TreeNode","detachedRouteHandle","tree","createActivatedRoute","c","child","p","ActivatedRoute","BehaviorSubject","RedirectCommand","redirectTo","navigationBehaviorOptions","NAVIGATION_CANCELING_ERROR","redirectingNavigationError","urlSerializer","redirect","isUrlTree","error","navigationCancelingError","NavigationCancellationCode","message","code","isRedirectingNavigationCancelingError","isNavigationCancelingError","ɵEmptyOutletComponent","_ɵEmptyOutletComponent","t","ɵɵdefineComponent","ɵɵStandaloneFeature","rf","ctx","ɵɵelement","RouterOutlet","getOrCreateRouteInjectorIfNeeded","route","currentInjector","createEnvironmentInjector","standardizeConfig","r","children","c","__spreadProps","__spreadValues","PRIMARY_OUTLET","ɵEmptyOutletComponent","getOutlet","route","sortByMatchingOutlets","routes","outletName","sortedConfig","getClosestRouteInjector","snapshot","_a","s","activateRoutes","rootContexts","routeReuseStrategy","forwardEvent","inputBindingEnabled","map","t","ActivateRoutes","futureState","currState","parentContexts","futureRoot","currRoot","advanceActivatedRoute","futureNode","currNode","contexts","children","nodeChildrenAsMap","futureChild","childOutletName","v","parentContext","future","curr","context","route","treeNode","componentRef","c","ActivationEnd","ChildActivationEnd","stored","injector","getClosestRouteInjector","CanActivate","path","CanDeactivate","component","getAllRouteGuards","getChildRouteGuards","getCanActivateChild","p","canActivateChild","getTokenOrFunctionIdentity","tokenOrFunction","NOT_FOUND","result","isInjectable","futurePath","checks","prevChildren","getRouteGuards","k","deactivateRouteAndItsChildren","shouldRun","shouldRunGuardsAndResolvers","mode","equalPath","shallowEqual","equalParamsAndUrlSegments","r","childName","node","isFunction","isBoolean","isCanLoad","guard","isCanActivate","isCanActivateChild","isCanDeactivate","isCanMatch","isEmptyError","EmptyError","INITIAL_VALUE","prioritizedGuardValue","switchMap","obs","combineLatest","o","take","startWith","results","isRedirect","filter","item","val","isUrlTree","RedirectCommand","checkGuards","mergeMap","targetSnapshot","currentSnapshot","canActivateChecks","canDeactivateChecks","of","__spreadProps","__spreadValues","runCanDeactivateChecks","canDeactivate","runCanActivateChecks","guardsResult","futureRSS","currRSS","from","check","runCanDeactivate","first","futureSnapshot","concatMap","concat","fireChildActivationStart","fireActivationStart","runCanActivateChild","runCanActivate","snapshot","ActivationStart","ChildActivationStart","futureARS","canActivate","canActivateObservables","defer","closestInjector","guardVal","runInInjectionContext","wrapIntoObservable","canActivateChildGuardsMapped","_","d","guardsMapped","currARS","canDeactivateObservables","runCanLoadGuards","segments","urlSerializer","canLoad","canLoadObservables","injectionToken","redirectIfUrlTree","pipe","tap","redirectingNavigationError","runCanMatchGuards","canMatch","canMatchObservables","NoMatch","segmentGroup","AbsoluteRedirect","urlTree","noMatch$1","throwError","namedOutletsRedirect","redirectTo","throwError","RuntimeError","canLoadFails","route","navigationCancelingError","NavigationCancellationCode","ApplyRedirects","urlSerializer","urlTree","res","c","of","PRIMARY_OUTLET","segments","posParams","currentSnapshot","injector","redirectToFn","queryParams","fragment","routeConfig","url","outlet","params","data","title","newRedirect","runInInjectionContext","UrlTree","AbsoluteRedirect","newTree","newRoot","redirectToParams","actualParams","k","v","sourceName","group","updatedSegments","children","name","child","UrlSegmentGroup","redirectToSegments","actualSegments","s","redirectToUrlSegment","pos","idx","noMatch","matchWithChecks","segmentGroup","result","match","getOrCreateRouteInjectorIfNeeded","runCanMatchGuards","map","__spreadValues","createWildcardMatchResult","defaultUrlMatcher","parameters","last","split","consumedSegments","slicedSegments","config","containsEmptyPathMatchesWithNamedOutlets","createChildrenForEmptyPaths","containsEmptyPathMatches","addEmptyPathsToChildrenIfNeeded","routes","emptyPathMatch","getOutlet","primarySegment","r","isImmediateMatch","rawSegment","noLeftoversInUrl","NoLeftoversInUrl","recognize$1","configLoader","rootComponentType","paramsInheritanceStrategy","Recognizer","MAX_ALLOWED_REDIRECTS","e","rootSegmentGroup","rootSnapshot","rootNode","TreeNode","routeState","RouterStateSnapshot","tree","createUrlTreeFromSnapshot","ActivatedRouteSnapshot","catchError","NoMatch","parentRoute","childOutlets","from","concatMap","childOutlet","sortedConfig","sortByMatchingOutlets","scan","outletChildren","defaultIfEmpty","mergeMap","noMatch$1","mergedChildren","mergeEmptyPathMatches","sortActivatedRouteSnapshots","allowRedirects","first","x","isEmptyError","matched","positionalParamSegments","remainingSegments","getData","getResolve","inherited","getInherited","newSegments","matchResult","switchMap","childConfig","childInjector","snapshot","matchedOnOutlet","runCanLoadGuards","shouldLoadResult","tap","cfg","nodes","a","b","hasEmptyPathConfig","node","mergedNodes","duplicateEmptyPathNode","resultNode","mergedNode","n","getData","route","getResolve","recognize","injector","configLoader","rootComponentType","config","serializer","paramsInheritanceStrategy","mergeMap","t","recognize$1","map","targetSnapshot","urlAfterRedirects","__spreadProps","__spreadValues","resolveData","canActivateChecks","of","routesWithResolversToRun","check","routesNeedingDataUpdates","newRoute","flattenRouteTree","routesProcessed","from","concatMap","runResolve","getInherited","tap","takeLast","_","EMPTY","descendants","child","futureARS","futureRSS","resolve","hasStaticTitle","RouteTitleKey","resolveNode","resolvedData","keys","getDataKeys","data","key","getResolver","first","value","RedirectCommand","redirectingNavigationError","DefaultUrlSerializer","mapTo","catchError","e","isEmptyError","throwError","injectionToken","closestInjector","getClosestRouteInjector","resolver","getTokenOrFunctionIdentity","resolverValue","runInInjectionContext","wrapIntoObservable","switchTap","next","switchMap","v","nextResult","TitleStrategy","_TitleStrategy","snapshot","pageTitle","PRIMARY_OUTLET","ɵɵdefineInjectable","inject","DefaultTitleStrategy","_DefaultTitleStrategy","title","ɵɵinject","Title","ROUTER_CONFIGURATION","InjectionToken","ROUTES","RouterConfigLoader","_RouterConfigLoader","Compiler","loadRunner","maybeUnwrapDefaultExport","component","finalize","loader","ConnectableObservable","Subject","refCount","parentInjector","loadChildren","compiler","onLoadEndListener","NgModuleFactory$1","factoryOrRoutes","rawRoutes","requireStandaloneComponents","standardizeConfig","isWrappedDefaultExport","input","UrlHandlingStrategy","_UrlHandlingStrategy","DefaultUrlHandlingStrategy","_DefaultUrlHandlingStrategy","url","newUrlPart","wholeUrl","CREATE_VIEW_TRANSITION","NAVIGATION_ERROR_HANDLER","InjectionToken","NavigationTransitions","_NavigationTransitions","Subject","inject","RouterConfigLoader","EnvironmentInjector","UrlSerializer","ChildrenOutletContexts","Location","INPUT_BINDER","TitleStrategy","ROUTER_CONFIGURATION","UrlHandlingStrategy","CREATE_VIEW_TRANSITION","of","onLoadStart","RouteConfigLoadStart","onLoadEnd","RouteConfigLoadEnd","_a","request","id","__spreadProps","__spreadValues","router","initialUrlTree","initialRouterState","BehaviorSubject","IMPERATIVE_NAVIGATION","filter","t","map","switchMap","overallTransitionState","completed","errored","NavigationCancellationCode","EMPTY","urlTransition","onSameUrlNavigation","reason","NavigationSkipped","NavigationSkippedCode","_b","transition","NavigationStart","recognize","tap","routesRecognized","RoutesRecognized","extractedUrl","source","restoredState","extras","navStart","targetSnapshot","createEmptyState","guardsStart","GuardsCheckStart","getAllRouteGuards","checkGuards","evt","redirectingNavigationError","guardsEnd","GuardsCheckEnd","switchTap","resolveStart","ResolveStart","dataResolved","resolveData","resolveEnd","ResolveEnd","loadComponents","route","loaders","loadedComponent","child","combineLatest","defaultIfEmpty","take","currentSnapshot","viewTransitionStarted","from","targetRouterState","createRouterState","BeforeActivateRoutes","activateRoutes","NavigationEnd","takeUntil","err","finalize","catchError","e","isNavigationCancelingError","NavigationCancel","isRedirectingNavigationCancelingError","RedirectRequest","navigationError","NavigationError","navigationErrorHandlerResult","runInInjectionContext","RedirectCommand","message","cancellationCode","errorHandlerResult","ee","code","navCancel","ɵɵdefineInjectable","isBrowserTriggeredNavigation","RouteReuseStrategy","_RouteReuseStrategy","DefaultRouteReuseStrategy","BaseRouteReuseStrategy","detachedTree","future","curr","_DefaultRouteReuseStrategy","ɵDefaultRouteReuseStrategy_BaseFactory","ɵɵgetInheritedFactory","StateManager","_StateManager","HistoryStateManager","_HistoryStateManager","UrlTree","listener","event","currentTransition","rawUrl","url","path","currentBrowserPageId","state","navigation","restoringFromCaughtError","targetPagePosition","navigationId","routerPageId","ɵHistoryStateManager_BaseFactory","NavigationResult","afterNextNavigation","action","result","defaultErrorHandler","error","exactMatchOptions","subsetMatchOptions","Router","_Router","Console","PendingTasks","ROUTES","Subscription","subscription","currentNavigation","opts","mergedTree","isPublicRouterEvent","rootComponentType","stateCopy","urlTree","config","standardizeConfig","commands","navigationExtras","relativeTo","queryParams","fragment","queryParamsHandling","preserveFragment","f","q","relativeToUrlSegmentGroup","relativeToSnapshot","createSegmentGroupFromRoute","createUrlTreeFromSegmentGroup","isUrlTree","validateCommands","matchOptions","options","containsTree","params","key","value","priorPromise","resolve","reject","promise","res","rej","taskId","i","RuntimeError","ROUTER_SCROLLER","InjectionToken","provideRouter","routes","features","makeEnvironmentProviders","ROUTES","ActivatedRoute","rootRoute","Router","APP_BOOTSTRAP_LISTENER","getBootstrapListener","feature","router","getBootstrapListener","injector","inject","Injector","bootstrappedComponentRef","_a","_b","ref","ApplicationRef","router","Router","bootstrapDone","BOOTSTRAP_DONE","INITIAL_NAVIGATION","ROUTER_PRELOADER","InjectFlags","ROUTER_SCROLLER","InjectionToken","Subject","ROUTER_PRELOADER","InjectionToken","TuiBreakpointService","Observable","media","ngZone","size$","subscriber","a","b","ret","key","map","width","size","distinctUntilChanged","tuiZoneOptimized","shareReplay","ɵɵinject","TUI_MEDIA","NgZone","TUI_WINDOW_SIZE","ɵɵdefineInjectable","TuiFormatDateService","locale","timestamp","of","LOCALE_ID","TuiHintService","BehaviorSubject","directive","hint","TuiPositionService","Observable","el","animationFrame","zone","accessor","subscriber","map","rect","tuiZonefree","finalize","EMPTY_CLIENT_RECT","ɵɵinject","ElementRef","ANIMATION_FRAME","NgZone","TuiPositionAccessor","ɵɵdefineInjectable","TuiSvgService","tuiSanitizer","sanitizer","icons","BehaviorSubject","value","key","name","src","map","parsed","tuiProcessIcon","SecurityContext","ɵɵinject","TUI_SANITIZER","DomSanitizer","TUI_ICONS","ɵɵdefineInjectable","TuiVisualViewportService","win","isWebkit","y","x","_a","_b","WINDOW","TUI_IS_WEBKIT","TuiSvgComponent_ng_container_0_div_1_Template","rf","ctx","ɵɵelement","innerHTML_r1","ɵɵnextContext","ɵɵproperty","ɵɵsanitizeHtml","TuiSvgComponent_ng_container_0_ng_template_2_Template","_r2","ɵɵgetCurrentView","ɵɵnamespaceSVG","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r2","ɵɵresetView","ɵɵelementEnd","ɵɵadvance","ɵɵattribute","TuiSvgComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵtemplate","ɵɵtemplateRefExtractor","ɵɵelementContainerEnd","useTemplate_r4","ɵɵreference","TUI_DEPRECATED_ICONS","TUI_SVG_DEFAULT_OPTIONS","TUI_DEFAULT_ICONS_PLACE","tuiIconsPathFactory","identity","tuiSvgLinearGradientProcessor","src","oldIcon","newIcon","TUI_SVG_OPTIONS","tuiCreateTokenFromFactory","inject","TUI_ICONS_PLACE","TUI_ICONS_PATH","TUI_SVG_SRC_PROCESSOR","TUI_SVG_CONTENT_PROCESSOR","TUI_SVG_SRC_INTERCEPTORS","InjectionToken","UNDEFINED_NAMED_ICON","MISSING_EXTERNAL_ICON","FAILED_EXTERNAL_ICON","TuiSvgComponent","doc","win","options","srcInterceptors","tuiSanitizer","svgService","staticRequestService","sanitizer","el","baseHref","ReplaySubject","switchMap","tuiIsString","of","startWith","src","_a","deprecated","newSrc","interceptor","tuiGetDocumentOrShadowRoot","TUI_CACHE_BUSTING_PAYLOAD","tuiIsPresumedHTMLString","use","isUse","message","icon","event","TUI_ICON_ERROR","name","iconsPath","SecurityContext","url","catchError","map","response","ɵɵdirectiveInject","DOCUMENT","WINDOW","TUI_SVG_OPTIONS","TUI_SVG_SRC_INTERCEPTORS","TUI_SANITIZER","TuiSvgService","TuiStaticRequestService","DomSanitizer","ElementRef","TUI_BASE_HREF","ɵɵdefineComponent","rf","ctx","ɵɵtemplate","TuiSvgComponent_ng_container_0_Template","ɵɵpipe","ɵɵproperty","ɵɵpipeBind1","TuiLetDirective","NgIf","AsyncPipe","__decorate","tuiPure","TuiSvgModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiLetModule","TRANSITION","DURATION","STAGGER","tuiHeightCollapse","trigger","transition","style","animate","tuiHeightCollapseList","query","stagger","tuiWidthCollapse","tuiWidthCollapseList","tuiFadeIn","tuiFadeInList","tuiFadeInTop","tuiFadeInBottom","tuiDropdownAnimation","tuiScaleIn","tuiPop","tuiScaleInList","tuiSlideIn","tuiSlideInLeft","tuiSlideInLeftList","tuiSlideInRight","tuiSlideInRightList","tuiSlideInTop","tuiSlideInTopList","tuiSlideInBottom","tuiSlideInBottomList","TuiModeDirective","AbstractTuiController","ɵTuiModeDirective_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineDirective","ɵɵInheritDefinitionFeature","TUI_IS_MOBILE_RES_PROVIDER","TUI_IS_MOBILE_RES","SkipSelf","ElementRef","mobile$","nativeElement","MODE_PROVIDER","TUI_MODE","Optional","TuiModeDirective","mode","mode$","startWith","map","of","_c0","TuiScrollbarComponent_tui_scroll_controls_0_Template","rf","ctx","ɵɵelement","TuiScrollbarComponent","cssRef","el","userAgent","isIos","tuiIsFirefox","ElementRef","element","detail","_a","nativeElement","offsetTop","offsetLeft","tuiGetElementOffset","clientHeight","clientWidth","offsetHeight","offsetWidth","scrollTop","scrollLeft","ɵɵ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","ɵɵadvance","TuiScrollControlsComponent","NgIf","TuiScrollbarModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiScrollControlsModule","dasharize","camel","letterLetter","AbstractEventPlugin","event","v","BindEventPlugin","element","EMPTY","method","zone$","sub","concat","takeWhile","defer","key","value","unit","ɵBindEventPlugin_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineInjectable","GLOBAL_HANDLER","InjectionToken","document","inject","DOCUMENT","name","GlobalEventPlugin","_","handler","ɵGlobalEventPlugin_BaseFactory","OptionsEventPlugin","ɵOptionsEventPlugin_BaseFactory","PreventEventPlugin","wrapped","ɵPreventEventPlugin_BaseFactory","SelfEventPlugin","ɵSelfEventPlugin_BaseFactory","SilentEventPlugin","ɵSilentEventPlugin_BaseFactory","StopEventPlugin","ɵStopEventPlugin_BaseFactory","ZoneEventPlugin","ɵZoneEventPlugin_BaseFactory","PLUGINS","NG_EVENT_PLUGINS","useClass","EVENT_MANAGER_PLUGINS","shouldCall","predicate","_target","_key","desc","args","EventPluginsModule","plugin","SilentEventPlugin","ɵɵinject","EVENT_MANAGER_PLUGINS","ɵɵdefineNgModule","ɵɵdefineInjector","NG_EVENT_PLUGINS","_c0","a0","TuiDropdownComponent_div_3_Template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","text_r2","ɵɵadvance","ɵɵtextInterpolate1","TUI_DROPDOWN_COMPONENT","tuiCreateTokenFromFactory","TuiDropdownComponent","TuiDropdownOpenDirective","EventEmitter","open","_a","ɵɵdefineDirective","ɵɵNgOnChangesFeature","TuiDropdownDirective","destroy$","el","dropdown","injector","dropdownService","Subject","PolymorpheusComponent","throttleTime","takeUntil","_b","tuiCheckFixedPosition","show","ɵɵdirectiveInject","TuiDestroyService","ElementRef","INJECTOR$1","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","ɵɵ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","TuiDropdownPositionDirective","TuiPositionAccessor","viewport","accessors","directive","width","height","_b","hostRect","EMPTY_CLIENT_RECT","viewportRect","minHeight","align","direction","offset","limitWidth","previous","available","rectWidth","right","left","position","better","tuiFallbackRectAccessor","TUI_VIEWPORT","TuiRectAccessor","TuiDropdownDirective","__decorate","tuiPure","TuiDropdownComponent","vvs","position$","destroy$","animation","el","accessor","win","mode$","hoverDirective","map","point","takeUntil","top","hovered","style","maxHeight","innerHeight","clientRect","rect","offsetX","offsetY","sided","tuiPx","nativeElement","ownerDocument","root","focusable","tuiGetClosestFocusable","TuiVisualViewportService","TuiPositionService","TuiDestroyService","TUI_ANIMATION_OPTIONS","ElementRef","WINDOW","TUI_MODE","ɵɵdefineComponent","rf","ctx","ɵɵlistener","ɵɵsyntheticHostProperty","ɵɵattribute","tuiPositionAccessorFor","tuiRectAccessorFor","MODE_PROVIDER","_r1","ɵɵgetCurrentView","ɵɵelementStart","$event","ɵɵrestoreView","ɵɵresetView","ɵɵelementEnd","ɵɵtemplate","TuiDropdownComponent_div_3_Template","activeZone_r3","ɵɵreference","ɵɵadvance","ɵɵproperty","ɵɵpureFunction1","_c0","TuiScrollbarComponent","TuiActiveZoneDirective","TuiOverscrollDirective","TuiHoveredDirective","PolymorpheusOutletDirective","tuiDropdownAnimation","TuiDropdownDriverDirective","AbstractTuiDriverDirective","destroy$","drivers","vehicles","ɵɵdirectiveInject","TuiDestroyService","TuiDriver","TuiVehicle","ɵɵdefineDirective","ɵɵProvidersFeature","ɵɵInheritDefinitionFeature","TuiDropdownManualDirective","TuiDriver","subscriber","BehaviorSubject","ɵɵdefineDirective","ɵɵProvidersFeature","tuiAsDriver","ɵɵInheritDefinitionFeature","ɵɵNgOnChangesFeature","TuiDropdownPositionSidedDirective","TuiPositionAccessor","options","viewport","vertical","rect","_a","_b","height","width","hostRect","EMPTY_CLIENT_RECT","direction","minHeight","offset","align","available","position","better","maxLeft","left","ɵɵdirectiveInject","TUI_DROPDOWN_OPTIONS","TUI_VIEWPORT","TuiDropdownPositionDirective","tuiAsPositionAccessor","TuiDropdownSelectionDirective","range","doc","selection$","el","vcr","dropdown","ALWAYS_TRUE_HANDLER","combineLatest","map","distinctUntilChanged","x","y","handler","contained","tuiIsTextNode","visible","tuiIsString","commonAncestorContainer","element","tuiIsElement","tuiGetWordRange","active","tuiGetNativeFocused","selection","tuiIsTextfield","startContainer","endContainer","nativeElement","inDropdown","hostToDropdown","dropdownToHost","ghost","top","selectionStart","selectionEnd","value","tuiPx","CHAR_ZERO_WIDTH_SPACE","CHAR_NO_BREAK_SPACE","node","font","letterSpacing","textTransform","padding","TUI_RANGE","DOCUMENT","TUI_SELECTION_STREAM","ElementRef","ViewContainerRef","TuiDropdownDirective","tuiAsRectAccessor","TuiDropdownModule","ɵɵdefineNgModule","ɵɵdefineInjector","PolymorpheusModule","TuiActiveZoneModule","TuiOverscrollModule","TuiScrollbarModule","TuiHoveredModule","_c0","TuiHintComponent_span_1_Template","rf","ctx","ɵɵelement","text_r1","ɵɵproperty","ɵɵsanitizeHtml","TUI_HINT_COMPONENT","tuiCreateTokenFromFactory","TuiHintComponent","TUI_HINT_DEFAULT_OPTIONS","TUI_HINT_OPTIONS","tuiCreateToken","TuiHintOptionsDirective","AbstractTuiController","options","ɵɵdirectiveInject","TUI_HINT_OPTIONS","ɵɵdefineDirective","ɵɵProvidersFeature","forwardRef","ɵɵInheritDefinitionFeature","TuiHintDirective","el","component","hintService","activeZone","content","_a","show","ElementRef","PolymorpheusComponent","TuiHintService","TuiActiveZoneDirective","tuiAsRectAccessor","tuiAsVehicle","TUI_HINT_COMPONENT","INJECTOR$1","TuiHintHoverDirective","TuiDriver","hovered$","parent","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","t","ɵɵgetInheritedFactory","rf","ctx","ɵɵlistener","$event","OFFSET","ARROW_OFFSET","TOP","LEFT","TuiHintPositionDirective","TuiPositionAccessor","viewport","directive","accessors","TUI_HINT_DIRECTIONS","acc","direction","width","height","_b","hostRect","leftCenter","topCenter","tuiFallbackRectAccessor","top","left","TUI_VIEWPORT","TuiRectAccessor","__decorate","tuiPure","GAP","TuiHintComponent","position$","destroy$","animation","pointer","accessor","polymorpheus","hover","mode","vvs","point","target","style","rect","safeLeft","tuiClamp","beakTop","beakLeft","tuiPx","TuiPositionService","TuiDestroyService","TUI_ANIMATION_OPTIONS","POLYMORPHEUS_CONTEXT","TuiModeDirective","TuiVisualViewportService","ɵɵdefineComponent","ɵɵresolveDocument","ɵɵsyntheticHostProperty","ɵɵattribute","ɵɵclassProp","tuiPositionAccessorFor","tuiRectAccessorFor","_c0","ɵɵprojectionDef","ɵɵprojection","ɵɵtemplate","TuiHintComponent_span_1_Template","ɵɵadvance","ɵɵproperty","PolymorpheusOutletDirective","tuiFadeIn","TuiHintDescribeDirective","zone","doc","ReplaySubject","tuiIfMap","tuiTypedFromEvent","tuiIsPresent","debounce","timer","startWith","distinctUntilChanged","skip","tuiZoneOptimized","tuiIsNativeFocused","NgZone","DOCUMENT","ɵɵNgOnChangesFeature","TuiHintDriverDirective","AbstractTuiDriverDirective","drivers","vehicles","TuiVehicle","TuiHintModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","PolymorpheusModule","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","TuiMaskAccessorDirective","ɵɵdefineDirective","ɵɵProvidersFeature","NG_VALUE_ACCESSOR","Optional","TUI_VALUE_ACCESSOR","DefaultValueAccessor","accessor","fallback","TuiMaskAccessorModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiWrapperDirective","mode$","TuiInteractiveState","ɵɵdirectiveInject","TUI_MODE","ɵɵdefineDirective","rf","ctx","ɵɵlistener","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","MODE_PROVIDER","TuiWrapperModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","TuiLoaderComponent_div_2_div_3_ng_container_1_Template","rf","ctx","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","text_r1","ɵɵadvance","ɵɵtextInterpolate1","TuiLoaderComponent_div_2_div_3_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ctx_r1","ɵɵnextContext","ɵɵclassProp","ɵɵproperty","TuiLoaderComponent_div_2_Template","ɵɵnamespaceSVG","ɵɵelement","ɵɵattribute","TUI_LOADER_DEFAULT_OPTIONS","TUI_LOADER_OPTIONS","tuiCreateToken","TuiLoaderComponent","doc","el","isIos","options","tuiIsSafari","value","tuiBlurNativeFocused","tuiSizeBigger","tuiIsNativeFocusedIn","ɵɵdirectiveInject","DOCUMENT","ElementRef","TUI_IS_IOS","TUI_LOADER_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵclassProp","_c0","ɵɵprojectionDef","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵtemplate","TuiLoaderComponent_div_2_Template","ɵɵproperty","ɵɵattribute","ɵɵadvance","NgIf","PolymorpheusOutletDirective","TuiLoaderModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","PolymorpheusModule","_c0","_c1","TuiButtonComponent_ng_container_0_Template","rf","ctx","ɵɵelementContainer","TuiButtonComponent_span_4_tui_svg_1_Template","ɵɵelement","text_r1","ɵɵproperty","TuiButtonComponent_span_4_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ctx_r1","ɵɵnextContext","ɵɵadvance","TuiButtonComponent_span_6_tui_svg_1_Template","text_r3","TuiButtonComponent_span_6_Template","TuiButtonComponent_tui_loader_7_Template","TUI_BUTTON_DEFAULT_OPTIONS","TuiAppearance","TUI_BUTTON_OPTIONS","tuiCreateToken","TuiButtonComponent","AbstractTuiInteractive","mode","el","options","_a","EMPTY","startWith","map","distinctUntilChanged","tuiIsNativeFocused","focused","ɵɵdirectiveInject","TuiModeDirective","ElementRef","TUI_BUTTON_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵlistener","ɵɵhostProperty","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","TuiDestroyService","ɵɵInheritDefinitionFeature","_c0","_c1","ɵɵprojectionDef","ɵɵtemplate","TuiButtonComponent_ng_container_0_Template","ɵɵpipe","ɵɵelementStart","TuiButtonComponent_span_4_Template","ɵɵprojection","TuiButtonComponent_span_6_Template","ɵɵelementEnd","TuiButtonComponent_tui_loader_7_Template","ɵɵproperty","ɵɵpipeBind1","ɵɵadvance","TuiSvgComponent","TuiLoaderComponent","NgIf","TuiWrapperDirective","PolymorpheusOutletDirective","AsyncPipe","TuiButtonModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","PolymorpheusModule","TuiWrapperModule","TuiSvgModule","TuiLoaderModule","_c0","_c1","TuiLinkComponent_tui_svg_0_Template","rf","ctx","ɵɵelement","ctx_r0","ɵɵnextContext","ɵɵproperty","TuiLinkComponent_tui_svg_3_Template","TuiLinkComponent","el","mode$","focusVisible$","merge","tuiTypedFromEvent","map","ALWAYS_TRUE_HANDLER","ALWAYS_FALSE_HANDLER","visible","tuiIsNativeFocused","ɵɵdirectiveInject","ElementRef","TUI_MODE","TuiFocusVisibleService","ɵɵdefineComponent","ɵɵlistener","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","TuiDestroyService","MODE_PROVIDER","ɵɵprojectionDef","ɵɵtemplate","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵadvance","TuiSvgComponent","NgIf","TuiLinkModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiSvgModule","TuiDialogComponent_header_0_ng_container_1_Template","rf","ctx","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","text_r1","ɵɵadvance","ɵɵtextInterpolate1","TuiDialogComponent_header_0_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ctx_r1","ɵɵnextContext","ɵɵproperty","TuiDialogComponent_ng_container_4_Template","_r3","ɵɵgetCurrentView","ɵɵelement","ɵɵlistener","ɵɵrestoreView","ɵɵresetView","text_r4","ɵɵsanitizeHtml","TuiDialogComponent_div_6_Template","_r5","ɵɵpipe","ɵɵpipeBind1","TUI_DIALOG_DEFAULT_OPTIONS","TUI_DIALOGS_CLOSE","tuiCreateToken","EMPTY","TUI_DIALOG_OPTIONS","SCROLLBAR_PLACEHOLDER","TuiDialogCloseService","Observable","win","doc","el","subscriber","merge","tuiTypedFromEvent","filter","event","target","tuiGetActualTarget","tuiGetViewportWidth","switchMap","take","map","tuiIsElement","tuiContainsOrAfter","ɵɵinject","WINDOW","DOCUMENT","ElementRef","ɵɵdefineInjectable","REQUIRED_ERROR","toObservable","valueOrStream","isObservable","of","TuiDialogComponent","duration","isMobile","context","destroy$","dialogClose$","close$","closeWord$","icons","Subject","ALWAYS_TRUE_HANDLER","takeUntil","ɵɵdirectiveInject","TUI_ANIMATIONS_DURATION","TUI_IS_MOBILE","POLYMORPHEUS_CONTEXT","TuiDestroyService","TUI_DIALOGS_CLOSE","TUI_CLOSE_WORD","TUI_COMMON_ICONS","ɵɵdefineComponent","rf","ctx","ɵɵsyntheticHostProperty","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","ɵɵtemplate","TuiDialogComponent_header_0_Template","ɵɵelementStart","ɵɵelement","TuiDialogComponent_ng_container_4_Template","ɵɵelementEnd","TuiDialogComponent_div_6_Template","ɵɵproperty","ɵɵadvance","TuiButtonComponent","NgIf","PolymorpheusOutletDirective","TuiAutoFocusDirective","AsyncPipe","tuiSlideInTop","tuiFadeIn","DIALOG","PolymorpheusComponent","TuiDialogService","AbstractTuiDialogService","inject","TUI_DIALOG_OPTIONS","ɵTuiDialogService_BaseFactory","t","ɵɵgetInheritedFactory","TuiDialogModule","ɵɵdefineNgModule","ɵɵdefineInjector","tuiAsDialog","TuiDialogService","PolymorpheusModule","TuiButtonModule","CommonModule","TuiAutoFocusModule","TuiFormatDatePipe","service","timestampOrDate","ɵɵdirectiveInject","TuiFormatDateService","ɵɵdefinePipe","TuiFormatDatePipeModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiMonthPipe","months$","month","map","months","ɵɵdirectiveInject","TUI_MONTHS","ɵɵdefinePipe","TuiMonthPipeModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","_c1","_c2","a0","TuiOptionComponent_ng_container_0_Template","rf","ctx","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","text_r1","ɵɵadvance","ɵɵtextInterpolate1","TuiOptionComponent_ng_template_1_tui_svg_1_Template","ɵɵelement","ctx_r1","ɵɵnextContext","ɵɵproperty","TuiOptionComponent_ng_template_1_Template","ɵɵprojection","ɵɵtemplate","TuiDataListComponent_div_2_ng_container_1_Template","TuiDataListComponent_div_2_Template","ɵɵelementStart","ɵɵpipe","ɵɵelementEnd","ɵɵpipeBind1","shouldFocus","currentTarget","tuiIsNativeFocused","TuiOptionComponent","isMobile","content","dataList","el","host","dropdown","icons","_a","ɵɵdirectiveInject","TUI_IS_MOBILE","TUI_OPTION_CONTENT","forwardRef","TuiDataListComponent","ElementRef","TUI_DATA_LIST_HOST","TuiDropdownDirective","TUI_COMMON_ICONS","ɵɵdefineComponent","ɵɵlistener","$event","ɵɵattribute","ɵɵclassProp","ɵɵprojectionDef","ɵɵtemplateRefExtractor","base_r3","ɵɵreference","ɵɵpureFunction1","TuiSvgComponent","PolymorpheusOutletDirective","NgIf","__decorate","shouldCall","controller","defaultEmptyContent$","EMPTY_QUERY","tuiQueryListChanges","map","length","relatedTarget","current","step","elements","tuiMoveFocus","element","tuiIsNativeFocusedIn","tuiSetNativeMouseFocused","includeDisabled","disabled","value","tuiIsPresent","target","top","tuiIsElement","TUI_TEXTFIELD_WATCHED_CONTROLLER","TUI_NOTHING_FOUND_MESSAGE","dirIndex","ɵɵcontentQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵProvidersFeature","tuiAsDataListAccessor","TEXTFIELD_CONTROLLER_PROVIDER","AsyncPipe","tuiPure","TuiDataListDirective","ɵɵdefineDirective","TuiOptGroupDirective","ɵɵdefineDirective","rf","ctx","ɵɵattribute","TuiDataListModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiSvgModule","PolymorpheusModule","_c0","_c1","_c2","a0","a1","TuiHostedDropdownComponent_div_0_ng_template_3_div_2_Template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","text_r4","ɵɵadvance","ɵɵtextInterpolate1","TuiHostedDropdownComponent_div_0_ng_template_3_Template","_r3","ɵɵgetCurrentView","ɵɵlistener","$event","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵtemplate","ɵɵelement","activeZone_r5","ɵɵreference","ɵɵproperty","ɵɵpureFunction2","TuiHostedDropdownComponent_div_0_Template","_r1","ɵɵprojection","ɵɵtemplateRefExtractor","isOpen_r6","dropdown_r7","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","tuiAsFocusableItemAccessor","Self","position","ɵɵprojectionDef","ɵɵpipe","tmp_0_0","ɵɵpipeBind1","TuiLetDirective","TuiDropdownDriverDirective","TuiDropdownPositionDirective","TuiDropdownManualDirective","TuiDropdownPositionSidedDirective","TuiObscuredDirective","PolymorpheusTemplate","PolymorpheusOutletDirective","AsyncPipe","__decorate","shouldCall","TuiHostedDropdownModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","PolymorpheusModule","TuiLetModule","TuiObscuredModule","TuiActiveZoneModule","TuiDropdownModule","TuiTooltipComponent_tui_svg_3_Template","rf","ctx","ɵɵelement","src_r1","ɵɵproperty","TuiTooltipComponent","TuiHintOptionsDirective","destroy$","mode$","options","isMobile","takeUntil","mode","event","_a","ɵɵ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","driver_r2","ɵɵreference","ɵɵpipeBind1","ɵɵadvance","TuiSvgComponent","TuiWrapperDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintPositionDirective","TuiHintDescribeDirective","PolymorpheusOutletDirective","AsyncPipe","TuiTooltipModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiWrapperModule","TuiSvgModule","TuiHintModule","PolymorpheusModule","_c0","_c1","_c2","_c3","_c4","a0","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_r2","ɵɵproperty","TuiPrimitiveTextfieldComponent_div_12_Template","ɵɵtemplate","ctx_r2","ɵɵnextContext","ɵɵadvance","ɵɵpureFunction1","TuiPrimitiveTextfieldComponent_label_14_Template","ɵɵclassProp","TuiPrimitiveTextfieldComponent_div_20_tui_svg_1_Template","src_r4","TuiPrimitiveTextfieldComponent_div_20_Template","TuiPrimitiveTextfieldComponent_span_21_tui_svg_1_Template","src_r6","TuiPrimitiveTextfieldComponent_span_21_Template","_r5","ɵɵgetCurrentView","ɵɵlistener","ɵɵrestoreView","ɵɵresetView","TuiPrimitiveTextfieldComponent_tui_tooltip_22_Template","TuiPrimitiveTextfieldComponent_div_23_tui_svg_1_Template","src_r7","TuiPrimitiveTextfieldComponent_div_23_Template","TuiValueDecorationComponent","textfield","fontsReady$","BehaviorSubject","merge","delay","filter","_a","map","distinctUntilChanged","TuiAppearance","focused","placeholder","exampleText","value","ɵɵ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","_c3","_r1","ɵɵgetCurrentView","ɵɵprojectionDef","_c2","ɵɵtemplate","TuiPrimitiveTextfieldComponent_ng_container_0_Template","ɵɵpipe","TuiPrimitiveTextfieldComponent_ng_container_2_Template","ɵɵelementStart","$event","ɵɵrestoreView","ɵɵresetView","ɵɵ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","focusableElement_r8","ɵɵreference","decor_r9","ɵɵpipeBind1","TuiSvgComponent","TuiTooltipComponent","NgIf","TuiWrapperDirective","TuiAutofilledDirective","TuiMaskAccessorDirective","DefaultValueAccessor","NgControlStatus","NgModel","TuiFocusableDirective","AsyncPipe","__decorate","tuiPure","TuiPrimitiveTextfieldDirective","AbstractTuiTextfieldHost","ɵɵdefineDirective","tuiAsTextfieldHost","TuiPrimitiveTextfieldModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","FormsModule","PolymorpheusModule","TuiMaskAccessorModule","TuiFocusableModule","TuiWrapperModule","TuiSvgModule","TuiTooltipModule","TuiAutofilledModule","_c0","_c1","TuiPushComponent_button_2_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵpipe","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","ɵɵstyleProp","ɵɵproperty","ɵɵpipeBind1","TuiPushComponent_span_7_Template","ɵɵelement","TuiPushAlertComponent_tui_push_0_img_1_Template","ɵɵsanitizeUrl","TuiPushAlertComponent_tui_push_0_tui_svg_2_Template","TuiPushAlertComponent_tui_push_0_div_3_Template","text_r3","ɵɵsanitizeHtml","TuiPushAlertComponent_tui_push_0_button_4_Template","_r4","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate1","TuiPushAlertComponent_tui_push_0_button_5_Template","_r5","TuiPushAlertComponent_tui_push_0_Template","ɵɵtemplate","TuiPushAlertComponent_ng_template_1_ng_container_0_Template","ɵɵelementContainer","TuiPushAlertComponent_ng_template_1_Template","TuiPushComponent","closeWord$","icons","EventEmitter","tuiIsString","tuiIsObserved","ɵɵdirectiveInject","TUI_CLOSE_WORD","TUI_COMMON_ICONS","ɵɵdefineComponent","ɵɵprojectionDef","ɵɵprojection","TuiButtonComponent","NgIf","AsyncPipe","TuiFormatDatePipe","TuiPushDirective","TuiModeDirective","modeDirective","_a","Subject","ɵɵdefineDirective","ɵɵProvidersFeature","TUI_BUTTON_OPTIONS","ɵɵInheritDefinitionFeature","TUI_PUSH_DEFAULT_OPTIONS","TUI_PUSH_OPTIONS","tuiCreateToken","TuiPushAlertDirective","PolymorpheusTemplate","template","cdr","destroy$","push","Subject","tuiIfMap","takeUntil","show","ɵɵdirectiveInject","TemplateRef","ChangeDetectorRef","TuiDestroyService","forwardRef","TuiPushService","ɵɵdefineDirective","ɵɵProvidersFeature","ɵɵInheritDefinitionFeature","TuiPushAlertComponent","animation","context","TUI_ANIMATION_OPTIONS","POLYMORPHEUS_CONTEXT","ɵɵdefineComponent","rf","ctx","ɵɵsyntheticHostProperty","ɵɵtemplate","TuiPushAlertComponent_tui_push_0_Template","TuiPushAlertComponent_ng_template_1_Template","ɵɵtemplateRefExtractor","directive_r6","ɵɵreference","ɵɵproperty","TuiPushComponent","TuiSvgComponent","TuiButtonComponent","TuiLinkComponent","NgIf","TuiPushDirective","PolymorpheusOutletDirective","tuiFadeIn","tuiSlideInRight","tuiHeightCollapse","AbstractTuiDialogService","PolymorpheusComponent","inject","TUI_PUSH_OPTIONS","ɵTuiPushService_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineInjectable","TuiPushModule","ɵɵdefineNgModule","ɵɵdefineInjector","TUI_ALERTS","CommonModule","PolymorpheusModule","TuiButtonModule","TuiLinkModule","TuiSvgModule","TuiFormatDatePipeModule","_c0","_c1","a0","TuiToggleComponent_tui_loader_2_Template","rf","ctx","ɵɵelement","ctx_r1","ɵɵnextContext","ɵɵproperty","TuiToggleComponent_span_3_tui_svg_1_Template","src_r3","TuiToggleComponent_span_3_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ɵɵadvance","ɵɵpureFunction1","TuiToggleComponent_tui_loader_5_Template","TuiToggleComponent_span_6_tui_svg_1_Template","src_r4","TuiToggleComponent_span_6_Template","TUI_TOGGLE_DEFAULT_OPTIONS","$implicit","TuiAppearance","TUI_TOGGLE_OPTIONS","tuiCreateToken","TuiToggleComponent","AbstractTuiControl","control","cdr","modeDirective","options","_a","_b","tuiIsNativeFocused","checked","focused","focusVisible","ɵɵdirectiveInject","NgControl","ChangeDetectorRef","TuiModeDirective","TUI_TOGGLE_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","_c0","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","tuiAsControl","ɵɵInheritDefinitionFeature","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵtemplate","TuiToggleComponent_tui_loader_2_Template","TuiToggleComponent_span_3_Template","ɵɵelement","TuiToggleComponent_tui_loader_5_Template","TuiToggleComponent_span_6_Template","ɵɵelementEnd","ɵɵtwoWayListener","$event","ɵɵrestoreView","ɵɵtwoWayBindingSet","ɵɵresetView","ɵɵlistener","ɵɵproperty","ɵɵadvance","ɵɵtwoWayProperty","TuiLoaderComponent","TuiSvgComponent","TuiWrapperDirective","NgIf","PolymorpheusOutletDirective","TuiCheckedDirective","TuiFocusableDirective","TuiFocusedDirective","TuiFocusVisibleDirective","TuiToggleModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiFocusedModule","TuiFocusableModule","TuiPressedModule","TuiFocusVisibleModule","TuiCheckedModule","TuiWrapperModule","TuiSvgModule","TuiLoaderModule","PolymorpheusModule","AbstractTuiEditor","Subject","ɵɵdefineDirective","tuiIsEmptyParagraph","json","TuiTiptapEditorService","AbstractTuiEditor","editorRef","editor","update","content","value","editable","EDITOR_BLANK_COLOR","size","tuiPx","_a","_b","_c","_d","style","styles","tuiParseStyle","align","src","commands","state","setImage","anchor","color","type","nameOrAttributes","startWith","map","distinctUntilChanged","cols","rows","level","options","href","EditorState","pos","schema","doc","range","tuiGetMarkRange","preview","typeOrName","attributes","ɵɵinject","TIPTAP_EDITOR","ɵɵdefineInjectable","TuiTiptapEditorDirective","el","renderer","editorContainer","editorLoaded$","destroy$","takeUntil","ɵɵdirectiveInject","ElementRef","Renderer2","INITIALIZATION_TIPTAP_CONTAINER","TuiDestroyService","ɵɵdefineDirective","ɵɵProvidersFeature","TuiTiptapEditorModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","alignState_r3","texts_r4","ɵɵadvance","ɵɵproperty","TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_Template","ɵɵelement","ɵɵtemplate","ɵɵtemplateRefExtractor","align_r5","ɵɵreference","alignDropdown_r6","TuiAlignContentComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵpipe","ɵɵelementContainerEnd","ɵɵpipeBind1","TuiAlignContentComponent","options","editor","texts$","combineLatest","map","left","right","center","justify","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","NgIf","TuiLetDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiAlignContentModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiHintModule","TuiLetModule","TuiCodeComponent_ng_template_5_button_1_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","index_r2","ɵɵrestoreView","ctx_r2","ɵɵnextContext","ɵɵresetView","ɵɵtext","ɵɵelementEnd","item_r4","ɵɵadvance","ɵɵtextInterpolate1","TuiCodeComponent_ng_template_5_Template","ɵɵtemplate","ɵɵpipe","ɵɵproperty","ɵɵpipeBind1","TuiCodeComponent","options","editor","texts$","codeOptionsTexts$","map","texts","distinctUntilChanged","isCodeBlock","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_CODE_OPTIONS","ɵɵdefineComponent","ɵɵelement","ɵɵtemplateRefExtractor","codes_r5","ɵɵreference","codesDropdown_r6","TuiHostedDropdownComponent","TuiButtonComponent","TuiDataListComponent","TuiOptionComponent","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","NgForOf","AsyncPipe","TuiCodeModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiHintModule","TuiDataListModule","TuiDetailsComponent_button_0_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","text_r3","ɵɵproperty","TuiDetailsRemoveComponent_button_0_Template","ɵɵpipe","ɵɵpipeBind1","TuiDetailsComponent","editor","texts$","options","ɵɵdirectiveInject","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_OPTIONS","ɵɵdefineComponent","ɵɵtemplate","TuiButtonComponent","NgIf","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiDetailsRemoveComponent","map","distinctUntilChanged","TuiDetailsModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiButtonModule","TuiHintModule","_c0","TuiFontSizeComponent_ng_template_4_button_1_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵpipe","ɵɵlistener","item_r2","ɵɵrestoreView","ctx_r2","ɵɵnextContext","ɵɵresetView","ɵɵtext","ɵɵelementEnd","ɵɵstyleProp","ɵɵproperty","ɵɵpureFunction0","ɵɵattribute","ɵɵpipeBind1","ɵɵadvance","ɵɵtextInterpolate1","TuiFontSizeComponent_ng_template_4_Template","ɵɵtemplate","TuiFontSizeComponent","options","editor","texts$","fontOptionsTexts$","map","texts","headingLevel","px","color","tuiPx","EDITOR_BLANK_COLOR","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_FONT_OPTIONS","ɵɵdefineComponent","ɵɵelement","ɵɵtemplateRefExtractor","fonts_r4","ɵɵreference","fontsDropdown_r5","TuiHostedDropdownComponent","TuiButtonComponent","TuiDataListComponent","TuiOptionComponent","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","NgForOf","NgClass","NgStyle","AsyncPipe","LowerCasePipe","TuiFontSizeModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiHintModule","TuiDataListModule","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_1_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","state_r3","texts_r4","ɵɵproperty","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_2_Template","_r5","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_3_Template","_r6","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_4_Template","_r7","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template","ɵɵtemplate","ɵɵadvance","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_Template","ɵɵelement","ɵɵtemplateRefExtractor","format_r8","ɵɵreference","formatDropdown_r9","TuiFontStyleComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵpipe","ɵɵelementContainerEnd","ɵɵpipeBind1","TuiFontStyleComponent","options","editor","texts$","defaultEditorTools","TuiEditorTool","combineLatest","map","bold","italic","underline","strike","value","tool","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","NgIf","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiFontStyleModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiHintModule","TuiEditorGroupToolComponent","editor","texts$","options","map","texts","distinctUntilChanged","ɵɵdirectiveInject","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵelementStart","ɵɵpipe","ɵɵlistener","ɵɵelementEnd","ɵɵproperty","ɵɵpipeBind1","ɵɵadvance","TuiButtonComponent","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiEditorToolGroup","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiButtonModule","TuiHintModule","tuiControlValueFactory","control","valueTransformer","tuiControlValue","map","value","of","TUI_CALENDAR_DATE_STREAM","InjectionToken","tuiDateStreamWithTransformer","transformer","Optional","Self","NgControl","tuiControlValueFactory","TUI_COUNTRIES_DEFAULT_MASKS","TuiCountryIsoCode","TUI_COUNTRIES_MASKS","tuiCreateToken","TUI_DATE_VALUE_TRANSFORMER","InjectionToken","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","tuiCreateToken","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","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","ɵɵdefineDirective","ɵɵProvidersFeature","TUI_VALUE_ACCESSOR_PROVIDER","TuiValueAccessorModule","ɵɵdefineNgModule","ɵɵdefineInjector","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","MaskitoDirective","ngZone","elementRef","MASKITO_DEFAULT_OPTIONS","MASKITO_DEFAULT_ELEMENT_PREDICATE","_a","__awaiter","predicate","predicateResult","Maskito","ɵɵdirectiveInject","NgZone","ElementRef","ɵɵdefineDirective","ɵɵNgOnChangesFeature","MaskitoModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","_c1","_c2","TuiInputInlineComponent_span_2_Template","rf","ctx","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","TuiInputInlineComponent","AbstractTuiControl","control","cdr","tuiIsNativeFocused","value","focused","_a","indent","ɵɵdirectiveInject","NgControl","ChangeDetectorRef","ɵɵdefineComponent","ɵɵviewQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵProvidersFeature","TUI_VALUE_ACCESSOR_PROVIDER","tuiAsFocusableItemAccessor","ɵɵInheritDefinitionFeature","_r1","ɵɵgetCurrentView","ɵɵprojectionDef","ɵɵelement","ɵɵtemplate","ɵɵlistener","$event","ɵɵrestoreView","ɵɵresetView","ɵɵstyleProp","ɵɵproperty","ɵɵadvance","ɵɵattribute","NgIf","TuiMaskAccessorDirective","DefaultValueAccessor","NgControlStatus","NgModel","TuiFocusableDirective","TuiFocusedDirective","TuiInputInlineModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","FormsModule","TuiFocusableModule","TuiFocusedModule","TuiMaskAccessorModule","TuiPaletteComponent_button_0_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","color_r2","ɵɵrestoreView","ctx_r2","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","ɵɵstyleProp","ɵɵproperty","TuiPaletteComponent","EventEmitter","_a","_b","ɵɵdefineComponent","rf","ctx","ɵɵtemplate","TuiPaletteComponent_button_0_Template","ɵɵpipe","ɵɵproperty","ɵɵpipeBind2","NgForOf","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","TuiHintDescribeDirective","KeyValuePipe","TuiPaletteModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHintModule","TuiHighlightColorComponent_tui_hosted_dropdown_0_div_4_Template","rf","ctx","ɵɵelement","selectedColor_r1","ɵɵnextContext","ɵɵstyleProp","TuiHighlightColorComponent_tui_hosted_dropdown_0_ng_template_5_Template","_r2","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","ctx_r2","ɵɵresetView","ɵɵelementEnd","activeZone_r4","ɵɵproperty","TuiHighlightColorComponent_tui_hosted_dropdown_0_Template","ɵɵpipe","ɵɵtemplate","ɵɵtemplateRefExtractor","hilite_r5","ɵɵreference","hiliteDropdown_r6","ɵɵadvance","ɵɵpipeBind1","TuiHighlightColorComponent","options","editor","texts$","map","distinctUntilChanged","texts","color","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","TuiPaletteComponent","TuiLetDirective","TuiDropdownOptionsDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","NgIf","TuiActiveZoneDirective","AsyncPipe","TuiHighlightColorModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiPaletteModule","TuiHintModule","TuiDropdownModule","TuiActiveZoneModule","TuiLetModule","TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","state_r3","texts_r4","ɵɵadvance","ɵɵproperty","TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_Template","ɵɵelement","ɵɵtemplate","ɵɵtemplateRefExtractor","list_r5","ɵɵreference","listDropdown_r6","TuiListConfigsComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵpipe","ɵɵelementContainerEnd","ɵɵpipeBind1","TuiListConfigsComponent","options","editor","texts$","combineLatest","map","ordered","unordered","tasked","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","NgIf","TuiLetDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiListConfigsModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiHintModule","TuiLetModule","TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_div_4_Template","rf","ctx","ɵɵelement","color_r1","ɵɵnextContext","ɵɵstyleProp","TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_5_Template","_r2","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","colorSelect_r3","ɵɵreference","ɵɵresetView","ɵɵelementEnd","activeZone_r5","ctx_r3","ɵɵproperty","TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_Template","ɵɵpipe","ɵɵtemplate","ɵɵtemplateRefExtractor","isActive_r6","cellColorDropdown_r7","ɵɵadvance","ɵɵpipeBind1","TuiTableCellColorComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵelementContainerEnd","TuiTableCellColorComponent","options","editor","texts$","map","texts","combineLatest","table","group","distinctUntilChanged","color","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","TuiPaletteComponent","TuiLetDirective","TuiDropdownOptionsDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","NgIf","TuiActiveZoneDirective","AsyncPipe","TuiTableCellColorModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiPaletteModule","TuiButtonModule","TuiHintModule","TuiActiveZoneModule","TuiDropdownModule","TuiLetModule","TuiTableSizeSelectorComponent_div_0_div_1_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","$event","y_r3","x_r4","ɵɵelementEnd","ɵɵclassProp","TuiTableSizeSelectorComponent_div_0_Template","ɵɵtemplate","ɵɵadvance","ɵɵproperty","MAX_COLS_NUMBER","MAX_ROWS_NUMBER","MIN_DISTANCE_PX","TuiTableSizeSelectorComponent","win","EventEmitter","x","y","rows","cols","event","tuiGetViewportWidth","ɵɵdirectiveInject","WINDOW","ɵɵdefineComponent","ɵɵtext","ɵɵtextInterpolate2","TuiRepeatTimesDirective","TuiTableSizeSelectorModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiRepeatTimesModule","TuiTableCreateComponent_ng_template_4_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","TuiTableCreateComponent","options","editor","texts$","map","texts","rows","cols","prevLine","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","ɵɵelement","ɵɵpipe","ɵɵtemplate","ɵɵtemplateRefExtractor","table_r3","ɵɵreference","tableDropdown_r4","ɵɵproperty","ɵɵadvance","ɵɵpipeBind1","TuiHostedDropdownComponent","TuiButtonComponent","TuiTableSizeSelectorComponent","TuiDropdownOptionsDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiTableCreateModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiDropdownModule","TuiButtonModule","TuiHintModule","TuiTableSizeSelectorModule","_c0","a0","a1","TuiTableMergeCellsComponent_ng_container_0_button_1_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","can_r2","ɵɵnextContext","ctx_r2","ɵɵresetView","ɵɵelementEnd","texts_r4","ɵɵproperty","TuiTableMergeCellsComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵtemplate","ɵɵpipe","ɵɵelementContainerEnd","ɵɵadvance","ɵɵpipeBind1","TuiTableMergeCellsComponent","editor","texts$","map","distinctUntilChanged","ɵɵdirectiveInject","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","ɵɵpureFunction2","TuiButtonComponent","TuiLetDirective","NgIf","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiTableMergeCellsModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiButtonModule","TuiHintModule","TuiLetModule","TuiTableRowColumnManagerComponent_tui_hosted_dropdown_0_Template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵpipe","ɵɵelementEnd","active_r1","tableCommand_r2","ɵɵreference","ctx_r2","ɵɵnextContext","tableOptionsDropdown_r4","ɵɵproperty","ɵɵadvance","ɵɵpipeBind1","TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_button_1_Template","_r5","ɵɵgetCurrentView","ɵɵlistener","j_r6","ɵɵrestoreView","i_r7","ɵɵresetView","ɵɵtext","item_r8","ɵɵtextInterpolate1","TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_Template","ɵɵtemplate","group_r9","TuiTableRowColumnManagerComponent_ng_template_2_Template","TuiTableCommands","TuiTableRowColumnManagerComponent","options","editor","texts$","tableCommandTexts$","map","texts","command","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_TABLE_COMMANDS","ɵɵdefineComponent","ɵɵtemplateRefExtractor","TuiHostedDropdownComponent","TuiButtonComponent","TuiDataListComponent","TuiOptionComponent","TuiLetDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","NgForOf","TuiOptGroupDirective","AsyncPipe","TuiTableRowColumnManagerModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiHintModule","TuiButtonModule","TuiDataListModule","TuiLetModule","TuiTextColorComponent_tui_hosted_dropdown_0_ng_template_5_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","activeZone_r3","ɵɵproperty","TuiTextColorComponent_tui_hosted_dropdown_0_Template","ɵɵelement","ɵɵpipe","ɵɵtemplate","ɵɵtemplateRefExtractor","selectedColor_r4","color_r5","ɵɵreference","colorDropdown_r6","ɵɵadvance","ɵɵpipeBind1","ɵɵstyleProp","TuiTextColorComponent","options","editor","texts$","map","distinctUntilChanged","texts","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","TuiPaletteComponent","TuiLetDirective","TuiDropdownOptionsDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","TuiActiveZoneDirective","AsyncPipe","TuiTextColorModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiButtonModule","TuiHostedDropdownModule","TuiDropdownModule","TuiHintModule","TuiPaletteModule","TuiActiveZoneModule","TuiLetModule","TuiEditLinkComponent_ng_container_1_ng_container_3_Template","rf","ctx","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","TuiEditLinkComponent_ng_container_1_ng_template_4_span_0_Template","ɵɵelementStart","ɵɵelementEnd","TuiEditLinkComponent_ng_container_1_ng_template_4_ng_template_1_Template","TuiEditLinkComponent_ng_container_1_ng_template_4_Template","ɵɵtemplate","ɵɵtemplateRefExtractor","urlTitle_r3","ɵɵreference","ctx_r3","ɵɵnextContext","ɵɵproperty","TuiEditLinkComponent_ng_container_1_ng_container_10_Template","text_r5","ɵɵadvance","ɵɵtextInterpolate1","TuiEditLinkComponent_ng_container_1_Template","_r2","ɵɵgetCurrentView","ɵɵtwoWayListener","$event","ɵɵrestoreView","ɵɵtwoWayBindingSet","ɵɵresetView","ɵɵlistener","ɵɵpipe","fullOptions_r6","ɵɵtextInterpolate","ɵɵclassProp","ɵɵtwoWayProperty","ɵɵpipeBind1","TuiEditLinkComponent_ng_template_2_Template","_r7","ɵɵsanitizeUrl","TuiEditLinkComponent_ng_container_4_button_4_Template","_r8","id_r9","TuiEditLinkComponent_ng_container_4_Template","ɵɵelement","ɵɵpipeBind3","splitOsiProtocol","url","_a","protocolPosition","TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER","prefix","path","result","splitSimpleProtocol","tuiIsValidUrl","tuiEditLinkParseUrl","TUI_EDITOR_LINK_HASH_PREFIX","TUI_EDITOR_LINK_SIMPLE_PROTOCOL_DIVIDER","protocol","otherPart","MAX_LENGTH","START","END","TuiShortUrlPipe","ɵɵdefinePipe","TuiFilterAnchorsPipe","anchors","currentUrl","anchor","TuiEditLinkComponent","doc","texts$","editor","options","EventEmitter","_b","TUI_EDITOR_LINK_HTTPS_PREFIX","mode","event","tuiIsElement","isPrefix","a","defaultPrefix","_c","focusable","fullPath","nodes","node","ɵɵdirectiveInject","DOCUMENT","TUI_EDITOR_LINK_TEXTS","TuiTiptapEditorService","TUI_EDITOR_OPTIONS","ɵɵdefineComponent","ɵɵresolveDocument","_r1","view_r10","TuiInputInlineComponent","TuiSvgComponent","TuiButtonComponent","TuiLinkComponent","TuiScrollbarComponent","NgIf","TuiAutoFocusDirective","NgControlStatus","NgModel","NgForOf","AsyncPipe","TuiEditLinkModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","FormsModule","TuiAutoFocusModule","TuiButtonModule","TuiSvgModule","TuiLinkModule","TuiInputInlineModule","TuiToggleModule","TuiScrollbarModule","_c0","_c1","TuiToolbarComponent_ng_container_1_Template","rf","ctx","ɵɵelementContainer","TuiToolbarComponent_section_5_div_1_Template","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","texts_r3","ɵɵadvance","ɵɵproperty","TuiToolbarComponent_section_5_div_2_Template","ɵɵelement","TuiToolbarComponent_section_5_div_3_tui_font_style_1_Template","TuiToolbarComponent_section_5_div_3_tui_align_content_2_Template","TuiToolbarComponent_section_5_div_3_tui_list_configs_3_Template","TuiToolbarComponent_section_5_div_3_button_4_Template","_r4","TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_ng_template_4_Template","_r5","$event","link_r6","ɵɵreference","TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_Template","ɵɵtemplate","ɵɵtemplateRefExtractor","linkDropdown_r7","TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_ng_template_3_Template","_r8","anchor_r9","TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_Template","anchorDropdown_r10","TuiToolbarComponent_section_5_div_3_ng_container_7_Template","_r11","ɵɵelementContainerStart","fileUpload_r12","ɵɵelementContainerEnd","TuiToolbarComponent_section_5_div_3_Template","TuiToolbarComponent_section_5_div_4_button_1_Template","_r13","TuiToolbarComponent_section_5_div_4_button_2_Template","_r14","TuiToolbarComponent_section_5_div_4_Template","TuiToolbarComponent_section_5_div_5_tui_text_color_1_Template","TuiToolbarComponent_section_5_div_5_tui_highlight_color_2_Template","TuiToolbarComponent_section_5_div_5_Template","TuiToolbarComponent_section_5_div_6_tui_code_1_Template","TuiToolbarComponent_section_5_div_6_button_2_Template","_r15","TuiToolbarComponent_section_5_div_6_div_3_Template","_r16","image_r17","TuiToolbarComponent_section_5_div_6_button_4_Template","_r18","TuiToolbarComponent_section_5_div_6_Template","TuiToolbarComponent_section_5_div_7_Template","_r19","TuiToolbarComponent_section_5_div_8_Template","TuiToolbarComponent_section_5_div_9_tui_table_cell_color_2_Template","TuiToolbarComponent_section_5_div_9_Template","TuiToolbarComponent_section_5_div_10_Template","TuiToolbarComponent_section_5_Template","ɵɵprojection","TuiToolbarNavigationManagerDirective","el","toPrevious","toolsContainers","focusedToolIndex","tuiIsNativeFocusedIn","targetToolIndex","tuiClamp","targetToolWrapper","targetTool","reversed","tools","focusableElement","tuiIsNativeMouseFocusable","tuiGetClosestFocusable","wrapper","ɵɵdirectiveInject","ElementRef","ɵɵdefineDirective","TuiToolbarComponent","editor","imageLoader","attachOptions","filesLoader","texts$","options","destroy$","EMPTY_QUERY","EventEmitter","TuiEditorTool","defaultEditorTools","value","nativeElement","event","target","input","_a","file","take","takeUntil","image","files","attachedFiles","hosted","url","anchor","tool","firstButton","lastButton","TuiTiptapEditorService","TUI_IMAGE_LOADER","TUI_ATTACH_FILES_OPTIONS","TUI_ATTACH_FILES_LOADER","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_OPTIONS","TuiDestroyService","ɵɵdefineComponent","ɵɵviewQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵclassProp","ɵɵProvidersFeature","ɵɵprojectionDef","ɵɵpipe","ɵɵpipeBind1","TuiButtonComponent","TuiFontSizeComponent","TuiFontStyleComponent","TuiAlignContentComponent","TuiListConfigsComponent","TuiHostedDropdownComponent","TuiEditLinkComponent","TuiTextColorComponent","TuiHighlightColorComponent","TuiCodeComponent","TuiDetailsComponent","TuiDetailsRemoveComponent","TuiEditorGroupToolComponent","TuiTableCellColorComponent","TuiTableCreateComponent","TuiTableRowColumnManagerComponent","TuiTableMergeCellsComponent","NgIf","TuiFocusableDirective","TuiHintDescribeDirective","TuiItemDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiToolbarModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHintModule","TuiFocusableModule","TuiButtonModule","TuiHostedDropdownModule","TuiEditLinkModule","TuiTableMergeCellsModule","TuiTableCellColorModule","TuiTableRowColumnManagerModule","TuiTableCreateModule","TuiFontSizeModule","TuiFontStyleModule","TuiAlignContentModule","TuiListConfigsModule","TuiTextColorModule","TuiHighlightColorModule","TuiCodeModule","TuiDetailsModule","TuiItemModule","TuiEditorToolGroup","TuiEditorSocketComponent","el","renderer","sanitizer","tuiSanitizer","document","editor","options","content","_a","SecurityContext","event","_b","tuiIsElement","href","ɵɵdirectiveInject","ElementRef","Renderer2","Sanitizer","TUI_SANITIZER","DOCUMENT","TuiTiptapEditorDirective","TUI_EDITOR_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵlistener","$event","ɵɵclassProp","TuiEditorSocketModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","_c1","TuiEditorComponent_div_0_tui_toolbar_2_Template","rf","ctx","_r3","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵprojection","ɵɵelementEnd","ɵɵproperty","TuiEditorComponent_div_0_div_5_Template","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate1","TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_1_Template","_r4","ɵɵelementContainer","editor_r5","ɵɵreference","TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_2_Template","_r6","ɵɵelement","TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_toolbar_1_Template","_r8","activeZone_r9","TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_edit_link_2_Template","_r10","link_r11","TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_ng_container_3_Template","ɵɵelementContainerStart","ɵɵelementContainerEnd","TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_Template","ɵɵtemplate","editorLoaded_r12","ɵɵclassProp","TuiEditorComponent_div_0_ng_container_6_ng_template_3_Template","_r7","ɵɵtemplateRefExtractor","dropdown_r13","TuiEditorComponent_div_0_ng_container_6_Template","TuiEditorComponent_div_0_Template","_r1","TuiDropdownToolbarDirective","TuiDropdownSelectionDirective","combineLatest","map","distinctUntilChanged","x","y","handler","range","_a","contained","tuiIsTextNode","visible","_b","_c","_d","commonAncestorContainer","element","tuiIsElement","EMPTY_CLIENT_RECT","tuiGetWordRange","rect","ɵTuiDropdownToolbarDirective_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineDirective","ɵɵProvidersFeature","tuiAsDriver","tuiAsRectAccessor","ɵɵInheritDefinitionFeature","TuiEditorPortalService","AbstractTuiPortalService","ɵTuiEditorPortalService_BaseFactory","ɵɵdefineInjectable","TUI_EDITOR_PROVIDERS","LAZY_EDITOR_EXTENSIONS","TUI_EDITOR_EXTENSIONS","extensions","extensions$","ReplaySubject","INITIALIZATION_TIPTAP_CONTAINER","Renderer2","renderer","TIPTAP_EDITOR","LAZY_TIPTAP_EDITOR","editor","take","LazyEditor","shareReplay","TuiTiptapEditorService","TuiEditorPortalHostComponent","AbstractTuiPortalHostComponent","ɵTuiEditorPortalHostComponent_BaseFactory","ɵɵdefineComponent","TuiDropdownPortalService","TuiEditorPortalDirective","TuiRectAccessor","el","ɵɵdirectiveInject","ElementRef","tuiAsViewport","TuiEditorComponent","AbstractTuiControl","control","cdr","editorLoaded$","editorService","contentProcessor","doc","transformer","options","zone","defaultEditorTools","EventEmitter","delay","takeUntil","extension","ALWAYS_TRUE_HANDLER","ALWAYS_FALSE_HANDLER","focusElement","parentFocusElement","before","value","processed","focused","anchor","link","tuiGetSelectionState","event","tuiIsSafeLinkRange","fromEvent","TUI_EDITOR_RESIZE_EVENT","throttleTime","tuiZonefree","NgControl","ChangeDetectorRef","TUI_EDITOR_CONTENT_PROCESSOR","DOCUMENT","TUI_EDITOR_VALUE_TRANSFORMER","TUI_EDITOR_OPTIONS","NgZone","ɵɵviewQuery","TuiTiptapEditorDirective","TuiToolbarComponent","_t","ɵɵqueryRefresh","ɵɵloadQuery","tuiAsFocusableItemAccessor","tuiAutoFocusOptionsProvider","TUI_ANIMATIONS_DEFAULT_DURATION","ɵɵprojectionDef","ɵɵpipe","ɵɵpipeBind1","TuiScrollbarComponent","TuiEditorSocketComponent","TuiEditLinkComponent","NgIf","TuiWrapperDirective","TuiActiveZoneDirective","NgTemplateOutlet","TuiDropdownOptionsDirective","TuiDropdownDirective","TuiDropdownDriverDirective","TuiDropdownPositionDirective","AsyncPipe","TuiEditorModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiItemModule","CommonModule","TuiToolbarModule","TuiWrapperModule","TuiScrollbarModule","TuiEditLinkModule","TuiActiveZoneModule","TuiDropdownModule","TuiTiptapEditorModule","TuiEditorSocketModule","import_dompurify","DOMPURIFY_CONFIG","InjectionToken","DOMPURIFY_HOOKS","SANITIZE_STYLE","value","createDOMPurify","dompurify","NgDompurifySanitizer","config","sanitizeStyle","defaultView","hooks","name","hook","context","SecurityContext","ɵɵinject","DOCUMENT","ɵɵdefineInjectable","NgDompurifyModule","ɵɵdefineNgModule","ɵɵdefineInjector"],"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,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87]} \ No newline at end of file +{"version":3,"sources":["node_modules/dompurify/dist/purify.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-browser.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-utils-svg.js","node_modules/@tinkoff/ng-polymorpheus/fesm2015/tinkoff-ng-polymorpheus.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-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-item.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-let.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-obscured.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-directives-pressed.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-directives-repeat-times.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-enums.js","node_modules/@taiga-ui/cdk/fesm2015/taiga-ui-cdk-date-time.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-constants.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/@taiga-ui/core/fesm2015/taiga-ui-core-components-scrollbar.js","node_modules/@tinkoff/ng-event-plugins/fesm2015/tinkoff-ng-event-plugins.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-textfield-controller.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-directives-mask-accessor.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/core/fesm2015/taiga-ui-core-pipes-month.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-tooltip.js","node_modules/@taiga-ui/core/fesm2015/taiga-ui-core-components-primitive-textfield.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-push.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-toggle.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-abstract.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-directives-tiptap-editor.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-align-content.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-code.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-details.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-font-size.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-font-style.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-group.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/@maskito/angular/node_modules/tslib/tslib.es6.mjs","node_modules/@maskito/angular/fesm2015/maskito-angular.js","node_modules/@taiga-ui/kit/fesm2015/taiga-ui-kit-components-input-inline.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-color-selector.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-highlight-color.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-list-configs.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-table-cell-color.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-table-size-selector.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-table-create.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-table-merge-cells.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-table-row-column-manager.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar-tools-text-color.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-edit-link.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-toolbar.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-editor-socket.js","node_modules/@tinkoff/tui-editor/fesm2015/tinkoff-tui-editor-components-editor.js","node_modules/@tinkoff/ng-dompurify/fesm2015/tinkoff-ng-dompurify.js"],"sourcesContent":["/*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/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 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 objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n\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 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 /**\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 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 /**\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 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 /**\n * Clean up an array to harden against CSPP\n *\n * @param {Array} array - The array to be cleaned.\n * @returns {Array} The cleaned version of the array\n */\n function cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n return array;\n }\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 function clone(object) {\n const newObject = create(null);\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n if (isPropertyExist) {\n if (Array.isArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n }\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 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() {\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']);\n\n // SVG\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']);\n\n // 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 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']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\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', 'popover', 'popovertarget', 'popovertargetaction', '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', 'wrap', '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\n // eslint-disable-next-line unicorn/better-regex\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\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 const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\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 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 const DOCTYPE_NAME = seal(/^html$/i);\n const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/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 CUSTOM_ELEMENT: CUSTOM_ELEMENT\n });\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\n const NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5,\n // Deprecated\n entityNode: 6,\n // Deprecated\n progressingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12 // Deprecated\n };\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\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 const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\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 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 /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '3.1.5';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document) {\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');\n\n // 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 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 /**\n * Expose whether this browser supports running the full DOMPurify.\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 CUSTOM_ELEMENT\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n\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 let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n\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 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\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\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 let FORCE_BODY = false;\n\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 let RETURN_DOM = false;\n\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 let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\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 let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\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 let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\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\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\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 let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n\n /* Parsing of strict XHTML documents */\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\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\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 /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\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\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\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 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n\n /* Set configuration parameters */\n ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS') ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR') ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES') ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR') ? 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 = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS') ? 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 = objectHasOwnProperty(cfg, 'FORBID_CONTENTS') ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS') ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR') ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\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\n /* Parse profile info */\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\n /* Merge configuration parameters */\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\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\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 }\n\n // Overwrite existing TrustedTypes policy.\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n // Sign local variables required by `sanitize`.\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 }\n\n // If creating the internal policy succeeded sign internal variables.\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\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', 'annotation-xml']);\n\n // 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 const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n\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 const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\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 }\n\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 if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\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 }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\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 }\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n\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 return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\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 /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\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);\n\n // We void attribute values for unremovable \"is\"\" attributes\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 /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\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 if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\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 (_) {\n // 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\n /* Work on whole document or just its body */\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 /**\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 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 | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n };\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 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 /**\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 const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\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 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 /**\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 const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\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\n /* Remove any ocurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove any kind of possibly harmful comments */\n if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\\w]/g, currentNode.data)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Remove element if anything forbids its presence */\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\n /* Keep content except for bad-listed elements */\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 const childClone = cloneNode(childNodes[i], true);\n childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n parentNode.insertBefore(childClone, getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check whether element has a valid namespace */\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\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\n /* Execute a hook if present */\n _executeHook('afterSanitizeElements', currentNode, null);\n return false;\n };\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 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\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 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 /**\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 const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n };\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 const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n const {\n attributes\n } = currentNode;\n\n /* Check if we have attributes; if not we might have a text node */\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\n /* Go backwards over all attributes; safely remove bad ones */\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\n /* Execute a hook if present */\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 _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n\n /* Remove attribute */\n _removeAttribute(name, currentNode);\n\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n continue;\n }\n\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|title)/i, value)) {\n _removeAttribute(name, currentNode);\n continue;\n }\n\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n\n /* Is `value` valid for this attribute? */\n const lcTag = transformCaseFunc(currentNode.nodeName);\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode);\n\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n\n /* Handle attributes that require Trusted Types */\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\n /* Handle invalid data-* attribute set by try-catching it */\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 if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n } else {\n arrayPop(DOMPurify.removed);\n }\n } catch (_) {}\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n\n /* Sanitize tags and elements */\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n\n /* Deep shadow DOM detected */\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(shadowNode);\n }\n\n /* Execute a hook if present */\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\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 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 IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '';\n }\n\n /* Stringify, in case dirty is an object */\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\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n\n /* Assign config vars */\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n\n /* Clean up removed elements */\n DOMPurify.removed = [];\n\n /* Check if dirty is correctly typed for IN_PLACE */\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 === NODE_TYPE.element && 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\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n\n /* Get node iterator */\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n /* Now start iterating over the created document */\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n\n /* Shadow DOM detected, sanitize it */\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n\n /* Check attributes, sanitize if necessary */\n _sanitizeAttributes(currentNode);\n }\n\n /* If we sanitized `dirty` in-place, return it. */\n if (IN_PLACE) {\n return dirty;\n }\n\n /* Return sanitized string or DOM */\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\n /* Serialize doctype if allowed */\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\n /* Sanitize final string template-safe */\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 /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\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 /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\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 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 /**\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 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 /**\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 DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\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 DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n return DOMPurify;\n }\n var purify = createDOMPurify();\n return purify;\n});\n","function tuiIsEdge(userAgent) {\n return userAgent.toLowerCase().includes('edge');\n}\nconst EDGE = 'edge/';\nfunction tuiIsEdgeOlderThan(version, userAgent) {\n const currentVersion = parseInt(userAgent.slice(userAgent.toLowerCase().indexOf(EDGE) + EDGE.length), 10);\n return currentVersion < version;\n}\nfunction tuiIsFirefox(userAgent) {\n return userAgent.toLowerCase().includes('firefox');\n}\nfunction tuiIsSafari({\n ownerDocument: doc\n}) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const win = doc === null || doc === void 0 ? void 0 : doc.defaultView;\n const isMacOsSafari = typeof win.safari !== 'undefined' && ((_b = (_a = win.safari) === null || _a === void 0 ? void 0 : _a.pushNotification) === null || _b === void 0 ? void 0 : _b.toString()) === '[object SafariRemoteNotification]';\n const isIosSafari = !!((_d = (_c = win.navigator) === null || _c === void 0 ? void 0 : _c.vendor) === null || _d === void 0 ? void 0 : _d.includes('Apple')) && !((_f = (_e = win.navigator) === null || _e === void 0 ? void 0 : _e.userAgent) === null || _f === void 0 ? void 0 : _f.includes('CriOS')) && !((_h = (_g = win.navigator) === null || _g === void 0 ? void 0 : _g.userAgent) === null || _h === void 0 ? void 0 : _h.includes('FxiOS'));\n return isMacOsSafari || isIosSafari;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiIsEdge, tuiIsEdgeOlderThan, tuiIsFirefox, tuiIsSafari };\n","import { tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';\nfunction makeRandomSalt() {\n return Math.floor(Math.random() * Date.now());\n}\nfunction escapeRegExp(search) {\n return search.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n}\nfunction extractLinearGradientIdsFromSvg(svg) {\n var _a;\n const ids = ((_a = svg.match(/url\\((\"?)('*)#(.*?)('*)\\)/g)) !== null && _a !== void 0 ? _a : []).map(url => url.slice(4, url.length - 1).replace(/['\"#]+/g, ''));\n return Array.from(new Set(ids));\n}\n/**\n * @description:\n * Any ‘linearGradient’ attributes which are defined on the referenced\n * element which are not defined on this element are inherited by this element.\n * If this element has no defined gradient stops, and the referenced element does\n * (possibly due to its own ‘xlink:href’ attribute), then this element inherits\n * the gradient stop from the referenced element. Inheritance can be indirect\n * to an arbitrary level; thus, if the referenced element inherits attribute\n * or gradient stops due to its own ‘xlink:href’ attribute, then the current\n * element can inherit those attributes or gradient stops.\n *\n * Documentation: https://www.w3.org/TR/SVG11/pservers.html\n *\n */\nfunction tuiSvgLinearGradientProcessor(svg, salt = makeRandomSalt()) {\n if (tuiIsString(svg)) {\n const uniqueIds = extractLinearGradientIdsFromSvg(svg);\n return uniqueIds.reduce((newSvg, previousId) => {\n const escapedId = escapeRegExp(previousId);\n const newId = `id_${salt}_${previousId}`;\n return newSvg.replace(new RegExp(`\"${escapedId}\"`, 'g'), `\"${newId}\"`).replace(new RegExp(`'${escapedId}'`, 'g'), `'${newId}'`).replace(new RegExp(`url\\\\('#${escapedId}'\\\\)`, 'g'), `url('#${newId}')`).replace(new RegExp(`url\\\\(\"#${escapedId}\"\\\\)`, 'g'), `url(\"#${newId}\")`).replace(new RegExp(`url\\\\(#${escapedId}\\\\)`, 'g'), `url(#${newId})`);\n }, svg);\n }\n return svg;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiSvgLinearGradientProcessor };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Injector, Directive, Self, TemplateRef, ChangeDetectorRef, ComponentFactoryResolver, NgModule } from '@angular/core';\n\n/**\n * Use this token to access context within your components when\n * instantiating them through {@link PolymorpheusOutletDirective}\n */\nconst POLYMORPHEUS_CONTEXT = new InjectionToken('POLYMORPHEUS_CONTEXT');\n\n/**\n * Wrapper class for a component that will be used as content for {@link PolymorpheusOutletDirective}\n *\n * @param component — an Angular component to be dynamically created\n * @param injector — optional {@link Injector} for lazy loaded module case\n *\n * TODO: Remove second generic as it is irrelevant, remove `null` from injector type\n */\nclass PolymorpheusComponent {\n constructor(component, i) {\n this.component = component;\n this.i = i;\n }\n createInjector(injector, useValue) {\n return Injector.create({\n parent: this.i || injector,\n providers: [{\n provide: POLYMORPHEUS_CONTEXT,\n useValue\n }]\n });\n }\n}\n\n/**\n * ng-template wrapper directive also stores {@link ChangeDetectorRef} to properly handle change detection.\n */\nlet PolymorpheusTemplate = /*#__PURE__*/(() => {\n class PolymorpheusTemplate {\n constructor(template, cdr) {\n this.template = template;\n this.cdr = cdr;\n this.polymorpheus = '';\n }\n check() {\n this.cdr.markForCheck();\n }\n static ngTemplateContextGuard(_dir, _ctx) {\n return true;\n }\n }\n /** @nocollapse */\n /** @nocollapse */PolymorpheusTemplate.ɵfac = function PolymorpheusTemplate_Factory(t) {\n return new (t || PolymorpheusTemplate)(i0.ɵɵdirectiveInject(i0.TemplateRef, 2), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n PolymorpheusTemplate.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: PolymorpheusTemplate,\n selectors: [[\"ng-template\", \"polymorpheus\", \"\"]],\n inputs: {\n polymorpheus: \"polymorpheus\"\n },\n exportAs: [\"polymorpheus\"]\n });\n return PolymorpheusTemplate;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass PolymorpheusContext {\n constructor($implicit) {\n this.$implicit = $implicit;\n }\n get polymorpheusOutlet() {\n return this.$implicit;\n }\n}\n/**\n * @deprecated: use {@link PolymorpheusContext} instead\n * Primitive types used as content by {@link PolymorpheusOutletDirective}\n */\nclass PrimitiveContext extends PolymorpheusContext {}\nlet PolymorpheusOutletDirective = /*#__PURE__*/(() => {\n class PolymorpheusOutletDirective {\n constructor(vcr, i, t) {\n this.vcr = vcr;\n this.i = i;\n this.t = t;\n this.content = '';\n }\n get template() {\n if (isDirective(this.content)) {\n return this.content.template;\n }\n return this.content instanceof TemplateRef ? this.content : this.t;\n }\n ngOnChanges({\n content\n }) {\n var _a;\n const context = this.getContext();\n (_a = this.c) === null || _a === void 0 ? void 0 : _a.injector.get(ChangeDetectorRef).markForCheck();\n if (!content) {\n return;\n }\n this.vcr.clear();\n const proxy = context && new Proxy(context, {\n get: (_, key) => {\n var _a;\n return (_a = this.getContext()) === null || _a === void 0 ? void 0 : _a[key];\n }\n });\n if (isComponent(this.content)) {\n this.process(this.content, proxy);\n } else if (\n // tslint:disable-next-line:triple-equals\n (context instanceof PolymorpheusContext && context.$implicit) != null) {\n this.vcr.createEmbeddedView(this.template, proxy);\n }\n }\n ngDoCheck() {\n if (isDirective(this.content)) {\n this.content.check();\n }\n }\n static ngTemplateContextGuard(_dir, _ctx) {\n return true;\n }\n getContext() {\n if (isTemplate(this.content) || isComponent(this.content)) {\n return this.context;\n }\n return new PolymorpheusContext(typeof this.content === 'function' ? this.content(this.context) : this.content);\n }\n process(content, proxy) {\n const injector = content.createInjector(this.i, proxy);\n this.c = this.vcr.createComponent(injector.get(ComponentFactoryResolver).resolveComponentFactory(content.component), 0, injector);\n }\n }\n /** @nocollapse */\n /** @nocollapse */PolymorpheusOutletDirective.ɵfac = function PolymorpheusOutletDirective_Factory(t) {\n return new (t || PolymorpheusOutletDirective)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n PolymorpheusOutletDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: PolymorpheusOutletDirective,\n selectors: [[\"\", \"polymorpheusOutlet\", \"\"]],\n inputs: {\n content: [0, \"polymorpheusOutlet\", \"content\"],\n context: [0, \"polymorpheusOutletContext\", \"context\"]\n },\n features: [i0.ɵɵNgOnChangesFeature]\n });\n return PolymorpheusOutletDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction isDirective(content) {\n return content instanceof PolymorpheusTemplate;\n}\nfunction isComponent(content) {\n return content instanceof PolymorpheusComponent;\n}\nfunction isTemplate(content) {\n return isDirective(content) || content instanceof TemplateRef;\n}\nlet PolymorpheusModule = /*#__PURE__*/(() => {\n class PolymorpheusModule {}\n /** @nocollapse */\n /** @nocollapse */\n /** @nocollapse */PolymorpheusModule.ɵfac = function PolymorpheusModule_Factory(t) {\n return new (t || PolymorpheusModule)();\n };\n PolymorpheusModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: PolymorpheusModule\n });\n PolymorpheusModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return PolymorpheusModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Public API Surface of ng-polymorpheus\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule, PolymorpheusOutletDirective, PolymorpheusTemplate };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Directive, Input, HostBinding, Output, Optional, Inject, Injectable, TemplateRef, ChangeDetectorRef, ComponentFactoryResolver, Injector, INJECTOR, ElementRef, ViewContainerRef, ViewChild } from '@angular/core';\nimport * as i1 from '@angular/forms';\nimport { NgModel } from '@angular/forms';\nimport { tuiAssert } from '@taiga-ui/cdk/classes';\nimport { EMPTY_FUNCTION } from '@taiga-ui/cdk/constants';\nimport { tuiIsPresent } from '@taiga-ui/cdk/utils';\nimport { Subject, merge, Observable, BehaviorSubject } from 'rxjs';\nimport { delay, startWith, map, filter, distinctUntilChanged, switchMap, takeUntil, ignoreElements, endWith, share } from 'rxjs/operators';\nimport { tuiIfMap } from '@taiga-ui/cdk/observables';\nimport { PolymorpheusTemplate } from '@tinkoff/ng-polymorpheus';\nimport * as i1$1 from '@taiga-ui/cdk/services';\nimport { TuiIdService } from '@taiga-ui/cdk/services';\nimport { TuiNoHostException } from '@taiga-ui/cdk/exceptions';\nimport { DOCUMENT } from '@angular/common';\nconst _c0 = [\"viewContainer\"];\nconst TUI = 'tui_interactive_';\n/**\n * The most basic class for interactive components\n */\nlet AbstractTuiInteractive = /*#__PURE__*/(() => {\n class AbstractTuiInteractive {\n constructor() {\n this.pseudoHover = null;\n this.pseudoActive = null;\n this.pseudoFocus = null;\n /**\n * Determines if component is focusable with keyboard.\n */\n this.focusable = true;\n this.nativeId = '';\n /**\n * Emits 'true' on focus and 'false' on blur.\n */\n this.focusedChange = new EventEmitter();\n this.focusVisibleChange = new EventEmitter();\n this.focusVisible = false;\n this.autoIdString = `${TUI}${AbstractTuiInteractive.autoId++}${Date.now()}`;\n }\n get computedDisabled() {\n return this.disabled;\n }\n get computedFocusable() {\n return !this.computedDisabled && (this.focusable || this.focused);\n }\n get computedFocused() {\n var _a;\n return !this.computedDisabled && ((_a = this.pseudoFocus) !== null && _a !== void 0 ? _a : this.focused);\n }\n get computedFocusVisible() {\n var _a;\n return !this.computedDisabled && ((_a = this.pseudoFocus) !== null && _a !== void 0 ? _a : this.focusVisible);\n }\n // TODO: 3.0 Consider removing since native input is exposed\n get id() {\n return this.nativeId || this.autoIdString;\n }\n updateFocused(focused) {\n this.focusedChange.emit(focused);\n }\n updateFocusVisible(focusVisible) {\n if (this.focusVisible === focusVisible) {\n return;\n }\n this.focusVisible = focusVisible;\n this.focusVisibleChange.emit(focusVisible);\n }\n }\n AbstractTuiInteractive.autoId = 0;\n AbstractTuiInteractive.ɵfac = function AbstractTuiInteractive_Factory(t) {\n return new (t || AbstractTuiInteractive)();\n };\n AbstractTuiInteractive.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiInteractive,\n hostVars: 7,\n hostBindings: function AbstractTuiInteractive_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"data-focused\", ctx.pseudoFocus);\n i0.ɵɵclassProp(\"_disabled\", ctx.computedDisabled)(\"_focused\", ctx.computedFocused)(\"_focus-visible\", ctx.computedFocusVisible);\n }\n },\n inputs: {\n pseudoHover: \"pseudoHover\",\n pseudoActive: \"pseudoActive\",\n pseudoFocus: \"pseudoFocus\",\n focusable: \"focusable\",\n nativeId: \"nativeId\"\n },\n outputs: {\n focusedChange: \"focusedChange\",\n focusVisibleChange: \"focusVisibleChange\"\n }\n });\n return AbstractTuiInteractive;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass AbstractTuiValueTransformer {}\n\n/**\n * Basic ControlValueAccessor class to build form components upon\n */\nlet AbstractTuiControl = /*#__PURE__*/(() => {\n class AbstractTuiControl extends AbstractTuiInteractive {\n constructor(ngControl, cdr, valueTransformer) {\n super();\n this.ngControl = ngControl;\n this.cdr = cdr;\n this.valueTransformer = valueTransformer;\n this.refresh$ = new Subject();\n this.onTouched = EMPTY_FUNCTION;\n this.onChange = EMPTY_FUNCTION;\n this.fallbackValue = this.getFallbackValue();\n this.destroy$ = new Subject();\n this.readOnly = false;\n this.pseudoInvalid = null;\n if (ngDevMode && this.ngControl === null) {\n tuiAssert.assert(false, `NgControl not injected in ${this.constructor.name}!\\n`, 'Use [(ngModel)] or [formControl] or formControlName for correct work.');\n }\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n get computedInvalid() {\n return this.interactive && (this.pseudoInvalid !== null ? this.pseudoInvalid : this.touched && this.invalid);\n }\n get value() {\n var _a;\n return (_a = this.previousInternalValue) !== null && _a !== void 0 ? _a : this.fallbackValue;\n }\n set value(value) {\n this.updateValue(value);\n }\n get safeCurrentValue() {\n var _a;\n return (_a = this.rawValue) !== null && _a !== void 0 ? _a : this.fallbackValue;\n }\n get invalid() {\n return this.safeNgControlData(({\n invalid\n }) => invalid, false);\n }\n get valid() {\n return this.safeNgControlData(({\n valid\n }) => valid, false);\n }\n get touched() {\n return this.safeNgControlData(({\n touched\n }) => touched, false);\n }\n get disabled() {\n return this.safeNgControlData(({\n disabled\n }) => disabled, false);\n }\n get interactive() {\n return !this.readOnly && !this.computedDisabled;\n }\n get control() {\n return this.safeNgControlData(({\n control\n }) => control, null);\n }\n get computedName() {\n var _a, _b;\n return (_b = (_a = this.controlName) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : null;\n }\n get controlName() {\n var _a, _b, _c;\n return (_c = (_b = (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : null;\n }\n get rawValue() {\n const {\n ngControl\n } = this;\n if (ngControl === null) {\n return undefined;\n }\n const controlValue = ngControl instanceof NgModel && this.previousInternalValue === undefined ? ngControl.viewModel : ngControl.value;\n return this.fromControlValue(controlValue);\n }\n ngOnInit() {\n this.refresh$.pipe(delay(0), startWith(null), map(() => {\n var _a;\n return (_a = this.ngControl) === null || _a === void 0 ? void 0 : _a.control;\n }), filter(tuiIsPresent), distinctUntilChanged(), switchMap(control => merge(control.valueChanges, control.statusChanges)), takeUntil(this.destroy$)).subscribe(() => {\n this.refreshLocalValue(this.safeCurrentValue);\n });\n }\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n checkControlUpdate() {\n this.cdr.markForCheck();\n }\n registerOnChange(onChange) {\n this.onChange = componentValue => {\n onChange(this.toControlValue(componentValue));\n };\n this.refresh$.next();\n }\n registerOnTouched(onTouched) {\n this.onTouched = onTouched;\n }\n setDisabledState() {\n this.checkControlUpdate();\n }\n writeValue(value) {\n const controlValue = this.ngControl instanceof NgModel && this.previousInternalValue === undefined ? this.ngControl.model : value;\n this.refreshLocalValue(this.fromControlValue(controlValue));\n }\n updateFocused(focused) {\n if (!focused) {\n this.controlMarkAsTouched();\n }\n super.updateFocused(focused);\n }\n /**\n * @deprecated use `value` setter\n */\n updateValue(value) {\n if (this.disabled || this.valueIdenticalComparator(this.value, value)) {\n return;\n }\n this.previousInternalValue = value;\n this.controlSetValue(value);\n }\n valueIdenticalComparator(oldValue, newValue) {\n return oldValue === newValue;\n }\n safeNgControlData(extractor, defaultFieldValue) {\n var _a;\n return (_a = this.ngControl && extractor(this.ngControl)) !== null && _a !== void 0 ? _a : defaultFieldValue;\n }\n controlMarkAsTouched() {\n this.onTouched();\n this.checkControlUpdate();\n }\n controlSetValue(value) {\n this.onChange(value);\n this.checkControlUpdate();\n }\n refreshLocalValue(value) {\n this.previousInternalValue = value;\n this.checkControlUpdate();\n }\n fromControlValue(controlValue) {\n return this.valueTransformer ? this.valueTransformer.fromControlValue(controlValue) : controlValue;\n }\n toControlValue(componentValue) {\n return this.valueTransformer ? this.valueTransformer.toControlValue(componentValue) : componentValue;\n }\n }\n AbstractTuiControl.ɵfac = function AbstractTuiControl_Factory(t) {\n return new (t || AbstractTuiControl)(i0.ɵɵdirectiveInject(i1.NgControl, 8), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(AbstractTuiValueTransformer, 8));\n };\n AbstractTuiControl.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiControl,\n hostVars: 4,\n hostBindings: function AbstractTuiControl_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"_readonly\", ctx.readOnly)(\"_invalid\", ctx.computedInvalid);\n }\n },\n inputs: {\n readOnly: \"readOnly\",\n pseudoInvalid: \"pseudoInvalid\"\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return AbstractTuiControl;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction tuiAsControl(useExisting) {\n return {\n provide: AbstractTuiControl,\n useExisting\n };\n}\nlet AbstractTuiController = /*#__PURE__*/(() => {\n class AbstractTuiController {\n constructor() {\n this.change$ = new Subject();\n }\n ngOnChanges() {\n this.change$.next();\n }\n }\n AbstractTuiController.ɵfac = function AbstractTuiController_Factory(t) {\n return new (t || AbstractTuiController)();\n };\n AbstractTuiController.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiController,\n features: [i0.ɵɵNgOnChangesFeature]\n });\n return AbstractTuiController;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AbstractTuiDialogService = /*#__PURE__*/(() => {\n class AbstractTuiDialogService extends Observable {\n constructor(idService) {\n super(observer => this.dialogs$.subscribe(observer));\n this.idService = idService;\n this.dialogs$ = new BehaviorSubject([]);\n }\n open(content, options = {}) {\n return new Observable(observer => {\n const completeWith = result => {\n observer.next(result);\n observer.complete();\n };\n const dialog = Object.assign(Object.assign(Object.assign({}, this.defaultOptions), options), {\n content,\n completeWith,\n $implicit: observer,\n component: this.component,\n createdAt: Date.now(),\n id: this.idService.generate()\n });\n this.dialogs$.next([...this.dialogs$.value, dialog]);\n return () => {\n this.dialogs$.next(this.dialogs$.value.filter(item => item !== dialog));\n };\n });\n }\n }\n AbstractTuiDialogService.ɵfac = function AbstractTuiDialogService_Factory(t) {\n return new (t || AbstractTuiDialogService)(i0.ɵɵinject(TuiIdService));\n };\n AbstractTuiDialogService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AbstractTuiDialogService,\n factory: AbstractTuiDialogService.ɵfac\n });\n return AbstractTuiDialogService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AbstractTuiDialogDirective = /*#__PURE__*/(() => {\n class AbstractTuiDialogDirective extends PolymorpheusTemplate {\n constructor(templateRef, cdr, service) {\n super(templateRef, cdr);\n this.service = service;\n this.open$ = new Subject();\n this.options = {};\n this.open = false;\n this.openChange = this.open$.pipe(distinctUntilChanged(), tuiIfMap(() => this.service.open(this, this.options).pipe(ignoreElements(), endWith(false))), share());\n }\n ngOnChanges() {\n this.open$.next(this.open);\n }\n }\n AbstractTuiDialogDirective.ɵfac = function AbstractTuiDialogDirective_Factory(t) {\n return new (t || AbstractTuiDialogDirective)(i0.ɵɵdirectiveInject(TemplateRef), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(AbstractTuiDialogService));\n };\n AbstractTuiDialogDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiDialogDirective,\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature]\n });\n return AbstractTuiDialogDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AbstractTuiMultipleControl = /*#__PURE__*/(() => {\n class AbstractTuiMultipleControl extends AbstractTuiControl {\n clear() {\n this.value = [];\n }\n getFallbackValue() {\n return [];\n }\n }\n AbstractTuiMultipleControl.ɵfac = /* @__PURE__ */(() => {\n let ɵAbstractTuiMultipleControl_BaseFactory;\n return function AbstractTuiMultipleControl_Factory(t) {\n return (ɵAbstractTuiMultipleControl_BaseFactory || (ɵAbstractTuiMultipleControl_BaseFactory = i0.ɵɵgetInheritedFactory(AbstractTuiMultipleControl)))(t || AbstractTuiMultipleControl);\n };\n })();\n AbstractTuiMultipleControl.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiMultipleControl,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return AbstractTuiMultipleControl;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AbstractTuiNullableControl = /*#__PURE__*/(() => {\n class AbstractTuiNullableControl extends AbstractTuiControl {\n getFallbackValue() {\n return null;\n }\n }\n AbstractTuiNullableControl.ɵfac = /* @__PURE__ */(() => {\n let ɵAbstractTuiNullableControl_BaseFactory;\n return function AbstractTuiNullableControl_Factory(t) {\n return (ɵAbstractTuiNullableControl_BaseFactory || (ɵAbstractTuiNullableControl_BaseFactory = i0.ɵɵgetInheritedFactory(AbstractTuiNullableControl)))(t || AbstractTuiNullableControl);\n };\n })();\n AbstractTuiNullableControl.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiNullableControl,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return AbstractTuiNullableControl;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Abstract service for displaying portals\n */\nlet AbstractTuiPortalService = /*#__PURE__*/(() => {\n class AbstractTuiPortalService {\n get safeHost() {\n if (!this.host) {\n throw new TuiNoHostException();\n }\n return this.host;\n }\n attach(host) {\n this.host = host;\n }\n add(component) {\n return this.safeHost.addComponentChild(component);\n }\n remove({\n hostView\n }) {\n if (!hostView.destroyed) {\n hostView.destroy();\n }\n }\n addTemplate(templateRef, context) {\n return this.safeHost.addTemplateChild(templateRef, context);\n }\n removeTemplate(viewRef) {\n if (!viewRef.destroyed) {\n viewRef.destroy();\n }\n }\n }\n AbstractTuiPortalService.ɵfac = function AbstractTuiPortalService_Factory(t) {\n return new (t || AbstractTuiPortalService)();\n };\n AbstractTuiPortalService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AbstractTuiPortalService,\n factory: AbstractTuiPortalService.ɵfac\n });\n return AbstractTuiPortalService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Abstract class for host element for dynamically created portals.\n */\nlet AbstractTuiPortalHostComponent = /*#__PURE__*/(() => {\n class AbstractTuiPortalHostComponent {\n constructor(injector, el, portalService) {\n this.injector = injector;\n this.el = el;\n portalService.attach(this);\n }\n /** @deprecated unused, will be removed in 4.0 **/\n get clientRect() {\n return this.el.nativeElement.getBoundingClientRect();\n }\n addComponentChild(component) {\n const parent = component.createInjector(this.injector);\n const resolver = parent.get(ComponentFactoryResolver);\n const factory = resolver.resolveComponentFactory(component.component);\n // TODO: Remove in 4.0\n const providers = [{\n provide: AbstractTuiPortalHostComponent,\n useValue: this\n }];\n const injector = Injector.create({\n parent,\n providers\n });\n const ref = this.vcr.createComponent(factory, undefined, injector);\n ref.changeDetectorRef.detectChanges();\n return ref;\n }\n addTemplateChild(templateRef, context) {\n return this.vcr.createEmbeddedView(templateRef, context);\n }\n }\n AbstractTuiPortalHostComponent.ɵfac = function AbstractTuiPortalHostComponent_Factory(t) {\n return new (t || AbstractTuiPortalHostComponent)(i0.ɵɵdirectiveInject(INJECTOR), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(AbstractTuiPortalService));\n };\n AbstractTuiPortalHostComponent.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiPortalHostComponent,\n viewQuery: function AbstractTuiPortalHostComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5, ViewContainerRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.vcr = _t.first);\n }\n }\n });\n return AbstractTuiPortalHostComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Use this abstract class to create your own toggleable themes.\n * A component extending this class must have CSS variables definitions\n * and have ViewEncapsulation set to NONE. A boolean input allows to\n * switch theme on or off.\n */\nlet AbstractTuiThemeSwitcher = /*#__PURE__*/(() => {\n class AbstractTuiThemeSwitcher {\n constructor(doc) {\n this.doc = doc;\n if (this.style !== null) {\n this.addTheme();\n return;\n }\n const styles = this.doc.head.querySelectorAll('style');\n this.constructor.style = styles[styles.length - 1];\n }\n get style() {\n return this.constructor.style;\n }\n ngOnDestroy() {\n this.removeTheme();\n }\n addTheme() {\n if (this.style) {\n this.doc.head.appendChild(this.style);\n }\n }\n removeTheme() {\n var _a;\n (_a = this.style) === null || _a === void 0 ? void 0 : _a.remove();\n }\n }\n AbstractTuiThemeSwitcher.style = null;\n AbstractTuiThemeSwitcher.ɵfac = function AbstractTuiThemeSwitcher_Factory(t) {\n return new (t || AbstractTuiThemeSwitcher)(i0.ɵɵdirectiveInject(DOCUMENT));\n };\n AbstractTuiThemeSwitcher.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiThemeSwitcher\n });\n return AbstractTuiThemeSwitcher;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractTuiControl, AbstractTuiController, AbstractTuiDialogDirective, AbstractTuiDialogService, AbstractTuiInteractive, AbstractTuiMultipleControl, AbstractTuiNullableControl, AbstractTuiPortalHostComponent, AbstractTuiPortalService, AbstractTuiThemeSwitcher, AbstractTuiValueTransformer, tuiAsControl };\n","/**\n * Coerces a data-bound value (typically a string) to a boolean.\n * @example {@link https://material.angular.io/cdk/coercion/api#functions}\n */\nfunction tuiCoerceBooleanProperty(value) {\n return value !== null && typeof value !== 'undefined' && `${value}` !== 'false';\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiCoerceBooleanProperty };\n","import * as i0 from '@angular/core';\nimport { Pipe, NgModule } from '@angular/core';\nlet TuiMapperPipe = /*#__PURE__*/(() => {\n class TuiMapperPipe {\n transform(value, mapper, ...args) {\n return mapper(value, ...args);\n }\n }\n TuiMapperPipe.ɵfac = function TuiMapperPipe_Factory(t) {\n return new (t || TuiMapperPipe)();\n };\n TuiMapperPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiMapper\",\n type: TuiMapperPipe,\n pure: true\n });\n return TuiMapperPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiMapperPipeModule = /*#__PURE__*/(() => {\n class TuiMapperPipeModule {}\n TuiMapperPipeModule.ɵfac = function TuiMapperPipeModule_Factory(t) {\n return new (t || TuiMapperPipeModule)();\n };\n TuiMapperPipeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiMapperPipeModule\n });\n TuiMapperPipeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiMapperPipeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiMapperPipe, TuiMapperPipeModule };\n","import * as i0 from '@angular/core';\nimport { NgZone, ElementRef, Directive, Inject, Self, Input, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';\nimport { ANIMATION_FRAME } from '@ng-web-apis/common';\nimport { tuiTypedFromEvent, tuiZonefree, tuiScrollFrom, tuiZoneOptimized } from '@taiga-ui/cdk/observables';\nimport { TUI_SCROLL_REF, TUI_IS_IOS } from '@taiga-ui/cdk/tokens';\nimport { map, switchMap, takeUntil, throttleTime, startWith, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1$1 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport { POLLING_TIME } from '@taiga-ui/cdk/constants';\nimport { TuiDestroyService } from '@taiga-ui/cdk/services';\nimport * as i1 from 'rxjs';\nimport { merge } from 'rxjs';\nfunction TuiScrollControlsComponent_ng_container_0_ng_container_1_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 3);\n i0.ɵɵelement(1, \"div\", 4);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const bars_r1 = i0.ɵɵnextContext().ngIf;\n i0.ɵɵclassProp(\"t-bar_has-horizontal\", bars_r1[1]);\n }\n}\nfunction TuiScrollControlsComponent_ng_container_0_ng_container_1_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 5);\n i0.ɵɵelement(1, \"div\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const bars_r1 = i0.ɵɵnextContext().ngIf;\n i0.ɵɵclassProp(\"t-bar_has-vertical\", bars_r1[0]);\n }\n}\nfunction TuiScrollControlsComponent_ng_container_0_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiScrollControlsComponent_ng_container_0_ng_container_1_div_1_Template, 2, 2, \"div\", 1)(2, TuiScrollControlsComponent_ng_container_0_ng_container_1_div_2_Template, 2, 2, \"div\", 2);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const bars_r1 = ctx.ngIf;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", bars_r1[0]);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", bars_r1[1]);\n }\n}\nfunction TuiScrollControlsComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiScrollControlsComponent_ng_container_0_ng_container_1_Template, 3, 2, \"ng-container\", 0);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(2, 1, ctx_r1.refresh$));\n }\n}\nconst MIN_WIDTH = 24;\nfunction getOffsetVertical({\n clientY\n}, {\n top,\n height\n}) {\n return (clientY - top) / height;\n}\nfunction getOffsetHorizontal({\n clientX\n}, {\n left,\n width\n}) {\n return (clientX - left) / width;\n}\nlet TuiScrollbarDirective = /*#__PURE__*/(() => {\n class TuiScrollbarDirective {\n constructor(zone, destroy$, animationFrame$, container, doc, el) {\n this.container = container;\n this.doc = doc;\n this.el = el;\n this.tuiScrollbar = 'vertical';\n const {\n nativeElement\n } = this.el;\n const mousedown$ = tuiTypedFromEvent(nativeElement, 'mousedown');\n const mousemove$ = tuiTypedFromEvent(this.doc, 'mousemove');\n const mouseup$ = tuiTypedFromEvent(this.doc, 'mouseup');\n const mousedownWrapper$ = tuiTypedFromEvent(this.wrapper, 'mousedown');\n merge(mousedownWrapper$.pipe(map(event => this.getScrolled(event, 0.5, 0.5))), mousedown$.pipe(switchMap(event => {\n const rect = nativeElement.getBoundingClientRect();\n const vertical = getOffsetVertical(event, rect);\n const horizontal = getOffsetHorizontal(event, rect);\n return mousemove$.pipe(map(event => this.getScrolled(event, vertical, horizontal)), takeUntil(mouseup$));\n }))).pipe(tuiZonefree(zone), takeUntil(destroy$)).subscribe(([scrollTop, scrollLeft]) => {\n this.element.style.scrollBehavior = 'auto';\n if (this.tuiScrollbar === 'vertical') {\n this.element.scrollTop = scrollTop;\n } else {\n this.element.scrollLeft = scrollLeft;\n }\n this.element.style.scrollBehavior = '';\n });\n merge(animationFrame$.pipe(throttleTime(POLLING_TIME)), tuiScrollFrom(this.element)).pipe(tuiZonefree(zone), takeUntil(destroy$)).subscribe(() => {\n if (this.tuiScrollbar === 'vertical') {\n nativeElement.style.top = `${this.thumb * 100}%`;\n nativeElement.style.height = `${this.view * 100}%`;\n } else {\n nativeElement.style.left = `${this.thumb * 100}%`;\n nativeElement.style.width = `${this.view * 100}%`;\n }\n });\n }\n get wrapper() {\n return this.el.nativeElement.parentElement;\n }\n get scrolled() {\n const {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollLeft,\n scrollWidth,\n clientWidth\n } = this.element;\n return this.tuiScrollbar === 'vertical' ? scrollTop / (scrollHeight - clientHeight) : scrollLeft / (scrollWidth - clientWidth);\n }\n get compensation() {\n const {\n clientHeight,\n scrollHeight,\n clientWidth,\n scrollWidth\n } = this.element;\n if (clientHeight * clientHeight / scrollHeight > MIN_WIDTH && this.tuiScrollbar === 'vertical' || clientWidth * clientWidth / scrollWidth > MIN_WIDTH && this.tuiScrollbar === 'horizontal') {\n return 0;\n }\n return this.tuiScrollbar === 'vertical' ? MIN_WIDTH / clientHeight : MIN_WIDTH / clientWidth;\n }\n get thumb() {\n const compensation = this.compensation || this.view;\n return this.scrolled * (1 - compensation);\n }\n get view() {\n const {\n clientHeight,\n scrollHeight,\n clientWidth,\n scrollWidth\n } = this.element;\n return this.tuiScrollbar === 'vertical' ? Math.ceil(clientHeight / scrollHeight * 100) / 100 : Math.ceil(clientWidth / scrollWidth * 100) / 100;\n }\n get element() {\n return this.container.nativeElement;\n }\n getScrolled({\n clientY,\n clientX\n }, offsetVertical, offsetHorizontal) {\n const {\n offsetHeight,\n offsetWidth\n } = this.el.nativeElement;\n const {\n top,\n left,\n width,\n height\n } = this.wrapper.getBoundingClientRect();\n const maxTop = this.element.scrollHeight - height;\n const maxLeft = this.element.scrollWidth - width;\n const scrolledTop = (clientY - top - offsetHeight * offsetVertical) / (height - offsetHeight);\n const scrolledLeft = (clientX - left - offsetWidth * offsetHorizontal) / (width - offsetWidth);\n return [maxTop * scrolledTop, maxLeft * scrolledLeft];\n }\n }\n TuiScrollbarDirective.ɵfac = function TuiScrollbarDirective_Factory(t) {\n return new (t || TuiScrollbarDirective)(i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(ANIMATION_FRAME), i0.ɵɵdirectiveInject(TUI_SCROLL_REF), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiScrollbarDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiScrollbarDirective,\n selectors: [[\"\", \"tuiScrollbar\", \"\"]],\n inputs: {\n tuiScrollbar: \"tuiScrollbar\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])]\n });\n return TuiScrollbarDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiScrollControlsComponent = /*#__PURE__*/(() => {\n class TuiScrollControlsComponent {\n constructor(isIOS, zone, scrollRef, animationFrame$) {\n this.isIOS = isIOS;\n this.zone = zone;\n this.scrollRef = scrollRef;\n this.animationFrame$ = animationFrame$;\n this.refresh$ = this.animationFrame$.pipe(throttleTime(300), map(() => {\n const {\n clientHeight,\n scrollHeight,\n clientWidth,\n scrollWidth\n } = this.scrollRef.nativeElement;\n return [Math.ceil(clientHeight / scrollHeight * 100) < 100, Math.ceil(clientWidth / scrollWidth * 100) < 100];\n }), startWith([false, false]), distinctUntilChanged((a, b) => a[0] === b[0] && a[1] === b[1]), tuiZoneOptimized(this.zone));\n }\n }\n TuiScrollControlsComponent.ɵfac = function TuiScrollControlsComponent_Factory(t) {\n return new (t || TuiScrollControlsComponent)(i0.ɵɵdirectiveInject(TUI_IS_IOS), i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(TUI_SCROLL_REF), i0.ɵɵdirectiveInject(ANIMATION_FRAME));\n };\n TuiScrollControlsComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiScrollControlsComponent,\n selectors: [[\"tui-scroll-controls\"]],\n decls: 1,\n vars: 1,\n 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\"]],\n template: function TuiScrollControlsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiScrollControlsComponent_ng_container_0_Template, 3, 3, \"ng-container\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", !ctx.isIOS);\n }\n },\n dependencies: [i1$1.NgIf, TuiScrollbarDirective, i1$1.AsyncPipe],\n 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}\"],\n changeDetection: 0\n });\n return TuiScrollControlsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst SCROLL_REF_SELECTOR = '[tuiScrollRef]';\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 TuiScrollControlsModule = /*#__PURE__*/(() => {\n class TuiScrollControlsModule {}\n TuiScrollControlsModule.ɵfac = function TuiScrollControlsModule_Factory(t) {\n return new (t || TuiScrollControlsModule)();\n };\n TuiScrollControlsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiScrollControlsModule\n });\n TuiScrollControlsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n });\n return TuiScrollControlsModule;\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, TuiScrollControlsComponent, TuiScrollControlsModule, TuiScrollRefDirective, TuiScrollbarDirective };\n","import { tuiAssert } from '@taiga-ui/cdk/classes';\nimport { TuiPureException } from '@taiga-ui/cdk/exceptions';\n\n/**\n * @deprecated:\n * not compatible with TypeScript 5\n */\nfunction tuiDebounce(timeout) {\n let timeoutRef;\n return function (_target, _key, descriptor) {\n const {\n value\n } = descriptor;\n descriptor.value = function (...args) {\n clearTimeout(timeoutRef);\n timeoutRef = setTimeout(() => value.apply(this, args), timeout);\n };\n return descriptor;\n };\n}\nfunction errorGetDefault(key, component) {\n return `Default value for ${String(key)} was not provided in ${component}, error in Taiga UI Angular Kit`;\n}\nfunction errorSetDefault(key, component) {\n return `Undefined was passed as ${String(key)} to ${component}, which is invalid input, using default value:`;\n}\nfunction errorSetDefaultInitial(key, component) {\n return `Undefined was passed as default value for ${String(key)} to ${component}, error in Taiga UI Angular Kit`;\n}\n/**\n * @deprecated:\n * not compatible with TypeScript 5\n *\n * Decorator for checking input values for undefined. You can also pass\n * optional assertion to check input against.\n *\n * CAUTION: This decorator overwrites other getters and setters.\n */\nfunction tuiDefaultProp(assertion, ...args) {\n return (target, key) => {\n const {\n name\n } = target.constructor;\n const errorGetDefaultMessage = ngDevMode && errorGetDefault(key, name);\n const errorSetDefaultMessage = ngDevMode && errorSetDefault(key, name);\n Object.defineProperty(target, key, {\n configurable: true,\n get() {\n ngDevMode && tuiAssert.assert(false, errorGetDefaultMessage);\n return undefined;\n },\n set(initialValue) {\n const isValid = initialValue !== undefined;\n const errorMessage = ngDevMode && errorSetDefaultInitial(key, name);\n let currentValue = initialValue;\n ngDevMode && tuiAssert.assert(isValid, errorMessage);\n if (ngDevMode && isValid && assertion && tuiAssert) {\n tuiAssert.assert(assertion.call(this, initialValue), `${String(key)} in ${name} received:`, initialValue, ...args);\n }\n Object.defineProperty(this, key, {\n configurable: true,\n get() {\n return currentValue;\n },\n set(value) {\n const isValid = value !== undefined;\n const backupValue = initialValue;\n ngDevMode && tuiAssert.assert(isValid, errorSetDefaultMessage, String(backupValue));\n if (ngDevMode && isValid && assertion && tuiAssert) {\n tuiAssert.assert(assertion.call(this, value), `${String(key)} in ${name} received:`, value, ...args);\n }\n currentValue = isValid ? value : backupValue;\n }\n });\n }\n });\n };\n}\nfunction decorateMethod(originalMethod) {\n let previousArgs = [];\n let originalFnWasCalledLeastAtOnce = false;\n let pureValue;\n return function tuiPureMethodPatched(...args) {\n const isPure = originalFnWasCalledLeastAtOnce && previousArgs.length === args.length && args.every((arg, index) => arg === previousArgs[index]);\n if (isPure) {\n return pureValue;\n }\n previousArgs = args;\n pureValue = originalMethod.apply(this, args);\n originalFnWasCalledLeastAtOnce = true;\n return pureValue;\n };\n}\nfunction decorateGetter(originalGetter, propertyKey, enumerable = true) {\n return function tuiPureGetterPatched() {\n const value = originalGetter.call(this);\n Object.defineProperty(this, propertyKey, {\n enumerable,\n value\n });\n return value;\n };\n}\nfunction tuiPure(target, propertyKeyOrContext, descriptor) {\n if (typeof target === 'function') {\n const context = propertyKeyOrContext;\n if (context.kind === 'getter') {\n return decorateGetter(target, context.name);\n }\n if (context.kind === 'method') {\n return decorateMethod(target);\n }\n throw new TuiPureException();\n }\n const {\n get,\n enumerable,\n value\n } = descriptor;\n const propertyKey = propertyKeyOrContext;\n if (get) {\n return {\n configurable: true,\n enumerable,\n get: decorateGetter(get, propertyKey, enumerable)\n };\n }\n if (typeof value !== 'function') {\n throw new TuiPureException();\n }\n const original = value;\n return {\n configurable: true,\n enumerable,\n get() {\n let previousArgs = [];\n let originalFnWasCalledLeastAtOnce = false;\n let pureValue;\n const patched = (...args) => {\n const isPure = originalFnWasCalledLeastAtOnce && previousArgs.length === args.length && args.every((arg, index) => arg === previousArgs[index]);\n if (isPure) {\n return pureValue;\n }\n previousArgs = args;\n pureValue = original.apply(this, args);\n originalFnWasCalledLeastAtOnce = true;\n return pureValue;\n };\n Object.defineProperty(this, propertyKey, {\n configurable: true,\n value: patched\n });\n return patched;\n }\n };\n}\nfunction errorSet(key, component) {\n return `Undefined was passed as ${String(key)} to ${component}, setter will not be called`;\n}\n/**\n * @deprecated:\n * not compatible with TypeScript 5\n *\n * Decorator for checking input setter values against a custom assertion which\n * takes value passed to input setter and component instance as arguments.\n * It specifically checks for undefined values and prevents calls to the\n * original setter in this case.\n */\nfunction tuiRequiredSetter(assertion, ...args) {\n return (target, key, {\n configurable,\n enumerable,\n get,\n set\n }) => {\n const {\n name\n } = target.constructor;\n return {\n configurable,\n enumerable,\n get,\n set(value) {\n if (ngDevMode && value !== undefined && assertion && tuiAssert) {\n tuiAssert.assert(assertion.call(this, value), `${String(key)} in ${name} received:`, value, ...args);\n }\n if (!set || value === undefined) {\n ngDevMode && tuiAssert.assert(value !== undefined, errorSet(key, name));\n return;\n }\n set.call(this, value);\n }\n };\n };\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiDebounce, tuiDefaultProp, tuiPure, tuiRequiredSetter };\n","import { __decorate } from 'tslib';\nimport * as i0 from '@angular/core';\nimport { NgZone, ElementRef, Directive, Inject, Optional, SkipSelf, Input, Output, NgModule } from '@angular/core';\nimport { tuiPure } from '@taiga-ui/cdk/decorators';\nimport { tuiZoneOptimized } from '@taiga-ui/cdk/observables';\nimport { TUI_ACTIVE_ELEMENT } from '@taiga-ui/cdk/tokens';\nimport { tuiArrayRemove } from '@taiga-ui/cdk/utils';\nimport { map, startWith, distinctUntilChanged, skip } from 'rxjs/operators';\nimport * as i1 from 'rxjs';\nlet TuiActiveZoneDirective = /*#__PURE__*/(() => {\n class TuiActiveZoneDirective {\n constructor(active$, zone, el, directParentActiveZone) {\n var _a;\n this.active$ = active$;\n this.zone = zone;\n this.el = el;\n this.directParentActiveZone = directParentActiveZone;\n this.subActiveZones = [];\n this.tuiActiveZoneParent = null;\n this.tuiActiveZoneChange = this.active$.pipe(map(element => !!element && this.contains(element)), startWith(false), distinctUntilChanged(), skip(1), tuiZoneOptimized(this.zone));\n (_a = this.directParentActiveZone) === null || _a === void 0 ? void 0 : _a.addSubActiveZone(this);\n }\n set tuiActiveZoneParentSetter(zone) {\n this.setZone(zone);\n }\n ngOnDestroy() {\n var _a, _b;\n (_a = this.directParentActiveZone) === null || _a === void 0 ? void 0 : _a.removeSubActiveZone(this);\n (_b = this.tuiActiveZoneParent) === null || _b === void 0 ? void 0 : _b.removeSubActiveZone(this);\n }\n contains(node) {\n return this.el.nativeElement.contains(node) || this.subActiveZones.some((item, index, array) => array.indexOf(item) === index && item.contains(node));\n }\n setZone(zone) {\n var _a;\n (_a = this.tuiActiveZoneParent) === null || _a === void 0 ? void 0 : _a.removeSubActiveZone(this);\n zone === null || zone === void 0 ? void 0 : zone.addSubActiveZone(this);\n this.tuiActiveZoneParent = zone;\n }\n addSubActiveZone(activeZone) {\n this.subActiveZones = [...this.subActiveZones, activeZone];\n }\n removeSubActiveZone(activeZone) {\n this.subActiveZones = tuiArrayRemove(this.subActiveZones, this.subActiveZones.indexOf(activeZone));\n }\n }\n TuiActiveZoneDirective.ɵfac = function TuiActiveZoneDirective_Factory(t) {\n return new (t || TuiActiveZoneDirective)(i0.ɵɵdirectiveInject(TUI_ACTIVE_ELEMENT), i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TuiActiveZoneDirective, 12));\n };\n TuiActiveZoneDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiActiveZoneDirective,\n selectors: [[\"\", \"tuiActiveZone\", \"\", 5, \"ng-container\"], [\"\", \"tuiActiveZoneChange\", \"\", 5, \"ng-container\"], [\"\", \"tuiActiveZoneParent\", \"\", 5, \"ng-container\"]],\n hostBindings: function TuiActiveZoneDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mousedown.silent\", function TuiActiveZoneDirective_mousedown_silent_HostBindingHandler() {\n return 0;\n }, false, i0.ɵɵresolveDocument);\n }\n },\n inputs: {\n tuiActiveZoneParentSetter: [0, \"tuiActiveZoneParent\", \"tuiActiveZoneParentSetter\"]\n },\n outputs: {\n tuiActiveZoneChange: \"tuiActiveZoneChange\"\n },\n exportAs: [\"tuiActiveZone\"]\n });\n __decorate([tuiPure], TuiActiveZoneDirective.prototype, \"setZone\", null);\n return TuiActiveZoneDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiActiveZoneModule = /*#__PURE__*/(() => {\n class TuiActiveZoneModule {}\n TuiActiveZoneModule.ɵfac = function TuiActiveZoneModule_Factory(t) {\n return new (t || TuiActiveZoneModule)();\n };\n TuiActiveZoneModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiActiveZoneModule\n });\n TuiActiveZoneModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiActiveZoneModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiActiveZoneDirective, TuiActiveZoneModule };\n","import * as i0 from '@angular/core';\nimport { Directive, ElementRef, Optional, Self, Inject, Renderer2, NgZone, InjectionToken, Input, NgModule } from '@angular/core';\nimport { tuiCoerceBooleanProperty } from '@taiga-ui/cdk/coercion';\nimport * as i1$1 from '@taiga-ui/cdk/services';\nimport { TuiDestroyService } from '@taiga-ui/cdk/services';\nimport * as i1 from 'rxjs';\nimport { race, timer } from 'rxjs';\nimport { throttleTime, map, skipWhile, take, takeUntil } from 'rxjs/operators';\nimport { ANIMATION_FRAME, WINDOW } from '@ng-web-apis/common';\nimport { TUI_FOCUSABLE_ITEM_ACCESSOR, TUI_IS_IOS } from '@taiga-ui/cdk/tokens';\nimport { tuiCreateToken, tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';\nimport { POLLING_TIME } from '@taiga-ui/cdk/constants';\nimport { tuiPx, tuiIsPresent } from '@taiga-ui/cdk/utils';\nlet AbstractTuiAutofocusHandler = /*#__PURE__*/(() => {\n class AbstractTuiAutofocusHandler {\n constructor(focusable, el) {\n this.focusable = focusable;\n this.el = el;\n }\n get element() {\n var _a;\n return ((_a = this.focusable) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) || this.el.nativeElement;\n }\n get isTextFieldElement() {\n return this.element.matches('input, textarea, [contenteditable]');\n }\n }\n AbstractTuiAutofocusHandler.ɵfac = function AbstractTuiAutofocusHandler_Factory(t) {\n i0.ɵɵinvalidFactory();\n };\n AbstractTuiAutofocusHandler.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiAutofocusHandler\n });\n return AbstractTuiAutofocusHandler;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TIMEOUT = 1000;\nconst NG_ANIMATION_SELECTOR = '.ng-animating';\nlet TuiDefaultAutofocusHandler = /*#__PURE__*/(() => {\n class TuiDefaultAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(focusable, el, animationFrame$) {\n super(focusable, el);\n this.animationFrame$ = animationFrame$;\n }\n setFocus() {\n if (this.isTextFieldElement) {\n race(timer(TIMEOUT), this.animationFrame$.pipe(throttleTime(POLLING_TIME), map(() => this.element.closest(NG_ANIMATION_SELECTOR)), skipWhile(Boolean), take(1))).subscribe(() => this.element.focus({\n preventScroll: true\n }));\n } else {\n this.element.focus({\n preventScroll: true\n });\n }\n }\n }\n TuiDefaultAutofocusHandler.ɵfac = function TuiDefaultAutofocusHandler_Factory(t) {\n return new (t || TuiDefaultAutofocusHandler)(i0.ɵɵdirectiveInject(TUI_FOCUSABLE_ITEM_ACCESSOR, 10), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(ANIMATION_FRAME));\n };\n TuiDefaultAutofocusHandler.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDefaultAutofocusHandler,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDefaultAutofocusHandler;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TEXTFIELD_ATTRS = ['type', 'inputMode', 'autocomplete', 'accept', 'min', 'max', 'step', 'pattern', 'size', 'maxlength'];\nlet TuiIosAutofocusHandler = /*#__PURE__*/(() => {\n class TuiIosAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(focusable, el, renderer, zone, win) {\n super(focusable, el);\n this.renderer = renderer;\n this.zone = zone;\n this.win = win;\n this.patchCssStyles();\n }\n setFocus() {\n if (this.isTextFieldElement) {\n this.zone.runOutsideAngular(() => this.iosWebkitAutofocus());\n } else {\n this.element.focus({\n preventScroll: true\n });\n }\n }\n iosWebkitAutofocus() {\n var _a;\n const fakeInput = this.makeFakeInput();\n const duration = this.getDurationTimeBeforeFocus();\n let fakeFocusTimeoutId = 0;\n let elementFocusTimeoutId = 0;\n const blurHandler = () => fakeInput.focus({\n preventScroll: true\n });\n const focusHandler = () => {\n clearTimeout(fakeFocusTimeoutId);\n fakeFocusTimeoutId = this.win.setTimeout(() => {\n clearTimeout(elementFocusTimeoutId);\n fakeInput.removeEventListener('blur', blurHandler);\n fakeInput.removeEventListener('focus', focusHandler);\n elementFocusTimeoutId = this.win.setTimeout(() => {\n this.element.focus({\n preventScroll: false\n });\n fakeInput.remove();\n }, duration);\n });\n };\n fakeInput.addEventListener('blur', blurHandler, {\n once: true\n });\n fakeInput.addEventListener('focus', focusHandler);\n if (this.insideDialog()) {\n this.win.document.body.appendChild(fakeInput);\n } else {\n (_a = this.element.parentElement) === null || _a === void 0 ? void 0 : _a.appendChild(fakeInput);\n }\n fakeInput.focus({\n preventScroll: true\n });\n }\n /**\n * @note:\n * emulate textfield position in layout with cursor\n * before focus to real textfield element\n *\n * required note:\n * [fakeInput.readOnly = true] ~\n * don't use {readOnly: true} value, it's doesn't work for emulate autofill\n *\n * [fakeInput.style.opacity = 0] ~\n * don't use {opacity: 0}, sometimes it's doesn't work for emulate real input\n *\n * [fakeInput.style.fontSize = 16px] ~\n * disable possible auto zoom\n *\n * [fakeInput.style.top/left] ~\n * emulate position cursor before focus to real textfield element\n */\n makeFakeInput() {\n const fakeInput = this.renderer.createElement('input');\n const rect = this.element.getBoundingClientRect();\n this.patchFakeInputFromFocusableElement(fakeInput);\n fakeInput.style.height = tuiPx(rect.height);\n fakeInput.style.width = tuiPx(rect.width / 2);\n fakeInput.style.position = 'fixed';\n fakeInput.style.zIndex = '-99999999';\n fakeInput.style.caretColor = 'transparent';\n fakeInput.style.border = 'none';\n fakeInput.style.outline = 'none';\n fakeInput.style.color = 'transparent';\n fakeInput.style.background = 'transparent';\n fakeInput.style.cursor = 'none';\n fakeInput.style.fontSize = tuiPx(16);\n fakeInput.style.top = tuiPx(rect.top);\n fakeInput.style.left = tuiPx(rect.left);\n return fakeInput;\n }\n getDurationTimeBeforeFocus() {\n return parseFloat(this.win.getComputedStyle(this.element).getPropertyValue('--tui-duration')) || 0;\n }\n /**\n * @note:\n * unfortunately, in older versions of iOS\n * there is a bug that the fake input cursor\n * will move along with the dialog animation\n * and then that dialog will be shaking\n */\n insideDialog() {\n return !!this.element.closest('tui-dialog');\n }\n /**\n * @note:\n * This is necessary so that the viewport isn't recalculated\n * and then the dialogs don't shake.\n *\n * Also, we need to fixed height viewport,\n * so that when focusing the dialogs don't shake\n */\n patchCssStyles() {\n [this.win.document.documentElement, this.win.document.body].forEach(element => {\n element.style.setProperty('overflow', 'auto');\n element.style.setProperty('height', '100%');\n });\n }\n /**\n * @note:\n * inherit basic attributes values from real input\n * for help iOS detect what do you want see on keyboard,\n * for example [inputMode=numeric, autocomplete=cc-number]\n */\n patchFakeInputFromFocusableElement(fakeInput) {\n TEXTFIELD_ATTRS.forEach(attr => {\n const value = this.element.getAttribute(attr);\n if (tuiIsPresent(value)) {\n fakeInput.setAttribute(attr, value);\n }\n });\n }\n }\n TuiIosAutofocusHandler.ɵfac = function TuiIosAutofocusHandler_Factory(t) {\n return new (t || TuiIosAutofocusHandler)(i0.ɵɵdirectiveInject(TUI_FOCUSABLE_ITEM_ACCESSOR, 10), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(Renderer2), i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(WINDOW));\n };\n TuiIosAutofocusHandler.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiIosAutofocusHandler,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return TuiIosAutofocusHandler;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_AUTOFOCUS_DEFAULT_OPTIONS = {\n delay: NaN // NaN = no delay/sync\n};\nconst TUI_AUTOFOCUS_OPTIONS = tuiCreateToken(TUI_AUTOFOCUS_DEFAULT_OPTIONS);\nfunction tuiAutoFocusOptionsProvider(options) {\n return tuiProvideOptions(TUI_AUTOFOCUS_OPTIONS, options, TUI_AUTOFOCUS_DEFAULT_OPTIONS);\n}\nconst TUI_AUTOFOCUS_HANDLER = new InjectionToken('[TUI_AUTOFOCUS_HANDLER]');\nconst TUI_AUTOFOCUS_PROVIDERS = [{\n provide: TUI_AUTOFOCUS_HANDLER,\n useFactory: (focusable, el, animationFrame$, renderer, zone, win, isIos) => isIos ? new TuiIosAutofocusHandler(focusable, el, renderer, zone, win) : new TuiDefaultAutofocusHandler(focusable, el, animationFrame$),\n deps: [[new Optional(), new Self(), TUI_FOCUSABLE_ITEM_ACCESSOR], ElementRef, ANIMATION_FRAME, Renderer2, NgZone, WINDOW, TUI_IS_IOS]\n}, TuiDestroyService];\nlet TuiAutoFocusDirective = /*#__PURE__*/(() => {\n class TuiAutoFocusDirective {\n constructor(handler, options, destroy$) {\n this.handler = handler;\n this.options = options;\n this.destroy$ = destroy$;\n this.autoFocus = true;\n }\n ngAfterViewInit() {\n if (tuiCoerceBooleanProperty(this.autoFocus)) {\n this.focus();\n }\n }\n focus() {\n if (Number.isNaN(this.options.delay)) {\n void Promise.resolve().then(() => this.handler.setFocus());\n } else {\n timer(this.options.delay).pipe(takeUntil(this.destroy$)).subscribe(() => this.handler.setFocus());\n }\n }\n }\n TuiAutoFocusDirective.ɵfac = function TuiAutoFocusDirective_Factory(t) {\n return new (t || TuiAutoFocusDirective)(i0.ɵɵdirectiveInject(TUI_AUTOFOCUS_HANDLER), i0.ɵɵdirectiveInject(TUI_AUTOFOCUS_OPTIONS), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiAutoFocusDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiAutoFocusDirective,\n selectors: [[\"\", \"tuiAutoFocus\", \"\"]],\n inputs: {\n autoFocus: [0, \"tuiAutoFocus\", \"autoFocus\"]\n },\n features: [i0.ɵɵProvidersFeature(TUI_AUTOFOCUS_PROVIDERS)]\n });\n return TuiAutoFocusDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiAutoFocusModule = /*#__PURE__*/(() => {\n class TuiAutoFocusModule {}\n TuiAutoFocusModule.ɵfac = function TuiAutoFocusModule_Factory(t) {\n return new (t || TuiAutoFocusModule)();\n };\n TuiAutoFocusModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiAutoFocusModule\n });\n TuiAutoFocusModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiAutoFocusModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiSynchronousAutofocusHandler = /*#__PURE__*/(() => {\n class TuiSynchronousAutofocusHandler extends AbstractTuiAutofocusHandler {\n constructor(focusable, el) {\n super(focusable, el);\n }\n setFocus() {\n this.element.focus({\n preventScroll: true\n });\n }\n }\n TuiSynchronousAutofocusHandler.ɵfac = function TuiSynchronousAutofocusHandler_Factory(t) {\n return new (t || TuiSynchronousAutofocusHandler)(i0.ɵɵdirectiveInject(TUI_FOCUSABLE_ITEM_ACCESSOR, 10), i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiSynchronousAutofocusHandler.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiSynchronousAutofocusHandler,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return TuiSynchronousAutofocusHandler;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractTuiAutofocusHandler, TUI_AUTOFOCUS_DEFAULT_OPTIONS, TUI_AUTOFOCUS_HANDLER, TUI_AUTOFOCUS_OPTIONS, TUI_AUTOFOCUS_PROVIDERS, TuiAutoFocusDirective, TuiAutoFocusModule, TuiDefaultAutofocusHandler, TuiIosAutofocusHandler, TuiSynchronousAutofocusHandler, tuiAutoFocusOptionsProvider };\n","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: [0, \"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, NgModule } from '@angular/core';\n\n/**\n * Blank directive for queries via `@ContentChildren` / `@ViewChildren` / `querySelector`\n */\nlet TuiItemDirective = /*#__PURE__*/(() => {\n class TuiItemDirective {}\n TuiItemDirective.ɵfac = function TuiItemDirective_Factory(t) {\n return new (t || TuiItemDirective)();\n };\n TuiItemDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiItemDirective,\n selectors: [[\"\", \"tuiItem\", \"\"]]\n });\n return TuiItemDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiItemModule = /*#__PURE__*/(() => {\n class TuiItemModule {}\n TuiItemModule.ɵfac = function TuiItemModule_Factory(t) {\n return new (t || TuiItemModule)();\n };\n TuiItemModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiItemModule\n });\n TuiItemModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiItemModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiItemDirective, TuiItemModule };\n","import * as i0 from '@angular/core';\nimport { ViewContainerRef, TemplateRef, Directive, Inject, Input, NgModule } from '@angular/core';\n\n/**\n * @internal\n */\nclass TuiLetContext {\n constructor(internalDirectiveInstance) {\n this.internalDirectiveInstance = internalDirectiveInstance;\n }\n get $implicit() {\n return this.internalDirectiveInstance.tuiLet;\n }\n get tuiLet() {\n return this.internalDirectiveInstance.tuiLet;\n }\n}\n\n/**\n * Works like *ngIf but does not have a condition — use it to declare\n * the result of pipes calculation (i.e. async pipe)\n */\nlet TuiLetDirective = /*#__PURE__*/(() => {\n class TuiLetDirective {\n constructor(viewContainer, templateRef) {\n viewContainer.createEmbeddedView(templateRef, new TuiLetContext(this));\n }\n /**\n * Asserts the correct type of the context for the template that `TuiLet` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `TuiLet` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard(_dir, _ctx) {\n return true;\n }\n }\n TuiLetDirective.ɵfac = function TuiLetDirective_Factory(t) {\n return new (t || TuiLetDirective)(i0.ɵɵdirectiveInject(ViewContainerRef), i0.ɵɵdirectiveInject(TemplateRef));\n };\n TuiLetDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiLetDirective,\n selectors: [[\"\", \"tuiLet\", \"\"]],\n inputs: {\n tuiLet: \"tuiLet\"\n }\n });\n return TuiLetDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLetModule = /*#__PURE__*/(() => {\n class TuiLetModule {}\n TuiLetModule.ɵfac = function TuiLetModule_Factory(t) {\n return new (t || TuiLetModule)();\n };\n TuiLetModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiLetModule\n });\n TuiLetModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiLetModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiLetContext, TuiLetDirective, TuiLetModule };\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, NgZone, Directive, Inject, Self, Input, HostBinding, NgModule } from '@angular/core';\nimport { tuiTypedFromEvent, tuiZonefree } from '@taiga-ui/cdk/observables';\nimport { TuiDestroyService } from '@taiga-ui/cdk/services';\nimport { tuiIsElement, tuiGetScrollParent, tuiCanScroll } from '@taiga-ui/cdk/utils/dom';\nimport { filter, takeUntil, switchMap, tap } from 'rxjs/operators';\nimport * as i1 from 'rxjs';\n\n/**\n * Directive to isolate scrolling, i.e. prevent body scroll behind modal dialog\n */\nlet TuiOverscrollDirective = /*#__PURE__*/(() => {\n class TuiOverscrollDirective {\n constructor({\n nativeElement\n }, zone, destroy$) {\n this.mode = 'scroll';\n tuiTypedFromEvent(nativeElement, 'wheel', {\n passive: false\n }).pipe(filter(() => this.enabled), tuiZonefree(zone), takeUntil(destroy$)).subscribe(event => {\n this.processEvent(event, !!event.deltaY, event.deltaY ? event.deltaY < 0 : event.deltaX < 0);\n });\n tuiTypedFromEvent(nativeElement, 'touchstart', {\n passive: true\n }).pipe(switchMap(({\n touches\n }) => {\n let {\n clientX,\n clientY\n } = touches[0];\n let deltaX = 0;\n let deltaY = 0;\n let vertical;\n return tuiTypedFromEvent(nativeElement, 'touchmove', {\n passive: false\n }).pipe(filter(() => this.enabled), tap(event => {\n // We have to have it in tap instead of subscribe due to variables in closure\n const changedTouch = event.changedTouches[0];\n deltaX = clientX - changedTouch.clientX;\n deltaY = clientY - changedTouch.clientY;\n clientX = changedTouch.clientX;\n clientY = changedTouch.clientY;\n if (vertical === undefined) {\n vertical = Math.abs(deltaY) > Math.abs(deltaX);\n }\n this.processEvent(event, vertical, vertical ? deltaY < 0 : deltaX < 0);\n }));\n }), tuiZonefree(zone), takeUntil(destroy$)).subscribe();\n }\n get enabled() {\n return this.mode !== 'none';\n }\n get overscrollBehavior() {\n return this.enabled ? 'contain' : null;\n }\n processEvent(event, vertical, negative) {\n var _a;\n const {\n target,\n currentTarget,\n cancelable\n } = event;\n if (!cancelable || !tuiIsElement(target) || ((_a = target) === null || _a === void 0 ? void 0 : _a.type) === 'range') {\n return;\n }\n // This is all what's needed in Chrome/Firefox thanks to CSS overscroll-behavior\n if (this.mode === 'all' && (vertical && !currentTarget.contains(tuiGetScrollParent(target)) || !vertical && !currentTarget.contains(tuiGetScrollParent(target, false)))) {\n event.preventDefault();\n return;\n }\n // This is Safari/IE/Edge fallback\n if (vertical && (negative && !tuiCanScroll(target, currentTarget, true, false) || !negative && !tuiCanScroll(target, currentTarget, true, true))) {\n event.preventDefault();\n return;\n }\n if (!vertical && (negative && !tuiCanScroll(target, currentTarget, false, false) || !negative && !tuiCanScroll(target, currentTarget, false, true))) {\n event.preventDefault();\n }\n }\n }\n TuiOverscrollDirective.ɵfac = function TuiOverscrollDirective_Factory(t) {\n return new (t || TuiOverscrollDirective)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(NgZone), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiOverscrollDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiOverscrollDirective,\n selectors: [[\"\", \"tuiOverscroll\", \"\"]],\n hostVars: 2,\n hostBindings: function TuiOverscrollDirective_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵstyleProp(\"overscroll-behavior\", ctx.overscrollBehavior);\n }\n },\n inputs: {\n mode: [0, \"tuiOverscroll\", \"mode\"]\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])]\n });\n return TuiOverscrollDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiOverscrollModule = /*#__PURE__*/(() => {\n class TuiOverscrollModule {}\n TuiOverscrollModule.ɵfac = function TuiOverscrollModule_Factory(t) {\n return new (t || TuiOverscrollModule)();\n };\n TuiOverscrollModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiOverscrollModule\n });\n TuiOverscrollModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiOverscrollModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiOverscrollDirective, TuiOverscrollModule };\n","import * as i0 from '@angular/core';\nimport { Injectable, Component, ChangeDetectionStrategy, NgModule } from '@angular/core';\nimport { AbstractTuiPortalService, AbstractTuiPortalHostComponent } from '@taiga-ui/cdk/abstract';\n\n/**\n * Service for displaying dropdown portals\n */\nconst _c0 = [\"*\"];\nlet TuiDropdownPortalService = /*#__PURE__*/(() => {\n class TuiDropdownPortalService extends AbstractTuiPortalService {}\n TuiDropdownPortalService.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDropdownPortalService_BaseFactory;\n return function TuiDropdownPortalService_Factory(t) {\n return (ɵTuiDropdownPortalService_BaseFactory || (ɵTuiDropdownPortalService_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDropdownPortalService)))(t || TuiDropdownPortalService);\n };\n })();\n TuiDropdownPortalService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiDropdownPortalService,\n factory: TuiDropdownPortalService.ɵfac,\n providedIn: 'root'\n });\n return TuiDropdownPortalService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Host element for dynamically created portals, for example using {@link TuiDropdownDirective}.\n */\nlet TuiDropdownHostComponent = /*#__PURE__*/(() => {\n class TuiDropdownHostComponent extends AbstractTuiPortalHostComponent {}\n TuiDropdownHostComponent.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDropdownHostComponent_BaseFactory;\n return function TuiDropdownHostComponent_Factory(t) {\n return (ɵTuiDropdownHostComponent_BaseFactory || (ɵTuiDropdownHostComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDropdownHostComponent)))(t || TuiDropdownHostComponent);\n };\n })();\n TuiDropdownHostComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiDropdownHostComponent,\n selectors: [[\"tui-dropdown-host\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: AbstractTuiPortalService,\n useExisting: TuiDropdownPortalService\n },\n // TODO: Remove in 4.0\n {\n provide: AbstractTuiPortalHostComponent,\n useExisting: TuiDropdownHostComponent\n }]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c0,\n decls: 3,\n vars: 0,\n consts: [[\"viewContainer\", \"\"]],\n template: function TuiDropdownHostComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n i0.ɵɵelementContainer(1, null, 0);\n }\n },\n 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%}\"],\n changeDetection: 0\n });\n return TuiDropdownHostComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDropdownHostModule = /*#__PURE__*/(() => {\n class TuiDropdownHostModule {}\n TuiDropdownHostModule.ɵfac = function TuiDropdownHostModule_Factory(t) {\n return new (t || TuiDropdownHostModule)();\n };\n TuiDropdownHostModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiDropdownHostModule\n });\n TuiDropdownHostModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiDropdownHostModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiDropdownHostComponent, TuiDropdownHostModule, TuiDropdownPortalService };\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 { 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","// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nvar TuiDayOfWeek = /*#__PURE__*/function (TuiDayOfWeek) {\n TuiDayOfWeek[TuiDayOfWeek[\"Sunday\"] = 0] = \"Sunday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Monday\"] = 1] = \"Monday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Tuesday\"] = 2] = \"Tuesday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Wednesday\"] = 3] = \"Wednesday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Thursday\"] = 4] = \"Thursday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Friday\"] = 5] = \"Friday\";\n TuiDayOfWeek[TuiDayOfWeek[\"Saturday\"] = 6] = \"Saturday\";\n return TuiDayOfWeek;\n}(TuiDayOfWeek || {});\n// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nvar TuiMonthNumber = /*#__PURE__*/function (TuiMonthNumber) {\n TuiMonthNumber[TuiMonthNumber[\"January\"] = 0] = \"January\";\n TuiMonthNumber[TuiMonthNumber[\"February\"] = 1] = \"February\";\n TuiMonthNumber[TuiMonthNumber[\"March\"] = 2] = \"March\";\n TuiMonthNumber[TuiMonthNumber[\"April\"] = 3] = \"April\";\n TuiMonthNumber[TuiMonthNumber[\"May\"] = 4] = \"May\";\n TuiMonthNumber[TuiMonthNumber[\"June\"] = 5] = \"June\";\n TuiMonthNumber[TuiMonthNumber[\"July\"] = 6] = \"July\";\n TuiMonthNumber[TuiMonthNumber[\"August\"] = 7] = \"August\";\n TuiMonthNumber[TuiMonthNumber[\"September\"] = 8] = \"September\";\n TuiMonthNumber[TuiMonthNumber[\"October\"] = 9] = \"October\";\n TuiMonthNumber[TuiMonthNumber[\"November\"] = 10] = \"November\";\n TuiMonthNumber[TuiMonthNumber[\"December\"] = 11] = \"December\";\n return TuiMonthNumber;\n}(TuiMonthNumber || {});\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiDayOfWeek, TuiMonthNumber };\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 { TUI_VERSION, EMPTY_ARRAY, CHAR_NO_BREAK_SPACE } from '@taiga-ui/cdk';\nconst TUI_CACHE_BUSTING_PAYLOAD = `?v=${TUI_VERSION}`;\n\n/**\n * @deprecated\n * TODO: delete in v4.0\n */\nconst TUI_DECIMAL_SYMBOLS = [',', '.'];\nconst DEFAULT_ICONS_PATH = name => name.includes('.svg#') ? name : `#${name}`;\nconst TUI_DEFAULT_MARKER_HANDLER = () => EMPTY_ARRAY;\nconst TUI_DEFAULT_NUMBER_FORMAT = {\n decimalLimit: Infinity,\n decimalSeparator: ',',\n thousandSeparator: CHAR_NO_BREAK_SPACE,\n zeroPadding: true,\n rounding: 'truncate',\n decimal: 'not-zero'\n};\nconst tuiEditingKeys = ['Spacebar', 'Backspace', 'Delete', 'ArrowLeft', 'ArrowRight', 'Left', 'Right', 'End', 'Home'];\n\n/**\n * An event indicating that async data for expand has finished loading.\n * Dispatch to finish loading states for {@link TuiExpandComponent}.\n */\nconst TUI_EXPAND_LOADED = 'tui-expand-loaded';\n/**\n * An event for scrolling an element into view within {@link TuiScrollbarComponent}.\n */\nconst TUI_SCROLL_INTO_VIEW = 'tui-scroll-into-view';\n/**\n * An event to notify {@link TuiScrollbarComponent} that\n * it should control a nested element.\n */\nconst TUI_SCROLLABLE = 'tui-scrollable';\n/**\n * An event indicating and error during icon loading in {@link TuiSvgComponent}.\n */\nconst TUI_ICON_ERROR = 'tui-icon-error';\nconst TUI_HINT_DIRECTIONS = ['bottom-left', 'bottom', 'bottom-right', 'top-left', 'top', 'top-right', 'left-top', 'left', 'left-bottom', 'right-top', 'right', 'right-bottom'];\n\n/**\n * @deprecated Use {@link https://github.com/taiga-family/maskito Maskito}\n * TODO: delete in v4.0\n */\nconst MASK_CARET_TRAP = '[]';\nconst TUI_DIGIT_REGEXP = /\\d/;\nconst TUI_NON_DIGIT_REGEXP = /\\D/;\nconst TUI_NON_DIGITS_REGEXP = /\\D+/g;\nconst TUI_LEADING_ZEROES_REGEXP = /^0+/;\nconst TUI_MASK_SYMBOLS_REGEXP = /[ \\-_()]/g;\nconst TUI_LAST_PUNCTUATION_MARK_REGEXP = /[.,\\\\/#!$%\\\\^&\\\\*;:{}=\\\\-_`~()]$/;\nconst TUI_LATIN_REGEXP = /[A-z]/;\nconst TUI_LATIN_AND_NUMBERS_REGEXP = /[A-z|0-9]/;\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { DEFAULT_ICONS_PATH, MASK_CARET_TRAP, TUI_CACHE_BUSTING_PAYLOAD, TUI_DECIMAL_SYMBOLS, TUI_DEFAULT_MARKER_HANDLER, TUI_DEFAULT_NUMBER_FORMAT, TUI_DIGIT_REGEXP, TUI_EXPAND_LOADED, TUI_HINT_DIRECTIONS, TUI_ICON_ERROR, TUI_LAST_PUNCTUATION_MARK_REGEXP, TUI_LATIN_AND_NUMBERS_REGEXP, TUI_LATIN_REGEXP, TUI_LEADING_ZEROES_REGEXP, TUI_MASK_SYMBOLS_REGEXP, TUI_NON_DIGITS_REGEXP, TUI_NON_DIGIT_REGEXP, TUI_SCROLLABLE, TUI_SCROLL_INTO_VIEW, tuiEditingKeys };\n","import { svgNodeFilter, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_SPACE } from '@taiga-ui/cdk';\nfunction tuiCheckFixedPosition(element) {\n if (!element || typeof getComputedStyle === 'undefined') {\n return false;\n }\n const style = getComputedStyle(element);\n return style.getPropertyValue('position') === 'fixed' || tuiCheckFixedPosition(element.parentElement);\n}\n\n/**\n * Calculates size of safe area on mobile devices (status bars)\n *\n * ATTENTION: Only use in browser environment\n */\nfunction tuiGetSafeAreaSize() {\n if (!CSS.supports('padding-top: env(safe-area-inset-top)')) {\n return 0;\n }\n const div = document.createElement('div');\n div.style.paddingTop = 'env(safe-area-inset-top)';\n document.body.appendChild(div);\n const safeAreaSize = parseInt(window.getComputedStyle(div).paddingTop, 10) || 0;\n document.body.removeChild(div);\n return safeAreaSize;\n}\nfunction tuiGetScreenWidth(doc) {\n return Math.max(doc.documentElement.clientWidth, doc.defaultView ? doc.defaultView.innerWidth : 0);\n}\n\n/**\n * @description:\n * Cross-browser @media (height)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (height) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientHeight\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (height) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nfunction tuiGetViewportHeight({\n document,\n innerHeight\n}) {\n return Math.max(document.documentElement.clientHeight || 0, innerHeight || 0);\n}\n\n/**\n * @description:\n * Cross-browser @media (width)\n *\n * 1. window.innerWidth\n * 1.1. gets CSS viewport @media (width) which include scrollbars\n * 1.2. initial-scale and zoom variations may cause mobile values to\n * wrongly scale down to what PPK calls the visual\n * viewport and be smaller than the @media values\n * 1.3. zoom may cause values to be 1px off due to native rounding\n *\n * 2. document.documentElement.clientWidth\n * 2.1. equals CSS viewport width minus scrollbar width\n * 2.2. matches @media (width) when there is no scrollbar\n * 2.3. available cross-browser\n * 2.4. inaccurate if doctype is missing\n */\nfunction tuiGetViewportWidth({\n document,\n innerWidth\n}) {\n return Math.max(document.documentElement.clientWidth || 0, innerWidth || 0);\n}\n\n/**\n * Creates a cloned range with its boundaries set at word boundaries\n *\n * @param currentRange a range to clone\n * @return modified range\n */\nfunction tuiGetWordRange(currentRange) {\n const range = currentRange.cloneRange();\n const {\n startContainer,\n startOffset,\n endContainer,\n endOffset\n } = range;\n const {\n ownerDocument\n } = startContainer;\n if (!ownerDocument) {\n return range;\n }\n const treeWalker = ownerDocument.createTreeWalker(ownerDocument.body, NodeFilter.SHOW_TEXT, svgNodeFilter);\n treeWalker.currentNode = startContainer;\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content = container === startContainer ? textContent.slice(0, Math.max(0, startOffset + 1)) : textContent;\n const offset = Math.max(content.lastIndexOf(' '), content.lastIndexOf(CHAR_NO_BREAK_SPACE), content.lastIndexOf(CHAR_ZERO_WIDTH_SPACE)) + 1;\n range.setStart(container, 0);\n if (offset) {\n range.setStart(container, offset);\n break;\n }\n } while (treeWalker.previousNode());\n treeWalker.currentNode = endContainer;\n do {\n const container = treeWalker.currentNode;\n const textContent = container.textContent || '';\n const content = container === endContainer ? textContent.slice(endOffset + 1) : textContent;\n const offset = [content.indexOf(' '), content.indexOf(CHAR_NO_BREAK_SPACE), content.indexOf(CHAR_ZERO_WIDTH_SPACE)].reduce((result, item) => result === -1 || item === -1 ? Math.max(result, item) : Math.min(result, item), -1);\n range.setEnd(container, textContent.length);\n if (offset !== -1) {\n range.setEnd(container, offset + textContent.length - content.length);\n break;\n }\n } while (treeWalker.nextNode());\n return range;\n}\nconst WIDTH_SEARCH = 'width=\"';\nconst HEIGHT_SEARCH = 'height=\"';\nconst START = '')));\n if (!(attributes === null || attributes === void 0 ? void 0 : attributes.includes(WIDTH_SEARCH)) || !attributes.includes(HEIGHT_SEARCH)) {\n return `${src.replace(START, ``;\n }\n const indexOfWidth = attributes.indexOf(WIDTH_SEARCH);\n const indexOfHeight = attributes.indexOf(HEIGHT_SEARCH);\n const widthOffset = indexOfWidth + WIDTH_SEARCH.length;\n const heightOffset = indexOfHeight + HEIGHT_SEARCH.length;\n const widthString = attributes.slice(widthOffset, attributes.indexOf('\"', widthOffset));\n const heightString = attributes.slice(heightOffset, attributes.indexOf('\"', heightOffset));\n if (!heightString || !widthString || widthString.includes('%') || heightString.includes('%') || widthString.includes('em') || heightString.includes('em')) {\n return src.replace(START, `${src}`;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiCheckFixedPosition, tuiGetSafeAreaSize, tuiGetScreenWidth, tuiGetViewportHeight, tuiGetViewportWidth, tuiGetWordRange, tuiProcessIcon };\n","import { TUI_CACHE_BUSTING_PAYLOAD, DEFAULT_ICONS_PATH, tuiEditingKeys } from '@taiga-ui/core/constants';\nimport { tuiGetElementObscures } from '@taiga-ui/cdk';\nconst ITEM_SIZE = 1.5;\nconst CONTENT_SIZE = 2.5;\nfunction tuiGetBorder(hasIcon, hasCleaner = false, hasTooltip = false, hasContent = false, size = 'm') {\n const offset = size === 's' ? 0 : 0.25;\n let border = 0;\n if (hasIcon) {\n border += ITEM_SIZE + offset;\n }\n if (hasCleaner) {\n border += ITEM_SIZE + offset;\n }\n if (hasTooltip) {\n border += ITEM_SIZE + offset;\n }\n if (hasContent) {\n border += CONTENT_SIZE + offset;\n }\n return border;\n}\nfunction tuiIconsPathFactory(staticPath) {\n const base = staticPath.endsWith('/') ? staticPath : `${staticPath}/`;\n return name => {\n if (name.startsWith('tuiIcon')) {\n return `${base}${name}.svg${TUI_CACHE_BUSTING_PAYLOAD}#${name}`;\n }\n return DEFAULT_ICONS_PATH(name);\n };\n}\n\n/**\n * Check if pressed key is interactive in terms of input field\n */\nfunction tuiIsEditingKey(key) {\n return key.length === 1 || tuiEditingKeys.includes(key);\n}\n\n/**\n * @internal\n */\nfunction tuiIsObscured(el, exceptSelector = 'tui-hints-host') {\n var _a;\n return !!((_a = tuiGetElementObscures(el)) === null || _a === void 0 ? void 0 : _a.some(el => !el.closest(exceptSelector)));\n}\nfunction tuiIsPresumedHTMLString(candidate) {\n const trimmed = candidate.trim();\n return trimmed.startsWith('<') && trimmed.endsWith('>');\n}\nfunction tuiOverrideOptions(override, fallback) {\n return (directive, options) => {\n const result = directive || Object.assign({}, options || fallback);\n Object.keys(override).forEach(key => {\n // Update directive props with new defaults before inputs are processed\n result[key] = override[key];\n });\n return result;\n };\n}\nconst SIZES = {\n xxs: 0,\n xs: 1,\n s: 2,\n m: 3,\n l: 4,\n xl: 5,\n xxl: 6\n};\n/**\n * Compares size constants to determine if first size is bigger than the second\n *\n * @param size size that we need to compare\n * @param biggerThanSize size to compare with, 's' by default\n */\nfunction tuiSizeBigger(size, biggerThanSize = 's') {\n return SIZES[size] > SIZES[biggerThanSize];\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiGetBorder, tuiIconsPathFactory, tuiIsEditingKey, tuiIsObscured, tuiIsPresumedHTMLString, tuiOverrideOptions, tuiSizeBigger };\n","import { tuiGetViewportWidth } from '@taiga-ui/core/utils/dom';\nfunction tuiIsMobile(win, {\n mobile\n}) {\n return tuiGetViewportWidth(win) < mobile;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiIsMobile };\n","// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nvar TuiAppearance = /*#__PURE__*/function (TuiAppearance) {\n TuiAppearance[\"Accent\"] = \"accent\";\n TuiAppearance[\"Flat\"] = \"flat\";\n TuiAppearance[\"Icon\"] = \"icon\";\n TuiAppearance[\"Outline\"] = \"outline\";\n TuiAppearance[\"Primary\"] = \"primary\";\n TuiAppearance[\"Secondary\"] = \"secondary\";\n TuiAppearance[\"SecondaryDestructive\"] = \"secondary-destructive\";\n TuiAppearance[\"Table\"] = \"table\";\n TuiAppearance[\"Textfield\"] = \"textfield\";\n TuiAppearance[\"Whiteblock\"] = \"whiteblock\";\n TuiAppearance[\"WhiteblockActive\"] = \"whiteblock-active\";\n return TuiAppearance;\n}(TuiAppearance || {});\n/** @deprecated not used anymore TODO: remove in 4.0 **/\n// eslint-disable-next-line no-restricted-syntax\nvar TuiDropdownAnimation = /*#__PURE__*/function (TuiDropdownAnimation) {\n TuiDropdownAnimation[\"FadeInBottom\"] = \"fadeInBottom\";\n TuiDropdownAnimation[\"FadeInTop\"] = \"fadeInTop\";\n return TuiDropdownAnimation;\n}(TuiDropdownAnimation || {});\n/**\n * @internal used in calendar, year picker and wrapper\n */\n// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nvar TuiInteractiveState = /*#__PURE__*/function (TuiInteractiveState) {\n TuiInteractiveState[\"Active\"] = \"active\";\n TuiInteractiveState[\"Disabled\"] = \"disabled\";\n TuiInteractiveState[\"Hover\"] = \"hover\";\n TuiInteractiveState[\"Readonly\"] = \"readonly\";\n return TuiInteractiveState;\n}(TuiInteractiveState || {});\n/**\n * @deprecated use union type TuiNotificationT instead\n */\n// eslint-disable-next-line no-restricted-syntax\nvar TuiNotification = /*#__PURE__*/function (TuiNotification) {\n TuiNotification[\"Error\"] = \"error\";\n TuiNotification[\"Info\"] = \"info\";\n TuiNotification[\"Success\"] = \"success\";\n TuiNotification[\"Warning\"] = \"warning\";\n return TuiNotification;\n}(TuiNotification || {});\n/**\n * @internal used in calendar and year picker\n */\n// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nvar TuiRangeState = /*#__PURE__*/function (TuiRangeState) {\n TuiRangeState[\"End\"] = \"end\";\n TuiRangeState[\"Single\"] = \"single\";\n TuiRangeState[\"Start\"] = \"start\";\n return TuiRangeState;\n}(TuiRangeState || {});\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiAppearance, TuiDropdownAnimation, TuiInteractiveState, TuiNotification, TuiRangeState };\n","import { inject, isDevMode, InjectionToken, NgZone } from '@angular/core';\nimport { tuiCreateTokenFromFactory, tuiCreateToken, tuiProvideOptions, TuiDayOfWeek, tuiTypedFromEvent, tuiZoneOptimized, TUI_SCROLL_REF as TUI_SCROLL_REF$1, tuiSvgLinearGradientProcessor } from '@taiga-ui/cdk';\nimport { DOCUMENT } from '@angular/common';\nimport { tuiExtractI18n } from '@taiga-ui/i18n';\nimport { tuiIconsPathFactory, tuiIsMobile } from '@taiga-ui/core/utils';\nimport { WINDOW } from '@ng-web-apis/common';\nimport { share, startWith, map, distinctUntilChanged, switchMap, takeUntil } from 'rxjs/operators';\nimport { TUI_DEFAULT_NUMBER_FORMAT } from '@taiga-ui/core/constants';\nimport { of, merge, identity } from 'rxjs';\nimport { TuiAppearance } from '@taiga-ui/core/enums';\nconst TUI_REDUCED_MOTION = tuiCreateTokenFromFactory(() => {\n var _a, _b, _c;\n return (_c = (_b = (_a = inject(DOCUMENT).defaultView) === null || _a === void 0 ? void 0 : _a.matchMedia) === null || _b === void 0 ? void 0 : _b.call(_a, '(prefers-reduced-motion: reduce)').matches) !== null && _c !== void 0 ? _c : false;\n});\nconst TUI_ANIMATIONS_DEFAULT_DURATION = 300;\n/**\n * Duration of all Taiga UI animations in ms\n */\nconst TUI_ANIMATIONS_DURATION = tuiCreateTokenFromFactory(() => inject(TUI_REDUCED_MOTION) ? 0 : TUI_ANIMATIONS_DEFAULT_DURATION);\n\n/**\n * Options for Taiga UI animations\n */\nconst TUI_ANIMATION_OPTIONS = tuiCreateTokenFromFactory(() => ({\n value: '',\n params: {\n duration: inject(TUI_ANIMATIONS_DURATION)\n }\n}));\n\n/**\n * @deprecated:\n * Flag to enable assertions across Taiga UI\n *\n * The current token no longer matters as\n * it will not be provided in production\n */\nconst TUI_ASSERT_ENABLED = tuiCreateTokenFromFactory(() => isDevMode());\nconst COMMON_ICONS = {\n check: 'tuiIconCheck',\n close: 'tuiIconClose',\n error: 'tuiIconAlertCircle',\n more: 'tuiIconChevronRight'\n};\nconst TUI_COMMON_ICONS = tuiCreateToken(COMMON_ICONS);\nfunction tuiCommonIconsProvider(icons) {\n return tuiProvideOptions(TUI_COMMON_ICONS, icons, COMMON_ICONS);\n}\n\n/**\n * Accessor for data-list options\n */\nconst TUI_DATA_LIST_ACCESSOR = new InjectionToken('[TUI_DATA_LIST_ACCESSOR]');\nfunction tuiAsDataListAccessor(useExisting) {\n return {\n provide: TUI_DATA_LIST_ACCESSOR,\n useExisting\n };\n}\n\n/**\n * DataList controller\n */\nconst TUI_DATA_LIST_HOST = new InjectionToken('[TUI_DATA_LIST_HOST]');\nfunction tuiAsDataListHost(useExisting) {\n return {\n provide: TUI_DATA_LIST_HOST,\n useExisting\n };\n}\n\n/**\n * Token for adding data-type attribute to calendar cell\n */\nconst TUI_DAY_TYPE_HANDLER = tuiCreateToken(day => day.isWeekend ? 'weekend' : 'weekday');\nconst TUI_DOCUMENT_OR_SHADOW_ROOT = new InjectionToken('[TUI_DOCUMENT_OR_SHADOW_ROOT]');\n\n/**\n * ElementRef when you cannot use @Input for single time injection\n */\nconst TUI_ELEMENT_REF = new InjectionToken('[TUI_ELEMENT_REF]');\n\n/**\n * The first day of the week index\n */\nconst TUI_FIRST_DAY_OF_WEEK = tuiCreateToken(TuiDayOfWeek.Monday);\n\n/**\n * Localized months names\n */\nconst TUI_MONTHS = tuiCreateTokenFromFactory(tuiExtractI18n('months'));\n/**\n * i18n 'close' word\n */\nconst TUI_CLOSE_WORD = tuiCreateTokenFromFactory(tuiExtractI18n('close'));\n/**\n * i18n 'Nothing found' message\n */\nconst TUI_NOTHING_FOUND_MESSAGE = tuiCreateTokenFromFactory(tuiExtractI18n('nothingFoundMessage'));\n/**\n * i18n of error message\n */\nconst TUI_DEFAULT_ERROR_MESSAGE = tuiCreateTokenFromFactory(tuiExtractI18n('defaultErrorMessage'));\n/**\n * spin i18n texts\n */\nconst TUI_SPIN_TEXTS = tuiCreateTokenFromFactory(tuiExtractI18n('spinTexts'));\n/**\n * calendars i18n texts\n */\nconst TUI_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(tuiExtractI18n('shortWeekDays'));\nconst TUI_DEFAULT_ICONS_PLACE = 'assets/taiga-ui/icons';\n/**\n * Path to icons\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nconst TUI_ICONS_PLACE = tuiCreateToken(TUI_DEFAULT_ICONS_PLACE);\n\n/**\n * A key/value dictionary of icon names and src to be defined with TuiSvgService\n */\nconst TUI_ICONS = tuiCreateToken({});\n\n/**\n * A handler to retrieve USE id for icon by name\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nconst TUI_ICONS_PATH = tuiCreateTokenFromFactory(() => tuiIconsPathFactory(inject(TUI_ICONS_PLACE)));\n\n/**\n * Token for media constant\n */\nconst TUI_MEDIA = tuiCreateToken({\n mobile: 768,\n desktopSmall: 1024,\n desktopLarge: 1280\n});\n\n/**\n * @deprecated use {@link https://taiga-ui.dev/services/breakpoint-service TuiBreakpointService}\n * TODO: drop in v4.0\n * Mobile resolution stream for private providers\n */\nconst TUI_IS_MOBILE_RES = tuiCreateTokenFromFactory(() => {\n const win = inject(WINDOW);\n const media = inject(TUI_MEDIA);\n return tuiTypedFromEvent(win, 'resize').pipe(share(), startWith(null), map(() => tuiIsMobile(win, media)), distinctUntilChanged(), tuiZoneOptimized(inject(NgZone)));\n});\n\n/**\n * @internal\n * @deprecated\n * Don't use it! Will be removed after changing the mask.\n */\nconst TUI_LEGACY_MASK = new InjectionToken('[TUI_LEGACY_MASK]');\n\n/**\n * Mode stream for private providers\n */\nconst TUI_MODE = new InjectionToken('[TUI_MODE]');\n\n/** @deprecated remove export */\nconst STATUS_ICON = {\n info: 'tuiIconInfo',\n success: 'tuiIconCheckCircle',\n error: 'tuiIconXCircle',\n warning: 'tuiIconAlertCircle',\n neutral: 'tuiIconInfo'\n};\n/** Default values for the notification options. */\nconst TUI_NOTIFICATION_DEFAULT_OPTIONS = {\n autoClose: 3000,\n label: '',\n status: 'info',\n hasCloseButton: true,\n icon: ({\n $implicit\n }) => STATUS_ICON[$implicit],\n size: 'm',\n hasIcon: true,\n defaultAutoCloseTime: 3000\n};\n/**\n * Default parameters for notification alert component\n */\nconst TUI_NOTIFICATION_OPTIONS = tuiCreateToken(TUI_NOTIFICATION_DEFAULT_OPTIONS);\nfunction tuiNotificationOptionsProvider(options) {\n return tuiProvideOptions(TUI_NOTIFICATION_OPTIONS, options, TUI_NOTIFICATION_DEFAULT_OPTIONS);\n}\n\n/**\n * Formatting configuration for displayed numbers\n */\nconst TUI_NUMBER_FORMAT = tuiCreateToken(TUI_DEFAULT_NUMBER_FORMAT);\nfunction tuiNumberFormatProvider(options) {\n return tuiProvideOptions(TUI_NUMBER_FORMAT, options, TUI_DEFAULT_NUMBER_FORMAT);\n}\n\n/**\n * Formatting configuration for displayed numbers\n */\nconst TUI_NUMBER_FORMAT_OBSERVABLE = tuiCreateToken(of(Object.assign(Object.assign({}, TUI_DEFAULT_NUMBER_FORMAT), {\n decimalLimit: NaN\n})));\n\n/**\n * Content for tuiOption component\n */\nconst TUI_OPTION_CONTENT = new InjectionToken('[TUI_OPTION_CONTENT]');\nfunction tuiAsOptionContent(useValue) {\n return {\n provide: TUI_OPTION_CONTENT,\n useValue\n };\n}\n\n/**\n * TODO: v4.0 delete the whole file\n */\nconst convertToSundayFirstWeekFormat = weekDaysNames => {\n const sundayIndex = weekDaysNames.length - 1;\n return [weekDaysNames[sundayIndex], ...weekDaysNames.slice(0, sundayIndex)];\n};\n/**\n * Ordered calendars i18n texts\n * @deprecated\n */\nconst TUI_ORDERED_SHORT_WEEK_DAYS = tuiCreateTokenFromFactory(() => {\n const firstDayOfWeekIndex = inject(TUI_FIRST_DAY_OF_WEEK);\n return inject(TUI_SHORT_WEEK_DAYS).pipe(map(convertToSundayFirstWeekFormat), map(weekDays => [...weekDays.slice(firstDayOfWeekIndex), ...weekDays.slice(0, firstDayOfWeekIndex)]));\n});\n\n/**\n * A custom Sanitizer to sanitize source before inlining\n */\nconst TUI_SANITIZER = new InjectionToken('[TUI_SANITIZER]');\n\n/**\n * @deprecated import from `@taiga-ui/cdk` instead\n */\nconst TUI_SCROLL_REF = TUI_SCROLL_REF$1;\n\n/**\n * A stream of possible selection changes\n */\nconst TUI_SELECTION_STREAM = tuiCreateTokenFromFactory(() => {\n const doc = inject(DOCUMENT);\n return merge(tuiTypedFromEvent(doc, 'selectionchange'), tuiTypedFromEvent(doc, 'mouseup'), tuiTypedFromEvent(doc, 'mousedown').pipe(switchMap(() => tuiTypedFromEvent(doc, 'mousemove').pipe(takeUntil(tuiTypedFromEvent(doc, 'mouseup'))))), tuiTypedFromEvent(doc, 'keydown'), tuiTypedFromEvent(doc, 'keyup')).pipe(share());\n});\nconst TUI_SPIN_ICONS = tuiCreateToken({\n decrement: 'tuiIconChevronLeft',\n increment: 'tuiIconChevronRight'\n});\n\n/**\n * Transform function the contents of the loaded svg file\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nconst TUI_SVG_CONTENT_PROCESSOR = tuiCreateToken(tuiSvgLinearGradientProcessor);\n\n/**\n * Source path processor for svg\n * @deprecated Use {@link TUI_SVG_OPTIONS} instead\n */\nconst TUI_SVG_SRC_PROCESSOR = tuiCreateToken(identity);\n\n/**\n * Appearance for inputs\n * @deprecated use {@link TUI_TEXTFIELD_APPEARANCE_DIRECTIVE} instead\n * TODO: Remove in 4.0\n */\nconst TUI_TEXTFIELD_APPEARANCE = tuiCreateToken(TuiAppearance.Textfield);\n\n/**\n * An interface to communicate with textfield based controls\n */\nconst TUI_TEXTFIELD_HOST = new InjectionToken('[TUI_TEXTFIELD_HOST]');\nfunction tuiAsTextfieldHost(useExisting) {\n return {\n provide: TUI_TEXTFIELD_HOST,\n useExisting\n };\n}\nconst TUI_THEME = tuiCreateToken('Taiga');\n\n/**\n * Buffer token to pass NG_VALUE_ACCESSOR to a different Injector\n */\nconst TUI_VALUE_ACCESSOR = new InjectionToken('[TUI_VALUE_ACCESSOR]');\n\n/**\n * Viewport accessor\n */\nconst TUI_VIEWPORT = tuiCreateTokenFromFactory(() => {\n const win = inject(WINDOW);\n return {\n type: 'viewport',\n getClientRect() {\n return {\n top: 0,\n left: 0,\n right: win.innerWidth,\n bottom: win.innerHeight,\n width: win.innerWidth,\n height: win.innerHeight\n };\n }\n };\n});\nfunction tuiAsViewport(useExisting) {\n return {\n provide: TUI_VIEWPORT,\n useExisting\n };\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { STATUS_ICON, TUI_ANIMATIONS_DEFAULT_DURATION, TUI_ANIMATIONS_DURATION, TUI_ANIMATION_OPTIONS, TUI_ASSERT_ENABLED, TUI_CLOSE_WORD, TUI_COMMON_ICONS, TUI_DATA_LIST_ACCESSOR, TUI_DATA_LIST_HOST, TUI_DAY_TYPE_HANDLER, TUI_DEFAULT_ERROR_MESSAGE, TUI_DEFAULT_ICONS_PLACE, TUI_DOCUMENT_OR_SHADOW_ROOT, TUI_ELEMENT_REF, TUI_FIRST_DAY_OF_WEEK, TUI_ICONS, TUI_ICONS_PATH, TUI_ICONS_PLACE, TUI_IS_MOBILE_RES, TUI_LEGACY_MASK, TUI_MEDIA, TUI_MODE, TUI_MONTHS, TUI_NOTHING_FOUND_MESSAGE, TUI_NOTIFICATION_DEFAULT_OPTIONS, TUI_NOTIFICATION_OPTIONS, TUI_NUMBER_FORMAT, TUI_NUMBER_FORMAT_OBSERVABLE, TUI_OPTION_CONTENT, TUI_ORDERED_SHORT_WEEK_DAYS, TUI_REDUCED_MOTION, TUI_SANITIZER, TUI_SCROLL_REF, TUI_SELECTION_STREAM, TUI_SHORT_WEEK_DAYS, TUI_SPIN_ICONS, TUI_SPIN_TEXTS, TUI_SVG_CONTENT_PROCESSOR, TUI_SVG_SRC_PROCESSOR, TUI_TEXTFIELD_APPEARANCE, TUI_TEXTFIELD_HOST, TUI_THEME, TUI_VALUE_ACCESSOR, TUI_VIEWPORT, tuiAsDataListAccessor, tuiAsDataListHost, tuiAsOptionContent, tuiAsTextfieldHost, tuiAsViewport, tuiCommonIconsProvider, tuiNotificationOptionsProvider, tuiNumberFormatProvider };\n","import * as i0 from '@angular/core';\nimport { Directive, Self, Inject, SkipSelf, Optional } from '@angular/core';\nimport { TuiDestroyService, AbstractTuiControl } from '@taiga-ui/cdk';\nimport * as i1 from 'rxjs';\nimport { Observable, merge } from 'rxjs';\nimport { distinctUntilChanged, takeUntil } from 'rxjs/operators';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass TuiDriver extends Observable {}\nfunction tuiAsDriver(useExisting) {\n return {\n provide: TuiDriver,\n multi: true,\n useExisting\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass TuiVehicle {}\nfunction tuiAsVehicle(useExisting) {\n return {\n provide: TuiVehicle,\n multi: true,\n useExisting\n };\n}\nlet AbstractTuiDriverDirective = /*#__PURE__*/(() => {\n class AbstractTuiDriverDirective {\n constructor(destroy$, drivers, vehicles) {\n this.destroy$ = destroy$;\n this.drivers = drivers;\n this.vehicles = vehicles;\n }\n ngOnInit() {\n const vehicle = this.vehicles.find(({\n type\n }) => type === this.type);\n merge(...this.drivers.filter(({\n type\n }) => type === this.type)).pipe(distinctUntilChanged(), takeUntil(this.destroy$)).subscribe(value => {\n vehicle === null || vehicle === void 0 ? void 0 : vehicle.toggle(value);\n });\n }\n }\n AbstractTuiDriverDirective.ɵfac = function AbstractTuiDriverDirective_Factory(t) {\n return new (t || AbstractTuiDriverDirective)(i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(TuiDriver), i0.ɵɵdirectiveInject(TuiVehicle));\n };\n AbstractTuiDriverDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiDriverDirective\n });\n return AbstractTuiDriverDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AbstractTuiTextfieldHost = /*#__PURE__*/(() => {\n class AbstractTuiTextfieldHost {\n constructor(host) {\n this.host = host;\n }\n get readOnly() {\n return this.host.readOnly;\n }\n get disabled() {\n return this.host.computedDisabled;\n }\n get invalid() {\n return this.host.computedInvalid;\n }\n get focusable() {\n return this.host.computedFocusable;\n }\n get inputMode() {\n return 'text';\n }\n get value() {\n var _a;\n return ((_a = this.host.value) === null || _a === void 0 ? void 0 : _a.toString()) || '';\n }\n process(_input) {}\n }\n AbstractTuiTextfieldHost.ɵfac = function AbstractTuiTextfieldHost_Factory(t) {\n return new (t || AbstractTuiTextfieldHost)(i0.ɵɵdirectiveInject(AbstractTuiControl));\n };\n AbstractTuiTextfieldHost.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiTextfieldHost\n });\n return AbstractTuiTextfieldHost;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// TODO: Drop any\nfunction tuiFallbackAccessor(type) {\n return (accessors, fallback) => (accessors === null || accessors === void 0 ? void 0 : accessors.find(accessor => accessor !== fallback && accessor.type === type)) || fallback;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass TuiPositionAccessor {}\n// TODO: Make fallback required\nfunction tuiPositionAccessorFor(type, fallback) {\n return {\n provide: TuiPositionAccessor,\n deps: fallback ? [[new SkipSelf(), new Optional(), TuiPositionAccessor], fallback] : [[new SkipSelf(), new Optional(), TuiPositionAccessor]],\n useFactory: tuiFallbackAccessor(type)\n };\n}\nfunction tuiAsPositionAccessor(useExisting) {\n return {\n provide: TuiPositionAccessor,\n multi: true,\n useExisting\n };\n}\n\n// TODO: Rename to getBoundingClientRect to match the DOM API\n// eslint-disable-next-line @typescript-eslint/naming-convention\nclass TuiRectAccessor {}\nfunction tuiRectAccessorFor(type, fallback) {\n return {\n provide: TuiRectAccessor,\n deps: [[new SkipSelf(), new Optional(), TuiRectAccessor], fallback],\n useFactory: tuiFallbackAccessor(type)\n };\n}\nconst tuiFallbackRectAccessor = tuiFallbackAccessor;\nfunction tuiAsRectAccessor(useExisting) {\n return {\n provide: TuiRectAccessor,\n multi: true,\n useExisting\n };\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractTuiDriverDirective, AbstractTuiTextfieldHost, TuiDriver, TuiPositionAccessor, TuiRectAccessor, TuiVehicle, tuiAsDriver, tuiAsPositionAccessor, tuiAsRectAccessor, tuiAsVehicle, tuiFallbackAccessor, tuiFallbackRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor };\n","/**\n * @license Angular v18.0.4\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport * as i0 from '@angular/core';\nimport { ɵisPromise, ɵRuntimeError, Injectable, EventEmitter, inject, ViewContainerRef, ChangeDetectorRef, Directive, Input, Output, InjectionToken, reflectComponentType, Component, createEnvironmentInjector, ɵisNgModule, isStandalone, ɵisInjectable, runInInjectionContext, Compiler, NgModuleFactory, NgZone, afterNextRender, AfterRenderPhase, EnvironmentInjector, ɵConsole, ɵPendingTasks, ɵɵsanitizeUrlOrResourceUrl, booleanAttribute, Attribute, HostBinding, HostListener, Optional, ContentChildren, makeEnvironmentProviders, APP_BOOTSTRAP_LISTENER, ENVIRONMENT_INITIALIZER, Injector, ApplicationRef, InjectFlags, APP_INITIALIZER, SkipSelf, NgModule, Inject, Version } from '@angular/core';\nimport { isObservable, from, of, BehaviorSubject, combineLatest, EmptyError, concat, defer, pipe, throwError, EMPTY, ConnectableObservable, Subject, Subscription } from 'rxjs';\nimport * as i3 from '@angular/common';\nimport { DOCUMENT, Location, ViewportScroller, LOCATION_INITIALIZED, LocationStrategy, HashLocationStrategy, PathLocationStrategy } from '@angular/common';\nimport { map, switchMap, take, startWith, filter, mergeMap, first, concatMap, tap, catchError, scan, defaultIfEmpty, last as last$1, takeLast, mapTo, finalize, refCount, takeUntil, mergeAll } from 'rxjs/operators';\nimport * as i1 from '@angular/platform-browser';\n\n/**\n * The primary routing outlet.\n *\n * @publicApi\n */\nconst PRIMARY_OUTLET = 'primary';\n/**\n * A private symbol used to store the value of `Route.title` inside the `Route.data` if it is a\n * static string or `Route.resolve` if anything else. This allows us to reuse the existing route\n * data/resolvers to support the title feature without new instrumentation in the `Router` pipeline.\n */\nconst RouteTitleKey = /* @__PURE__ */Symbol('RouteTitle');\nclass ParamsAsMap {\n constructor(params) {\n this.params = params || {};\n }\n has(name) {\n return Object.prototype.hasOwnProperty.call(this.params, name);\n }\n get(name) {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v[0] : v;\n }\n return null;\n }\n getAll(name) {\n if (this.has(name)) {\n const v = this.params[name];\n return Array.isArray(v) ? v : [v];\n }\n return [];\n }\n get keys() {\n return Object.keys(this.params);\n }\n}\n/**\n * Converts a `Params` instance to a `ParamMap`.\n * @param params The instance to convert.\n * @returns The new map instance.\n *\n * @publicApi\n */\nfunction convertToParamMap(params) {\n return new ParamsAsMap(params);\n}\n/**\n * Matches the route configuration (`route`) against the actual URL (`segments`).\n *\n * When no matcher is defined on a `Route`, this is the matcher used by the Router by default.\n *\n * @param segments The remaining unmatched segments in the current navigation\n * @param segmentGroup The current segment group being matched\n * @param route The `Route` to match against.\n *\n * @see {@link UrlMatchResult}\n * @see {@link Route}\n *\n * @returns The resulting match information or `null` if the `route` should not match.\n * @publicApi\n */\nfunction defaultUrlMatcher(segments, segmentGroup, route) {\n const parts = route.path.split('/');\n if (parts.length > segments.length) {\n // The actual URL is shorter than the config, no match\n return null;\n }\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || parts.length < segments.length)) {\n // The config is longer than the actual URL but we are looking for a full match, return null\n return null;\n }\n const posParams = {};\n // Check each config part against the actual URL\n for (let index = 0; index < parts.length; index++) {\n const part = parts[index];\n const segment = segments[index];\n const isParameter = part[0] === ':';\n if (isParameter) {\n posParams[part.substring(1)] = segment;\n } else if (part !== segment.path) {\n // The actual URL part does not match the config, no match\n return null;\n }\n }\n return {\n consumed: segments.slice(0, parts.length),\n posParams\n };\n}\nfunction shallowEqualArrays(a, b) {\n if (a.length !== b.length) return false;\n for (let i = 0; i < a.length; ++i) {\n if (!shallowEqual(a[i], b[i])) return false;\n }\n return true;\n}\nfunction shallowEqual(a, b) {\n // While `undefined` should never be possible, it would sometimes be the case in IE 11\n // and pre-chromium Edge. The check below accounts for this edge case.\n const k1 = a ? getDataKeys(a) : undefined;\n const k2 = b ? getDataKeys(b) : undefined;\n if (!k1 || !k2 || k1.length != k2.length) {\n return false;\n }\n let key;\n for (let i = 0; i < k1.length; i++) {\n key = k1[i];\n if (!equalArraysOrString(a[key], b[key])) {\n return false;\n }\n }\n return true;\n}\n/**\n * Gets the keys of an object, including `symbol` keys.\n */\nfunction getDataKeys(obj) {\n return [...Object.keys(obj), ...Object.getOwnPropertySymbols(obj)];\n}\n/**\n * Test equality for arrays of strings or a string.\n */\nfunction equalArraysOrString(a, b) {\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) return false;\n const aSorted = [...a].sort();\n const bSorted = [...b].sort();\n return aSorted.every((val, index) => bSorted[index] === val);\n } else {\n return a === b;\n }\n}\n/**\n * Return the last element of an array.\n */\nfunction last(a) {\n return a.length > 0 ? a[a.length - 1] : null;\n}\nfunction wrapIntoObservable(value) {\n if (isObservable(value)) {\n return value;\n }\n if (ɵisPromise(value)) {\n // Use `Promise.resolve()` to wrap promise-like instances.\n // Required ie when a Resolver returns a AngularJS `$q` promise to correctly trigger the\n // change detection.\n return from(Promise.resolve(value));\n }\n return of(value);\n}\nconst pathCompareMap = {\n 'exact': equalSegmentGroups,\n 'subset': containsSegmentGroup\n};\nconst paramCompareMap = {\n 'exact': equalParams,\n 'subset': containsParams,\n 'ignored': () => true\n};\nfunction containsTree(container, containee, options) {\n return pathCompareMap[options.paths](container.root, containee.root, options.matrixParams) && paramCompareMap[options.queryParams](container.queryParams, containee.queryParams) && !(options.fragment === 'exact' && container.fragment !== containee.fragment);\n}\nfunction equalParams(container, containee) {\n // TODO: This does not handle array params correctly.\n return shallowEqual(container, containee);\n}\nfunction equalSegmentGroups(container, containee, matrixParams) {\n if (!equalPath(container.segments, containee.segments)) return false;\n if (!matrixParamsMatch(container.segments, containee.segments, matrixParams)) {\n return false;\n }\n if (container.numberOfChildren !== containee.numberOfChildren) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!equalSegmentGroups(container.children[c], containee.children[c], matrixParams)) return false;\n }\n return true;\n}\nfunction containsParams(container, containee) {\n return Object.keys(containee).length <= Object.keys(container).length && Object.keys(containee).every(key => equalArraysOrString(container[key], containee[key]));\n}\nfunction containsSegmentGroup(container, containee, matrixParams) {\n return containsSegmentGroupHelper(container, containee, containee.segments, matrixParams);\n}\nfunction containsSegmentGroupHelper(container, containee, containeePaths, matrixParams) {\n if (container.segments.length > containeePaths.length) {\n const current = container.segments.slice(0, containeePaths.length);\n if (!equalPath(current, containeePaths)) return false;\n if (containee.hasChildren()) return false;\n if (!matrixParamsMatch(current, containeePaths, matrixParams)) return false;\n return true;\n } else if (container.segments.length === containeePaths.length) {\n if (!equalPath(container.segments, containeePaths)) return false;\n if (!matrixParamsMatch(container.segments, containeePaths, matrixParams)) return false;\n for (const c in containee.children) {\n if (!container.children[c]) return false;\n if (!containsSegmentGroup(container.children[c], containee.children[c], matrixParams)) {\n return false;\n }\n }\n return true;\n } else {\n const current = containeePaths.slice(0, container.segments.length);\n const next = containeePaths.slice(container.segments.length);\n if (!equalPath(container.segments, current)) return false;\n if (!matrixParamsMatch(container.segments, current, matrixParams)) return false;\n if (!container.children[PRIMARY_OUTLET]) return false;\n return containsSegmentGroupHelper(container.children[PRIMARY_OUTLET], containee, next, matrixParams);\n }\n}\nfunction matrixParamsMatch(containerPaths, containeePaths, options) {\n return containeePaths.every((containeeSegment, i) => {\n return paramCompareMap[options](containerPaths[i].parameters, containeeSegment.parameters);\n });\n}\n/**\n * @description\n *\n * Represents the parsed URL.\n *\n * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a\n * serialized tree.\n * UrlTree is a data structure that provides a lot of affordances in dealing with URLs\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree =\n * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment');\n * const f = tree.fragment; // return 'fragment'\n * const q = tree.queryParams; // returns {debug: 'true'}\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33'\n * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor'\n * g.children['support'].segments; // return 1 segment 'help'\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlTree {\n constructor( /** The root segment group of the URL tree */\n root = new UrlSegmentGroup([], {}), /** The query params of the URL */\n queryParams = {}, /** The fragment of the URL */\n fragment = null) {\n this.root = root;\n this.queryParams = queryParams;\n this.fragment = fragment;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (root.segments.length > 0) {\n throw new ɵRuntimeError(4015 /* RuntimeErrorCode.INVALID_ROOT_URL_SEGMENT */, 'The root `UrlSegmentGroup` should not contain `segments`. ' + 'Instead, these segments belong in the `children` so they can be associated with a named outlet.');\n }\n }\n }\n get queryParamMap() {\n this._queryParamMap ??= convertToParamMap(this.queryParams);\n return this._queryParamMap;\n }\n /** @docsNotRequired */\n toString() {\n return DEFAULT_SERIALIZER.serialize(this);\n }\n}\n/**\n * @description\n *\n * Represents the parsed URL segment group.\n *\n * See `UrlTree` for more information.\n *\n * @publicApi\n */\nclass UrlSegmentGroup {\n constructor( /** The URL segments of this group. See `UrlSegment` for more information */\n segments, /** The list of children of this group */\n children) {\n this.segments = segments;\n this.children = children;\n /** The parent node in the url tree */\n this.parent = null;\n Object.values(children).forEach(v => v.parent = this);\n }\n /** Whether the segment has child segments */\n hasChildren() {\n return this.numberOfChildren > 0;\n }\n /** Number of child segments */\n get numberOfChildren() {\n return Object.keys(this.children).length;\n }\n /** @docsNotRequired */\n toString() {\n return serializePaths(this);\n }\n}\n/**\n * @description\n *\n * Represents a single URL segment.\n *\n * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix\n * parameters associated with the segment.\n *\n * @usageNotes\n * ### Example\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const tree: UrlTree = router.parseUrl('/team;id=33');\n * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET];\n * const s: UrlSegment[] = g.segments;\n * s[0].path; // returns 'team'\n * s[0].parameters; // returns {id: 33}\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass UrlSegment {\n constructor( /** The path part of a URL segment */\n path, /** The matrix parameters associated with a segment */\n parameters) {\n this.path = path;\n this.parameters = parameters;\n }\n get parameterMap() {\n this._parameterMap ??= convertToParamMap(this.parameters);\n return this._parameterMap;\n }\n /** @docsNotRequired */\n toString() {\n return serializePath(this);\n }\n}\nfunction equalSegments(as, bs) {\n return equalPath(as, bs) && as.every((a, i) => shallowEqual(a.parameters, bs[i].parameters));\n}\nfunction equalPath(as, bs) {\n if (as.length !== bs.length) return false;\n return as.every((a, i) => a.path === bs[i].path);\n}\nfunction mapChildrenIntoArray(segment, fn) {\n let res = [];\n Object.entries(segment.children).forEach(([childOutlet, child]) => {\n if (childOutlet === PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n Object.entries(segment.children).forEach(([childOutlet, child]) => {\n if (childOutlet !== PRIMARY_OUTLET) {\n res = res.concat(fn(child, childOutlet));\n }\n });\n return res;\n}\n/**\n * @description\n *\n * Serializes and deserializes a URL string into a URL tree.\n *\n * The url serialization strategy is customizable. You can\n * make all URLs case insensitive by providing a custom UrlSerializer.\n *\n * See `DefaultUrlSerializer` for an example of a URL serializer.\n *\n * @publicApi\n */\nlet UrlSerializer = /*#__PURE__*/(() => {\n class UrlSerializer {\n static {\n this.ɵfac = function UrlSerializer_Factory(t) {\n return new (t || UrlSerializer)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: UrlSerializer,\n factory: () => (() => new DefaultUrlSerializer())(),\n providedIn: 'root'\n });\n }\n }\n return UrlSerializer;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @description\n *\n * A default implementation of the `UrlSerializer`.\n *\n * Example URLs:\n *\n * ```\n * /inbox/33(popup:compose)\n * /inbox/33;open=true/messages/44\n * ```\n *\n * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the\n * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to\n * specify route specific parameters.\n *\n * @publicApi\n */\nclass DefaultUrlSerializer {\n /** Parses a url into a `UrlTree` */\n parse(url) {\n const p = new UrlParser(url);\n return new UrlTree(p.parseRootSegment(), p.parseQueryParams(), p.parseFragment());\n }\n /** Converts a `UrlTree` into a url */\n serialize(tree) {\n const segment = `/${serializeSegment(tree.root, true)}`;\n const query = serializeQueryParams(tree.queryParams);\n const fragment = typeof tree.fragment === `string` ? `#${encodeUriFragment(tree.fragment)}` : '';\n return `${segment}${query}${fragment}`;\n }\n}\nconst DEFAULT_SERIALIZER = /*#__PURE__*/new DefaultUrlSerializer();\nfunction serializePaths(segment) {\n return segment.segments.map(p => serializePath(p)).join('/');\n}\nfunction serializeSegment(segment, root) {\n if (!segment.hasChildren()) {\n return serializePaths(segment);\n }\n if (root) {\n const primary = segment.children[PRIMARY_OUTLET] ? serializeSegment(segment.children[PRIMARY_OUTLET], false) : '';\n const children = [];\n Object.entries(segment.children).forEach(([k, v]) => {\n if (k !== PRIMARY_OUTLET) {\n children.push(`${k}:${serializeSegment(v, false)}`);\n }\n });\n return children.length > 0 ? `${primary}(${children.join('//')})` : primary;\n } else {\n const children = mapChildrenIntoArray(segment, (v, k) => {\n if (k === PRIMARY_OUTLET) {\n return [serializeSegment(segment.children[PRIMARY_OUTLET], false)];\n }\n return [`${k}:${serializeSegment(v, false)}`];\n });\n // use no parenthesis if the only child is a primary outlet route\n if (Object.keys(segment.children).length === 1 && segment.children[PRIMARY_OUTLET] != null) {\n return `${serializePaths(segment)}/${children[0]}`;\n }\n return `${serializePaths(segment)}/(${children.join('//')})`;\n }\n}\n/**\n * Encodes a URI string with the default encoding. This function will only ever be called from\n * `encodeUriQuery` or `encodeUriSegment` as it's the base set of encodings to be used. We need\n * a custom encoding because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per https://url.spec.whatwg.org.\n */\nfunction encodeUriString(s) {\n return encodeURIComponent(s).replace(/%40/g, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',');\n}\n/**\n * This function should be used to encode both keys and values in a query string key/value. In\n * the following URL, you need to call encodeUriQuery on \"k\" and \"v\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriQuery(s) {\n return encodeUriString(s).replace(/%3B/gi, ';');\n}\n/**\n * This function should be used to encode a URL fragment. In the following URL, you need to call\n * encodeUriFragment on \"f\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriFragment(s) {\n return encodeURI(s);\n}\n/**\n * This function should be run on any URI segment as well as the key and value in a key/value\n * pair for matrix params. In the following URL, you need to call encodeUriSegment on \"html\",\n * \"mk\", and \"mv\":\n *\n * http://www.site.org/html;mk=mv?k=v#f\n */\nfunction encodeUriSegment(s) {\n return encodeUriString(s).replace(/\\(/g, '%28').replace(/\\)/g, '%29').replace(/%26/gi, '&');\n}\nfunction decode(s) {\n return decodeURIComponent(s);\n}\n// Query keys/values should have the \"+\" replaced first, as \"+\" in a query string is \" \".\n// decodeURIComponent function will not decode \"+\" as a space.\nfunction decodeQuery(s) {\n return decode(s.replace(/\\+/g, '%20'));\n}\nfunction serializePath(path) {\n return `${encodeUriSegment(path.path)}${serializeMatrixParams(path.parameters)}`;\n}\nfunction serializeMatrixParams(params) {\n return Object.entries(params).map(([key, value]) => `;${encodeUriSegment(key)}=${encodeUriSegment(value)}`).join('');\n}\nfunction serializeQueryParams(params) {\n const strParams = Object.entries(params).map(([name, value]) => {\n return Array.isArray(value) ? value.map(v => `${encodeUriQuery(name)}=${encodeUriQuery(v)}`).join('&') : `${encodeUriQuery(name)}=${encodeUriQuery(value)}`;\n }).filter(s => s);\n return strParams.length ? `?${strParams.join('&')}` : '';\n}\nconst SEGMENT_RE = /^[^\\/()?;#]+/;\nfunction matchSegments(str) {\n const match = str.match(SEGMENT_RE);\n return match ? match[0] : '';\n}\nconst MATRIX_PARAM_SEGMENT_RE = /^[^\\/()?;=#]+/;\nfunction matchMatrixKeySegments(str) {\n const match = str.match(MATRIX_PARAM_SEGMENT_RE);\n return match ? match[0] : '';\n}\nconst QUERY_PARAM_RE = /^[^=?&#]+/;\n// Return the name of the query param at the start of the string or an empty string\nfunction matchQueryParams(str) {\n const match = str.match(QUERY_PARAM_RE);\n return match ? match[0] : '';\n}\nconst QUERY_PARAM_VALUE_RE = /^[^&#]+/;\n// Return the value of the query param at the start of the string or an empty string\nfunction matchUrlQueryParamValue(str) {\n const match = str.match(QUERY_PARAM_VALUE_RE);\n return match ? match[0] : '';\n}\nclass UrlParser {\n constructor(url) {\n this.url = url;\n this.remaining = url;\n }\n parseRootSegment() {\n this.consumeOptional('/');\n if (this.remaining === '' || this.peekStartsWith('?') || this.peekStartsWith('#')) {\n return new UrlSegmentGroup([], {});\n }\n // The root segment group never has segments\n return new UrlSegmentGroup([], this.parseChildren());\n }\n parseQueryParams() {\n const params = {};\n if (this.consumeOptional('?')) {\n do {\n this.parseQueryParam(params);\n } while (this.consumeOptional('&'));\n }\n return params;\n }\n parseFragment() {\n return this.consumeOptional('#') ? decodeURIComponent(this.remaining) : null;\n }\n parseChildren() {\n if (this.remaining === '') {\n return {};\n }\n this.consumeOptional('/');\n const segments = [];\n if (!this.peekStartsWith('(')) {\n segments.push(this.parseSegment());\n }\n while (this.peekStartsWith('/') && !this.peekStartsWith('//') && !this.peekStartsWith('/(')) {\n this.capture('/');\n segments.push(this.parseSegment());\n }\n let children = {};\n if (this.peekStartsWith('/(')) {\n this.capture('/');\n children = this.parseParens(true);\n }\n let res = {};\n if (this.peekStartsWith('(')) {\n res = this.parseParens(false);\n }\n if (segments.length > 0 || Object.keys(children).length > 0) {\n res[PRIMARY_OUTLET] = new UrlSegmentGroup(segments, children);\n }\n return res;\n }\n // parse a segment with its matrix parameters\n // ie `name;k1=v1;k2`\n parseSegment() {\n const path = matchSegments(this.remaining);\n if (path === '' && this.peekStartsWith(';')) {\n throw new ɵRuntimeError(4009 /* RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Empty path url segment cannot have parameters: '${this.remaining}'.`);\n }\n this.capture(path);\n return new UrlSegment(decode(path), this.parseMatrixParams());\n }\n parseMatrixParams() {\n const params = {};\n while (this.consumeOptional(';')) {\n this.parseParam(params);\n }\n return params;\n }\n parseParam(params) {\n const key = matchMatrixKeySegments(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchSegments(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n params[decode(key)] = decode(value);\n }\n // Parse a single query parameter `name[=value]`\n parseQueryParam(params) {\n const key = matchQueryParams(this.remaining);\n if (!key) {\n return;\n }\n this.capture(key);\n let value = '';\n if (this.consumeOptional('=')) {\n const valueMatch = matchUrlQueryParamValue(this.remaining);\n if (valueMatch) {\n value = valueMatch;\n this.capture(value);\n }\n }\n const decodedKey = decodeQuery(key);\n const decodedVal = decodeQuery(value);\n if (params.hasOwnProperty(decodedKey)) {\n // Append to existing values\n let currentVal = params[decodedKey];\n if (!Array.isArray(currentVal)) {\n currentVal = [currentVal];\n params[decodedKey] = currentVal;\n }\n currentVal.push(decodedVal);\n } else {\n // Create a new value\n params[decodedKey] = decodedVal;\n }\n }\n // parse `(a/b//outlet_name:c/d)`\n parseParens(allowPrimary) {\n const segments = {};\n this.capture('(');\n while (!this.consumeOptional(')') && this.remaining.length > 0) {\n const path = matchSegments(this.remaining);\n const next = this.remaining[path.length];\n // if is is not one of these characters, then the segment was unescaped\n // or the group was not closed\n if (next !== '/' && next !== ')' && next !== ';') {\n throw new ɵRuntimeError(4010 /* RuntimeErrorCode.UNPARSABLE_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot parse url '${this.url}'`);\n }\n let outletName = undefined;\n if (path.indexOf(':') > -1) {\n outletName = path.slice(0, path.indexOf(':'));\n this.capture(outletName);\n this.capture(':');\n } else if (allowPrimary) {\n outletName = PRIMARY_OUTLET;\n }\n const children = this.parseChildren();\n segments[outletName] = Object.keys(children).length === 1 ? children[PRIMARY_OUTLET] : new UrlSegmentGroup([], children);\n this.consumeOptional('//');\n }\n return segments;\n }\n peekStartsWith(str) {\n return this.remaining.startsWith(str);\n }\n // Consumes the prefix when it is present and returns whether it has been consumed\n consumeOptional(str) {\n if (this.peekStartsWith(str)) {\n this.remaining = this.remaining.substring(str.length);\n return true;\n }\n return false;\n }\n capture(str) {\n if (!this.consumeOptional(str)) {\n throw new ɵRuntimeError(4011 /* RuntimeErrorCode.UNEXPECTED_VALUE_IN_URL */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Expected \"${str}\".`);\n }\n }\n}\nfunction createRoot(rootCandidate) {\n return rootCandidate.segments.length > 0 ? new UrlSegmentGroup([], {\n [PRIMARY_OUTLET]: rootCandidate\n }) : rootCandidate;\n}\n/**\n * Recursively\n * - merges primary segment children into their parents\n * - drops empty children (those which have no segments and no children themselves). This latter\n * prevents serializing a group into something like `/a(aux:)`, where `aux` is an empty child\n * segment.\n * - merges named outlets without a primary segment sibling into the children. This prevents\n * serializing a URL like `//(a:a)(b:b) instead of `/(a:a//b:b)` when the aux b route lives on the\n * root but the `a` route lives under an empty path primary route.\n */\nfunction squashSegmentGroup(segmentGroup) {\n const newChildren = {};\n for (const [childOutlet, child] of Object.entries(segmentGroup.children)) {\n const childCandidate = squashSegmentGroup(child);\n // moves named children in an empty path primary child into this group\n if (childOutlet === PRIMARY_OUTLET && childCandidate.segments.length === 0 && childCandidate.hasChildren()) {\n for (const [grandChildOutlet, grandChild] of Object.entries(childCandidate.children)) {\n newChildren[grandChildOutlet] = grandChild;\n }\n } // don't add empty children\n else if (childCandidate.segments.length > 0 || childCandidate.hasChildren()) {\n newChildren[childOutlet] = childCandidate;\n }\n }\n const s = new UrlSegmentGroup(segmentGroup.segments, newChildren);\n return mergeTrivialChildren(s);\n}\n/**\n * When possible, merges the primary outlet child into the parent `UrlSegmentGroup`.\n *\n * When a segment group has only one child which is a primary outlet, merges that child into the\n * parent. That is, the child segment group's segments are merged into the `s` and the child's\n * children become the children of `s`. Think of this like a 'squash', merging the child segment\n * group into the parent.\n */\nfunction mergeTrivialChildren(s) {\n if (s.numberOfChildren === 1 && s.children[PRIMARY_OUTLET]) {\n const c = s.children[PRIMARY_OUTLET];\n return new UrlSegmentGroup(s.segments.concat(c.segments), c.children);\n }\n return s;\n}\nfunction isUrlTree(v) {\n return v instanceof UrlTree;\n}\n\n/**\n * Creates a `UrlTree` relative to an `ActivatedRouteSnapshot`.\n *\n * @publicApi\n *\n *\n * @param relativeTo The `ActivatedRouteSnapshot` to apply the commands to\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the one provided in the `relativeTo` parameter.\n * @param queryParams The query parameters for the `UrlTree`. `null` if the `UrlTree` does not have\n * any query parameters.\n * @param fragment The fragment for the `UrlTree`. `null` if the `UrlTree` does not have a fragment.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * createUrlTreeFromSnapshot(snapshot, ['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * createUrlTreeFromSnapshot(snapshot, [{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right:\n * 'chat'}}], null, null);\n *\n * // remove the right secondary node\n * createUrlTreeFromSnapshot(snapshot, ['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // For the examples below, assume the current URL is for the `/team/33/user/11` and the\n * `ActivatedRouteSnapshot` points to `user/11`:\n *\n * // navigate to /team/33/user/11/details\n * createUrlTreeFromSnapshot(snapshot, ['details']);\n *\n * // navigate to /team/33/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../22']);\n *\n * // navigate to /team/44/user/22\n * createUrlTreeFromSnapshot(snapshot, ['../../team/44/user/22']);\n * ```\n */\nfunction createUrlTreeFromSnapshot(relativeTo, commands, queryParams = null, fragment = null) {\n const relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeTo);\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, queryParams, fragment);\n}\nfunction createSegmentGroupFromRoute(route) {\n let targetGroup;\n function createSegmentGroupFromRouteRecursive(currentRoute) {\n const childOutlets = {};\n for (const childSnapshot of currentRoute.children) {\n const root = createSegmentGroupFromRouteRecursive(childSnapshot);\n childOutlets[childSnapshot.outlet] = root;\n }\n const segmentGroup = new UrlSegmentGroup(currentRoute.url, childOutlets);\n if (currentRoute === route) {\n targetGroup = segmentGroup;\n }\n return segmentGroup;\n }\n const rootCandidate = createSegmentGroupFromRouteRecursive(route.root);\n const rootSegmentGroup = createRoot(rootCandidate);\n return targetGroup ?? rootSegmentGroup;\n}\nfunction createUrlTreeFromSegmentGroup(relativeTo, commands, queryParams, fragment) {\n let root = relativeTo;\n while (root.parent) {\n root = root.parent;\n }\n // There are no commands so the `UrlTree` goes to the same path as the one created from the\n // `UrlSegmentGroup`. All we need to do is update the `queryParams` and `fragment` without\n // applying any other logic.\n if (commands.length === 0) {\n return tree(root, root, root, queryParams, fragment);\n }\n const nav = computeNavigation(commands);\n if (nav.toRoot()) {\n return tree(root, root, new UrlSegmentGroup([], {}), queryParams, fragment);\n }\n const position = findStartingPositionForTargetGroup(nav, root, relativeTo);\n const newSegmentGroup = position.processChildren ? updateSegmentGroupChildren(position.segmentGroup, position.index, nav.commands) : updateSegmentGroup(position.segmentGroup, position.index, nav.commands);\n return tree(root, position.segmentGroup, newSegmentGroup, queryParams, fragment);\n}\nfunction isMatrixParams(command) {\n return typeof command === 'object' && command != null && !command.outlets && !command.segmentPath;\n}\n/**\n * Determines if a given command has an `outlets` map. When we encounter a command\n * with an outlets k/v map, we need to apply each outlet individually to the existing segment.\n */\nfunction isCommandWithOutlets(command) {\n return typeof command === 'object' && command != null && command.outlets;\n}\nfunction tree(oldRoot, oldSegmentGroup, newSegmentGroup, queryParams, fragment) {\n let qp = {};\n if (queryParams) {\n Object.entries(queryParams).forEach(([name, value]) => {\n qp[name] = Array.isArray(value) ? value.map(v => `${v}`) : `${value}`;\n });\n }\n let rootCandidate;\n if (oldRoot === oldSegmentGroup) {\n rootCandidate = newSegmentGroup;\n } else {\n rootCandidate = replaceSegment(oldRoot, oldSegmentGroup, newSegmentGroup);\n }\n const newRoot = createRoot(squashSegmentGroup(rootCandidate));\n return new UrlTree(newRoot, qp, fragment);\n}\n/**\n * Replaces the `oldSegment` which is located in some child of the `current` with the `newSegment`.\n * This also has the effect of creating new `UrlSegmentGroup` copies to update references. This\n * shouldn't be necessary but the fallback logic for an invalid ActivatedRoute in the creation uses\n * the Router's current url tree. If we don't create new segment groups, we end up modifying that\n * value.\n */\nfunction replaceSegment(current, oldSegment, newSegment) {\n const children = {};\n Object.entries(current.children).forEach(([outletName, c]) => {\n if (c === oldSegment) {\n children[outletName] = newSegment;\n } else {\n children[outletName] = replaceSegment(c, oldSegment, newSegment);\n }\n });\n return new UrlSegmentGroup(current.segments, children);\n}\nclass Navigation {\n constructor(isAbsolute, numberOfDoubleDots, commands) {\n this.isAbsolute = isAbsolute;\n this.numberOfDoubleDots = numberOfDoubleDots;\n this.commands = commands;\n if (isAbsolute && commands.length > 0 && isMatrixParams(commands[0])) {\n throw new ɵRuntimeError(4003 /* RuntimeErrorCode.ROOT_SEGMENT_MATRIX_PARAMS */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Root segment cannot have matrix parameters');\n }\n const cmdWithOutlet = commands.find(isCommandWithOutlets);\n if (cmdWithOutlet && cmdWithOutlet !== last(commands)) {\n throw new ɵRuntimeError(4004 /* RuntimeErrorCode.MISPLACED_OUTLETS_COMMAND */, (typeof ngDevMode === 'undefined' || ngDevMode) && '{outlets:{}} has to be the last command');\n }\n }\n toRoot() {\n return this.isAbsolute && this.commands.length === 1 && this.commands[0] == '/';\n }\n}\n/** Transforms commands to a normalized `Navigation` */\nfunction computeNavigation(commands) {\n if (typeof commands[0] === 'string' && commands.length === 1 && commands[0] === '/') {\n return new Navigation(true, 0, commands);\n }\n let numberOfDoubleDots = 0;\n let isAbsolute = false;\n const res = commands.reduce((res, cmd, cmdIdx) => {\n if (typeof cmd === 'object' && cmd != null) {\n if (cmd.outlets) {\n const outlets = {};\n Object.entries(cmd.outlets).forEach(([name, commands]) => {\n outlets[name] = typeof commands === 'string' ? commands.split('/') : commands;\n });\n return [...res, {\n outlets\n }];\n }\n if (cmd.segmentPath) {\n return [...res, cmd.segmentPath];\n }\n }\n if (!(typeof cmd === 'string')) {\n return [...res, cmd];\n }\n if (cmdIdx === 0) {\n cmd.split('/').forEach((urlPart, partIndex) => {\n if (partIndex == 0 && urlPart === '.') {\n // skip './a'\n } else if (partIndex == 0 && urlPart === '') {\n // '/a'\n isAbsolute = true;\n } else if (urlPart === '..') {\n // '../a'\n numberOfDoubleDots++;\n } else if (urlPart != '') {\n res.push(urlPart);\n }\n });\n return res;\n }\n return [...res, cmd];\n }, []);\n return new Navigation(isAbsolute, numberOfDoubleDots, res);\n}\nclass Position {\n constructor(segmentGroup, processChildren, index) {\n this.segmentGroup = segmentGroup;\n this.processChildren = processChildren;\n this.index = index;\n }\n}\nfunction findStartingPositionForTargetGroup(nav, root, target) {\n if (nav.isAbsolute) {\n return new Position(root, true, 0);\n }\n if (!target) {\n // `NaN` is used only to maintain backwards compatibility with incorrectly mocked\n // `ActivatedRouteSnapshot` in tests. In prior versions of this code, the position here was\n // determined based on an internal property that was rarely mocked, resulting in `NaN`. In\n // reality, this code path should _never_ be touched since `target` is not allowed to be falsey.\n return new Position(root, false, NaN);\n }\n if (target.parent === null) {\n return new Position(target, true, 0);\n }\n const modifier = isMatrixParams(nav.commands[0]) ? 0 : 1;\n const index = target.segments.length - 1 + modifier;\n return createPositionApplyingDoubleDots(target, index, nav.numberOfDoubleDots);\n}\nfunction createPositionApplyingDoubleDots(group, index, numberOfDoubleDots) {\n let g = group;\n let ci = index;\n let dd = numberOfDoubleDots;\n while (dd > ci) {\n dd -= ci;\n g = g.parent;\n if (!g) {\n throw new ɵRuntimeError(4005 /* RuntimeErrorCode.INVALID_DOUBLE_DOTS */, (typeof ngDevMode === 'undefined' || ngDevMode) && \"Invalid number of '../'\");\n }\n ci = g.segments.length;\n }\n return new Position(g, false, ci - dd);\n}\nfunction getOutlets(commands) {\n if (isCommandWithOutlets(commands[0])) {\n return commands[0].outlets;\n }\n return {\n [PRIMARY_OUTLET]: commands\n };\n}\nfunction updateSegmentGroup(segmentGroup, startIndex, commands) {\n segmentGroup ??= new UrlSegmentGroup([], {});\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return updateSegmentGroupChildren(segmentGroup, startIndex, commands);\n }\n const m = prefixedWith(segmentGroup, startIndex, commands);\n const slicedCommands = commands.slice(m.commandIndex);\n if (m.match && m.pathIndex < segmentGroup.segments.length) {\n const g = new UrlSegmentGroup(segmentGroup.segments.slice(0, m.pathIndex), {});\n g.children[PRIMARY_OUTLET] = new UrlSegmentGroup(segmentGroup.segments.slice(m.pathIndex), segmentGroup.children);\n return updateSegmentGroupChildren(g, 0, slicedCommands);\n } else if (m.match && slicedCommands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else if (m.match && !segmentGroup.hasChildren()) {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n } else if (m.match) {\n return updateSegmentGroupChildren(segmentGroup, 0, slicedCommands);\n } else {\n return createNewSegmentGroup(segmentGroup, startIndex, commands);\n }\n}\nfunction updateSegmentGroupChildren(segmentGroup, startIndex, commands) {\n if (commands.length === 0) {\n return new UrlSegmentGroup(segmentGroup.segments, {});\n } else {\n const outlets = getOutlets(commands);\n const children = {};\n // If the set of commands applies to anything other than the primary outlet and the child\n // segment is an empty path primary segment on its own, we want to apply the commands to the\n // empty child path rather than here. The outcome is that the empty primary child is effectively\n // removed from the final output UrlTree. Imagine the following config:\n //\n // {path: '', children: [{path: '**', outlet: 'popup'}]}.\n //\n // Navigation to /(popup:a) will activate the child outlet correctly Given a follow-up\n // navigation with commands\n // ['/', {outlets: {'popup': 'b'}}], we _would not_ want to apply the outlet commands to the\n // root segment because that would result in\n // //(popup:a)(popup:b) since the outlet command got applied one level above where it appears in\n // the `ActivatedRoute` rather than updating the existing one.\n //\n // Because empty paths do not appear in the URL segments and the fact that the segments used in\n // the output `UrlTree` are squashed to eliminate these empty paths where possible\n // https://github.com/angular/angular/blob/13f10de40e25c6900ca55bd83b36bd533dacfa9e/packages/router/src/url_tree.ts#L755\n // it can be hard to determine what is the right thing to do when applying commands to a\n // `UrlSegmentGroup` that is created from an \"unsquashed\"/expanded `ActivatedRoute` tree.\n // This code effectively \"squashes\" empty path primary routes when they have no siblings on\n // the same level of the tree.\n if (Object.keys(outlets).some(o => o !== PRIMARY_OUTLET) && segmentGroup.children[PRIMARY_OUTLET] && segmentGroup.numberOfChildren === 1 && segmentGroup.children[PRIMARY_OUTLET].segments.length === 0) {\n const childrenOfEmptyChild = updateSegmentGroupChildren(segmentGroup.children[PRIMARY_OUTLET], startIndex, commands);\n return new UrlSegmentGroup(segmentGroup.segments, childrenOfEmptyChild.children);\n }\n Object.entries(outlets).forEach(([outlet, commands]) => {\n if (typeof commands === 'string') {\n commands = [commands];\n }\n if (commands !== null) {\n children[outlet] = updateSegmentGroup(segmentGroup.children[outlet], startIndex, commands);\n }\n });\n Object.entries(segmentGroup.children).forEach(([childOutlet, child]) => {\n if (outlets[childOutlet] === undefined) {\n children[childOutlet] = child;\n }\n });\n return new UrlSegmentGroup(segmentGroup.segments, children);\n }\n}\nfunction prefixedWith(segmentGroup, startIndex, commands) {\n let currentCommandIndex = 0;\n let currentPathIndex = startIndex;\n const noMatch = {\n match: false,\n pathIndex: 0,\n commandIndex: 0\n };\n while (currentPathIndex < segmentGroup.segments.length) {\n if (currentCommandIndex >= commands.length) return noMatch;\n const path = segmentGroup.segments[currentPathIndex];\n const command = commands[currentCommandIndex];\n // Do not try to consume command as part of the prefixing if it has outlets because it can\n // contain outlets other than the one being processed. Consuming the outlets command would\n // result in other outlets being ignored.\n if (isCommandWithOutlets(command)) {\n break;\n }\n const curr = `${command}`;\n const next = currentCommandIndex < commands.length - 1 ? commands[currentCommandIndex + 1] : null;\n if (currentPathIndex > 0 && curr === undefined) break;\n if (curr && next && typeof next === 'object' && next.outlets === undefined) {\n if (!compare(curr, next, path)) return noMatch;\n currentCommandIndex += 2;\n } else {\n if (!compare(curr, {}, path)) return noMatch;\n currentCommandIndex++;\n }\n currentPathIndex++;\n }\n return {\n match: true,\n pathIndex: currentPathIndex,\n commandIndex: currentCommandIndex\n };\n}\nfunction createNewSegmentGroup(segmentGroup, startIndex, commands) {\n const paths = segmentGroup.segments.slice(0, startIndex);\n let i = 0;\n while (i < commands.length) {\n const command = commands[i];\n if (isCommandWithOutlets(command)) {\n const children = createNewSegmentChildren(command.outlets);\n return new UrlSegmentGroup(paths, children);\n }\n // if we start with an object literal, we need to reuse the path part from the segment\n if (i === 0 && isMatrixParams(commands[0])) {\n const p = segmentGroup.segments[startIndex];\n paths.push(new UrlSegment(p.path, stringify(commands[0])));\n i++;\n continue;\n }\n const curr = isCommandWithOutlets(command) ? command.outlets[PRIMARY_OUTLET] : `${command}`;\n const next = i < commands.length - 1 ? commands[i + 1] : null;\n if (curr && next && isMatrixParams(next)) {\n paths.push(new UrlSegment(curr, stringify(next)));\n i += 2;\n } else {\n paths.push(new UrlSegment(curr, {}));\n i++;\n }\n }\n return new UrlSegmentGroup(paths, {});\n}\nfunction createNewSegmentChildren(outlets) {\n const children = {};\n Object.entries(outlets).forEach(([outlet, commands]) => {\n if (typeof commands === 'string') {\n commands = [commands];\n }\n if (commands !== null) {\n children[outlet] = createNewSegmentGroup(new UrlSegmentGroup([], {}), 0, commands);\n }\n });\n return children;\n}\nfunction stringify(params) {\n const res = {};\n Object.entries(params).forEach(([k, v]) => res[k] = `${v}`);\n return res;\n}\nfunction compare(path, params, segment) {\n return path == segment.path && shallowEqual(params, segment.parameters);\n}\nconst IMPERATIVE_NAVIGATION = 'imperative';\n/**\n * Identifies the type of a router event.\n *\n * @publicApi\n */\nvar EventType = /*#__PURE__*/function (EventType) {\n EventType[EventType[\"NavigationStart\"] = 0] = \"NavigationStart\";\n EventType[EventType[\"NavigationEnd\"] = 1] = \"NavigationEnd\";\n EventType[EventType[\"NavigationCancel\"] = 2] = \"NavigationCancel\";\n EventType[EventType[\"NavigationError\"] = 3] = \"NavigationError\";\n EventType[EventType[\"RoutesRecognized\"] = 4] = \"RoutesRecognized\";\n EventType[EventType[\"ResolveStart\"] = 5] = \"ResolveStart\";\n EventType[EventType[\"ResolveEnd\"] = 6] = \"ResolveEnd\";\n EventType[EventType[\"GuardsCheckStart\"] = 7] = \"GuardsCheckStart\";\n EventType[EventType[\"GuardsCheckEnd\"] = 8] = \"GuardsCheckEnd\";\n EventType[EventType[\"RouteConfigLoadStart\"] = 9] = \"RouteConfigLoadStart\";\n EventType[EventType[\"RouteConfigLoadEnd\"] = 10] = \"RouteConfigLoadEnd\";\n EventType[EventType[\"ChildActivationStart\"] = 11] = \"ChildActivationStart\";\n EventType[EventType[\"ChildActivationEnd\"] = 12] = \"ChildActivationEnd\";\n EventType[EventType[\"ActivationStart\"] = 13] = \"ActivationStart\";\n EventType[EventType[\"ActivationEnd\"] = 14] = \"ActivationEnd\";\n EventType[EventType[\"Scroll\"] = 15] = \"Scroll\";\n EventType[EventType[\"NavigationSkipped\"] = 16] = \"NavigationSkipped\";\n return EventType;\n}(EventType || {});\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n * constructor(public router: Router) {\n * router.events.pipe(\n * filter((e: Event | RouterEvent): e is RouterEvent => e instanceof RouterEvent)\n * ).subscribe((e: RouterEvent) => {\n * // Do something\n * });\n * }\n * }\n * ```\n *\n * @see {@link Event}\n * @see [Router events summary](guide/routing/router-reference#router-events)\n * @publicApi\n */\nclass RouterEvent {\n constructor( /** A unique ID that the router assigns to every router navigation. */\n id, /** The URL that is the destination for this navigation. */\n url) {\n this.id = id;\n this.url = url;\n }\n}\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\nclass NavigationStart extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n navigationTrigger = 'imperative', /** @docsNotRequired */\n restoredState = null) {\n super(id, url);\n this.type = EventType.NavigationStart;\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n }\n}\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationCancel}\n * @see {@link NavigationError}\n *\n * @publicApi\n */\nclass NavigationEnd extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.type = EventType.NavigationEnd;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n}\n/**\n * A code for the `NavigationCancel` event of the `Router` to indicate the\n * reason a navigation failed.\n *\n * @publicApi\n */\nvar NavigationCancellationCode = /*#__PURE__*/function (NavigationCancellationCode) {\n /**\n * A navigation failed because a guard returned a `UrlTree` to redirect.\n */\n NavigationCancellationCode[NavigationCancellationCode[\"Redirect\"] = 0] = \"Redirect\";\n /**\n * A navigation failed because a more recent navigation started.\n */\n NavigationCancellationCode[NavigationCancellationCode[\"SupersededByNewNavigation\"] = 1] = \"SupersededByNewNavigation\";\n /**\n * A navigation failed because one of the resolvers completed without emitting a value.\n */\n NavigationCancellationCode[NavigationCancellationCode[\"NoDataFromResolver\"] = 2] = \"NoDataFromResolver\";\n /**\n * A navigation failed because a guard returned `false`.\n */\n NavigationCancellationCode[NavigationCancellationCode[\"GuardRejected\"] = 3] = \"GuardRejected\";\n return NavigationCancellationCode;\n}(NavigationCancellationCode || {});\n/**\n * A code for the `NavigationSkipped` event of the `Router` to indicate the\n * reason a navigation was skipped.\n *\n * @publicApi\n */\nvar NavigationSkippedCode = /*#__PURE__*/function (NavigationSkippedCode) {\n /**\n * A navigation was skipped because the navigation URL was the same as the current Router URL.\n */\n NavigationSkippedCode[NavigationSkippedCode[\"IgnoredSameUrlNavigation\"] = 0] = \"IgnoredSameUrlNavigation\";\n /**\n * A navigation was skipped because the configured `UrlHandlingStrategy` return `false` for both\n * the current Router URL and the target of the navigation.\n *\n * @see {@link UrlHandlingStrategy}\n */\n NavigationSkippedCode[NavigationSkippedCode[\"IgnoredByUrlHandlingStrategy\"] = 1] = \"IgnoredByUrlHandlingStrategy\";\n return NavigationSkippedCode;\n}(NavigationSkippedCode || {});\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationEnd}\n * @see {@link NavigationError}\n *\n * @publicApi\n */\nclass NavigationCancel extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url,\n /**\n * A description of why the navigation was cancelled. For debug purposes only. Use `code`\n * instead for a stable cancellation reason that can be used in production.\n */\n reason,\n /**\n * A code to indicate why the navigation was canceled. This cancellation code is stable for\n * the reason and can be relied on whereas the `reason` string could change and should not be\n * used in production.\n */\n code) {\n super(id, url);\n this.reason = reason;\n this.code = code;\n this.type = EventType.NavigationCancel;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationCancel(id: ${this.id}, url: '${this.url}')`;\n }\n}\n/**\n * An event triggered when a navigation is skipped.\n * This can happen for a couple reasons including onSameUrlHandling\n * is set to `ignore` and the navigation URL is not different than the\n * current state.\n *\n * @publicApi\n */\nclass NavigationSkipped extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url,\n /**\n * A description of why the navigation was skipped. For debug purposes only. Use `code`\n * instead for a stable skipped reason that can be used in production.\n */\n reason,\n /**\n * A code to indicate why the navigation was skipped. This code is stable for\n * the reason and can be relied on whereas the `reason` string could change and should not be\n * used in production.\n */\n code) {\n super(id, url);\n this.reason = reason;\n this.code = code;\n this.type = EventType.NavigationSkipped;\n }\n}\n/**\n * An event triggered when a navigation fails due to an unexpected error.\n *\n * @see {@link NavigationStart}\n * @see {@link NavigationEnd}\n * @see {@link NavigationCancel}\n *\n * @publicApi\n */\nclass NavigationError extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n error,\n /**\n * The target of the navigation when the error occurred.\n *\n * Note that this can be `undefined` because an error could have occurred before the\n * `RouterStateSnapshot` was created for the navigation.\n */\n target) {\n super(id, url);\n this.error = error;\n this.target = target;\n this.type = EventType.NavigationError;\n }\n /** @docsNotRequired */\n toString() {\n return `NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`;\n }\n}\n/**\n * An event triggered when routes are recognized.\n *\n * @publicApi\n */\nclass RoutesRecognized extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = EventType.RoutesRecognized;\n }\n /** @docsNotRequired */\n toString() {\n return `RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the start of the Guard phase of routing.\n *\n * @see {@link GuardsCheckEnd}\n *\n * @publicApi\n */\nclass GuardsCheckStart extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = EventType.GuardsCheckStart;\n }\n toString() {\n return `GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the end of the Guard phase of routing.\n *\n * @see {@link GuardsCheckStart}\n *\n * @publicApi\n */\nclass GuardsCheckEnd extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state, /** @docsNotRequired */\n shouldActivate) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.shouldActivate = shouldActivate;\n this.type = EventType.GuardsCheckEnd;\n }\n toString() {\n return `GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`;\n }\n}\n/**\n * An event triggered at the start of the Resolve phase of routing.\n *\n * Runs in the \"resolve\" phase whether or not there is anything to resolve.\n * In future, may change to only run when there are things to be resolved.\n *\n * @see {@link ResolveEnd}\n *\n * @publicApi\n */\nclass ResolveStart extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = EventType.ResolveStart;\n }\n toString() {\n return `ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered at the end of the Resolve phase of routing.\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ResolveEnd extends RouterEvent {\n constructor( /** @docsNotRequired */\n id, /** @docsNotRequired */\n url, /** @docsNotRequired */\n urlAfterRedirects, /** @docsNotRequired */\n state) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n this.state = state;\n this.type = EventType.ResolveEnd;\n }\n toString() {\n return `ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`;\n }\n}\n/**\n * An event triggered before lazy loading a route configuration.\n *\n * @see {@link RouteConfigLoadEnd}\n *\n * @publicApi\n */\nclass RouteConfigLoadStart {\n constructor( /** @docsNotRequired */\n route) {\n this.route = route;\n this.type = EventType.RouteConfigLoadStart;\n }\n toString() {\n return `RouteConfigLoadStart(path: ${this.route.path})`;\n }\n}\n/**\n * An event triggered when a route has been lazy loaded.\n *\n * @see {@link RouteConfigLoadStart}\n *\n * @publicApi\n */\nclass RouteConfigLoadEnd {\n constructor( /** @docsNotRequired */\n route) {\n this.route = route;\n this.type = EventType.RouteConfigLoadEnd;\n }\n toString() {\n return `RouteConfigLoadEnd(path: ${this.route.path})`;\n }\n}\n/**\n * An event triggered at the start of the child-activation\n * part of the Resolve phase of routing.\n * @see {@link ChildActivationEnd}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ChildActivationStart {\n constructor( /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = EventType.ChildActivationStart;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationStart(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the end of the child-activation part\n * of the Resolve phase of routing.\n * @see {@link ChildActivationStart}\n * @see {@link ResolveStart}\n * @publicApi\n */\nclass ChildActivationEnd {\n constructor( /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = EventType.ChildActivationEnd;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ChildActivationEnd(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the start of the activation part\n * of the Resolve phase of routing.\n * @see {@link ActivationEnd}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ActivationStart {\n constructor( /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = EventType.ActivationStart;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationStart(path: '${path}')`;\n }\n}\n/**\n * An event triggered at the end of the activation part\n * of the Resolve phase of routing.\n * @see {@link ActivationStart}\n * @see {@link ResolveStart}\n *\n * @publicApi\n */\nclass ActivationEnd {\n constructor( /** @docsNotRequired */\n snapshot) {\n this.snapshot = snapshot;\n this.type = EventType.ActivationEnd;\n }\n toString() {\n const path = this.snapshot.routeConfig && this.snapshot.routeConfig.path || '';\n return `ActivationEnd(path: '${path}')`;\n }\n}\n/**\n * An event triggered by scrolling.\n *\n * @publicApi\n */\nclass Scroll {\n constructor( /** @docsNotRequired */\n routerEvent, /** @docsNotRequired */\n position, /** @docsNotRequired */\n anchor) {\n this.routerEvent = routerEvent;\n this.position = position;\n this.anchor = anchor;\n this.type = EventType.Scroll;\n }\n toString() {\n const pos = this.position ? `${this.position[0]}, ${this.position[1]}` : null;\n return `Scroll(anchor: '${this.anchor}', position: '${pos}')`;\n }\n}\nclass BeforeActivateRoutes {}\nclass RedirectRequest {\n constructor(url, navigationBehaviorOptions) {\n this.url = url;\n this.navigationBehaviorOptions = navigationBehaviorOptions;\n }\n}\nfunction stringifyEvent(routerEvent) {\n switch (routerEvent.type) {\n case EventType.ActivationEnd:\n return `ActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.ActivationStart:\n return `ActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.ChildActivationEnd:\n return `ChildActivationEnd(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.ChildActivationStart:\n return `ChildActivationStart(path: '${routerEvent.snapshot.routeConfig?.path || ''}')`;\n case EventType.GuardsCheckEnd:\n return `GuardsCheckEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state}, shouldActivate: ${routerEvent.shouldActivate})`;\n case EventType.GuardsCheckStart:\n return `GuardsCheckStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.NavigationCancel:\n return `NavigationCancel(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case EventType.NavigationSkipped:\n return `NavigationSkipped(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case EventType.NavigationEnd:\n return `NavigationEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}')`;\n case EventType.NavigationError:\n return `NavigationError(id: ${routerEvent.id}, url: '${routerEvent.url}', error: ${routerEvent.error})`;\n case EventType.NavigationStart:\n return `NavigationStart(id: ${routerEvent.id}, url: '${routerEvent.url}')`;\n case EventType.ResolveEnd:\n return `ResolveEnd(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.ResolveStart:\n return `ResolveStart(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.RouteConfigLoadEnd:\n return `RouteConfigLoadEnd(path: ${routerEvent.route.path})`;\n case EventType.RouteConfigLoadStart:\n return `RouteConfigLoadStart(path: ${routerEvent.route.path})`;\n case EventType.RoutesRecognized:\n return `RoutesRecognized(id: ${routerEvent.id}, url: '${routerEvent.url}', urlAfterRedirects: '${routerEvent.urlAfterRedirects}', state: ${routerEvent.state})`;\n case EventType.Scroll:\n const pos = routerEvent.position ? `${routerEvent.position[0]}, ${routerEvent.position[1]}` : null;\n return `Scroll(anchor: '${routerEvent.anchor}', position: '${pos}')`;\n }\n}\n\n/**\n * Store contextual information about a `RouterOutlet`\n *\n * @publicApi\n */\nclass OutletContext {\n constructor(injector) {\n this.injector = injector;\n this.outlet = null;\n this.route = null;\n this.children = new ChildrenOutletContexts(this.injector);\n this.attachRef = null;\n }\n}\n/**\n * Store contextual information about the children (= nested) `RouterOutlet`\n *\n * @publicApi\n */\nlet ChildrenOutletContexts = /*#__PURE__*/(() => {\n class ChildrenOutletContexts {\n /** @nodoc */\n constructor(parentInjector) {\n this.parentInjector = parentInjector;\n // contexts for child outlets, by name.\n this.contexts = new Map();\n }\n /** Called when a `RouterOutlet` directive is instantiated */\n onChildOutletCreated(childName, outlet) {\n const context = this.getOrCreateContext(childName);\n context.outlet = outlet;\n this.contexts.set(childName, context);\n }\n /**\n * Called when a `RouterOutlet` directive is destroyed.\n * We need to keep the context as the outlet could be destroyed inside a NgIf and might be\n * re-created later.\n */\n onChildOutletDestroyed(childName) {\n const context = this.getContext(childName);\n if (context) {\n context.outlet = null;\n context.attachRef = null;\n }\n }\n /**\n * Called when the corresponding route is deactivated during navigation.\n * Because the component get destroyed, all children outlet are destroyed.\n */\n onOutletDeactivated() {\n const contexts = this.contexts;\n this.contexts = new Map();\n return contexts;\n }\n onOutletReAttached(contexts) {\n this.contexts = contexts;\n }\n getOrCreateContext(childName) {\n let context = this.getContext(childName);\n if (!context) {\n context = new OutletContext(this.parentInjector);\n this.contexts.set(childName, context);\n }\n return context;\n }\n getContext(childName) {\n return this.contexts.get(childName) || null;\n }\n static {\n this.ɵfac = function ChildrenOutletContexts_Factory(t) {\n return new (t || ChildrenOutletContexts)(i0.ɵɵinject(i0.EnvironmentInjector));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ChildrenOutletContexts,\n factory: ChildrenOutletContexts.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return ChildrenOutletContexts;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass Tree {\n constructor(root) {\n this._root = root;\n }\n get root() {\n return this._root.value;\n }\n /**\n * @internal\n */\n parent(t) {\n const p = this.pathFromRoot(t);\n return p.length > 1 ? p[p.length - 2] : null;\n }\n /**\n * @internal\n */\n children(t) {\n const n = findNode(t, this._root);\n return n ? n.children.map(t => t.value) : [];\n }\n /**\n * @internal\n */\n firstChild(t) {\n const n = findNode(t, this._root);\n return n && n.children.length > 0 ? n.children[0].value : null;\n }\n /**\n * @internal\n */\n siblings(t) {\n const p = findPath(t, this._root);\n if (p.length < 2) return [];\n const c = p[p.length - 2].children.map(c => c.value);\n return c.filter(cc => cc !== t);\n }\n /**\n * @internal\n */\n pathFromRoot(t) {\n return findPath(t, this._root).map(s => s.value);\n }\n}\n// DFS for the node matching the value\nfunction findNode(value, node) {\n if (value === node.value) return node;\n for (const child of node.children) {\n const node = findNode(value, child);\n if (node) return node;\n }\n return null;\n}\n// Return the path to the node with the given value using DFS\nfunction findPath(value, node) {\n if (value === node.value) return [node];\n for (const child of node.children) {\n const path = findPath(value, child);\n if (path.length) {\n path.unshift(node);\n return path;\n }\n }\n return [];\n}\nclass TreeNode {\n constructor(value, children) {\n this.value = value;\n this.children = children;\n }\n toString() {\n return `TreeNode(${this.value})`;\n }\n}\n// Return the list of T indexed by outlet name\nfunction nodeChildrenAsMap(node) {\n const map = {};\n if (node) {\n node.children.forEach(child => map[child.value.outlet] = child);\n }\n return map;\n}\n\n/**\n * Represents the state of the router as a tree of activated routes.\n *\n * @usageNotes\n *\n * Every node in the route tree is an `ActivatedRoute` instance\n * that knows about the \"consumed\" URL segments, the extracted parameters,\n * and the resolved data.\n * Use the `ActivatedRoute` properties to traverse the tree from any node.\n *\n * The following fragment shows how a component gets the root node\n * of the current state to establish its own route tree:\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const root: ActivatedRoute = state.root;\n * const child = root.firstChild;\n * const id: Observable = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @see {@link ActivatedRoute}\n * @see [Getting route information](guide/routing/common-router-tasks#getting-route-information)\n *\n * @publicApi\n */\nclass RouterState extends Tree {\n /** @internal */\n constructor(root, /** The current snapshot of the router state */\n snapshot) {\n super(root);\n this.snapshot = snapshot;\n setRouterState(this, root);\n }\n toString() {\n return this.snapshot.toString();\n }\n}\nfunction createEmptyState(rootComponent) {\n const snapshot = createEmptyStateSnapshot(rootComponent);\n const emptyUrl = new BehaviorSubject([new UrlSegment('', {})]);\n const emptyParams = new BehaviorSubject({});\n const emptyData = new BehaviorSubject({});\n const emptyQueryParams = new BehaviorSubject({});\n const fragment = new BehaviorSubject('');\n const activated = new ActivatedRoute(emptyUrl, emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, snapshot.root);\n activated.snapshot = snapshot.root;\n return new RouterState(new TreeNode(activated, []), snapshot);\n}\nfunction createEmptyStateSnapshot(rootComponent) {\n const emptyParams = {};\n const emptyData = {};\n const emptyQueryParams = {};\n const fragment = '';\n const activated = new ActivatedRouteSnapshot([], emptyParams, emptyQueryParams, fragment, emptyData, PRIMARY_OUTLET, rootComponent, null, {});\n return new RouterStateSnapshot('', new TreeNode(activated, []));\n}\n/**\n * Provides access to information about a route associated with a component\n * that is loaded in an outlet.\n * Use to traverse the `RouterState` tree and extract information from nodes.\n *\n * The following example shows how to construct a component using information from a\n * currently activated route.\n *\n * Note: the observables in this class only emit when the current and previous values differ based\n * on shallow equality. For example, changing deeply nested properties in resolved `data` will not\n * cause the `ActivatedRoute.data` `Observable` to emit a new value.\n *\n * {@example router/activated-route/module.ts region=\"activated-route\"\n * header=\"activated-route.component.ts\"}\n *\n * @see [Getting route information](guide/routing/common-router-tasks#getting-route-information)\n *\n * @publicApi\n */\nclass ActivatedRoute {\n /** @internal */\n constructor( /** @internal */\n urlSubject, /** @internal */\n paramsSubject, /** @internal */\n queryParamsSubject, /** @internal */\n fragmentSubject, /** @internal */\n dataSubject, /** The outlet name of the route, a constant. */\n outlet, /** The component of the route, a constant. */\n component, futureSnapshot) {\n this.urlSubject = urlSubject;\n this.paramsSubject = paramsSubject;\n this.queryParamsSubject = queryParamsSubject;\n this.fragmentSubject = fragmentSubject;\n this.dataSubject = dataSubject;\n this.outlet = outlet;\n this.component = component;\n this._futureSnapshot = futureSnapshot;\n this.title = this.dataSubject?.pipe(map(d => d[RouteTitleKey])) ?? of(undefined);\n // TODO(atscott): Verify that these can be changed to `.asObservable()` with TGP.\n this.url = urlSubject;\n this.params = paramsSubject;\n this.queryParams = queryParamsSubject;\n this.fragment = fragmentSubject;\n this.data = dataSubject;\n }\n /** The configuration used to match this route. */\n get routeConfig() {\n return this._futureSnapshot.routeConfig;\n }\n /** The root of the router state. */\n get root() {\n return this._routerState.root;\n }\n /** The parent of this route in the router state tree. */\n get parent() {\n return this._routerState.parent(this);\n }\n /** The first child of this route in the router state tree. */\n get firstChild() {\n return this._routerState.firstChild(this);\n }\n /** The children of this route in the router state tree. */\n get children() {\n return this._routerState.children(this);\n }\n /** The path from the root of the router state tree to this route. */\n get pathFromRoot() {\n return this._routerState.pathFromRoot(this);\n }\n /**\n * An Observable that contains a map of the required and optional parameters\n * specific to the route.\n * The map supports retrieving single and multiple values from the same parameter.\n */\n get paramMap() {\n this._paramMap ??= this.params.pipe(map(p => convertToParamMap(p)));\n return this._paramMap;\n }\n /**\n * An Observable that contains a map of the query parameters available to all routes.\n * The map supports retrieving single and multiple values from the query parameter.\n */\n get queryParamMap() {\n this._queryParamMap ??= this.queryParams.pipe(map(p => convertToParamMap(p)));\n return this._queryParamMap;\n }\n toString() {\n return this.snapshot ? this.snapshot.toString() : `Future(${this._futureSnapshot})`;\n }\n}\n/**\n * Returns the inherited params, data, and resolve for a given route.\n *\n * By default, we do not inherit parent data unless the current route is path-less or the parent\n * route is component-less.\n */\nfunction getInherited(route, parent, paramsInheritanceStrategy = 'emptyOnly') {\n let inherited;\n const {\n routeConfig\n } = route;\n if (parent !== null && (paramsInheritanceStrategy === 'always' ||\n // inherit parent data if route is empty path\n routeConfig?.path === '' ||\n // inherit parent data if parent was componentless\n !parent.component && !parent.routeConfig?.loadComponent)) {\n inherited = {\n params: {\n ...parent.params,\n ...route.params\n },\n data: {\n ...parent.data,\n ...route.data\n },\n resolve: {\n // Snapshots are created with data inherited from parent and guards (i.e. canActivate) can\n // change data because it's not frozen...\n // This first line could be deleted chose to break/disallow mutating the `data` object in\n // guards.\n // Note that data from parents still override this mutated data so anyone relying on this\n // might be surprised that it doesn't work if parent data is inherited but otherwise does.\n ...route.data,\n // Ensure inherited resolved data overrides inherited static data\n ...parent.data,\n // static data from the current route overrides any inherited data\n ...routeConfig?.data,\n // resolved data from current route overrides everything\n ...route._resolvedData\n }\n };\n } else {\n inherited = {\n params: {\n ...route.params\n },\n data: {\n ...route.data\n },\n resolve: {\n ...route.data,\n ...(route._resolvedData ?? {})\n }\n };\n }\n if (routeConfig && hasStaticTitle(routeConfig)) {\n inherited.resolve[RouteTitleKey] = routeConfig.title;\n }\n return inherited;\n}\n/**\n * @description\n *\n * Contains the information about a route associated with a component loaded in an\n * outlet at a particular moment in time. ActivatedRouteSnapshot can also be used to\n * traverse the router state tree.\n *\n * The following example initializes a component with route information extracted\n * from the snapshot of the root node at the time of creation.\n *\n * ```\n * @Component({templateUrl:'./my-component.html'})\n * class MyComponent {\n * constructor(route: ActivatedRoute) {\n * const id: string = route.snapshot.params.id;\n * const url: string = route.snapshot.url.join('');\n * const user = route.snapshot.data.user;\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass ActivatedRouteSnapshot {\n /** The resolved route title */\n get title() {\n // Note: This _must_ be a getter because the data is mutated in the resolvers. Title will not be\n // available at the time of class instantiation.\n return this.data?.[RouteTitleKey];\n }\n /** @internal */\n constructor( /** The URL segments matched by this route */\n url,\n /**\n * The matrix parameters scoped to this route.\n *\n * You can compute all params (or data) in the router state or to get params outside\n * of an activated component by traversing the `RouterState` tree as in the following\n * example:\n * ```\n * collectRouteParams(router: Router) {\n * let params = {};\n * let stack: ActivatedRouteSnapshot[] = [router.routerState.snapshot.root];\n * while (stack.length > 0) {\n * const route = stack.pop()!;\n * params = {...params, ...route.params};\n * stack.push(...route.children);\n * }\n * return params;\n * }\n * ```\n */\n params, /** The query parameters shared by all the routes */\n queryParams, /** The URL fragment shared by all the routes */\n fragment, /** The static and resolved data of this route */\n data, /** The outlet name of the route */\n outlet, /** The component of the route */\n component, routeConfig, resolve) {\n this.url = url;\n this.params = params;\n this.queryParams = queryParams;\n this.fragment = fragment;\n this.data = data;\n this.outlet = outlet;\n this.component = component;\n this.routeConfig = routeConfig;\n this._resolve = resolve;\n }\n /** The root of the router state */\n get root() {\n return this._routerState.root;\n }\n /** The parent of this route in the router state tree */\n get parent() {\n return this._routerState.parent(this);\n }\n /** The first child of this route in the router state tree */\n get firstChild() {\n return this._routerState.firstChild(this);\n }\n /** The children of this route in the router state tree */\n get children() {\n return this._routerState.children(this);\n }\n /** The path from the root of the router state tree to this route */\n get pathFromRoot() {\n return this._routerState.pathFromRoot(this);\n }\n get paramMap() {\n this._paramMap ??= convertToParamMap(this.params);\n return this._paramMap;\n }\n get queryParamMap() {\n this._queryParamMap ??= convertToParamMap(this.queryParams);\n return this._queryParamMap;\n }\n toString() {\n const url = this.url.map(segment => segment.toString()).join('/');\n const matched = this.routeConfig ? this.routeConfig.path : '';\n return `Route(url:'${url}', path:'${matched}')`;\n }\n}\n/**\n * @description\n *\n * Represents the state of the router at a moment in time.\n *\n * This is a tree of activated route snapshots. Every node in this tree knows about\n * the \"consumed\" URL segments, the extracted parameters, and the resolved data.\n *\n * The following example shows how a component is initialized with information\n * from the snapshot of the root node's state at the time of creation.\n *\n * ```\n * @Component({templateUrl:'template.html'})\n * class MyComponent {\n * constructor(router: Router) {\n * const state: RouterState = router.routerState;\n * const snapshot: RouterStateSnapshot = state.snapshot;\n * const root: ActivatedRouteSnapshot = snapshot.root;\n * const child = root.firstChild;\n * const id: Observable = child.params.map(p => p.id);\n * //...\n * }\n * }\n * ```\n *\n * @publicApi\n */\nclass RouterStateSnapshot extends Tree {\n /** @internal */\n constructor( /** The url from which this snapshot was created */\n url, root) {\n super(root);\n this.url = url;\n setRouterState(this, root);\n }\n toString() {\n return serializeNode(this._root);\n }\n}\nfunction setRouterState(state, node) {\n node.value._routerState = state;\n node.children.forEach(c => setRouterState(state, c));\n}\nfunction serializeNode(node) {\n const c = node.children.length > 0 ? ` { ${node.children.map(serializeNode).join(', ')} } ` : '';\n return `${node.value}${c}`;\n}\n/**\n * The expectation is that the activate route is created with the right set of parameters.\n * So we push new values into the observables only when they are not the initial values.\n * And we detect that by checking if the snapshot field is set.\n */\nfunction advanceActivatedRoute(route) {\n if (route.snapshot) {\n const currentSnapshot = route.snapshot;\n const nextSnapshot = route._futureSnapshot;\n route.snapshot = nextSnapshot;\n if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {\n route.queryParamsSubject.next(nextSnapshot.queryParams);\n }\n if (currentSnapshot.fragment !== nextSnapshot.fragment) {\n route.fragmentSubject.next(nextSnapshot.fragment);\n }\n if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {\n route.paramsSubject.next(nextSnapshot.params);\n }\n if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {\n route.urlSubject.next(nextSnapshot.url);\n }\n if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {\n route.dataSubject.next(nextSnapshot.data);\n }\n } else {\n route.snapshot = route._futureSnapshot;\n // this is for resolved data\n route.dataSubject.next(route._futureSnapshot.data);\n }\n}\nfunction equalParamsAndUrlSegments(a, b) {\n const equalUrlParams = shallowEqual(a.params, b.params) && equalSegments(a.url, b.url);\n const parentsMismatch = !a.parent !== !b.parent;\n return equalUrlParams && !parentsMismatch && (!a.parent || equalParamsAndUrlSegments(a.parent, b.parent));\n}\nfunction hasStaticTitle(config) {\n return typeof config.title === 'string' || config.title === null;\n}\n\n/**\n * @description\n *\n * Acts as a placeholder that Angular dynamically fills based on the current router state.\n *\n * Each outlet can have a unique name, determined by the optional `name` attribute.\n * The name cannot be set or changed dynamically. If not set, default value is \"primary\".\n *\n * ```\n * \n * \n * \n * ```\n *\n * Named outlets can be the targets of secondary routes.\n * The `Route` object for a secondary route has an `outlet` property to identify the target outlet:\n *\n * `{path: , component: , outlet: }`\n *\n * Using named outlets and secondary routes, you can target multiple outlets in\n * the same `RouterLink` directive.\n *\n * The router keeps track of separate branches in a navigation tree for each named outlet and\n * generates a representation of that tree in the URL.\n * The URL for a secondary route uses the following syntax to specify both the primary and secondary\n * routes at the same time:\n *\n * `http://base-path/primary-route-path(outlet-name:route-path)`\n *\n * A router outlet emits an activate event when a new component is instantiated,\n * deactivate event when a component is destroyed.\n * An attached event emits when the `RouteReuseStrategy` instructs the outlet to reattach the\n * subtree, and the detached event emits when the `RouteReuseStrategy` instructs the outlet to\n * detach the subtree.\n *\n * ```\n * \n * ```\n *\n * @see {@link RouterLink}\n * @see {@link Route}\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet RouterOutlet = /*#__PURE__*/(() => {\n class RouterOutlet {\n constructor() {\n this.activated = null;\n this._activatedRoute = null;\n /**\n * The name of the outlet\n *\n */\n this.name = PRIMARY_OUTLET;\n this.activateEvents = new EventEmitter();\n this.deactivateEvents = new EventEmitter();\n /**\n * Emits an attached component instance when the `RouteReuseStrategy` instructs to re-attach a\n * previously detached subtree.\n **/\n this.attachEvents = new EventEmitter();\n /**\n * Emits a detached component instance when the `RouteReuseStrategy` instructs to detach the\n * subtree.\n */\n this.detachEvents = new EventEmitter();\n this.parentContexts = inject(ChildrenOutletContexts);\n this.location = inject(ViewContainerRef);\n this.changeDetector = inject(ChangeDetectorRef);\n this.inputBinder = inject(INPUT_BINDER, {\n optional: true\n });\n /** @nodoc */\n this.supportsBindingToComponentInputs = true;\n }\n /** @internal */\n get activatedComponentRef() {\n return this.activated;\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (changes['name']) {\n const {\n firstChange,\n previousValue\n } = changes['name'];\n if (firstChange) {\n // The first change is handled by ngOnInit. Because ngOnChanges doesn't get called when no\n // input is set at all, we need to centrally handle the first change there.\n return;\n }\n // unregister with the old name\n if (this.isTrackedInParentContexts(previousValue)) {\n this.deactivate();\n this.parentContexts.onChildOutletDestroyed(previousValue);\n }\n // register the new name\n this.initializeOutletWithName();\n }\n }\n /** @nodoc */\n ngOnDestroy() {\n // Ensure that the registered outlet is this one before removing it on the context.\n if (this.isTrackedInParentContexts(this.name)) {\n this.parentContexts.onChildOutletDestroyed(this.name);\n }\n this.inputBinder?.unsubscribeFromRouteData(this);\n }\n isTrackedInParentContexts(outletName) {\n return this.parentContexts.getContext(outletName)?.outlet === this;\n }\n /** @nodoc */\n ngOnInit() {\n this.initializeOutletWithName();\n }\n initializeOutletWithName() {\n this.parentContexts.onChildOutletCreated(this.name, this);\n if (this.activated) {\n return;\n }\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.parentContexts.getContext(this.name);\n if (context?.route) {\n if (context.attachRef) {\n // `attachRef` is populated when there is an existing component to mount\n this.attach(context.attachRef, context.route);\n } else {\n // otherwise the component defined in the configuration is created\n this.activateWith(context.route, context.injector);\n }\n }\n }\n get isActivated() {\n return !!this.activated;\n }\n /**\n * @returns The currently activated component instance.\n * @throws An error if the outlet is not activated.\n */\n get component() {\n if (!this.activated) throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');\n return this.activated.instance;\n }\n get activatedRoute() {\n if (!this.activated) throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');\n return this._activatedRoute;\n }\n get activatedRouteData() {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach() {\n if (!this.activated) throw new ɵRuntimeError(4012 /* RuntimeErrorCode.OUTLET_NOT_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Outlet is not activated');\n this.location.detach();\n const cmp = this.activated;\n this.activated = null;\n this._activatedRoute = null;\n this.detachEvents.emit(cmp.instance);\n return cmp;\n }\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n attach(ref, activatedRoute) {\n this.activated = ref;\n this._activatedRoute = activatedRoute;\n this.location.insert(ref.hostView);\n this.inputBinder?.bindActivatedRouteToOutletComponent(this);\n this.attachEvents.emit(ref.instance);\n }\n deactivate() {\n if (this.activated) {\n const c = this.component;\n this.activated.destroy();\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n activateWith(activatedRoute, environmentInjector) {\n if (this.isActivated) {\n throw new ɵRuntimeError(4013 /* RuntimeErrorCode.OUTLET_ALREADY_ACTIVATED */, (typeof ngDevMode === 'undefined' || ngDevMode) && 'Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n const location = this.location;\n const snapshot = activatedRoute.snapshot;\n const component = snapshot.component;\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n const injector = new OutletInjector(activatedRoute, childContexts, location.injector);\n this.activated = location.createComponent(component, {\n index: location.length,\n injector,\n environmentInjector: environmentInjector\n });\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n this.changeDetector.markForCheck();\n this.inputBinder?.bindActivatedRouteToOutletComponent(this);\n this.activateEvents.emit(this.activated.instance);\n }\n static {\n this.ɵfac = function RouterOutlet_Factory(t) {\n return new (t || RouterOutlet)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: RouterOutlet,\n selectors: [[\"router-outlet\"]],\n inputs: {\n name: \"name\"\n },\n outputs: {\n activateEvents: \"activate\",\n deactivateEvents: \"deactivate\",\n attachEvents: \"attach\",\n detachEvents: \"detach\"\n },\n exportAs: [\"outlet\"],\n standalone: true,\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return RouterOutlet;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass OutletInjector {\n /**\n * This injector has a special handing for the `ActivatedRoute` and\n * `ChildrenOutletContexts` tokens: it returns corresponding values for those\n * tokens dynamically. This behavior is different from the regular injector logic,\n * when we initialize and store a value, which is later returned for all inject\n * requests.\n *\n * In some cases (e.g. when using `@defer`), this dynamic behavior requires special\n * handling. This function allows to identify an instance of the `OutletInjector` and\n * create an instance of it without referring to the class itself (so this logic can\n * be invoked from the `core` package). This helps to retain dynamic behavior for the\n * mentioned tokens.\n *\n * Note: it's a temporary solution and we should explore how to support this case better.\n */\n __ngOutletInjector(parentInjector) {\n return new OutletInjector(this.route, this.childContexts, parentInjector);\n }\n constructor(route, childContexts, parent) {\n this.route = route;\n this.childContexts = childContexts;\n this.parent = parent;\n }\n get(token, notFoundValue) {\n if (token === ActivatedRoute) {\n return this.route;\n }\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n return this.parent.get(token, notFoundValue);\n }\n}\nconst INPUT_BINDER = /*#__PURE__*/new InjectionToken('');\n/**\n * Injectable used as a tree-shakable provider for opting in to binding router data to component\n * inputs.\n *\n * The RouterOutlet registers itself with this service when an `ActivatedRoute` is attached or\n * activated. When this happens, the service subscribes to the `ActivatedRoute` observables (params,\n * queryParams, data) and sets the inputs of the component using `ComponentRef.setInput`.\n * Importantly, when an input does not have an item in the route data with a matching key, this\n * input is set to `undefined`. If it were not done this way, the previous information would be\n * retained if the data got removed from the route (i.e. if a query parameter is removed).\n *\n * The `RouterOutlet` should unregister itself when destroyed via `unsubscribeFromRouteData` so that\n * the subscriptions are cleaned up.\n */\nlet RoutedComponentInputBinder = /*#__PURE__*/(() => {\n class RoutedComponentInputBinder {\n constructor() {\n this.outletDataSubscriptions = new Map();\n }\n bindActivatedRouteToOutletComponent(outlet) {\n this.unsubscribeFromRouteData(outlet);\n this.subscribeToRouteData(outlet);\n }\n unsubscribeFromRouteData(outlet) {\n this.outletDataSubscriptions.get(outlet)?.unsubscribe();\n this.outletDataSubscriptions.delete(outlet);\n }\n subscribeToRouteData(outlet) {\n const {\n activatedRoute\n } = outlet;\n const dataSubscription = combineLatest([activatedRoute.queryParams, activatedRoute.params, activatedRoute.data]).pipe(switchMap(([queryParams, params, data], index) => {\n data = {\n ...queryParams,\n ...params,\n ...data\n };\n // Get the first result from the data subscription synchronously so it's available to\n // the component as soon as possible (and doesn't require a second change detection).\n if (index === 0) {\n return of(data);\n }\n // Promise.resolve is used to avoid synchronously writing the wrong data when\n // two of the Observables in the `combineLatest` stream emit one after\n // another.\n return Promise.resolve(data);\n })).subscribe(data => {\n // Outlet may have been deactivated or changed names to be associated with a different\n // route\n if (!outlet.isActivated || !outlet.activatedComponentRef || outlet.activatedRoute !== activatedRoute || activatedRoute.component === null) {\n this.unsubscribeFromRouteData(outlet);\n return;\n }\n const mirror = reflectComponentType(activatedRoute.component);\n if (!mirror) {\n this.unsubscribeFromRouteData(outlet);\n return;\n }\n for (const {\n templateName\n } of mirror.inputs) {\n outlet.activatedComponentRef.setInput(templateName, data[templateName]);\n }\n });\n this.outletDataSubscriptions.set(outlet, dataSubscription);\n }\n static {\n this.ɵfac = function RoutedComponentInputBinder_Factory(t) {\n return new (t || RoutedComponentInputBinder)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: RoutedComponentInputBinder,\n factory: RoutedComponentInputBinder.ɵfac\n });\n }\n }\n return RoutedComponentInputBinder;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction createRouterState(routeReuseStrategy, curr, prevState) {\n const root = createNode(routeReuseStrategy, curr._root, prevState ? prevState._root : undefined);\n return new RouterState(root, curr);\n}\nfunction createNode(routeReuseStrategy, curr, prevState) {\n // reuse an activated route that is currently displayed on the screen\n if (prevState && routeReuseStrategy.shouldReuseRoute(curr.value, prevState.value.snapshot)) {\n const value = prevState.value;\n value._futureSnapshot = curr.value;\n const children = createOrReuseChildren(routeReuseStrategy, curr, prevState);\n return new TreeNode(value, children);\n } else {\n if (routeReuseStrategy.shouldAttach(curr.value)) {\n // retrieve an activated route that is used to be displayed, but is not currently displayed\n const detachedRouteHandle = routeReuseStrategy.retrieve(curr.value);\n if (detachedRouteHandle !== null) {\n const tree = detachedRouteHandle.route;\n tree.value._futureSnapshot = curr.value;\n tree.children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return tree;\n }\n }\n const value = createActivatedRoute(curr.value);\n const children = curr.children.map(c => createNode(routeReuseStrategy, c));\n return new TreeNode(value, children);\n }\n}\nfunction createOrReuseChildren(routeReuseStrategy, curr, prevState) {\n return curr.children.map(child => {\n for (const p of prevState.children) {\n if (routeReuseStrategy.shouldReuseRoute(child.value, p.value.snapshot)) {\n return createNode(routeReuseStrategy, child, p);\n }\n }\n return createNode(routeReuseStrategy, child);\n });\n}\nfunction createActivatedRoute(c) {\n return new ActivatedRoute(new BehaviorSubject(c.url), new BehaviorSubject(c.params), new BehaviorSubject(c.queryParams), new BehaviorSubject(c.fragment), new BehaviorSubject(c.data), c.outlet, c.component, c);\n}\n\n/**\n * Can be returned by a `Router` guard to instruct the `Router` to redirect rather than continue\n * processing the path of the in-flight navigation. The `redirectTo` indicates _where_ the new\n * navigation should go to and the optional `navigationBehaviorOptions` can provide more information\n * about _how_ to perform the navigation.\n *\n * ```ts\n * const route: Route = {\n * path: \"user/:userId\",\n * component: User,\n * canActivate: [\n * () => {\n * const router = inject(Router);\n * const authService = inject(AuthenticationService);\n *\n * if (!authService.isLoggedIn()) {\n * const loginPath = router.parseUrl(\"/login\");\n * return new RedirectCommand(loginPath, {\n * skipLocationChange: \"true\",\n * });\n * }\n *\n * return true;\n * },\n * ],\n * };\n * ```\n * @see [Routing guide](guide/routing/common-router-tasks#preventing-unauthorized-access)\n *\n * @publicApi\n */\nclass RedirectCommand {\n constructor(redirectTo, navigationBehaviorOptions) {\n this.redirectTo = redirectTo;\n this.navigationBehaviorOptions = navigationBehaviorOptions;\n }\n}\nconst NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';\nfunction redirectingNavigationError(urlSerializer, redirect) {\n const {\n redirectTo,\n navigationBehaviorOptions\n } = isUrlTree(redirect) ? {\n redirectTo: redirect,\n navigationBehaviorOptions: undefined\n } : redirect;\n const error = navigationCancelingError(ngDevMode && `Redirecting to \"${urlSerializer.serialize(redirectTo)}\"`, NavigationCancellationCode.Redirect);\n error.url = redirectTo;\n error.navigationBehaviorOptions = navigationBehaviorOptions;\n return error;\n}\nfunction navigationCancelingError(message, code) {\n const error = new Error(`NavigationCancelingError: ${message || ''}`);\n error[NAVIGATION_CANCELING_ERROR] = true;\n error.cancellationCode = code;\n return error;\n}\nfunction isRedirectingNavigationCancelingError(error) {\n return isNavigationCancelingError(error) && isUrlTree(error.url);\n}\nfunction isNavigationCancelingError(error) {\n return !!error && error[NAVIGATION_CANCELING_ERROR];\n}\n\n/**\n * This component is used internally within the router to be a placeholder when an empty\n * router-outlet is needed. For example, with a config such as:\n *\n * `{path: 'parent', outlet: 'nav', children: [...]}`\n *\n * In order to render, there needs to be a component on this config, which will default\n * to this `EmptyOutletComponent`.\n */\nlet ɵEmptyOutletComponent = /*#__PURE__*/(() => {\n class ɵEmptyOutletComponent {\n static {\n this.ɵfac = function ɵEmptyOutletComponent_Factory(t) {\n return new (t || ɵEmptyOutletComponent)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ɵEmptyOutletComponent,\n selectors: [[\"ng-component\"]],\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n decls: 1,\n vars: 0,\n template: function _EmptyOutletComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"router-outlet\");\n }\n },\n dependencies: [RouterOutlet],\n encapsulation: 2\n });\n }\n }\n return ɵEmptyOutletComponent;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Creates an `EnvironmentInjector` if the `Route` has providers and one does not already exist\n * and returns the injector. Otherwise, if the `Route` does not have `providers`, returns the\n * `currentInjector`.\n *\n * @param route The route that might have providers\n * @param currentInjector The parent injector of the `Route`\n */\nfunction getOrCreateRouteInjectorIfNeeded(route, currentInjector) {\n if (route.providers && !route._injector) {\n route._injector = createEnvironmentInjector(route.providers, currentInjector, `Route: ${route.path}`);\n }\n return route._injector ?? currentInjector;\n}\nfunction getLoadedRoutes(route) {\n return route._loadedRoutes;\n}\nfunction getLoadedInjector(route) {\n return route._loadedInjector;\n}\nfunction getLoadedComponent(route) {\n return route._loadedComponent;\n}\nfunction getProvidersInjector(route) {\n return route._injector;\n}\nfunction validateConfig(config, parentPath = '', requireStandaloneComponents = false) {\n // forEach doesn't iterate undefined values\n for (let i = 0; i < config.length; i++) {\n const route = config[i];\n const fullPath = getFullPath(parentPath, route);\n validateNode(route, fullPath, requireStandaloneComponents);\n }\n}\nfunction assertStandalone(fullPath, component) {\n if (component && ɵisNgModule(component)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. You are using 'loadComponent' with a module, ` + `but it must be used with standalone components. Use 'loadChildren' instead.`);\n } else if (component && !isStandalone(component)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. The component must be standalone.`);\n }\n}\nfunction validateNode(route, fullPath, requireStandaloneComponents) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!route) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `\n Invalid configuration of route '${fullPath}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);\n }\n if (Array.isArray(route)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': Array cannot be specified`);\n }\n if (!route.redirectTo && !route.component && !route.loadComponent && !route.children && !route.loadChildren && route.outlet && route.outlet !== PRIMARY_OUTLET) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': a componentless route without children or loadChildren cannot have a named outlet set`);\n }\n if (route.redirectTo && route.children) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and children cannot be used together`);\n }\n if (route.redirectTo && route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and loadChildren cannot be used together`);\n }\n if (route.children && route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': children and loadChildren cannot be used together`);\n }\n if (route.redirectTo && (route.component || route.loadComponent)) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and component/loadComponent cannot be used together`);\n }\n if (route.component && route.loadComponent) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': component and loadComponent cannot be used together`);\n }\n if (route.redirectTo && route.canActivate) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': redirectTo and canActivate cannot be used together. Redirects happen before activation ` + `so canActivate will never be executed.`);\n }\n if (route.path && route.matcher) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path and matcher cannot be used together`);\n }\n if (route.redirectTo === void 0 && !route.component && !route.loadComponent && !route.children && !route.loadChildren) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}'. One of the following must be provided: component, loadComponent, redirectTo, children or loadChildren`);\n }\n if (route.path === void 0 && route.matcher === void 0) {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': routes must have either a path or a matcher specified`);\n }\n if (typeof route.path === 'string' && route.path.charAt(0) === '/') {\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '${fullPath}': path cannot start with a slash`);\n }\n if (route.path === '' && route.redirectTo !== void 0 && route.pathMatch === void 0) {\n const exp = `The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`;\n throw new ɵRuntimeError(4014 /* RuntimeErrorCode.INVALID_ROUTE_CONFIG */, `Invalid configuration of route '{path: \"${fullPath}\", redirectTo: \"${route.redirectTo}\"}': please provide 'pathMatch'. ${exp}`);\n }\n if (requireStandaloneComponents) {\n assertStandalone(fullPath, route.component);\n }\n }\n if (route.children) {\n validateConfig(route.children, fullPath, requireStandaloneComponents);\n }\n}\nfunction getFullPath(parentPath, currentRoute) {\n if (!currentRoute) {\n return parentPath;\n }\n if (!parentPath && !currentRoute.path) {\n return '';\n } else if (parentPath && !currentRoute.path) {\n return `${parentPath}/`;\n } else if (!parentPath && currentRoute.path) {\n return currentRoute.path;\n } else {\n return `${parentPath}/${currentRoute.path}`;\n }\n}\n/**\n * Makes a copy of the config and adds any default required properties.\n */\nfunction standardizeConfig(r) {\n const children = r.children && r.children.map(standardizeConfig);\n const c = children ? {\n ...r,\n children\n } : {\n ...r\n };\n if (!c.component && !c.loadComponent && (children || c.loadChildren) && c.outlet && c.outlet !== PRIMARY_OUTLET) {\n c.component = ɵEmptyOutletComponent;\n }\n return c;\n}\n/** Returns the `route.outlet` or PRIMARY_OUTLET if none exists. */\nfunction getOutlet(route) {\n return route.outlet || PRIMARY_OUTLET;\n}\n/**\n * Sorts the `routes` such that the ones with an outlet matching `outletName` come first.\n * The order of the configs is otherwise preserved.\n */\nfunction sortByMatchingOutlets(routes, outletName) {\n const sortedConfig = routes.filter(r => getOutlet(r) === outletName);\n sortedConfig.push(...routes.filter(r => getOutlet(r) !== outletName));\n return sortedConfig;\n}\n/**\n * Gets the first injector in the snapshot's parent tree.\n *\n * If the `Route` has a static list of providers, the returned injector will be the one created from\n * those. If it does not exist, the returned injector may come from the parents, which may be from a\n * loaded config or their static providers.\n *\n * Returns `null` if there is neither this nor any parents have a stored injector.\n *\n * Generally used for retrieving the injector to use for getting tokens for guards/resolvers and\n * also used for getting the correct injector to use for creating components.\n */\nfunction getClosestRouteInjector(snapshot) {\n if (!snapshot) return null;\n // If the current route has its own injector, which is created from the static providers on the\n // route itself, we should use that. Otherwise, we start at the parent since we do not want to\n // include the lazy loaded injector from this route.\n if (snapshot.routeConfig?._injector) {\n return snapshot.routeConfig._injector;\n }\n for (let s = snapshot.parent; s; s = s.parent) {\n const route = s.routeConfig;\n // Note that the order here is important. `_loadedInjector` stored on the route with\n // `loadChildren: () => NgModule` so it applies to child routes with priority. The `_injector`\n // is created from the static providers on that parent route, so it applies to the children as\n // well, but only if there is no lazy loaded NgModuleRef injector.\n if (route?._loadedInjector) return route._loadedInjector;\n if (route?._injector) return route._injector;\n }\n return null;\n}\nlet warnedAboutUnsupportedInputBinding = false;\nconst activateRoutes = (rootContexts, routeReuseStrategy, forwardEvent, inputBindingEnabled) => map(t => {\n new ActivateRoutes(routeReuseStrategy, t.targetRouterState, t.currentRouterState, forwardEvent, inputBindingEnabled).activate(rootContexts);\n return t;\n});\nclass ActivateRoutes {\n constructor(routeReuseStrategy, futureState, currState, forwardEvent, inputBindingEnabled) {\n this.routeReuseStrategy = routeReuseStrategy;\n this.futureState = futureState;\n this.currState = currState;\n this.forwardEvent = forwardEvent;\n this.inputBindingEnabled = inputBindingEnabled;\n }\n activate(parentContexts) {\n const futureRoot = this.futureState._root;\n const currRoot = this.currState ? this.currState._root : null;\n this.deactivateChildRoutes(futureRoot, currRoot, parentContexts);\n advanceActivatedRoute(this.futureState.root);\n this.activateChildRoutes(futureRoot, currRoot, parentContexts);\n }\n // De-activate the child route that are not re-used for the future state\n deactivateChildRoutes(futureNode, currNode, contexts) {\n const children = nodeChildrenAsMap(currNode);\n // Recurse on the routes active in the future state to de-activate deeper children\n futureNode.children.forEach(futureChild => {\n const childOutletName = futureChild.value.outlet;\n this.deactivateRoutes(futureChild, children[childOutletName], contexts);\n delete children[childOutletName];\n });\n // De-activate the routes that will not be re-used\n Object.values(children).forEach(v => {\n this.deactivateRouteAndItsChildren(v, contexts);\n });\n }\n deactivateRoutes(futureNode, currNode, parentContext) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n if (future === curr) {\n // Reusing the node, check to see if the children need to be de-activated\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContext.getContext(future.outlet);\n if (context) {\n this.deactivateChildRoutes(futureNode, currNode, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.deactivateChildRoutes(futureNode, currNode, parentContext);\n }\n } else {\n if (curr) {\n // Deactivate the current route which will not be re-used\n this.deactivateRouteAndItsChildren(currNode, parentContext);\n }\n }\n }\n deactivateRouteAndItsChildren(route, parentContexts) {\n // If there is no component, the Route is never attached to an outlet (because there is no\n // component to attach).\n if (route.value.component && this.routeReuseStrategy.shouldDetach(route.value.snapshot)) {\n this.detachAndStoreRouteSubtree(route, parentContexts);\n } else {\n this.deactivateRouteAndOutlet(route, parentContexts);\n }\n }\n detachAndStoreRouteSubtree(route, parentContexts) {\n const context = parentContexts.getContext(route.value.outlet);\n const contexts = context && route.value.component ? context.children : parentContexts;\n const children = nodeChildrenAsMap(route);\n for (const treeNode of Object.values(children)) {\n this.deactivateRouteAndItsChildren(treeNode, contexts);\n }\n if (context && context.outlet) {\n const componentRef = context.outlet.detach();\n const contexts = context.children.onOutletDeactivated();\n this.routeReuseStrategy.store(route.value.snapshot, {\n componentRef,\n route,\n contexts\n });\n }\n }\n deactivateRouteAndOutlet(route, parentContexts) {\n const context = parentContexts.getContext(route.value.outlet);\n // The context could be `null` if we are on a componentless route but there may still be\n // children that need deactivating.\n const contexts = context && route.value.component ? context.children : parentContexts;\n const children = nodeChildrenAsMap(route);\n for (const treeNode of Object.values(children)) {\n this.deactivateRouteAndItsChildren(treeNode, contexts);\n }\n if (context) {\n if (context.outlet) {\n // Destroy the component\n context.outlet.deactivate();\n // Destroy the contexts for all the outlets that were in the component\n context.children.onOutletDeactivated();\n }\n // Clear the information about the attached component on the context but keep the reference to\n // the outlet. Clear even if outlet was not yet activated to avoid activating later with old\n // info\n context.attachRef = null;\n context.route = null;\n }\n }\n activateChildRoutes(futureNode, currNode, contexts) {\n const children = nodeChildrenAsMap(currNode);\n futureNode.children.forEach(c => {\n this.activateRoutes(c, children[c.value.outlet], contexts);\n this.forwardEvent(new ActivationEnd(c.value.snapshot));\n });\n if (futureNode.children.length) {\n this.forwardEvent(new ChildActivationEnd(futureNode.value.snapshot));\n }\n }\n activateRoutes(futureNode, currNode, parentContexts) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n advanceActivatedRoute(future);\n // reusing the node\n if (future === curr) {\n if (future.component) {\n // If we have a normal route, we need to go through an outlet.\n const context = parentContexts.getOrCreateContext(future.outlet);\n this.activateChildRoutes(futureNode, currNode, context.children);\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, currNode, parentContexts);\n }\n } else {\n if (future.component) {\n // if we have a normal route, we need to place the component into the outlet and recurse.\n const context = parentContexts.getOrCreateContext(future.outlet);\n if (this.routeReuseStrategy.shouldAttach(future.snapshot)) {\n const stored = this.routeReuseStrategy.retrieve(future.snapshot);\n this.routeReuseStrategy.store(future.snapshot, null);\n context.children.onOutletReAttached(stored.contexts);\n context.attachRef = stored.componentRef;\n context.route = stored.route.value;\n if (context.outlet) {\n // Attach right away when the outlet has already been instantiated\n // Otherwise attach from `RouterOutlet.ngOnInit` when it is instantiated\n context.outlet.attach(stored.componentRef, stored.route.value);\n }\n advanceActivatedRoute(stored.route.value);\n this.activateChildRoutes(futureNode, null, context.children);\n } else {\n const injector = getClosestRouteInjector(future.snapshot);\n context.attachRef = null;\n context.route = future;\n context.injector = injector ?? context.injector;\n if (context.outlet) {\n // Activate the outlet when it has already been instantiated\n // Otherwise it will get activated from its `ngOnInit` when instantiated\n context.outlet.activateWith(future, context.injector);\n }\n this.activateChildRoutes(futureNode, null, context.children);\n }\n } else {\n // if we have a componentless route, we recurse but keep the same outlet map.\n this.activateChildRoutes(futureNode, null, parentContexts);\n }\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const context = parentContexts.getOrCreateContext(future.outlet);\n const outlet = context.outlet;\n if (outlet && this.inputBindingEnabled && !outlet.supportsBindingToComponentInputs && !warnedAboutUnsupportedInputBinding) {\n console.warn(`'withComponentInputBinding' feature is enabled but ` + `this application is using an outlet that may not support binding to component inputs.`);\n warnedAboutUnsupportedInputBinding = true;\n }\n }\n }\n}\nclass CanActivate {\n constructor(path) {\n this.path = path;\n this.route = this.path[this.path.length - 1];\n }\n}\nclass CanDeactivate {\n constructor(component, route) {\n this.component = component;\n this.route = route;\n }\n}\nfunction getAllRouteGuards(future, curr, parentContexts) {\n const futureRoot = future._root;\n const currRoot = curr ? curr._root : null;\n return getChildRouteGuards(futureRoot, currRoot, parentContexts, [futureRoot.value]);\n}\nfunction getCanActivateChild(p) {\n const canActivateChild = p.routeConfig ? p.routeConfig.canActivateChild : null;\n if (!canActivateChild || canActivateChild.length === 0) return null;\n return {\n node: p,\n guards: canActivateChild\n };\n}\nfunction getTokenOrFunctionIdentity(tokenOrFunction, injector) {\n const NOT_FOUND = Symbol();\n const result = injector.get(tokenOrFunction, NOT_FOUND);\n if (result === NOT_FOUND) {\n if (typeof tokenOrFunction === 'function' && !ɵisInjectable(tokenOrFunction)) {\n // We think the token is just a function so return it as-is\n return tokenOrFunction;\n } else {\n // This will throw the not found error\n return injector.get(tokenOrFunction);\n }\n }\n return result;\n}\nfunction getChildRouteGuards(futureNode, currNode, contexts, futurePath, checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n}) {\n const prevChildren = nodeChildrenAsMap(currNode);\n // Process the children of the future route\n futureNode.children.forEach(c => {\n getRouteGuards(c, prevChildren[c.value.outlet], contexts, futurePath.concat([c.value]), checks);\n delete prevChildren[c.value.outlet];\n });\n // Process any children left from the current route (not active for the future route)\n Object.entries(prevChildren).forEach(([k, v]) => deactivateRouteAndItsChildren(v, contexts.getContext(k), checks));\n return checks;\n}\nfunction getRouteGuards(futureNode, currNode, parentContexts, futurePath, checks = {\n canDeactivateChecks: [],\n canActivateChecks: []\n}) {\n const future = futureNode.value;\n const curr = currNode ? currNode.value : null;\n const context = parentContexts ? parentContexts.getContext(futureNode.value.outlet) : null;\n // reusing the node\n if (curr && future.routeConfig === curr.routeConfig) {\n const shouldRun = shouldRunGuardsAndResolvers(curr, future, future.routeConfig.runGuardsAndResolvers);\n if (shouldRun) {\n checks.canActivateChecks.push(new CanActivate(futurePath));\n } else {\n // we need to set the data\n future.data = curr.data;\n future._resolvedData = curr._resolvedData;\n }\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, currNode, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, currNode, parentContexts, futurePath, checks);\n }\n if (shouldRun && context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, curr));\n }\n } else {\n if (curr) {\n deactivateRouteAndItsChildren(currNode, context, checks);\n }\n checks.canActivateChecks.push(new CanActivate(futurePath));\n // If we have a component, we need to go through an outlet.\n if (future.component) {\n getChildRouteGuards(futureNode, null, context ? context.children : null, futurePath, checks);\n // if we have a componentless route, we recurse but keep the same outlet map.\n } else {\n getChildRouteGuards(futureNode, null, parentContexts, futurePath, checks);\n }\n }\n return checks;\n}\nfunction shouldRunGuardsAndResolvers(curr, future, mode) {\n if (typeof mode === 'function') {\n return mode(curr, future);\n }\n switch (mode) {\n case 'pathParamsChange':\n return !equalPath(curr.url, future.url);\n case 'pathParamsOrQueryParamsChange':\n return !equalPath(curr.url, future.url) || !shallowEqual(curr.queryParams, future.queryParams);\n case 'always':\n return true;\n case 'paramsOrQueryParamsChange':\n return !equalParamsAndUrlSegments(curr, future) || !shallowEqual(curr.queryParams, future.queryParams);\n case 'paramsChange':\n default:\n return !equalParamsAndUrlSegments(curr, future);\n }\n}\nfunction deactivateRouteAndItsChildren(route, context, checks) {\n const children = nodeChildrenAsMap(route);\n const r = route.value;\n Object.entries(children).forEach(([childName, node]) => {\n if (!r.component) {\n deactivateRouteAndItsChildren(node, context, checks);\n } else if (context) {\n deactivateRouteAndItsChildren(node, context.children.getContext(childName), checks);\n } else {\n deactivateRouteAndItsChildren(node, null, checks);\n }\n });\n if (!r.component) {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n } else if (context && context.outlet && context.outlet.isActivated) {\n checks.canDeactivateChecks.push(new CanDeactivate(context.outlet.component, r));\n } else {\n checks.canDeactivateChecks.push(new CanDeactivate(null, r));\n }\n}\n\n/**\n * Simple function check, but generic so type inference will flow. Example:\n *\n * function product(a: number, b: number) {\n * return a * b;\n * }\n *\n * if (isFunction(fn)) {\n * return fn(1, 2);\n * } else {\n * throw \"Must provide the `product` function\";\n * }\n */\nfunction isFunction(v) {\n return typeof v === 'function';\n}\nfunction isBoolean(v) {\n return typeof v === 'boolean';\n}\nfunction isCanLoad(guard) {\n return guard && isFunction(guard.canLoad);\n}\nfunction isCanActivate(guard) {\n return guard && isFunction(guard.canActivate);\n}\nfunction isCanActivateChild(guard) {\n return guard && isFunction(guard.canActivateChild);\n}\nfunction isCanDeactivate(guard) {\n return guard && isFunction(guard.canDeactivate);\n}\nfunction isCanMatch(guard) {\n return guard && isFunction(guard.canMatch);\n}\nfunction isEmptyError(e) {\n return e instanceof EmptyError || e?.name === 'EmptyError';\n}\nconst INITIAL_VALUE = /* @__PURE__ */Symbol('INITIAL_VALUE');\nfunction prioritizedGuardValue() {\n return switchMap(obs => {\n return combineLatest(obs.map(o => o.pipe(take(1), startWith(INITIAL_VALUE)))).pipe(map(results => {\n for (const result of results) {\n if (result === true) {\n // If result is true, check the next one\n continue;\n } else if (result === INITIAL_VALUE) {\n // If guard has not finished, we need to stop processing.\n return INITIAL_VALUE;\n } else if (result === false || isRedirect(result)) {\n // Result finished and was not true. Return the result.\n // Note that we only allow false/UrlTree/RedirectCommand. Other values are considered invalid and\n // ignored.\n return result;\n }\n }\n // Everything resolved to true. Return true.\n return true;\n }), filter(item => item !== INITIAL_VALUE), take(1));\n });\n}\nfunction isRedirect(val) {\n return isUrlTree(val) || val instanceof RedirectCommand;\n}\nfunction checkGuards(injector, forwardEvent) {\n return mergeMap(t => {\n const {\n targetSnapshot,\n currentSnapshot,\n guards: {\n canActivateChecks,\n canDeactivateChecks\n }\n } = t;\n if (canDeactivateChecks.length === 0 && canActivateChecks.length === 0) {\n return of({\n ...t,\n guardsResult: true\n });\n }\n return runCanDeactivateChecks(canDeactivateChecks, targetSnapshot, currentSnapshot, injector).pipe(mergeMap(canDeactivate => {\n return canDeactivate && isBoolean(canDeactivate) ? runCanActivateChecks(targetSnapshot, canActivateChecks, injector, forwardEvent) : of(canDeactivate);\n }), map(guardsResult => ({\n ...t,\n guardsResult\n })));\n });\n}\nfunction runCanDeactivateChecks(checks, futureRSS, currRSS, injector) {\n return from(checks).pipe(mergeMap(check => runCanDeactivate(check.component, check.route, currRSS, futureRSS, injector)), first(result => {\n return result !== true;\n }, true));\n}\nfunction runCanActivateChecks(futureSnapshot, checks, injector, forwardEvent) {\n return from(checks).pipe(concatMap(check => {\n return concat(fireChildActivationStart(check.route.parent, forwardEvent), fireActivationStart(check.route, forwardEvent), runCanActivateChild(futureSnapshot, check.path, injector), runCanActivate(futureSnapshot, check.route, injector));\n }), first(result => {\n return result !== true;\n }, true));\n}\n/**\n * This should fire off `ActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ActivationStart(snapshot));\n }\n return of(true);\n}\n/**\n * This should fire off `ChildActivationStart` events for each route being activated at this\n * level.\n * In other words, if you're activating `a` and `b` below, `path` will contain the\n * `ActivatedRouteSnapshot`s for both and we will fire `ChildActivationStart` for both. Always\n * return\n * `true` so checks continue to run.\n */\nfunction fireChildActivationStart(snapshot, forwardEvent) {\n if (snapshot !== null && forwardEvent) {\n forwardEvent(new ChildActivationStart(snapshot));\n }\n return of(true);\n}\nfunction runCanActivate(futureRSS, futureARS, injector) {\n const canActivate = futureARS.routeConfig ? futureARS.routeConfig.canActivate : null;\n if (!canActivate || canActivate.length === 0) return of(true);\n const canActivateObservables = canActivate.map(canActivate => {\n return defer(() => {\n const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n const guard = getTokenOrFunctionIdentity(canActivate, closestInjector);\n const guardVal = isCanActivate(guard) ? guard.canActivate(futureARS, futureRSS) : runInInjectionContext(closestInjector, () => guard(futureARS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n });\n return of(canActivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanActivateChild(futureRSS, path, injector) {\n const futureARS = path[path.length - 1];\n const canActivateChildGuards = path.slice(0, path.length - 1).reverse().map(p => getCanActivateChild(p)).filter(_ => _ !== null);\n const canActivateChildGuardsMapped = canActivateChildGuards.map(d => {\n return defer(() => {\n const guardsMapped = d.guards.map(canActivateChild => {\n const closestInjector = getClosestRouteInjector(d.node) ?? injector;\n const guard = getTokenOrFunctionIdentity(canActivateChild, closestInjector);\n const guardVal = isCanActivateChild(guard) ? guard.canActivateChild(futureARS, futureRSS) : runInInjectionContext(closestInjector, () => guard(futureARS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n return of(guardsMapped).pipe(prioritizedGuardValue());\n });\n });\n return of(canActivateChildGuardsMapped).pipe(prioritizedGuardValue());\n}\nfunction runCanDeactivate(component, currARS, currRSS, futureRSS, injector) {\n const canDeactivate = currARS && currARS.routeConfig ? currARS.routeConfig.canDeactivate : null;\n if (!canDeactivate || canDeactivate.length === 0) return of(true);\n const canDeactivateObservables = canDeactivate.map(c => {\n const closestInjector = getClosestRouteInjector(currARS) ?? injector;\n const guard = getTokenOrFunctionIdentity(c, closestInjector);\n const guardVal = isCanDeactivate(guard) ? guard.canDeactivate(component, currARS, currRSS, futureRSS) : runInInjectionContext(closestInjector, () => guard(component, currARS, currRSS, futureRSS));\n return wrapIntoObservable(guardVal).pipe(first());\n });\n return of(canDeactivateObservables).pipe(prioritizedGuardValue());\n}\nfunction runCanLoadGuards(injector, route, segments, urlSerializer) {\n const canLoad = route.canLoad;\n if (canLoad === undefined || canLoad.length === 0) {\n return of(true);\n }\n const canLoadObservables = canLoad.map(injectionToken => {\n const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n const guardVal = isCanLoad(guard) ? guard.canLoad(route, segments) : runInInjectionContext(injector, () => guard(route, segments));\n return wrapIntoObservable(guardVal);\n });\n return of(canLoadObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\nfunction redirectIfUrlTree(urlSerializer) {\n return pipe(tap(result => {\n if (typeof result === 'boolean') return;\n throw redirectingNavigationError(urlSerializer, result);\n }), map(result => result === true));\n}\nfunction runCanMatchGuards(injector, route, segments, urlSerializer) {\n const canMatch = route.canMatch;\n if (!canMatch || canMatch.length === 0) return of(true);\n const canMatchObservables = canMatch.map(injectionToken => {\n const guard = getTokenOrFunctionIdentity(injectionToken, injector);\n const guardVal = isCanMatch(guard) ? guard.canMatch(route, segments) : runInInjectionContext(injector, () => guard(route, segments));\n return wrapIntoObservable(guardVal);\n });\n return of(canMatchObservables).pipe(prioritizedGuardValue(), redirectIfUrlTree(urlSerializer));\n}\nclass NoMatch {\n constructor(segmentGroup) {\n this.segmentGroup = segmentGroup || null;\n }\n}\nclass AbsoluteRedirect extends Error {\n constructor(urlTree) {\n super();\n this.urlTree = urlTree;\n }\n}\nfunction noMatch$1(segmentGroup) {\n return throwError(new NoMatch(segmentGroup));\n}\nfunction absoluteRedirect(newTree) {\n return throwError(new AbsoluteRedirect(newTree));\n}\nfunction namedOutletsRedirect(redirectTo) {\n return throwError(new ɵRuntimeError(4000 /* RuntimeErrorCode.NAMED_OUTLET_REDIRECT */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Only absolute redirects can have named outlets. redirectTo: '${redirectTo}'`));\n}\nfunction canLoadFails(route) {\n return throwError(navigationCancelingError((typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot load children because the guard of the route \"path: '${route.path}'\" returned false`, NavigationCancellationCode.GuardRejected));\n}\nclass ApplyRedirects {\n constructor(urlSerializer, urlTree) {\n this.urlSerializer = urlSerializer;\n this.urlTree = urlTree;\n }\n lineralizeSegments(route, urlTree) {\n let res = [];\n let c = urlTree.root;\n while (true) {\n res = res.concat(c.segments);\n if (c.numberOfChildren === 0) {\n return of(res);\n }\n if (c.numberOfChildren > 1 || !c.children[PRIMARY_OUTLET]) {\n return namedOutletsRedirect(`${route.redirectTo}`);\n }\n c = c.children[PRIMARY_OUTLET];\n }\n }\n applyRedirectCommands(segments, redirectTo, posParams, currentSnapshot, injector) {\n if (typeof redirectTo !== 'string') {\n const redirectToFn = redirectTo;\n const {\n queryParams,\n fragment,\n routeConfig,\n url,\n outlet,\n params,\n data,\n title\n } = currentSnapshot;\n const newRedirect = runInInjectionContext(injector, () => redirectToFn({\n params,\n data,\n queryParams,\n fragment,\n routeConfig,\n url,\n outlet,\n title\n }));\n if (newRedirect instanceof UrlTree) {\n throw new AbsoluteRedirect(newRedirect);\n }\n redirectTo = newRedirect;\n }\n const newTree = this.applyRedirectCreateUrlTree(redirectTo, this.urlSerializer.parse(redirectTo), segments, posParams);\n if (redirectTo[0] === '/') {\n throw new AbsoluteRedirect(newTree);\n }\n return newTree;\n }\n applyRedirectCreateUrlTree(redirectTo, urlTree, segments, posParams) {\n const newRoot = this.createSegmentGroup(redirectTo, urlTree.root, segments, posParams);\n return new UrlTree(newRoot, this.createQueryParams(urlTree.queryParams, this.urlTree.queryParams), urlTree.fragment);\n }\n createQueryParams(redirectToParams, actualParams) {\n const res = {};\n Object.entries(redirectToParams).forEach(([k, v]) => {\n const copySourceValue = typeof v === 'string' && v[0] === ':';\n if (copySourceValue) {\n const sourceName = v.substring(1);\n res[k] = actualParams[sourceName];\n } else {\n res[k] = v;\n }\n });\n return res;\n }\n createSegmentGroup(redirectTo, group, segments, posParams) {\n const updatedSegments = this.createSegments(redirectTo, group.segments, segments, posParams);\n let children = {};\n Object.entries(group.children).forEach(([name, child]) => {\n children[name] = this.createSegmentGroup(redirectTo, child, segments, posParams);\n });\n return new UrlSegmentGroup(updatedSegments, children);\n }\n createSegments(redirectTo, redirectToSegments, actualSegments, posParams) {\n return redirectToSegments.map(s => s.path[0] === ':' ? this.findPosParam(redirectTo, s, posParams) : this.findOrReturn(s, actualSegments));\n }\n findPosParam(redirectTo, redirectToUrlSegment, posParams) {\n const pos = posParams[redirectToUrlSegment.path.substring(1)];\n if (!pos) throw new ɵRuntimeError(4001 /* RuntimeErrorCode.MISSING_REDIRECT */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Cannot redirect to '${redirectTo}'. Cannot find '${redirectToUrlSegment.path}'.`);\n return pos;\n }\n findOrReturn(redirectToUrlSegment, actualSegments) {\n let idx = 0;\n for (const s of actualSegments) {\n if (s.path === redirectToUrlSegment.path) {\n actualSegments.splice(idx);\n return s;\n }\n idx++;\n }\n return redirectToUrlSegment;\n }\n}\nconst noMatch = {\n matched: false,\n consumedSegments: [],\n remainingSegments: [],\n parameters: {},\n positionalParamSegments: {}\n};\nfunction matchWithChecks(segmentGroup, route, segments, injector, urlSerializer) {\n const result = match(segmentGroup, route, segments);\n if (!result.matched) {\n return of(result);\n }\n // Only create the Route's `EnvironmentInjector` if it matches the attempted\n // navigation\n injector = getOrCreateRouteInjectorIfNeeded(route, injector);\n return runCanMatchGuards(injector, route, segments, urlSerializer).pipe(map(v => v === true ? result : {\n ...noMatch\n }));\n}\nfunction match(segmentGroup, route, segments) {\n if (route.path === '**') {\n return createWildcardMatchResult(segments);\n }\n if (route.path === '') {\n if (route.pathMatch === 'full' && (segmentGroup.hasChildren() || segments.length > 0)) {\n return {\n ...noMatch\n };\n }\n return {\n matched: true,\n consumedSegments: [],\n remainingSegments: segments,\n parameters: {},\n positionalParamSegments: {}\n };\n }\n const matcher = route.matcher || defaultUrlMatcher;\n const res = matcher(segments, segmentGroup, route);\n if (!res) return {\n ...noMatch\n };\n const posParams = {};\n Object.entries(res.posParams ?? {}).forEach(([k, v]) => {\n posParams[k] = v.path;\n });\n const parameters = res.consumed.length > 0 ? {\n ...posParams,\n ...res.consumed[res.consumed.length - 1].parameters\n } : posParams;\n return {\n matched: true,\n consumedSegments: res.consumed,\n remainingSegments: segments.slice(res.consumed.length),\n // TODO(atscott): investigate combining parameters and positionalParamSegments\n parameters,\n positionalParamSegments: res.posParams ?? {}\n };\n}\nfunction createWildcardMatchResult(segments) {\n return {\n matched: true,\n parameters: segments.length > 0 ? last(segments).parameters : {},\n consumedSegments: segments,\n remainingSegments: [],\n positionalParamSegments: {}\n };\n}\nfunction split(segmentGroup, consumedSegments, slicedSegments, config) {\n if (slicedSegments.length > 0 && containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(consumedSegments, createChildrenForEmptyPaths(config, new UrlSegmentGroup(slicedSegments, segmentGroup.children)));\n return {\n segmentGroup: s,\n slicedSegments: []\n };\n }\n if (slicedSegments.length === 0 && containsEmptyPathMatches(segmentGroup, slicedSegments, config)) {\n const s = new UrlSegmentGroup(segmentGroup.segments, addEmptyPathsToChildrenIfNeeded(segmentGroup, slicedSegments, config, segmentGroup.children));\n return {\n segmentGroup: s,\n slicedSegments\n };\n }\n const s = new UrlSegmentGroup(segmentGroup.segments, segmentGroup.children);\n return {\n segmentGroup: s,\n slicedSegments\n };\n}\nfunction addEmptyPathsToChildrenIfNeeded(segmentGroup, slicedSegments, routes, children) {\n const res = {};\n for (const r of routes) {\n if (emptyPathMatch(segmentGroup, slicedSegments, r) && !children[getOutlet(r)]) {\n const s = new UrlSegmentGroup([], {});\n res[getOutlet(r)] = s;\n }\n }\n return {\n ...children,\n ...res\n };\n}\nfunction createChildrenForEmptyPaths(routes, primarySegment) {\n const res = {};\n res[PRIMARY_OUTLET] = primarySegment;\n for (const r of routes) {\n if (r.path === '' && getOutlet(r) !== PRIMARY_OUTLET) {\n const s = new UrlSegmentGroup([], {});\n res[getOutlet(r)] = s;\n }\n }\n return res;\n}\nfunction containsEmptyPathMatchesWithNamedOutlets(segmentGroup, slicedSegments, routes) {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r) && getOutlet(r) !== PRIMARY_OUTLET);\n}\nfunction containsEmptyPathMatches(segmentGroup, slicedSegments, routes) {\n return routes.some(r => emptyPathMatch(segmentGroup, slicedSegments, r));\n}\nfunction emptyPathMatch(segmentGroup, slicedSegments, r) {\n if ((segmentGroup.hasChildren() || slicedSegments.length > 0) && r.pathMatch === 'full') {\n return false;\n }\n return r.path === '';\n}\n/**\n * Determines if `route` is a path match for the `rawSegment`, `segments`, and `outlet` without\n * verifying that its children are a full match for the remainder of the `rawSegment` children as\n * well.\n */\nfunction isImmediateMatch(route, rawSegment, segments, outlet) {\n // We allow matches to empty paths when the outlets differ so we can match a url like `/(b:b)` to\n // a config like\n // * `{path: '', children: [{path: 'b', outlet: 'b'}]}`\n // or even\n // * `{path: '', outlet: 'a', children: [{path: 'b', outlet: 'b'}]`\n //\n // The exception here is when the segment outlet is for the primary outlet. This would\n // result in a match inside the named outlet because all children there are written as primary\n // outlets. So we need to prevent child named outlet matches in a url like `/b` in a config like\n // * `{path: '', outlet: 'x' children: [{path: 'b'}]}`\n // This should only match if the url is `/(x:b)`.\n if (getOutlet(route) !== outlet && (outlet === PRIMARY_OUTLET || !emptyPathMatch(rawSegment, segments, route))) {\n return false;\n }\n return match(rawSegment, route, segments).matched;\n}\nfunction noLeftoversInUrl(segmentGroup, segments, outlet) {\n return segments.length === 0 && !segmentGroup.children[outlet];\n}\n\n/**\n * Class used to indicate there were no additional route config matches but that all segments of\n * the URL were consumed during matching so the route was URL matched. When this happens, we still\n * try to match child configs in case there are empty path children.\n */\nclass NoLeftoversInUrl {}\nfunction recognize$1(injector, configLoader, rootComponentType, config, urlTree, urlSerializer, paramsInheritanceStrategy = 'emptyOnly') {\n return new Recognizer(injector, configLoader, rootComponentType, config, urlTree, paramsInheritanceStrategy, urlSerializer).recognize();\n}\nconst MAX_ALLOWED_REDIRECTS = 31;\nclass Recognizer {\n constructor(injector, configLoader, rootComponentType, config, urlTree, paramsInheritanceStrategy, urlSerializer) {\n this.injector = injector;\n this.configLoader = configLoader;\n this.rootComponentType = rootComponentType;\n this.config = config;\n this.urlTree = urlTree;\n this.paramsInheritanceStrategy = paramsInheritanceStrategy;\n this.urlSerializer = urlSerializer;\n this.applyRedirects = new ApplyRedirects(this.urlSerializer, this.urlTree);\n this.absoluteRedirectCount = 0;\n this.allowRedirects = true;\n }\n noMatchError(e) {\n return new ɵRuntimeError(4002 /* RuntimeErrorCode.NO_MATCH */, typeof ngDevMode === 'undefined' || ngDevMode ? `Cannot match any routes. URL Segment: '${e.segmentGroup}'` : `'${e.segmentGroup}'`);\n }\n recognize() {\n const rootSegmentGroup = split(this.urlTree.root, [], [], this.config).segmentGroup;\n return this.match(rootSegmentGroup).pipe(map(({\n children,\n rootSnapshot\n }) => {\n const rootNode = new TreeNode(rootSnapshot, children);\n const routeState = new RouterStateSnapshot('', rootNode);\n const tree = createUrlTreeFromSnapshot(rootSnapshot, [], this.urlTree.queryParams, this.urlTree.fragment);\n // https://github.com/angular/angular/issues/47307\n // Creating the tree stringifies the query params\n // We don't want to do this here so reassign them to the original.\n tree.queryParams = this.urlTree.queryParams;\n routeState.url = this.urlSerializer.serialize(tree);\n return {\n state: routeState,\n tree\n };\n }));\n }\n match(rootSegmentGroup) {\n // Use Object.freeze to prevent readers of the Router state from modifying it outside\n // of a navigation, resulting in the router being out of sync with the browser.\n const rootSnapshot = new ActivatedRouteSnapshot([], Object.freeze({}), Object.freeze({\n ...this.urlTree.queryParams\n }), this.urlTree.fragment, Object.freeze({}), PRIMARY_OUTLET, this.rootComponentType, null, {});\n return this.processSegmentGroup(this.injector, this.config, rootSegmentGroup, PRIMARY_OUTLET, rootSnapshot).pipe(map(children => {\n return {\n children,\n rootSnapshot\n };\n }), catchError(e => {\n if (e instanceof AbsoluteRedirect) {\n this.urlTree = e.urlTree;\n return this.match(e.urlTree.root);\n }\n if (e instanceof NoMatch) {\n throw this.noMatchError(e);\n }\n throw e;\n }));\n }\n processSegmentGroup(injector, config, segmentGroup, outlet, parentRoute) {\n if (segmentGroup.segments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(injector, config, segmentGroup, parentRoute);\n }\n return this.processSegment(injector, config, segmentGroup, segmentGroup.segments, outlet, true, parentRoute).pipe(map(child => child instanceof TreeNode ? [child] : []));\n }\n /**\n * Matches every child outlet in the `segmentGroup` to a `Route` in the config. Returns `null` if\n * we cannot find a match for _any_ of the children.\n *\n * @param config - The `Routes` to match against\n * @param segmentGroup - The `UrlSegmentGroup` whose children need to be matched against the\n * config.\n */\n processChildren(injector, config, segmentGroup, parentRoute) {\n // Expand outlets one at a time, starting with the primary outlet. We need to do it this way\n // because an absolute redirect from the primary outlet takes precedence.\n const childOutlets = [];\n for (const child of Object.keys(segmentGroup.children)) {\n if (child === 'primary') {\n childOutlets.unshift(child);\n } else {\n childOutlets.push(child);\n }\n }\n return from(childOutlets).pipe(concatMap(childOutlet => {\n const child = segmentGroup.children[childOutlet];\n // Sort the config so that routes with outlets that match the one being activated\n // appear first, followed by routes for other outlets, which might match if they have\n // an empty path.\n const sortedConfig = sortByMatchingOutlets(config, childOutlet);\n return this.processSegmentGroup(injector, sortedConfig, child, childOutlet, parentRoute);\n }), scan((children, outletChildren) => {\n children.push(...outletChildren);\n return children;\n }), defaultIfEmpty(null), last$1(), mergeMap(children => {\n if (children === null) return noMatch$1(segmentGroup);\n // Because we may have matched two outlets to the same empty path segment, we can have\n // multiple activated results for the same outlet. We should merge the children of\n // these results so the final return value is only one `TreeNode` per outlet.\n const mergedChildren = mergeEmptyPathMatches(children);\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // This should really never happen - we are only taking the first match for each\n // outlet and merge the empty path matches.\n checkOutletNameUniqueness(mergedChildren);\n }\n sortActivatedRouteSnapshots(mergedChildren);\n return of(mergedChildren);\n }));\n }\n processSegment(injector, routes, segmentGroup, segments, outlet, allowRedirects, parentRoute) {\n return from(routes).pipe(concatMap(r => {\n return this.processSegmentAgainstRoute(r._injector ?? injector, routes, r, segmentGroup, segments, outlet, allowRedirects, parentRoute).pipe(catchError(e => {\n if (e instanceof NoMatch) {\n return of(null);\n }\n throw e;\n }));\n }), first(x => !!x), catchError(e => {\n if (isEmptyError(e)) {\n if (noLeftoversInUrl(segmentGroup, segments, outlet)) {\n return of(new NoLeftoversInUrl());\n }\n return noMatch$1(segmentGroup);\n }\n throw e;\n }));\n }\n processSegmentAgainstRoute(injector, routes, route, rawSegment, segments, outlet, allowRedirects, parentRoute) {\n if (!isImmediateMatch(route, rawSegment, segments, outlet)) return noMatch$1(rawSegment);\n if (route.redirectTo === undefined) {\n return this.matchSegmentAgainstRoute(injector, rawSegment, route, segments, outlet, parentRoute);\n }\n if (this.allowRedirects && allowRedirects) {\n return this.expandSegmentAgainstRouteUsingRedirect(injector, rawSegment, routes, route, segments, outlet, parentRoute);\n }\n return noMatch$1(rawSegment);\n }\n expandSegmentAgainstRouteUsingRedirect(injector, segmentGroup, routes, route, segments, outlet, parentRoute) {\n const {\n matched,\n parameters,\n consumedSegments,\n positionalParamSegments,\n remainingSegments\n } = match(segmentGroup, route, segments);\n if (!matched) return noMatch$1(segmentGroup);\n // TODO(atscott): Move all of this under an if(ngDevMode) as a breaking change and allow stack\n // size exceeded in production\n if (typeof route.redirectTo === 'string' && route.redirectTo[0] === '/') {\n this.absoluteRedirectCount++;\n if (this.absoluteRedirectCount > MAX_ALLOWED_REDIRECTS) {\n if (ngDevMode) {\n throw new ɵRuntimeError(4016 /* RuntimeErrorCode.INFINITE_REDIRECT */, `Detected possible infinite redirect when redirecting from '${this.urlTree}' to '${route.redirectTo}'.\\n` + `This is currently a dev mode only error but will become a` + ` call stack size exceeded error in production in a future major version.`);\n }\n this.allowRedirects = false;\n }\n }\n const currentSnapshot = new ActivatedRouteSnapshot(segments, parameters, Object.freeze({\n ...this.urlTree.queryParams\n }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getResolve(route));\n const inherited = getInherited(currentSnapshot, parentRoute, this.paramsInheritanceStrategy);\n currentSnapshot.params = Object.freeze(inherited.params);\n currentSnapshot.data = Object.freeze(inherited.data);\n const newTree = this.applyRedirects.applyRedirectCommands(consumedSegments, route.redirectTo, positionalParamSegments, currentSnapshot, injector);\n return this.applyRedirects.lineralizeSegments(route, newTree).pipe(mergeMap(newSegments => {\n return this.processSegment(injector, routes, segmentGroup, newSegments.concat(remainingSegments), outlet, false, parentRoute);\n }));\n }\n matchSegmentAgainstRoute(injector, rawSegment, route, segments, outlet, parentRoute) {\n const matchResult = matchWithChecks(rawSegment, route, segments, injector, this.urlSerializer);\n if (route.path === '**') {\n // Prior versions of the route matching algorithm would stop matching at the wildcard route.\n // We should investigate a better strategy for any existing children. Otherwise, these\n // child segments are silently dropped from the navigation.\n // https://github.com/angular/angular/issues/40089\n rawSegment.children = {};\n }\n return matchResult.pipe(switchMap(result => {\n if (!result.matched) {\n return noMatch$1(rawSegment);\n }\n // If the route has an injector created from providers, we should start using that.\n injector = route._injector ?? injector;\n return this.getChildConfig(injector, route, segments).pipe(switchMap(({\n routes: childConfig\n }) => {\n const childInjector = route._loadedInjector ?? injector;\n const {\n parameters,\n consumedSegments,\n remainingSegments\n } = result;\n const snapshot = new ActivatedRouteSnapshot(consumedSegments, parameters, Object.freeze({\n ...this.urlTree.queryParams\n }), this.urlTree.fragment, getData(route), getOutlet(route), route.component ?? route._loadedComponent ?? null, route, getResolve(route));\n const inherited = getInherited(snapshot, parentRoute, this.paramsInheritanceStrategy);\n snapshot.params = Object.freeze(inherited.params);\n snapshot.data = Object.freeze(inherited.data);\n const {\n segmentGroup,\n slicedSegments\n } = split(rawSegment, consumedSegments, remainingSegments, childConfig);\n if (slicedSegments.length === 0 && segmentGroup.hasChildren()) {\n return this.processChildren(childInjector, childConfig, segmentGroup, snapshot).pipe(map(children => {\n return new TreeNode(snapshot, children);\n }));\n }\n if (childConfig.length === 0 && slicedSegments.length === 0) {\n return of(new TreeNode(snapshot, []));\n }\n const matchedOnOutlet = getOutlet(route) === outlet;\n // If we matched a config due to empty path match on a different outlet, we need to\n // continue passing the current outlet for the segment rather than switch to PRIMARY.\n // Note that we switch to primary when we have a match because outlet configs look like\n // this: {path: 'a', outlet: 'a', children: [\n // {path: 'b', component: B},\n // {path: 'c', component: C},\n // ]}\n // Notice that the children of the named outlet are configured with the primary outlet\n return this.processSegment(childInjector, childConfig, segmentGroup, slicedSegments, matchedOnOutlet ? PRIMARY_OUTLET : outlet, true, snapshot).pipe(map(child => {\n return new TreeNode(snapshot, child instanceof TreeNode ? [child] : []);\n }));\n }));\n }));\n }\n getChildConfig(injector, route, segments) {\n if (route.children) {\n // The children belong to the same module\n return of({\n routes: route.children,\n injector\n });\n }\n if (route.loadChildren) {\n // lazy children belong to the loaded module\n if (route._loadedRoutes !== undefined) {\n return of({\n routes: route._loadedRoutes,\n injector: route._loadedInjector\n });\n }\n return runCanLoadGuards(injector, route, segments, this.urlSerializer).pipe(mergeMap(shouldLoadResult => {\n if (shouldLoadResult) {\n return this.configLoader.loadChildren(injector, route).pipe(tap(cfg => {\n route._loadedRoutes = cfg.routes;\n route._loadedInjector = cfg.injector;\n }));\n }\n return canLoadFails(route);\n }));\n }\n return of({\n routes: [],\n injector\n });\n }\n}\nfunction sortActivatedRouteSnapshots(nodes) {\n nodes.sort((a, b) => {\n if (a.value.outlet === PRIMARY_OUTLET) return -1;\n if (b.value.outlet === PRIMARY_OUTLET) return 1;\n return a.value.outlet.localeCompare(b.value.outlet);\n });\n}\nfunction hasEmptyPathConfig(node) {\n const config = node.value.routeConfig;\n return config && config.path === '';\n}\n/**\n * Finds `TreeNode`s with matching empty path route configs and merges them into `TreeNode` with\n * the children from each duplicate. This is necessary because different outlets can match a\n * single empty path route config and the results need to then be merged.\n */\nfunction mergeEmptyPathMatches(nodes) {\n const result = [];\n // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n const mergedNodes = new Set();\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n mergedNodes.add(duplicateEmptyPathNode);\n } else {\n result.push(node);\n }\n }\n // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n // by also merging those children. This is necessary when there are multiple empty path configs\n // in a row. Put another way: whenever we combine children of two nodes, we need to also check\n // if any of those children can be combined into a single node as well.\n for (const mergedNode of mergedNodes) {\n const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n result.push(new TreeNode(mergedNode.value, mergedChildren));\n }\n return result.filter(n => !mergedNodes.has(n));\n}\nfunction checkOutletNameUniqueness(nodes) {\n const names = {};\n nodes.forEach(n => {\n const routeWithSameOutletName = names[n.value.outlet];\n if (routeWithSameOutletName) {\n const p = routeWithSameOutletName.url.map(s => s.toString()).join('/');\n const c = n.value.url.map(s => s.toString()).join('/');\n throw new ɵRuntimeError(4006 /* RuntimeErrorCode.TWO_SEGMENTS_WITH_SAME_OUTLET */, (typeof ngDevMode === 'undefined' || ngDevMode) && `Two segments cannot have the same outlet name: '${p}' and '${c}'.`);\n }\n names[n.value.outlet] = n.value;\n });\n}\nfunction getData(route) {\n return route.data || {};\n}\nfunction getResolve(route) {\n return route.resolve || {};\n}\nfunction recognize(injector, configLoader, rootComponentType, config, serializer, paramsInheritanceStrategy) {\n return mergeMap(t => recognize$1(injector, configLoader, rootComponentType, config, t.extractedUrl, serializer, paramsInheritanceStrategy).pipe(map(({\n state: targetSnapshot,\n tree: urlAfterRedirects\n }) => {\n return {\n ...t,\n targetSnapshot,\n urlAfterRedirects\n };\n })));\n}\nfunction resolveData(paramsInheritanceStrategy, injector) {\n return mergeMap(t => {\n const {\n targetSnapshot,\n guards: {\n canActivateChecks\n }\n } = t;\n if (!canActivateChecks.length) {\n return of(t);\n }\n // Iterating a Set in javascript happens in insertion order so it is safe to use a `Set` to\n // preserve the correct order that the resolvers should run in.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#description\n const routesWithResolversToRun = new Set(canActivateChecks.map(check => check.route));\n const routesNeedingDataUpdates = new Set();\n for (const route of routesWithResolversToRun) {\n if (routesNeedingDataUpdates.has(route)) {\n continue;\n }\n // All children under the route with a resolver to run need to recompute inherited data.\n for (const newRoute of flattenRouteTree(route)) {\n routesNeedingDataUpdates.add(newRoute);\n }\n }\n let routesProcessed = 0;\n return from(routesNeedingDataUpdates).pipe(concatMap(route => {\n if (routesWithResolversToRun.has(route)) {\n return runResolve(route, targetSnapshot, paramsInheritanceStrategy, injector);\n } else {\n route.data = getInherited(route, route.parent, paramsInheritanceStrategy).resolve;\n return of(void 0);\n }\n }), tap(() => routesProcessed++), takeLast(1), mergeMap(_ => routesProcessed === routesNeedingDataUpdates.size ? of(t) : EMPTY));\n });\n}\n/**\n * Returns the `ActivatedRouteSnapshot` tree as an array, using DFS to traverse the route tree.\n */\nfunction flattenRouteTree(route) {\n const descendants = route.children.map(child => flattenRouteTree(child)).flat();\n return [route, ...descendants];\n}\nfunction runResolve(futureARS, futureRSS, paramsInheritanceStrategy, injector) {\n const config = futureARS.routeConfig;\n const resolve = futureARS._resolve;\n if (config?.title !== undefined && !hasStaticTitle(config)) {\n resolve[RouteTitleKey] = config.title;\n }\n return resolveNode(resolve, futureARS, futureRSS, injector).pipe(map(resolvedData => {\n futureARS._resolvedData = resolvedData;\n futureARS.data = getInherited(futureARS, futureARS.parent, paramsInheritanceStrategy).resolve;\n return null;\n }));\n}\nfunction resolveNode(resolve, futureARS, futureRSS, injector) {\n const keys = getDataKeys(resolve);\n if (keys.length === 0) {\n return of({});\n }\n const data = {};\n return from(keys).pipe(mergeMap(key => getResolver(resolve[key], futureARS, futureRSS, injector).pipe(first(), tap(value => {\n if (value instanceof RedirectCommand) {\n throw redirectingNavigationError(new DefaultUrlSerializer(), value);\n }\n data[key] = value;\n }))), takeLast(1), mapTo(data), catchError(e => isEmptyError(e) ? EMPTY : throwError(e)));\n}\nfunction getResolver(injectionToken, futureARS, futureRSS, injector) {\n const closestInjector = getClosestRouteInjector(futureARS) ?? injector;\n const resolver = getTokenOrFunctionIdentity(injectionToken, closestInjector);\n const resolverValue = resolver.resolve ? resolver.resolve(futureARS, futureRSS) : runInInjectionContext(closestInjector, () => resolver(futureARS, futureRSS));\n return wrapIntoObservable(resolverValue);\n}\n\n/**\n * Perform a side effect through a switchMap for every emission on the source Observable,\n * but return an Observable that is identical to the source. It's essentially the same as\n * the `tap` operator, but if the side effectful `next` function returns an ObservableInput,\n * it will wait before continuing with the original value.\n */\nfunction switchTap(next) {\n return switchMap(v => {\n const nextResult = next(v);\n if (nextResult) {\n return from(nextResult).pipe(map(() => v));\n }\n return of(v);\n });\n}\n\n/**\n * Provides a strategy for setting the page title after a router navigation.\n *\n * The built-in implementation traverses the router state snapshot and finds the deepest primary\n * outlet with `title` property. Given the `Routes` below, navigating to\n * `/base/child(popup:aux)` would result in the document title being set to \"child\".\n * ```\n * [\n * {path: 'base', title: 'base', children: [\n * {path: 'child', title: 'child'},\n * ],\n * {path: 'aux', outlet: 'popup', title: 'popupTitle'}\n * ]\n * ```\n *\n * This class can be used as a base class for custom title strategies. That is, you can create your\n * own class that extends the `TitleStrategy`. Note that in the above example, the `title`\n * from the named outlet is never used. However, a custom strategy might be implemented to\n * incorporate titles in named outlets.\n *\n * @publicApi\n * @see [Page title guide](guide/routing/common-router-tasks#setting-the-page-title)\n */\nlet TitleStrategy = /*#__PURE__*/(() => {\n class TitleStrategy {\n /**\n * @returns The `title` of the deepest primary route.\n */\n buildTitle(snapshot) {\n let pageTitle;\n let route = snapshot.root;\n while (route !== undefined) {\n pageTitle = this.getResolvedTitleForRoute(route) ?? pageTitle;\n route = route.children.find(child => child.outlet === PRIMARY_OUTLET);\n }\n return pageTitle;\n }\n /**\n * Given an `ActivatedRouteSnapshot`, returns the final value of the\n * `Route.title` property, which can either be a static string or a resolved value.\n */\n getResolvedTitleForRoute(snapshot) {\n return snapshot.data[RouteTitleKey];\n }\n static {\n this.ɵfac = function TitleStrategy_Factory(t) {\n return new (t || TitleStrategy)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TitleStrategy,\n factory: () => (() => inject(DefaultTitleStrategy))(),\n providedIn: 'root'\n });\n }\n }\n return TitleStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * The default `TitleStrategy` used by the router that updates the title using the `Title` service.\n */\nlet DefaultTitleStrategy = /*#__PURE__*/(() => {\n class DefaultTitleStrategy extends TitleStrategy {\n constructor(title) {\n super();\n this.title = title;\n }\n /**\n * Sets the title of the browser to the given value.\n *\n * @param title The `pageTitle` from the deepest primary route.\n */\n updateTitle(snapshot) {\n const title = this.buildTitle(snapshot);\n if (title !== undefined) {\n this.title.setTitle(title);\n }\n }\n static {\n this.ɵfac = function DefaultTitleStrategy_Factory(t) {\n return new (t || DefaultTitleStrategy)(i0.ɵɵinject(i1.Title));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DefaultTitleStrategy,\n factory: DefaultTitleStrategy.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DefaultTitleStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * A DI token for the router service.\n *\n * @publicApi\n */\nconst ROUTER_CONFIGURATION = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'router config' : '', {\n providedIn: 'root',\n factory: () => ({})\n});\n\n/**\n * The DI token for a router configuration.\n *\n * `ROUTES` is a low level API for router configuration via dependency injection.\n *\n * We recommend that in almost all cases to use higher level APIs such as `RouterModule.forRoot()`,\n * `provideRouter`, or `Router.resetConfig()`.\n *\n * @publicApi\n */\nconst ROUTES = /*#__PURE__*/new InjectionToken(ngDevMode ? 'ROUTES' : '');\nlet RouterConfigLoader = /*#__PURE__*/(() => {\n class RouterConfigLoader {\n constructor() {\n this.componentLoaders = new WeakMap();\n this.childrenLoaders = new WeakMap();\n this.compiler = inject(Compiler);\n }\n loadComponent(route) {\n if (this.componentLoaders.get(route)) {\n return this.componentLoaders.get(route);\n } else if (route._loadedComponent) {\n return of(route._loadedComponent);\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const loadRunner = wrapIntoObservable(route.loadComponent()).pipe(map(maybeUnwrapDefaultExport), tap(component => {\n if (this.onLoadEndListener) {\n this.onLoadEndListener(route);\n }\n (typeof ngDevMode === 'undefined' || ngDevMode) && assertStandalone(route.path ?? '', component);\n route._loadedComponent = component;\n }), finalize(() => {\n this.componentLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n this.componentLoaders.set(route, loader);\n return loader;\n }\n loadChildren(parentInjector, route) {\n if (this.childrenLoaders.get(route)) {\n return this.childrenLoaders.get(route);\n } else if (route._loadedRoutes) {\n return of({\n routes: route._loadedRoutes,\n injector: route._loadedInjector\n });\n }\n if (this.onLoadStartListener) {\n this.onLoadStartListener(route);\n }\n const moduleFactoryOrRoutes$ = loadChildren(route, this.compiler, parentInjector, this.onLoadEndListener);\n const loadRunner = moduleFactoryOrRoutes$.pipe(finalize(() => {\n this.childrenLoaders.delete(route);\n }));\n // Use custom ConnectableObservable as share in runners pipe increasing the bundle size too much\n const loader = new ConnectableObservable(loadRunner, () => new Subject()).pipe(refCount());\n this.childrenLoaders.set(route, loader);\n return loader;\n }\n static {\n this.ɵfac = function RouterConfigLoader_Factory(t) {\n return new (t || RouterConfigLoader)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: RouterConfigLoader,\n factory: RouterConfigLoader.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return RouterConfigLoader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Executes a `route.loadChildren` callback and converts the result to an array of child routes and\n * an injector if that callback returned a module.\n *\n * This function is used for the route discovery during prerendering\n * in @angular-devkit/build-angular. If there are any updates to the contract here, it will require\n * an update to the extractor.\n */\nfunction loadChildren(route, compiler, parentInjector, onLoadEndListener) {\n return wrapIntoObservable(route.loadChildren()).pipe(map(maybeUnwrapDefaultExport), mergeMap(t => {\n if (t instanceof NgModuleFactory || Array.isArray(t)) {\n return of(t);\n } else {\n return from(compiler.compileModuleAsync(t));\n }\n }), map(factoryOrRoutes => {\n if (onLoadEndListener) {\n onLoadEndListener(route);\n }\n // This injector comes from the `NgModuleRef` when lazy loading an `NgModule`. There is\n // no injector associated with lazy loading a `Route` array.\n let injector;\n let rawRoutes;\n let requireStandaloneComponents = false;\n if (Array.isArray(factoryOrRoutes)) {\n rawRoutes = factoryOrRoutes;\n requireStandaloneComponents = true;\n } else {\n injector = factoryOrRoutes.create(parentInjector).injector;\n // When loading a module that doesn't provide `RouterModule.forChild()` preloader\n // will get stuck in an infinite loop. The child module's Injector will look to\n // its parent `Injector` when it doesn't find any ROUTES so it will return routes\n // for it's parent module instead.\n rawRoutes = injector.get(ROUTES, [], {\n optional: true,\n self: true\n }).flat();\n }\n const routes = rawRoutes.map(standardizeConfig);\n (typeof ngDevMode === 'undefined' || ngDevMode) && validateConfig(routes, route.path, requireStandaloneComponents);\n return {\n routes,\n injector\n };\n }));\n}\nfunction isWrappedDefaultExport(value) {\n // We use `in` here with a string key `'default'`, because we expect `DefaultExport` objects to be\n // dynamically imported ES modules with a spec-mandated `default` key. Thus we don't expect that\n // `default` will be a renamed property.\n return value && typeof value === 'object' && 'default' in value;\n}\nfunction maybeUnwrapDefaultExport(input) {\n // As per `isWrappedDefaultExport`, the `default` key here is generated by the browser and not\n // subject to property renaming, so we reference it with bracket access.\n return isWrappedDefaultExport(input) ? input['default'] : input;\n}\n\n/**\n * @description\n *\n * Provides a way to migrate AngularJS applications to Angular.\n *\n * @publicApi\n */\nlet UrlHandlingStrategy = /*#__PURE__*/(() => {\n class UrlHandlingStrategy {\n static {\n this.ɵfac = function UrlHandlingStrategy_Factory(t) {\n return new (t || UrlHandlingStrategy)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: UrlHandlingStrategy,\n factory: () => (() => inject(DefaultUrlHandlingStrategy))(),\n providedIn: 'root'\n });\n }\n }\n return UrlHandlingStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @publicApi\n */\nlet DefaultUrlHandlingStrategy = /*#__PURE__*/(() => {\n class DefaultUrlHandlingStrategy {\n shouldProcessUrl(url) {\n return true;\n }\n extract(url) {\n return url;\n }\n merge(newUrlPart, wholeUrl) {\n return newUrlPart;\n }\n static {\n this.ɵfac = function DefaultUrlHandlingStrategy_Factory(t) {\n return new (t || DefaultUrlHandlingStrategy)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DefaultUrlHandlingStrategy,\n factory: DefaultUrlHandlingStrategy.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DefaultUrlHandlingStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/// \nconst CREATE_VIEW_TRANSITION = /*#__PURE__*/new InjectionToken(ngDevMode ? 'view transition helper' : '');\nconst VIEW_TRANSITION_OPTIONS = /*#__PURE__*/new InjectionToken(ngDevMode ? 'view transition options' : '');\n/**\n * A helper function for using browser view transitions. This function skips the call to\n * `startViewTransition` if the browser does not support it.\n *\n * @returns A Promise that resolves when the view transition callback begins.\n */\nfunction createViewTransition(injector, from, to) {\n const transitionOptions = injector.get(VIEW_TRANSITION_OPTIONS);\n const document = injector.get(DOCUMENT);\n // Create promises outside the Angular zone to avoid causing extra change detections\n return injector.get(NgZone).runOutsideAngular(() => {\n if (!document.startViewTransition || transitionOptions.skipNextTransition) {\n transitionOptions.skipNextTransition = false;\n // The timing of `startViewTransition` is closer to a macrotask. It won't be called\n // until the current event loop exits so we use a promise resolved in a timeout instead\n // of Promise.resolve().\n return new Promise(resolve => setTimeout(resolve));\n }\n let resolveViewTransitionStarted;\n const viewTransitionStarted = new Promise(resolve => {\n resolveViewTransitionStarted = resolve;\n });\n const transition = document.startViewTransition(() => {\n resolveViewTransitionStarted();\n // We don't actually update dom within the transition callback. The resolving of the above\n // promise unblocks the Router navigation, which synchronously activates and deactivates\n // routes (the DOM update). This view transition waits for the next change detection to\n // complete (below), which includes the update phase of the routed components.\n return createRenderPromise(injector);\n });\n const {\n onViewTransitionCreated\n } = transitionOptions;\n if (onViewTransitionCreated) {\n runInInjectionContext(injector, () => onViewTransitionCreated({\n transition,\n from,\n to\n }));\n }\n return viewTransitionStarted;\n });\n}\n/**\n * Creates a promise that resolves after next render.\n */\nfunction createRenderPromise(injector) {\n return new Promise(resolve => {\n // Wait for the microtask queue to empty after the next render happens (by waiting a macrotask).\n // This ensures any follow-up renders in the microtask queue are completed before the\n // view transition starts animating.\n afterNextRender(() => setTimeout(resolve), {\n injector,\n phase: AfterRenderPhase.Read\n });\n });\n}\nconst NAVIGATION_ERROR_HANDLER = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'navigation error handler' : '');\nlet NavigationTransitions = /*#__PURE__*/(() => {\n class NavigationTransitions {\n get hasRequestedNavigation() {\n return this.navigationId !== 0;\n }\n constructor() {\n this.currentNavigation = null;\n this.currentTransition = null;\n this.lastSuccessfulNavigation = null;\n /**\n * These events are used to communicate back to the Router about the state of the transition. The\n * Router wants to respond to these events in various ways. Because the `NavigationTransition`\n * class is not public, this event subject is not publicly exposed.\n */\n this.events = new Subject();\n /**\n * Used to abort the current transition with an error.\n */\n this.transitionAbortSubject = new Subject();\n this.configLoader = inject(RouterConfigLoader);\n this.environmentInjector = inject(EnvironmentInjector);\n this.urlSerializer = inject(UrlSerializer);\n this.rootContexts = inject(ChildrenOutletContexts);\n this.location = inject(Location);\n this.inputBindingEnabled = inject(INPUT_BINDER, {\n optional: true\n }) !== null;\n this.titleStrategy = inject(TitleStrategy);\n this.options = inject(ROUTER_CONFIGURATION, {\n optional: true\n }) || {};\n this.paramsInheritanceStrategy = this.options.paramsInheritanceStrategy || 'emptyOnly';\n this.urlHandlingStrategy = inject(UrlHandlingStrategy);\n this.createViewTransition = inject(CREATE_VIEW_TRANSITION, {\n optional: true\n });\n this.navigationErrorHandler = inject(NAVIGATION_ERROR_HANDLER, {\n optional: true\n });\n this.navigationId = 0;\n /**\n * Hook that enables you to pause navigation after the preactivation phase.\n * Used by `RouterModule`.\n *\n * @internal\n */\n this.afterPreactivation = () => of(void 0);\n /** @internal */\n this.rootComponentType = null;\n const onLoadStart = r => this.events.next(new RouteConfigLoadStart(r));\n const onLoadEnd = r => this.events.next(new RouteConfigLoadEnd(r));\n this.configLoader.onLoadEndListener = onLoadEnd;\n this.configLoader.onLoadStartListener = onLoadStart;\n }\n complete() {\n this.transitions?.complete();\n }\n handleNavigationRequest(request) {\n const id = ++this.navigationId;\n this.transitions?.next({\n ...this.transitions.value,\n ...request,\n id\n });\n }\n setupNavigations(router, initialUrlTree, initialRouterState) {\n this.transitions = new BehaviorSubject({\n id: 0,\n currentUrlTree: initialUrlTree,\n currentRawUrl: initialUrlTree,\n extractedUrl: this.urlHandlingStrategy.extract(initialUrlTree),\n urlAfterRedirects: this.urlHandlingStrategy.extract(initialUrlTree),\n rawUrl: initialUrlTree,\n extras: {},\n resolve: () => {},\n reject: () => {},\n promise: Promise.resolve(true),\n source: IMPERATIVE_NAVIGATION,\n restoredState: null,\n currentSnapshot: initialRouterState.snapshot,\n targetSnapshot: null,\n currentRouterState: initialRouterState,\n targetRouterState: null,\n guards: {\n canActivateChecks: [],\n canDeactivateChecks: []\n },\n guardsResult: null\n });\n return this.transitions.pipe(filter(t => t.id !== 0),\n // Extract URL\n map(t => ({\n ...t,\n extractedUrl: this.urlHandlingStrategy.extract(t.rawUrl)\n })),\n // Using switchMap so we cancel executing navigations when a new one comes in\n switchMap(overallTransitionState => {\n let completed = false;\n let errored = false;\n return of(overallTransitionState).pipe(switchMap(t => {\n // It is possible that `switchMap` fails to cancel previous navigations if a new one happens synchronously while the operator\n // is processing the `next` notification of that previous navigation. This can happen when a new navigation (say 2) cancels a\n // previous one (1) and yet another navigation (3) happens synchronously in response to the `NavigationCancel` event for (1).\n // https://github.com/ReactiveX/rxjs/issues/7455\n if (this.navigationId > overallTransitionState.id) {\n const cancellationReason = typeof ngDevMode === 'undefined' || ngDevMode ? `Navigation ID ${overallTransitionState.id} is not equal to the current navigation id ${this.navigationId}` : '';\n this.cancelNavigationTransition(overallTransitionState, cancellationReason, NavigationCancellationCode.SupersededByNewNavigation);\n return EMPTY;\n }\n this.currentTransition = overallTransitionState;\n // Store the Navigation object\n this.currentNavigation = {\n id: t.id,\n initialUrl: t.rawUrl,\n extractedUrl: t.extractedUrl,\n trigger: t.source,\n extras: t.extras,\n previousNavigation: !this.lastSuccessfulNavigation ? null : {\n ...this.lastSuccessfulNavigation,\n previousNavigation: null\n }\n };\n const urlTransition = !router.navigated || this.isUpdatingInternalState() || this.isUpdatedBrowserUrl();\n const onSameUrlNavigation = t.extras.onSameUrlNavigation ?? router.onSameUrlNavigation;\n if (!urlTransition && onSameUrlNavigation !== 'reload') {\n const reason = typeof ngDevMode === 'undefined' || ngDevMode ? `Navigation to ${t.rawUrl} was ignored because it is the same as the current Router URL.` : '';\n this.events.next(new NavigationSkipped(t.id, this.urlSerializer.serialize(t.rawUrl), reason, NavigationSkippedCode.IgnoredSameUrlNavigation));\n t.resolve(false);\n return EMPTY;\n }\n if (this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl)) {\n return of(t).pipe(\n // Fire NavigationStart event\n switchMap(t => {\n const transition = this.transitions?.getValue();\n this.events.next(new NavigationStart(t.id, this.urlSerializer.serialize(t.extractedUrl), t.source, t.restoredState));\n if (transition !== this.transitions?.getValue()) {\n return EMPTY;\n }\n // This delay is required to match old behavior that forced\n // navigation to always be async\n return Promise.resolve(t);\n }),\n // Recognize\n recognize(this.environmentInjector, this.configLoader, this.rootComponentType, router.config, this.urlSerializer, this.paramsInheritanceStrategy),\n // Update URL if in `eager` update mode\n tap(t => {\n overallTransitionState.targetSnapshot = t.targetSnapshot;\n overallTransitionState.urlAfterRedirects = t.urlAfterRedirects;\n this.currentNavigation = {\n ...this.currentNavigation,\n finalUrl: t.urlAfterRedirects\n };\n // Fire RoutesRecognized\n const routesRecognized = new RoutesRecognized(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(routesRecognized);\n }));\n } else if (urlTransition && this.urlHandlingStrategy.shouldProcessUrl(t.currentRawUrl)) {\n /* When the current URL shouldn't be processed, but the previous one\n * was, we handle this \"error condition\" by navigating to the\n * previously successful URL, but leaving the URL intact.*/\n const {\n id,\n extractedUrl,\n source,\n restoredState,\n extras\n } = t;\n const navStart = new NavigationStart(id, this.urlSerializer.serialize(extractedUrl), source, restoredState);\n this.events.next(navStart);\n const targetSnapshot = createEmptyState(this.rootComponentType).snapshot;\n this.currentTransition = overallTransitionState = {\n ...t,\n targetSnapshot,\n urlAfterRedirects: extractedUrl,\n extras: {\n ...extras,\n skipLocationChange: false,\n replaceUrl: false\n }\n };\n this.currentNavigation.finalUrl = extractedUrl;\n return of(overallTransitionState);\n } else {\n /* When neither the current or previous URL can be processed, do\n * nothing other than update router's internal reference to the\n * current \"settled\" URL. This way the next navigation will be coming\n * from the current URL in the browser.\n */\n const reason = typeof ngDevMode === 'undefined' || ngDevMode ? `Navigation was ignored because the UrlHandlingStrategy` + ` indicated neither the current URL ${t.currentRawUrl} nor target URL ${t.rawUrl} should be processed.` : '';\n this.events.next(new NavigationSkipped(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, NavigationSkippedCode.IgnoredByUrlHandlingStrategy));\n t.resolve(false);\n return EMPTY;\n }\n }),\n // --- GUARDS ---\n tap(t => {\n const guardsStart = new GuardsCheckStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(guardsStart);\n }), map(t => {\n this.currentTransition = overallTransitionState = {\n ...t,\n guards: getAllRouteGuards(t.targetSnapshot, t.currentSnapshot, this.rootContexts)\n };\n return overallTransitionState;\n }), checkGuards(this.environmentInjector, evt => this.events.next(evt)), tap(t => {\n overallTransitionState.guardsResult = t.guardsResult;\n if (t.guardsResult && typeof t.guardsResult !== 'boolean') {\n throw redirectingNavigationError(this.urlSerializer, t.guardsResult);\n }\n const guardsEnd = new GuardsCheckEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot, !!t.guardsResult);\n this.events.next(guardsEnd);\n }), filter(t => {\n if (!t.guardsResult) {\n this.cancelNavigationTransition(t, '', NavigationCancellationCode.GuardRejected);\n return false;\n }\n return true;\n }),\n // --- RESOLVE ---\n switchTap(t => {\n if (t.guards.canActivateChecks.length) {\n return of(t).pipe(tap(t => {\n const resolveStart = new ResolveStart(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(resolveStart);\n }), switchMap(t => {\n let dataResolved = false;\n return of(t).pipe(resolveData(this.paramsInheritanceStrategy, this.environmentInjector), tap({\n next: () => dataResolved = true,\n complete: () => {\n if (!dataResolved) {\n this.cancelNavigationTransition(t, typeof ngDevMode === 'undefined' || ngDevMode ? `At least one route resolver didn't emit any value.` : '', NavigationCancellationCode.NoDataFromResolver);\n }\n }\n }));\n }), tap(t => {\n const resolveEnd = new ResolveEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects), t.targetSnapshot);\n this.events.next(resolveEnd);\n }));\n }\n return undefined;\n }),\n // --- LOAD COMPONENTS ---\n switchTap(t => {\n const loadComponents = route => {\n const loaders = [];\n if (route.routeConfig?.loadComponent && !route.routeConfig._loadedComponent) {\n loaders.push(this.configLoader.loadComponent(route.routeConfig).pipe(tap(loadedComponent => {\n route.component = loadedComponent;\n }), map(() => void 0)));\n }\n for (const child of route.children) {\n loaders.push(...loadComponents(child));\n }\n return loaders;\n };\n return combineLatest(loadComponents(t.targetSnapshot.root)).pipe(defaultIfEmpty(null), take(1));\n }), switchTap(() => this.afterPreactivation()), switchMap(() => {\n const {\n currentSnapshot,\n targetSnapshot\n } = overallTransitionState;\n const viewTransitionStarted = this.createViewTransition?.(this.environmentInjector, currentSnapshot.root, targetSnapshot.root);\n // If view transitions are enabled, block the navigation until the view\n // transition callback starts. Otherwise, continue immediately.\n return viewTransitionStarted ? from(viewTransitionStarted).pipe(map(() => overallTransitionState)) : of(overallTransitionState);\n }), map(t => {\n const targetRouterState = createRouterState(router.routeReuseStrategy, t.targetSnapshot, t.currentRouterState);\n this.currentTransition = overallTransitionState = {\n ...t,\n targetRouterState\n };\n this.currentNavigation.targetRouterState = targetRouterState;\n return overallTransitionState;\n }), tap(() => {\n this.events.next(new BeforeActivateRoutes());\n }), activateRoutes(this.rootContexts, router.routeReuseStrategy, evt => this.events.next(evt), this.inputBindingEnabled),\n // Ensure that if some observable used to drive the transition doesn't\n // complete, the navigation still finalizes This should never happen, but\n // this is done as a safety measure to avoid surfacing this error (#49567).\n take(1), tap({\n next: t => {\n completed = true;\n this.lastSuccessfulNavigation = this.currentNavigation;\n this.events.next(new NavigationEnd(t.id, this.urlSerializer.serialize(t.extractedUrl), this.urlSerializer.serialize(t.urlAfterRedirects)));\n this.titleStrategy?.updateTitle(t.targetRouterState.snapshot);\n t.resolve(true);\n },\n complete: () => {\n completed = true;\n }\n }),\n // There used to be a lot more logic happening directly within the\n // transition Observable. Some of this logic has been refactored out to\n // other places but there may still be errors that happen there. This gives\n // us a way to cancel the transition from the outside. This may also be\n // required in the future to support something like the abort signal of the\n // Navigation API where the navigation gets aborted from outside the\n // transition.\n takeUntil(this.transitionAbortSubject.pipe(tap(err => {\n throw err;\n }))), finalize(() => {\n /* When the navigation stream finishes either through error or success,\n * we set the `completed` or `errored` flag. However, there are some\n * situations where we could get here without either of those being set.\n * For instance, a redirect during NavigationStart. Therefore, this is a\n * catch-all to make sure the NavigationCancel event is fired when a\n * navigation gets cancelled but not caught by other means. */\n if (!completed && !errored) {\n const cancelationReason = typeof ngDevMode === 'undefined' || ngDevMode ? `Navigation ID ${overallTransitionState.id} is not equal to the current navigation id ${this.navigationId}` : '';\n this.cancelNavigationTransition(overallTransitionState, cancelationReason, NavigationCancellationCode.SupersededByNewNavigation);\n }\n // Only clear current navigation if it is still set to the one that\n // finalized.\n if (this.currentTransition?.id === overallTransitionState.id) {\n this.currentNavigation = null;\n this.currentTransition = null;\n }\n }), catchError(e => {\n errored = true;\n /* This error type is issued during Redirect, and is handled as a\n * cancellation rather than an error. */\n if (isNavigationCancelingError(e)) {\n this.events.next(new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e.message, e.cancellationCode));\n // When redirecting, we need to delay resolving the navigation\n // promise and push it to the redirect navigation\n if (!isRedirectingNavigationCancelingError(e)) {\n overallTransitionState.resolve(false);\n } else {\n this.events.next(new RedirectRequest(e.url, e.navigationBehaviorOptions));\n }\n /* All other errors should reset to the router's internal URL reference\n * to the pre-error state. */\n } else {\n const navigationError = new NavigationError(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), e, overallTransitionState.targetSnapshot ?? undefined);\n try {\n const navigationErrorHandlerResult = runInInjectionContext(this.environmentInjector, () => this.navigationErrorHandler?.(navigationError));\n if (navigationErrorHandlerResult instanceof RedirectCommand) {\n const {\n message,\n cancellationCode\n } = redirectingNavigationError(this.urlSerializer, navigationErrorHandlerResult);\n this.events.next(new NavigationCancel(overallTransitionState.id, this.urlSerializer.serialize(overallTransitionState.extractedUrl), message, cancellationCode));\n this.events.next(new RedirectRequest(navigationErrorHandlerResult.redirectTo, navigationErrorHandlerResult.navigationBehaviorOptions));\n } else {\n this.events.next(navigationError);\n // TODO(atscott): remove deprecation on errorHandler in RouterModule.forRoot and change behavior to provide NAVIGATION_ERROR_HANDLER\n // Note: Still remove public `Router.errorHandler` property, as this is supposed to be configured in DI.\n const errorHandlerResult = router.errorHandler(e);\n overallTransitionState.resolve(!!errorHandlerResult);\n }\n } catch (ee) {\n // TODO(atscott): consider flipping the default behavior of\n // resolveNavigationPromiseOnError to be `resolve(false)` when\n // undefined. This is the most sane thing to do given that\n // applications very rarely handle the promise rejection and, as a\n // result, would get \"unhandled promise rejection\" console logs.\n // The vast majority of applications would not be affected by this\n // change so omitting a migration seems reasonable. Instead,\n // applications that rely on rejection can specifically opt-in to the\n // old behavior.\n if (this.options.resolveNavigationPromiseOnError) {\n overallTransitionState.resolve(false);\n } else {\n overallTransitionState.reject(ee);\n }\n }\n }\n return EMPTY;\n }));\n // casting because `pipe` returns observable({}) when called with 8+ arguments\n }));\n }\n cancelNavigationTransition(t, reason, code) {\n const navCancel = new NavigationCancel(t.id, this.urlSerializer.serialize(t.extractedUrl), reason, code);\n this.events.next(navCancel);\n t.resolve(false);\n }\n /**\n * @returns Whether we're navigating to somewhere that is not what the Router is\n * currently set to.\n */\n isUpdatingInternalState() {\n // TODO(atscott): The serializer should likely be used instead of\n // `UrlTree.toString()`. Custom serializers are often written to handle\n // things better than the default one (objects, for example will be\n // [Object object] with the custom serializer and be \"the same\" when they\n // aren't).\n // (Same for isUpdatedBrowserUrl)\n return this.currentTransition?.extractedUrl.toString() !== this.currentTransition?.currentUrlTree.toString();\n }\n /**\n * @returns Whether we're updating the browser URL to something new (navigation is going\n * to somewhere not displayed in the URL bar and we will update the URL\n * bar if navigation succeeds).\n */\n isUpdatedBrowserUrl() {\n // The extracted URL is the part of the URL that this application cares about. `extract` may\n // return only part of the browser URL and that part may have not changed even if some other\n // portion of the URL did.\n const extractedBrowserUrl = this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(true)));\n return extractedBrowserUrl.toString() !== this.currentTransition?.extractedUrl.toString() && !this.currentTransition?.extras.skipLocationChange;\n }\n static {\n this.ɵfac = function NavigationTransitions_Factory(t) {\n return new (t || NavigationTransitions)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NavigationTransitions,\n factory: NavigationTransitions.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return NavigationTransitions;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction isBrowserTriggeredNavigation(source) {\n return source !== IMPERATIVE_NAVIGATION;\n}\n\n/**\n * @description\n *\n * Provides a way to customize when activated routes get reused.\n *\n * @publicApi\n */\nlet RouteReuseStrategy = /*#__PURE__*/(() => {\n class RouteReuseStrategy {\n static {\n this.ɵfac = function RouteReuseStrategy_Factory(t) {\n return new (t || RouteReuseStrategy)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: RouteReuseStrategy,\n factory: () => (() => inject(DefaultRouteReuseStrategy))(),\n providedIn: 'root'\n });\n }\n }\n return RouteReuseStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @description\n *\n * This base route reuse strategy only reuses routes when the matched router configs are\n * identical. This prevents components from being destroyed and recreated\n * when just the route parameters, query parameters or fragment change\n * (that is, the existing component is _reused_).\n *\n * This strategy does not store any routes for later reuse.\n *\n * Angular uses this strategy by default.\n *\n *\n * It can be used as a base class for custom route reuse strategies, i.e. you can create your own\n * class that extends the `BaseRouteReuseStrategy` one.\n * @publicApi\n */\nclass BaseRouteReuseStrategy {\n /**\n * Whether the given route should detach for later reuse.\n * Always returns false for `BaseRouteReuseStrategy`.\n * */\n shouldDetach(route) {\n return false;\n }\n /**\n * A no-op; the route is never stored since this strategy never detaches routes for later re-use.\n */\n store(route, detachedTree) {}\n /** Returns `false`, meaning the route (and its subtree) is never reattached */\n shouldAttach(route) {\n return false;\n }\n /** Returns `null` because this strategy does not store routes for later re-use. */\n retrieve(route) {\n return null;\n }\n /**\n * Determines if a route should be reused.\n * This strategy returns `true` when the future route config and current route config are\n * identical.\n */\n shouldReuseRoute(future, curr) {\n return future.routeConfig === curr.routeConfig;\n }\n}\nlet DefaultRouteReuseStrategy = /*#__PURE__*/(() => {\n class DefaultRouteReuseStrategy extends BaseRouteReuseStrategy {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵDefaultRouteReuseStrategy_BaseFactory;\n return function DefaultRouteReuseStrategy_Factory(t) {\n return (ɵDefaultRouteReuseStrategy_BaseFactory || (ɵDefaultRouteReuseStrategy_BaseFactory = i0.ɵɵgetInheritedFactory(DefaultRouteReuseStrategy)))(t || DefaultRouteReuseStrategy);\n };\n })();\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DefaultRouteReuseStrategy,\n factory: DefaultRouteReuseStrategy.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DefaultRouteReuseStrategy;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StateManager = /*#__PURE__*/(() => {\n class StateManager {\n static {\n this.ɵfac = function StateManager_Factory(t) {\n return new (t || StateManager)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StateManager,\n factory: () => (() => inject(HistoryStateManager))(),\n providedIn: 'root'\n });\n }\n }\n return StateManager;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet HistoryStateManager = /*#__PURE__*/(() => {\n class HistoryStateManager extends StateManager {\n constructor() {\n super(...arguments);\n this.location = inject(Location);\n this.urlSerializer = inject(UrlSerializer);\n this.options = inject(ROUTER_CONFIGURATION, {\n optional: true\n }) || {};\n this.canceledNavigationResolution = this.options.canceledNavigationResolution || 'replace';\n this.urlHandlingStrategy = inject(UrlHandlingStrategy);\n this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n this.currentUrlTree = new UrlTree();\n this.rawUrlTree = this.currentUrlTree;\n /**\n * The id of the currently active page in the router.\n * Updated to the transition's target id on a successful navigation.\n *\n * This is used to track what page the router last activated. When an attempted navigation fails,\n * the router can then use this to compute how to restore the state back to the previously active\n * page.\n */\n this.currentPageId = 0;\n this.lastSuccessfulId = -1;\n this.routerState = createEmptyState(null);\n this.stateMemento = this.createStateMemento();\n }\n getCurrentUrlTree() {\n return this.currentUrlTree;\n }\n getRawUrlTree() {\n return this.rawUrlTree;\n }\n restoredState() {\n return this.location.getState();\n }\n /**\n * The ɵrouterPageId of whatever page is currently active in the browser history. This is\n * important for computing the target page id for new navigations because we need to ensure each\n * page id in the browser history is 1 more than the previous entry.\n */\n get browserPageId() {\n if (this.canceledNavigationResolution !== 'computed') {\n return this.currentPageId;\n }\n return this.restoredState()?.ɵrouterPageId ?? this.currentPageId;\n }\n getRouterState() {\n return this.routerState;\n }\n createStateMemento() {\n return {\n rawUrlTree: this.rawUrlTree,\n currentUrlTree: this.currentUrlTree,\n routerState: this.routerState\n };\n }\n registerNonRouterCurrentEntryChangeListener(listener) {\n return this.location.subscribe(event => {\n if (event['type'] === 'popstate') {\n listener(event['url'], event.state);\n }\n });\n }\n handleRouterEvent(e, currentTransition) {\n if (e instanceof NavigationStart) {\n this.stateMemento = this.createStateMemento();\n } else if (e instanceof NavigationSkipped) {\n this.rawUrlTree = currentTransition.initialUrl;\n } else if (e instanceof RoutesRecognized) {\n if (this.urlUpdateStrategy === 'eager') {\n if (!currentTransition.extras.skipLocationChange) {\n const rawUrl = this.urlHandlingStrategy.merge(currentTransition.finalUrl, currentTransition.initialUrl);\n this.setBrowserUrl(rawUrl, currentTransition);\n }\n }\n } else if (e instanceof BeforeActivateRoutes) {\n this.currentUrlTree = currentTransition.finalUrl;\n this.rawUrlTree = this.urlHandlingStrategy.merge(currentTransition.finalUrl, currentTransition.initialUrl);\n this.routerState = currentTransition.targetRouterState;\n if (this.urlUpdateStrategy === 'deferred') {\n if (!currentTransition.extras.skipLocationChange) {\n this.setBrowserUrl(this.rawUrlTree, currentTransition);\n }\n }\n } else if (e instanceof NavigationCancel && (e.code === NavigationCancellationCode.GuardRejected || e.code === NavigationCancellationCode.NoDataFromResolver)) {\n this.restoreHistory(currentTransition);\n } else if (e instanceof NavigationError) {\n this.restoreHistory(currentTransition, true);\n } else if (e instanceof NavigationEnd) {\n this.lastSuccessfulId = e.id;\n this.currentPageId = this.browserPageId;\n }\n }\n setBrowserUrl(url, transition) {\n const path = this.urlSerializer.serialize(url);\n if (this.location.isCurrentPathEqualTo(path) || !!transition.extras.replaceUrl) {\n // replacements do not update the target page\n const currentBrowserPageId = this.browserPageId;\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, currentBrowserPageId)\n };\n this.location.replaceState(path, '', state);\n } else {\n const state = {\n ...transition.extras.state,\n ...this.generateNgRouterState(transition.id, this.browserPageId + 1)\n };\n this.location.go(path, '', state);\n }\n }\n /**\n * Performs the necessary rollback action to restore the browser URL to the\n * state before the transition.\n */\n restoreHistory(navigation, restoringFromCaughtError = false) {\n if (this.canceledNavigationResolution === 'computed') {\n const currentBrowserPageId = this.browserPageId;\n const targetPagePosition = this.currentPageId - currentBrowserPageId;\n if (targetPagePosition !== 0) {\n this.location.historyGo(targetPagePosition);\n } else if (this.currentUrlTree === navigation.finalUrl && targetPagePosition === 0) {\n // We got to the activation stage (where currentUrlTree is set to the navigation's\n // finalUrl), but we weren't moving anywhere in history (skipLocationChange or replaceUrl).\n // We still need to reset the router state back to what it was when the navigation started.\n this.resetState(navigation);\n this.resetUrlToCurrentUrlTree();\n } else {\n // The browser URL and router state was not updated before the navigation cancelled so\n // there's no restoration needed.\n }\n } else if (this.canceledNavigationResolution === 'replace') {\n // TODO(atscott): It seems like we should _always_ reset the state here. It would be a no-op\n // for `deferred` navigations that haven't change the internal state yet because guards\n // reject. For 'eager' navigations, it seems like we also really should reset the state\n // because the navigation was cancelled. Investigate if this can be done by running TGP.\n if (restoringFromCaughtError) {\n this.resetState(navigation);\n }\n this.resetUrlToCurrentUrlTree();\n }\n }\n resetState(navigation) {\n this.routerState = this.stateMemento.routerState;\n this.currentUrlTree = this.stateMemento.currentUrlTree;\n // Note here that we use the urlHandlingStrategy to get the reset `rawUrlTree` because it may be\n // configured to handle only part of the navigation URL. This means we would only want to reset\n // the part of the navigation handled by the Angular router rather than the whole URL. In\n // addition, the URLHandlingStrategy may be configured to specifically preserve parts of the URL\n // when merging, such as the query params so they are not lost on a refresh.\n this.rawUrlTree = this.urlHandlingStrategy.merge(this.currentUrlTree, navigation.finalUrl ?? this.rawUrlTree);\n }\n resetUrlToCurrentUrlTree() {\n this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree), '', this.generateNgRouterState(this.lastSuccessfulId, this.currentPageId));\n }\n generateNgRouterState(navigationId, routerPageId) {\n if (this.canceledNavigationResolution === 'computed') {\n return {\n navigationId,\n ɵrouterPageId: routerPageId\n };\n }\n return {\n navigationId\n };\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵHistoryStateManager_BaseFactory;\n return function HistoryStateManager_Factory(t) {\n return (ɵHistoryStateManager_BaseFactory || (ɵHistoryStateManager_BaseFactory = i0.ɵɵgetInheritedFactory(HistoryStateManager)))(t || HistoryStateManager);\n };\n })();\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: HistoryStateManager,\n factory: HistoryStateManager.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return HistoryStateManager;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar NavigationResult = /*#__PURE__*/function (NavigationResult) {\n NavigationResult[NavigationResult[\"COMPLETE\"] = 0] = \"COMPLETE\";\n NavigationResult[NavigationResult[\"FAILED\"] = 1] = \"FAILED\";\n NavigationResult[NavigationResult[\"REDIRECTING\"] = 2] = \"REDIRECTING\";\n return NavigationResult;\n}(NavigationResult || {});\n/**\n * Performs the given action once the router finishes its next/current navigation.\n *\n * The navigation is considered complete under the following conditions:\n * - `NavigationCancel` event emits and the code is not `NavigationCancellationCode.Redirect` or\n * `NavigationCancellationCode.SupersededByNewNavigation`. In these cases, the\n * redirecting/superseding navigation must finish.\n * - `NavigationError`, `NavigationEnd`, or `NavigationSkipped` event emits\n */\nfunction afterNextNavigation(router, action) {\n router.events.pipe(filter(e => e instanceof NavigationEnd || e instanceof NavigationCancel || e instanceof NavigationError || e instanceof NavigationSkipped), map(e => {\n if (e instanceof NavigationEnd || e instanceof NavigationSkipped) {\n return NavigationResult.COMPLETE;\n }\n const redirecting = e instanceof NavigationCancel ? e.code === NavigationCancellationCode.Redirect || e.code === NavigationCancellationCode.SupersededByNewNavigation : false;\n return redirecting ? NavigationResult.REDIRECTING : NavigationResult.FAILED;\n }), filter(result => result !== NavigationResult.REDIRECTING), take(1)).subscribe(() => {\n action();\n });\n}\nfunction defaultErrorHandler(error) {\n throw error;\n}\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `true`\n * (exact = true).\n */\nconst exactMatchOptions = {\n paths: 'exact',\n fragment: 'ignored',\n matrixParams: 'ignored',\n queryParams: 'exact'\n};\n/**\n * The equivalent `IsActiveMatchOptions` options for `Router.isActive` is called with `false`\n * (exact = false).\n */\nconst subsetMatchOptions = {\n paths: 'subset',\n fragment: 'ignored',\n matrixParams: 'ignored',\n queryParams: 'subset'\n};\n/**\n * @description\n *\n * A service that provides navigation among views and URL manipulation capabilities.\n *\n * @see {@link Route}\n * @see [Routing and Navigation Guide](guide/routing/common-router-tasks).\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet Router = /*#__PURE__*/(() => {\n class Router {\n get currentUrlTree() {\n return this.stateManager.getCurrentUrlTree();\n }\n get rawUrlTree() {\n return this.stateManager.getRawUrlTree();\n }\n /**\n * An event stream for routing events.\n */\n get events() {\n // TODO(atscott): This _should_ be events.asObservable(). However, this change requires internal\n // cleanup: tests are doing `(route.events as Subject).next(...)`. This isn't\n // allowed/supported but we still have to fix these or file bugs against the teams before making\n // the change.\n return this._events;\n }\n /**\n * The current state of routing in this NgModule.\n */\n get routerState() {\n return this.stateManager.getRouterState();\n }\n constructor() {\n this.disposed = false;\n this.console = inject(ɵConsole);\n this.stateManager = inject(StateManager);\n this.options = inject(ROUTER_CONFIGURATION, {\n optional: true\n }) || {};\n this.pendingTasks = inject(ɵPendingTasks);\n this.urlUpdateStrategy = this.options.urlUpdateStrategy || 'deferred';\n this.navigationTransitions = inject(NavigationTransitions);\n this.urlSerializer = inject(UrlSerializer);\n this.location = inject(Location);\n this.urlHandlingStrategy = inject(UrlHandlingStrategy);\n /**\n * The private `Subject` type for the public events exposed in the getter. This is used internally\n * to push events to. The separate field allows us to expose separate types in the public API\n * (i.e., an Observable rather than the Subject).\n */\n this._events = new Subject();\n /**\n * A handler for navigation errors in this NgModule.\n *\n * @deprecated Subscribe to the `Router` events and watch for `NavigationError` instead.\n * `provideRouter` has the `withNavigationErrorHandler` feature to make this easier.\n * @see {@link withNavigationErrorHandler}\n */\n this.errorHandler = this.options.errorHandler || defaultErrorHandler;\n /**\n * True if at least one navigation event has occurred,\n * false otherwise.\n */\n this.navigated = false;\n /**\n * A strategy for re-using routes.\n *\n * @deprecated Configure using `providers` instead:\n * `{provide: RouteReuseStrategy, useClass: MyStrategy}`.\n */\n this.routeReuseStrategy = inject(RouteReuseStrategy);\n /**\n * How to handle a navigation request to the current URL.\n *\n *\n * @deprecated Configure this through `provideRouter` or `RouterModule.forRoot` instead.\n * @see {@link withRouterConfig}\n * @see {@link provideRouter}\n * @see {@link RouterModule}\n */\n this.onSameUrlNavigation = this.options.onSameUrlNavigation || 'ignore';\n this.config = inject(ROUTES, {\n optional: true\n })?.flat() ?? [];\n /**\n * Indicates whether the application has opted in to binding Router data to component inputs.\n *\n * This option is enabled by the `withComponentInputBinding` feature of `provideRouter` or\n * `bindToComponentInputs` in the `ExtraOptions` of `RouterModule.forRoot`.\n */\n this.componentInputBindingEnabled = !!inject(INPUT_BINDER, {\n optional: true\n });\n this.eventsSubscription = new Subscription();\n this.resetConfig(this.config);\n this.navigationTransitions.setupNavigations(this, this.currentUrlTree, this.routerState).subscribe({\n error: e => {\n this.console.warn(ngDevMode ? `Unhandled Navigation Error: ${e}` : e);\n }\n });\n this.subscribeToNavigationEvents();\n }\n subscribeToNavigationEvents() {\n const subscription = this.navigationTransitions.events.subscribe(e => {\n try {\n const currentTransition = this.navigationTransitions.currentTransition;\n const currentNavigation = this.navigationTransitions.currentNavigation;\n if (currentTransition !== null && currentNavigation !== null) {\n this.stateManager.handleRouterEvent(e, currentNavigation);\n if (e instanceof NavigationCancel && e.code !== NavigationCancellationCode.Redirect && e.code !== NavigationCancellationCode.SupersededByNewNavigation) {\n // It seems weird that `navigated` is set to `true` when the navigation is rejected,\n // however it's how things were written initially. Investigation would need to be done\n // to determine if this can be removed.\n this.navigated = true;\n } else if (e instanceof NavigationEnd) {\n this.navigated = true;\n } else if (e instanceof RedirectRequest) {\n const opts = e.navigationBehaviorOptions;\n const mergedTree = this.urlHandlingStrategy.merge(e.url, currentTransition.currentRawUrl);\n const extras = {\n // Persist transient navigation info from the original navigation request.\n info: currentTransition.extras.info,\n skipLocationChange: currentTransition.extras.skipLocationChange,\n // The URL is already updated at this point if we have 'eager' URL\n // updates or if the navigation was triggered by the browser (back\n // button, URL bar, etc). We want to replace that item in history\n // if the navigation is rejected.\n replaceUrl: currentTransition.extras.replaceUrl || this.urlUpdateStrategy === 'eager' || isBrowserTriggeredNavigation(currentTransition.source),\n // allow developer to override default options with RedirectCommand\n ...opts\n };\n this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras, {\n resolve: currentTransition.resolve,\n reject: currentTransition.reject,\n promise: currentTransition.promise\n });\n }\n }\n // Note that it's important to have the Router process the events _before_ the event is\n // pushed through the public observable. This ensures the correct router state is in place\n // before applications observe the events.\n if (isPublicRouterEvent(e)) {\n this._events.next(e);\n }\n } catch (e) {\n this.navigationTransitions.transitionAbortSubject.next(e);\n }\n });\n this.eventsSubscription.add(subscription);\n }\n /** @internal */\n resetRootComponentType(rootComponentType) {\n // TODO: vsavkin router 4.0 should make the root component set to null\n // this will simplify the lifecycle of the router.\n this.routerState.root.component = rootComponentType;\n this.navigationTransitions.rootComponentType = rootComponentType;\n }\n /**\n * Sets up the location change listener and performs the initial navigation.\n */\n initialNavigation() {\n this.setUpLocationChangeListener();\n if (!this.navigationTransitions.hasRequestedNavigation) {\n this.navigateToSyncWithBrowser(this.location.path(true), IMPERATIVE_NAVIGATION, this.stateManager.restoredState());\n }\n }\n /**\n * Sets up the location change listener. This listener detects navigations triggered from outside\n * the Router (the browser back/forward buttons, for example) and schedules a corresponding Router\n * navigation so that the correct events, guards, etc. are triggered.\n */\n setUpLocationChangeListener() {\n // Don't need to use Zone.wrap any more, because zone.js\n // already patch onPopState, so location change callback will\n // run into ngZone\n this.nonRouterCurrentEntryChangeSubscription ??= this.stateManager.registerNonRouterCurrentEntryChangeListener((url, state) => {\n // The `setTimeout` was added in #12160 and is likely to support Angular/AngularJS\n // hybrid apps.\n setTimeout(() => {\n this.navigateToSyncWithBrowser(url, 'popstate', state);\n }, 0);\n });\n }\n /**\n * Schedules a router navigation to synchronize Router state with the browser state.\n *\n * This is done as a response to a popstate event and the initial navigation. These\n * two scenarios represent times when the browser URL/state has been updated and\n * the Router needs to respond to ensure its internal state matches.\n */\n navigateToSyncWithBrowser(url, source, state) {\n const extras = {\n replaceUrl: true\n };\n // TODO: restoredState should always include the entire state, regardless\n // of navigationId. This requires a breaking change to update the type on\n // NavigationStart’s restoredState, which currently requires navigationId\n // to always be present. The Router used to only restore history state if\n // a navigationId was present.\n // The stored navigationId is used by the RouterScroller to retrieve the scroll\n // position for the page.\n const restoredState = state?.navigationId ? state : null;\n // Separate to NavigationStart.restoredState, we must also restore the state to\n // history.state and generate a new navigationId, since it will be overwritten\n if (state) {\n const stateCopy = {\n ...state\n };\n delete stateCopy.navigationId;\n delete stateCopy.ɵrouterPageId;\n if (Object.keys(stateCopy).length !== 0) {\n extras.state = stateCopy;\n }\n }\n const urlTree = this.parseUrl(url);\n this.scheduleNavigation(urlTree, source, restoredState, extras);\n }\n /** The current URL. */\n get url() {\n return this.serializeUrl(this.currentUrlTree);\n }\n /**\n * Returns the current `Navigation` object when the router is navigating,\n * and `null` when idle.\n */\n getCurrentNavigation() {\n return this.navigationTransitions.currentNavigation;\n }\n /**\n * The `Navigation` object of the most recent navigation to succeed and `null` if there\n * has not been a successful navigation yet.\n */\n get lastSuccessfulNavigation() {\n return this.navigationTransitions.lastSuccessfulNavigation;\n }\n /**\n * Resets the route configuration used for navigation and generating links.\n *\n * @param config The route array for the new configuration.\n *\n * @usageNotes\n *\n * ```\n * router.resetConfig([\n * { path: 'team/:id', component: TeamCmp, children: [\n * { path: 'simple', component: SimpleCmp },\n * { path: 'user/:name', component: UserCmp }\n * ]}\n * ]);\n * ```\n */\n resetConfig(config) {\n (typeof ngDevMode === 'undefined' || ngDevMode) && validateConfig(config);\n this.config = config.map(standardizeConfig);\n this.navigated = false;\n }\n /** @nodoc */\n ngOnDestroy() {\n this.dispose();\n }\n /** Disposes of the router. */\n dispose() {\n this.navigationTransitions.complete();\n if (this.nonRouterCurrentEntryChangeSubscription) {\n this.nonRouterCurrentEntryChangeSubscription.unsubscribe();\n this.nonRouterCurrentEntryChangeSubscription = undefined;\n }\n this.disposed = true;\n this.eventsSubscription.unsubscribe();\n }\n /**\n * Appends URL segments to the current URL tree to create a new URL tree.\n *\n * @param commands An array of URL fragments with which to construct the new URL tree.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the current URL tree or the one provided in the `relativeTo`\n * property of the options object, if supplied.\n * @param navigationExtras Options that control the navigation strategy.\n * @returns The new URL tree.\n *\n * @usageNotes\n *\n * ```\n * // create /team/33/user/11\n * router.createUrlTree(['/team', 33, 'user', 11]);\n *\n * // create /team/33;expand=true/user/11\n * router.createUrlTree(['/team', 33, {expand: true}, 'user', 11]);\n *\n * // you can collapse static segments like this (this works only with the first passed-in value):\n * router.createUrlTree(['/team/33/user', userId]);\n *\n * // If the first segment can contain slashes, and you do not want the router to split it,\n * // you can do the following:\n * router.createUrlTree([{segmentPath: '/one/two'}]);\n *\n * // create /team/33/(user/11//right:chat)\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: 'chat'}}]);\n *\n * // remove the right secondary node\n * router.createUrlTree(['/team', 33, {outlets: {primary: 'user/11', right: null}}]);\n *\n * // assuming the current url is `/team/33/user/11` and the route points to `user/11`\n *\n * // navigate to /team/33/user/11/details\n * router.createUrlTree(['details'], {relativeTo: route});\n *\n * // navigate to /team/33/user/22\n * router.createUrlTree(['../22'], {relativeTo: route});\n *\n * // navigate to /team/44/user/22\n * router.createUrlTree(['../../team/44/user/22'], {relativeTo: route});\n *\n * Note that a value of `null` or `undefined` for `relativeTo` indicates that the\n * tree should be created relative to the root.\n * ```\n */\n createUrlTree(commands, navigationExtras = {}) {\n const {\n relativeTo,\n queryParams,\n fragment,\n queryParamsHandling,\n preserveFragment\n } = navigationExtras;\n const f = preserveFragment ? this.currentUrlTree.fragment : fragment;\n let q = null;\n switch (queryParamsHandling) {\n case 'merge':\n q = {\n ...this.currentUrlTree.queryParams,\n ...queryParams\n };\n break;\n case 'preserve':\n q = this.currentUrlTree.queryParams;\n break;\n default:\n q = queryParams || null;\n }\n if (q !== null) {\n q = this.removeEmptyProps(q);\n }\n let relativeToUrlSegmentGroup;\n try {\n const relativeToSnapshot = relativeTo ? relativeTo.snapshot : this.routerState.snapshot.root;\n relativeToUrlSegmentGroup = createSegmentGroupFromRoute(relativeToSnapshot);\n } catch (e) {\n // This is strictly for backwards compatibility with tests that create\n // invalid `ActivatedRoute` mocks.\n // Note: the difference between having this fallback for invalid `ActivatedRoute` setups and\n // just throwing is ~500 test failures. Fixing all of those tests by hand is not feasible at\n // the moment.\n if (typeof commands[0] !== 'string' || commands[0][0] !== '/') {\n // Navigations that were absolute in the old way of creating UrlTrees\n // would still work because they wouldn't attempt to match the\n // segments in the `ActivatedRoute` to the `currentUrlTree` but\n // instead just replace the root segment with the navigation result.\n // Non-absolute navigations would fail to apply the commands because\n // the logic could not find the segment to replace (so they'd act like there were no\n // commands).\n commands = [];\n }\n relativeToUrlSegmentGroup = this.currentUrlTree.root;\n }\n return createUrlTreeFromSegmentGroup(relativeToUrlSegmentGroup, commands, q, f ?? null);\n }\n /**\n * Navigates to a view using an absolute route path.\n *\n * @param url An absolute path for a defined route. The function does not apply any delta to the\n * current URL.\n * @param extras An object containing properties that modify the navigation strategy.\n *\n * @returns A Promise that resolves to 'true' when navigation succeeds,\n * to 'false' when navigation fails, or is rejected on error.\n *\n * @usageNotes\n *\n * The following calls request navigation to an absolute path.\n *\n * ```\n * router.navigateByUrl(\"/team/33/user/11\");\n *\n * // Navigate without updating the URL\n * router.navigateByUrl(\"/team/33/user/11\", { skipLocationChange: true });\n * ```\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n *\n */\n navigateByUrl(url, extras = {\n skipLocationChange: false\n }) {\n const urlTree = isUrlTree(url) ? url : this.parseUrl(url);\n const mergedTree = this.urlHandlingStrategy.merge(urlTree, this.rawUrlTree);\n return this.scheduleNavigation(mergedTree, IMPERATIVE_NAVIGATION, null, extras);\n }\n /**\n * Navigate based on the provided array of commands and a starting point.\n * If no starting route is provided, the navigation is absolute.\n *\n * @param commands An array of URL fragments with which to construct the target URL.\n * If the path is static, can be the literal URL string. For a dynamic path, pass an array of path\n * segments, followed by the parameters for each segment.\n * The fragments are applied to the current URL or the one provided in the `relativeTo` property\n * of the options object, if supplied.\n * @param extras An options object that determines how the URL should be constructed or\n * interpreted.\n *\n * @returns A Promise that resolves to `true` when navigation succeeds, or `false` when navigation\n * fails. The Promise is rejected when an error occurs if `resolveNavigationPromiseOnError` is\n * not `true`.\n *\n * @usageNotes\n *\n * The following calls request navigation to a dynamic route path relative to the current URL.\n *\n * ```\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route});\n *\n * // Navigate without updating the URL, overriding the default behavior\n * router.navigate(['team', 33, 'user', 11], {relativeTo: route, skipLocationChange: true});\n * ```\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks)\n *\n */\n navigate(commands, extras = {\n skipLocationChange: false\n }) {\n validateCommands(commands);\n return this.navigateByUrl(this.createUrlTree(commands, extras), extras);\n }\n /** Serializes a `UrlTree` into a string */\n serializeUrl(url) {\n return this.urlSerializer.serialize(url);\n }\n /** Parses a string into a `UrlTree` */\n parseUrl(url) {\n try {\n return this.urlSerializer.parse(url);\n } catch {\n return this.urlSerializer.parse('/');\n }\n }\n isActive(url, matchOptions) {\n let options;\n if (matchOptions === true) {\n options = {\n ...exactMatchOptions\n };\n } else if (matchOptions === false) {\n options = {\n ...subsetMatchOptions\n };\n } else {\n options = matchOptions;\n }\n if (isUrlTree(url)) {\n return containsTree(this.currentUrlTree, url, options);\n }\n const urlTree = this.parseUrl(url);\n return containsTree(this.currentUrlTree, urlTree, options);\n }\n removeEmptyProps(params) {\n return Object.entries(params).reduce((result, [key, value]) => {\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n return result;\n }, {});\n }\n scheduleNavigation(rawUrl, source, restoredState, extras, priorPromise) {\n if (this.disposed) {\n return Promise.resolve(false);\n }\n let resolve;\n let reject;\n let promise;\n if (priorPromise) {\n resolve = priorPromise.resolve;\n reject = priorPromise.reject;\n promise = priorPromise.promise;\n } else {\n promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n }\n // Indicate that the navigation is happening.\n const taskId = this.pendingTasks.add();\n afterNextNavigation(this, () => {\n // Remove pending task in a microtask to allow for cancelled\n // initial navigations and redirects within the same task.\n queueMicrotask(() => this.pendingTasks.remove(taskId));\n });\n this.navigationTransitions.handleNavigationRequest({\n source,\n restoredState,\n currentUrlTree: this.currentUrlTree,\n currentRawUrl: this.currentUrlTree,\n rawUrl,\n extras,\n resolve: resolve,\n reject: reject,\n promise,\n currentSnapshot: this.routerState.snapshot,\n currentRouterState: this.routerState\n });\n // Make sure that the error is propagated even though `processNavigations` catch\n // handler does not rethrow\n return promise.catch(e => {\n return Promise.reject(e);\n });\n }\n static {\n this.ɵfac = function Router_Factory(t) {\n return new (t || Router)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: Router,\n factory: Router.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return Router;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction validateCommands(commands) {\n for (let i = 0; i < commands.length; i++) {\n const cmd = commands[i];\n if (cmd == null) {\n throw new ɵRuntimeError(4008 /* RuntimeErrorCode.NULLISH_COMMAND */, (typeof ngDevMode === 'undefined' || ngDevMode) && `The requested path contains ${cmd} segment at index ${i}`);\n }\n }\n}\nfunction isPublicRouterEvent(e) {\n return !(e instanceof BeforeActivateRoutes) && !(e instanceof RedirectRequest);\n}\n\n/**\n * @description\n *\n * When applied to an element in a template, makes that element a link\n * that initiates navigation to a route. Navigation opens one or more routed components\n * in one or more `` locations on the page.\n *\n * Given a route configuration `[{ path: 'user/:name', component: UserCmp }]`,\n * the following creates a static link to the route:\n * `link to user component`\n *\n * You can use dynamic values to generate the link.\n * For a dynamic link, pass an array of path segments,\n * followed by the params for each segment.\n * For example, `['/team', teamId, 'user', userName, {details: true}]`\n * generates a link to `/team/11/user/bob;details=true`.\n *\n * Multiple static segments can be merged into one term and combined with dynamic segments.\n * For example, `['/team/11/user', userName, {details: true}]`\n *\n * The input that you provide to the link is treated as a delta to the current URL.\n * For instance, suppose the current URL is `/user/(box//aux:team)`.\n * The link `Jim` creates the URL\n * `/user/(jim//aux:team)`.\n * See {@link Router#createUrlTree} for more information.\n *\n * @usageNotes\n *\n * You can use absolute or relative paths in a link, set query parameters,\n * control how parameters are handled, and keep a history of navigation states.\n *\n * ### Relative link paths\n *\n * The first segment name can be prepended with `/`, `./`, or `../`.\n * * If the first segment begins with `/`, the router looks up the route from the root of the\n * app.\n * * If the first segment begins with `./`, or doesn't begin with a slash, the router\n * looks in the children of the current activated route.\n * * If the first segment begins with `../`, the router goes up one level in the route tree.\n *\n * ### Setting and handling query params and fragments\n *\n * The following link adds a query parameter and a fragment to the generated URL:\n *\n * ```\n * \n * link to user component\n * \n * ```\n * By default, the directive constructs the new URL using the given query parameters.\n * The example generates the link: `/user/bob?debug=true#education`.\n *\n * You can instruct the directive to handle query parameters differently\n * by specifying the `queryParamsHandling` option in the link.\n * Allowed values are:\n *\n * - `'merge'`: Merge the given `queryParams` into the current query params.\n * - `'preserve'`: Preserve the current query params.\n *\n * For example:\n *\n * ```\n * \n * link to user component\n * \n * ```\n *\n * See {@link UrlCreationOptions#queryParamsHandling}.\n *\n * ### Preserving navigation history\n *\n * You can provide a `state` value to be persisted to the browser's\n * [`History.state` property](https://developer.mozilla.org/en-US/docs/Web/API/History#Properties).\n * For example:\n *\n * ```\n * \n * link to user component\n * \n * ```\n *\n * Use {@link Router#getCurrentNavigation} to retrieve a saved\n * navigation-state value. For example, to capture the `tracingId` during the `NavigationStart`\n * event:\n *\n * ```\n * // Get NavigationStart events\n * router.events.pipe(filter(e => e instanceof NavigationStart)).subscribe(e => {\n * const navigation = router.getCurrentNavigation();\n * tracingService.trace({id: navigation.extras.state.tracingId});\n * });\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet RouterLink = /*#__PURE__*/(() => {\n class RouterLink {\n constructor(router, route, tabIndexAttribute, renderer, el, locationStrategy) {\n this.router = router;\n this.route = route;\n this.tabIndexAttribute = tabIndexAttribute;\n this.renderer = renderer;\n this.el = el;\n this.locationStrategy = locationStrategy;\n /**\n * Represents an `href` attribute value applied to a host element,\n * when a host element is ``. For other tags, the value is `null`.\n */\n this.href = null;\n this.commands = null;\n /** @internal */\n this.onChanges = new Subject();\n /**\n * Passed to {@link Router#createUrlTree} as part of the\n * `UrlCreationOptions`.\n * @see {@link UrlCreationOptions#preserveFragment}\n * @see {@link Router#createUrlTree}\n */\n this.preserveFragment = false;\n /**\n * Passed to {@link Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#skipLocationChange}\n * @see {@link Router#navigateByUrl}\n */\n this.skipLocationChange = false;\n /**\n * Passed to {@link Router#navigateByUrl} as part of the\n * `NavigationBehaviorOptions`.\n * @see {@link NavigationBehaviorOptions#replaceUrl}\n * @see {@link Router#navigateByUrl}\n */\n this.replaceUrl = false;\n const tagName = el.nativeElement.tagName?.toLowerCase();\n this.isAnchorElement = tagName === 'a' || tagName === 'area';\n if (this.isAnchorElement) {\n this.subscription = router.events.subscribe(s => {\n if (s instanceof NavigationEnd) {\n this.updateHref();\n }\n });\n } else {\n this.setTabIndexIfNotOnNativeEl('0');\n }\n }\n /**\n * Modifies the tab index if there was not a tabindex attribute on the element during\n * instantiation.\n */\n setTabIndexIfNotOnNativeEl(newTabIndex) {\n if (this.tabIndexAttribute != null /* both `null` and `undefined` */ || this.isAnchorElement) {\n return;\n }\n this.applyAttributeValue('tabindex', newTabIndex);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n if (this.isAnchorElement) {\n this.updateHref();\n }\n // This is subscribed to by `RouterLinkActive` so that it knows to update when there are changes\n // to the RouterLinks it's tracking.\n this.onChanges.next(this);\n }\n /**\n * Commands to pass to {@link Router#createUrlTree}.\n * - **array**: commands to pass to {@link Router#createUrlTree}.\n * - **string**: shorthand for array of commands with just the string, i.e. `['/route']`\n * - **null|undefined**: effectively disables the `routerLink`\n * @see {@link Router#createUrlTree}\n */\n set routerLink(commands) {\n if (commands != null) {\n this.commands = Array.isArray(commands) ? commands : [commands];\n this.setTabIndexIfNotOnNativeEl('0');\n } else {\n this.commands = null;\n this.setTabIndexIfNotOnNativeEl(null);\n }\n }\n /** @nodoc */\n onClick(button, ctrlKey, shiftKey, altKey, metaKey) {\n const urlTree = this.urlTree;\n if (urlTree === null) {\n return true;\n }\n if (this.isAnchorElement) {\n if (button !== 0 || ctrlKey || shiftKey || altKey || metaKey) {\n return true;\n }\n if (typeof this.target === 'string' && this.target != '_self') {\n return true;\n }\n }\n const extras = {\n skipLocationChange: this.skipLocationChange,\n replaceUrl: this.replaceUrl,\n state: this.state,\n info: this.info\n };\n this.router.navigateByUrl(urlTree, extras);\n // Return `false` for `` elements to prevent default action\n // and cancel the native behavior, since the navigation is handled\n // by the Router.\n return !this.isAnchorElement;\n }\n /** @nodoc */\n ngOnDestroy() {\n this.subscription?.unsubscribe();\n }\n updateHref() {\n const urlTree = this.urlTree;\n this.href = urlTree !== null && this.locationStrategy ? this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(urlTree)) : null;\n const sanitizedValue = this.href === null ? null :\n // This class represents a directive that can be added to both `` elements,\n // as well as other elements. As a result, we can't define security context at\n // compile time. So the security context is deferred to runtime.\n // The `ɵɵsanitizeUrlOrResourceUrl` selects the necessary sanitizer function\n // based on the tag and property names. The logic mimics the one from\n // `packages/compiler/src/schema/dom_security_schema.ts`, which is used at compile time.\n //\n // Note: we should investigate whether we can switch to using `@HostBinding('attr.href')`\n // instead of applying a value via a renderer, after a final merge of the\n // `RouterLinkWithHref` directive.\n ɵɵsanitizeUrlOrResourceUrl(this.href, this.el.nativeElement.tagName.toLowerCase(), 'href');\n this.applyAttributeValue('href', sanitizedValue);\n }\n applyAttributeValue(attrName, attrValue) {\n const renderer = this.renderer;\n const nativeElement = this.el.nativeElement;\n if (attrValue !== null) {\n renderer.setAttribute(nativeElement, attrName, attrValue);\n } else {\n renderer.removeAttribute(nativeElement, attrName);\n }\n }\n get urlTree() {\n if (this.commands === null) {\n return null;\n }\n return this.router.createUrlTree(this.commands, {\n // If the `relativeTo` input is not defined, we want to use `this.route` by default.\n // Otherwise, we should use the value provided by the user in the input.\n relativeTo: this.relativeTo !== undefined ? this.relativeTo : this.route,\n queryParams: this.queryParams,\n fragment: this.fragment,\n queryParamsHandling: this.queryParamsHandling,\n preserveFragment: this.preserveFragment\n });\n }\n static {\n this.ɵfac = function RouterLink_Factory(t) {\n return new (t || RouterLink)(i0.ɵɵdirectiveInject(Router), i0.ɵɵdirectiveInject(ActivatedRoute), i0.ɵɵinjectAttribute('tabindex'), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i3.LocationStrategy));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: RouterLink,\n selectors: [[\"\", \"routerLink\", \"\"]],\n hostVars: 1,\n hostBindings: function RouterLink_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function RouterLink_click_HostBindingHandler($event) {\n return ctx.onClick($event.button, $event.ctrlKey, $event.shiftKey, $event.altKey, $event.metaKey);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"target\", ctx.target);\n }\n },\n inputs: {\n target: \"target\",\n queryParams: \"queryParams\",\n fragment: \"fragment\",\n queryParamsHandling: \"queryParamsHandling\",\n state: \"state\",\n info: \"info\",\n relativeTo: \"relativeTo\",\n preserveFragment: [2, \"preserveFragment\", \"preserveFragment\", booleanAttribute],\n skipLocationChange: [2, \"skipLocationChange\", \"skipLocationChange\", booleanAttribute],\n replaceUrl: [2, \"replaceUrl\", \"replaceUrl\", booleanAttribute],\n routerLink: \"routerLink\"\n },\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return RouterLink;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n *\n * @description\n *\n * Tracks whether the linked route of an element is currently active, and allows you\n * to specify one or more CSS classes to add to the element when the linked route\n * is active.\n *\n * Use this directive to create a visual distinction for elements associated with an active route.\n * For example, the following code highlights the word \"Bob\" when the router\n * activates the associated route:\n *\n * ```\n * Bob\n * ```\n *\n * Whenever the URL is either '/user' or '/user/bob', the \"active-link\" class is\n * added to the anchor tag. If the URL changes, the class is removed.\n *\n * You can set more than one class using a space-separated string or an array.\n * For example:\n *\n * ```\n * Bob\n * Bob\n * ```\n *\n * To add the classes only when the URL matches the link exactly, add the option `exact: true`:\n *\n * ```\n * Bob\n * ```\n *\n * To directly check the `isActive` status of the link, assign the `RouterLinkActive`\n * instance to a template variable.\n * For example, the following checks the status without assigning any CSS classes:\n *\n * ```\n * \n * Bob {{ rla.isActive ? '(already open)' : ''}}\n * \n * ```\n *\n * You can apply the `RouterLinkActive` directive to an ancestor of linked elements.\n * For example, the following sets the active-link class on the `
` parent tag\n * when the URL is either '/user/jim' or '/user/bob'.\n *\n * ```\n *
\n * Jim\n * Bob\n *
\n * ```\n *\n * The `RouterLinkActive` directive can also be used to set the aria-current attribute\n * to provide an alternative distinction for active elements to visually impaired users.\n *\n * For example, the following code adds the 'active' class to the Home Page link when it is\n * indeed active and in such case also sets its aria-current attribute to 'page':\n *\n * ```\n * Home Page\n * ```\n *\n * @ngModule RouterModule\n *\n * @publicApi\n */\nlet RouterLinkActive = /*#__PURE__*/(() => {\n class RouterLinkActive {\n get isActive() {\n return this._isActive;\n }\n constructor(router, element, renderer, cdr, link) {\n this.router = router;\n this.element = element;\n this.renderer = renderer;\n this.cdr = cdr;\n this.link = link;\n this.classes = [];\n this._isActive = false;\n /**\n * Options to configure how to determine if the router link is active.\n *\n * These options are passed to the `Router.isActive()` function.\n *\n * @see {@link Router#isActive}\n */\n this.routerLinkActiveOptions = {\n exact: false\n };\n /**\n *\n * You can use the output `isActiveChange` to get notified each time the link becomes\n * active or inactive.\n *\n * Emits:\n * true -> Route is active\n * false -> Route is inactive\n *\n * ```\n * Bob\n * ```\n */\n this.isActiveChange = new EventEmitter();\n this.routerEventsSubscription = router.events.subscribe(s => {\n if (s instanceof NavigationEnd) {\n this.update();\n }\n });\n }\n /** @nodoc */\n ngAfterContentInit() {\n // `of(null)` is used to force subscribe body to execute once immediately (like `startWith`).\n of(this.links.changes, of(null)).pipe(mergeAll()).subscribe(_ => {\n this.update();\n this.subscribeToEachLinkOnChanges();\n });\n }\n subscribeToEachLinkOnChanges() {\n this.linkInputChangesSubscription?.unsubscribe();\n const allLinkChanges = [...this.links.toArray(), this.link].filter(link => !!link).map(link => link.onChanges);\n this.linkInputChangesSubscription = from(allLinkChanges).pipe(mergeAll()).subscribe(link => {\n if (this._isActive !== this.isLinkActive(this.router)(link)) {\n this.update();\n }\n });\n }\n set routerLinkActive(data) {\n const classes = Array.isArray(data) ? data : data.split(' ');\n this.classes = classes.filter(c => !!c);\n }\n /** @nodoc */\n ngOnChanges(changes) {\n this.update();\n }\n /** @nodoc */\n ngOnDestroy() {\n this.routerEventsSubscription.unsubscribe();\n this.linkInputChangesSubscription?.unsubscribe();\n }\n update() {\n if (!this.links || !this.router.navigated) return;\n queueMicrotask(() => {\n const hasActiveLinks = this.hasActiveLinks();\n this.classes.forEach(c => {\n if (hasActiveLinks) {\n this.renderer.addClass(this.element.nativeElement, c);\n } else {\n this.renderer.removeClass(this.element.nativeElement, c);\n }\n });\n if (hasActiveLinks && this.ariaCurrentWhenActive !== undefined) {\n this.renderer.setAttribute(this.element.nativeElement, 'aria-current', this.ariaCurrentWhenActive.toString());\n } else {\n this.renderer.removeAttribute(this.element.nativeElement, 'aria-current');\n }\n // Only emit change if the active state changed.\n if (this._isActive !== hasActiveLinks) {\n this._isActive = hasActiveLinks;\n this.cdr.markForCheck();\n // Emit on isActiveChange after classes are updated\n this.isActiveChange.emit(hasActiveLinks);\n }\n });\n }\n isLinkActive(router) {\n const options = isActiveMatchOptions(this.routerLinkActiveOptions) ? this.routerLinkActiveOptions :\n // While the types should disallow `undefined` here, it's possible without strict inputs\n this.routerLinkActiveOptions.exact || false;\n return link => {\n const urlTree = link.urlTree;\n return urlTree ? router.isActive(urlTree, options) : false;\n };\n }\n hasActiveLinks() {\n const isActiveCheckFn = this.isLinkActive(this.router);\n return this.link && isActiveCheckFn(this.link) || this.links.some(isActiveCheckFn);\n }\n static {\n this.ɵfac = function RouterLinkActive_Factory(t) {\n return new (t || RouterLinkActive)(i0.ɵɵdirectiveInject(Router), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(RouterLink, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: RouterLinkActive,\n selectors: [[\"\", \"routerLinkActive\", \"\"]],\n contentQueries: function RouterLinkActive_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, RouterLink, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.links = _t);\n }\n },\n inputs: {\n routerLinkActiveOptions: \"routerLinkActiveOptions\",\n ariaCurrentWhenActive: \"ariaCurrentWhenActive\",\n routerLinkActive: \"routerLinkActive\"\n },\n outputs: {\n isActiveChange: \"isActiveChange\"\n },\n exportAs: [\"routerLinkActive\"],\n standalone: true,\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return RouterLinkActive;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Use instead of `'paths' in options` to be compatible with property renaming\n */\nfunction isActiveMatchOptions(options) {\n return !!options.paths;\n}\n\n/**\n * @description\n *\n * Provides a preloading strategy.\n *\n * @publicApi\n */\nclass PreloadingStrategy {}\n/**\n * @description\n *\n * Provides a preloading strategy that preloads all modules as quickly as possible.\n *\n * ```\n * RouterModule.forRoot(ROUTES, {preloadingStrategy: PreloadAllModules})\n * ```\n *\n * @publicApi\n */\nlet PreloadAllModules = /*#__PURE__*/(() => {\n class PreloadAllModules {\n preload(route, fn) {\n return fn().pipe(catchError(() => of(null)));\n }\n static {\n this.ɵfac = function PreloadAllModules_Factory(t) {\n return new (t || PreloadAllModules)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: PreloadAllModules,\n factory: PreloadAllModules.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return PreloadAllModules;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @description\n *\n * Provides a preloading strategy that does not preload any modules.\n *\n * This strategy is enabled by default.\n *\n * @publicApi\n */\nlet NoPreloading = /*#__PURE__*/(() => {\n class NoPreloading {\n preload(route, fn) {\n return of(null);\n }\n static {\n this.ɵfac = function NoPreloading_Factory(t) {\n return new (t || NoPreloading)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NoPreloading,\n factory: NoPreloading.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return NoPreloading;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * The preloader optimistically loads all router configurations to\n * make navigations into lazily-loaded sections of the application faster.\n *\n * The preloader runs in the background. When the router bootstraps, the preloader\n * starts listening to all navigation events. After every such event, the preloader\n * will check if any configurations can be loaded lazily.\n *\n * If a route is protected by `canLoad` guards, the preloaded will not load it.\n *\n * @publicApi\n */\nlet RouterPreloader = /*#__PURE__*/(() => {\n class RouterPreloader {\n constructor(router, compiler, injector, preloadingStrategy, loader) {\n this.router = router;\n this.injector = injector;\n this.preloadingStrategy = preloadingStrategy;\n this.loader = loader;\n }\n setUpPreloading() {\n this.subscription = this.router.events.pipe(filter(e => e instanceof NavigationEnd), concatMap(() => this.preload())).subscribe(() => {});\n }\n preload() {\n return this.processRoutes(this.injector, this.router.config);\n }\n /** @nodoc */\n ngOnDestroy() {\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n processRoutes(injector, routes) {\n const res = [];\n for (const route of routes) {\n if (route.providers && !route._injector) {\n route._injector = createEnvironmentInjector(route.providers, injector, `Route: ${route.path}`);\n }\n const injectorForCurrentRoute = route._injector ?? injector;\n const injectorForChildren = route._loadedInjector ?? injectorForCurrentRoute;\n // Note that `canLoad` is only checked as a condition that prevents `loadChildren` and not\n // `loadComponent`. `canLoad` guards only block loading of child routes by design. This\n // happens as a consequence of needing to descend into children for route matching immediately\n // while component loading is deferred until route activation. Because `canLoad` guards can\n // have side effects, we cannot execute them here so we instead skip preloading altogether\n // when present. Lastly, it remains to be decided whether `canLoad` should behave this way\n // at all. Code splitting and lazy loading is separate from client-side authorization checks\n // and should not be used as a security measure to prevent loading of code.\n if (route.loadChildren && !route._loadedRoutes && route.canLoad === undefined || route.loadComponent && !route._loadedComponent) {\n res.push(this.preloadConfig(injectorForCurrentRoute, route));\n }\n if (route.children || route._loadedRoutes) {\n res.push(this.processRoutes(injectorForChildren, route.children ?? route._loadedRoutes));\n }\n }\n return from(res).pipe(mergeAll());\n }\n preloadConfig(injector, route) {\n return this.preloadingStrategy.preload(route, () => {\n let loadedChildren$;\n if (route.loadChildren && route.canLoad === undefined) {\n loadedChildren$ = this.loader.loadChildren(injector, route);\n } else {\n loadedChildren$ = of(null);\n }\n const recursiveLoadChildren$ = loadedChildren$.pipe(mergeMap(config => {\n if (config === null) {\n return of(void 0);\n }\n route._loadedRoutes = config.routes;\n route._loadedInjector = config.injector;\n // If the loaded config was a module, use that as the module/module injector going\n // forward. Otherwise, continue using the current module/module injector.\n return this.processRoutes(config.injector ?? injector, config.routes);\n }));\n if (route.loadComponent && !route._loadedComponent) {\n const loadComponent$ = this.loader.loadComponent(route);\n return from([recursiveLoadChildren$, loadComponent$]).pipe(mergeAll());\n } else {\n return recursiveLoadChildren$;\n }\n });\n }\n static {\n this.ɵfac = function RouterPreloader_Factory(t) {\n return new (t || RouterPreloader)(i0.ɵɵinject(Router), i0.ɵɵinject(i0.Compiler), i0.ɵɵinject(i0.EnvironmentInjector), i0.ɵɵinject(PreloadingStrategy), i0.ɵɵinject(RouterConfigLoader));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: RouterPreloader,\n factory: RouterPreloader.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return RouterPreloader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst ROUTER_SCROLLER = /*#__PURE__*/new InjectionToken('');\nlet RouterScroller = /*#__PURE__*/(() => {\n class RouterScroller {\n /** @nodoc */\n constructor(urlSerializer, transitions, viewportScroller, zone, options = {}) {\n this.urlSerializer = urlSerializer;\n this.transitions = transitions;\n this.viewportScroller = viewportScroller;\n this.zone = zone;\n this.options = options;\n this.lastId = 0;\n this.lastSource = 'imperative';\n this.restoredId = 0;\n this.store = {};\n this.environmentInjector = inject(EnvironmentInjector);\n // Default both options to 'disabled'\n options.scrollPositionRestoration ||= 'disabled';\n options.anchorScrolling ||= 'disabled';\n }\n init() {\n // we want to disable the automatic scrolling because having two places\n // responsible for scrolling results race conditions, especially given\n // that browser don't implement this behavior consistently\n if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.setHistoryScrollRestoration('manual');\n }\n this.routerEventsSubscription = this.createScrollEvents();\n this.scrollEventsSubscription = this.consumeScrollEvents();\n }\n createScrollEvents() {\n return this.transitions.events.subscribe(e => {\n if (e instanceof NavigationStart) {\n // store the scroll position of the current stable navigations.\n this.store[this.lastId] = this.viewportScroller.getScrollPosition();\n this.lastSource = e.navigationTrigger;\n this.restoredId = e.restoredState ? e.restoredState.navigationId : 0;\n } else if (e instanceof NavigationEnd) {\n this.lastId = e.id;\n this.scheduleScrollEvent(e, this.urlSerializer.parse(e.urlAfterRedirects).fragment);\n } else if (e instanceof NavigationSkipped && e.code === NavigationSkippedCode.IgnoredSameUrlNavigation) {\n this.lastSource = undefined;\n this.restoredId = 0;\n this.scheduleScrollEvent(e, this.urlSerializer.parse(e.url).fragment);\n }\n });\n }\n consumeScrollEvents() {\n return this.transitions.events.subscribe(e => {\n if (!(e instanceof Scroll)) return;\n // a popstate event. The pop state event will always ignore anchor scrolling.\n if (e.position) {\n if (this.options.scrollPositionRestoration === 'top') {\n this.viewportScroller.scrollToPosition([0, 0]);\n } else if (this.options.scrollPositionRestoration === 'enabled') {\n this.viewportScroller.scrollToPosition(e.position);\n }\n // imperative navigation \"forward\"\n } else {\n if (e.anchor && this.options.anchorScrolling === 'enabled') {\n this.viewportScroller.scrollToAnchor(e.anchor);\n } else if (this.options.scrollPositionRestoration !== 'disabled') {\n this.viewportScroller.scrollToPosition([0, 0]);\n }\n }\n });\n }\n scheduleScrollEvent(routerEvent, anchor) {\n this.zone.runOutsideAngular(async () => {\n // The scroll event needs to be delayed until after change detection. Otherwise we may\n // attempt to restore the scroll position before the router outlet has fully rendered the\n // component by executing its update block of the template function.\n await new Promise(resolve => {\n // TODO(atscott): Attempt to remove the setTimeout in a future PR.\n setTimeout(() => {\n resolve();\n });\n afterNextRender(() => {\n resolve();\n }, {\n injector: this.environmentInjector\n });\n });\n this.zone.run(() => {\n this.transitions.events.next(new Scroll(routerEvent, this.lastSource === 'popstate' ? this.store[this.restoredId] : null, anchor));\n });\n });\n }\n /** @nodoc */\n ngOnDestroy() {\n this.routerEventsSubscription?.unsubscribe();\n this.scrollEventsSubscription?.unsubscribe();\n }\n static {\n this.ɵfac = function RouterScroller_Factory(t) {\n i0.ɵɵinvalidFactory();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: RouterScroller,\n factory: RouterScroller.ɵfac\n });\n }\n }\n return RouterScroller;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Sets up providers necessary to enable `Router` functionality for the application.\n * Allows to configure a set of routes as well as extra features that should be enabled.\n *\n * @usageNotes\n *\n * Basic example of how you can add a Router to your application:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent, {\n * providers: [provideRouter(appRoutes)]\n * });\n * ```\n *\n * You can also enable optional features in the Router by adding functions from the `RouterFeatures`\n * type:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes,\n * withDebugTracing(),\n * withRouterConfig({paramsInheritanceStrategy: 'always'}))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link RouterFeatures}\n *\n * @publicApi\n * @param routes A set of `Route`s to use for the application routing table.\n * @param features Optional features to configure additional router behaviors.\n * @returns A set of providers to setup a Router.\n */\nfunction provideRouter(routes, ...features) {\n return makeEnvironmentProviders([{\n provide: ROUTES,\n multi: true,\n useValue: routes\n }, typeof ngDevMode === 'undefined' || ngDevMode ? {\n provide: ROUTER_IS_PROVIDED,\n useValue: true\n } : [], {\n provide: ActivatedRoute,\n useFactory: rootRoute,\n deps: [Router]\n }, {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useFactory: getBootstrapListener\n }, features.map(feature => feature.ɵproviders)]);\n}\nfunction rootRoute(router) {\n return router.routerState.root;\n}\n/**\n * Helper function to create an object that represents a Router feature.\n */\nfunction routerFeature(kind, providers) {\n return {\n ɵkind: kind,\n ɵproviders: providers\n };\n}\n/**\n * An Injection token used to indicate whether `provideRouter` or `RouterModule.forRoot` was ever\n * called.\n */\nconst ROUTER_IS_PROVIDED = /*#__PURE__*/new InjectionToken('', {\n providedIn: 'root',\n factory: () => false\n});\nconst routerIsProvidedDevModeCheck = {\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory() {\n return () => {\n if (!inject(ROUTER_IS_PROVIDED)) {\n console.warn('`provideRoutes` was called without `provideRouter` or `RouterModule.forRoot`. ' + 'This is likely a mistake.');\n }\n };\n }\n};\n/**\n * Registers a DI provider for a set of routes.\n * @param routes The route configuration to provide.\n *\n * @usageNotes\n *\n * ```\n * @NgModule({\n * providers: [provideRoutes(ROUTES)]\n * })\n * class LazyLoadedChildModule {}\n * ```\n *\n * @deprecated If necessary, provide routes using the `ROUTES` `InjectionToken`.\n * @see {@link ROUTES}\n * @publicApi\n */\nfunction provideRoutes(routes) {\n return [{\n provide: ROUTES,\n multi: true,\n useValue: routes\n }, typeof ngDevMode === 'undefined' || ngDevMode ? routerIsProvidedDevModeCheck : []];\n}\n/**\n * Enables customizable scrolling behavior for router navigations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable scrolling feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withInMemoryScrolling())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n * @see {@link ViewportScroller}\n *\n * @publicApi\n * @param options Set of configuration parameters to customize scrolling behavior, see\n * `InMemoryScrollingOptions` for additional information.\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withInMemoryScrolling(options = {}) {\n const providers = [{\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, options);\n }\n }];\n return routerFeature(4 /* RouterFeatureKind.InMemoryScrollingFeature */, providers);\n}\nfunction getBootstrapListener() {\n const injector = inject(Injector);\n return bootstrappedComponentRef => {\n const ref = injector.get(ApplicationRef);\n if (bootstrappedComponentRef !== ref.components[0]) {\n return;\n }\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n if (injector.get(INITIAL_NAVIGATION) === 1 /* InitialNavigation.EnabledNonBlocking */) {\n router.initialNavigation();\n }\n injector.get(ROUTER_PRELOADER, null, InjectFlags.Optional)?.setUpPreloading();\n injector.get(ROUTER_SCROLLER, null, InjectFlags.Optional)?.init();\n router.resetRootComponentType(ref.componentTypes[0]);\n if (!bootstrapDone.closed) {\n bootstrapDone.next();\n bootstrapDone.complete();\n bootstrapDone.unsubscribe();\n }\n };\n}\n/**\n * A subject used to indicate that the bootstrapping phase is done. When initial navigation is\n * `enabledBlocking`, the first navigation waits until bootstrapping is finished before continuing\n * to the activation phase.\n */\nconst BOOTSTRAP_DONE = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'bootstrap done indicator' : '', {\n factory: () => {\n return new Subject();\n }\n});\nconst INITIAL_NAVIGATION = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'initial navigation' : '', {\n providedIn: 'root',\n factory: () => 1 /* InitialNavigation.EnabledNonBlocking */\n});\n/**\n * Configures initial navigation to start before the root component is created.\n *\n * The bootstrap is blocked until the initial navigation is complete. This value is required for\n * [server-side rendering](guide/ssr) to work.\n *\n * @usageNotes\n *\n * Basic example of how you can enable this navigation behavior:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withEnabledBlockingInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @publicApi\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withEnabledBlockingInitialNavigation() {\n const providers = [{\n provide: INITIAL_NAVIGATION,\n useValue: 0 /* InitialNavigation.EnabledBlocking */\n }, {\n provide: APP_INITIALIZER,\n multi: true,\n deps: [Injector],\n useFactory: injector => {\n const locationInitialized = injector.get(LOCATION_INITIALIZED, Promise.resolve());\n return () => {\n return locationInitialized.then(() => {\n return new Promise(resolve => {\n const router = injector.get(Router);\n const bootstrapDone = injector.get(BOOTSTRAP_DONE);\n afterNextNavigation(router, () => {\n // Unblock APP_INITIALIZER in case the initial navigation was canceled or errored\n // without a redirect.\n resolve(true);\n });\n injector.get(NavigationTransitions).afterPreactivation = () => {\n // Unblock APP_INITIALIZER once we get to `afterPreactivation`. At this point, we\n // assume activation will complete successfully (even though this is not\n // guaranteed).\n resolve(true);\n return bootstrapDone.closed ? of(void 0) : bootstrapDone;\n };\n router.initialNavigation();\n });\n });\n };\n }\n }];\n return routerFeature(2 /* RouterFeatureKind.EnabledBlockingInitialNavigationFeature */, providers);\n}\n/**\n * Disables initial navigation.\n *\n * Use if there is a reason to have more control over when the router starts its initial navigation\n * due to some complex initialization logic.\n *\n * @usageNotes\n *\n * Basic example of how you can disable initial navigation:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withDisabledInitialNavigation())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDisabledInitialNavigation() {\n const providers = [{\n provide: APP_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => {\n router.setUpLocationChangeListener();\n };\n }\n }, {\n provide: INITIAL_NAVIGATION,\n useValue: 2 /* InitialNavigation.Disabled */\n }];\n return routerFeature(3 /* RouterFeatureKind.DisabledInitialNavigationFeature */, providers);\n}\n/**\n * Enables logging of all internal navigation events to the console.\n * Extra logging might be useful for debugging purposes to inspect Router event sequence.\n *\n * @usageNotes\n *\n * Basic example of how you can enable debug tracing:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withDebugTracing())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withDebugTracing() {\n let providers = [];\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n providers = [{\n provide: ENVIRONMENT_INITIALIZER,\n multi: true,\n useFactory: () => {\n const router = inject(Router);\n return () => router.events.subscribe(e => {\n // tslint:disable:no-console\n console.group?.(`Router Event: ${e.constructor.name}`);\n console.log(stringifyEvent(e));\n console.log(e);\n console.groupEnd?.();\n // tslint:enable:no-console\n });\n }\n }];\n } else {\n providers = [];\n }\n return routerFeature(1 /* RouterFeatureKind.DebugTracingFeature */, providers);\n}\nconst ROUTER_PRELOADER = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'router preloader' : '');\n/**\n * Allows to configure a preloading strategy to use. The strategy is configured by providing a\n * reference to a class that implements a `PreloadingStrategy`.\n *\n * @usageNotes\n *\n * Basic example of how you can configure preloading:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withPreloading(PreloadAllModules))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @param preloadingStrategy A reference to a class that implements a `PreloadingStrategy` that\n * should be used.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withPreloading(preloadingStrategy) {\n const providers = [{\n provide: ROUTER_PRELOADER,\n useExisting: RouterPreloader\n }, {\n provide: PreloadingStrategy,\n useExisting: preloadingStrategy\n }];\n return routerFeature(0 /* RouterFeatureKind.PreloadingFeature */, providers);\n}\n/**\n * Allows to provide extra parameters to configure Router.\n *\n * @usageNotes\n *\n * Basic example of how you can provide extra configuration options:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withRouterConfig({\n * onSameUrlNavigation: 'reload'\n * }))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n *\n * @param options A set of parameters to configure Router, see `RouterConfigOptions` for\n * additional information.\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withRouterConfig(options) {\n const providers = [{\n provide: ROUTER_CONFIGURATION,\n useValue: options\n }];\n return routerFeature(5 /* RouterFeatureKind.RouterConfigurationFeature */, providers);\n}\n/**\n * Provides the location strategy that uses the URL fragment instead of the history API.\n *\n * @usageNotes\n *\n * Basic example of how you can use the hash location option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withHashLocation())\n * ]\n * }\n * );\n * ```\n *\n * @see {@link provideRouter}\n * @see {@link HashLocationStrategy}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withHashLocation() {\n const providers = [{\n provide: LocationStrategy,\n useClass: HashLocationStrategy\n }];\n return routerFeature(6 /* RouterFeatureKind.RouterHashLocationFeature */, providers);\n}\n/**\n * Provides a function which is called when a navigation error occurs.\n *\n * This function is run inside application's [injection context](guide/di/dependency-injection-context)\n * so you can use the [`inject`](api/core/inject) function.\n *\n * This function can return a `RedirectCommand` to convert the error to a redirect, similar to returning\n * a `UrlTree` or `RedirectCommand` from a guard. This will also prevent the `Router` from emitting\n * `NavigationError`; it will instead emit `NavigationCancel` with code NavigationCancellationCode.Redirect.\n * Return values other than `RedirectCommand` are ignored and do not change any behavior with respect to\n * how the `Router` handles the error.\n *\n * @usageNotes\n *\n * Basic example of how you can use the error handler option:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withNavigationErrorHandler((e: NavigationError) =>\n * inject(MyErrorTracker).trackError(e)))\n * ]\n * }\n * );\n * ```\n *\n * @see {@link NavigationError}\n * @see {@link core/inject}\n * @see {@link runInInjectionContext}\n *\n * @returns A set of providers for use with `provideRouter`.\n *\n * @publicApi\n */\nfunction withNavigationErrorHandler(handler) {\n const providers = [{\n provide: NAVIGATION_ERROR_HANDLER,\n useValue: handler\n }];\n return routerFeature(7 /* RouterFeatureKind.NavigationErrorHandlerFeature */, providers);\n}\n/**\n * Enables binding information from the `Router` state directly to the inputs of the component in\n * `Route` configurations.\n *\n * @usageNotes\n *\n * Basic example of how you can enable the feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withComponentInputBinding())\n * ]\n * }\n * );\n * ```\n *\n * @returns A set of providers for use with `provideRouter`.\n */\nfunction withComponentInputBinding() {\n const providers = [RoutedComponentInputBinder, {\n provide: INPUT_BINDER,\n useExisting: RoutedComponentInputBinder\n }];\n return routerFeature(8 /* RouterFeatureKind.ComponentInputBindingFeature */, providers);\n}\n/**\n * Enables view transitions in the Router by running the route activation and deactivation inside of\n * `document.startViewTransition`.\n *\n * Note: The View Transitions API is not available in all browsers. If the browser does not support\n * view transitions, the Router will not attempt to start a view transition and continue processing\n * the navigation as usual.\n *\n * @usageNotes\n *\n * Basic example of how you can enable the feature:\n * ```\n * const appRoutes: Routes = [];\n * bootstrapApplication(AppComponent,\n * {\n * providers: [\n * provideRouter(appRoutes, withViewTransitions())\n * ]\n * }\n * );\n * ```\n *\n * @returns A set of providers for use with `provideRouter`.\n * @see https://developer.chrome.com/docs/web-platform/view-transitions/\n * @see https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API\n * @experimental\n */\nfunction withViewTransitions(options) {\n const providers = [{\n provide: CREATE_VIEW_TRANSITION,\n useValue: createViewTransition\n }, {\n provide: VIEW_TRANSITION_OPTIONS,\n useValue: {\n skipNextTransition: !!options?.skipInitialTransition,\n ...options\n }\n }];\n return routerFeature(9 /* RouterFeatureKind.ViewTransitionsFeature */, providers);\n}\n\n/**\n * The directives defined in the `RouterModule`.\n */\nconst ROUTER_DIRECTIVES = [RouterOutlet, RouterLink, RouterLinkActive, ɵEmptyOutletComponent];\n/**\n * @docsNotRequired\n */\nconst ROUTER_FORROOT_GUARD = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'router duplicate forRoot guard' : 'ROUTER_FORROOT_GUARD');\n// TODO(atscott): All of these except `ActivatedRoute` are `providedIn: 'root'`. They are only kept\n// here to avoid a breaking change whereby the provider order matters based on where the\n// `RouterModule`/`RouterTestingModule` is imported. These can/should be removed as a \"breaking\"\n// change in a major version.\nconst ROUTER_PROVIDERS = [Location, {\n provide: UrlSerializer,\n useClass: DefaultUrlSerializer\n}, Router, ChildrenOutletContexts, {\n provide: ActivatedRoute,\n useFactory: rootRoute,\n deps: [Router]\n}, RouterConfigLoader,\n// Only used to warn when `provideRoutes` is used without `RouterModule` or `provideRouter`. Can\n// be removed when `provideRoutes` is removed.\ntypeof ngDevMode === 'undefined' || ngDevMode ? {\n provide: ROUTER_IS_PROVIDED,\n useValue: true\n} : []];\n/**\n * @description\n *\n * Adds directives and providers for in-app navigation among views defined in an application.\n * Use the Angular `Router` service to declaratively specify application states and manage state\n * transitions.\n *\n * You can import this NgModule multiple times, once for each lazy-loaded bundle.\n * However, only one `Router` service can be active.\n * To ensure this, there are two ways to register routes when importing this module:\n *\n * * The `forRoot()` method creates an `NgModule` that contains all the directives, the given\n * routes, and the `Router` service itself.\n * * The `forChild()` method creates an `NgModule` that contains all the directives and the given\n * routes, but does not include the `Router` service.\n *\n * @see [Routing and Navigation guide](guide/routing/common-router-tasks) for an\n * overview of how the `Router` service should be used.\n *\n * @publicApi\n */\nlet RouterModule = /*#__PURE__*/(() => {\n class RouterModule {\n constructor(guard) {}\n /**\n * Creates and configures a module with all the router providers and directives.\n * Optionally sets up an application listener to perform an initial navigation.\n *\n * When registering the NgModule at the root, import as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forRoot(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @param routes An array of `Route` objects that define the navigation paths for the application.\n * @param config An `ExtraOptions` configuration object that controls how navigation is performed.\n * @return The new `NgModule`.\n *\n */\n static forRoot(routes, config) {\n return {\n ngModule: RouterModule,\n providers: [ROUTER_PROVIDERS, typeof ngDevMode === 'undefined' || ngDevMode ? config?.enableTracing ? withDebugTracing().ɵproviders : [] : [], {\n provide: ROUTES,\n multi: true,\n useValue: routes\n }, {\n provide: ROUTER_FORROOT_GUARD,\n useFactory: provideForRootGuard,\n deps: [[Router, new Optional(), new SkipSelf()]]\n }, {\n provide: ROUTER_CONFIGURATION,\n useValue: config ? config : {}\n }, config?.useHash ? provideHashLocationStrategy() : providePathLocationStrategy(), provideRouterScroller(), config?.preloadingStrategy ? withPreloading(config.preloadingStrategy).ɵproviders : [], config?.initialNavigation ? provideInitialNavigation(config) : [], config?.bindToComponentInputs ? withComponentInputBinding().ɵproviders : [], config?.enableViewTransitions ? withViewTransitions().ɵproviders : [], provideRouterInitializer()]\n };\n }\n /**\n * Creates a module with all the router directives and a provider registering routes,\n * without creating a new Router service.\n * When registering for submodules and lazy-loaded submodules, create the NgModule as follows:\n *\n * ```\n * @NgModule({\n * imports: [RouterModule.forChild(ROUTES)]\n * })\n * class MyNgModule {}\n * ```\n *\n * @param routes An array of `Route` objects that define the navigation paths for the submodule.\n * @return The new NgModule.\n *\n */\n static forChild(routes) {\n return {\n ngModule: RouterModule,\n providers: [{\n provide: ROUTES,\n multi: true,\n useValue: routes\n }]\n };\n }\n static {\n this.ɵfac = function RouterModule_Factory(t) {\n return new (t || RouterModule)(i0.ɵɵinject(ROUTER_FORROOT_GUARD, 8));\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: RouterModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return RouterModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * For internal use by `RouterModule` only. Note that this differs from `withInMemoryRouterScroller`\n * because it reads from the `ExtraOptions` which should not be used in the standalone world.\n */\nfunction provideRouterScroller() {\n return {\n provide: ROUTER_SCROLLER,\n useFactory: () => {\n const viewportScroller = inject(ViewportScroller);\n const zone = inject(NgZone);\n const config = inject(ROUTER_CONFIGURATION);\n const transitions = inject(NavigationTransitions);\n const urlSerializer = inject(UrlSerializer);\n if (config.scrollOffset) {\n viewportScroller.setOffset(config.scrollOffset);\n }\n return new RouterScroller(urlSerializer, transitions, viewportScroller, zone, config);\n }\n };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` should\n// provide hash location directly via `{provide: LocationStrategy, useClass: HashLocationStrategy}`.\nfunction provideHashLocationStrategy() {\n return {\n provide: LocationStrategy,\n useClass: HashLocationStrategy\n };\n}\n// Note: For internal use only with `RouterModule`. Standalone setup via `provideRouter` does not\n// need this at all because `PathLocationStrategy` is the default factory for `LocationStrategy`.\nfunction providePathLocationStrategy() {\n return {\n provide: LocationStrategy,\n useClass: PathLocationStrategy\n };\n}\nfunction provideForRootGuard(router) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && router) {\n throw new ɵRuntimeError(4007 /* RuntimeErrorCode.FOR_ROOT_CALLED_TWICE */, `The Router was provided more than once. This can happen if 'forRoot' is used outside of the root injector.` + ` Lazy loaded modules should use RouterModule.forChild() instead.`);\n }\n return 'guarded';\n}\n// Note: For internal use only with `RouterModule`. Standalone router setup with `provideRouter`\n// users call `withXInitialNavigation` directly.\nfunction provideInitialNavigation(config) {\n return [config.initialNavigation === 'disabled' ? withDisabledInitialNavigation().ɵproviders : [], config.initialNavigation === 'enabledBlocking' ? withEnabledBlockingInitialNavigation().ɵproviders : []];\n}\n// TODO(atscott): This should not be in the public API\n/**\n * A DI token for the router initializer that\n * is called after the app is bootstrapped.\n *\n * @publicApi\n */\nconst ROUTER_INITIALIZER = /*#__PURE__*/new InjectionToken(typeof ngDevMode === 'undefined' || ngDevMode ? 'Router Initializer' : '');\nfunction provideRouterInitializer() {\n return [\n // ROUTER_INITIALIZER token should be removed. It's public API but shouldn't be. We can just\n // have `getBootstrapListener` directly attached to APP_BOOTSTRAP_LISTENER.\n {\n provide: ROUTER_INITIALIZER,\n useFactory: getBootstrapListener\n }, {\n provide: APP_BOOTSTRAP_LISTENER,\n multi: true,\n useExisting: ROUTER_INITIALIZER\n }];\n}\n\n/**\n * Maps an array of injectable classes with canMatch functions to an array of equivalent\n * `CanMatchFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanMatch(providers) {\n return providers.map(provider => (...params) => inject(provider).canMatch(...params));\n}\n/**\n * Maps an array of injectable classes with canActivate functions to an array of equivalent\n * `CanActivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanActivate(providers) {\n return providers.map(provider => (...params) => inject(provider).canActivate(...params));\n}\n/**\n * Maps an array of injectable classes with canActivateChild functions to an array of equivalent\n * `CanActivateChildFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanActivateChild(providers) {\n return providers.map(provider => (...params) => inject(provider).canActivateChild(...params));\n}\n/**\n * Maps an array of injectable classes with canDeactivate functions to an array of equivalent\n * `CanDeactivateFn` for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='CanActivate'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToCanDeactivate(providers) {\n return providers.map(provider => (...params) => inject(provider).canDeactivate(...params));\n}\n/**\n * Maps an injectable class with a resolve function to an equivalent `ResolveFn`\n * for use in a `Route` definition.\n *\n * Usage {@example router/utils/functional_guards.ts region='Resolve'}\n *\n * @publicApi\n * @see {@link Route}\n */\nfunction mapToResolve(provider) {\n return (...params) => inject(provider).resolve(...params);\n}\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of the router package.\n */\n/**\n * @publicApi\n */\nconst VERSION = /*#__PURE__*/new Version('18.0.4');\n\n/**\n * @module\n * @description\n * Entry point for all public APIs of this package.\n */\n// This file only reexports content of the `src` folder. Keep it that way.\n\n// This file is not used to build this module. It is only used during editing\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ActivatedRoute, ActivatedRouteSnapshot, ActivationEnd, ActivationStart, BaseRouteReuseStrategy, ChildActivationEnd, ChildActivationStart, ChildrenOutletContexts, DefaultTitleStrategy, DefaultUrlSerializer, EventType, GuardsCheckEnd, GuardsCheckStart, NavigationCancel, NavigationCancellationCode, NavigationEnd, NavigationError, NavigationSkipped, NavigationSkippedCode, NavigationStart, NoPreloading, OutletContext, PRIMARY_OUTLET, PreloadAllModules, PreloadingStrategy, ROUTER_CONFIGURATION, ROUTER_INITIALIZER, ROUTES, RedirectCommand, ResolveEnd, ResolveStart, RouteConfigLoadEnd, RouteConfigLoadStart, RouteReuseStrategy, Router, RouterEvent, RouterLink, RouterLinkActive, RouterLink as RouterLinkWithHref, RouterModule, RouterOutlet, RouterPreloader, RouterState, RouterStateSnapshot, RoutesRecognized, Scroll, TitleStrategy, UrlHandlingStrategy, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree, VERSION, convertToParamMap, createUrlTreeFromSnapshot, defaultUrlMatcher, mapToCanActivate, mapToCanActivateChild, mapToCanDeactivate, mapToCanMatch, mapToResolve, provideRouter, provideRoutes, withComponentInputBinding, withDebugTracing, withDisabledInitialNavigation, withEnabledBlockingInitialNavigation, withHashLocation, withInMemoryScrolling, withNavigationErrorHandler, withPreloading, withRouterConfig, withViewTransitions, ɵEmptyOutletComponent, ROUTER_PROVIDERS as ɵROUTER_PROVIDERS, afterNextNavigation as ɵafterNextNavigation, loadChildren as ɵloadChildren };\n","import * as i0 from '@angular/core';\nimport { NgZone, Injectable, Inject, LOCALE_ID, ElementRef, Optional, Self, SecurityContext } from '@angular/core';\nimport * as i3 from '@taiga-ui/cdk';\nimport { tuiZoneOptimized, TUI_WINDOW_SIZE, tuiZonefree, EMPTY_CLIENT_RECT, TuiDestroyService, tuiAssert, TUI_IS_WEBKIT } from '@taiga-ui/cdk';\nimport { TUI_MEDIA, TUI_SANITIZER, TUI_ICONS } from '@taiga-ui/core/tokens';\nimport * as i1 from 'rxjs';\nimport { Observable, of, BehaviorSubject, fromEvent, merge, timer, EMPTY } from 'rxjs';\nimport { map, distinctUntilChanged, shareReplay, startWith, share, finalize, takeUntil } from 'rxjs/operators';\nimport { WINDOW, ANIMATION_FRAME } from '@ng-web-apis/common';\nimport * as i2 from '@taiga-ui/core/abstract';\nimport { TuiPositionAccessor } from '@taiga-ui/core/abstract';\nimport * as i1$1 from '@angular/router';\nimport { RouterLinkActive } from '@angular/router';\nimport * as i1$2 from '@angular/platform-browser';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { tuiProcessIcon } from '@taiga-ui/core/utils/dom';\n\n/**\n * Service to provide the current breakpoint based on Taiga UI's media queries\n */\nlet TuiBreakpointService = /*#__PURE__*/(() => {\n class TuiBreakpointService extends Observable {\n constructor(media, ngZone, size$) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.media = media;\n this.ngZone = ngZone;\n this.size$ = size$;\n this.sorted = Object.values(this.media).sort((a, b) => a - b);\n this.invert = Object.keys(this.media).reduce((ret, key) => Object.assign(Object.assign({}, ret), {\n [this.media[key]]: key\n }), {});\n this.stream$ = this.size$.pipe(map(({\n width\n }) => this.sorted.find(size => size > width)), map(key => this.invert[key || this.sorted[this.sorted.length - 1]]), distinctUntilChanged(), tuiZoneOptimized(this.ngZone), shareReplay({\n bufferSize: 1,\n refCount: true\n }));\n }\n }\n TuiBreakpointService.ɵfac = function TuiBreakpointService_Factory(t) {\n return new (t || TuiBreakpointService)(i0.ɵɵinject(TUI_MEDIA), i0.ɵɵinject(NgZone), i0.ɵɵinject(TUI_WINDOW_SIZE));\n };\n TuiBreakpointService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiBreakpointService,\n factory: TuiBreakpointService.ɵfac,\n providedIn: 'root'\n });\n return TuiBreakpointService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFormatDateService = /*#__PURE__*/(() => {\n class TuiFormatDateService {\n constructor(locale) {\n this.locale = locale;\n }\n format(timestamp) {\n return of(new Date(timestamp).toLocaleTimeString(this.locale, {\n hour: 'numeric',\n minute: '2-digit'\n }));\n }\n }\n TuiFormatDateService.ɵfac = function TuiFormatDateService_Factory(t) {\n return new (t || TuiFormatDateService)(i0.ɵɵinject(LOCALE_ID));\n };\n TuiFormatDateService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiFormatDateService,\n factory: TuiFormatDateService.ɵfac,\n providedIn: 'root'\n });\n return TuiFormatDateService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Service for displaying hints/tooltips\n */\nlet TuiHintService = /*#__PURE__*/(() => {\n class TuiHintService extends BehaviorSubject {\n constructor() {\n super([]);\n }\n add(directive) {\n this.next(this.value.concat(directive));\n }\n remove(directive) {\n if (this.value.includes(directive)) {\n this.next(this.value.filter(hint => hint !== directive));\n }\n }\n }\n TuiHintService.ɵfac = function TuiHintService_Factory(t) {\n return new (t || TuiHintService)();\n };\n TuiHintService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiHintService,\n factory: TuiHintService.ɵfac,\n providedIn: 'root'\n });\n return TuiHintService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiNightThemeService = /*#__PURE__*/(() => {\n class TuiNightThemeService extends Observable {\n constructor(win) {\n const media = win.matchMedia('(prefers-color-scheme: dark)');\n const media$ = fromEvent(media, 'change').pipe(startWith(null), map(() => media.matches), share());\n super(subscriber => media$.subscribe(subscriber));\n }\n }\n TuiNightThemeService.ɵfac = function TuiNightThemeService_Factory(t) {\n return new (t || TuiNightThemeService)(i0.ɵɵinject(WINDOW));\n };\n TuiNightThemeService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiNightThemeService,\n factory: TuiNightThemeService.ɵfac,\n providedIn: 'root'\n });\n return TuiNightThemeService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPositionService = /*#__PURE__*/(() => {\n class TuiPositionService extends Observable {\n constructor(\n // Destructuring here causes memory leak\n el, animationFrame, zone, accessor) {\n super(subscriber => animationFrame.pipe(map(() => el.nativeElement.getBoundingClientRect()), map(rect => accessor.getPosition(rect)), tuiZonefree(zone), finalize(() => accessor.getPosition(EMPTY_CLIENT_RECT))).subscribe(subscriber));\n }\n }\n TuiPositionService.ɵfac = function TuiPositionService_Factory(t) {\n return new (t || TuiPositionService)(i0.ɵɵinject(ElementRef), i0.ɵɵinject(ANIMATION_FRAME), i0.ɵɵinject(NgZone), i0.ɵɵinject(TuiPositionAccessor));\n };\n TuiPositionService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiPositionService,\n factory: TuiPositionService.ɵfac\n });\n return TuiPositionService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n// TODO: Remove when Angular is update and `RouterLinkActive` has output\nlet TuiRouterLinkActiveService = /*#__PURE__*/(() => {\n class TuiRouterLinkActiveService extends Observable {\n constructor(routerLinkActive, zone, animationFrame$, destroy$) {\n const stream$ = routerLinkActive ? merge(timer(0),\n // SSR (animationFrame$ never emits value during SSR)\n animationFrame$).pipe(map(() => routerLinkActive.isActive), distinctUntilChanged(), tuiZoneOptimized(zone), takeUntil(destroy$)) : EMPTY;\n super(subscriber => stream$.subscribe(subscriber));\n }\n }\n TuiRouterLinkActiveService.ɵfac = function TuiRouterLinkActiveService_Factory(t) {\n return new (t || TuiRouterLinkActiveService)(i0.ɵɵinject(RouterLinkActive, 8), i0.ɵɵinject(NgZone), i0.ɵɵinject(ANIMATION_FRAME), i0.ɵɵinject(TuiDestroyService, 2));\n };\n TuiRouterLinkActiveService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiRouterLinkActiveService,\n factory: TuiRouterLinkActiveService.ɵfac\n });\n return TuiRouterLinkActiveService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Service for reusing SVGs without inlining each instance\n */\nlet TuiSvgService = /*#__PURE__*/(() => {\n class TuiSvgService {\n constructor(tuiSanitizer, sanitizer, icons) {\n this.tuiSanitizer = tuiSanitizer;\n this.sanitizer = sanitizer;\n this.originals = {};\n this.items$ = new BehaviorSubject(new Map());\n this.define(icons);\n }\n define(icons) {\n const {\n value\n } = this.items$;\n Object.keys(icons).forEach(key => {\n this.defineIcon(key, icons[key], value);\n });\n this.items$.next(value);\n }\n getOriginal(name) {\n return this.originals[name] || null;\n }\n defineIcon(name, src, map) {\n if (map.has(name)) {\n return;\n }\n const parsed = this.parseSrc(name, src);\n if (!parsed) {\n ngDevMode && tuiAssert.assert(false, 'Unable to parse given SVG src');\n return;\n }\n map.set(name, parsed);\n this.originals = Object.assign(Object.assign({}, this.originals), {\n [name]: src\n });\n }\n parseSrc(name, src) {\n return this.sanitize(tuiProcessIcon(src, name));\n }\n sanitize(src) {\n return this.sanitizer.bypassSecurityTrustHtml((this.tuiSanitizer ? this.tuiSanitizer.sanitize(SecurityContext.HTML, src) : this.sanitizer.sanitize(SecurityContext.HTML, src)) || '');\n }\n }\n TuiSvgService.ɵfac = function TuiSvgService_Factory(t) {\n return new (t || TuiSvgService)(i0.ɵɵinject(TUI_SANITIZER, 8), i0.ɵɵinject(DomSanitizer), i0.ɵɵinject(TUI_ICONS));\n };\n TuiSvgService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiSvgService,\n factory: TuiSvgService.ɵfac,\n providedIn: 'root'\n });\n return TuiSvgService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiVisualViewportService = /*#__PURE__*/(() => {\n class TuiVisualViewportService {\n constructor(win, isWebkit) {\n this.win = win;\n this.isWebkit = isWebkit;\n }\n // https://bugs.webkit.org/show_bug.cgi?id=207089\n correct([y, x]) {\n return [this.correctY(y), this.correctX(x)];\n }\n correctX(x) {\n var _a, _b;\n return this.isWebkit ? x + ((_b = (_a = this.win.visualViewport) === null || _a === void 0 ? void 0 : _a.offsetLeft) !== null && _b !== void 0 ? _b : 0) : x;\n }\n correctY(y) {\n var _a, _b;\n return this.isWebkit ? y + ((_b = (_a = this.win.visualViewport) === null || _a === void 0 ? void 0 : _a.offsetTop) !== null && _b !== void 0 ? _b : 0) : y;\n }\n }\n TuiVisualViewportService.ɵfac = function TuiVisualViewportService_Factory(t) {\n return new (t || TuiVisualViewportService)(i0.ɵɵinject(WINDOW), i0.ɵɵinject(TUI_IS_WEBKIT));\n };\n TuiVisualViewportService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiVisualViewportService,\n factory: TuiVisualViewportService.ɵfac,\n providedIn: 'root'\n });\n return TuiVisualViewportService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiBreakpointService, TuiFormatDateService, TuiHintService, TuiNightThemeService, TuiPositionService, TuiRouterLinkActiveService, TuiSvgService, TuiVisualViewportService };\n","import { __decorate } from 'tslib';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { inject, InjectionToken, SkipSelf, Optional, SecurityContext, ElementRef, Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';\nimport * as i4 from '@angular/platform-browser';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { WINDOW } from '@ng-web-apis/common';\nimport * as i1 from '@taiga-ui/cdk';\nimport { tuiSvgLinearGradientProcessor, tuiCreateTokenFromFactory, tuiIsString, tuiAssert, tuiGetDocumentOrShadowRoot, TuiStaticRequestService, TUI_BASE_HREF, tuiPure, TuiLetModule } from '@taiga-ui/cdk';\nimport { TUI_CACHE_BUSTING_PAYLOAD, TUI_ICON_ERROR } from '@taiga-ui/core/constants';\nimport * as i3 from '@taiga-ui/core/services';\nimport { TuiSvgService } from '@taiga-ui/core/services';\nimport { TUI_DEFAULT_ICONS_PLACE, TUI_ICONS_PLACE, TUI_ICONS_PATH, TUI_SVG_SRC_PROCESSOR, TUI_SVG_CONTENT_PROCESSOR, TUI_SANITIZER } from '@taiga-ui/core/tokens';\nimport { tuiIsPresumedHTMLString } from '@taiga-ui/core/utils/miscellaneous';\nimport { identity, ReplaySubject, of } from 'rxjs';\nimport { switchMap, startWith, catchError, map } from 'rxjs/operators';\nimport { tuiIconsPathFactory } from '@taiga-ui/core/utils';\nfunction TuiSvgComponent_ng_container_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 3);\n }\n if (rf & 2) {\n const innerHTML_r1 = i0.ɵɵnextContext().tuiLet;\n i0.ɵɵproperty(\"innerHTML\", innerHTML_r1, i0.ɵɵsanitizeHtml);\n }\n}\nfunction TuiSvgComponent_ng_container_0_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(0, \"svg\", 4);\n i0.ɵɵlistener(\"error\", function TuiSvgComponent_ng_container_0_ng_template_2_Template_svg_error_0_listener() {\n i0.ɵɵrestoreView(_r2);\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.onError());\n });\n i0.ɵɵelement(1, \"use\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵattribute(\"href\", ctx_r2.use, null, \"xlink\");\n }\n}\nfunction TuiSvgComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiSvgComponent_ng_container_0_div_1_Template, 1, 1, \"div\", 2)(2, TuiSvgComponent_ng_container_0_ng_template_2_Template, 2, 1, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const useTemplate_r4 = i0.ɵɵreference(3);\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r2.isInnerHTML)(\"ngIfElse\", useTemplate_r4);\n }\n}\nconst TUI_DEPRECATED_ICONS = {\n tuiIconAttach: 'tuiIconPaperclip',\n tuiIconAttention: 'tuiIconAlertCircle',\n tuiIconBackCircle: 'tuiIconArrowLeftCircle',\n tuiIconCall: 'tuiIconPhone',\n tuiIconCallIn: 'tuiIconPhoneIncoming',\n tuiIconCallOut: 'tuiIconPhoneOutgoing',\n tuiIconCallTransfer: 'tuiIconPhoneForwarded',\n tuiIconCancel: 'tuiIconXCircle',\n tuiIconCancelCircle: 'tuiIconSlash',\n tuiIconCard: 'tuiIconCreditCard',\n tuiIconCards: 'tuiIconCreditCard',\n tuiIconChartBar: 'tuiIconBarChart',\n tuiIconChart: 'tuiIconBarChart',\n tuiIconCheckList: 'tuiIconClipboard',\n tuiIconCloseCircle: 'tuiIconXCircle',\n tuiIconCollapse: 'tuiIconMinimize',\n tuiIconComment: 'tuiIconMessageSquare',\n tuiIconCommentFw: 'tuiIconMessageForward',\n tuiIconCompany: 'tuiIconBriefcase',\n tuiIconDefaultDoc: 'tuiIconFile',\n tuiIconDesktop: 'tuiIconMonitor',\n tuiIconDesktopOff: 'tuiIconMonitorOff',\n tuiIconDislike: 'tuiIconThumbsDown',\n tuiIconDone: 'tuiIconCheckCircle',\n tuiIconDraft: 'tuiIconEdit2',\n tuiIconEyeOpen: 'tuiIconEye',\n tuiIconEyeClosed: 'tuiIconEyeOff',\n tuiIconExpand: 'tuiIconMaximize',\n tuiIconExternal: 'tuiIconExternalLink',\n tuiIconFrame: 'tuiIconLayout',\n tuiIconGeo: 'tuiIconMapPin',\n tuiIconHeartFilled: 'tuiIconHeart',\n tuiIconHide: 'tuiIconEyeOff',\n tuiIconImg: 'tuiIconImage',\n tuiIconInfoCircle: 'tuiIconInfo',\n tuiIconLike: 'tuiIconThumbsUp',\n tuiIconLockOpen: 'tuiIconUnlock',\n tuiIconMobile: 'tuiIconSmartphone',\n tuiIconMoreHor: 'tuiIconMoreHorizontal',\n tuiIconMoreVer: 'tuiIconMoreVertical',\n tuiIconMoreVert: 'tuiIconMoreVertical',\n tuiIconPicture: 'tuiIconImage',\n tuiIconPin: 'tuiIconMapPin',\n tuiIconPrint: 'tuiIconPrinter',\n tuiIconRefresh: 'tuiIconRefreshCw',\n tuiIconRemove: 'tuiIconX',\n tuiIconShow: 'tuiIconEye',\n tuiIconSound: 'tuiIconVolume',\n tuiIconSoundOff: 'tuiIconVolumeX',\n tuiIconStarFilled: 'tuiIconStar',\n tuiIconStop: 'tuiIconSquare',\n tuiIconStructure: 'tuiIconGrid',\n tuiIconTime: 'tuiIconClock',\n tuiIconTooltip: 'tuiIconHelpCircle',\n tuiIconViewList: 'tuiIconList',\n tuiIconWifiOn: 'tuiIconWifi'\n};\nconst TUI_SVG_DEFAULT_OPTIONS = {\n iconsPlace: TUI_DEFAULT_ICONS_PLACE,\n path: tuiIconsPathFactory(TUI_DEFAULT_ICONS_PLACE),\n srcProcessor: identity,\n contentProcessor: tuiSvgLinearGradientProcessor,\n deprecated: src => {\n const oldIcon = src.replace('Large', '').replace('Outline', '');\n const newIcon = TUI_DEPRECATED_ICONS[oldIcon];\n return newIcon ? `${oldIcon}/(Large|Outline) is deprecated, use ${newIcon}/(Large|Outline) instead` : '';\n }\n};\n/**\n * SVG component options\n */\nconst TUI_SVG_OPTIONS = tuiCreateTokenFromFactory(() => ({\n iconsPlace: inject(TUI_ICONS_PLACE),\n path: inject(TUI_ICONS_PATH),\n deprecated: TUI_SVG_DEFAULT_OPTIONS.deprecated,\n srcProcessor: inject(TUI_SVG_SRC_PROCESSOR),\n contentProcessor: inject(TUI_SVG_CONTENT_PROCESSOR)\n}));\nconst TUI_SVG_SRC_INTERCEPTORS = new InjectionToken('[TUI_SVG_SRC_INTERCEPTORS]');\nfunction tuiSvgSrcInterceptors(interceptor) {\n return {\n provide: TUI_SVG_SRC_INTERCEPTORS,\n useValue: interceptor,\n multi: true\n };\n}\nconst tuiSvgOptionsProvider = options => ({\n provide: TUI_SVG_OPTIONS,\n deps: [[new SkipSelf(), new Optional(), TUI_SVG_OPTIONS], [new Optional(), TUI_ICONS_PLACE], [new Optional(), TUI_ICONS_PATH], [new Optional(), TUI_SVG_SRC_PROCESSOR], [new Optional(), TUI_SVG_CONTENT_PROCESSOR]],\n useFactory: (fallback, iconsPlace, path, srcProcessor, contentProcessor) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\n return {\n iconsPlace: (_c = (_b = (_a = options.iconsPlace) !== null && _a !== void 0 ? _a : fallback === null || fallback === void 0 ? void 0 : fallback.iconsPlace) !== null && _b !== void 0 ? _b : iconsPlace) !== null && _c !== void 0 ? _c : TUI_SVG_DEFAULT_OPTIONS.iconsPlace,\n path: tuiIsString(options.path) ? tuiIconsPathFactory(options.path) : (_f = (_e = (_d = options.path) !== null && _d !== void 0 ? _d : fallback === null || fallback === void 0 ? void 0 : fallback.path) !== null && _e !== void 0 ? _e : path) !== null && _f !== void 0 ? _f : TUI_SVG_DEFAULT_OPTIONS.path,\n deprecated: (_h = (_g = options.deprecated) !== null && _g !== void 0 ? _g : fallback === null || fallback === void 0 ? void 0 : fallback.deprecated) !== null && _h !== void 0 ? _h : TUI_SVG_DEFAULT_OPTIONS.deprecated,\n srcProcessor: (_l = (_k = (_j = options.srcProcessor) !== null && _j !== void 0 ? _j : fallback === null || fallback === void 0 ? void 0 : fallback.srcProcessor) !== null && _k !== void 0 ? _k : srcProcessor) !== null && _l !== void 0 ? _l : TUI_SVG_DEFAULT_OPTIONS.srcProcessor,\n contentProcessor: (_p = (_o = (_m = options.contentProcessor) !== null && _m !== void 0 ? _m : fallback === null || fallback === void 0 ? void 0 : fallback.contentProcessor) !== null && _o !== void 0 ? _o : contentProcessor) !== null && _p !== void 0 ? _p : TUI_SVG_DEFAULT_OPTIONS.contentProcessor\n };\n }\n});\nconst UNDEFINED_NAMED_ICON = 'Attempted to use undefined named icon';\nconst MISSING_EXTERNAL_ICON = 'External icon is missing on the given URL';\nconst FAILED_EXTERNAL_ICON = 'Failed to load external SVG';\n// TODO: Consider moving to CDK along with SvgService and SvgDefsHostComponent\nlet TuiSvgComponent = /*#__PURE__*/(() => {\n class TuiSvgComponent {\n constructor(doc, win, options, srcInterceptors, tuiSanitizer, svgService, staticRequestService, sanitizer, el, baseHref) {\n this.doc = doc;\n this.win = win;\n this.options = options;\n this.srcInterceptors = srcInterceptors;\n this.tuiSanitizer = tuiSanitizer;\n this.svgService = svgService;\n this.staticRequestService = staticRequestService;\n this.sanitizer = sanitizer;\n this.el = el;\n this.baseHref = baseHref;\n this.src$ = new ReplaySubject(1);\n this.icon = '';\n this.innerHTML$ = this.src$.pipe(switchMap(() => {\n if (tuiIsString(this.icon)) {\n return this.isExternal ? this.getExternalIcon(this.icon) : of(this.getSafeHtml(this.icon));\n }\n return of(this.icon);\n }), startWith(''));\n }\n set src(src) {\n var _a;\n const deprecated = this.options.deprecated(String(src));\n ngDevMode && tuiAssert.assert(!deprecated, deprecated);\n this.icon = ((_a = this.srcInterceptors) !== null && _a !== void 0 ? _a : []).reduce((newSrc, interceptor) => interceptor(newSrc, this.options), this.options.srcProcessor(src || ''));\n this.src$.next();\n }\n get src() {\n return this.icon;\n }\n get use() {\n if (tuiIsString(this.icon)) {\n return this.icon.includes('.svg#') ? this.icon : this.resolveName(this.icon, this.options.path);\n }\n return '';\n }\n get isInnerHTML() {\n return !tuiIsString(this.icon) || this.isSrc || this.isExternal || this.isName && this.isShadowDOM;\n }\n get isShadowDOM() {\n return tuiGetDocumentOrShadowRoot(this.el.nativeElement) !== this.doc;\n }\n get isUse() {\n return this.use.replace(TUI_CACHE_BUSTING_PAYLOAD, '').includes('.svg#');\n }\n get isExternal() {\n return this.isUrl || this.isCrossDomain;\n }\n get isUrl() {\n return tuiIsString(this.icon) && this.icon.replace(TUI_CACHE_BUSTING_PAYLOAD, '').endsWith('.svg');\n }\n get isSrc() {\n return tuiIsString(this.icon) && tuiIsPresumedHTMLString(this.icon);\n }\n get isName() {\n return !this.isUrl && !this.isUse && !this.isSrc;\n }\n get isCrossDomain() {\n const {\n use,\n isUse,\n win\n } = this;\n return isUse && use.startsWith('http') && !!win.origin && !use.startsWith(win.origin);\n }\n onError(message = MISSING_EXTERNAL_ICON) {\n const {\n icon\n } = this;\n const event = new CustomEvent(TUI_ICON_ERROR, {\n bubbles: true,\n detail: {\n message,\n icon: icon\n }\n });\n ngDevMode && tuiAssert.assert(false, message, icon);\n this.el.nativeElement.dispatchEvent(event);\n }\n resolveName(name, iconsPath) {\n return iconsPath(name, this.baseHref);\n }\n getSafeHtml(src) {\n return this.isSrc ? this.sanitize(src) : this.process(src);\n }\n process(src) {\n const icon = this.svgService.getOriginal(src);\n if (this.isName && !icon && !!src) {\n this.onError(UNDEFINED_NAMED_ICON);\n }\n // Empty line for innerHTML when icon is shown through USE tag\n return !this.isShadowDOM || !this.isName ? '' : this.sanitize(icon || '');\n }\n sanitize(src) {\n src = this.options.contentProcessor(src);\n return this.tuiSanitizer && tuiIsString(src) ? this.sanitizer.bypassSecurityTrustHtml(this.tuiSanitizer.sanitize(SecurityContext.HTML, src) || '') : src;\n }\n getExternalIcon(src) {\n const url = src.includes('.svg') ? src : this.use;\n return this.staticRequestService.request(url).pipe(catchError(() => {\n this.onError(FAILED_EXTERNAL_ICON);\n return of('');\n }), map(response => this.sanitize(response.replace(' {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiSvgModule = /*#__PURE__*/(() => {\n class TuiSvgModule {}\n TuiSvgModule.ɵfac = function TuiSvgModule_Factory(t) {\n return new (t || TuiSvgModule)();\n };\n TuiSvgModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiSvgModule\n });\n TuiSvgModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiLetModule]]\n });\n return TuiSvgModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_DEPRECATED_ICONS, TUI_SVG_DEFAULT_OPTIONS, TUI_SVG_OPTIONS, TUI_SVG_SRC_INTERCEPTORS, TuiSvgComponent, TuiSvgModule, tuiSvgOptionsProvider, tuiSvgSrcInterceptors };\n","import { trigger, transition, style, animate, query, stagger } from '@angular/animations';\nconst TRANSITION = '{{duration}}ms ease-in-out';\nconst DURATION = {\n params: {\n duration: 300\n }\n};\nconst STAGGER = 300;\nconst tuiHeightCollapse = trigger('tuiHeightCollapse', [transition(':enter', [style({\n height: 0\n}), animate(TRANSITION, style({\n height: '*'\n}))], DURATION), transition(':leave', [style({\n height: '*'\n}), animate(TRANSITION, style({\n height: 0\n}))], DURATION)]);\nconst tuiHeightCollapseList = trigger('tuiHeightCollapseList', [transition('* => *', [query(':enter', [style({\n height: 0\n}), stagger(STAGGER, [animate(TRANSITION, style({\n height: '*'\n}))])], {\n optional: true\n}), query(':leave', [style({\n height: '*'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n height: 0\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiWidthCollapse = trigger('tuiWidthCollapse', [transition(':enter', [style({\n width: 0\n}), animate(TRANSITION, style({\n width: '*'\n}))], DURATION), transition(':leave', [style({\n width: '*'\n}), animate(TRANSITION, style({\n width: 0\n}))], DURATION)]);\nconst tuiWidthCollapseList = trigger('tuiWidthCollapseList', [transition('* => *', [query(':enter', [style({\n width: 0\n}), stagger(STAGGER, [animate(TRANSITION, style({\n width: '*'\n}))])], {\n optional: true\n}), query(':leave', [style({\n width: '*'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n width: 0\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiFadeIn = trigger('tuiFadeIn', [transition(':enter', [style({\n opacity: 0\n}), animate(TRANSITION, style({\n opacity: 1\n}))], DURATION), transition(':leave', [style({\n opacity: 1\n}), animate(TRANSITION, style({\n opacity: 0\n}))], DURATION)]);\nconst tuiFadeInList = trigger('tuiFadeInList', [transition('* => *', [query(':enter', [style({\n opacity: 0\n}), stagger(STAGGER, [animate(TRANSITION, style({\n opacity: 1\n}))])], {\n optional: true\n}), query(':leave', [style({\n opacity: 1\n}), stagger(STAGGER, [animate(TRANSITION, style({\n opacity: 0\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiFadeInTop = trigger('tuiFadeInTop', [transition(':enter', [style({\n transform: 'translateY(-10px)',\n opacity: 0\n}), animate(TRANSITION, style({\n transform: 'translateY(0)',\n opacity: 1\n}))], DURATION), transition(':leave', [style({\n transform: 'translateY(0)',\n opacity: 1\n}), animate(TRANSITION, style({\n transform: 'translateY(-10px)',\n opacity: 0\n}))], DURATION)]);\nconst tuiFadeInBottom = trigger('tuiFadeInBottom', [transition(':enter', [style({\n transform: 'translateY(10px)',\n opacity: 0\n}), animate(TRANSITION, style({\n transform: 'translateY(0)',\n opacity: 1\n}))], DURATION), transition(':leave', [style({\n transform: 'translateY(0)',\n opacity: 1\n}), animate(TRANSITION, style({\n transform: 'translateY(10px)',\n opacity: 0\n}))], DURATION)]);\nconst tuiDropdownAnimation = trigger('tuiDropdownAnimation', [transition(':enter', [style({\n transform: 'translateY(-10px)',\n opacity: 0\n}), animate(TRANSITION, style({\n transform: 'translateY(0)',\n opacity: 1\n}))], DURATION), transition(':leave', [style({\n transform: 'translateY(0)',\n opacity: 1\n}), animate(TRANSITION, style({\n transform: 'translateY(-10px)',\n opacity: 0\n}))], DURATION)]);\nconst tuiScaleIn = trigger('tuiScaleIn', [transition(':enter', [style({\n transform: 'scale(0)'\n}), animate(TRANSITION, style({\n transform: 'scale(1)'\n}))], DURATION), transition(':leave', [style({\n transform: 'scale(1)'\n}), animate(TRANSITION, style({\n transform: 'scale(0)'\n}))], DURATION)]);\nconst tuiPop = trigger('tuiPop', [transition(':enter', [style({\n transform: 'scale(0)'\n}), animate(TRANSITION, style({\n transform: 'scale(1.1)'\n})), animate(TRANSITION, style({\n transform: 'scale(1)'\n}))], DURATION), transition(':leave', [style({\n transform: 'scale(1)'\n}), animate(TRANSITION, style({\n transform: 'scale(1.1)'\n})), animate(TRANSITION, style({\n transform: 'scale(0)'\n}))], DURATION)]);\nconst tuiScaleInList = trigger('tuiScaleInList', [transition('* => *', [query(':enter', [style({\n transform: 'scale(0)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'scale(1)'\n}))])], {\n optional: true\n}), query(':leave', [style({\n transform: 'scale(1)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'scale(0)'\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiSlideIn = trigger('tuiSlideIn', [transition('* => left', [style({\n transform: 'translateX(-100%)'\n}), animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))], DURATION), transition('left => *', [style({\n transform: 'translateX(0)'\n}), animate(TRANSITION, style({\n transform: 'translateX(-100%)'\n}))], DURATION), transition('* => right', [style({\n transform: 'translateX(100%)'\n}), animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))], DURATION), transition('right => *', [style({\n transform: 'translateX(0)'\n}), animate(TRANSITION, style({\n transform: 'translateX(100%)'\n}))], DURATION)]);\nconst tuiSlideInLeft = trigger('tuiSlideInLeft', [transition(':enter', [style({\n transform: 'translateX(-100%)'\n}), animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))], DURATION), transition(':leave', [style({\n transform: 'translateX(0)'\n}), animate(TRANSITION, style({\n transform: 'translateX(-100%)'\n}))], DURATION)]);\nconst tuiSlideInLeftList = trigger('tuiSlideInLeftList', [transition('* => *', [query(':enter', [style({\n transform: 'translateX(-100%)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))])], {\n optional: true\n}), query(':leave', [style({\n transform: 'translateX(0)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateX(-100%)'\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiSlideInRight = trigger('tuiSlideInRight', [transition(':enter', [style({\n transform: 'translateX(100%)'\n}), animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))], DURATION), transition(':leave', [style({\n transform: 'translateX(0)'\n}), animate(TRANSITION, style({\n transform: 'translateX(100%)'\n}))], DURATION)]);\nconst tuiSlideInRightList = trigger('tuiSlideInRightList', [transition('* => *', [query(':enter', [style({\n transform: 'translateX(100%)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateX(0)'\n}))])], {\n optional: true\n}), query(':leave', [style({\n transform: 'translateX(0)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateX(100%)'\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiSlideInTop = trigger('tuiSlideInTop', [transition(':enter', [style({\n transform: 'translate3d(0,{{start}},0)'\n}), animate(TRANSITION, style({\n transform: 'translate3d(0,{{end}},0)'\n}))], {\n params: {\n end: 0,\n start: '100%',\n duration: 300\n }\n}), transition(':leave', [style({\n transform: 'translate3d(0,{{end}},0)',\n pointerEvents: 'none'\n}), animate(TRANSITION, style({\n transform: 'translate3d(0,{{start}},0)'\n}))], {\n params: {\n end: 0,\n start: '100%',\n duration: 300\n }\n})]);\nconst tuiSlideInTopList = trigger('tuiSlideInTopList', [transition('* => *', [query(':enter', [style({\n transform: 'translateY(100%)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateY(0)'\n}))])], {\n optional: true\n}), query(':leave', [style({\n transform: 'translateY(0)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateY(100%)'\n}))])], {\n optional: true\n})], DURATION)]);\nconst tuiSlideInBottom = trigger('tuiSlideInBottom', [transition(':enter', [style({\n transform: 'translateY(-100%)'\n}), animate(TRANSITION, style({\n transform: 'translateY(0)'\n}))], DURATION), transition(':leave', [style({\n transform: 'translateY(0)'\n}), animate(TRANSITION, style({\n transform: 'translateY(-100%)'\n}))], DURATION)]);\nconst tuiSlideInBottomList = trigger('tuiSlideInBottomList', [transition('* => *', [query(':enter', [style({\n transform: 'translateY(-100%)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateY(0)'\n}))])], {\n optional: true\n}), query(':leave', [style({\n transform: 'translateY(0)'\n}), stagger(STAGGER, [animate(TRANSITION, style({\n transform: 'translateY(-100%)'\n}))])], {\n optional: true\n})], DURATION)]);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { tuiDropdownAnimation, tuiFadeIn, tuiFadeInBottom, tuiFadeInList, tuiFadeInTop, tuiHeightCollapse, tuiHeightCollapseList, tuiPop, tuiScaleIn, tuiScaleInList, tuiSlideIn, tuiSlideInBottom, tuiSlideInBottomList, tuiSlideInLeft, tuiSlideInLeftList, tuiSlideInRight, tuiSlideInRightList, tuiSlideInTop, tuiSlideInTopList, tuiWidthCollapse, tuiWidthCollapseList };\n","import * as i0 from '@angular/core';\nimport { Directive, Input, NgModule } from '@angular/core';\nimport { AbstractTuiController } from '@taiga-ui/cdk';\nlet TuiModeDirective = /*#__PURE__*/(() => {\n class TuiModeDirective extends AbstractTuiController {\n constructor() {\n super(...arguments);\n this.mode = null;\n }\n }\n TuiModeDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiModeDirective_BaseFactory;\n return function TuiModeDirective_Factory(t) {\n return (ɵTuiModeDirective_BaseFactory || (ɵTuiModeDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiModeDirective)))(t || TuiModeDirective);\n };\n })();\n TuiModeDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiModeDirective,\n selectors: [[\"\", \"tuiMode\", \"\"]],\n inputs: {\n mode: [0, \"tuiMode\", \"mode\"]\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n return TuiModeDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiModeModule = /*#__PURE__*/(() => {\n class TuiModeModule {}\n TuiModeModule.ɵfac = function TuiModeModule_Factory(t) {\n return new (t || TuiModeModule)();\n };\n TuiModeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiModeModule\n });\n TuiModeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiModeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiModeDirective, TuiModeModule };\n","import { SkipSelf, ElementRef, Optional } from '@angular/core';\nimport { TUI_IS_MOBILE_RES, TUI_MODE } from '@taiga-ui/core/tokens';\nimport { TuiModeDirective } from '@taiga-ui/core/directives/mode';\nimport { of } from 'rxjs';\nimport { startWith, map, takeUntil } from 'rxjs/operators';\nimport { tuiWatch } from '@taiga-ui/cdk';\n\n/**\n * @deprecated: drop in v4.0\n */\nconst TUI_IS_MOBILE_RES_PROVIDER = {\n provide: TUI_IS_MOBILE_RES,\n deps: [[new SkipSelf(), TUI_IS_MOBILE_RES], ElementRef],\n useFactory: (mobile$, {\n nativeElement\n }) => {\n nativeElement['$.class._mobile'] = mobile$;\n return mobile$;\n }\n};\nconst MODE_PROVIDER = {\n provide: TUI_MODE,\n deps: [[new Optional(), TuiModeDirective], ElementRef],\n useFactory: (mode, {\n nativeElement\n }) => {\n const mode$ = mode ? mode.change$.pipe(startWith(null), map(() => mode.mode)) : of(null);\n nativeElement['$.data-mode.attr'] = mode$;\n return mode$;\n }\n};\nfunction tuiWatchedControllerFactory(controller, cdr, destroy$) {\n controller.change$.pipe(tuiWatch(cdr), takeUntil(destroy$)).subscribe();\n return controller;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MODE_PROVIDER, TUI_IS_MOBILE_RES_PROVIDER, tuiWatchedControllerFactory };\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 */\nconst _c0 = [\"*\"];\nfunction TuiScrollbarComponent_tui_scroll_controls_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-scroll-controls\", 2);\n }\n}\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.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 delegated() {\n return this.browserScrollRef.nativeElement !== 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.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: 3,\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 i0.ɵɵadvance();\n i0.ɵɵclassProp(\"t-content_delegated\", ctx.delegated);\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-content_delegated[_ngcontent-%COMP%]{height:100%}.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 { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';\nimport * as i0 from '@angular/core';\nimport { Injectable, InjectionToken, inject, NgModule, Inject } from '@angular/core';\nimport { EMPTY, concat, defer } from 'rxjs';\nimport { takeWhile } from 'rxjs/operators';\nimport { DOCUMENT } from '@angular/common';\nfunction dasharize(camel) {\n return camel.replace(/[a-z][A-Z]/g, letterLetter => {\n return `${letterLetter[0]}-${letterLetter[1].toLowerCase()}`;\n });\n}\nclass AbstractEventPlugin {\n supports(event) {\n return event.includes(this.modifier);\n }\n /** This is not used in Ivy anymore */\n addGlobalEventListener() {\n return () => {};\n }\n unwrap(event) {\n return event.split('.').filter(v => !this.modifier.includes(v)).join('.');\n }\n}\nlet BindEventPlugin = /*#__PURE__*/(() => {\n class BindEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '$';\n }\n addEventListener(element, event) {\n element[event] = element[event] || EMPTY;\n const method = this.getMethod(element, event);\n const zone$ = this.manager.getZone().onStable;\n const sub = concat(zone$.pipe(takeWhile(() => element[event] === EMPTY)), defer(() => element[event])).subscribe(method);\n return () => sub.unsubscribe();\n }\n getMethod(element, event) {\n const [, key, value, unit = ''] = event.split('.');\n if (event.endsWith('.attr')) {\n return v => v === null ? element.removeAttribute(key) : element.setAttribute(key, String(v));\n }\n if (key === 'class') {\n return v => element.classList.toggle(value, !!v);\n }\n if (key === 'style') {\n return v => element.style.setProperty(dasharize(value), `${v}${unit}`);\n }\n return v => element[key] = v;\n }\n }\n /** @nocollapse */\n /** @nocollapse */BindEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵBindEventPlugin_BaseFactory;\n return function BindEventPlugin_Factory(t) {\n return (ɵBindEventPlugin_BaseFactory || (ɵBindEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(BindEventPlugin)))(t || BindEventPlugin);\n };\n })();\n BindEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: BindEventPlugin,\n factory: BindEventPlugin.ɵfac\n });\n return BindEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst GLOBAL_HANDLER = new InjectionToken('[GLOBAL_HANDLER]: Global event target handler', {\n factory: () => {\n const document = inject(DOCUMENT);\n return name => name === 'body' ? document.body : document.defaultView[name] || document.createElement('div');\n }\n});\nlet GlobalEventPlugin = /*#__PURE__*/(() => {\n class GlobalEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.handler = inject(GLOBAL_HANDLER);\n this.modifier = '>';\n }\n addEventListener(_, event, handler) {\n return this.manager.addEventListener(this.handler(event.split('>')[0]), event.split('>')[1], handler);\n }\n }\n /** @nocollapse */\n /** @nocollapse */GlobalEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵGlobalEventPlugin_BaseFactory;\n return function GlobalEventPlugin_Factory(t) {\n return (ɵGlobalEventPlugin_BaseFactory || (ɵGlobalEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(GlobalEventPlugin)))(t || GlobalEventPlugin);\n };\n })();\n GlobalEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: GlobalEventPlugin,\n factory: GlobalEventPlugin.ɵfac\n });\n return GlobalEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet OptionsEventPlugin = /*#__PURE__*/(() => {\n class OptionsEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = 'capture.once.passive';\n }\n supports(event) {\n return event.includes('.') && !this.unwrap(event).includes('.');\n }\n addEventListener(element, event, handler) {\n element.addEventListener(this.unwrap(event), handler, {\n once: event.includes('.once'),\n passive: event.includes('.passive'),\n capture: event.includes('.capture')\n });\n return () => element.removeEventListener(this.unwrap(event), handler, event.includes('.capture'));\n }\n }\n /** @nocollapse */\n /** @nocollapse */OptionsEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵOptionsEventPlugin_BaseFactory;\n return function OptionsEventPlugin_Factory(t) {\n return (ɵOptionsEventPlugin_BaseFactory || (ɵOptionsEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(OptionsEventPlugin)))(t || OptionsEventPlugin);\n };\n })();\n OptionsEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: OptionsEventPlugin,\n factory: OptionsEventPlugin.ɵfac\n });\n return OptionsEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet PreventEventPlugin = /*#__PURE__*/(() => {\n class PreventEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '.prevent';\n }\n addEventListener(element, event, handler) {\n const wrapped = event => {\n event.preventDefault();\n handler(event);\n };\n return this.manager.addEventListener(element, this.unwrap(event), wrapped);\n }\n }\n /** @nocollapse */\n /** @nocollapse */PreventEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵPreventEventPlugin_BaseFactory;\n return function PreventEventPlugin_Factory(t) {\n return (ɵPreventEventPlugin_BaseFactory || (ɵPreventEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(PreventEventPlugin)))(t || PreventEventPlugin);\n };\n })();\n PreventEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: PreventEventPlugin,\n factory: PreventEventPlugin.ɵfac\n });\n return PreventEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SelfEventPlugin = /*#__PURE__*/(() => {\n class SelfEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '.self';\n }\n addEventListener(element, event, handler) {\n const wrapped = event => {\n if (event.target === event.currentTarget) {\n handler(event);\n }\n };\n return this.manager.addEventListener(element, this.unwrap(event), wrapped);\n }\n }\n /** @nocollapse */\n /** @nocollapse */SelfEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵSelfEventPlugin_BaseFactory;\n return function SelfEventPlugin_Factory(t) {\n return (ɵSelfEventPlugin_BaseFactory || (ɵSelfEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(SelfEventPlugin)))(t || SelfEventPlugin);\n };\n })();\n SelfEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SelfEventPlugin,\n factory: SelfEventPlugin.ɵfac\n });\n return SelfEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet SilentEventPlugin = /*#__PURE__*/(() => {\n class SilentEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '.silent';\n }\n addEventListener(element, event, handler) {\n SilentEventPlugin.ngZone = this.manager.getZone();\n return SilentEventPlugin.ngZone.runOutsideAngular(() => this.manager.addEventListener(element, this.unwrap(event), handler));\n }\n }\n /** @nocollapse */\n /** @nocollapse */SilentEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵSilentEventPlugin_BaseFactory;\n return function SilentEventPlugin_Factory(t) {\n return (ɵSilentEventPlugin_BaseFactory || (ɵSilentEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(SilentEventPlugin)))(t || SilentEventPlugin);\n };\n })();\n SilentEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: SilentEventPlugin,\n factory: SilentEventPlugin.ɵfac\n });\n return SilentEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet StopEventPlugin = /*#__PURE__*/(() => {\n class StopEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '.stop';\n }\n addEventListener(element, event, handler) {\n const wrapped = event => {\n event.stopPropagation();\n handler(event);\n };\n return this.manager.addEventListener(element, this.unwrap(event), wrapped);\n }\n }\n /** @nocollapse */\n /** @nocollapse */StopEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵStopEventPlugin_BaseFactory;\n return function StopEventPlugin_Factory(t) {\n return (ɵStopEventPlugin_BaseFactory || (ɵStopEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(StopEventPlugin)))(t || StopEventPlugin);\n };\n })();\n StopEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: StopEventPlugin,\n factory: StopEventPlugin.ɵfac\n });\n return StopEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\r\n * TODO: Remove in v4.0.0\r\n * @deprecated\r\n */\nlet ZoneEventPlugin = /*#__PURE__*/(() => {\n class ZoneEventPlugin extends AbstractEventPlugin {\n constructor() {\n super(...arguments);\n this.modifier = '.init';\n }\n addEventListener() {\n console.warn('.init plugin is no longer necessary as of v3.1.0');\n return () => {};\n }\n }\n /** @nocollapse */\n /** @nocollapse */ZoneEventPlugin.ɵfac = /* @__PURE__ */(() => {\n let ɵZoneEventPlugin_BaseFactory;\n return function ZoneEventPlugin_Factory(t) {\n return (ɵZoneEventPlugin_BaseFactory || (ɵZoneEventPlugin_BaseFactory = i0.ɵɵgetInheritedFactory(ZoneEventPlugin)))(t || ZoneEventPlugin);\n };\n })();\n ZoneEventPlugin.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ZoneEventPlugin,\n factory: ZoneEventPlugin.ɵfac\n });\n return ZoneEventPlugin;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst PLUGINS = [SilentEventPlugin, BindEventPlugin, GlobalEventPlugin, OptionsEventPlugin, PreventEventPlugin, SelfEventPlugin, StopEventPlugin, ZoneEventPlugin];\nconst NG_EVENT_PLUGINS = PLUGINS.map(useClass => ({\n provide: EVENT_MANAGER_PLUGINS,\n multi: true,\n useClass\n}));\nfunction shouldCall(predicate) {\n return (_target, _key, desc) => {\n const {\n value\n } = desc;\n desc.value = function (...args) {\n if (!predicate.apply(this, args)) {\n return;\n }\n if (SilentEventPlugin.ngZone) {\n SilentEventPlugin.ngZone.run(() => value.apply(this, args));\n } else {\n value.apply(this, args);\n }\n };\n };\n}\nfunction asCallable(a) {\n return a;\n}\nlet EventPluginsModule = /*#__PURE__*/(() => {\n class EventPluginsModule {\n constructor([plugin]) {\n console.assert(!(plugin instanceof SilentEventPlugin) || EventPluginsModule.initialized, 'EventPluginsModule must come after BrowserModule in imports');\n EventPluginsModule.initialized = true;\n }\n }\n EventPluginsModule.initialized = false;\n /** @nocollapse */\n /** @nocollapse */\n /** @nocollapse */\n EventPluginsModule.ɵfac = function EventPluginsModule_Factory(t) {\n return new (t || EventPluginsModule)(i0.ɵɵinject(EVENT_MANAGER_PLUGINS));\n };\n EventPluginsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: EventPluginsModule\n });\n EventPluginsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: NG_EVENT_PLUGINS\n });\n return EventPluginsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\r\n * Public API Surface of @tinkoff/ng-event-plugins\r\n */\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { BindEventPlugin, EventPluginsModule, GLOBAL_HANDLER, GlobalEventPlugin, NG_EVENT_PLUGINS, OptionsEventPlugin, PreventEventPlugin, SilentEventPlugin, StopEventPlugin, ZoneEventPlugin, asCallable, shouldCall };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Directive, Input, Output, ElementRef, INJECTOR, Self, Inject, Optional, SkipSelf, forwardRef, Component, ChangeDetectionStrategy, HostBinding, 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, EMPTY_CLIENT_RECT, tuiPx, tuiGetClosestFocusable, tuiPointToClientRect, TuiActiveZoneDirective, TUI_IS_IOS, TUI_TOUCH_SUPPORTED, 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$1 from '@taiga-ui/core/abstract';\nimport { tuiAsRectAccessor, tuiAsVehicle, TuiDriver, tuiAsDriver, TuiPositionAccessor, tuiFallbackRectAccessor, TuiRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor, AbstractTuiDriverDirective, TuiVehicle, 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_VIEWPORT, TUI_ANIMATION_OPTIONS, TUI_MODE, 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$2 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 */\nconst _c0 = a0 => ({\n $implicit: a0\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();\n i0.ɵɵtextInterpolate1(\" \", text_r2, \" \");\n }\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: [0, \"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: [0, \"tuiDropdownShowDelay\", \"showDelay\"],\n hideDelay: [0, \"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: [0, \"tuiDropdownAlign\", \"align\"],\n appearance: [0, \"tuiDropdownAppearance\", \"appearance\"],\n direction: [0, \"tuiDropdownDirection\", \"direction\"],\n limitWidth: [0, \"tuiDropdownLimitWidth\", \"limitWidth\"],\n minHeight: [0, \"tuiDropdownMinHeight\", \"minHeight\"],\n maxHeight: [0, \"tuiDropdownMaxHeight\", \"maxHeight\"],\n offset: [0, \"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})();\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 limitWidth\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 rectWidth = limitWidth === 'fixed' ? hostRect.width : width;\n const right = Math.max(hostRect.right - rectWidth, 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\", \"\"]],\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n __decorate([tuiPure], TuiDropdownPositionDirective.prototype, \"accessor\", null);\n return TuiDropdownPositionDirective;\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(vvs, 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' ? vvs.correct(point) : point), takeUntil(destroy$)).subscribe(([top, left]) => {\n if (this.directive.el.nativeElement.isConnected) {\n this.update(top, left);\n } else {\n this.directive.toggle(false);\n }\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 minHeight,\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 const sided = right <= rect.left || left >= rect.right;\n style.position = position;\n style.top = tuiPx(Math.max(top, offsetY + offset));\n style.left = tuiPx(left);\n style.maxHeight = sided ? `${maxHeight}px` : tuiPx(Math.min(maxHeight, Math.max(available, minHeight)));\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.ɵɵsyntheticHostProperty(\"@tuiDropdownAnimation\", ctx.animation);\n i0.ɵɵattribute(\"data-appearance\", ctx.options.appearance);\n }\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPositionService, tuiPositionAccessorFor('dropdown', TuiDropdownPositionDirective), tuiRectAccessorFor('dropdown', TuiDropdownDirective), MODE_PROVIDER])],\n decls: 5,\n vars: 4,\n consts: [[\"activeZone\", \"tuiActiveZone\"], [\"tuiActiveZone\", \"\", \"tuiOverscroll\", \"all\", 1, \"t-scroll\", 3, \"tuiHoveredChange\"], [\"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 const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-scrollbar\", 1, 0);\n i0.ɵɵlistener(\"tuiHoveredChange\", function TuiDropdownComponent_Template_tui_scrollbar_tuiHoveredChange_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onHoveredChange($event));\n });\n i0.ɵɵelementStart(2, \"div\", 2);\n i0.ɵɵlistener(\"focus\", function TuiDropdownComponent_Template_div_focus_2_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(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 i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onBottomFocus());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const activeZone_r3 = i0.ɵɵreference(1);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.directive.content)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c0, activeZone_r3));\n }\n },\n dependencies: [i1$2.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}\nconst TAP_DELAY = 700;\nconst MOVE_THRESHOLD = 15;\nlet TuiDropdownContextDirective = /*#__PURE__*/(() => {\n class TuiDropdownContextDirective extends TuiDriver {\n constructor(activeZone, isIOS, isTouch) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.activeZone = activeZone;\n this.isIOS = isIOS;\n this.isTouch = isTouch;\n this.stream$ = new Subject();\n this.currentRect = EMPTY_CLIENT_RECT;\n this.longTapTimeout = NaN;\n this.type = 'dropdown';\n }\n get userSelect() {\n return this.isTouch ? 'none' : null;\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 this.currentRect = EMPTY_CLIENT_RECT;\n }\n onTouchMove(x, y) {\n if (this.isIOS && this.isTouch && this.currentRect !== EMPTY_CLIENT_RECT && Math.hypot(x - this.currentRect.x, y - this.currentRect.y) > MOVE_THRESHOLD) {\n this.onTouchEnd();\n }\n }\n onTouchStart(x, y) {\n if (!this.isIOS || !this.isTouch || this.currentRect !== EMPTY_CLIENT_RECT) {\n return;\n }\n this.currentRect = tuiPointToClientRect(x, y);\n this.longTapTimeout = setTimeout(() => {\n this.stream$.next(true);\n }, TAP_DELAY);\n }\n onTouchEnd() {\n if (this.isIOS && this.isTouch) {\n clearTimeout(this.longTapTimeout);\n }\n }\n getClientRect() {\n return this.currentRect;\n }\n }\n TuiDropdownContextDirective.ɵfac = function TuiDropdownContextDirective_Factory(t) {\n return new (t || TuiDropdownContextDirective)(i0.ɵɵdirectiveInject(TuiActiveZoneDirective), i0.ɵɵdirectiveInject(TUI_IS_IOS), i0.ɵɵdirectiveInject(TUI_TOUCH_SUPPORTED));\n };\n TuiDropdownContextDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownContextDirective,\n selectors: [[\"\", \"tuiDropdown\", \"\", \"tuiDropdownContext\", \"\"]],\n hostVars: 6,\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)(\"touchmove.silent.passive\", function TuiDropdownContextDirective_touchmove_silent_passive_HostBindingHandler($event) {\n return ctx.onTouchMove($event.touches[0].clientX, $event.touches[0].clientY);\n })(\"touchstart.silent.passive\", function TuiDropdownContextDirective_touchstart_silent_passive_HostBindingHandler($event) {\n return ctx.onTouchStart($event.touches[0].clientX, $event.touches[0].clientY);\n })(\"touchend.silent.passive\", function TuiDropdownContextDirective_touchend_silent_passive_HostBindingHandler() {\n return ctx.onTouchEnd();\n })(\"touchcancel.silent.passive\", function TuiDropdownContextDirective_touchcancel_silent_passive_HostBindingHandler() {\n return ctx.onTouchEnd();\n });\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"user-select\", ctx.userSelect)(\"-webkit-touch-callout\", ctx.userSelect)(\"-webkit-user-select\", ctx.userSelect);\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 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 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((x, y) => x.startOffset === y.startOffset && x.endOffset === y.endOffset && x.commonAncestorContainer === y.commonAncestorContainer))]).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 const range = active && tuiIsTextfield(active) && this.el.nativeElement.contains(active) ? this.veryVerySadInputFix(active) : (selection === null || selection === void 0 ? void 0 : selection.rangeCount) && selection.getRangeAt(0) || this.range;\n return range.cloneRange();\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 * 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 * 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: [0, \"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, tuiPure, tuiClamp, tuiPx, TuiDestroyService, tuiIfMap, tuiTypedFromEvent, tuiIsPresent, tuiZoneOptimized, tuiIsNativeFocused, TUI_PARENT_ANIMATION } from '@taiga-ui/cdk';\nimport * as i1$1 from '@taiga-ui/core/abstract';\nimport { tuiAsRectAccessor, tuiAsVehicle, TuiDriver, tuiAsDriver, TuiPositionAccessor, tuiFallbackRectAccessor, TuiRectAccessor, tuiPositionAccessorFor, tuiRectAccessorFor, AbstractTuiDriverDirective, TuiVehicle } 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_VIEWPORT, TUI_ANIMATION_OPTIONS } 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 { TUI_HINT_DIRECTIONS } from '@taiga-ui/core/constants';\nimport { DOCUMENT, CommonModule } from '@angular/common';\n\n/**\n * A component to display a hint\n */\nconst _c0 = [\"*\"];\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}\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: [0, \"tuiHintContent\", \"content\"],\n direction: [0, \"tuiHintDirection\", \"direction\"],\n appearance: [0, \"tuiHintAppearance\", \"appearance\"],\n showDelay: [0, \"tuiHintShowDelay\", \"showDelay\"],\n hideDelay: [0, \"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 set tuiHint(content) {\n this.content = content;\n if (!content) {\n this.toggle(false);\n }\n }\n get appearance() {\n var _a;\n return (_a = this.tuiHintAppearance) !== null && _a !== void 0 ? _a : this.options.appearance;\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 tuiHint: \"tuiHint\",\n context: [0, \"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 }])]\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, parent) {\n super(subscriber => this.stream$.subscribe(subscriber));\n this.hovered$ = hovered$;\n this.options = options;\n this.el = el;\n this.parent = parent;\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 && (this.el.nativeElement.hasAttribute('tuiHintPointer') || !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 var _a;\n this.toggle$.next(visible);\n (_a = this.parent) === null || _a === void 0 ? void 0 : _a.toggle(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), i0.ɵɵdirectiveInject(TuiHintHoverDirective, 12));\n };\n TuiHintHoverDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiHintHoverDirective,\n selectors: [[\"\", \"tuiHint\", \"\", 5, \"ng-container\", 5, \"ng-template\"]],\n inputs: {\n showDelay: [0, \"tuiHintShowDelay\", \"showDelay\"],\n hideDelay: [0, \"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 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 / 4 && left > OFFSET / 4 && top + height < viewport.bottom - OFFSET / 4 && left + width < viewport.right - OFFSET / 4;\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\", \"\", 5, \"ng-container\", 5, \"ng-template\"]],\n inputs: {\n direction: [0, \"tuiHintDirection\", \"direction\"]\n },\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n __decorate([tuiPure], TuiHintPositionDirective.prototype, \"accessor\", null);\n return TuiHintPositionDirective;\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, vvs, 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.vvs = vvs;\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.vvs.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 (!target.closest('tui-hint') && !this.hover.el.nativeElement.contains(target) || tuiIsObscured(this.hover.el.nativeElement)) {\n this.hover.toggle(false);\n }\n }\n update(top, left) {\n if (!this.hover.el.nativeElement.isConnected) {\n this.hover.toggle(false);\n return;\n }\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.vvs.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.ɵɵsyntheticHostProperty(\"@tuiFadeIn\", ctx.animation);\n i0.ɵɵattribute(\"data-appearance\", ctx.appearance);\n i0.ɵɵclassProp(\"_untouchable\", ctx.pointer);\n }\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPositionService, TuiHoveredService, tuiPositionAccessorFor('hint', TuiHintPositionDirective), 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();\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;line-height:1.25rem}[_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})();\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 { 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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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: [0, \"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 { 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 { Directive, Inject, Input, HostBinding, NgModule } from '@angular/core';\nimport { TuiInteractiveState } from '@taiga-ui/core/enums';\nimport { MODE_PROVIDER } from '@taiga-ui/core/providers';\nimport { TUI_MODE } from '@taiga-ui/core/tokens';\nimport * as i1 from 'rxjs';\nlet TuiWrapperDirective = /*#__PURE__*/(() => {\n class TuiWrapperDirective {\n constructor(mode$) {\n this.mode$ = mode$;\n this.disabled = false;\n this.readOnly = false;\n this.hover = null;\n this.active = null;\n this.focus = false;\n this.invalid = false;\n this.appearance = '';\n }\n get computedInvalid() {\n return !this.disabled && !this.readOnly && this.invalid;\n }\n get computedFocused() {\n return this.focus && !this.disabled;\n }\n get interactiveState() {\n if (this.disabled) {\n return TuiInteractiveState.Disabled;\n }\n if (this.readOnly) {\n return TuiInteractiveState.Readonly;\n }\n if (this.active) {\n return TuiInteractiveState.Active;\n }\n if (this.hover) {\n return TuiInteractiveState.Hover;\n }\n return null;\n }\n get noHover() {\n return this.readOnly || this.hover === false;\n }\n get noActive() {\n return this.readOnly || this.active === false;\n }\n }\n TuiWrapperDirective.ɵfac = function TuiWrapperDirective_Factory(t) {\n return new (t || TuiWrapperDirective)(i0.ɵɵdirectiveInject(TUI_MODE));\n };\n TuiWrapperDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiWrapperDirective,\n selectors: [[\"\", \"tuiWrapper\", \"\"]],\n hostVars: 10,\n hostBindings: function TuiWrapperDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"$.data-mode.attr\", function TuiWrapperDirective___data_mode_attr_HostBindingHandler() {\n return ctx.mode$;\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-appearance\", ctx.appearance)(\"data-state\", ctx.interactiveState);\n i0.ɵɵclassProp(\"_invalid\", ctx.computedInvalid)(\"_focused\", ctx.computedFocused)(\"_no-hover\", ctx.noHover)(\"_no-active\", ctx.noActive);\n }\n },\n inputs: {\n disabled: \"disabled\",\n readOnly: \"readOnly\",\n hover: \"hover\",\n active: \"active\",\n focus: \"focus\",\n invalid: \"invalid\",\n appearance: \"appearance\"\n },\n features: [i0.ɵɵProvidersFeature([MODE_PROVIDER])]\n });\n return TuiWrapperDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiWrapperModule = /*#__PURE__*/(() => {\n class TuiWrapperModule {}\n TuiWrapperModule.ɵfac = function TuiWrapperModule_Factory(t) {\n return new (t || TuiWrapperModule)();\n };\n TuiWrapperModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiWrapperModule\n });\n TuiWrapperModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiWrapperModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiWrapperDirective, TuiWrapperModule };\n","import * as i1 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { ElementRef, Component, ChangeDetectionStrategy, Inject, Input, HostBinding, NgModule } from '@angular/core';\nimport { tuiCreateToken, tuiProvideOptions, tuiIsSafari, tuiBlurNativeFocused, tuiIsNativeFocusedIn, TUI_IS_IOS } from '@taiga-ui/cdk';\nimport { tuiSizeBigger } from '@taiga-ui/core/utils/miscellaneous';\nimport * as i2 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\n\n/** Default values for the loader options. */\nconst _c0 = [\"*\"];\nfunction TuiLoaderComponent_div_2_div_3_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_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", text_r1, \" \");\n }\n}\nfunction TuiLoaderComponent_div_2_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵtemplate(1, TuiLoaderComponent_div_2_div_3_ng_container_1_Template, 2, 1, \"ng-container\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵclassProp(\"t-text_horizontal\", ctx_r1.isHorizontal);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.textContent);\n }\n}\nfunction TuiLoaderComponent_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"svg\", 3);\n i0.ɵɵelement(2, \"circle\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(3, TuiLoaderComponent_div_2_div_3_Template, 2, 3, \"div\", 5);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-loader_horizontal\", ctx_r1.isHorizontal)(\"t-loader_inherit-color\", ctx_r1.inheritColor);\n i0.ɵɵattribute(\"data-size\", ctx_r1.size);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx_r1.hasText);\n }\n}\nconst TUI_LOADER_DEFAULT_OPTIONS = {\n size: 'm',\n inheritColor: false,\n overlay: false\n};\n/**\n * Default parameters for loader component\n */\nconst TUI_LOADER_OPTIONS = tuiCreateToken(TUI_LOADER_DEFAULT_OPTIONS);\nfunction tuiLoaderOptionsProvider(options) {\n return tuiProvideOptions(TUI_LOADER_OPTIONS, options, TUI_LOADER_DEFAULT_OPTIONS);\n}\nlet TuiLoaderComponent = /*#__PURE__*/(() => {\n class TuiLoaderComponent {\n constructor(doc, el, isIos, options) {\n this.doc = doc;\n this.el = el;\n this.isIos = isIos;\n this.options = options;\n this.size = this.options.size;\n this.inheritColor = this.options.inheritColor;\n this.overlay = this.options.overlay;\n this.loading = true;\n this.isApple = tuiIsSafari(this.el.nativeElement) || this.isIos;\n }\n set showLoader(value) {\n // @bad TODO: https://github.com/angular/angular/issues/32083 think of a better way\n if (value && this.focused) {\n tuiBlurNativeFocused(this.doc);\n }\n this.loading = value;\n }\n get hasOverlay() {\n return this.overlay && this.loading;\n }\n get hasText() {\n return !!this.textContent;\n }\n get isHorizontal() {\n return !tuiSizeBigger(this.size);\n }\n get focused() {\n return tuiIsNativeFocusedIn(this.el.nativeElement);\n }\n }\n TuiLoaderComponent.ɵfac = function TuiLoaderComponent_Factory(t) {\n return new (t || TuiLoaderComponent)(i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_IS_IOS), i0.ɵɵdirectiveInject(TUI_LOADER_OPTIONS));\n };\n TuiLoaderComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiLoaderComponent,\n selectors: [[\"tui-loader\"]],\n hostVars: 2,\n hostBindings: function TuiLoaderComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"_loading\", ctx.loading);\n }\n },\n inputs: {\n size: \"size\",\n inheritColor: \"inheritColor\",\n overlay: \"overlay\",\n textContent: \"textContent\",\n showLoader: \"showLoader\"\n },\n ngContentSelectors: _c0,\n decls: 3,\n vars: 7,\n 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\"]],\n template: function TuiLoaderComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"fieldset\", 0);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, TuiLoaderComponent_div_2_Template, 4, 6, \"div\", 1);\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"t-content_has-overlay\", ctx.hasOverlay)(\"t-content_loading\", ctx.loading);\n i0.ɵɵproperty(\"disabled\", ctx.loading && !ctx.isApple);\n i0.ɵɵattribute(\"inert\", ctx.loading || null);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.loading);\n }\n },\n dependencies: [i1.NgIf, i2.PolymorpheusOutletDirective],\n 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}\"],\n changeDetection: 0\n });\n return TuiLoaderComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLoaderModule = /*#__PURE__*/(() => {\n class TuiLoaderModule {}\n TuiLoaderModule.ɵfac = function TuiLoaderModule_Factory(t) {\n return new (t || TuiLoaderModule)();\n };\n TuiLoaderModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiLoaderModule\n });\n TuiLoaderModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, PolymorpheusModule]]\n });\n return TuiLoaderModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_LOADER_DEFAULT_OPTIONS, TUI_LOADER_OPTIONS, TuiLoaderComponent, TuiLoaderModule, tuiLoaderOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Component, ChangeDetectionStrategy, Optional, Inject, Input, HostBinding, HostListener, NgModule } from '@angular/core';\nimport { tuiCreateToken, tuiProvideOptions, AbstractTuiInteractive, tuiIsNativeFocused, tuiAsFocusableItemAccessor, TuiDestroyService } from '@taiga-ui/cdk';\nimport * as i6 from '@taiga-ui/core/directives';\nimport { TuiModeDirective } from '@taiga-ui/core/directives';\nimport { EMPTY } from 'rxjs';\nimport { startWith, map, distinctUntilChanged } from 'rxjs/operators';\nimport { TuiAppearance } from '@taiga-ui/core/enums';\nimport * as i1 from '@taiga-ui/core/components/svg';\nimport { TuiSvgModule } from '@taiga-ui/core/components/svg';\nimport * as i2 from '@taiga-ui/core/components/loader';\nimport { TuiLoaderModule } from '@taiga-ui/core/components/loader';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from '@taiga-ui/core/directives/wrapper';\nimport { TuiWrapperModule } from '@taiga-ui/core/directives/wrapper';\nimport * as i5 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nconst _c0 = [\"tuiButton\", \"\"];\nconst _c1 = [\"*\"];\nfunction TuiButtonComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction TuiButtonComponent_span_4_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 8);\n }\n if (rf & 2) {\n const text_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", text_r1);\n }\n}\nfunction TuiButtonComponent_span_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 6);\n i0.ɵɵtemplate(1, TuiButtonComponent_span_4_tui_svg_1_Template, 1, 1, \"tui-svg\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.icon);\n }\n}\nfunction TuiButtonComponent_span_6_tui_svg_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 8);\n }\n if (rf & 2) {\n const text_r3 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", text_r3);\n }\n}\nfunction TuiButtonComponent_span_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 9);\n i0.ɵɵtemplate(1, TuiButtonComponent_span_6_tui_svg_1_Template, 1, 1, \"tui-svg\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.iconRight);\n }\n}\nfunction TuiButtonComponent_tui_loader_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-loader\", 10);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"inheritColor\", true)(\"size\", ctx_r1.loaderSize);\n }\n}\nconst TUI_BUTTON_DEFAULT_OPTIONS = {\n size: 'l',\n shape: null,\n appearance: TuiAppearance.Primary\n};\n/**\n * Default parameters for button component\n */\nconst TUI_BUTTON_OPTIONS = tuiCreateToken(TUI_BUTTON_DEFAULT_OPTIONS);\nfunction tuiButtonOptionsProvider(options) {\n return tuiProvideOptions(TUI_BUTTON_OPTIONS, options, TUI_BUTTON_DEFAULT_OPTIONS);\n}\nlet TuiButtonComponent = /*#__PURE__*/(() => {\n class TuiButtonComponent extends AbstractTuiInteractive {\n constructor(mode, el, options) {\n var _a;\n super();\n this.mode = mode;\n this.el = el;\n this.options = options;\n this.mode$ = ((_a = this.mode) === null || _a === void 0 ? void 0 : _a.change$) || EMPTY;\n this.appearance = null;\n this.disabled = false;\n this.shape = this.options.shape;\n this.showLoader = false;\n this.size = this.options.size;\n this.appearance$ = this.mode$.pipe(startWith(null), map(() => this.computedAppearance), distinctUntilChanged());\n }\n get nativeFocusableElement() {\n return this.nativeDisabled ? null : this.el.nativeElement;\n }\n get focused() {\n return !this.showLoader && tuiIsNativeFocused(this.el.nativeElement);\n }\n get loaderSize() {\n return this.size === 'l' || this.size === 'xl' ? 'm' : 's';\n }\n get computedAppearance() {\n var _a;\n return (_a = this.appearance) !== null && _a !== void 0 ? _a : this.options.appearance || '';\n }\n get nativeDisabled() {\n return this.computedDisabled || this.showLoader ? '' : null;\n }\n get tabIndex() {\n return this.focusable ? 0 : -1;\n }\n onFocused(focused) {\n this.updateFocused(focused);\n }\n }\n TuiButtonComponent.ɵfac = function TuiButtonComponent_Factory(t) {\n return new (t || TuiButtonComponent)(i0.ɵɵdirectiveInject(TuiModeDirective, 8), i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_BUTTON_OPTIONS));\n };\n TuiButtonComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiButtonComponent,\n selectors: [[\"button\", \"tuiButton\", \"\"], [\"button\", \"tuiIconButton\", \"\"], [\"a\", \"tuiButton\", \"\"], [\"a\", \"tuiIconButton\", \"\"]],\n hostVars: 7,\n hostBindings: function TuiButtonComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focusin\", function TuiButtonComponent_focusin_HostBindingHandler() {\n return ctx.onFocused(true);\n })(\"focusout\", function TuiButtonComponent_focusout_HostBindingHandler() {\n return ctx.onFocused(false);\n });\n }\n if (rf & 2) {\n i0.ɵɵhostProperty(\"tabIndex\", ctx.tabIndex);\n i0.ɵɵattribute(\"data-shape\", ctx.shape)(\"data-size\", ctx.size)(\"data-appearance\", ctx.computedAppearance)(\"disabled\", ctx.nativeDisabled);\n i0.ɵɵclassProp(\"_loading\", ctx.showLoader);\n }\n },\n inputs: {\n appearance: \"appearance\",\n disabled: \"disabled\",\n icon: \"icon\",\n iconRight: \"iconRight\",\n shape: \"shape\",\n showLoader: \"showLoader\",\n size: \"size\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiButtonComponent), TuiDestroyService]), i0.ɵɵInheritDefinitionFeature],\n attrs: _c0,\n ngContentSelectors: _c1,\n decls: 8,\n vars: 10,\n 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\"]],\n template: function TuiButtonComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, TuiButtonComponent_ng_container_0_Template, 1, 0, \"ng-container\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵelementStart(2, \"div\", 1)(3, \"span\", 2);\n i0.ɵɵtemplate(4, TuiButtonComponent_span_4_Template, 2, 1, \"span\", 3);\n i0.ɵɵprojection(5);\n i0.ɵɵtemplate(6, TuiButtonComponent_span_6_Template, 2, 1, \"span\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(7, TuiButtonComponent_tui_loader_7_Template, 1, 2, \"tui-loader\", 5);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 8, ctx.appearance$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"active\", ctx.pseudoActive)(\"appearance\", ctx.computedAppearance)(\"disabled\", ctx.computedDisabled)(\"hover\", ctx.pseudoHover);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.icon);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.iconRight);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showLoader);\n }\n },\n dependencies: [i1.TuiSvgComponent, i2.TuiLoaderComponent, i3.NgIf, i4.TuiWrapperDirective, i5.PolymorpheusOutletDirective, i3.AsyncPipe],\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;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%], [tuiIconButton][data-appearance=link][data-size=s][_nghost-%COMP%] .t-left[_ngcontent-%COMP%], [tuiIconButton][data-appearance=link][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}\"],\n changeDetection: 0\n });\n return TuiButtonComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiButtonModule = /*#__PURE__*/(() => {\n class TuiButtonModule {}\n TuiButtonModule.ɵfac = function TuiButtonModule_Factory(t) {\n return new (t || TuiButtonModule)();\n };\n TuiButtonModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiButtonModule\n });\n TuiButtonModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, PolymorpheusModule, TuiWrapperModule, TuiSvgModule, TuiLoaderModule]]\n });\n return TuiButtonModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_BUTTON_DEFAULT_OPTIONS, TUI_BUTTON_OPTIONS, TuiButtonComponent, TuiButtonModule, tuiButtonOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Component, ChangeDetectionStrategy, Inject, Input, HostBinding, NgModule } from '@angular/core';\nimport * as i4 from '@taiga-ui/cdk';\nimport { tuiTypedFromEvent, ALWAYS_TRUE_HANDLER, ALWAYS_FALSE_HANDLER, tuiIsNativeFocused, TuiFocusVisibleService, tuiAsFocusableItemAccessor, TuiDestroyService } from '@taiga-ui/cdk';\nimport { MODE_PROVIDER } from '@taiga-ui/core/providers';\nimport { TUI_MODE } from '@taiga-ui/core/tokens';\nimport * as i3 from 'rxjs';\nimport { merge } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core/components/svg';\nimport { TuiSvgModule } from '@taiga-ui/core/components/svg';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\n\n// @bad TODO: Think about extending Interactive\nconst _c0 = [\"tuiLink\", \"\"];\nconst _c1 = [\"*\"];\nfunction TuiLinkComponent_tui_svg_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 3);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"src\", ctx_r0.icon || \"\");\n }\n}\nfunction TuiLinkComponent_tui_svg_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 4);\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"src\", ctx_r0.icon || \"\");\n }\n}\nlet TuiLinkComponent = /*#__PURE__*/(() => {\n class TuiLinkComponent {\n constructor(el, mode$, focusVisible$) {\n this.el = el;\n this.mode$ = mode$;\n this.pseudo = false;\n this.icon = '';\n this.iconAlign = 'right';\n this.iconRotated = false;\n this.mode = null;\n this.focusVisible = false;\n this.focusedChange = merge(tuiTypedFromEvent(this.el.nativeElement, 'focusin').pipe(map(ALWAYS_TRUE_HANDLER)), tuiTypedFromEvent(this.el.nativeElement, 'focusout').pipe(map(ALWAYS_FALSE_HANDLER)));\n focusVisible$.subscribe(visible => {\n this.focusVisible = visible;\n });\n }\n get nativeFocusableElement() {\n return this.el.nativeElement;\n }\n get focused() {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n get hasIcon() {\n return !!this.icon;\n }\n get iconAlignLeft() {\n return this.hasIcon && this.iconAlign === 'left';\n }\n get iconAlignRight() {\n return this.hasIcon && this.iconAlign === 'right';\n }\n }\n TuiLinkComponent.ɵfac = function TuiLinkComponent_Factory(t) {\n return new (t || TuiLinkComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(TUI_MODE), i0.ɵɵdirectiveInject(TuiFocusVisibleService));\n };\n TuiLinkComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiLinkComponent,\n selectors: [[\"a\", \"tuiLink\", \"\"], [\"button\", \"tuiLink\", \"\"]],\n hostVars: 7,\n hostBindings: function TuiLinkComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"$.data-mode.attr\", function TuiLinkComponent___data_mode_attr_HostBindingHandler() {\n return ctx.mode$;\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"data-host-mode\", ctx.mode);\n i0.ɵɵclassProp(\"_pseudo\", ctx.pseudo)(\"_icon-rotated\", ctx.iconRotated)(\"_focus-visible\", ctx.focusVisible);\n }\n },\n inputs: {\n pseudo: \"pseudo\",\n icon: \"icon\",\n iconAlign: \"iconAlign\",\n iconRotated: \"iconRotated\",\n mode: \"mode\"\n },\n exportAs: [\"tuiLink\"],\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiLinkComponent), TuiFocusVisibleService, TuiDestroyService, MODE_PROVIDER])],\n attrs: _c0,\n ngContentSelectors: _c1,\n decls: 4,\n vars: 2,\n 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\"]],\n template: function TuiLinkComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, TuiLinkComponent_tui_svg_0_Template, 1, 1, \"tui-svg\", 0);\n i0.ɵɵelementStart(1, \"span\", 1);\n i0.ɵɵprojection(2);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(3, TuiLinkComponent_tui_svg_3_Template, 1, 1, \"tui-svg\", 2);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.iconAlignLeft);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx.iconAlignRight);\n }\n },\n dependencies: [i1.TuiSvgComponent, i2.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: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)}\"],\n changeDetection: 0\n });\n return TuiLinkComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLinkModule = /*#__PURE__*/(() => {\n class TuiLinkModule {}\n TuiLinkModule.ɵfac = function TuiLinkModule_Factory(t) {\n return new (t || TuiLinkModule)();\n };\n TuiLinkModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiLinkModule\n });\n TuiLinkModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiSvgModule]]\n });\n return TuiLinkModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiLinkComponent, TuiLinkModule };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Injectable, Inject, Component, ChangeDetectionStrategy, Self, HostBinding, inject, Directive, NgModule } from '@angular/core';\nimport * as i4 from '@taiga-ui/cdk';\nimport { tuiCreateToken, tuiProvideOptions, tuiTypedFromEvent, tuiGetActualTarget, tuiIsElement, tuiContainsOrAfter, ALWAYS_TRUE_HANDLER, TUI_IS_MOBILE, TuiDestroyService, AbstractTuiDialogService, AbstractTuiDialogDirective, TuiAutoFocusModule, tuiAsDialog } from '@taiga-ui/cdk';\nimport { tuiSlideInTop, tuiFadeIn } from '@taiga-ui/core/animations';\nimport { TUI_ANIMATIONS_DURATION, TUI_CLOSE_WORD, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';\nimport * as i3 from '@tinkoff/ng-polymorpheus';\nimport { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport * as i5 from 'rxjs';\nimport { EMPTY, Observable, merge, isObservable, of, Subject } from 'rxjs';\nimport { filter, switchMap, take, map, takeUntil } from 'rxjs/operators';\nimport * as i2 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport { WINDOW } from '@ng-web-apis/common';\nimport { tuiGetViewportWidth } from '@taiga-ui/core/utils';\nimport * as i1 from '@taiga-ui/core/components/button';\nimport { TuiButtonModule } from '@taiga-ui/core/components/button';\nfunction TuiDialogComponent_header_0_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_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", text_r1, \" \");\n }\n}\nfunction TuiDialogComponent_header_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"header\", 6);\n i0.ɵɵtemplate(1, TuiDialogComponent_header_0_ng_container_1_Template, 2, 1, \"ng-container\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.header)(\"polymorpheusOutletContext\", ctx_r1.context);\n }\n}\nfunction TuiDialogComponent_ng_container_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelement(1, \"div\", 7);\n i0.ɵɵelementStart(2, \"div\", 8)(3, \"button\", 9);\n i0.ɵɵlistener(\"click\", function TuiDialogComponent_ng_container_4_Template_button_click_3_listener() {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.context.$implicit.complete());\n });\n i0.ɵɵtext(4);\n i0.ɵɵelementEnd()();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const text_r4 = ctx.polymorpheusOutlet;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"innerHTML\", text_r4, i0.ɵɵsanitizeHtml);\n i0.ɵɵadvance(3);\n i0.ɵɵtextInterpolate1(\" \", (ctx_r1.context.data == null ? null : ctx_r1.context.data.button) || \"OK\", \" \");\n }\n}\nfunction TuiDialogComponent_div_6_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 10)(1, \"button\", 11);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵlistener(\"click\", function TuiDialogComponent_div_6_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.close$.next());\n })(\"mousedown.prevent.silent\", function TuiDialogComponent_div_6_Template_button_mousedown_prevent_silent_1_listener() {\n i0.ɵɵrestoreView(_r5);\n return i0.ɵɵresetView(0);\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"appearance\", ctx_r1.fullscreen ? \"secondary\" : \"\")(\"icon\", ctx_r1.icons.close)(\"title\", i0.ɵɵpipeBind1(2, 3, ctx_r1.closeWord$));\n }\n}\nconst TUI_DIALOG_DEFAULT_OPTIONS = {\n size: 'm',\n required: false,\n closeable: true,\n dismissible: true,\n label: '',\n header: ''\n};\n/**\n * A stream to close dialogs\n */\nconst TUI_DIALOGS_CLOSE = tuiCreateToken(EMPTY);\n/**\n * Default parameters for dialog component\n */\nconst TUI_DIALOG_OPTIONS = tuiCreateToken(TUI_DIALOG_DEFAULT_OPTIONS);\nfunction tuiDialogOptionsProvider(options) {\n return tuiProvideOptions(TUI_DIALOG_OPTIONS, options, TUI_DIALOG_DEFAULT_OPTIONS);\n}\nconst SCROLLBAR_PLACEHOLDER = 17;\nlet TuiDialogCloseService = /*#__PURE__*/(() => {\n class TuiDialogCloseService extends Observable {\n constructor(win, doc, el) {\n super(subscriber => merge(this.esc$, this.mousedown$).subscribe(subscriber));\n this.win = win;\n this.doc = doc;\n this.el = el;\n this.esc$ = tuiTypedFromEvent(this.doc, 'keydown').pipe(filter(event => {\n const target = tuiGetActualTarget(event);\n return event.key === 'Escape' && !event.defaultPrevented && (this.element.contains(target) || this.isOutside(target));\n }));\n this.mousedown$ = tuiTypedFromEvent(this.doc, 'mousedown').pipe(filter(event => tuiGetViewportWidth(this.win) - event.clientX > SCROLLBAR_PLACEHOLDER && this.isOutside(tuiGetActualTarget(event))), switchMap(() => tuiTypedFromEvent(this.doc, 'mouseup').pipe(take(1), map(tuiGetActualTarget), filter(target => this.isOutside(target)))));\n }\n get element() {\n return this.el.nativeElement;\n }\n isOutside(target) {\n return tuiIsElement(target) && (!tuiContainsOrAfter(this.element, target) || target === this.element);\n }\n }\n TuiDialogCloseService.ɵfac = function TuiDialogCloseService_Factory(t) {\n return new (t || TuiDialogCloseService)(i0.ɵɵinject(WINDOW), i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(ElementRef));\n };\n TuiDialogCloseService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiDialogCloseService,\n factory: TuiDialogCloseService.ɵfac\n });\n return TuiDialogCloseService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst REQUIRED_ERROR = new Error('Required dialog was dismissed');\nfunction toObservable(valueOrStream) {\n return isObservable(valueOrStream) ? valueOrStream : of(valueOrStream);\n}\nlet TuiDialogComponent = /*#__PURE__*/(() => {\n class TuiDialogComponent {\n constructor(duration, isMobile, context, destroy$, dialogClose$, close$, closeWord$, icons) {\n this.duration = duration;\n this.isMobile = isMobile;\n this.context = context;\n this.closeWord$ = closeWord$;\n this.icons = icons;\n this.animation = {\n value: '',\n params: {\n start: '40px',\n duration: this.duration\n }\n };\n this.fullscreenAnimation = {\n value: '',\n params: {\n start: '100vh',\n duration: this.duration\n }\n };\n this.close$ = new Subject();\n merge(this.close$.pipe(switchMap(() => toObservable(context.closeable))), dialogClose$.pipe(switchMap(() => toObservable(context.dismissible))), close$.pipe(map(ALWAYS_TRUE_HANDLER))).pipe(filter(Boolean), takeUntil(destroy$)).subscribe(() => {\n this.close();\n });\n }\n get size() {\n return this.context.size;\n }\n get header() {\n return this.context.header;\n }\n get slideInTop() {\n return this.fullscreen || this.isMobile ? this.fullscreenAnimation : this.animation;\n }\n get fullscreen() {\n return !this.isMobile && (this.size === 'fullscreen' || this.size === 'page');\n }\n close() {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n }\n TuiDialogComponent.ɵfac = function TuiDialogComponent_Factory(t) {\n return new (t || TuiDialogComponent)(i0.ɵɵdirectiveInject(TUI_ANIMATIONS_DURATION), i0.ɵɵdirectiveInject(TUI_IS_MOBILE), i0.ɵɵdirectiveInject(POLYMORPHEUS_CONTEXT), i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(TuiDialogCloseService), i0.ɵɵdirectiveInject(TUI_DIALOGS_CLOSE), i0.ɵɵdirectiveInject(TUI_CLOSE_WORD), i0.ɵɵdirectiveInject(TUI_COMMON_ICONS));\n };\n TuiDialogComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiDialogComponent,\n selectors: [[\"tui-dialog\"]],\n hostVars: 6,\n hostBindings: function TuiDialogComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵsyntheticHostProperty(\"@tuiSlideInTop\", ctx.slideInTop)(\"@tuiFadeIn\", ctx.slideInTop);\n i0.ɵɵattribute(\"data-appearance\", ctx.context.appearance)(\"data-size\", ctx.size);\n i0.ɵɵclassProp(\"_centered\", ctx.header);\n }\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiDialogCloseService])],\n decls: 7,\n vars: 6,\n 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, \"click\", \"mousedown.prevent.silent\", \"appearance\", \"icon\", \"title\"]],\n template: function TuiDialogComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiDialogComponent_header_0_Template, 2, 2, \"header\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵelement(2, \"h2\", 2);\n i0.ɵɵelementStart(3, \"section\");\n i0.ɵɵtemplate(4, TuiDialogComponent_ng_container_4_Template, 5, 2, \"ng-container\", 3);\n i0.ɵɵelementEnd()();\n i0.ɵɵelement(5, \"div\", 4);\n i0.ɵɵtemplate(6, TuiDialogComponent_div_6_Template, 3, 5, \"div\", 5);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", ctx.header);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"id\", ctx.context.id)(\"textContent\", ctx.context.label);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.context.content)(\"polymorpheusOutletContext\", ctx.context);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.context.closeable);\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.NgIf, i3.PolymorpheusOutletDirective, i4.TuiAutoFocusDirective, i2.AsyncPipe],\n 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}\"],\n data: {\n animation: [tuiSlideInTop, tuiFadeIn]\n }\n });\n return TuiDialogComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst DIALOG = new PolymorpheusComponent(TuiDialogComponent);\nlet TuiDialogService = /*#__PURE__*/(() => {\n class TuiDialogService extends AbstractTuiDialogService {\n constructor() {\n super(...arguments);\n this.component = DIALOG;\n this.defaultOptions = Object.assign(Object.assign({}, inject(TUI_DIALOG_OPTIONS)), {\n data: undefined\n });\n }\n }\n TuiDialogService.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDialogService_BaseFactory;\n return function TuiDialogService_Factory(t) {\n return (ɵTuiDialogService_BaseFactory || (ɵTuiDialogService_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDialogService)))(t || TuiDialogService);\n };\n })();\n TuiDialogService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiDialogService,\n factory: TuiDialogService.ɵfac,\n providedIn: 'root'\n });\n return TuiDialogService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDialogDirective = /*#__PURE__*/(() => {\n class TuiDialogDirective extends AbstractTuiDialogDirective {}\n TuiDialogDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDialogDirective_BaseFactory;\n return function TuiDialogDirective_Factory(t) {\n return (ɵTuiDialogDirective_BaseFactory || (ɵTuiDialogDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDialogDirective)))(t || TuiDialogDirective);\n };\n })();\n TuiDialogDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDialogDirective,\n selectors: [[\"ng-template\", \"tuiDialog\", \"\"]],\n inputs: {\n options: [0, \"tuiDialogOptions\", \"options\"],\n open: [0, \"tuiDialog\", \"open\"]\n },\n outputs: {\n openChange: \"tuiDialogChange\"\n },\n features: [i0.ɵɵProvidersFeature([{\n provide: AbstractTuiDialogService,\n useExisting: TuiDialogService\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDialogDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDialogModule = /*#__PURE__*/(() => {\n class TuiDialogModule {}\n TuiDialogModule.ɵfac = function TuiDialogModule_Factory(t) {\n return new (t || TuiDialogModule)();\n };\n TuiDialogModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiDialogModule\n });\n TuiDialogModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [tuiAsDialog(TuiDialogService)],\n imports: [[PolymorpheusModule, TuiButtonModule, CommonModule, TuiAutoFocusModule]]\n });\n return TuiDialogModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_DIALOGS_CLOSE, TUI_DIALOG_DEFAULT_OPTIONS, TUI_DIALOG_OPTIONS, TuiDialogCloseService, TuiDialogComponent, TuiDialogDirective, TuiDialogModule, TuiDialogService, tuiDialogOptionsProvider };\n","import * as i0 from '@angular/core';\nimport { Pipe, Inject, NgModule } from '@angular/core';\nimport * as i1 from '@taiga-ui/core/services';\nimport { TuiFormatDateService } from '@taiga-ui/core/services';\nlet TuiFormatDatePipe = /*#__PURE__*/(() => {\n class TuiFormatDatePipe {\n constructor(service) {\n this.service = service;\n }\n transform(timestampOrDate) {\n return this.service.format(timestampOrDate.valueOf());\n }\n }\n TuiFormatDatePipe.ɵfac = function TuiFormatDatePipe_Factory(t) {\n return new (t || TuiFormatDatePipe)(i0.ɵɵdirectiveInject(TuiFormatDateService, 16));\n };\n TuiFormatDatePipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiFormatDate\",\n type: TuiFormatDatePipe,\n pure: true\n });\n return TuiFormatDatePipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFormatDatePipeModule = /*#__PURE__*/(() => {\n class TuiFormatDatePipeModule {}\n TuiFormatDatePipeModule.ɵfac = function TuiFormatDatePipeModule_Factory(t) {\n return new (t || TuiFormatDatePipeModule)();\n };\n TuiFormatDatePipeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFormatDatePipeModule\n });\n TuiFormatDatePipeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiFormatDatePipeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiFormatDatePipe, TuiFormatDatePipeModule };\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 { __decorate } from 'tslib';\nimport * as i0 from '@angular/core';\nimport { forwardRef, ElementRef, Component, ChangeDetectionStrategy, Inject, Optional, Self, Input, HostBinding, HostListener, ViewEncapsulation, ContentChildren, Directive, NgModule } from '@angular/core';\nimport { tuiIsNativeFocused, TUI_IS_MOBILE, 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\", \"\"];\nconst _c1 = [\"*\"];\nconst _c2 = a0 => ({\n $implicit: a0\n});\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_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", text_r1, \"\\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_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"src\", ctx_r1.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();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.dropdown);\n }\n}\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_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", text_r1, \" \");\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_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.emptyContent || i0.ɵɵpipeBind1(2, 1, ctx_r1.defaultEmptyContent$));\n }\n}\nfunction shouldFocus({\n currentTarget\n}) {\n return !this.isMobile && !tuiIsNativeFocused(currentTarget);\n}\n// TODO: Consider all use cases for aria roles\nlet TuiOptionComponent = /*#__PURE__*/(() => {\n class TuiOptionComponent {\n constructor(isMobile, content, dataList, el, host, dropdown, icons) {\n this.isMobile = isMobile;\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_IS_MOBILE), 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: _c1,\n decls: 3,\n vars: 4,\n consts: [[\"base\", \"\"], [4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"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\", 1)(1, TuiOptionComponent_ng_template_1_Template, 2, 1, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const base_r3 = i0.ɵɵreference(2);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx.content || base_r3)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c2, base_r3));\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: _c1,\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\"];\nconst _c1 = [\"*\"];\nconst _c2 = (a0, a1) => ({\n $implicit: a0,\n close: a1\n});\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_r4 = ctx.polymorpheusOutlet;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", text_r4, \" \");\n }\n}\nfunction TuiHostedDropdownComponent_div_0_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6, 2);\n i0.ɵɵlistener(\"keydown\", function TuiHostedDropdownComponent_div_0_ng_template_3_Template_div_keydown_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.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 activeZone_r5 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.content)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction2(2, _c2, activeZone_r5, ctx_r1.close));\n }\n}\nfunction TuiHostedDropdownComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 4, 0);\n i0.ɵɵlistener(\"tuiActiveZoneChange\", function TuiHostedDropdownComponent_div_0_Template_div_tuiActiveZoneChange_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onActiveZone($event));\n })(\"tuiObscured\", function TuiHostedDropdownComponent_div_0_Template_div_tuiObscured_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onHostObscured($event));\n });\n i0.ɵɵprojection(2);\n i0.ɵɵtemplate(3, TuiHostedDropdownComponent_div_0_ng_template_3_Template, 4, 5, \"ng-template\", 5, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const isOpen_r6 = ctx.tuiLet;\n const dropdown_r7 = i0.ɵɵreference(4);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"tuiDropdown\", dropdown_r7)(\"tuiDropdownManual\", isOpen_r6 && ctx_r1.canOpen)(\"tuiDropdownSided\", ctx_r1.sided)(\"tuiObscuredEnabled\", isOpen_r6);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"polymorpheus\", ctx_r1.context);\n }\n}\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 /** 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.el.nativeElement.classList.toggle('_hosted_dropdown_focused', 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 hostBindings: function TuiHostedDropdownComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"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 },\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: _c1,\n decls: 2,\n vars: 3,\n consts: [[\"activeZone\", \"tuiActiveZone\"], [\"dropdown\", \"polymorpheus\"], [\"wrapper\", \"\"], [\"tuiAccessorProxy\", \"\", \"tuiDropdownOpenMonitor\", \"\", \"class\", \"t-wrapper\", 3, \"tuiDropdown\", \"tuiDropdownManual\", \"tuiDropdownSided\", \"tuiObscuredEnabled\", \"tuiActiveZoneChange\", \"tuiObscured\", 4, \"tuiLet\"], [\"tuiAccessorProxy\", \"\", \"tuiDropdownOpenMonitor\", \"\", 1, \"t-wrapper\", 3, \"tuiActiveZoneChange\", \"tuiObscured\", \"tuiDropdown\", \"tuiDropdownManual\", \"tuiDropdownSided\", \"tuiObscuredEnabled\"], [3, \"polymorpheus\"], [1, \"t-dropdown\", 3, \"keydown\"], [\"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\", 3);\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.TuiDropdownPositionDirective, 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 * 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_r1 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r1);\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: [[\"driver\", \"tuiHintHover\"], [\"appearance\", \"icon\", \"automation-id\", \"tui-tooltip__icon\", \"tuiWrapper\", \"\", 1, \"t-tooltip-icon\", 3, \"hover\", \"tuiHint\", \"tuiHintAppearance\", \"tuiHintContext\", \"tuiHintDescribe\", \"tuiHintDirection\", \"tuiHintHideDelay\", \"tuiHintShowDelay\"], [3, \"src\", 4, \"polymorpheusOutlet\"], [3, \"src\"]],\n template: function TuiTooltipComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 1, 0);\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 driver_r2 = i0.ɵɵreference(1);\n i0.ɵɵproperty(\"hover\", i0.ɵɵpipeBind1(2, 9, driver_r2) || 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\"];\nconst _c2 = [[[\"input\"]], [[\"select\"]], [[\"tuiContent\"]], \"*\"];\nconst _c3 = [\"input\", \"select\", \"tuiContent\", \"*\"];\nconst _c4 = a0 => ({\n $implicit: a0\n});\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_r2 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r2);\n }\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_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r2.iconLeftContent)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c4, ctx_r2.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_r2 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-placeholder_raised\", ctx_r2.placeholderRaised);\n i0.ɵɵproperty(\"for\", ctx_r2.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_r4 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r4);\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_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r2.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_r6 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r6);\n }\n}\nfunction TuiPrimitiveTextfieldComponent_span_21_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = 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(_r5);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.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_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r2.iconCleaner || ctx_r2.controller.options.iconCleaner)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c4, ctx_r2.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_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", ctx_r2.hintOptions == null ? null : ctx_r2.hintOptions.content)(\"describeId\", ctx_r2.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_r7 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r7);\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_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r2.iconContent)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c4, ctx_r2.size));\n }\n}\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: [[\"pre\", \"\"], [1, \"t-prefix\", 3, \"textContent\"], [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\", 1, 0)(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();\n i0.ɵɵproperty(\"textContent\", ctx.filler);\n i0.ɵɵadvance();\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: [0, \"filler\", \"textfieldFiller\"],\n iconCleaner: \"iconCleaner\",\n readOnly: \"readOnly\",\n invalid: \"invalid\",\n disabled: \"disabled\",\n textfieldPrefix: [0, \"prefix\", \"textfieldPrefix\"],\n textfieldPostfix: [0, \"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: _c3,\n decls: 24,\n vars: 37,\n consts: [[\"focusableElement\", \"\"], [\"decor\", \"\"], [4, \"ngIf\"], [\"automation-id\", \"tui-primitive-textfield__wrapper\", \"tuiWrapper\", \"\", 3, \"click.prevent.silent\", \"mousedown\", \"tuiAutofilledChange\", \"active\", \"appearance\", \"disabled\", \"focus\", \"hover\", \"invalid\", \"readOnly\"], [\"automation-id\", \"tui-primitive-textfield__native-input\", \"tuiMaskAccessor\", \"\", 1, \"t-input\", 3, \"ngModelChange\", \"disabled\", \"id\", \"ngModel\", \"readOnly\", \"tuiFocusable\"], [\"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\"], [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 const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef(_c2);\n i0.ɵɵtemplate(0, TuiPrimitiveTextfieldComponent_ng_container_0_Template, 1, 0, \"ng-container\", 2);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵtemplate(2, TuiPrimitiveTextfieldComponent_ng_container_2_Template, 1, 0, \"ng-container\", 2);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementStart(4, \"div\", 3);\n i0.ɵɵpipe(5, \"async\");\n i0.ɵɵlistener(\"click.prevent.silent\", function TuiPrimitiveTextfieldComponent_Template_div_click_prevent_silent_4_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.detectRetargetFromLabel($event));\n })(\"mousedown\", function TuiPrimitiveTextfieldComponent_Template_div_mousedown_4_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onMouseDown($event));\n })(\"tuiAutofilledChange\", function TuiPrimitiveTextfieldComponent_Template_div_tuiAutofilledChange_4_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onAutofilled($event));\n });\n i0.ɵɵprojection(6);\n i0.ɵɵprojection(7, 1);\n i0.ɵɵelementStart(8, \"input\", 4, 0);\n i0.ɵɵlistener(\"ngModelChange\", function TuiPrimitiveTextfieldComponent_Template_input_ngModelChange_8_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onModelChange($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(10, TuiPrimitiveTextfieldComponent_div_10_Template, 2, 0, \"div\", 5);\n i0.ɵɵelementStart(11, \"div\", 6);\n i0.ɵɵtemplate(12, TuiPrimitiveTextfieldComponent_div_12_Template, 2, 4, \"div\", 7);\n i0.ɵɵelementStart(13, \"div\", 8);\n i0.ɵɵtemplate(14, TuiPrimitiveTextfieldComponent_label_14_Template, 2, 3, \"label\", 9);\n i0.ɵɵelementStart(15, \"div\", 10);\n i0.ɵɵelement(16, \"tui-value-decoration\", 11, 1);\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 focusableElement_r8 = i0.ɵɵreference(9);\n const decor_r9 = 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, decor_r9.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$(focusableElement_r8)), \"px\");\n i0.ɵɵclassProp(\"t-has-value\", ctx.value);\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"ngIf\", ctx.hasCustomContent);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.hasCleaner);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showHint);\n i0.ɵɵadvance();\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}@supports (-webkit-touch-callout: none){.t-input[_ngcontent-%COMP%]:active{font-size:1rem}}.t-input[inputMode=none][_ngcontent-%COMP%]{caret-color:transparent}.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=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=l][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]{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%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) .t-input[_ngcontent-%COMP%]:-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 const mode = this.el.nativeElement.inputMode || this.host.inputMode;\n return mode === 'text' ? null : mode;\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}@supports (-webkit-touch-callout: none){[_nghost-%COMP%]:active{font-size:1rem}}[inputMode=none][_nghost-%COMP%]{caret-color:transparent}[_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=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=l][_nghost-%COMP%]:not(._label-outside) -shadowcsshost{padding-top:1.25rem}[data-size=l][_nghost-%COMP%]:not(._label-outside) [_ngcontent-%COMP%]:-webkit-autofill + .t-content[_ngcontent-%COMP%] .t-placeholder[_ngcontent-%COMP%]{font-size:.8156rem;transform:translateY(-.625rem)}[data-size=m][_nghost-%COMP%]:not(._label-outside) [_ngcontent-%COMP%]:-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","import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, Inject, Input, Output, Directive, Optional, SkipSelf, TemplateRef, ChangeDetectorRef, forwardRef, Self, inject, Injectable, NgModule } from '@angular/core';\nimport { tuiIsString, tuiIsObserved, tuiCreateToken, tuiProvideOptions, tuiIfMap, TuiDestroyService, AbstractTuiDialogService, TUI_ALERTS } from '@taiga-ui/cdk';\nimport * as i1 from '@taiga-ui/core';\nimport { TUI_CLOSE_WORD, TUI_COMMON_ICONS, TuiModeDirective, TUI_BUTTON_OPTIONS, TUI_ANIMATION_OPTIONS, tuiFadeIn, tuiSlideInRight, tuiHeightCollapse, TuiButtonModule, TuiLinkModule, TuiSvgModule, TuiFormatDatePipeModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from 'rxjs';\nimport { Subject } from 'rxjs';\nimport * as i5 from '@tinkoff/ng-polymorpheus';\nimport { PolymorpheusTemplate, POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport { takeUntil } from 'rxjs/operators';\nconst _c0 = [[[\"img\"]], [[\"tui-svg\"]], \"*\", [[\"\", \"tuiButton\", \"\"]], [[\"\", \"tuiLink\", \"\"]]];\nconst _c1 = [\"img\", \"tui-svg\", \"*\", \"[tuiButton]\", \"[tuiLink]\"];\nfunction TuiPushComponent_button_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 10);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵlistener(\"click\", function TuiPushComponent_button_2_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.close.emit());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵstyleProp(\"border-radius\", 50, \"%\");\n i0.ɵɵproperty(\"icon\", ctx_r1.icons.close)(\"title\", i0.ɵɵpipeBind1(1, 4, ctx_r1.closeWord$));\n }\n}\nfunction TuiPushComponent_span_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"span\", 11);\n i0.ɵɵpipe(1, \"tuiFormatDate\");\n i0.ɵɵpipe(2, \"async\");\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"textContent\", ctx_r1.isString(ctx_r1.timestamp) ? ctx_r1.timestamp : i0.ɵɵpipeBind1(2, 3, i0.ɵɵpipeBind1(1, 1, ctx_r1.timestamp)));\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_img_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"img\", 8);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"src\", ctx_r1.context.image, i0.ɵɵsanitizeUrl);\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_tui_svg_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 9);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵstyleProp(\"color\", ctx_r1.context.iconColor);\n i0.ɵɵproperty(\"src\", ctx_r1.context.icon);\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 10);\n }\n if (rf & 2) {\n const text_r3 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"innerHTML\", text_r3, i0.ɵɵsanitizeHtml);\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 11);\n i0.ɵɵlistener(\"click\", function TuiPushAlertComponent_tui_push_0_button_4_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.context.$implicit.next(ctx_r1.context.buttons[0]));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.context.buttons[0], \" \");\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_button_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 12);\n i0.ɵɵlistener(\"click\", function TuiPushAlertComponent_tui_push_0_button_5_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.context.$implicit.next(ctx_r1.context.buttons[ctx_r1.context.buttons.length - 1]));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.context.buttons[ctx_r1.context.buttons.length - 1], \" \");\n }\n}\nfunction TuiPushAlertComponent_tui_push_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-push\", 2);\n i0.ɵɵlistener(\"close\", function TuiPushAlertComponent_tui_push_0_Template_tui_push_close_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.context.$implicit.complete());\n });\n i0.ɵɵtemplate(1, TuiPushAlertComponent_tui_push_0_img_1_Template, 1, 1, \"img\", 3)(2, TuiPushAlertComponent_tui_push_0_tui_svg_2_Template, 1, 3, \"tui-svg\", 4)(3, TuiPushAlertComponent_tui_push_0_div_3_Template, 1, 1, \"div\", 5)(4, TuiPushAlertComponent_tui_push_0_button_4_Template, 2, 1, \"button\", 6)(5, TuiPushAlertComponent_tui_push_0_button_5_Template, 2, 1, \"button\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"heading\", ctx_r1.context.heading)(\"timestamp\", ctx_r1.context.timestamp)(\"type\", ctx_r1.context.type);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.context.image);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.context.icon);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.context.content)(\"polymorpheusOutletContext\", ctx_r1.context);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.context.buttons.length > 1);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.context.buttons.length);\n }\n}\nfunction TuiPushAlertComponent_ng_template_1_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction TuiPushAlertComponent_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiPushAlertComponent_ng_template_1_ng_container_0_Template, 1, 0, \"ng-container\", 13);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.context.content);\n }\n}\nlet TuiPushComponent = /*#__PURE__*/(() => {\n class TuiPushComponent {\n constructor(closeWord$, icons) {\n this.closeWord$ = closeWord$;\n this.icons = icons;\n this.heading = '';\n this.type = '';\n this.lines = 2;\n this.timestamp = '';\n this.close = new EventEmitter();\n this.isString = tuiIsString;\n }\n get closeable() {\n return tuiIsObserved(this.close);\n }\n }\n TuiPushComponent.ɵfac = function TuiPushComponent_Factory(t) {\n return new (t || TuiPushComponent)(i0.ɵɵdirectiveInject(TUI_CLOSE_WORD), i0.ɵɵdirectiveInject(TUI_COMMON_ICONS));\n };\n TuiPushComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPushComponent,\n selectors: [[\"tui-push\"]],\n hostVars: 2,\n hostBindings: function TuiPushComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵstyleProp(\"--t-lines\", ctx.lines);\n }\n },\n inputs: {\n heading: \"heading\",\n type: \"type\",\n lines: \"lines\",\n timestamp: \"timestamp\"\n },\n outputs: {\n close: \"close\"\n },\n ngContentSelectors: _c1,\n decls: 17,\n vars: 4,\n consts: [[1, \"t-image\"], [\"appearance\", \"\", \"size\", \"xs\", \"tuiIconButton\", \"\", \"type\", \"button\", \"class\", \"t-close\", 3, \"icon\", \"border-radius\", \"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\", \"\", \"size\", \"xs\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-close\", 3, \"click\", \"icon\", \"title\"], [1, \"t-time\", 3, \"textContent\"]],\n template: function TuiPushComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c0);\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, TuiPushComponent_button_2_Template, 2, 6, \"button\", 1);\n i0.ɵɵelementStart(3, \"div\", 2)(4, \"span\", 3);\n i0.ɵɵprojection(5, 1);\n i0.ɵɵelementEnd();\n i0.ɵɵtext(6);\n i0.ɵɵtemplate(7, TuiPushComponent_span_7_Template, 3, 5, \"span\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(8, \"h3\", 5);\n i0.ɵɵtext(9);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(10, \"div\", 6);\n i0.ɵɵprojection(11, 2);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(12, \"div\", 7)(13, \"span\", 8);\n i0.ɵɵprojection(14, 3);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(15, \"span\", 9);\n i0.ɵɵprojection(16, 4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.closeable);\n i0.ɵɵadvance(4);\n i0.ɵɵtextInterpolate1(\" \", ctx.type, \" \");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.timestamp);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", ctx.heading, \"\\n\");\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.NgIf, i2.AsyncPipe, i1.TuiFormatDatePipe],\n 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:var(--t-lines);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}\"],\n changeDetection: 0\n });\n return TuiPushComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPushDirective = /*#__PURE__*/(() => {\n class TuiPushDirective extends TuiModeDirective {\n constructor(modeDirective) {\n var _a;\n super();\n this.modeDirective = modeDirective;\n this.size = 's';\n this.shape = null;\n this.change$ = ((_a = this.modeDirective) === null || _a === void 0 ? void 0 : _a.change$) || new Subject();\n }\n get appearance() {\n var _a;\n return ((_a = this.modeDirective) === null || _a === void 0 ? void 0 : _a.mode) === 'onDark' ? 'accent' : 'secondary';\n }\n }\n TuiPushDirective.ɵfac = function TuiPushDirective_Factory(t) {\n return new (t || TuiPushDirective)(i0.ɵɵdirectiveInject(TuiModeDirective, 12));\n };\n TuiPushDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiPushDirective,\n selectors: [[\"tui-push\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: TuiModeDirective,\n useExisting: TuiPushDirective\n }, {\n provide: TUI_BUTTON_OPTIONS,\n useExisting: TuiPushDirective\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiPushDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_PUSH_DEFAULT_OPTIONS = {\n heading: '',\n type: '',\n timestamp: '',\n image: '',\n icon: '',\n iconColor: '',\n buttons: []\n};\n/**\n * Default parameters for Push component\n */\nconst TUI_PUSH_OPTIONS = tuiCreateToken(TUI_PUSH_DEFAULT_OPTIONS);\nfunction tuiPushOptionsProvider(options) {\n return tuiProvideOptions(TUI_PUSH_OPTIONS, options, TUI_PUSH_DEFAULT_OPTIONS);\n}\nlet TuiPushAlertDirective = /*#__PURE__*/(() => {\n class TuiPushAlertDirective extends PolymorpheusTemplate {\n constructor(template, cdr, destroy$, push) {\n super(template, cdr);\n this.show$ = new Subject();\n this.show$.pipe(tuiIfMap(() => push.open(this)), takeUntil(destroy$)).subscribe();\n }\n set tuiPush(show) {\n this.show$.next(show);\n }\n }\n TuiPushAlertDirective.ɵfac = function TuiPushAlertDirective_Factory(t) {\n return new (t || TuiPushAlertDirective)(i0.ɵɵdirectiveInject(TemplateRef), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(TuiDestroyService, 2), i0.ɵɵdirectiveInject(forwardRef(() => TuiPushService)));\n };\n TuiPushAlertDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiPushAlertDirective,\n selectors: [[\"\", \"tuiPush\", \"\"]],\n inputs: {\n tuiPush: \"tuiPush\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiPushAlertDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPushAlertComponent = /*#__PURE__*/(() => {\n class TuiPushAlertComponent {\n constructor(animation, context) {\n this.animation = animation;\n this.context = context;\n }\n get isDirective() {\n return this.context.content instanceof TuiPushAlertDirective;\n }\n }\n TuiPushAlertComponent.ɵfac = function TuiPushAlertComponent_Factory(t) {\n return new (t || TuiPushAlertComponent)(i0.ɵɵdirectiveInject(TUI_ANIMATION_OPTIONS), i0.ɵɵdirectiveInject(POLYMORPHEUS_CONTEXT));\n };\n TuiPushAlertComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPushAlertComponent,\n selectors: [[\"tui-push-alert\"]],\n hostAttrs: [\"role\", \"alert\"],\n hostVars: 3,\n hostBindings: function TuiPushAlertComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵsyntheticHostProperty(\"@tuiFadeIn\", ctx.animation)(\"@tuiSlideInRight\", ctx.animation)(\"@tuiHeightCollapse\", ctx.animation);\n }\n },\n decls: 3,\n vars: 2,\n consts: [[\"directive\", \"\"], [3, \"heading\", \"timestamp\", \"type\", \"close\", 4, \"ngIf\", \"ngIfElse\"], [3, \"close\", \"heading\", \"timestamp\", \"type\"], [\"alt\", \"\", 3, \"src\", 4, \"ngIf\"], [3, \"src\", \"color\", 4, \"ngIf\"], [3, \"innerHTML\", 4, \"polymorpheusOutlet\", \"polymorpheusOutletContext\"], [\"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\"], [4, \"polymorpheusOutlet\"]],\n template: function TuiPushAlertComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiPushAlertComponent_tui_push_0_Template, 6, 9, \"tui-push\", 1)(1, TuiPushAlertComponent_ng_template_1_Template, 1, 1, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const directive_r6 = i0.ɵɵreference(2);\n i0.ɵɵproperty(\"ngIf\", !ctx.isDirective)(\"ngIfElse\", directive_r6);\n }\n },\n dependencies: [TuiPushComponent, i1.TuiSvgComponent, i1.TuiButtonComponent, i1.TuiLinkComponent, i2.NgIf, TuiPushDirective, i5.PolymorpheusOutletDirective],\n styles: [\"[_nghost-%COMP%]{max-width:calc(100% - 2rem);margin:0 1rem 1rem auto}[_nghost-%COMP%]:first-child{margin-top:auto}\"],\n data: {\n animation: [tuiFadeIn, tuiSlideInRight, tuiHeightCollapse]\n },\n changeDetection: 0\n });\n return TuiPushAlertComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPushService = /*#__PURE__*/(() => {\n class TuiPushService extends AbstractTuiDialogService {\n constructor() {\n super(...arguments);\n this.component = new PolymorpheusComponent(TuiPushAlertComponent);\n this.defaultOptions = inject(TUI_PUSH_OPTIONS);\n }\n }\n TuiPushService.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiPushService_BaseFactory;\n return function TuiPushService_Factory(t) {\n return (ɵTuiPushService_BaseFactory || (ɵTuiPushService_BaseFactory = i0.ɵɵgetInheritedFactory(TuiPushService)))(t || TuiPushService);\n };\n })();\n TuiPushService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiPushService,\n factory: TuiPushService.ɵfac,\n providedIn: 'root'\n });\n return TuiPushService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPushModule = /*#__PURE__*/(() => {\n class TuiPushModule {}\n TuiPushModule.ɵfac = function TuiPushModule_Factory(t) {\n return new (t || TuiPushModule)();\n };\n TuiPushModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPushModule\n });\n TuiPushModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: TUI_ALERTS,\n useExisting: TuiPushService,\n multi: true\n }],\n imports: [[CommonModule, PolymorpheusModule, TuiButtonModule, TuiLinkModule, TuiSvgModule, TuiFormatDatePipeModule]]\n });\n return TuiPushModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_PUSH_DEFAULT_OPTIONS, TUI_PUSH_OPTIONS, TuiPushAlertComponent, TuiPushAlertDirective, TuiPushComponent, TuiPushDirective, TuiPushModule, TuiPushService, tuiPushOptionsProvider };\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\"];\nconst _c1 = a0 => ({\n $implicit: a0\n});\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_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"inheritColor\", true)(\"showLoader\", ctx_r1.value)(\"size\", ctx_r1.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_r3 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r3);\n }\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();\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_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"inheritColor\", true)(\"showLoader\", !ctx_r1.value)(\"size\", ctx_r1.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_r4 = ctx.polymorpheusOutlet;\n i0.ɵɵproperty(\"src\", src_r4);\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_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"polymorpheusOutlet\", ctx_r1.iconOff)(\"polymorpheusOutletContext\", i0.ɵɵpureFunction1(2, _c1, ctx_r1.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: [[\"focusableElement\", \"\"], [\"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, \"tuiCheckedChange\", \"tuiFocusedChange\", \"tuiFocusVisibleChange\", \"disabled\", \"id\", \"tuiFocusable\", \"tuiChecked\"], [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 const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 1)(1, \"div\", 2);\n i0.ɵɵtemplate(2, TuiToggleComponent_tui_loader_2_Template, 1, 3, \"tui-loader\", 3)(3, TuiToggleComponent_span_3_Template, 2, 4, \"span\", 4);\n i0.ɵɵelement(4, \"div\", 5);\n i0.ɵɵtemplate(5, TuiToggleComponent_tui_loader_5_Template, 1, 3, \"tui-loader\", 3)(6, TuiToggleComponent_span_6_Template, 2, 4, \"span\", 4);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(7, \"input\", 6, 0);\n i0.ɵɵtwoWayListener(\"tuiCheckedChange\", function TuiToggleComponent_Template_input_tuiCheckedChange_7_listener($event) {\n i0.ɵɵrestoreView(_r1);\n i0.ɵɵtwoWayBindingSet(ctx.value, $event) || (ctx.value = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵlistener(\"tuiFocusedChange\", function TuiToggleComponent_Template_input_tuiFocusedChange_7_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onFocused($event));\n })(\"tuiFocusVisibleChange\", function TuiToggleComponent_Template_input_tuiFocusVisibleChange_7_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(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();\n i0.ɵɵproperty(\"ngIf\", ctx.showIcons && !ctx.showLoader);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.showLoader);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.showIcons && !ctx.showLoader);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"disabled\", ctx.disabled)(\"id\", ctx.id)(\"tuiFocusable\", ctx.focusable);\n i0.ɵɵtwoWayProperty(\"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}@supports (-webkit-touch-callout: none){.t-checkbox[_ngcontent-%COMP%]:active{font-size:1rem}}._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 * as i0 from '@angular/core';\nimport { Directive } from '@angular/core';\nimport { Subject } from 'rxjs';\nlet AbstractTuiEditor = /*#__PURE__*/(() => {\n class AbstractTuiEditor {\n constructor() {\n this.stateChange$ = new Subject();\n this.valueChange$ = new Subject();\n }\n }\n AbstractTuiEditor.ɵfac = function AbstractTuiEditor_Factory(t) {\n return new (t || AbstractTuiEditor)();\n };\n AbstractTuiEditor.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: AbstractTuiEditor\n });\n return AbstractTuiEditor;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AbstractTuiEditor };\n","import * as i0 from '@angular/core';\nimport { Injectable, Inject, ElementRef, Renderer2, Directive, Self, Input, Output, NgModule } from '@angular/core';\nimport * as i3 from '@taiga-ui/cdk';\nimport { tuiPx, TuiDestroyService } from '@taiga-ui/cdk';\nimport { TIPTAP_EDITOR, INITIALIZATION_TIPTAP_CONTAINER } from '@tinkoff/tui-editor/tokens';\nimport { startWith, map, distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport * as i1$1 from '@tinkoff/tui-editor/abstract';\nimport { AbstractTuiEditor } from '@tinkoff/tui-editor/abstract';\nimport { EDITOR_BLANK_COLOR } from '@tinkoff/tui-editor/constants';\nimport { tuiParseStyle, tuiGetMarkRange } from '@tinkoff/tui-editor/utils';\nimport { EditorState } from 'prosemirror-state';\nimport * as i1 from 'rxjs';\nfunction tuiIsEmptyParagraph(json) {\n return Array.isArray(json) && json.length === 1 && json[0].type === `paragraph` && !json[0].hasOwnProperty(`content`);\n}\nlet TuiTiptapEditorService = /*#__PURE__*/(() => {\n class TuiTiptapEditorService extends AbstractTuiEditor {\n constructor(editorRef) {\n super();\n this.editorRef = editorRef;\n this.editorRef.subscribe(editor => {\n this.editor = editor;\n const update = () => {\n const content = editor.getHTML();\n const json = editor.getJSON().content;\n const value = tuiIsEmptyParagraph(json) ? `` : content;\n this.valueChange$.next(value);\n this.stateChange$.next();\n };\n editor.on(`transaction`, update.bind(this));\n editor.on(`update`, update.bind(this));\n });\n }\n get isFocused() {\n return this.editor.isFocused;\n }\n get html() {\n return this.editor.getHTML();\n }\n get editable() {\n return this.editor.isEditable;\n }\n set editable(editable) {\n this.editor.setEditable(editable, false);\n }\n get state() {\n return this.editor.state;\n }\n getOriginTiptapEditor() {\n return this.editor;\n }\n undoDisabled() {\n return !this.editor.can().undo();\n }\n redoDisabled() {\n return !this.editor.can().redo();\n }\n getFontColor() {\n return this.editor.getAttributes(`textStyle`).fontColor || EDITOR_BLANK_COLOR;\n }\n getFontSize() {\n return parseInt(this.editor.getAttributes(`textStyle`).fontSize, 10);\n }\n setFontSize(size) {\n this.editor.chain().setMark(`textStyle`, {\n fontSize: tuiPx(size)\n }).run();\n }\n getBackgroundColor() {\n var _a;\n return ((_a = this.editor) === null || _a === void 0 ? void 0 : _a.getAttributes(`textStyle`).backgroundColor) || `transparent`;\n }\n getCellColor() {\n return this.editor.getAttributes(`tableCell`).background || this.editor.getAttributes(`tableHeader`).background;\n }\n getGroupColor() {\n var _a, _b, _c, _d;\n if (this.editor.isActive(`group`)) {\n const style = (_b = (_a = this.editor.getAttributes(`group`)) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : ``;\n const styles = tuiParseStyle(style);\n return (_d = (_c = styles[`background-color`]) !== null && _c !== void 0 ? _c : styles[`background`]) !== null && _d !== void 0 ? _d : ``;\n }\n return ``;\n }\n onAlign(align) {\n this.editor.chain().focus().setTextAlign(align).run();\n }\n setImage(src) {\n this.editor.chain().focus().command(({\n commands,\n state\n }) => {\n var _a;\n const setImage = (_a = commands.setEditableImage) !== null && _a !== void 0 ? _a : commands.setImage;\n if (setImage) {\n const anchor = state.selection.anchor;\n setImage({\n src\n });\n commands.setTextSelection(anchor);\n return true;\n }\n return false;\n }).run();\n }\n undo() {\n this.editor.chain().undo().run();\n }\n redo() {\n this.editor.chain().redo().run();\n }\n setHorizontalRule() {\n this.editor.chain().focus().setHorizontalRule().run();\n }\n removeFormat() {\n this.editor.commands.unsetAllMarks();\n this.editor.commands.clearNodes();\n }\n setFontColor(color) {\n this.editor.chain().focus().setFontColor(color).run();\n }\n setBackgroundColor(color) {\n this.editor.chain().focus().setBackgroundColor(color).run();\n }\n toggleUnderline() {\n this.editor.chain().focus().toggleUnderline().run();\n }\n toggleStrike() {\n this.editor.chain().focus().toggleStrike().run();\n }\n toggleOrderedList() {\n this.editor.chain().focus().toggleOrderedList().run();\n }\n toggleUnorderedList() {\n this.editor.chain().focus().toggleBulletList().run();\n }\n togglePre() {\n this.editor.chain().focus().toggleCodeBlock().run();\n }\n toggleTaskList() {\n this.editor.commands.toggleTaskList();\n }\n sinkListItem() {\n const type = this.editor.isActive(`taskList`) ? `taskItem` : `listItem`;\n this.editor.chain().focus().sinkListItem(type).run();\n }\n liftListItem() {\n const type = this.editor.isActive(`taskList`) ? `taskItem` : `listItem`;\n this.editor.chain().focus().liftListItem(type).run();\n }\n isActive(nameOrAttributes) {\n return this.editor.isActive(nameOrAttributes);\n }\n isActive$(nameOrAttributes) {\n return this.stateChange$.pipe(startWith(null), map(() => this.isActive(nameOrAttributes)), distinctUntilChanged());\n }\n toggleBold() {\n this.editor.chain().focus().toggleBold().run();\n }\n toggleCode() {\n this.editor.chain().focus().toggleCode().run();\n }\n toggleItalic() {\n this.editor.chain().focus().toggleItalic().run();\n }\n toggleBlockquote() {\n this.editor.chain().focus().toggleBlockquote().run();\n }\n toggleSubscript() {\n this.editor.chain().focus().toggleSubscript().run();\n }\n toggleSuperscript() {\n this.editor.chain().focus().toggleSuperscript().run();\n }\n toggleCodeBlock() {\n this.editor.chain().focus().toggleCodeBlock().run();\n }\n insertTable(cols, rows) {\n this.editor.chain().focus().insertTable({\n cols,\n rows\n }).run();\n }\n addColumnAfter() {\n this.editor.chain().focus().addColumnAfter().run();\n }\n addColumnBefore() {\n this.editor.chain().focus().addColumnBefore().run();\n }\n addRowAfter() {\n this.editor.chain().focus().addRowAfter().run();\n }\n addRowBefore() {\n this.editor.chain().focus().addRowBefore().run();\n }\n deleteColumn() {\n this.editor.chain().focus().deleteColumn().run();\n }\n deleteRow() {\n this.editor.chain().focus().deleteRow().run();\n }\n mergeCells() {\n this.editor.chain().focus().mergeCells().run();\n }\n splitCell() {\n this.editor.chain().focus().splitCell().run();\n }\n canMergeCells() {\n return this.editor.can().mergeCells();\n }\n canSplitCells() {\n return this.editor.can().splitCell();\n }\n setHeading(level) {\n this.editor.chain().focus().setHeading({\n level\n }).run();\n }\n setParagraph(options) {\n this.editor.chain().focus().setParagraph().run();\n if (options) {\n this.editor.chain().setMark(`textStyle`, options).run();\n }\n }\n setHardBreak() {\n this.editor.chain().setHardBreak().run();\n }\n setTextSelection(value) {\n this.editor.commands.setTextSelection(value);\n }\n toggleLink(href) {\n this.editor.chain().focus().toggleLink({\n href\n }).run();\n }\n setLink(href) {\n this.editor.chain().focus().setLink({\n href\n }).run();\n }\n unsetLink() {\n this.editor.chain().focus().unsetLink().run();\n }\n focus() {\n this.editor.chain().focus().run();\n }\n setValue(value) {\n if (value === this.html || value === `` && this.html === `

`) {\n return;\n }\n this.editor.commands.setContent(value);\n this.editor.view.updateState(EditorState.create({\n schema: this.editor.state.schema,\n doc: this.editor.state.doc,\n selection: this.editor.state.selection,\n storedMarks: this.editor.state.storedMarks,\n plugins: this.editor.state.plugins\n }));\n }\n destroy() {\n this.editor.destroy();\n }\n setCellColor(color) {\n this.editor.chain().focus().setCellBackground(color).run();\n }\n selectClosest() {\n const pos = this.editor.state.selection.anchor;\n const {\n schema,\n doc\n } = this.editor.state;\n const range = tuiGetMarkRange(doc.resolve(pos), schema.marks.link);\n if (range) {\n this.editor.chain().setTextSelection(range).run();\n }\n }\n enter() {\n this.editor.commands.enter();\n }\n setDetails() {\n this.editor.commands.setDetails();\n }\n removeDetails() {\n this.editor.commands.removeDetails();\n }\n setGroup() {\n this.editor.commands.setGroup();\n }\n removeGroup() {\n this.editor.commands.removeGroup();\n }\n setGroupHilite(color) {\n this.editor.commands.setGroupHilite(color);\n }\n setAnchor(anchor) {\n this.editor.commands.setAnchor(anchor.replace(`#`, ``));\n }\n removeAnchor() {\n this.editor.commands.removeAnchor();\n }\n setFileLink(preview) {\n this.editor.commands.setFileLink(preview);\n }\n setYoutubeVideo(options) {\n this.editor.commands.setYoutubeVideo(options);\n }\n setIframe(options) {\n this.editor.commands.setIframe(options);\n }\n removeEmptyTextStyle() {\n this.editor.commands.removeEmptyTextStyle();\n }\n toggleMark(typeOrName, attributes, options) {\n this.editor.commands.toggleMark(typeOrName, attributes, options);\n }\n getHTML() {\n var _a;\n return (_a = this.getOriginTiptapEditor().getHTML()) !== null && _a !== void 0 ? _a : ``;\n }\n }\n TuiTiptapEditorService.ɵfac = function TuiTiptapEditorService_Factory(t) {\n return new (t || TuiTiptapEditorService)(i0.ɵɵinject(TIPTAP_EDITOR));\n };\n TuiTiptapEditorService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiTiptapEditorService,\n factory: TuiTiptapEditorService.ɵfac\n });\n return TuiTiptapEditorService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTiptapEditorDirective = /*#__PURE__*/(() => {\n class TuiTiptapEditorDirective {\n constructor(el, renderer, editor, editorContainer, editorLoaded$, destroy$) {\n this.el = el;\n this.renderer = renderer;\n this.editor = editor;\n this.editorContainer = editorContainer;\n this.editorLoaded$ = editorLoaded$;\n this.valueChange = this.editor.valueChange$;\n this.stateChange = this.editor.stateChange$;\n this.editorLoaded$.pipe(takeUntil(destroy$)).subscribe(() => {\n this.renderer.appendChild(this.el.nativeElement, this.editorContainer);\n });\n }\n set value(value) {\n this.editor.setValue(value);\n }\n set editable(editable) {\n this.editor.editable = editable;\n }\n }\n TuiTiptapEditorDirective.ɵfac = function TuiTiptapEditorDirective_Factory(t) {\n return new (t || TuiTiptapEditorDirective)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(Renderer2), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(INITIALIZATION_TIPTAP_CONTAINER), i0.ɵɵdirectiveInject(TIPTAP_EDITOR), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiTiptapEditorDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiTiptapEditorDirective,\n selectors: [[\"\", \"tuiTiptapEditor\", \"\"]],\n inputs: {\n value: \"value\",\n editable: \"editable\"\n },\n outputs: {\n valueChange: \"valueChange\",\n stateChange: \"stateChange\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])]\n });\n return TuiTiptapEditorDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTiptapEditorModule = /*#__PURE__*/(() => {\n class TuiTiptapEditorModule {}\n TuiTiptapEditorModule.ɵfac = function TuiTiptapEditorModule_Factory(t) {\n return new (t || TuiTiptapEditorModule)();\n };\n TuiTiptapEditorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTiptapEditorModule\n });\n TuiTiptapEditorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiTiptapEditorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTiptapEditorDirective, TuiTiptapEditorModule, TuiTiptapEditorService };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport * as i5 from 'rxjs';\nimport { combineLatest } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@taiga-ui/cdk';\nimport { TuiLetModule } from '@taiga-ui/cdk';\nimport * as i4 from '@tinkoff/tui-editor/abstract';\nfunction TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6)(1, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.onAlign(\"left\"));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_2_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.onAlign(\"center\"));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_3_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.onAlign(\"right\"));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_4_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.onAlign(\"justify\"));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const alignState_r3 = i0.ɵɵnextContext().tuiLet;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.textAlignLeft)(\"pseudoActive\", !!(alignState_r3 == null ? null : alignState_r3.left))(\"tuiHint\", texts_r4.justifyLeft);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.textAlignCenter)(\"pseudoActive\", !!(alignState_r3 == null ? null : alignState_r3.center))(\"tuiHint\", texts_r4.justifyCenter);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.textAlignRight)(\"pseudoActive\", !!(alignState_r3 == null ? null : alignState_r3.right))(\"tuiHint\", texts_r4.justifyRight);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.textAlignJustify)(\"pseudoActive\", !!(alignState_r3 == null ? null : alignState_r3.justify))(\"tuiHint\", texts_r4.justifyFull);\n }\n}\nfunction TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 4, 0);\n i0.ɵɵelement(2, \"button\", 5);\n i0.ɵɵtemplate(3, TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template, 5, 12, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const align_r5 = i0.ɵɵreference(1);\n const alignDropdown_r6 = i0.ɵɵreference(4);\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", alignDropdown_r6);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", align_r5.open)(\"icon\", ctx_r1.options.icons.textAlignPreview)(\"pseudoActive\", align_r5.open)(\"tuiHint\", texts_r4.justify);\n }\n}\nfunction TuiAlignContentComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_Template, 5, 5, \"tui-hosted-dropdown\", 3);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(2, 1, ctx_r1.alignState$));\n }\n}\nlet TuiAlignContentComponent = /*#__PURE__*/(() => {\n class TuiAlignContentComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.alignState$ = combineLatest([this.editor.isActive$({\n textAlign: 'left'\n }), this.editor.isActive$({\n textAlign: 'right'\n }), this.editor.isActive$({\n textAlign: 'center'\n }), this.editor.isActive$({\n textAlign: 'justify'\n })]).pipe(map(([left, right, center, justify]) => ({\n left,\n right,\n center,\n justify\n })));\n }\n }\n TuiAlignContentComponent.ɵfac = function TuiAlignContentComponent_Factory(t) {\n return new (t || TuiAlignContentComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiAlignContentComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiAlignContentComponent,\n selectors: [[\"tui-align-content\"]],\n decls: 2,\n vars: 3,\n consts: [[\"align\", \"\"], [\"alignDropdown\", \"\"], [4, \"ngIf\"], [3, \"content\", 4, \"tuiLet\"], [3, \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__align-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [1, \"t-dropdown\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"pseudoActive\", \"tuiHint\"]],\n template: function TuiAlignContentComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiAlignContentComponent_ng_container_0_Template, 3, 3, \"ng-container\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.texts$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.NgIf, i3.TuiLetDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiAlignContentComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiAlignContentModule = /*#__PURE__*/(() => {\n class TuiAlignContentModule {}\n TuiAlignContentModule.ɵfac = function TuiAlignContentModule_Factory(t) {\n return new (t || TuiAlignContentModule)();\n };\n TuiAlignContentModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiAlignContentModule\n });\n TuiAlignContentModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiLetModule]]\n });\n return TuiAlignContentModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiAlignContentComponent, TuiAlignContentModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_CODE_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDataListModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/tui-editor/abstract';\nimport * as i4 from 'rxjs';\nfunction TuiCodeComponent_ng_template_5_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 5);\n i0.ɵɵlistener(\"click\", function TuiCodeComponent_ng_template_5_button_1_Template_button_click_0_listener() {\n const index_r2 = i0.ɵɵrestoreView(_r1).index;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.onCode(!!index_r2));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r4 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", item_r4, \" \");\n }\n}\nfunction TuiCodeComponent_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-data-list\");\n i0.ɵɵtemplate(1, TuiCodeComponent_ng_template_5_button_1_Template, 2, 1, \"button\", 4);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(2, 1, ctx_r2.codeOptionsTexts$));\n }\n}\nlet TuiCodeComponent = /*#__PURE__*/(() => {\n class TuiCodeComponent {\n constructor(options, editor, texts$, codeOptionsTexts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.codeOptionsTexts$ = codeOptionsTexts$;\n this.hintText$ = this.texts$.pipe(map(texts => texts.code));\n this.insideCode$ = this.editor.stateChange$.pipe(map(() => this.editor.isActive('code') || this.editor.isActive('codeBlock')), distinctUntilChanged());\n }\n onCode(isCodeBlock) {\n if (isCodeBlock) {\n this.editor.toggleCodeBlock();\n } else {\n this.editor.toggleCode();\n }\n }\n }\n TuiCodeComponent.ɵfac = function TuiCodeComponent_Factory(t) {\n return new (t || TuiCodeComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_CODE_OPTIONS));\n };\n TuiCodeComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiCodeComponent,\n selectors: [[\"tui-code\"]],\n decls: 7,\n vars: 9,\n consts: [[\"codes\", \"\"], [\"codesDropdown\", \"\"], [3, \"content\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"tuiOption\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"tuiOption\", \"\", 3, \"click\"]],\n template: function TuiCodeComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 2, 0);\n i0.ɵɵelement(2, \"button\", 3);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵpipe(4, \"async\");\n i0.ɵɵtemplate(5, TuiCodeComponent_ng_template_5_Template, 3, 3, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const codes_r5 = i0.ɵɵreference(1);\n const codesDropdown_r6 = i0.ɵɵreference(6);\n i0.ɵɵproperty(\"content\", codesDropdown_r6);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", codes_r5.open)(\"icon\", ctx.options.icons.code)(\"pseudoActive\", codes_r5.open || i0.ɵɵpipeBind1(3, 5, ctx.insideCode$))(\"tuiHint\", i0.ɵɵpipeBind1(4, 7, ctx.hintText$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i1.TuiDataListComponent, i1.TuiOptionComponent, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.NgForOf, i2.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiCodeComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiCodeModule = /*#__PURE__*/(() => {\n class TuiCodeModule {}\n TuiCodeModule.ɵfac = function TuiCodeModule_Factory(t) {\n return new (t || TuiCodeModule)();\n };\n TuiCodeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiCodeModule\n });\n TuiCodeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDataListModule]]\n });\n return TuiCodeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiCodeComponent, TuiCodeModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/tui-editor/abstract';\nimport * as i4 from 'rxjs';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nfunction TuiDetailsComponent_button_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 1);\n i0.ɵɵlistener(\"click\", function TuiDetailsComponent_button_0_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.setDetails());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const text_r3 = ctx.ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.detailsAdd)(\"tuiHint\", text_r3.setDetails);\n }\n}\nfunction TuiDetailsRemoveComponent_button_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 1);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵlistener(\"click\", function TuiDetailsRemoveComponent_button_0_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.removeDetails());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const text_r3 = ctx.ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"disabled\", !!i0.ɵɵpipeBind1(1, 4, ctx_r1.disabled$))(\"focusable\", false)(\"icon\", ctx_r1.options.icons.detailsRemove)(\"tuiHint\", text_r3.removeDetails);\n }\n}\nlet TuiDetailsComponent = /*#__PURE__*/(() => {\n class TuiDetailsComponent {\n constructor(editor, texts$, options) {\n this.editor = editor;\n this.texts$ = texts$;\n this.options = options;\n }\n setDetails() {\n this.editor.setDetails();\n }\n }\n TuiDetailsComponent.ɵfac = function TuiDetailsComponent_Factory(t) {\n return new (t || TuiDetailsComponent)(i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS));\n };\n TuiDetailsComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiDetailsComponent,\n selectors: [[\"tui-details\"]],\n decls: 2,\n vars: 3,\n consts: [[\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"click\", \"focusable\", \"icon\", \"tuiHint\"]],\n template: function TuiDetailsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiDetailsComponent_button_0_Template, 1, 3, \"button\", 0);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.texts$));\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.NgIf, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiDetailsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDetailsRemoveComponent = /*#__PURE__*/(() => {\n class TuiDetailsRemoveComponent {\n constructor(editor, texts$, options) {\n this.editor = editor;\n this.texts$ = texts$;\n this.options = options;\n this.disabled$ = this.editor.stateChange$.pipe(map(() => !this.editor.isActive('details')), distinctUntilChanged());\n }\n removeDetails() {\n this.editor.removeDetails();\n }\n }\n TuiDetailsRemoveComponent.ɵfac = function TuiDetailsRemoveComponent_Factory(t) {\n return new (t || TuiDetailsRemoveComponent)(i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS));\n };\n TuiDetailsRemoveComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiDetailsRemoveComponent,\n selectors: [[\"tui-details-remove\"]],\n decls: 2,\n vars: 3,\n consts: [[\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"disabled\", \"focusable\", \"icon\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"tuiHint\"]],\n template: function TuiDetailsRemoveComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiDetailsRemoveComponent_button_0_Template, 2, 6, \"button\", 0);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.texts$));\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.NgIf, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiDetailsRemoveComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiDetailsModule = /*#__PURE__*/(() => {\n class TuiDetailsModule {}\n TuiDetailsModule.ɵfac = function TuiDetailsModule_Factory(t) {\n return new (t || TuiDetailsModule)();\n };\n TuiDetailsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiDetailsModule\n });\n TuiDetailsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule, TuiHintModule]]\n });\n return TuiDetailsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiDetailsComponent, TuiDetailsModule, TuiDetailsRemoveComponent };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { tuiPx } from '@taiga-ui/cdk';\nimport { EDITOR_BLANK_COLOR } from '@tinkoff/tui-editor/constants';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_FONT_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDataListModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/tui-editor/abstract';\nimport * as i4 from 'rxjs';\nconst _c0 = () => ({});\nfunction TuiFontSizeComponent_ng_template_4_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 5);\n i0.ɵɵpipe(1, \"lowercase\");\n i0.ɵɵlistener(\"click\", function TuiFontSizeComponent_ng_template_4_button_1_Template_button_click_0_listener() {\n const item_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.setFontOption(item_r2));\n });\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r2 = ctx.$implicit;\n i0.ɵɵstyleProp(\"font-family\", item_r2.family)(\"font-size\", item_r2.px, \"px\")(\"font-weight\", item_r2.weight);\n i0.ɵɵproperty(\"ngClass\", (item_r2 == null ? null : item_r2.ngClass) || i0.ɵɵpureFunction0(12, _c0))(\"ngStyle\", (item_r2 == null ? null : item_r2.ngStyle) || i0.ɵɵpureFunction0(13, _c0));\n i0.ɵɵattribute(\"automation-id\", \"tui_font__\" + i0.ɵɵpipeBind1(1, 10, item_r2.name || \"\"));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate1(\" \", item_r2.name, \" \");\n }\n}\nfunction TuiFontSizeComponent_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-data-list\");\n i0.ɵɵtemplate(1, TuiFontSizeComponent_ng_template_4_button_1_Template, 3, 14, \"button\", 4);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(2, 1, ctx_r2.fontsOptions$));\n }\n}\nlet TuiFontSizeComponent = /*#__PURE__*/(() => {\n class TuiFontSizeComponent {\n constructor(options, editor, texts$, fontOptionsTexts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.fontOptionsTexts$ = fontOptionsTexts$;\n this.fontsOptions$ = this.fontOptionsTexts$.pipe(map(texts => this.options.fontOptions(texts)));\n this.fontText$ = this.texts$.pipe(map(texts => texts.font));\n }\n /**\n * @deprecated:\n * use {@link setFontOption}\n */\n onClick({\n headingLevel,\n px\n }) {\n this.setFontOption({\n headingLevel,\n px\n });\n }\n setFontOption({\n headingLevel,\n px\n }) {\n const color = this.editor.getFontColor();\n this.clearPreviousTextStyles();\n if (headingLevel) {\n this.editor.setHeading(headingLevel);\n } else {\n this.editor.setParagraph({\n fontSize: tuiPx(px || 0)\n });\n }\n if (color !== EDITOR_BLANK_COLOR) {\n this.editor.setFontColor(color);\n }\n }\n clearPreviousTextStyles() {\n this.editor.removeEmptyTextStyle();\n this.editor.toggleMark('textStyle');\n }\n }\n TuiFontSizeComponent.ɵfac = function TuiFontSizeComponent_Factory(t) {\n return new (t || TuiFontSizeComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_FONT_OPTIONS));\n };\n TuiFontSizeComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiFontSizeComponent,\n selectors: [[\"tui-font-size\"]],\n decls: 6,\n vars: 7,\n consts: [[\"fonts\", \"\"], [\"fontsDropdown\", \"\"], [3, \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__font-size-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"tuiOption\", \"\", 3, \"ngClass\", \"ngStyle\", \"fontFamily\", \"fontSize\", \"fontWeight\", \"click\", 4, \"ngFor\", \"ngForOf\"], [\"tuiOption\", \"\", 3, \"click\", \"ngClass\", \"ngStyle\"]],\n template: function TuiFontSizeComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 2, 0);\n i0.ɵɵelement(2, \"button\", 3);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵtemplate(4, TuiFontSizeComponent_ng_template_4_Template, 3, 3, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const fonts_r4 = i0.ɵɵreference(1);\n const fontsDropdown_r5 = i0.ɵɵreference(5);\n i0.ɵɵproperty(\"content\", fontsDropdown_r5);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", fonts_r4.open)(\"icon\", ctx.options.icons.fontSize)(\"pseudoActive\", fonts_r4.open)(\"tuiHint\", i0.ɵɵpipeBind1(3, 5, ctx.fontText$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i1.TuiDataListComponent, i1.TuiOptionComponent, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.NgForOf, i2.NgClass, i2.NgStyle, i2.AsyncPipe, i2.LowerCasePipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiFontSizeComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFontSizeModule = /*#__PURE__*/(() => {\n class TuiFontSizeModule {}\n TuiFontSizeModule.ɵfac = function TuiFontSizeModule_Factory(t) {\n return new (t || TuiFontSizeModule)();\n };\n TuiFontSizeModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFontSizeModule\n });\n TuiFontSizeModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDataListModule]]\n });\n return TuiFontSizeModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiFontSizeComponent, TuiFontSizeModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';\nimport { defaultEditorTools } from '@tinkoff/tui-editor/constants';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TuiEditorTool } from '@tinkoff/tui-editor/enums';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport * as i4 from 'rxjs';\nimport { combineLatest } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/tui-editor/abstract';\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 8);\n i0.ɵɵlistener(\"click\", function TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_1_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r1.editor.toggleBold());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = i0.ɵɵnextContext(2).ngIf;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.fontStyleBold)(\"pseudoActive\", state_r3.bold)(\"tuiHint\", texts_r4.bold);\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 8);\n i0.ɵɵlistener(\"click\", function TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_2_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r5);\n const ctx_r1 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r1.editor.toggleItalic());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = i0.ɵɵnextContext(2).ngIf;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.fontStyleItalic)(\"pseudoActive\", state_r3.italic)(\"tuiHint\", texts_r4.italic);\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 8);\n i0.ɵɵlistener(\"click\", function TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_3_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r1.editor.toggleUnderline());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = i0.ɵɵnextContext(2).ngIf;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.fontStyleUnderline)(\"pseudoActive\", state_r3.underline)(\"tuiHint\", texts_r4.underline);\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 8);\n i0.ɵɵlistener(\"click\", function TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_4_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r7);\n const ctx_r1 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r1.editor.toggleStrike());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = i0.ɵɵnextContext(2).ngIf;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.fontStyleStrike)(\"pseudoActive\", state_r3.strike)(\"tuiHint\", texts_r4.strikeThrough);\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵtemplate(1, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_1_Template, 1, 3, \"button\", 7)(2, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_2_Template, 1, 3, \"button\", 7)(3, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_3_Template, 1, 3, \"button\", 7)(4, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_4_Template, 1, 3, \"button\", 7);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isEnabled(ctx_r1.editorTool.Bold));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isEnabled(ctx_r1.editorTool.Italic));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isEnabled(ctx_r1.editorTool.Underline));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isEnabled(ctx_r1.editorTool.Strikethrough));\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 4, 0);\n i0.ɵɵelement(2, \"button\", 5);\n i0.ɵɵtemplate(3, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template, 5, 4, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = ctx.ngIf;\n const format_r8 = i0.ɵɵreference(1);\n const formatDropdown_r9 = i0.ɵɵreference(4);\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", formatDropdown_r9);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", format_r8.open)(\"icon\", ctx_r1.options.icons.fontStylePreview)(\"pseudoActive\", format_r8.open || state_r3.bold || state_r3.italic || state_r3.underline || state_r3.strike)(\"tuiHint\", texts_r4.fontStyle);\n }\n}\nfunction TuiFontStyleComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_Template, 5, 5, \"tui-hosted-dropdown\", 3);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(2, 1, ctx_r1.fontStyleState$));\n }\n}\nlet TuiFontStyleComponent = /*#__PURE__*/(() => {\n class TuiFontStyleComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.toolsSet = new Set(defaultEditorTools);\n this.editorTool = TuiEditorTool;\n this.fontStyleState$ = combineLatest([this.editor.isActive$('bold'), this.editor.isActive$('italic'), this.editor.isActive$('underline'), this.editor.isActive$('strike')]).pipe(map(([bold, italic, underline, strike]) => ({\n bold,\n italic,\n underline,\n strike\n })));\n }\n set enabledTools(value) {\n this.toolsSet = new Set(value);\n }\n isEnabled(tool) {\n return this.toolsSet.has(tool);\n }\n }\n TuiFontStyleComponent.ɵfac = function TuiFontStyleComponent_Factory(t) {\n return new (t || TuiFontStyleComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiFontStyleComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiFontStyleComponent,\n selectors: [[\"tui-font-style\"]],\n inputs: {\n enabledTools: \"enabledTools\"\n },\n decls: 2,\n vars: 3,\n consts: [[\"format\", \"\"], [\"formatDropdown\", \"\"], [4, \"ngIf\"], [3, \"content\", 4, \"ngIf\"], [3, \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__font-style-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [1, \"t-dropdown\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", \"class\", \"t-option t-option_margin\", 3, \"icon\", \"pseudoActive\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"pseudoActive\", \"tuiHint\"]],\n template: function TuiFontStyleComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiFontStyleComponent_ng_container_0_Template, 3, 3, \"ng-container\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.texts$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.NgIf, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiFontStyleComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFontStyleModule = /*#__PURE__*/(() => {\n class TuiFontStyleModule {}\n TuiFontStyleModule.ɵfac = function TuiFontStyleModule_Factory(t) {\n return new (t || TuiFontStyleModule)();\n };\n TuiFontStyleModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFontStyleModule\n });\n TuiFontStyleModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiHintModule]]\n });\n return TuiFontStyleModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiFontStyleComponent, TuiFontStyleModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@tinkoff/tui-editor/abstract';\nimport * as i4 from 'rxjs';\nlet TuiEditorGroupToolComponent = /*#__PURE__*/(() => {\n class TuiEditorGroupToolComponent {\n constructor(editor, texts$, options) {\n this.editor = editor;\n this.texts$ = texts$;\n this.options = options;\n this.insertGroupText$ = this.texts$.pipe(map(texts => texts.insertGroup));\n this.removeGroupText$ = this.texts$.pipe(map(texts => texts.removeGroup));\n this.disabled$ = this.editor.stateChange$.pipe(map(() => !this.editor.isActive('group')), distinctUntilChanged());\n }\n addGroup() {\n this.editor.setGroup();\n }\n removeGroup() {\n this.editor.removeGroup();\n }\n }\n TuiEditorGroupToolComponent.ɵfac = function TuiEditorGroupToolComponent_Factory(t) {\n return new (t || TuiEditorGroupToolComponent)(i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS));\n };\n TuiEditorGroupToolComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiEditorGroupToolComponent,\n selectors: [[\"tui-editor-group-tool\"]],\n decls: 5,\n vars: 13,\n consts: [[\"appearance\", \"icon\", \"automation-id\", \"toolbar__group-add-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"click\", \"focusable\", \"icon\", \"tuiHint\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__group-remove-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"tuiHint\"]],\n template: function TuiEditorGroupToolComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"button\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵlistener(\"click\", function TuiEditorGroupToolComponent_Template_button_click_0_listener() {\n return ctx.addGroup();\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"button\", 1);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵpipe(4, \"async\");\n i0.ɵɵlistener(\"click\", function TuiEditorGroupToolComponent_Template_button_click_2_listener() {\n return ctx.removeGroup();\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx.options.icons.groupAdd)(\"tuiHint\", i0.ɵɵpipeBind1(1, 7, ctx.insertGroupText$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"disabled\", !!i0.ɵɵpipeBind1(3, 9, ctx.disabled$))(\"focusable\", false)(\"icon\", ctx.options.icons.groupRemove)(\"tuiHint\", i0.ɵɵpipeBind1(4, 11, ctx.removeGroupText$));\n }\n },\n dependencies: [i1.TuiButtonComponent, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiEditorGroupToolComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorToolGroup = /*#__PURE__*/(() => {\n class TuiEditorToolGroup {}\n TuiEditorToolGroup.ɵfac = function TuiEditorToolGroup_Factory(t) {\n return new (t || TuiEditorToolGroup)();\n };\n TuiEditorToolGroup.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiEditorToolGroup\n });\n TuiEditorToolGroup.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule, TuiHintModule]]\n });\n return TuiEditorToolGroup;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiEditorGroupToolComponent, TuiEditorToolGroup };\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, tuiProvideOptions, tuiCreateTokenFromFactory, TUI_FIRST_DAY, TUI_LAST_DAY, 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_DEFAULT_MASKS = {\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};\nconst TUI_COUNTRIES_MASKS = tuiCreateToken(TUI_COUNTRIES_DEFAULT_MASKS);\nfunction tuiCountriesMasksProvider(options) {\n return tuiProvideOptions(TUI_COUNTRIES_MASKS, options, TUI_COUNTRIES_DEFAULT_MASKS);\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_DEFAULT_MASKS, 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, tuiCountriesMasksProvider, 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}\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 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","/******************************************************************************\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};","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 * as i0 from '@angular/core';\nimport { ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Self, Inject, ViewChild, Input, NgModule } from '@angular/core';\nimport * as i3 from '@angular/forms';\nimport { NgControl, FormsModule } from '@angular/forms';\nimport * as i4 from '@taiga-ui/cdk';\nimport { AbstractTuiControl, tuiIsNativeFocused, tuiAsFocusableItemAccessor, TuiFocusableModule, TuiFocusedModule } from '@taiga-ui/cdk';\nimport { TUI_VALUE_ACCESSOR_PROVIDER } from '@taiga-ui/kit/providers';\nimport * as i1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i2 from '@taiga-ui/core';\nimport { TuiMaskAccessorModule } from '@taiga-ui/core';\nconst _c0 = [\"native\"];\nconst _c1 = [\"text\"];\nconst _c2 = [\"*\"];\nfunction TuiInputInlineComponent_span_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 5);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n }\n}\nlet TuiInputInlineComponent = /*#__PURE__*/(() => {\n class TuiInputInlineComponent extends AbstractTuiControl {\n constructor(control, cdr) {\n super(control, cdr);\n this.maxLength = null;\n this.indent = -1;\n }\n get nativeFocusableElement() {\n return !this.native ? null : this.native.nativeElement;\n }\n get focused() {\n return tuiIsNativeFocused(this.nativeFocusableElement);\n }\n get hasValue() {\n return this.value !== '';\n }\n onValueChange(value) {\n if (!this.text) {\n return;\n }\n // Sync update so width is calculated immediately\n this.text.nativeElement.textContent = value;\n this.text.nativeElement.style.textIndent = '';\n this.value = value;\n }\n onFocused(focused) {\n this.updateFocused(focused);\n }\n onScroll() {\n var _a;\n const indent = ((_a = this.native) === null || _a === void 0 ? void 0 : _a.nativeElement.scrollLeft) || 0;\n // -1 for Safari (see styles)\n this.indent = -1 - indent;\n }\n getFallbackValue() {\n return '';\n }\n }\n TuiInputInlineComponent.ɵfac = function TuiInputInlineComponent_Factory(t) {\n return new (t || TuiInputInlineComponent)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(ChangeDetectorRef));\n };\n TuiInputInlineComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiInputInlineComponent,\n selectors: [[\"tui-input-inline\"]],\n viewQuery: function TuiInputInlineComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n i0.ɵɵviewQuery(_c1, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.native = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.text = _t.first);\n }\n },\n inputs: {\n maxLength: \"maxLength\"\n },\n features: [i0.ɵɵProvidersFeature([TUI_VALUE_ACCESSOR_PROVIDER, tuiAsFocusableItemAccessor(TuiInputInlineComponent)]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c2,\n decls: 5,\n vars: 10,\n consts: [[\"text\", \"\"], [\"native\", \"\"], [1, \"t-before\", 3, \"textContent\"], [\"automation-id\", \"tui-input-inline__placeholder\", \"class\", \"t-placeholder\", 4, \"ngIf\"], [\"automation-id\", \"tui-input-inline__native\", \"tuiMaskAccessor\", \"\", \"type\", \"text\", 1, \"t-native\", 3, \"ngModelChange\", \"scroll\", \"tuiFocusedChange\", \"disabled\", \"id\", \"ngModel\", \"readOnly\", \"tuiFocusable\"], [\"automation-id\", \"tui-input-inline__placeholder\", 1, \"t-placeholder\"]],\n template: function TuiInputInlineComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef();\n i0.ɵɵelement(0, \"span\", 2, 0);\n i0.ɵɵtemplate(2, TuiInputInlineComponent_span_2_Template, 2, 0, \"span\", 3);\n i0.ɵɵelementStart(3, \"input\", 4, 1);\n i0.ɵɵlistener(\"ngModelChange\", function TuiInputInlineComponent_Template_input_ngModelChange_3_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onValueChange($event));\n })(\"scroll\", function TuiInputInlineComponent_Template_input_scroll_3_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onScroll());\n })(\"tuiFocusedChange\", function TuiInputInlineComponent_Template_input_tuiFocusedChange_3_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onFocused($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"text-indent\", ctx.indent, \"px\");\n i0.ɵɵproperty(\"textContent\", ctx.value);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !ctx.hasValue);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"disabled\", ctx.computedDisabled)(\"id\", ctx.id)(\"ngModel\", ctx.value)(\"readOnly\", ctx.readOnly)(\"tuiFocusable\", ctx.focusable);\n i0.ɵɵattribute(\"maxLength\", ctx.maxLength);\n }\n },\n dependencies: [i1.NgIf, i2.TuiMaskAccessorDirective, i3.DefaultValueAccessor, i3.NgControlStatus, i3.NgModel, i4.TuiFocusableDirective, i4.TuiFocusedDirective],\n styles: [\"[_nghost-%COMP%]{position:relative;display:inline-block;overflow:hidden;white-space:nowrap;box-sizing:border-box}.t-before[_ngcontent-%COMP%]{display:block;padding-right:.02em;margin-left:1px;white-space:pre}.t-placeholder[_ngcontent-%COMP%]{display:inline-block;min-width:1px}.t-native[_ngcontent-%COMP%]{position:absolute;top:0;left:0;background-color:transparent;padding:inherit;font:inherit;-webkit-text-fill-color:transparent;box-sizing:border-box;width:100%;height:100%;border-width:0;text-align:inherit;letter-spacing:inherit;text-indent:inherit;text-transform:inherit;outline:none}\"],\n changeDetection: 0\n });\n return TuiInputInlineComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiInputInlineModule = /*#__PURE__*/(() => {\n class TuiInputInlineModule {}\n TuiInputInlineModule.ɵfac = function TuiInputInlineModule_Factory(t) {\n return new (t || TuiInputInlineModule)();\n };\n TuiInputInlineModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiInputInlineModule\n });\n TuiInputInlineModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, FormsModule, TuiFocusableModule, TuiFocusedModule, TuiMaskAccessorModule]]\n });\n return TuiInputInlineModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiInputInlineComponent, TuiInputInlineModule };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule, Inject, HostListener } from '@angular/core';\nimport { tuiRgbToHex, tuiHexToRgb, TuiDestroyService, tuiRgbToHsv, tuiHsvToRgb, tuiRound, tuiPure, tuiDefaultSort, tuiParseColor, TuiActiveZoneModule } from '@taiga-ui/cdk';\nimport * as i1 from '@taiga-ui/kit';\nimport { TuiValueAccessorModule, TuiSelectModule, TuiInputNumberModule } from '@taiga-ui/kit';\nimport * as i2 from '@taiga-ui/core';\nimport { TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiDropdownModule, TuiDataListModule, TuiHintModule, TuiButtonModule, TuiHostedDropdownModule, TuiSvgModule, TuiGroupModule } from '@taiga-ui/core';\nimport * as i3 from '@angular/forms';\nimport { FormsModule } from '@angular/forms';\nimport * as i1$1 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@maskito/angular';\nimport { MaskitoModule } from '@maskito/angular';\nimport { __decorate } from 'tslib';\nimport * as i3$1 from '@angular/platform-browser';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { TuiPickerService } from '@tinkoff/tui-editor/services';\nimport * as i1$2 from 'rxjs';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_COLOR_SELECTOR_MODE_NAMES } from '@tinkoff/tui-editor/tokens';\nimport { tuiParseGradient, tuiGetGradientData } from '@tinkoff/tui-editor/utils';\nfunction TuiColorEditComponent_tui_data_list_1_button_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"button\", 7);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r2 = ctx.$implicit;\n i0.ɵɵproperty(\"value\", item_r2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", item_r2, \" \");\n }\n}\nfunction TuiColorEditComponent_tui_data_list_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-data-list\", 5);\n i0.ɵɵtemplate(1, TuiColorEditComponent_tui_data_list_1_button_1_Template, 2, 2, \"button\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r2.modes);\n }\n}\nfunction TuiColorEditComponent_tui_primitive_textfield_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-primitive-textfield\", 8);\n i0.ɵɵlistener(\"valueChange\", function TuiColorEditComponent_tui_primitive_textfield_2_Template_tui_primitive_textfield_valueChange_0_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onHexChange($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"maskito\", ctx_r2.hexMask)(\"tuiTextfieldLabelOutside\", true)(\"value\", ctx_r2.hex);\n }\n}\nfunction TuiColorEditComponent_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-input-number\", 9);\n i0.ɵɵlistener(\"ngModelChange\", function TuiColorEditComponent_ng_template_3_Template_tui_input_number_ngModelChange_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onRgbChange($event, ctx_r2.color[1], ctx_r2.color[2], ctx_r2.color[3]));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(1, \"tui-input-number\", 9);\n i0.ɵɵlistener(\"ngModelChange\", function TuiColorEditComponent_ng_template_3_Template_tui_input_number_ngModelChange_1_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onRgbChange(ctx_r2.color[0], $event, ctx_r2.color[2], ctx_r2.color[3]));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"tui-input-number\", 9);\n i0.ɵɵlistener(\"ngModelChange\", function TuiColorEditComponent_ng_template_3_Template_tui_input_number_ngModelChange_2_listener($event) {\n i0.ɵɵrestoreView(_r5);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onRgbChange(ctx_r2.color[0], ctx_r2.color[1], $event, ctx_r2.color[3]));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"max\", 255)(\"min\", 0)(\"ngModel\", ctx_r2.color[0])(\"tuiTextfieldLabelOutside\", true);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"max\", 255)(\"min\", 0)(\"ngModel\", ctx_r2.color[1])(\"tuiTextfieldLabelOutside\", true);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"max\", 255)(\"min\", 0)(\"ngModel\", ctx_r2.color[2])(\"tuiTextfieldLabelOutside\", true);\n }\n}\nfunction TuiLinearMultiPickerComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 1);\n i0.ɵɵlistener(\"dblclick\", function TuiLinearMultiPickerComponent_div_0_Template_div_dblclick_0_listener() {\n const index_r2 = i0.ɵɵrestoreView(_r1).index;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onClick(index_r2));\n })(\"mousedown\", function TuiLinearMultiPickerComponent_div_0_Template_div_mousedown_0_listener() {\n const index_r2 = i0.ɵɵrestoreView(_r1).index;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onMouseDown(index_r2));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r4 = ctx.$implicit;\n i0.ɵɵstyleProp(\"left\", item_r4 * 100, \"%\");\n }\n}\nconst _c0 = \"[_nghost-%COMP%]{position:relative;display:block;height:1rem;box-sizing:border-box}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\";\nfunction TuiPaletteComponent_button_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 1);\n i0.ɵɵlistener(\"click\", function TuiPaletteComponent_button_0_Template_button_click_0_listener() {\n const color_r2 = i0.ɵɵrestoreView(_r1).$implicit;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.selectedColor.emit(color_r2.value));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const color_r2 = ctx.$implicit;\n i0.ɵɵstyleProp(\"background\", color_r2.value);\n i0.ɵɵproperty(\"id\", color_r2.key)(\"tuiHint\", color_r2.key)(\"tuiHintDescribe\", color_r2.key);\n }\n}\nfunction TuiColorSelectorComponent_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 9);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n const dropdown_r3 = i0.ɵɵreference(1);\n i0.ɵɵclassProp(\"t-arrow_rotated\", dropdown_r3.open);\n i0.ɵɵproperty(\"src\", ctx_r1.options.icons.colorSelectorDropdownChevron);\n }\n}\nfunction TuiColorSelectorComponent_ng_template_6_button_1_tui_svg_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-svg\", 14);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"src\", ctx_r1.options.icons.colorSelectorDropdownCheck);\n }\n}\nfunction TuiColorSelectorComponent_ng_template_6_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 12);\n i0.ɵɵlistener(\"click\", function TuiColorSelectorComponent_ng_template_6_button_1_Template_button_click_0_listener() {\n const mode_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n const dropdown_r3 = i0.ɵɵreference(1);\n return i0.ɵɵresetView(ctx_r1.onModeSelect(mode_r5, dropdown_r3));\n })(\"keydown.enter.prevent\", function TuiColorSelectorComponent_ng_template_6_button_1_Template_button_keydown_enter_prevent_0_listener() {\n const mode_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n const dropdown_r3 = i0.ɵɵreference(1);\n return i0.ɵɵresetView(ctx_r1.onModeSelect(mode_r5, dropdown_r3));\n })(\"keydown.space.prevent\", function TuiColorSelectorComponent_ng_template_6_button_1_Template_button_keydown_space_prevent_0_listener() {\n const mode_r5 = i0.ɵɵrestoreView(_r4).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n const dropdown_r3 = i0.ɵɵreference(1);\n return i0.ɵɵresetView(ctx_r1.onModeSelect(mode_r5, dropdown_r3));\n });\n i0.ɵɵtext(1);\n i0.ɵɵtemplate(2, TuiColorSelectorComponent_ng_template_6_button_1_tui_svg_2_Template, 1, 1, \"tui-svg\", 13);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const mode_r5 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵattribute(\"aria-checked\", ctx_r1.isModeActive(mode_r5));\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", mode_r5, \" \");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isModeActive(mode_r5));\n }\n}\nfunction TuiColorSelectorComponent_ng_template_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-data-list\", 10);\n i0.ɵɵtemplate(1, TuiColorSelectorComponent_ng_template_6_button_1_Template, 3, 3, \"button\", 11);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.modes);\n }\n}\nfunction TuiColorSelectorComponent_ng_container_8_button_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 20);\n i0.ɵɵlistener(\"click\", function TuiColorSelectorComponent_ng_container_8_button_5_Template_button_click_0_listener() {\n const button_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.onDirectionChange(button_r8));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const button_r8 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵclassProp(\"t-direction_active\", ctx_r1.isDirectionActive(button_r8));\n i0.ɵɵproperty(\"icon\", ctx_r1.getIcon(button_r8))(\"tuiHint\", button_r8);\n }\n}\nfunction TuiColorSelectorComponent_ng_container_8_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelement(1, \"hr\", 15);\n i0.ɵɵelementStart(2, \"div\", 16)(3, \"tui-linear-multi-picker\", 17);\n i0.ɵɵlistener(\"indexChange\", function TuiColorSelectorComponent_ng_container_8_Template_tui_linear_multi_picker_indexChange_3_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onIndexChange($event));\n })(\"valueChange\", function TuiColorSelectorComponent_ng_container_8_Template_tui_linear_multi_picker_valueChange_3_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onStopsChange($event));\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(4, \"div\", 18);\n i0.ɵɵtemplate(5, TuiColorSelectorComponent_ng_container_8_button_5_Template, 1, 4, \"button\", 19);\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵstyleProp(\"background\", ctx_r1.gradient);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"value\", ctx_r1.stopsKeys);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.buttons);\n }\n}\nfunction TuiColorSelectorComponent_tui_color_edit_10_Template(rf, ctx) {\n if (rf & 1) {\n const _r9 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-color-edit\", 21);\n i0.ɵɵlistener(\"colorChange\", function TuiColorSelectorComponent_tui_color_edit_10_Template_tui_color_edit_colorChange_0_listener($event) {\n i0.ɵɵrestoreView(_r9);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onColorChange($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"color\", ctx_r1.color);\n }\n}\nfunction TuiColorSelectorComponent_tui_palette_11_Template(rf, ctx) {\n if (rf & 1) {\n const _r10 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-palette\", 22);\n i0.ɵɵlistener(\"selectedColor\", function TuiColorSelectorComponent_tui_palette_11_Template_tui_palette_selectedColor_0_listener($event) {\n i0.ɵɵrestoreView(_r10);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onPalettePick($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"colors\", ctx_r1.palette);\n }\n}\nconst HEX_MODE_LENGTH = 6;\nlet TuiColorEditComponent = /*#__PURE__*/(() => {\n class TuiColorEditComponent {\n constructor() {\n this.color = [0, 0, 0, 1];\n this.colorChange = new EventEmitter();\n this.hexMask = {\n mask: new RegExp(`^[A-F\\\\d]{0,${HEX_MODE_LENGTH}}$`, 'gi')\n };\n this.modes = ['HEX', 'RGB'];\n this.mode = this.modes[0];\n }\n get isHex() {\n return this.mode === this.modes[0];\n }\n get hex() {\n return tuiRgbToHex(this.color[0], this.color[1], this.color[2]).replace('#', '');\n }\n get opacity() {\n return Math.round(this.color[3] * 100);\n }\n onHexChange(hex) {\n if (hex.length !== HEX_MODE_LENGTH) {\n return;\n }\n const rgb = tuiHexToRgb(hex);\n this.updateColor([rgb[0], rgb[1], rgb[2], this.color[3]]);\n }\n onRgbChange(...rgba) {\n this.updateColor(rgba);\n }\n updateColor(color) {\n this.color = color;\n this.colorChange.emit(color);\n }\n }\n TuiColorEditComponent.ɵfac = function TuiColorEditComponent_Factory(t) {\n return new (t || TuiColorEditComponent)();\n };\n TuiColorEditComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiColorEditComponent,\n selectors: [[\"tui-color-edit\"]],\n inputs: {\n color: \"color\"\n },\n outputs: {\n colorChange: \"colorChange\"\n },\n decls: 6,\n vars: 8,\n consts: [[\"rgb\", \"\"], [\"tuiDropdownAlign\", \"left\", \"tuiDropdownLimitWidth\", \"min\", \"tuiTextfieldSize\", \"m\", 1, \"t-select\", \"tui-group__auto-width-item\", 3, \"ngModelChange\", \"tuiTextfieldLabelOutside\", \"ngModel\"], [\"size\", \"s\", 4, \"tuiDataList\"], [\"tuiTextfieldSize\", \"m\", \"tuiValueAccessor\", \"\", 3, \"maskito\", \"tuiTextfieldLabelOutside\", \"value\", \"valueChange\", 4, \"ngIf\", \"ngIfElse\"], [\"decimal\", \"never\", \"tuiTextfieldPostfix\", \"%\", \"tuiTextfieldSize\", \"m\", 1, \"t-opacity\", \"tui-group__auto-width-item\", 3, \"ngModelChange\", \"max\", \"min\", \"ngModel\", \"tuiTextfieldLabelOutside\"], [\"size\", \"s\"], [\"tuiOption\", \"\", 3, \"value\", 4, \"ngFor\", \"ngForOf\"], [\"tuiOption\", \"\", 3, \"value\"], [\"tuiTextfieldSize\", \"m\", \"tuiValueAccessor\", \"\", 3, \"valueChange\", \"maskito\", \"tuiTextfieldLabelOutside\", \"value\"], [\"decimal\", \"never\", \"tuiTextfieldSize\", \"m\", 1, \"t-rgb\", 3, \"ngModelChange\", \"max\", \"min\", \"ngModel\", \"tuiTextfieldLabelOutside\"]],\n template: function TuiColorEditComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-select\", 1);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function TuiColorEditComponent_Template_tui_select_ngModelChange_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n i0.ɵɵtwoWayBindingSet(ctx.mode, $event) || (ctx.mode = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵtemplate(1, TuiColorEditComponent_tui_data_list_1_Template, 2, 1, \"tui-data-list\", 2);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(2, TuiColorEditComponent_tui_primitive_textfield_2_Template, 1, 3, \"tui-primitive-textfield\", 3)(3, TuiColorEditComponent_ng_template_3_Template, 3, 12, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementStart(5, \"tui-input-number\", 4);\n i0.ɵɵlistener(\"ngModelChange\", function TuiColorEditComponent_Template_tui_input_number_ngModelChange_5_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onRgbChange(ctx.color[0], ctx.color[1], ctx.color[2], $event / 100));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const rgb_r6 = i0.ɵɵreference(4);\n i0.ɵɵproperty(\"tuiTextfieldLabelOutside\", true);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx.mode);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx.isHex)(\"ngIfElse\", rgb_r6);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"max\", 100)(\"min\", 0)(\"ngModel\", ctx.opacity)(\"tuiTextfieldLabelOutside\", true);\n }\n },\n dependencies: [i1.TuiSelectComponent, i2.TuiDataListComponent, i2.TuiOptionComponent, i2.TuiPrimitiveTextfieldComponent, i1.TuiInputNumberComponent, i1.TuiSelectDirective, i2.TuiDropdownOptionsDirective, i2.TuiTextfieldSizeDirective, i2.TuiTextfieldLabelOutsideDirective, i3.NgControlStatus, i3.NgModel, i2.TuiDataListDirective, i1$1.NgForOf, i1$1.NgIf, i2.TuiPrimitiveTextfieldDirective, i1.TuiValueAccessorDirective, i5.MaskitoDirective, i1.TuiInputNumberDirective, i2.TuiTextfieldPostfixDirective],\n styles: [\"[_nghost-%COMP%]{display:flex}.t-select[_ngcontent-%COMP%]{width:5.875rem}.t-opacity[_ngcontent-%COMP%]{width:4.275rem}.t-rgb[_ngcontent-%COMP%], .t-opacity[_ngcontent-%COMP%]{text-align:center}\"],\n changeDetection: 0\n });\n return TuiColorEditComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiColorEditModule = /*#__PURE__*/(() => {\n class TuiColorEditModule {}\n TuiColorEditModule.ɵfac = function TuiColorEditModule_Factory(t) {\n return new (t || TuiColorEditModule)();\n };\n TuiColorEditModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiColorEditModule\n });\n TuiColorEditModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, FormsModule, MaskitoModule, TuiValueAccessorModule, TuiSelectModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiDropdownModule, TuiDataListModule, TuiInputNumberModule]]\n });\n return TuiColorEditModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFlatPickerComponent = /*#__PURE__*/(() => {\n class TuiFlatPickerComponent {\n constructor(point$) {\n this.value = [0, 0];\n this.valueChange = new EventEmitter();\n point$.subscribe(point => {\n this.value = point;\n this.valueChange.emit([point[0], point[1]]);\n });\n }\n get left() {\n return this.value[0] * 100;\n }\n get top() {\n return this.value[1] * 100;\n }\n }\n TuiFlatPickerComponent.ɵfac = function TuiFlatPickerComponent_Factory(t) {\n return new (t || TuiFlatPickerComponent)(i0.ɵɵdirectiveInject(TuiPickerService));\n };\n TuiFlatPickerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiFlatPickerComponent,\n selectors: [[\"tui-flat-picker\"]],\n inputs: {\n value: \"value\"\n },\n outputs: {\n valueChange: \"valueChange\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPickerService])],\n decls: 1,\n vars: 4,\n consts: [[1, \"t-circle\"]],\n template: function TuiFlatPickerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"left\", ctx.left, \"%\")(\"top\", ctx.top, \"%\");\n }\n },\n styles: [\"[_nghost-%COMP%]{position:relative;display:block}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:-.5rem 0 0 -.5rem;box-shadow:inset 0 0 0 1px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\"],\n changeDetection: 0\n });\n return TuiFlatPickerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLinearPickerComponent = /*#__PURE__*/(() => {\n class TuiLinearPickerComponent {\n constructor(point$) {\n this.value = 0;\n this.valueChange = new EventEmitter();\n point$.subscribe(([x]) => {\n this.value = x;\n this.valueChange.emit(x);\n });\n }\n get left() {\n return this.value * 100;\n }\n }\n TuiLinearPickerComponent.ɵfac = function TuiLinearPickerComponent_Factory(t) {\n return new (t || TuiLinearPickerComponent)(i0.ɵɵdirectiveInject(TuiPickerService));\n };\n TuiLinearPickerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiLinearPickerComponent,\n selectors: [[\"tui-linear-picker\"]],\n inputs: {\n value: \"value\"\n },\n outputs: {\n valueChange: \"valueChange\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPickerService])],\n decls: 1,\n vars: 2,\n consts: [[1, \"t-circle\"]],\n template: function TuiLinearPickerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"left\", ctx.left, \"%\");\n }\n },\n styles: [\"[_nghost-%COMP%]{position:relative;display:block;height:1rem;box-sizing:border-box}.t-circle[_ngcontent-%COMP%]{position:absolute;width:1rem;height:1rem;border-radius:100%;margin:0 -.5rem;box-shadow:inset 0 0 0 2px var(--tui-base-01),0 0 0 1px var(--tui-base-03)}\"],\n changeDetection: 0\n });\n return TuiLinearPickerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiColorPickerComponent = /*#__PURE__*/(() => {\n class TuiColorPickerComponent {\n constructor(sanitizer) {\n this.sanitizer = sanitizer;\n this.colorChange = new EventEmitter();\n this.point = [0, 1];\n this.hue = 0;\n this.opacity = 1;\n }\n set color(color) {\n if (this.currentColor.every((item, index) => item === color[index]) && color[3] === this.opacity) {\n return;\n }\n const [h, s, v] = tuiRgbToHsv(color[0], color[1], color[2]);\n this.opacity = color[3];\n this.hue = h / 360;\n this.point = [s, 1 - v / 255];\n }\n get currentColor() {\n return this.getCurrentColor(this.hue, this.point);\n }\n get base() {\n return `rgb(${tuiHsvToRgb(this.hue * 360, 1, 255)})`;\n }\n get gradient() {\n return this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to right, rgba(${this.currentColor.join(',')}, 0), rgb(${this.currentColor.join(',')}))`);\n }\n onPointChange(point) {\n this.point = point;\n this.updateColor();\n }\n onHueChange(hue) {\n this.hue = hue;\n this.updateColor();\n }\n onOpacityChange(opacity) {\n this.opacity = tuiRound(opacity, 2);\n this.updateColor();\n }\n getCurrentColor(hue, point) {\n return tuiHsvToRgb(hue * 360, point[0], (1 - point[1]) * 255);\n }\n updateColor() {\n this.colorChange.emit([...this.currentColor, this.opacity]);\n }\n }\n TuiColorPickerComponent.ɵfac = function TuiColorPickerComponent_Factory(t) {\n return new (t || TuiColorPickerComponent)(i0.ɵɵdirectiveInject(DomSanitizer));\n };\n TuiColorPickerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiColorPickerComponent,\n selectors: [[\"tui-color-picker\"]],\n inputs: {\n color: \"color\"\n },\n outputs: {\n colorChange: \"colorChange\"\n },\n decls: 5,\n vars: 7,\n consts: [[1, \"t-flat\", 3, \"valueChange\", \"value\"], [1, \"t-wrapper\", \"t-wrapper_hue\"], [1, \"t-hue\", 3, \"valueChange\", \"value\"], [1, \"t-wrapper\", \"t-wrapper_opacity\"], [1, \"t-opacity\", 3, \"valueChange\", \"value\"]],\n template: function TuiColorPickerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-flat-picker\", 0);\n i0.ɵɵlistener(\"valueChange\", function TuiColorPickerComponent_Template_tui_flat_picker_valueChange_0_listener($event) {\n return ctx.onPointChange($event);\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(1, \"div\", 1)(2, \"tui-linear-picker\", 2);\n i0.ɵɵlistener(\"valueChange\", function TuiColorPickerComponent_Template_tui_linear_picker_valueChange_2_listener($event) {\n return ctx.onHueChange($event);\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵelementStart(3, \"div\", 3)(4, \"tui-linear-picker\", 4);\n i0.ɵɵlistener(\"valueChange\", function TuiColorPickerComponent_Template_tui_linear_picker_valueChange_4_listener($event) {\n return ctx.onOpacityChange($event);\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵstyleProp(\"background-color\", ctx.base);\n i0.ɵɵproperty(\"value\", ctx.point);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"value\", ctx.hue);\n i0.ɵɵadvance();\n i0.ɵɵstyleProp(\"background\", ctx.gradient);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"value\", ctx.opacity);\n }\n },\n dependencies: [TuiFlatPickerComponent, TuiLinearPickerComponent],\n styles: [\"[_nghost-%COMP%]{position:relative;z-index:0;display:block}.t-flat[_ngcontent-%COMP%]{height:14rem;background:linear-gradient(rgba(0,0,0,0),#000000),linear-gradient(to right,#ffffff,rgba(255,255,255,0));margin-bottom:.25rem;overflow:hidden}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:1rem 1.25rem;border-radius:.5rem}.t-wrapper[_ngcontent-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%;content:\\\"\\\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper_hue[_ngcontent-%COMP%]{background:#ff0000}.t-wrapper_opacity[_ngcontent-%COMP%]:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\\\"\\\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hue[_ngcontent-%COMP%]{background:linear-gradient(to right,#ff0000,#ffff00,#00ff00,#00ffff,#0000ff,#ff00ff,#ff0000);border-radius:inherit;margin:0 .5rem}.t-opacity[_ngcontent-%COMP%]{border-radius:inherit;margin:0 .5rem}\"],\n changeDetection: 0\n });\n __decorate([tuiPure], TuiColorPickerComponent.prototype, \"getCurrentColor\", null);\n return TuiColorPickerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFlatPickerModule = /*#__PURE__*/(() => {\n class TuiFlatPickerModule {}\n TuiFlatPickerModule.ɵfac = function TuiFlatPickerModule_Factory(t) {\n return new (t || TuiFlatPickerModule)();\n };\n TuiFlatPickerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiFlatPickerModule\n });\n TuiFlatPickerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n });\n return TuiFlatPickerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLinearPickerModule = /*#__PURE__*/(() => {\n class TuiLinearPickerModule {}\n TuiLinearPickerModule.ɵfac = function TuiLinearPickerModule_Factory(t) {\n return new (t || TuiLinearPickerModule)();\n };\n TuiLinearPickerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiLinearPickerModule\n });\n TuiLinearPickerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n });\n return TuiLinearPickerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiColorPickerModule = /*#__PURE__*/(() => {\n class TuiColorPickerModule {}\n TuiColorPickerModule.ɵfac = function TuiColorPickerModule_Factory(t) {\n return new (t || TuiColorPickerModule)();\n };\n TuiColorPickerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiColorPickerModule\n });\n TuiColorPickerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiFlatPickerModule, TuiLinearPickerModule]]\n });\n return TuiColorPickerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLinearMultiPickerComponent = /*#__PURE__*/(() => {\n class TuiLinearMultiPickerComponent {\n constructor(point$) {\n this.value = [0, 1];\n this.valueChange = new EventEmitter();\n this.indexChange = new EventEmitter();\n this.index = NaN;\n point$.subscribe(([x]) => {\n this.onPicker(x);\n });\n }\n onMouseUp() {\n this.index = NaN;\n }\n onMouseDown(index) {\n this.updateIndex(index);\n }\n onClick(index) {\n if (this.value.length > 2) {\n this.updateValue(this.value.filter((_, i) => i !== index));\n }\n }\n onPicker(x) {\n if (Number.isNaN(this.index)) {\n this.updateIndex(this.value.length);\n this.value = [...this.value, 0];\n }\n if (this.value.some((item, index) => item === x && index !== this.index)) {\n return;\n }\n this.updateValue(this.value.map((item, index) => index === this.index ? x : item));\n }\n updateIndex(index) {\n this.index = index;\n this.indexChange.emit(index);\n }\n updateValue(value) {\n this.value = value;\n this.valueChange.emit(value);\n }\n }\n TuiLinearMultiPickerComponent.ɵfac = function TuiLinearMultiPickerComponent_Factory(t) {\n return new (t || TuiLinearMultiPickerComponent)(i0.ɵɵdirectiveInject(TuiPickerService));\n };\n TuiLinearMultiPickerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiLinearMultiPickerComponent,\n selectors: [[\"tui-linear-multi-picker\"]],\n hostBindings: function TuiLinearMultiPickerComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mouseup\", function TuiLinearMultiPickerComponent_mouseup_HostBindingHandler() {\n return ctx.onMouseUp();\n }, false, i0.ɵɵresolveDocument);\n }\n },\n inputs: {\n value: \"value\"\n },\n outputs: {\n valueChange: \"valueChange\",\n indexChange: \"indexChange\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService, TuiPickerService])],\n decls: 1,\n vars: 1,\n consts: [[\"class\", \"t-circle\", 3, \"left\", \"dblclick\", \"mousedown\", 4, \"ngFor\", \"ngForOf\"], [1, \"t-circle\", 3, \"dblclick\", \"mousedown\"]],\n template: function TuiLinearMultiPickerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiLinearMultiPickerComponent_div_0_Template, 1, 2, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngForOf\", ctx.value);\n }\n },\n dependencies: [i1$1.NgForOf],\n styles: [_c0],\n changeDetection: 0\n });\n return TuiLinearMultiPickerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPaletteComponent = /*#__PURE__*/(() => {\n class TuiPaletteComponent {\n constructor() {\n this.colors = new Map();\n this.selectedColor = new EventEmitter();\n this.originalOrder = (_a, _b) => 0;\n }\n }\n TuiPaletteComponent.ɵfac = function TuiPaletteComponent_Factory(t) {\n return new (t || TuiPaletteComponent)();\n };\n TuiPaletteComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiPaletteComponent,\n selectors: [[\"tui-palette\"]],\n inputs: {\n colors: \"colors\"\n },\n outputs: {\n selectedColor: \"selectedColor\"\n },\n decls: 2,\n vars: 4,\n consts: [[\"type\", \"button\", \"class\", \"t-button\", 3, \"id\", \"background\", \"tuiHint\", \"tuiHintDescribe\", \"click\", 4, \"ngFor\", \"ngForOf\"], [\"type\", \"button\", 1, \"t-button\", 3, \"click\", \"id\", \"tuiHint\", \"tuiHintDescribe\"]],\n template: function TuiPaletteComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiPaletteComponent_button_0_Template, 1, 5, \"button\", 0);\n i0.ɵɵpipe(1, \"keyvalue\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind2(1, 1, ctx.colors, ctx.originalOrder));\n }\n },\n dependencies: [i1$1.NgForOf, i2.TuiHintDirective, i2.TuiHintDriverDirective, i2.TuiHintHoverDirective, i2.TuiHintPositionDirective, i2.TuiHintDescribeDirective, i1$1.KeyValuePipe],\n styles: [\"[_nghost-%COMP%]{display:flex;flex-wrap:wrap;padding:.875rem}.t-button[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;width:1.5625rem;height:1.5625rem;box-sizing:border-box;margin:.375rem;border-radius:var(--tui-radius-m);border:1px solid rgba(0,0,0,.08)}\"],\n changeDetection: 0\n });\n return TuiPaletteComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst EMPTY_STOP = [0, 0, 0, 0];\nconst DEFAULT_STEPS = [[0, [0, 0, 0, 1]], [1, [255, 255, 255, 1]]];\nconst ICONS = {\n 'to top right': 'tuiIconArrowUpRight',\n 'to right': 'tuiIconArrowRight',\n 'to bottom right': 'tuiIconArrowDownRight',\n 'to bottom': 'tuiIconArrowDown',\n 'to bottom left': 'tuiIconArrowDownLeft',\n 'to left': 'tuiIconArrowLeft',\n 'to top left': 'tuiIconArrowUpLeft',\n 'to top': 'tuiIconArrowUp'\n};\nlet TuiColorSelectorComponent = /*#__PURE__*/(() => {\n class TuiColorSelectorComponent {\n constructor(options, sanitizer, modes) {\n this.options = options;\n this.sanitizer = sanitizer;\n this.modes = modes;\n this.stops = new Map(DEFAULT_STEPS);\n this.currentStop = 0;\n this.direction = 'to bottom';\n this.colors = new Map();\n this.colorChange = new EventEmitter();\n this.color = [0, 0, 0, 1];\n this.currentMode = this.modes[0];\n this.buttons = ['to top right', 'to right', 'to bottom right', 'to bottom', 'to bottom left', 'to left', 'to top left', 'to top'];\n }\n set colorSetter(color) {\n this.parse(color);\n }\n get palette() {\n return this.filterPalette(this.colors, this.isGradient);\n }\n get stopsKeys() {\n return this.getStopsKeys(this.stops);\n }\n get currentColor() {\n return this.isGradient ? this.getStop(this.currentStop) : this.color;\n }\n get gradient() {\n return this.sanitizer.bypassSecurityTrustStyle(this.getGradient('to right'));\n }\n get isGradient() {\n return this.currentMode === this.modes[1];\n }\n getIcon(direction) {\n return ICONS[direction];\n }\n isModeActive(mode) {\n return this.currentMode === mode;\n }\n isDirectionActive(direction) {\n return this.direction === direction;\n }\n onPalettePick(color) {\n this.updateColor(color);\n }\n onDirectionChange(direction) {\n this.direction = direction;\n this.updateColor(this.getGradient(direction));\n }\n onModeSelect(mode, dropdown) {\n this.currentMode = mode;\n dropdown.open = false;\n this.updateColor(mode === this.modes[0] ? `rgba(${this.color.join(', ')})` : this.getGradient(this.direction));\n }\n onIndexChange(index) {\n this.currentStop = this.stopsKeys[index];\n }\n onColorChange(color) {\n if (!this.isGradient) {\n this.updateColor(`rgba(${color.join(', ')})`);\n return;\n }\n this.stops.set(this.currentStop, color);\n this.updateColor(this.getGradient(this.direction));\n }\n onStopsChange(stopsKeys) {\n const removed = this.stopsKeys.find(item => !stopsKeys.includes(item));\n const added = stopsKeys.find(item => !this.stopsKeys.includes(item));\n if (removed === undefined && added !== undefined) {\n this.addStop(added);\n }\n if (removed !== undefined && added === undefined) {\n this.removeStop(removed);\n }\n if (removed !== undefined && added !== undefined) {\n this.replaceStop(removed, added);\n }\n this.updateColor(this.getGradient(this.direction));\n }\n getStopsKeys(stops) {\n return Array.from(stops.keys());\n }\n filterPalette(colors, isGradient) {\n const map = new Map(colors);\n map.forEach((value, key) => {\n if (value.startsWith('linear-gradient') && !isGradient || !value.startsWith('linear-gradient') && isGradient) {\n map.delete(key);\n }\n });\n return map;\n }\n updateColor(color) {\n this.colorChange.emit(color);\n }\n getGradient(direction) {\n return `linear-gradient(${direction}, ${[...this.stopsKeys].sort(tuiDefaultSort).map(key => `rgba(${this.getStop(key).join(', ')}) ${key * 100}%`).join(', ')})`;\n }\n getStop(stop) {\n return this.stops.get(stop) || EMPTY_STOP;\n }\n addStop(stop) {\n const closest = this.stopsKeys.reduce((prev, curr) => Math.abs(curr - stop) < Math.abs(prev - stop) ? curr : prev, this.stopsKeys[0]);\n this.stops.set(stop, this.getStop(closest));\n this.stops = new Map(this.stops);\n this.currentStop = stop;\n }\n removeStop(stop) {\n this.stops.delete(stop);\n this.stops = new Map(this.stops);\n this.currentStop = this.stopsKeys[0];\n }\n replaceStop(removed, added) {\n const value = this.getStop(removed);\n this.currentStop = added;\n this.stops = new Map(this.stopsKeys.map(key => key === removed ? [added, value] : [key, this.getStop(key)]));\n }\n parse(color) {\n if (color.startsWith('linear-gradient')) {\n this.parseGradient(color);\n } else {\n this.parseColor(color);\n }\n }\n parseGradient(color) {\n if (color === this.getGradient(this.direction)) {\n return;\n }\n const gradient = tuiParseGradient(tuiGetGradientData(color));\n this.currentMode = this.modes[1];\n this.direction = gradient.side;\n this.currentStop = 0;\n this.stops = new Map(gradient.stops.length ? gradient.stops.map(({\n color,\n position\n }) => [parseFloat(position) / 100, tuiParseColor(color)]) : DEFAULT_STEPS);\n }\n parseColor(color) {\n this.currentMode = this.modes[0];\n this.currentStop = 0;\n this.color = tuiParseColor(color);\n }\n }\n TuiColorSelectorComponent.ɵfac = function TuiColorSelectorComponent_Factory(t) {\n return new (t || TuiColorSelectorComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(DomSanitizer), i0.ɵɵdirectiveInject(TUI_EDITOR_COLOR_SELECTOR_MODE_NAMES));\n };\n TuiColorSelectorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiColorSelectorComponent,\n selectors: [[\"tui-color-selector\"]],\n inputs: {\n colors: \"colors\",\n colorSetter: [0, \"color\", \"colorSetter\"]\n },\n outputs: {\n colorChange: \"colorChange\"\n },\n decls: 12,\n vars: 7,\n consts: [[\"dropdown\", \"\"], [\"arrow\", \"\"], [\"menu\", \"\"], [1, \"t-select\", 3, \"content\"], [\"appearance\", \"\", \"size\", \"s\", \"tuiButton\", \"\", \"type\", \"button\", 3, \"iconRight\"], [4, \"ngIf\"], [3, \"colorChange\", \"color\"], [\"tuiGroup\", \"\", \"class\", \"t-edit\", 3, \"color\", \"colorChange\", 4, \"ngIf\"], [\"class\", \"t-palette\", 3, \"colors\", \"selectedColor\", 4, \"ngIf\"], [1, \"t-arrow\", 3, \"src\"], [\"role\", \"menu\", \"size\", \"s\", 1, \"t-menu\"], [\"role\", \"menuitemradio\", \"tuiOption\", \"\", 3, \"click\", \"keydown.enter.prevent\", \"keydown.space.prevent\", 4, \"ngFor\", \"ngForOf\"], [\"role\", \"menuitemradio\", \"tuiOption\", \"\", 3, \"click\", \"keydown.enter.prevent\", \"keydown.space.prevent\"], [\"class\", \"t-checkmark\", 3, \"src\", 4, \"ngIf\"], [1, \"t-checkmark\", 3, \"src\"], [1, \"t-hr\"], [1, \"t-wrapper\"], [1, \"t-gradient\", 3, \"indexChange\", \"valueChange\", \"value\"], [1, \"t-buttons\"], [\"appearance\", \"\", \"size\", \"xs\", \"tuiHintDescribe\", \"\", \"tuiIconButton\", \"\", \"type\", \"button\", \"class\", \"t-direction\", 3, \"t-direction_active\", \"icon\", \"tuiHint\", \"click\", 4, \"ngFor\", \"ngForOf\"], [\"appearance\", \"\", \"size\", \"xs\", \"tuiHintDescribe\", \"\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-direction\", 3, \"click\", \"icon\", \"tuiHint\"], [\"tuiGroup\", \"\", 1, \"t-edit\", 3, \"colorChange\", \"color\"], [1, \"t-palette\", 3, \"selectedColor\", \"colors\"]],\n template: function TuiColorSelectorComponent_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 3, 0)(2, \"button\", 4);\n i0.ɵɵtext(3);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(4, TuiColorSelectorComponent_ng_template_4_Template, 1, 3, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor)(6, TuiColorSelectorComponent_ng_template_6_Template, 2, 1, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(8, TuiColorSelectorComponent_ng_container_8_Template, 6, 4, \"ng-container\", 5);\n i0.ɵɵelementStart(9, \"tui-color-picker\", 6);\n i0.ɵɵlistener(\"colorChange\", function TuiColorSelectorComponent_Template_tui_color_picker_colorChange_9_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.onColorChange($event));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(10, TuiColorSelectorComponent_tui_color_edit_10_Template, 1, 1, \"tui-color-edit\", 7)(11, TuiColorSelectorComponent_tui_palette_11_Template, 1, 1, \"tui-palette\", 8);\n }\n if (rf & 2) {\n const arrow_r11 = i0.ɵɵreference(5);\n const menu_r12 = i0.ɵɵreference(7);\n i0.ɵɵproperty(\"content\", menu_r12);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"iconRight\", arrow_r11);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx.currentMode, \" \");\n i0.ɵɵadvance(5);\n i0.ɵɵproperty(\"ngIf\", ctx.isGradient);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"color\", ctx.currentColor);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx.isGradient);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.palette.size);\n }\n },\n dependencies: [i2.TuiHostedDropdownComponent, i2.TuiButtonComponent, i2.TuiSvgComponent, i2.TuiDataListComponent, i2.TuiOptionComponent, TuiLinearMultiPickerComponent, TuiColorPickerComponent, TuiColorEditComponent, TuiPaletteComponent, i1$1.NgForOf, i1$1.NgIf, i2.TuiHintDescribeDirective, i2.TuiHintDirective, i2.TuiHintDriverDirective, i2.TuiHintHoverDirective, i2.TuiHintPositionDirective, i2.TuiGroupDirective],\n styles: [\"[_nghost-%COMP%]{position:relative;z-index:0;display:block;width:22.6rem}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:1.25rem;border-radius:.5rem}.t-wrapper[_ngcontent-%COMP%]:after{position:absolute;top:0;left:0;width:100%;height:100%;content:\\\"\\\";box-shadow:inset 0 0 0 1px #00000014;pointer-events:none;border-radius:inherit}.t-wrapper[_ngcontent-%COMP%]:before{position:absolute;top:0;left:0;width:100%;height:100%;content:\\\"\\\";z-index:-1;background-image:linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03)),linear-gradient(45deg,var(--tui-base-03) 25%,transparent 25%,transparent 75%,var(--tui-base-03) 75%,var(--tui-base-03));background-size:.375rem .375rem;background-position:0 0,.1875rem .1875rem;border-radius:inherit}.t-hr[_ngcontent-%COMP%]{height:1px;margin:0 0 0 -1px;border:none;background:var(--tui-base-03)}.t-gradient[_ngcontent-%COMP%]{margin:0 .5rem;border-radius:inherit}.t-select[_ngcontent-%COMP%]{margin:.75rem .5rem}.t-arrow[_ngcontent-%COMP%]{transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-arrow_rotated[_ngcontent-%COMP%]{transform:rotate(180deg)}.t-menu[_ngcontent-%COMP%]{width:11.25rem}.t-checkmark[_ngcontent-%COMP%]{margin-left:auto;width:1rem;height:1rem}.t-buttons[_ngcontent-%COMP%]{display:flex;padding:0 .75rem 1.25rem}.t-direction[_ngcontent-%COMP%]{color:var(--tui-text-02);margin:0 .375rem}.t-direction[_ngcontent-%COMP%]:hover, .t-direction_active[_ngcontent-%COMP%]{color:var(--tui-text-01);background:var(--tui-secondary-hover)}.t-edit[_ngcontent-%COMP%]{margin:1.25rem}.t-palette[_ngcontent-%COMP%]{box-sizing:border-box;box-shadow:inset 0 1px var(--tui-base-03)}\"],\n changeDetection: 0\n });\n __decorate([tuiPure], TuiColorSelectorComponent.prototype, \"getStopsKeys\", null);\n __decorate([tuiPure], TuiColorSelectorComponent.prototype, \"filterPalette\", null);\n return TuiColorSelectorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiLinearMultiPickerModule = /*#__PURE__*/(() => {\n class TuiLinearMultiPickerModule {}\n TuiLinearMultiPickerModule.ɵfac = function TuiLinearMultiPickerModule_Factory(t) {\n return new (t || TuiLinearMultiPickerModule)();\n };\n TuiLinearMultiPickerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiLinearMultiPickerModule\n });\n TuiLinearMultiPickerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule]]\n });\n return TuiLinearMultiPickerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiPaletteModule = /*#__PURE__*/(() => {\n class TuiPaletteModule {}\n TuiPaletteModule.ɵfac = function TuiPaletteModule_Factory(t) {\n return new (t || TuiPaletteModule)();\n };\n TuiPaletteModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiPaletteModule\n });\n TuiPaletteModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHintModule]]\n });\n return TuiPaletteModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiColorSelectorModule = /*#__PURE__*/(() => {\n class TuiColorSelectorModule {}\n TuiColorSelectorModule.ɵfac = function TuiColorSelectorModule_Factory(t) {\n return new (t || TuiColorSelectorModule)();\n };\n TuiColorSelectorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiColorSelectorModule\n });\n TuiColorSelectorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule, TuiHostedDropdownModule, TuiColorPickerModule, TuiLinearMultiPickerModule, TuiHintModule, TuiSvgModule, TuiDataListModule, TuiActiveZoneModule, TuiColorEditModule, TuiGroupModule, TuiPaletteModule]]\n });\n return TuiColorSelectorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiColorEditComponent, TuiColorEditModule, TuiColorPickerComponent, TuiColorPickerModule, TuiColorSelectorComponent, TuiColorSelectorModule, TuiFlatPickerComponent, TuiFlatPickerModule, TuiLinearMultiPickerComponent, TuiLinearMultiPickerModule, TuiLinearPickerComponent, TuiLinearPickerModule, TuiPaletteComponent, TuiPaletteModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDropdownModule } from '@taiga-ui/core';\nimport * as i2 from '@tinkoff/tui-editor/components/color-selector';\nimport { TuiPaletteModule } from '@tinkoff/tui-editor/components/color-selector';\nimport * as i3 from '@taiga-ui/cdk';\nimport { TuiActiveZoneModule, TuiLetModule } from '@taiga-ui/cdk';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@tinkoff/tui-editor/abstract';\nimport * as i6 from 'rxjs';\nfunction TuiHighlightColorComponent_tui_hosted_dropdown_0_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 6);\n }\n if (rf & 2) {\n const selectedColor_r1 = i0.ɵɵnextContext().tuiLet;\n i0.ɵɵstyleProp(\"background\", selectedColor_r1);\n }\n}\nfunction TuiHighlightColorComponent_tui_hosted_dropdown_0_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-palette\", 7);\n i0.ɵɵlistener(\"selectedColor\", function TuiHighlightColorComponent_tui_hosted_dropdown_0_ng_template_5_Template_tui_palette_selectedColor_0_listener($event) {\n i0.ɵɵrestoreView(_r2);\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.editor.setBackgroundColor($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const activeZone_r4 = ctx.$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"colors\", ctx_r2.colors)(\"tuiActiveZoneParent\", activeZone_r4);\n }\n}\nfunction TuiHighlightColorComponent_tui_hosted_dropdown_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 3, 0);\n i0.ɵɵelement(2, \"button\", 4);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵtemplate(4, TuiHighlightColorComponent_tui_hosted_dropdown_0_div_4_Template, 1, 2, \"div\", 5)(5, TuiHighlightColorComponent_tui_hosted_dropdown_0_ng_template_5_Template, 1, 2, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const selectedColor_r1 = ctx.tuiLet;\n const hilite_r5 = i0.ɵɵreference(1);\n const hiliteDropdown_r6 = i0.ɵɵreference(6);\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", hiliteDropdown_r6)(\"tuiDropdownMaxHeight\", 999);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", hilite_r5.open)(\"icon\", ctx_r2.options.icons.textHilite)(\"pseudoActive\", hilite_r5.open)(\"tuiHint\", i0.ɵɵpipeBind1(3, 7, ctx_r2.backColorText$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !ctx_r2.isBlankColor(selectedColor_r1 || \"\"));\n }\n}\nlet TuiHighlightColorComponent = /*#__PURE__*/(() => {\n class TuiHighlightColorComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.colors = this.options.colors;\n this.backgroundColor$ = this.editor.stateChange$.pipe(map(() => this.editor.getBackgroundColor() || this.options.blankColor), distinctUntilChanged());\n this.backColorText$ = this.texts$.pipe(map(texts => texts.backColor));\n }\n isBlankColor(color) {\n return color === this.options.blankColor;\n }\n }\n TuiHighlightColorComponent.ɵfac = function TuiHighlightColorComponent_Factory(t) {\n return new (t || TuiHighlightColorComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiHighlightColorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiHighlightColorComponent,\n selectors: [[\"tui-highlight-color\"]],\n inputs: {\n colors: \"colors\"\n },\n decls: 2,\n vars: 3,\n consts: [[\"hilite\", \"\"], [\"hiliteDropdown\", \"\"], [3, \"content\", \"tuiDropdownMaxHeight\", 4, \"tuiLet\"], [3, \"content\", \"tuiDropdownMaxHeight\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__hilite-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-tool\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"class\", \"t-plate\", 3, \"background\", 4, \"ngIf\"], [1, \"t-plate\"], [1, \"t-color-picker\", 3, \"selectedColor\", \"colors\", \"tuiActiveZoneParent\"]],\n template: function TuiHighlightColorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiHighlightColorComponent_tui_hosted_dropdown_0_Template, 7, 9, \"tui-hosted-dropdown\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(1, 1, ctx.backgroundColor$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.TuiPaletteComponent, i3.TuiLetDirective, i1.TuiDropdownOptionsDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i4.NgIf, i3.TuiActiveZoneDirective, i4.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiHighlightColorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiHighlightColorModule = /*#__PURE__*/(() => {\n class TuiHighlightColorModule {}\n TuiHighlightColorModule.ɵfac = function TuiHighlightColorModule_Factory(t) {\n return new (t || TuiHighlightColorModule)();\n };\n TuiHighlightColorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiHighlightColorModule\n });\n TuiHighlightColorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiPaletteModule, TuiHintModule, TuiDropdownModule, TuiActiveZoneModule, TuiLetModule]]\n });\n return TuiHighlightColorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiHighlightColorComponent, TuiHighlightColorModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport * as i5 from 'rxjs';\nimport { combineLatest } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i3 from '@taiga-ui/cdk';\nimport { TuiLetModule } from '@taiga-ui/cdk';\nimport * as i4 from '@tinkoff/tui-editor/abstract';\nfunction TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 6)(1, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.toggleUnorderedList());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"button\", 8);\n i0.ɵɵlistener(\"click\", function TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_2_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.toggleOrderedList());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"button\", 9);\n i0.ɵɵlistener(\"click\", function TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_3_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.editor.toggleTaskList());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"button\", 10);\n i0.ɵɵlistener(\"click\", function TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_4_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.sinkListItem());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"button\", 11);\n i0.ɵɵlistener(\"click\", function TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template_button_click_5_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.liftListItem());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const state_r3 = i0.ɵɵnextContext().tuiLet;\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.listUnOrdered)(\"pseudoActive\", !!(state_r3 == null ? null : state_r3.unordered))(\"tuiHint\", texts_r4.unorderedList);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.listOrdered)(\"pseudoActive\", !!(state_r3 == null ? null : state_r3.ordered))(\"tuiHint\", texts_r4.orderedList);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.taskList)(\"pseudoActive\", !!(state_r3 == null ? null : state_r3.tasked));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.indent)(\"tuiHint\", texts_r4.indent);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r1.options.icons.outdent)(\"tuiHint\", texts_r4.outdent);\n }\n}\nfunction TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 4, 0);\n i0.ɵɵelement(2, \"button\", 5);\n i0.ɵɵtemplate(3, TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template, 6, 12, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const state_r3 = ctx.tuiLet;\n const list_r5 = i0.ɵɵreference(1);\n const listDropdown_r6 = i0.ɵɵreference(4);\n const texts_r4 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", listDropdown_r6);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", list_r5.open)(\"icon\", ctx_r1.options.icons.listPreview)(\"pseudoActive\", (list_r5 == null ? null : list_r5.open) || (state_r3 == null ? null : state_r3.unordered) || (state_r3 == null ? null : state_r3.ordered) || false)(\"tuiHint\", texts_r4.list);\n }\n}\nfunction TuiListConfigsComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_Template, 5, 5, \"tui-hosted-dropdown\", 3);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(2, 1, ctx_r1.listState$));\n }\n}\nlet TuiListConfigsComponent = /*#__PURE__*/(() => {\n class TuiListConfigsComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.listState$ = combineLatest([this.editor.isActive$('orderedList'), this.editor.isActive$('bulletList'), this.editor.isActive$('taskList')]).pipe(map(([ordered, unordered, tasked]) => ({\n ordered,\n unordered,\n tasked\n })));\n }\n sinkListItem() {\n this.editor.sinkListItem();\n }\n liftListItem() {\n this.editor.liftListItem();\n }\n }\n TuiListConfigsComponent.ɵfac = function TuiListConfigsComponent_Factory(t) {\n return new (t || TuiListConfigsComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiListConfigsComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiListConfigsComponent,\n selectors: [[\"tui-list-configs\"]],\n decls: 2,\n vars: 3,\n consts: [[\"list\", \"\"], [\"listDropdown\", \"\"], [4, \"ngIf\"], [3, \"content\", 4, \"tuiLet\"], [3, \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__ordering-list-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [1, \"t-dropdown\", \"t-dropdown-list\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__un-ordered-list-button\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__ordered-list-button\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__task-list-button\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"pseudoActive\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar_indent-button\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", \"t-option_margin\", 3, \"click\", \"icon\", \"tuiHint\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar_outdent-button\", \"size\", \"s\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-option\", 3, \"click\", \"icon\", \"tuiHint\"]],\n template: function TuiListConfigsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiListConfigsComponent_ng_container_0_Template, 3, 3, \"ng-container\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.texts$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.NgIf, i3.TuiLetDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i2.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiListConfigsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiListConfigsModule = /*#__PURE__*/(() => {\n class TuiListConfigsModule {}\n TuiListConfigsModule.ɵfac = function TuiListConfigsModule_Factory(t) {\n return new (t || TuiListConfigsModule)();\n };\n TuiListConfigsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiListConfigsModule\n });\n TuiListConfigsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiLetModule]]\n });\n return TuiListConfigsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiListConfigsComponent, TuiListConfigsModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport * as i6 from 'rxjs';\nimport { combineLatest } from 'rxjs';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiButtonModule, TuiHintModule, TuiDropdownModule } from '@taiga-ui/core';\nimport * as i2 from '@tinkoff/tui-editor/components/color-selector';\nimport { TuiPaletteModule } from '@tinkoff/tui-editor/components/color-selector';\nimport * as i3 from '@taiga-ui/cdk';\nimport { TuiActiveZoneModule, TuiLetModule } from '@taiga-ui/cdk';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@tinkoff/tui-editor/abstract';\nfunction TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 7);\n }\n if (rf & 2) {\n const color_r1 = i0.ɵɵnextContext(2).tuiLet;\n i0.ɵɵstyleProp(\"background\", color_r1);\n }\n}\nfunction TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-palette\", 8);\n i0.ɵɵlistener(\"selectedColor\", function TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_5_Template_tui_palette_selectedColor_0_listener($event) {\n i0.ɵɵrestoreView(_r2);\n i0.ɵɵnextContext();\n const colorSelect_r3 = i0.ɵɵreference(1);\n const ctx_r3 = i0.ɵɵnextContext(2);\n ctx_r3.setCellColor($event);\n return i0.ɵɵresetView(colorSelect_r3.close());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const activeZone_r5 = ctx.$implicit;\n const ctx_r3 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"colors\", ctx_r3.colors)(\"tuiActiveZoneParent\", activeZone_r5);\n }\n}\nfunction TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 4, 0);\n i0.ɵɵelement(2, \"button\", 5);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵtemplate(4, TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_div_4_Template, 1, 2, \"div\", 6)(5, TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_5_Template, 1, 2, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const isActive_r6 = ctx.tuiLet;\n const colorSelect_r3 = i0.ɵɵreference(1);\n const cellColorDropdown_r7 = i0.ɵɵreference(6);\n const color_r1 = i0.ɵɵnextContext().tuiLet;\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"canOpen\", !!isActive_r6)(\"content\", cellColorDropdown_r7)(\"tuiDropdownMaxHeight\", 999);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"disabled\", !isActive_r6)(\"focusable\", colorSelect_r3.open)(\"icon\", ctx_r3.options.icons.paint)(\"pseudoActive\", colorSelect_r3.open)(\"tuiHint\", i0.ɵɵpipeBind1(3, 9, ctx_r3.colorText$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !ctx_r3.isBlankColor(color_r1 || \"\"));\n }\n}\nfunction TuiTableCellColorComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_Template, 7, 11, \"tui-hosted-dropdown\", 3);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r3 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(2, 1, ctx_r3.isActive$));\n }\n}\nlet TuiTableCellColorComponent = /*#__PURE__*/(() => {\n class TuiTableCellColorComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.colors = this.options.colors;\n this.colorText$ = this.texts$.pipe(map(texts => this.editor.isActive('group') && texts.hiliteGroup || this.editor.isActive('table') && texts.cellColor || ''));\n this.isActive$ = combineLatest([this.editor.isActive$('table'), this.editor.isActive$('group')]).pipe(map(([table, group]) => table || group));\n this.color$ = this.editor.stateChange$.pipe(map(() => this.editor.getCellColor() || this.editor.getGroupColor() || this.options.blankColor), distinctUntilChanged());\n }\n isBlankColor(color) {\n return color === this.options.blankColor;\n }\n setCellColor(color) {\n if (this.editor.isActive('group')) {\n this.editor.setGroupHilite(color);\n } else if (this.editor.isActive('table')) {\n this.editor.setCellColor(color);\n }\n }\n }\n TuiTableCellColorComponent.ɵfac = function TuiTableCellColorComponent_Factory(t) {\n return new (t || TuiTableCellColorComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiTableCellColorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTableCellColorComponent,\n selectors: [[\"tui-table-cell-color\"]],\n inputs: {\n colors: \"colors\"\n },\n decls: 2,\n vars: 3,\n consts: [[\"colorSelect\", \"\"], [\"cellColorDropdown\", \"\"], [4, \"tuiLet\"], [3, \"canOpen\", \"content\", \"tuiDropdownMaxHeight\", 4, \"tuiLet\"], [3, \"canOpen\", \"content\", \"tuiDropdownMaxHeight\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"disabled\", \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"class\", \"t-plate t-plate_paint\", 3, \"background\", 4, \"ngIf\"], [1, \"t-plate\", \"t-plate_paint\"], [1, \"t-color-picker\", 3, \"selectedColor\", \"colors\", \"tuiActiveZoneParent\"]],\n template: function TuiTableCellColorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiTableCellColorComponent_ng_container_0_Template, 3, 3, \"ng-container\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(1, 1, ctx.color$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.TuiPaletteComponent, i3.TuiLetDirective, i1.TuiDropdownOptionsDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i4.NgIf, i3.TuiActiveZoneDirective, i4.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiTableCellColorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTableCellColorModule = /*#__PURE__*/(() => {\n class TuiTableCellColorModule {}\n TuiTableCellColorModule.ɵfac = function TuiTableCellColorModule_Factory(t) {\n return new (t || TuiTableCellColorModule)();\n };\n TuiTableCellColorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTableCellColorModule\n });\n TuiTableCellColorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiPaletteModule, TuiButtonModule, TuiHintModule, TuiActiveZoneModule, TuiDropdownModule, TuiLetModule]]\n });\n return TuiTableCellColorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTableCellColorComponent, TuiTableCellColorModule };\n","import * as i0 from '@angular/core';\nimport { EventEmitter, Component, ChangeDetectionStrategy, Inject, Output, NgModule } from '@angular/core';\nimport { WINDOW } from '@ng-web-apis/common';\nimport { tuiGetViewportWidth } from '@taiga-ui/core';\nimport * as i1 from '@taiga-ui/cdk';\nimport { TuiRepeatTimesModule } from '@taiga-ui/cdk';\nimport { CommonModule } from '@angular/common';\nfunction TuiTableSizeSelectorComponent_div_0_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵlistener(\"click\", function TuiTableSizeSelectorComponent_div_0_div_1_Template_div_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.select());\n })(\"mouseenter\", function TuiTableSizeSelectorComponent_div_0_div_1_Template_div_mouseenter_0_listener($event) {\n const y_r3 = i0.ɵɵrestoreView(_r1).$implicit;\n const x_r4 = i0.ɵɵnextContext().$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.updateCurrentSize(y_r3 + 1, x_r4 + 1, $event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const y_r3 = ctx.$implicit;\n const x_r4 = i0.ɵɵnextContext().$implicit;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-cell_hovered\", ctx_r1.tableSelectHovered(y_r3, x_r4));\n }\n}\nfunction TuiTableSizeSelectorComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵtemplate(1, TuiTableSizeSelectorComponent_div_0_div_1_Template, 1, 2, \"div\", 3);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tuiRepeatTimesOf\", ctx_r1.rowsNumber);\n }\n}\nconst MAX_COLS_NUMBER = 15;\nconst MAX_ROWS_NUMBER = 15;\nconst MIN_DISTANCE_PX = 70;\nlet TuiTableSizeSelectorComponent = /*#__PURE__*/(() => {\n class TuiTableSizeSelectorComponent {\n constructor(win) {\n this.win = win;\n this.selectSize = new EventEmitter();\n /**\n * @deprecated use {@link selectSize}\n * TODO: remove in v4.0\n */\n this.onSelectSize = this.selectSize;\n this.tableSize = {\n rows: 1,\n cols: 1\n };\n }\n get columnsNumber() {\n return Math.min(Math.max(3, this.tableSize.cols + 1), MAX_COLS_NUMBER);\n }\n get rowsNumber() {\n return Math.min(Math.max(3, this.tableSize.rows + 1), MAX_ROWS_NUMBER);\n }\n tableSelectHovered(x, y) {\n return x < this.tableSize.rows && y < this.tableSize.cols;\n }\n updateCurrentSize(rows, cols, event) {\n if (tuiGetViewportWidth(this.win) - event.clientX > MIN_DISTANCE_PX) {\n this.tableSize = {\n rows,\n cols\n };\n }\n }\n /**\n * @deprecated use {@link select}\n * TODO: remove in v4.0\n */\n onClick() {\n this.select();\n }\n select() {\n this.selectSize.emit(this.tableSize);\n }\n }\n TuiTableSizeSelectorComponent.ɵfac = function TuiTableSizeSelectorComponent_Factory(t) {\n return new (t || TuiTableSizeSelectorComponent)(i0.ɵɵdirectiveInject(WINDOW));\n };\n TuiTableSizeSelectorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTableSizeSelectorComponent,\n selectors: [[\"tui-table-size-selector\"]],\n outputs: {\n selectSize: \"selectSize\",\n onSelectSize: \"onSelectSize\"\n },\n decls: 3,\n vars: 3,\n consts: [[\"class\", \"t-column\", 4, \"tuiRepeatTimes\", \"tuiRepeatTimesOf\"], [1, \"t-description\"], [1, \"t-column\"], [\"class\", \"t-cell\", 3, \"t-cell_hovered\", \"click\", \"mouseenter\", 4, \"tuiRepeatTimes\", \"tuiRepeatTimesOf\"], [1, \"t-cell\", 3, \"click\", \"mouseenter\"]],\n template: function TuiTableSizeSelectorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiTableSizeSelectorComponent_div_0_Template, 2, 1, \"div\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵtext(2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiRepeatTimesOf\", ctx.columnsNumber);\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate2(\"\", ctx.tableSize.cols, \"\\xD7\", ctx.tableSize.rows, \"\");\n }\n },\n dependencies: [i1.TuiRepeatTimesDirective],\n styles: [\"[_nghost-%COMP%]{display:block;padding:.75rem}.t-cell[_ngcontent-%COMP%]{display:inline-block;background-color:var(--tui-base-01);width:1.25rem;height:1.25rem;border-radius:.25rem;margin:.125rem;border:1px solid var(--tui-base-04);cursor:pointer}.t-cell_hovered[_ngcontent-%COMP%]{background-color:var(--tui-base-02)}.t-column[_ngcontent-%COMP%]{white-space:nowrap}.t-description[_ngcontent-%COMP%]{text-align:center}\"],\n changeDetection: 0\n });\n return TuiTableSizeSelectorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTableSizeSelectorModule = /*#__PURE__*/(() => {\n class TuiTableSizeSelectorModule {}\n TuiTableSizeSelectorModule.ɵfac = function TuiTableSizeSelectorModule_Factory(t) {\n return new (t || TuiTableSizeSelectorModule)();\n };\n TuiTableSizeSelectorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTableSizeSelectorModule\n });\n TuiTableSizeSelectorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiRepeatTimesModule]]\n });\n return TuiTableSizeSelectorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTableSizeSelectorComponent, TuiTableSizeSelectorModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiDropdownModule, TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@tinkoff/tui-editor/components/toolbar-tools/table-size-selector';\nimport { TuiTableSizeSelectorModule } from '@tinkoff/tui-editor/components/toolbar-tools/table-size-selector';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from '@tinkoff/tui-editor/abstract';\nimport * as i5 from 'rxjs';\nfunction TuiTableCreateComponent_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-table-size-selector\", 4);\n i0.ɵɵlistener(\"selectSize\", function TuiTableCreateComponent_ng_template_4_Template_tui_table_size_selector_selectSize_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.addTable($event));\n });\n i0.ɵɵelementEnd();\n }\n}\nlet TuiTableCreateComponent = /*#__PURE__*/(() => {\n class TuiTableCreateComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.insertTableText$ = this.texts$.pipe(map(texts => texts.insertTable));\n }\n addTable({\n rows,\n cols\n }) {\n this.editor.enter(); // @note: clear previous styles\n const prevLine = this.editor.state.selection.anchor;\n // @note: don't use `setHardBreak`,\n // it inherits styles of previous lines\n // required two line after\n this.editor.enter();\n this.editor.enter();\n this.editor.setTextSelection(prevLine);\n this.editor.insertTable(rows, cols);\n }\n }\n TuiTableCreateComponent.ɵfac = function TuiTableCreateComponent_Factory(t) {\n return new (t || TuiTableCreateComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiTableCreateComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTableCreateComponent,\n selectors: [[\"tui-table-create\"]],\n decls: 6,\n vars: 6,\n consts: [[\"table\", \"\"], [\"tableDropdown\", \"\"], [\"tuiDropdownAlign\", \"left\", \"tuiDropdownDirection\", \"bottom\", 3, \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__insert-table-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"tuiHint\"], [3, \"selectSize\"]],\n template: function TuiTableCreateComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 2, 0);\n i0.ɵɵelement(2, \"button\", 3);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(4, TuiTableCreateComponent_ng_template_4_Template, 1, 0, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const table_r3 = i0.ɵɵreference(1);\n const tableDropdown_r4 = i0.ɵɵreference(5);\n i0.ɵɵproperty(\"content\", tableDropdown_r4);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", table_r3.open)(\"icon\", ctx.options.icons.insertTable)(\"tuiHint\", i0.ɵɵpipeBind1(3, 4, ctx.insertTableText$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.TuiTableSizeSelectorComponent, i1.TuiDropdownOptionsDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i3.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiTableCreateComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTableCreateModule = /*#__PURE__*/(() => {\n class TuiTableCreateModule {}\n TuiTableCreateModule.ɵfac = function TuiTableCreateModule_Factory(t) {\n return new (t || TuiTableCreateModule)();\n };\n TuiTableCreateModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTableCreateModule\n });\n TuiTableCreateModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiDropdownModule, TuiButtonModule, TuiHintModule, TuiTableSizeSelectorModule]]\n });\n return TuiTableCreateModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTableCreateComponent, TuiTableCreateModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiButtonModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@taiga-ui/cdk';\nimport { TuiLetModule } from '@taiga-ui/cdk';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from '@tinkoff/tui-editor/abstract';\nimport * as i5 from 'rxjs';\nconst _c0 = (a0, a1) => ({\n mergeCells: a0,\n splitCells: a1\n});\nfunction TuiTableMergeCellsComponent_ng_container_0_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 2);\n i0.ɵɵlistener(\"click\", function TuiTableMergeCellsComponent_ng_container_0_button_1_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const can_r2 = i0.ɵɵnextContext().tuiLet;\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(can_r2.mergeCells ? ctx_r2.mergeCells() : ctx_r2.splitCell());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r4 = ctx.ngIf;\n const can_r2 = i0.ɵɵnextContext().tuiLet;\n i0.ɵɵproperty(\"disabled\", !can_r2.mergeCells && !can_r2.splitCells)(\"focusable\", false)(\"icon\", can_r2.mergeCells ? \"tuiIconTableMergeLarge\" : \"tuiIconTableSplitLarge\")(\"tuiHint\", can_r2.mergeCells ? texts_r4.mergeCells : texts_r4.splitCells);\n }\n}\nfunction TuiTableMergeCellsComponent_ng_container_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiTableMergeCellsComponent_ng_container_0_button_1_Template, 1, 4, \"button\", 1);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(2, 1, ctx_r2.texts$));\n }\n}\nlet TuiTableMergeCellsComponent = /*#__PURE__*/(() => {\n class TuiTableMergeCellsComponent {\n constructor(editor, texts$) {\n this.editor = editor;\n this.texts$ = texts$;\n this.canMergeCells$ = this.editor.stateChange$.pipe(map(() => this.editor.canMergeCells()), distinctUntilChanged());\n this.canSplitCells$ = this.editor.stateChange$.pipe(map(() => this.editor.canSplitCells()), distinctUntilChanged());\n }\n mergeCells() {\n this.editor.mergeCells();\n }\n splitCell() {\n this.editor.splitCell();\n }\n }\n TuiTableMergeCellsComponent.ɵfac = function TuiTableMergeCellsComponent_Factory(t) {\n return new (t || TuiTableMergeCellsComponent)(i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiTableMergeCellsComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTableMergeCellsComponent,\n selectors: [[\"tui-table-merge-cells\"]],\n decls: 3,\n vars: 8,\n consts: [[4, \"tuiLet\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"disabled\", \"focusable\", \"icon\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"tuiHint\"]],\n template: function TuiTableMergeCellsComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiTableMergeCellsComponent_ng_container_0_Template, 3, 3, \"ng-container\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵpipe(2, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpureFunction2(5, _c0, i0.ɵɵpipeBind1(1, 1, ctx.canMergeCells$), i0.ɵɵpipeBind1(2, 3, ctx.canSplitCells$)));\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.TuiLetDirective, i3.NgIf, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i3.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiTableMergeCellsComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTableMergeCellsModule = /*#__PURE__*/(() => {\n class TuiTableMergeCellsModule {}\n TuiTableMergeCellsModule.ɵfac = function TuiTableMergeCellsModule_Factory(t) {\n return new (t || TuiTableMergeCellsModule)();\n };\n TuiTableMergeCellsModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTableMergeCellsModule\n });\n TuiTableMergeCellsModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule, TuiHintModule, TuiLetModule]]\n });\n return TuiTableMergeCellsModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTableMergeCellsComponent, TuiTableMergeCellsModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_TABLE_COMMANDS } from '@tinkoff/tui-editor/tokens';\nimport { map } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHostedDropdownModule, TuiHintModule, TuiButtonModule, TuiDataListModule } from '@taiga-ui/core';\nimport * as i2 from '@taiga-ui/cdk';\nimport { TuiLetModule } from '@taiga-ui/cdk';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i4 from '@tinkoff/tui-editor/abstract';\nimport * as i5 from 'rxjs';\n\n// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nfunction TuiTableRowColumnManagerComponent_tui_hosted_dropdown_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 3, 1);\n i0.ɵɵelement(2, \"button\", 4);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const active_r1 = ctx.tuiLet;\n const tableCommand_r2 = i0.ɵɵreference(1);\n const ctx_r2 = i0.ɵɵnextContext();\n const tableOptionsDropdown_r4 = i0.ɵɵreference(3);\n i0.ɵɵproperty(\"canOpen\", !!active_r1)(\"content\", tableOptionsDropdown_r4);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"disabled\", !active_r1)(\"focusable\", tableCommand_r2.open)(\"icon\", ctx_r2.options.icons.addRowTable)(\"tuiHint\", i0.ɵɵpipeBind1(3, 6, ctx_r2.rowsColumnsManagingText$));\n }\n}\nfunction TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 7);\n i0.ɵɵlistener(\"click\", function TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_button_1_Template_button_click_0_listener() {\n const j_r6 = i0.ɵɵrestoreView(_r5).index;\n const i_r7 = i0.ɵɵnextContext().index;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.onTableOption(i_r7 * 2 + j_r6));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const item_r8 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", item_r8, \" \");\n }\n}\nfunction TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-opt-group\");\n i0.ɵɵtemplate(1, TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_button_1_Template, 2, 1, \"button\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const group_r9 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", group_r9);\n }\n}\nfunction TuiTableRowColumnManagerComponent_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-data-list\");\n i0.ɵɵtemplate(1, TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_Template, 2, 1, \"tui-opt-group\", 5);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind1(2, 1, ctx_r2.tableCommandTexts$));\n }\n}\nvar TuiTableCommands = /*#__PURE__*/function (TuiTableCommands) {\n TuiTableCommands[TuiTableCommands[\"InsertColumnBefore\"] = 0] = \"InsertColumnBefore\";\n TuiTableCommands[TuiTableCommands[\"InsertColumnAfter\"] = 1] = \"InsertColumnAfter\";\n TuiTableCommands[TuiTableCommands[\"InsertRowBefore\"] = 2] = \"InsertRowBefore\";\n TuiTableCommands[TuiTableCommands[\"InsertRowAfter\"] = 3] = \"InsertRowAfter\";\n TuiTableCommands[TuiTableCommands[\"DeleteColumn\"] = 4] = \"DeleteColumn\";\n TuiTableCommands[TuiTableCommands[\"DeleteRow\"] = 5] = \"DeleteRow\";\n return TuiTableCommands;\n}(TuiTableCommands || {});\nlet TuiTableRowColumnManagerComponent = /*#__PURE__*/(() => {\n class TuiTableRowColumnManagerComponent {\n constructor(options, editor, texts$, tableCommandTexts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.tableCommandTexts$ = tableCommandTexts$;\n this.commandsRegistry = {\n [TuiTableCommands.InsertColumnAfter]: () => this.editor.addColumnAfter(),\n [TuiTableCommands.InsertColumnBefore]: () => this.editor.addColumnBefore(),\n [TuiTableCommands.InsertRowAfter]: () => this.editor.addRowAfter(),\n [TuiTableCommands.InsertRowBefore]: () => this.editor.addRowBefore(),\n [TuiTableCommands.DeleteColumn]: () => this.editor.deleteColumn(),\n [TuiTableCommands.DeleteRow]: () => this.editor.deleteRow()\n };\n this.isActive$ = this.editor.isActive$('table');\n this.rowsColumnsManagingText$ = this.texts$.pipe(map(texts => texts.rowsColumnsManaging));\n }\n onTableOption(command) {\n this.commandsRegistry[command]();\n }\n }\n TuiTableRowColumnManagerComponent.ɵfac = function TuiTableRowColumnManagerComponent_Factory(t) {\n return new (t || TuiTableRowColumnManagerComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_TABLE_COMMANDS));\n };\n TuiTableRowColumnManagerComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTableRowColumnManagerComponent,\n selectors: [[\"tui-table-row-column-manager\"]],\n decls: 4,\n vars: 3,\n consts: [[\"tableOptionsDropdown\", \"\"], [\"tableCommand\", \"\"], [3, \"canOpen\", \"content\", 4, \"tuiLet\"], [3, \"canOpen\", \"content\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"disabled\", \"focusable\", \"icon\", \"tuiHint\"], [4, \"ngFor\", \"ngForOf\"], [\"tuiOption\", \"\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"tuiOption\", \"\", 3, \"click\"]],\n template: function TuiTableRowColumnManagerComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiTableRowColumnManagerComponent_tui_hosted_dropdown_0_Template, 4, 8, \"tui-hosted-dropdown\", 2);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵtemplate(2, TuiTableRowColumnManagerComponent_ng_template_2_Template, 3, 3, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(1, 1, ctx.isActive$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i1.TuiDataListComponent, i1.TuiOptionComponent, i2.TuiLetDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i3.NgForOf, i1.TuiOptGroupDirective, i3.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiTableRowColumnManagerComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTableRowColumnManagerModule = /*#__PURE__*/(() => {\n class TuiTableRowColumnManagerModule {}\n TuiTableRowColumnManagerModule.ɵfac = function TuiTableRowColumnManagerModule_Factory(t) {\n return new (t || TuiTableRowColumnManagerModule)();\n };\n TuiTableRowColumnManagerModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTableRowColumnManagerModule\n });\n TuiTableRowColumnManagerModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHostedDropdownModule, TuiHintModule, TuiButtonModule, TuiDataListModule, TuiLetModule]]\n });\n return TuiTableRowColumnManagerModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTableCommands, TuiTableRowColumnManagerComponent, TuiTableRowColumnManagerModule };\n","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Inject, Input, NgModule } from '@angular/core';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_OPTIONS, TUI_EDITOR_TOOLBAR_TEXTS } from '@tinkoff/tui-editor/tokens';\nimport { map, distinctUntilChanged } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiButtonModule, TuiHostedDropdownModule, TuiDropdownModule, TuiHintModule } from '@taiga-ui/core';\nimport * as i2 from '@tinkoff/tui-editor/components/color-selector';\nimport { TuiPaletteModule } from '@tinkoff/tui-editor/components/color-selector';\nimport * as i3 from '@taiga-ui/cdk';\nimport { TuiActiveZoneModule, TuiLetModule } from '@taiga-ui/cdk';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i5 from '@tinkoff/tui-editor/abstract';\nimport * as i6 from 'rxjs';\nfunction TuiTextColorComponent_tui_hosted_dropdown_0_ng_template_5_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-palette\", 6);\n i0.ɵɵlistener(\"selectedColor\", function TuiTextColorComponent_tui_hosted_dropdown_0_ng_template_5_Template_tui_palette_selectedColor_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.editor.setFontColor($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const activeZone_r3 = ctx.$implicit;\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"colors\", ctx_r1.colors)(\"tuiActiveZoneParent\", activeZone_r3);\n }\n}\nfunction TuiTextColorComponent_tui_hosted_dropdown_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 3, 0);\n i0.ɵɵelement(2, \"button\", 4);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelement(4, \"div\", 5);\n i0.ɵɵtemplate(5, TuiTextColorComponent_tui_hosted_dropdown_0_ng_template_5_Template, 1, 2, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const selectedColor_r4 = ctx.tuiLet;\n const color_r5 = i0.ɵɵreference(1);\n const colorDropdown_r6 = i0.ɵɵreference(6);\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"content\", colorDropdown_r6)(\"tuiDropdownMaxHeight\", 999);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", color_r5.open)(\"icon\", ctx_r1.options.icons.textColor)(\"pseudoActive\", color_r5.open)(\"tuiHint\", i0.ɵɵpipeBind1(3, 8, ctx_r1.foreColorText$));\n i0.ɵɵadvance(2);\n i0.ɵɵstyleProp(\"background\", selectedColor_r4);\n }\n}\nlet TuiTextColorComponent = /*#__PURE__*/(() => {\n class TuiTextColorComponent {\n constructor(options, editor, texts$) {\n this.options = options;\n this.editor = editor;\n this.texts$ = texts$;\n this.colors = this.options.colors;\n this.fontColor$ = this.editor.stateChange$.pipe(map(() => this.editor.getFontColor() || this.options.blankColor), distinctUntilChanged());\n this.foreColorText$ = this.texts$.pipe(map(texts => texts.foreColor));\n }\n }\n TuiTextColorComponent.ɵfac = function TuiTextColorComponent_Factory(t) {\n return new (t || TuiTextColorComponent)(i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS));\n };\n TuiTextColorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiTextColorComponent,\n selectors: [[\"tui-text-color\"]],\n inputs: {\n colors: \"colors\"\n },\n decls: 2,\n vars: 3,\n consts: [[\"color\", \"\"], [\"colorDropdown\", \"\"], [3, \"content\", \"tuiDropdownMaxHeight\", 4, \"tuiLet\"], [3, \"content\", \"tuiDropdownMaxHeight\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__color-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [1, \"t-plate\"], [1, \"t-color-picker\", 3, \"selectedColor\", \"colors\", \"tuiActiveZoneParent\"]],\n template: function TuiTextColorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiTextColorComponent_tui_hosted_dropdown_0_Template, 7, 10, \"tui-hosted-dropdown\", 2);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"tuiLet\", i0.ɵɵpipeBind1(1, 1, ctx.fontColor$));\n }\n },\n dependencies: [i1.TuiHostedDropdownComponent, i1.TuiButtonComponent, i2.TuiPaletteComponent, i3.TuiLetDirective, i1.TuiDropdownOptionsDirective, i1.TuiHintDescribeDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i3.TuiActiveZoneDirective, i4.AsyncPipe],\n styles: [\".t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-option[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-option[_ngcontent-%COMP%]:hover{background:var(--tui-secondary-hover)}.t-option_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-color-picker[_ngcontent-%COMP%]{box-sizing:border-box;max-width:22.6rem}\"],\n changeDetection: 0\n });\n return TuiTextColorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiTextColorModule = /*#__PURE__*/(() => {\n class TuiTextColorModule {}\n TuiTextColorModule.ɵfac = function TuiTextColorModule_Factory(t) {\n return new (t || TuiTextColorModule)();\n };\n TuiTextColorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiTextColorModule\n });\n TuiTextColorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiButtonModule, TuiHostedDropdownModule, TuiDropdownModule, TuiHintModule, TuiPaletteModule, TuiActiveZoneModule, TuiLetModule]]\n });\n return TuiTextColorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiTextColorComponent, TuiTextColorModule };\n","import * as i3 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { Pipe, EventEmitter, Component, ChangeDetectionStrategy, Inject, Output, Input, HostListener, NgModule } from '@angular/core';\nimport * as i4 from '@taiga-ui/cdk';\nimport { tuiIsValidUrl, tuiIsElement, TuiAutoFocusModule } from '@taiga-ui/cdk';\nimport { TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER, TUI_EDITOR_LINK_HASH_PREFIX, TUI_EDITOR_LINK_SIMPLE_PROTOCOL_DIVIDER, TUI_EDITOR_LINK_HTTPS_PREFIX } from '@tinkoff/tui-editor/constants';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TUI_EDITOR_LINK_TEXTS, TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport * as i1 from '@taiga-ui/kit';\nimport { TuiInputInlineModule, TuiToggleModule } from '@taiga-ui/kit';\nimport * as i2 from '@taiga-ui/core';\nimport { TuiButtonModule, TuiSvgModule, TuiLinkModule, TuiScrollbarModule } from '@taiga-ui/core';\nimport * as i5 from '@angular/forms';\nimport { FormsModule } from '@angular/forms';\nimport * as i8 from '@tinkoff/tui-editor/abstract';\nfunction TuiEditLinkComponent_ng_container_1_ng_container_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtext(1, \"Edit anchor\");\n i0.ɵɵelementContainerEnd();\n }\n}\nfunction TuiEditLinkComponent_ng_container_1_ng_template_4_span_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\");\n i0.ɵɵtext(1, \"Link to anchor\");\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiEditLinkComponent_ng_container_1_ng_template_4_ng_template_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\");\n i0.ɵɵtext(1, \"URL\");\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiEditLinkComponent_ng_container_1_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, TuiEditLinkComponent_ng_container_1_ng_template_4_span_0_Template, 2, 0, \"span\", 4)(1, TuiEditLinkComponent_ng_container_1_ng_template_4_ng_template_1_Template, 2, 0, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const urlTitle_r2 = i0.ɵɵreference(2);\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"ngIf\", ctx_r2.prefixIsHashMode)(\"ngIfElse\", urlTitle_r2);\n }\n}\nfunction TuiEditLinkComponent_ng_container_1_ng_container_10_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_r4 = ctx.ngIf;\n const ctx_r2 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r2.prefixIsHashMode ? text_r4.anchorExample : text_r4.urlExample, \" \");\n }\n}\nfunction TuiEditLinkComponent_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"label\", 6)(2, \"div\", 7);\n i0.ɵɵtemplate(3, TuiEditLinkComponent_ng_container_1_ng_container_3_Template, 2, 0, \"ng-container\", 4)(4, TuiEditLinkComponent_ng_container_1_ng_template_4_Template, 3, 2, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(6, \"div\", 8)(7, \"div\", 9);\n i0.ɵɵtext(8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(9, \"tui-input-inline\", 10);\n i0.ɵɵtwoWayListener(\"ngModelChange\", function TuiEditLinkComponent_ng_container_1_Template_tui_input_inline_ngModelChange_9_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵtwoWayBindingSet(ctx_r2.url, $event) || (ctx_r2.url = $event);\n return i0.ɵɵresetView($event);\n });\n i0.ɵɵlistener(\"input\", function TuiEditLinkComponent_ng_container_1_Template_tui_input_inline_input_9_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onChange($event.target == null ? null : $event.target.value));\n })(\"keydown.backspace\", function TuiEditLinkComponent_ng_container_1_Template_tui_input_inline_keydown_backspace_9_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onBackspace());\n })(\"keydown.prevent.enter\", function TuiEditLinkComponent_ng_container_1_Template_tui_input_inline_keydown_prevent_enter_9_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onSave());\n });\n i0.ɵɵtemplate(10, TuiEditLinkComponent_ng_container_1_ng_container_10_Template, 2, 1, \"ng-container\", 5);\n i0.ɵɵpipe(11, \"async\");\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(12, \"tui-svg\", 11);\n i0.ɵɵlistener(\"click\", function TuiEditLinkComponent_ng_container_1_Template_tui_svg_click_12_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onClear());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(13, \"button\", 12);\n i0.ɵɵlistener(\"click\", function TuiEditLinkComponent_ng_container_1_Template_button_click_13_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onSave());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const fullOptions_r5 = i0.ɵɵreference(5);\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx_r2.anchorMode)(\"ngIfElse\", fullOptions_r5);\n i0.ɵɵadvance(5);\n i0.ɵɵtextInterpolate(ctx_r2.prefix);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"t-input_filled\", ctx_r2.hasUrl);\n i0.ɵɵtwoWayProperty(\"ngModel\", ctx_r2.url);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(11, 11, ctx_r2.texts$));\n i0.ɵɵadvance(2);\n i0.ɵɵclassProp(\"t-cleaner_hidden\", !ctx_r2.hasUrl);\n i0.ɵɵproperty(\"src\", ctx_r2.options.icons.popupLinkRemove);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r2.options.icons.popupLinkSave);\n }\n}\nfunction TuiEditLinkComponent_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"a\", 13);\n i0.ɵɵtext(1);\n i0.ɵɵpipe(2, \"tuiShortUrl\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"button\", 14);\n i0.ɵɵlistener(\"click\", function TuiEditLinkComponent_ng_template_2_Template_button_click_3_listener() {\n i0.ɵɵrestoreView(_r6);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onEdit());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"button\", 15);\n i0.ɵɵlistener(\"click\", function TuiEditLinkComponent_ng_template_2_Template_button_click_4_listener() {\n i0.ɵɵrestoreView(_r6);\n const ctx_r2 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r2.onRemove());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"href\", ctx_r2.href, i0.ɵɵsanitizeUrl)(\"icon\", ctx_r2.prefixIsHashMode ? \"tuiIconHash\" : \"tuiIconExternalLink\");\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", i0.ɵɵpipeBind1(2, 5, ctx_r2.url), \" \");\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"icon\", ctx_r2.options.icons.popupPreviewLinkEdit);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"icon\", ctx_r2.options.icons.popupPreviewLinkClear);\n }\n}\nfunction TuiEditLinkComponent_ng_container_4_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 19);\n i0.ɵɵlistener(\"click\", function TuiEditLinkComponent_ng_container_4_button_4_Template_button_click_0_listener() {\n const id_r8 = i0.ɵɵrestoreView(_r7).$implicit;\n const ctx_r2 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r2.setAnchor(id_r8));\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const id_r8 = ctx.$implicit;\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" #\", id_r8, \" \");\n }\n}\nfunction TuiEditLinkComponent_ng_container_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelement(1, \"hr\", 16);\n i0.ɵɵelementStart(2, \"tui-scrollbar\")(3, \"div\", 17);\n i0.ɵɵtemplate(4, TuiEditLinkComponent_ng_container_4_button_4_Template, 2, 1, \"button\", 18);\n i0.ɵɵpipe(5, \"tuiFilterAnchors\");\n i0.ɵɵelementEnd()();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r2 = i0.ɵɵnextContext();\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"ngForOf\", i0.ɵɵpipeBind3(5, 1, ctx_r2.anchorIds, ctx_r2.prefix, ctx_r2.url));\n }\n}\nfunction splitOsiProtocol(url = ``) {\n var _a;\n const protocolPosition = (_a = url.indexOf(TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER)) !== null && _a !== void 0 ? _a : -1;\n const [prefix, path] = protocolPosition > -1 ? [url.slice(0, protocolPosition + TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER.length), url.slice(protocolPosition + TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER.length, url.length)] : [``, url];\n const result = [prefix, path].filter(Boolean);\n return (path === null || path === void 0 ? void 0 : path.includes(`://`)) && result.length > 1 ? splitOsiProtocol(path) : result;\n}\nfunction splitSimpleProtocol(url = ``) {\n const [prefix, path] = url.split(/:/).slice(-2).filter(Boolean);\n return prefix && path && !tuiIsValidUrl(url) ? [`${prefix}:`, path] : [];\n}\nfunction tuiEditLinkParseUrl(url = ``) {\n if (url.startsWith(TUI_EDITOR_LINK_HASH_PREFIX)) {\n return {\n prefix: TUI_EDITOR_LINK_HASH_PREFIX,\n path: url.slice(1)\n };\n }\n const [prefix = ``, path = ``] = url.includes(TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER) ? splitOsiProtocol(url) : splitSimpleProtocol(url);\n if (path.includes(TUI_EDITOR_LINK_SIMPLE_PROTOCOL_DIVIDER)) {\n const [protocol, otherPart] = splitSimpleProtocol(path);\n if (protocol && otherPart) {\n return {\n prefix: protocol,\n path: otherPart\n };\n }\n }\n if (url.startsWith(`/`) && !url.startsWith(`//`)) {\n return {\n prefix: url.slice(0, 1),\n path: url.slice(1)\n };\n }\n if (url.startsWith(`./`)) {\n return {\n prefix: url.slice(0, 2),\n path: url.slice(2)\n };\n }\n return {\n prefix,\n path: prefix === `` ? url : path\n };\n}\nconst MAX_LENGTH = 60;\nconst START = MAX_LENGTH - 20;\nconst END = MAX_LENGTH - START - 10;\nlet TuiShortUrlPipe = /*#__PURE__*/(() => {\n class TuiShortUrlPipe {\n transform(url) {\n return url.length < MAX_LENGTH ? url : `${url.slice(0, Math.max(0, START))}...${url.slice(url.length - END)}`;\n }\n }\n TuiShortUrlPipe.ɵfac = function TuiShortUrlPipe_Factory(t) {\n return new (t || TuiShortUrlPipe)();\n };\n TuiShortUrlPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiShortUrl\",\n type: TuiShortUrlPipe,\n pure: true\n });\n return TuiShortUrlPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiFilterAnchorsPipe = /*#__PURE__*/(() => {\n class TuiFilterAnchorsPipe {\n transform(anchors, prefix, currentUrl) {\n return prefix === `#` ? anchors.filter(anchor => anchor !== currentUrl) : anchors;\n }\n }\n TuiFilterAnchorsPipe.ɵfac = function TuiFilterAnchorsPipe_Factory(t) {\n return new (t || TuiFilterAnchorsPipe)();\n };\n TuiFilterAnchorsPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"tuiFilterAnchors\",\n type: TuiFilterAnchorsPipe,\n pure: true\n });\n return TuiFilterAnchorsPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditLinkComponent = /*#__PURE__*/(() => {\n class TuiEditLinkComponent {\n constructor(doc, texts$, editor, options) {\n this.doc = doc;\n this.texts$ = texts$;\n this.editor = editor;\n this.options = options;\n this.isOnlyAnchorMode = this.detectAnchorMode();\n this.addLink = new EventEmitter();\n this.removeLink = new EventEmitter();\n this.url = this.getHrefOrAnchorId();\n this.edit = !this.url;\n this.prefix = this.makeDefaultPrefix();\n this.anchorIds = this.getAllAnchorsIds();\n }\n get defaultProtocol() {\n var _a, _b;\n return (_b = (_a = this.options.linkOptions) === null || _a === void 0 ? void 0 : _a.protocol) !== null && _b !== void 0 ? _b : TUI_EDITOR_LINK_HTTPS_PREFIX;\n }\n set anchorMode(mode) {\n this.isOnlyAnchorMode = mode;\n this.prefix = mode ? TUI_EDITOR_LINK_HASH_PREFIX : this.makeDefaultPrefix();\n }\n get anchorMode() {\n return this.isOnlyAnchorMode;\n }\n get prefixIsHashMode() {\n return this.prefix === TUI_EDITOR_LINK_HASH_PREFIX;\n }\n get hasUrl() {\n return !!this.url;\n }\n get href() {\n return `${this.prefix}${this.url}`;\n }\n get showAnchorsList() {\n return !this.anchorMode && this.edit && this.anchorIds.length > 0;\n }\n get isViewMode() {\n return !this.edit;\n }\n onSelectionChange() {\n if (this.isViewMode) {\n this.url = this.getHrefOrAnchorId();\n this.anchorMode = this.detectAnchorMode();\n }\n }\n onMouseDown(event) {\n if (tuiIsElement(event.target) && !event.target.matches('a, button, input')) {\n event.preventDefault();\n }\n }\n setAnchor(anchor) {\n this.url = anchor;\n this.changePrefix(true);\n }\n changePrefix(isPrefix) {\n this.prefix = isPrefix ? TUI_EDITOR_LINK_HASH_PREFIX : this.defaultProtocol;\n }\n onSave() {\n if (this.url) {\n this.addLink.emit(this.href);\n } else {\n this.removeLink.emit();\n }\n }\n onBackspace() {\n if (!this.url) {\n this.prefix = this.isOnlyAnchorMode ? TUI_EDITOR_LINK_HASH_PREFIX : this.defaultProtocol;\n }\n }\n onEdit() {\n this.edit = true;\n }\n onRemove() {\n this.removeLink.emit();\n }\n onChange(url) {\n this.url = this.removePrefix(url);\n }\n onClear() {\n this.url = '';\n }\n makeDefaultPrefix() {\n var _a, _b;\n const a = this.getAnchorElement();\n const defaultPrefix = tuiEditLinkParseUrl((_a = a === null || a === void 0 ? void 0 : a.getAttribute('href')) !== null && _a !== void 0 ? _a : '').prefix || this.defaultProtocol;\n if (a) {\n return !a.getAttribute('href') && a.getAttribute('id') || ((_b = a.getAttribute('href')) === null || _b === void 0 ? void 0 : _b.startsWith(TUI_EDITOR_LINK_HASH_PREFIX)) ? TUI_EDITOR_LINK_HASH_PREFIX : defaultPrefix;\n }\n return defaultPrefix;\n }\n detectAnchorMode() {\n const a = this.getAnchorElement();\n return !(a === null || a === void 0 ? void 0 : a.href) && !!(a === null || a === void 0 ? void 0 : a.getAttribute('id'));\n }\n getFocusedParentElement() {\n var _a, _b;\n return ((_b = (_a = this.doc.getSelection()) === null || _a === void 0 ? void 0 : _a.focusNode) === null || _b === void 0 ? void 0 : _b.parentElement) || null;\n }\n getAnchorElement() {\n var _a, _b, _c;\n const focusable = this.getFocusedParentElement();\n return (_c = (_a = focusable === null || focusable === void 0 ? void 0 : focusable.closest('a')) !== null && _a !== void 0 ? _a : (_b = focusable === null || focusable === void 0 ? void 0 : focusable.querySelector('img')) === null || _b === void 0 ? void 0 : _b.closest('a')) !== null && _c !== void 0 ? _c : null;\n }\n getHrefOrAnchorId() {\n const a = this.getAnchorElement();\n return a ? this.removePrefix(a.getAttribute('href') || a.getAttribute('id') || '') : this.url;\n }\n removePrefix(url) {\n var _a;\n const fullPath = url.startsWith(TUI_EDITOR_LINK_HASH_PREFIX) || this.prefix === TUI_EDITOR_LINK_HASH_PREFIX || url.startsWith('/') || url.startsWith('./') || url.startsWith('http') || url.startsWith('://') ? url : `${(_a = this.prefix) !== null && _a !== void 0 ? _a : ''}${url}`;\n const {\n prefix,\n path\n } = tuiEditLinkParseUrl(fullPath);\n const expectAnchorMode = this.isOnlyAnchorMode || prefix === TUI_EDITOR_LINK_HASH_PREFIX || prefix === '' && this.prefix === TUI_EDITOR_LINK_HASH_PREFIX;\n if (expectAnchorMode) {\n this.prefix = TUI_EDITOR_LINK_HASH_PREFIX;\n } else if (prefix === '') {\n this.prefix = this.defaultProtocol;\n } else {\n this.prefix = prefix;\n }\n return path;\n }\n getAllAnchorsIds() {\n var _a;\n const nodes = Array.from((_a = this.editor.getOriginTiptapEditor().view.dom.querySelectorAll('[data-type=\"jump-anchor\"]')) !== null && _a !== void 0 ? _a : []);\n return Array.from(nodes).map(node => node.getAttribute('id') || '').filter(Boolean);\n }\n }\n TuiEditLinkComponent.ɵfac = function TuiEditLinkComponent_Factory(t) {\n return new (t || TuiEditLinkComponent)(i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(TUI_EDITOR_LINK_TEXTS), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS));\n };\n TuiEditLinkComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiEditLinkComponent,\n selectors: [[\"tui-edit-link\"]],\n hostBindings: function TuiEditLinkComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"selectionchange\", function TuiEditLinkComponent_selectionchange_HostBindingHandler() {\n return ctx.onSelectionChange();\n }, false, i0.ɵɵresolveDocument)(\"mousedown\", function TuiEditLinkComponent_mousedown_HostBindingHandler($event) {\n return ctx.onMouseDown($event);\n });\n }\n },\n inputs: {\n anchorMode: \"anchorMode\"\n },\n outputs: {\n addLink: \"addLink\",\n removeLink: \"removeLink\"\n },\n decls: 5,\n vars: 3,\n consts: [[\"view\", \"\"], [\"fullOptions\", \"\"], [\"urlTitle\", \"\"], [1, \"t-edit-link\"], [4, \"ngIf\", \"ngIfElse\"], [4, \"ngIf\"], [1, \"t-label\"], [1, \"t-label-properties\"], [1, \"t-url\"], [1, \"t-prefix\"], [\"tuiAutoFocus\", \"\", 1, \"t-input\", 3, \"ngModelChange\", \"input\", \"keydown.backspace\", \"keydown.prevent.enter\", \"ngModel\"], [1, \"t-cleaner\", 3, \"click\", \"src\"], [\"appearance\", \"icon\", \"shape\", \"rounded\", \"size\", \"s\", \"title\", \"Insert link\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-button\", 3, \"click\", \"icon\"], [\"iconAlign\", \"left\", \"target\", \"_blank\", \"tuiLink\", \"\", 1, \"t-link\", 3, \"href\", \"icon\"], [\"appearance\", \"icon\", \"shape\", \"rounded\", \"size\", \"s\", \"title\", \"Change link\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-button\", \"t-edit-button\", 3, \"click\", \"icon\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__popup-link-clear-button\", \"shape\", \"rounded\", \"size\", \"s\", \"title\", \"Remove link\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-button\", 3, \"click\", \"icon\"], [1, \"t-hr\"], [1, \"t-anchor-list\"], [\"type\", \"button\", \"class\", \"t-anchor\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [\"type\", \"button\", 1, \"t-anchor\", 3, \"click\"]],\n template: function TuiEditLinkComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 3);\n i0.ɵɵtemplate(1, TuiEditLinkComponent_ng_container_1_Template, 14, 13, \"ng-container\", 4)(2, TuiEditLinkComponent_ng_template_2_Template, 5, 7, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(4, TuiEditLinkComponent_ng_container_4_Template, 6, 5, \"ng-container\", 5);\n }\n if (rf & 2) {\n const view_r9 = i0.ɵɵreference(3);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx.edit)(\"ngIfElse\", view_r9);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"ngIf\", ctx.showAnchorsList);\n }\n },\n dependencies: [i1.TuiInputInlineComponent, i2.TuiSvgComponent, i2.TuiButtonComponent, i2.TuiLinkComponent, i2.TuiScrollbarComponent, i3.NgIf, i4.TuiAutoFocusDirective, i5.NgControlStatus, i5.NgModel, i3.NgForOf, i3.AsyncPipe, TuiShortUrlPipe, TuiFilterAnchorsPipe],\n styles: [\"[_nghost-%COMP%]{display:block;min-width:18.75rem}.t-edit-link[_ngcontent-%COMP%]{display:flex;min-height:4rem;align-items:center;padding-right:.75rem}.t-label[_ngcontent-%COMP%]{font:var(--tui-font-text-s);height:var(--tui-height-l);box-sizing:border-box;padding:.4375rem 1rem;min-width:12.5rem;max-width:25rem;width:100%}.t-label-properties[_ngcontent-%COMP%]{display:flex;align-items:center;max-width:8.375rem;justify-content:space-between}.t-property_inactive[_ngcontent-%COMP%]{opacity:.5}.t-url[_ngcontent-%COMP%]{display:flex;font:var(--tui-font-text-m);color:var(--tui-text-02)}.t-input[_ngcontent-%COMP%]{flex:1}.t-input_filled[_ngcontent-%COMP%]{color:var(--tui-text-01)}.t-button[_ngcontent-%COMP%]{width:2rem;height:2rem;margin:0 .25rem;transition:background .2s}.t-edit-button[_ngcontent-%COMP%]{margin-left:auto}.t-link[_ngcontent-%COMP%]{margin:0 1rem;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.t-cleaner[_ngcontent-%COMP%]{transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;color:var(--tui-base-06);cursor:pointer;margin-left:auto}.t-cleaner[_ngcontent-%COMP%]:hover{color:var(--tui-base-07)}.t-cleaner_hidden[_ngcontent-%COMP%]{visibility:hidden}.t-anchor-list[_ngcontent-%COMP%]{display:flex;max-height:12.5rem;flex-direction:column}.t-anchor[_ngcontent-%COMP%]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background:none;font-size:inherit;line-height:inherit;text-decoration:none;min-height:2.75rem;padding:.375rem .5rem;margin:.125rem .5rem;border-radius:var(--tui-radius-m);text-align:left}.t-anchor[_ngcontent-%COMP%]:hover{background:var(--tui-base-02);cursor:pointer}\"],\n changeDetection: 0\n });\n return TuiEditLinkComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditLinkModule = /*#__PURE__*/(() => {\n class TuiEditLinkModule {}\n TuiEditLinkModule.ɵfac = function TuiEditLinkModule_Factory(t) {\n return new (t || TuiEditLinkModule)();\n };\n TuiEditLinkModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiEditLinkModule\n });\n TuiEditLinkModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, FormsModule, TuiAutoFocusModule, TuiButtonModule, TuiSvgModule, TuiLinkModule, TuiInputInlineModule, TuiToggleModule, TuiScrollbarModule]]\n });\n return TuiEditLinkModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiEditLinkComponent, TuiEditLinkModule, TuiFilterAnchorsPipe, TuiShortUrlPipe, tuiEditLinkParseUrl };\n","import * as i0 from '@angular/core';\nimport { ElementRef, Directive, Inject, HostListener, EventEmitter, Component, ChangeDetectionStrategy, Optional, Self, ViewChildren, ViewChild, Input, HostBinding, Output, NgModule } from '@angular/core';\nimport * as i5 from '@taiga-ui/cdk';\nimport { tuiIsNativeFocusedIn, tuiClamp, tuiIsNativeMouseFocusable, tuiGetClosestFocusable, EMPTY_QUERY, tuiAssert, TuiDestroyService, TuiFocusableModule, TuiItemModule, TuiItemDirective } from '@taiga-ui/cdk';\nimport { defaultEditorTools } from '@tinkoff/tui-editor/constants';\nimport { TuiTiptapEditorService } from '@tinkoff/tui-editor/directives';\nimport { TuiEditorTool } from '@tinkoff/tui-editor/enums';\nimport { TUI_IMAGE_LOADER, TUI_ATTACH_FILES_OPTIONS, TUI_ATTACH_FILES_LOADER, TUI_EDITOR_TOOLBAR_TEXTS, TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport { take, takeUntil } from 'rxjs/operators';\nimport * as i1 from '@taiga-ui/core';\nimport { TuiHintModule, TuiButtonModule, TuiHostedDropdownModule } from '@taiga-ui/core';\nimport * as i2 from '@tinkoff/tui-editor/components/toolbar-tools';\nimport { TuiTableMergeCellsModule, TuiTableCellColorModule, TuiTableRowColumnManagerModule, TuiTableCreateModule, TuiFontSizeModule, TuiFontStyleModule, TuiAlignContentModule, TuiListConfigsModule, TuiTextColorModule, TuiHighlightColorModule, TuiCodeModule, TuiDetailsModule, TuiEditorToolGroup } from '@tinkoff/tui-editor/components/toolbar-tools';\nimport * as i3 from '@tinkoff/tui-editor/components/edit-link';\nimport { TuiEditLinkModule } from '@tinkoff/tui-editor/components/edit-link';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i7 from '@tinkoff/tui-editor/abstract';\nimport * as i8 from 'rxjs';\nconst _c0 = [\"dropdown\"];\nconst _c1 = [\"*\"];\nfunction TuiToolbarComponent_ng_container_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0);\n }\n}\nfunction TuiToolbarComponent_section_5_div_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 14)(1, \"button\", 15);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_1_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.undo());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(2, \"button\", 16);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_1_Template_button_click_2_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.redo());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"disabled\", ctx_r1.undoDisabled)(\"focusable\", false)(\"icon\", ctx_r1.options.icons.undo)(\"tuiHint\", texts_r3.undo);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"disabled\", ctx_r1.redoDisabled)(\"focusable\", false)(\"icon\", ctx_r1.options.icons.redo)(\"tuiHint\", texts_r3.redo);\n }\n}\nfunction TuiToolbarComponent_section_5_div_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵelement(1, \"tui-font-size\", 17);\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_font_style_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-font-style\", 23);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"enabledTools\", ctx_r1.toolsSet);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_align_content_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-align-content\", 17);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_list_configs_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-list-configs\", 17);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 24, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_3_button_4_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.toggleQuote());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"disabled\", ctx_r1.unorderedList || ctx_r1.orderedList)(\"focusable\", false)(\"icon\", ctx_r1.options.icons.quote)(\"pseudoActive\", ctx_r1.blockquote)(\"tuiHint\", texts_r3.quote);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r5 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-edit-link\", 27, 3);\n i0.ɵɵlistener(\"addLink\", function TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_ng_template_4_Template_tui_edit_link_addLink_0_listener($event) {\n i0.ɵɵrestoreView(_r5);\n i0.ɵɵnextContext();\n const link_r6 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onLink(link_r6, $event));\n })(\"removeLink\", function TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_ng_template_4_Template_tui_edit_link_removeLink_0_listener() {\n i0.ɵɵrestoreView(_r5);\n i0.ɵɵnextContext();\n const link_r6 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onLink(link_r6));\n });\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 25, 1);\n i0.ɵɵelement(2, \"button\", 26, 0);\n i0.ɵɵtemplate(4, TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_ng_template_4_Template, 2, 0, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const link_r6 = i0.ɵɵreference(1);\n const linkDropdown_r7 = i0.ɵɵreference(5);\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"canOpen\", ctx_r1.canOpenAnchor)(\"content\", linkDropdown_r7);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", link_r6.open)(\"icon\", ctx_r1.options.icons.link)(\"pseudoActive\", link_r6.open || ctx_r1.a)(\"tuiHint\", texts_r3.link);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r8 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-edit-link\", 30);\n i0.ɵɵlistener(\"addLink\", function TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_ng_template_3_Template_tui_edit_link_addLink_0_listener($event) {\n i0.ɵɵrestoreView(_r8);\n i0.ɵɵnextContext();\n const anchor_r9 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.setAnchor(anchor_r9, $event));\n })(\"removeLink\", function TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_ng_template_3_Template_tui_edit_link_removeLink_0_listener() {\n i0.ɵɵrestoreView(_r8);\n const ctx_r1 = i0.ɵɵnextContext(4);\n return i0.ɵɵresetView(ctx_r1.removeAnchor());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"anchorMode\", true);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"tui-hosted-dropdown\", 28, 4);\n i0.ɵɵelement(2, \"button\", 29);\n i0.ɵɵtemplate(3, TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_ng_template_3_Template, 1, 1, \"ng-template\", null, 5, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const anchor_r9 = i0.ɵɵreference(1);\n const anchorDropdown_r10 = i0.ɵɵreference(4);\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"canOpen\", ctx_r1.canOpenAnchor)(\"content\", anchorDropdown_r10);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.anchor)(\"pseudoActive\", anchor_r9.open || ctx_r1.jumpAnchor)(\"tuiHint\", texts_r3.insertAnchor);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_ng_container_7_Template(rf, ctx) {\n if (rf & 1) {\n const _r11 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵelementStart(1, \"button\", 31, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_3_ng_container_7_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r11);\n const fileUpload_r12 = i0.ɵɵreference(4);\n return i0.ɵɵresetView(fileUpload_r12.click());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"input\", 32, 6);\n i0.ɵɵlistener(\"change\", function TuiToolbarComponent_section_5_div_3_ng_container_7_Template_input_change_3_listener() {\n i0.ɵɵrestoreView(_r11);\n const fileUpload_r12 = i0.ɵɵreference(4);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onAttach(fileUpload_r12));\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.attach)(\"tuiHint\", texts_r3.attach);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"accept\", ctx_r1.attachOptions.accept)(\"multiple\", ctx_r1.attachOptions.multiple)(\"tuiFocusable\", false);\n }\n}\nfunction TuiToolbarComponent_section_5_div_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵtemplate(1, TuiToolbarComponent_section_5_div_3_tui_font_style_1_Template, 1, 1, \"tui-font-style\", 18)(2, TuiToolbarComponent_section_5_div_3_tui_align_content_2_Template, 1, 0, \"tui-align-content\", 19)(3, TuiToolbarComponent_section_5_div_3_tui_list_configs_3_Template, 1, 0, \"tui-list-configs\", 19)(4, TuiToolbarComponent_section_5_div_3_button_4_Template, 2, 5, \"button\", 20)(5, TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_Template, 6, 6, \"tui-hosted-dropdown\", 21)(6, TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_Template, 5, 6, \"tui-hosted-dropdown\", 22)(7, TuiToolbarComponent_section_5_div_3_ng_container_7_Template, 5, 6, \"ng-container\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.formatEnabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Align));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.List));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Quote));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Link));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Anchor));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Attach));\n }\n}\nfunction TuiToolbarComponent_section_5_div_4_button_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r13 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 34, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_4_button_1_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r13);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.toggleSubscript());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.sub)(\"pseudoActive\", ctx_r1.subscript)(\"tuiHint\", texts_r3.subscript);\n }\n}\nfunction TuiToolbarComponent_section_5_div_4_button_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r14 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 34, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_4_button_2_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r14);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.toggleSuperscript());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.sup)(\"pseudoActive\", ctx_r1.superscript)(\"tuiHint\", texts_r3.superscript);\n }\n}\nfunction TuiToolbarComponent_section_5_div_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵtemplate(1, TuiToolbarComponent_section_5_div_4_button_1_Template, 2, 4, \"button\", 33)(2, TuiToolbarComponent_section_5_div_4_button_2_Template, 2, 4, \"button\", 33);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Sub));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Sup));\n }\n}\nfunction TuiToolbarComponent_section_5_div_5_tui_text_color_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-text-color\", 36);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"colors\", ctx_r1.colors);\n }\n}\nfunction TuiToolbarComponent_section_5_div_5_tui_highlight_color_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-highlight-color\", 36);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"colors\", ctx_r1.colors);\n }\n}\nfunction TuiToolbarComponent_section_5_div_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵtemplate(1, TuiToolbarComponent_section_5_div_5_tui_text_color_1_Template, 1, 1, \"tui-text-color\", 35)(2, TuiToolbarComponent_section_5_div_5_tui_highlight_color_2_Template, 1, 1, \"tui-highlight-color\", 35);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Color));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Hilite));\n }\n}\nfunction TuiToolbarComponent_section_5_div_6_tui_code_1_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-code\", 17);\n }\n}\nfunction TuiToolbarComponent_section_5_div_6_button_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r15 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 40, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_6_button_2_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r15);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onTeX());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.tex)(\"tuiHint\", texts_r3.tex);\n }\n}\nfunction TuiToolbarComponent_section_5_div_6_div_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r16 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 41)(1, \"button\", 42, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_6_div_3_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r16);\n const image_r17 = i0.ɵɵreference(4);\n return i0.ɵɵresetView(image_r17.click());\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"input\", 43, 7);\n i0.ɵɵlistener(\"change\", function TuiToolbarComponent_section_5_div_6_div_3_Template_input_change_3_listener() {\n i0.ɵɵrestoreView(_r16);\n const image_r17 = i0.ɵɵreference(4);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onImage(image_r17));\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.image)(\"tuiHint\", texts_r3.image);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"tuiFocusable\", false);\n }\n}\nfunction TuiToolbarComponent_section_5_div_6_button_4_Template(rf, ctx) {\n if (rf & 1) {\n const _r18 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"button\", 31, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_6_button_4_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r18);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.insertHorizontalRule());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext(2).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.hr)(\"tuiHint\", texts_r3.insertHorizontalRule);\n }\n}\nfunction TuiToolbarComponent_section_5_div_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵtemplate(1, TuiToolbarComponent_section_5_div_6_tui_code_1_Template, 1, 0, \"tui-code\", 19)(2, TuiToolbarComponent_section_5_div_6_button_2_Template, 2, 3, \"button\", 37)(3, TuiToolbarComponent_section_5_div_6_div_3_Template, 5, 4, \"div\", 38)(4, TuiToolbarComponent_section_5_div_6_button_4_Template, 2, 3, \"button\", 39);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Code));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Tex));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Img));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.HR));\n }\n}\nfunction TuiToolbarComponent_section_5_div_7_Template(rf, ctx) {\n if (rf & 1) {\n const _r19 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 14)(1, \"button\", 31, 0);\n i0.ɵɵlistener(\"click\", function TuiToolbarComponent_section_5_div_7_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r19);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.removeFormat());\n });\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const texts_r3 = i0.ɵɵnextContext().ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"focusable\", false)(\"icon\", ctx_r1.options.icons.clear)(\"tuiHint\", texts_r3.clear);\n }\n}\nfunction TuiToolbarComponent_section_5_div_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵelement(1, \"tui-details\", 44)(2, \"tui-details-remove\", 44);\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiToolbarComponent_section_5_div_9_tui_table_cell_color_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"tui-table-cell-color\", 36);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"colors\", ctx_r1.colors);\n }\n}\nfunction TuiToolbarComponent_section_5_div_9_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵelement(1, \"tui-editor-group-tool\", 44);\n i0.ɵɵtemplate(2, TuiToolbarComponent_section_5_div_9_tui_table_cell_color_2_Template, 1, 1, \"tui-table-cell-color\", 35);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", !ctx_r1.enabled(ctx_r1.editorTool.Table));\n }\n}\nfunction TuiToolbarComponent_section_5_div_10_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 14);\n i0.ɵɵelement(1, \"tui-table-create\", 44)(2, \"tui-table-row-column-manager\", 44)(3, \"tui-table-merge-cells\", 44)(4, \"tui-table-cell-color\", 36);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance(4);\n i0.ɵɵproperty(\"colors\", ctx_r1.colors);\n }\n}\nfunction TuiToolbarComponent_section_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"section\", 12);\n i0.ɵɵtemplate(1, TuiToolbarComponent_section_5_div_1_Template, 3, 8, \"div\", 13)(2, TuiToolbarComponent_section_5_div_2_Template, 2, 0, \"div\", 13)(3, TuiToolbarComponent_section_5_div_3_Template, 8, 7, \"div\", 13)(4, TuiToolbarComponent_section_5_div_4_Template, 3, 2, \"div\", 13)(5, TuiToolbarComponent_section_5_div_5_Template, 3, 2, \"div\", 13)(6, TuiToolbarComponent_section_5_div_6_Template, 5, 4, \"div\", 13)(7, TuiToolbarComponent_section_5_div_7_Template, 3, 3, \"div\", 13)(8, TuiToolbarComponent_section_5_div_8_Template, 3, 0, \"div\", 13)(9, TuiToolbarComponent_section_5_div_9_Template, 3, 1, \"div\", 13)(10, TuiToolbarComponent_section_5_div_10_Template, 5, 1, \"div\", 13);\n i0.ɵɵelementStart(11, \"div\", 14);\n i0.ɵɵprojection(12);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Undo));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Size));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.firstBigBlockEnabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Sub) || ctx_r1.enabled(ctx_r1.editorTool.Sup));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Color) || ctx_r1.enabled(ctx_r1.editorTool.Hilite));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.secondBigBlockEnabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Clear));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Details));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Group));\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.enabled(ctx_r1.editorTool.Table));\n }\n}\nlet TuiToolbarNavigationManagerDirective = /*#__PURE__*/(() => {\n class TuiToolbarNavigationManagerDirective {\n constructor(el) {\n this.el = el;\n }\n get toolsContainers() {\n return Array.from(this.el.nativeElement.querySelectorAll('[tuiItem]'));\n }\n onHorizontalNavigation(toPrevious) {\n const {\n toolsContainers\n } = this;\n const focusedToolIndex = toolsContainers.findIndex(tuiIsNativeFocusedIn);\n const targetToolIndex = tuiClamp(focusedToolIndex + (toPrevious ? -1 : 1), 0, toolsContainers.length - 1);\n const targetToolWrapper = toolsContainers[targetToolIndex];\n const targetTool = toPrevious ? this.findPreviousTool(targetToolWrapper) : this.findNextTool(targetToolWrapper);\n if (targetTool) {\n targetTool.focus();\n }\n }\n findFirstFocusableTool(reversed = false) {\n const tools = reversed ? this.toolsContainers.slice().reverse() : this.toolsContainers;\n for (const el of tools) {\n const focusableElement = tuiIsNativeMouseFocusable(el) ? el : tuiGetClosestFocusable({\n initial: el,\n root: el,\n keyboard: false\n });\n if (focusableElement) {\n return focusableElement;\n }\n }\n return null;\n }\n findPreviousTool(wrapper) {\n if (tuiIsNativeMouseFocusable(wrapper)) {\n return wrapper;\n }\n const lookedInside = tuiGetClosestFocusable({\n initial: wrapper,\n root: wrapper,\n keyboard: false\n });\n return lookedInside || tuiGetClosestFocusable({\n initial: wrapper,\n root: this.el.nativeElement,\n previous: true,\n keyboard: false\n });\n }\n findNextTool(wrapper) {\n return tuiIsNativeMouseFocusable(wrapper) ? wrapper : tuiGetClosestFocusable({\n initial: wrapper,\n root: this.el.nativeElement,\n keyboard: false\n });\n }\n }\n TuiToolbarNavigationManagerDirective.ɵfac = function TuiToolbarNavigationManagerDirective_Factory(t) {\n return new (t || TuiToolbarNavigationManagerDirective)(i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiToolbarNavigationManagerDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiToolbarNavigationManagerDirective,\n selectors: [[\"\", \"tuiToolbarNavigationManager\", \"\"]],\n hostBindings: function TuiToolbarNavigationManagerDirective_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"keydown.arrowRight.prevent\", function TuiToolbarNavigationManagerDirective_keydown_arrowRight_prevent_HostBindingHandler() {\n return ctx.onHorizontalNavigation(false);\n })(\"keydown.arrowLeft.prevent\", function TuiToolbarNavigationManagerDirective_keydown_arrowLeft_prevent_HostBindingHandler() {\n return ctx.onHorizontalNavigation(true);\n });\n }\n }\n });\n return TuiToolbarNavigationManagerDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiToolbarComponent = /*#__PURE__*/(() => {\n class TuiToolbarComponent {\n constructor(el, editor, imageLoader, attachOptions, filesLoader, texts$, options, destroy$) {\n this.el = el;\n this.editor = editor;\n this.imageLoader = imageLoader;\n this.attachOptions = attachOptions;\n this.filesLoader = filesLoader;\n this.texts$ = texts$;\n this.options = options;\n this.destroy$ = destroy$;\n this.dropdowns = EMPTY_QUERY;\n this.colors = this.options.colors;\n this.disabled = false;\n this.linkAdded = new EventEmitter();\n this.texClicked = new EventEmitter();\n this.fileAttached = new EventEmitter();\n this.editorTool = TuiEditorTool;\n this.toolsSet = new Set(defaultEditorTools);\n }\n set tools(value) {\n this.toolsSet = new Set(value);\n }\n get focused() {\n return tuiIsNativeFocusedIn(this.el.nativeElement) || !!this.dropdowns.find(({\n nativeElement\n }) => tuiIsNativeFocusedIn(nativeElement));\n }\n get focusable() {\n return !this.focused && !this.disabled;\n }\n get unorderedList() {\n return this.editor.isActive('bulletList');\n }\n get orderedList() {\n return this.editor.isActive('orderedList');\n }\n get blockquote() {\n return this.editor.isActive('blockquote');\n }\n get a() {\n return this.editor.isActive('link');\n }\n get jumpAnchor() {\n return this.editor.isActive('jumpAnchor');\n }\n get canOpenAnchor() {\n return !this.a && !this.jumpAnchor;\n }\n get undoDisabled() {\n return this.editor.undoDisabled();\n }\n get redoDisabled() {\n return this.editor.redoDisabled();\n }\n get subscript() {\n return this.editor.isActive('subscript');\n }\n get superscript() {\n return this.editor.isActive('superscript');\n }\n get formatEnabled() {\n return this.enabled(TuiEditorTool.Bold) || this.enabled(TuiEditorTool.Italic) || this.enabled(TuiEditorTool.Underline) || this.enabled(TuiEditorTool.Strikethrough);\n }\n get firstBigBlockEnabled() {\n return this.formatEnabled || this.enabled(TuiEditorTool.Align) || this.enabled(TuiEditorTool.List) || this.enabled(TuiEditorTool.Quote) || this.enabled(TuiEditorTool.Link) || this.enabled(TuiEditorTool.Anchor) || this.enabled(TuiEditorTool.Attach);\n }\n get secondBigBlockEnabled() {\n return this.enabled(TuiEditorTool.Code) || this.enabled(TuiEditorTool.Tex) || this.enabled(TuiEditorTool.Img) || this.enabled(TuiEditorTool.HR);\n }\n onMouseDown(event, target) {\n if (target.closest('button')) {\n return;\n }\n event.preventDefault();\n this.editor.focus();\n }\n onBottomFocus() {\n this.focusLast();\n }\n onTopFocus() {\n this.focusFirst();\n }\n onImage(input) {\n var _a;\n const file = (_a = input.files) === null || _a === void 0 ? void 0 : _a[0];\n input.value = '';\n if (!file) {\n return;\n }\n this.imageLoader(file).pipe(take(1), takeUntil(this.destroy$)).subscribe(image => this.addImage(image));\n }\n onAttach(input) {\n var _a;\n const files = Array.from(input.files || []);\n input.value = '';\n if (!files) {\n return;\n }\n ngDevMode && tuiAssert.assert(!!this.filesLoader, 'Please provide TUI_ATTACH_FILES_LOADER');\n (_a = this.filesLoader) === null || _a === void 0 ? void 0 : _a.call(this, files).pipe(take(1), takeUntil(this.destroy$)).subscribe(attachedFiles => this.fileAttached.emit(attachedFiles));\n }\n onTeX() {\n this.texClicked.emit();\n }\n onLink(hosted, url) {\n hosted.open = false;\n if (url) {\n this.editor.toggleLink(url);\n }\n }\n setAnchor(hosted, anchor) {\n hosted.open = false;\n if (anchor) {\n this.editor.setAnchor(anchor);\n this.editor.selectClosest();\n }\n }\n removeAnchor() {\n this.editor.removeAnchor();\n }\n enabled(tool) {\n return this.toolsSet.has(tool);\n }\n undo() {\n this.editor.undo();\n }\n redo() {\n this.editor.redo();\n }\n insertHorizontalRule() {\n this.editor.setHorizontalRule();\n }\n removeFormat() {\n this.editor.removeFormat();\n }\n toggleOrderedList() {\n this.editor.toggleOrderedList();\n }\n toggleQuote() {\n this.editor.toggleBlockquote();\n }\n toggleSubscript() {\n this.editor.toggleSubscript();\n }\n toggleSuperscript() {\n this.editor.toggleSuperscript();\n }\n addImage(image) {\n this.editor.setImage(image);\n }\n focusFirst() {\n var _a;\n const firstButton = (_a = this.navigationManager) === null || _a === void 0 ? void 0 : _a.findFirstFocusableTool();\n if (firstButton) {\n firstButton.focus();\n }\n }\n focusLast() {\n var _a;\n const lastButton = (_a = this.navigationManager) === null || _a === void 0 ? void 0 : _a.findFirstFocusableTool(true);\n if (lastButton) {\n lastButton.focus();\n }\n }\n }\n TuiToolbarComponent.ɵfac = function TuiToolbarComponent_Factory(t) {\n return new (t || TuiToolbarComponent)(i0.ɵɵdirectiveInject(ElementRef, 8), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_IMAGE_LOADER), i0.ɵɵdirectiveInject(TUI_ATTACH_FILES_OPTIONS), i0.ɵɵdirectiveInject(TUI_ATTACH_FILES_LOADER, 8), i0.ɵɵdirectiveInject(TUI_EDITOR_TOOLBAR_TEXTS), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(TuiDestroyService, 2));\n };\n TuiToolbarComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiToolbarComponent,\n selectors: [[\"tui-toolbar\"]],\n viewQuery: function TuiToolbarComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TuiToolbarNavigationManagerDirective, 5);\n i0.ɵɵviewQuery(_c0, 5, ElementRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.navigationManager = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dropdowns = _t);\n }\n },\n hostAttrs: [\"role\", \"toolbar\"],\n hostVars: 2,\n hostBindings: function TuiToolbarComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"mousedown\", function TuiToolbarComponent_mousedown_HostBindingHandler($event) {\n return ctx.onMouseDown($event, $event.target);\n });\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"_disabled\", ctx.disabled);\n }\n },\n inputs: {\n colors: \"colors\",\n disabled: \"disabled\",\n tools: \"tools\"\n },\n outputs: {\n linkAdded: \"linkAdded\",\n texClicked: \"texClicked\",\n fileAttached: \"fileAttached\"\n },\n features: [i0.ɵɵProvidersFeature([TuiDestroyService])],\n ngContentSelectors: _c1,\n decls: 7,\n vars: 8,\n consts: [[\"button\", \"\"], [\"link\", \"\"], [\"linkDropdown\", \"\"], [\"dropdown\", \"\"], [\"anchor\", \"\"], [\"anchorDropdown\", \"\"], [\"fileUpload\", \"\"], [\"image\", \"\"], [\"type\", \"button\", 1, \"t-prevent-parent-label-behavior\"], [4, \"ngIf\"], [3, \"focus\", \"tuiFocusable\"], [\"tuiToolbarNavigationManager\", \"\", \"class\", \"t-tools-wrapper\", 4, \"ngIf\"], [\"tuiToolbarNavigationManager\", \"\", 1, \"t-tools-wrapper\"], [\"class\", \"t-block\", 4, \"ngIf\"], [1, \"t-block\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__undo-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", \"t-tool_margin\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"tuiHint\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__redo-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", \"t-tool_margin\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"tuiHint\"], [\"tuiItem\", \"\", 1, \"t-tool\", \"t-wrapper\"], [\"tuiItem\", \"\", \"class\", \"t-tool t-wrapper\", 3, \"enabledTools\", 4, \"ngIf\"], [\"tuiItem\", \"\", \"class\", \"t-tool t-wrapper\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__quote-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", \"class\", \"t-tool t-tool_margin\", 3, \"disabled\", \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"tuiItem\", \"\", \"class\", \"t-wrapper\", 3, \"canOpen\", \"content\", 4, \"ngIf\"], [\"class\", \"t-wrapper\", 3, \"canOpen\", \"content\", 4, \"ngIf\"], [\"tuiItem\", \"\", 1, \"t-tool\", \"t-wrapper\", 3, \"enabledTools\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__quote-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", \"t-tool_margin\", 3, \"click\", \"disabled\", \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"tuiItem\", \"\", 1, \"t-wrapper\", 3, \"canOpen\", \"content\"], [\"appearance\", \"icon\", \"automation-id\", \"toolbar__link-button\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-tool\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [3, \"addLink\", \"removeLink\"], [1, \"t-wrapper\", 3, \"canOpen\", \"content\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [3, \"addLink\", \"removeLink\", \"anchorMode\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", \"t-tool_margin\", 3, \"click\", \"focusable\", \"icon\", \"tuiHint\"], [\"type\", \"file\", 1, \"t-file-upload\", 3, \"change\", \"accept\", \"multiple\", \"tuiFocusable\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", \"class\", \"t-tool t-tool_margin\", 3, \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", \"t-tool_margin\", 3, \"click\", \"focusable\", \"icon\", \"pseudoActive\", \"tuiHint\"], [\"tuiItem\", \"\", \"class\", \"t-tool t-wrapper\", 3, \"colors\", 4, \"ngIf\"], [\"tuiItem\", \"\", 1, \"t-tool\", \"t-wrapper\", 3, \"colors\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", \"class\", \"t-tool\", 3, \"focusable\", \"icon\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"tuiItem\", \"\", \"class\", \"t-wrapper\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", \"class\", \"t-tool t-tool_margin\", 3, \"focusable\", \"icon\", \"tuiHint\", \"click\", 4, \"ngIf\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"tuiItem\", \"\", \"type\", \"button\", 1, \"t-tool\", 3, \"click\", \"focusable\", \"icon\", \"tuiHint\"], [\"tuiItem\", \"\", 1, \"t-wrapper\"], [\"appearance\", \"icon\", \"size\", \"s\", \"tuiHintDescribe\", \"\", \"tuiHintDirection\", \"top-left\", \"tuiIconButton\", \"\", \"type\", \"button\", 1, \"t-tool\", 3, \"click\", \"focusable\", \"icon\", \"tuiHint\"], [\"accept\", \"image/*\", \"type\", \"file\", 1, \"t-image\", 3, \"change\", \"tuiFocusable\"], [\"tuiItem\", \"\", 1, \"t-tool\", \"t-tool_margin\"]],\n template: function TuiToolbarComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelement(0, \"button\", 8);\n i0.ɵɵtemplate(1, TuiToolbarComponent_ng_container_1_Template, 1, 0, \"ng-container\", 9);\n i0.ɵɵpipe(2, \"async\");\n i0.ɵɵelementStart(3, \"div\", 10);\n i0.ɵɵlistener(\"focus\", function TuiToolbarComponent_Template_div_focus_3_listener() {\n return ctx.onTopFocus();\n });\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(4, \"div\", 10);\n i0.ɵɵlistener(\"focus\", function TuiToolbarComponent_Template_div_focus_4_listener() {\n return ctx.onBottomFocus();\n });\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(5, TuiToolbarComponent_section_5_Template, 13, 10, \"section\", 11);\n i0.ɵɵpipe(6, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(2, 4, ctx.editor.stateChange$));\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"tuiFocusable\", ctx.focusable);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"tuiFocusable\", ctx.focusable);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(6, 6, ctx.texts$));\n }\n },\n dependencies: [i1.TuiButtonComponent, i2.TuiFontSizeComponent, i2.TuiFontStyleComponent, i2.TuiAlignContentComponent, i2.TuiListConfigsComponent, i1.TuiHostedDropdownComponent, i3.TuiEditLinkComponent, i2.TuiTextColorComponent, i2.TuiHighlightColorComponent, i2.TuiCodeComponent, i2.TuiDetailsComponent, i2.TuiDetailsRemoveComponent, i2.TuiEditorGroupToolComponent, i2.TuiTableCellColorComponent, i2.TuiTableCreateComponent, i2.TuiTableRowColumnManagerComponent, i2.TuiTableMergeCellsComponent, i4.NgIf, i5.TuiFocusableDirective, TuiToolbarNavigationManagerDirective, i1.TuiHintDescribeDirective, i5.TuiItemDirective, i1.TuiHintDirective, i1.TuiHintDriverDirective, i1.TuiHintHoverDirective, i1.TuiHintPositionDirective, i4.AsyncPipe],\n styles: [\".t-tools-wrapper[_ngcontent-%COMP%]{scrollbar-width:none;-ms-overflow-style:none;position:-webkit-sticky;position:sticky;top:0;display:flex;padding:.25rem .75rem;overflow:auto;flex-wrap:wrap;box-shadow:0 .125rem .1875rem #0000001a}.t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar, .t-tools-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{display:none}.t-tools-wrapper._disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:var(--tui-disabled-opacity)}.t-block[_ngcontent-%COMP%]{display:flex;padding:.25rem 0}.t-block[_ngcontent-%COMP%]:not(:last-child):after{content:\\\"\\\";display:block;margin:0 .25rem;width:1px;background:var(--tui-secondary-active)}.t-tool[_ngcontent-%COMP%]{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}button.t-tool[_ngcontent-%COMP%]:hover, .t-tool[_ngcontent-%COMP%] button:hover{background:var(--tui-secondary-hover)}.t-tool_margin[_ngcontent-%COMP%]{margin:0 .25rem}.t-dropdown[_ngcontent-%COMP%]{padding:.75rem}.t-wrapper[_ngcontent-%COMP%]{position:relative;margin:0 .25rem}.t-plate[_ngcontent-%COMP%]{position:absolute;top:1.375rem;left:.25rem;width:1.5rem;height:.25rem;pointer-events:none}.t-plate_paint[_ngcontent-%COMP%]{left:.375rem;width:1.25rem}.t-font[_ngcontent-%COMP%]{padding:.3em 0;outline:none;width:100%;pointer-events:none}.t-image[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;font-size:0;opacity:0;cursor:pointer}.t-image[_ngcontent-%COMP%]::-webkit-file-upload-button{display:none}.t-file-upload[_ngcontent-%COMP%]{display:none}.t-color-picker[_ngcontent-%COMP%] tui-hosted-dropdown, .t-color-picker[_ngcontent-%COMP%] tui-color-picker, .t-color-picker[_ngcontent-%COMP%] tui-color-edit{display:none}.t-prevent-parent-label-behavior[_ngcontent-%COMP%]{display:none}\"],\n changeDetection: 0\n });\n return TuiToolbarComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiToolbarModule = /*#__PURE__*/(() => {\n class TuiToolbarModule {}\n TuiToolbarModule.ɵfac = function TuiToolbarModule_Factory(t) {\n return new (t || TuiToolbarModule)();\n };\n TuiToolbarModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiToolbarModule\n });\n TuiToolbarModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[CommonModule, TuiHintModule, TuiFocusableModule, TuiButtonModule, TuiHostedDropdownModule, TuiEditLinkModule, TuiTableMergeCellsModule, TuiTableCellColorModule, TuiTableRowColumnManagerModule, TuiTableCreateModule, TuiFontSizeModule, TuiFontStyleModule, TuiAlignContentModule, TuiListConfigsModule, TuiTextColorModule, TuiHighlightColorModule, TuiCodeModule, TuiDetailsModule, TuiItemModule, TuiEditorToolGroup]]\n });\n return TuiToolbarModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiToolbarComponent, TuiToolbarModule, TuiToolbarNavigationManagerDirective };\n","import { DOCUMENT } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { SecurityContext, ElementRef, Renderer2, Sanitizer, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Optional, Input, HostListener, NgModule } from '@angular/core';\nimport { tuiIsElement } from '@taiga-ui/cdk';\nimport { TUI_SANITIZER } from '@taiga-ui/core';\nimport * as i1 from '@tinkoff/tui-editor/directives/tiptap-editor';\nimport { TuiTiptapEditorDirective } from '@tinkoff/tui-editor/directives/tiptap-editor';\nimport { TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nlet TuiEditorSocketComponent = /*#__PURE__*/(() => {\n class TuiEditorSocketComponent {\n constructor(el, renderer, sanitizer, tuiSanitizer, document, editor, options) {\n this.el = el;\n this.renderer = renderer;\n this.sanitizer = sanitizer;\n this.tuiSanitizer = tuiSanitizer;\n this.document = document;\n this.editor = editor;\n this.options = options;\n }\n set content(content) {\n var _a;\n this.renderer.setProperty(this.el.nativeElement, 'innerHTML', this.tuiSanitizer ? this.tuiSanitizer.sanitize(SecurityContext.HTML, (_a = content === null || content === void 0 ? void 0 : content.replace(/colwidth/g, 'width')) !== null && _a !== void 0 ? _a : '') : this.sanitizer.sanitize(SecurityContext.HTML, content !== null && content !== void 0 ? content : ''));\n }\n /**\n * @description:\n * the main problem is that the external environment editor can use different base href=\"../\"\n * More information: https://rogerkeays.com/blog/using-base-href-with-anchors\n */\n click(event) {\n var _a, _b;\n if (this.editor || !tuiIsElement(event.target)) {\n return;\n }\n const href = ((_b = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest('a')) === null || _b === void 0 ? void 0 : _b.getAttribute('href')) || '';\n if (!href.startsWith('#')) {\n return;\n }\n this.document.location.hash = href.replace('#', '');\n event.preventDefault();\n }\n }\n TuiEditorSocketComponent.ɵfac = function TuiEditorSocketComponent_Factory(t) {\n return new (t || TuiEditorSocketComponent)(i0.ɵɵdirectiveInject(ElementRef), i0.ɵɵdirectiveInject(Renderer2), i0.ɵɵdirectiveInject(Sanitizer), i0.ɵɵdirectiveInject(TUI_SANITIZER, 8), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(TuiTiptapEditorDirective, 8), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS));\n };\n TuiEditorSocketComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiEditorSocketComponent,\n selectors: [[\"tui-editor-socket\"]],\n hostVars: 2,\n hostBindings: function TuiEditorSocketComponent_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function TuiEditorSocketComponent_click_HostBindingHandler($event) {\n return ctx.click($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"tui-editor-socket\", ctx.options.enableDefaultStyles);\n }\n },\n inputs: {\n content: \"content\"\n },\n decls: 0,\n vars: 0,\n template: function TuiEditorSocketComponent_Template(rf, ctx) {},\n styles: [\".tui-editor-socket{display:block;margin:0;color:var(--tui-text-01);font:var(--tui-font-text-m)}.tui-editor-socket[tuiTiptapEditor]{overflow:hidden}.tui-editor-socket .ProseMirror{min-height:5.375rem;padding:.2rem 1rem;outline:none;white-space:pre-wrap}.tui-editor-socket .resize-cursor{cursor:ew-resize;cursor:col-resize}.tui-editor-socket h1,.tui-editor-socket h2,.tui-editor-socket h3,.tui-editor-socket h4,.tui-editor-socket h5,.tui-editor-socket h6{word-break:break-word;line-height:normal}.tui-editor-socket h1:first-child,.tui-editor-socket h2:first-child,.tui-editor-socket p:last-child{margin-bottom:0}.tui-editor-socket p:last-child,.tui-editor-socket pre:last-child{margin-bottom:0}.tui-editor-socket p:empty:after{content:\\\" \\\";white-space:pre}.tui-editor-socket p:first-child{margin-top:0;min-width:1px}.tui-editor-socket p{margin:1rem 0}.tui-editor-socket p>span{line-height:initial}.tui-editor-socket blockquote{margin:1.25rem 0 1.25rem 1.5rem;padding-left:1.0625rem;border-left:1px solid var(--tui-base-04)}.tui-editor-socket hr{border:none;border-top:1px solid var(--tui-base-03);margin:1rem 0}.tui-editor-socket mark{background:unset;color:inherit}.tui-editor-socket font[face=\\\"Courier New\\\"]{display:inline-block;padding:.25rem .5rem;border-radius:.25rem;background-color:#ecf1f7;word-break:break-word}.tui-editor-socket a:not([data-type=\\\"jump-anchor\\\"]){color:var(--tui-link);text-decoration:none;outline:none}.tui-editor-socket a:not([data-type=\\\"jump-anchor\\\"]):hover{color:var(--tui-link-hover);text-decoration:underline}.tui-editor-socket a:not([data-type=\\\"jump-anchor\\\"]):active{color:var(--tui-primary-active)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]{text-decoration:underline;-webkit-text-decoration-color:var(--tui-link);text-decoration-color:var(--tui-link)}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:before{content:\\\"#\\\"}.tui-editor-socket .ProseMirror a[data-type=jump-anchor]:hover{color:var(--tui-link)}.tui-editor-socket .ProseMirror a:hover img[contenteditable=false]{cursor:pointer;outline:.25rem solid var(--tui-link)}.tui-editor-socket ul:not([data-type]),.tui-editor-socket ol:not([data-type]){list-style-type:none;margin:1rem 1rem 1rem 1.5rem;padding:0}.tui-editor-socket ul:not([data-type]) li,.tui-editor-socket ol:not([data-type]) li{margin:.75rem 0}.tui-editor-socket ul:not([data-type]) li>p,.tui-editor-socket ol:not([data-type]) li>p{display:inline;margin:0 auto;word-break:break-word}.tui-editor-socket ul:not([data-type]) li:before,.tui-editor-socket ol:not([data-type]) li:before{unicode-bidi:-webkit-isolate;unicode-bidi:isolate;font-feature-settings:\\\"tnum\\\";font-variant-numeric:tabular-nums;text-transform:none;text-indent:0;text-align:start;text-align-last:start}.tui-editor-socket ul:not([data-type]) li>p{display:block}.tui-editor-socket ul:not([data-type])>li:before{content:\\\"\\\";display:inline-block;width:.5rem;height:.5rem;border-radius:100%;margin:.5rem .875rem .0625rem -1.375rem;background-color:var(--tui-primary);vertical-align:top;box-sizing:border-box;float:left}.tui-editor-socket li ul:not([data-type])>li:before{background:none;border:.125rem solid var(--tui-primary)}.tui-editor-socket li ul:not([data-type])>li>ul:not([data-type])>li:before{background:var(--tui-primary);border-radius:0;width:.375rem;height:.375rem}.tui-editor-socket ol:not([data-type]){counter-reset:item}.tui-editor-socket ol:not([data-type])>li:before{content:counters(item,\\\".\\\") \\\".\\\";display:block;counter-increment:item;margin:0 .75rem 0 -1.5rem;color:var(--tui-base-05);vertical-align:top;float:left;white-space:nowrap}.tui-editor-socket [data-type=details-content] ol{counter-reset:details-item}.tui-editor-socket [data-type=details-content] ol:not([data-type])>li:before{content:counters(details-item,\\\".\\\") \\\".\\\";counter-increment:details-item}.tui-editor-socket [data-type=details-content] ol [data-type=details-content] ol{counter-reset:details-item2}.tui-editor-socket [data-type=details-content] ol:not([data-type])>li [data-type=details-content] ol:not([data-type])>li:before{content:counters(details-item2,\\\".\\\") \\\".\\\";counter-increment:details-item2}.tui-editor-socket ul[data-type] li[data-checked]{display:flex;grid-gap:.5rem;gap:.5rem}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]{position:relative;width:var(--t-size, 1rem);height:var(--t-size, 1rem);border-radius:var(--tui-radius-xs, .25rem);transition-property:color,background,opacity,box-shadow,border;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:.125rem solid transparent;outline-offset:-.125rem;margin-top:.25rem;cursor:pointer}.tui-editor-socket ul[data-type] li[data-checked]>label>input[type=checkbox]:before{content:\\\"\\\";position:absolute;top:0;left:0;width:100%;height:100%;background:currentColor;-webkit-mask:url('data:image/svg+xml,') center / 100%;mask:url('data:image/svg+xml,') center / 100%;transform:scale(0);transition:transform var(--tui-duration) ease-in-out,mask 0s var(--tui-duration) ease-in-out,-webkit-mask 0s var(--tui-duration) ease-in-out}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked{background:var(--tui-primary, #526ed3);color:var(--tui-primary-text, #fff)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]:checked:before{-webkit-mask-image:url('data:image/svg+xml,');mask-image:url('data:image/svg+xml,');transform:scale(1)}.tui-editor-socket ul[data-type] li>label>input[type=checkbox]{box-shadow:inset 0 0 0 1px var(--tui-base-04);color:var(--tui-text-01)}.tui-editor-socket._preview-image img{cursor:pointer}.tui-editor-socket .ProseMirror video,.tui-editor-socket .ProseMirror audio{pointer-events:none}.tui-editor-socket img.ProseMirror-selectednode{outline:.25rem solid var(--tui-primary-hover)}.tui-editor-socket .t-editor-placeholder:before{content:attr(data-placeholder);float:left;color:var(--tui-base-05);pointer-events:none;height:0}.tui-editor-socket table{border-collapse:collapse;table-layout:unset;width:100%;margin:0;overflow:hidden}.tui-editor-socket table .tableWrapper{overflow-x:auto}.tui-editor-socket .tableWrapper,.tui-editor-socket .tui-table-wrapper{overflow-x:auto}.tui-editor-socket table td{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word}.tui-editor-socket table th{position:relative;min-width:1em;height:2rem;border:2px solid var(--tui-base-03);padding:3px 5px;vertical-align:top;box-sizing:border-box;word-break:break-word;font-weight:bold;text-align:left;background-color:var(--tui-base-02);min-height:2rem}.tui-editor-socket table .column-resize-handle{position:absolute;right:-2px;top:0;bottom:-2px;width:4px;background-color:#adf;pointer-events:none}.tui-editor-socket table td>*{margin-top:0;margin-bottom:0}.tui-editor-socket table th>*{margin-top:0;margin-bottom:0}.tui-editor-socket .selectedCell:after{content:\\\"\\\";position:absolute;top:0;left:0;right:0;bottom:0;background:var(--tui-selection);pointer-events:none}.tui-editor-socket summary{display:flex;align-items:center;min-height:3.5rem;width:100%;padding:0 1.25rem;box-sizing:border-box;border-radius:var(--tui-radius-l);pointer-events:none;outline:none}.tui-editor-socket summary:focus-visible{outline:2px solid var(--tui-link)}.tui-editor-socket summary p{min-width:1px;margin:0}.tui-editor-socket summary::-webkit-details-marker{display:none}.tui-editor-socket details[open] summary{border-radius:var(--tui-radius-l) var(--tui-radius-l) 0 0}.tui-editor-socket .details-arrow,.tui-editor-socket .t-details-arrow{position:absolute;top:1.5rem;right:1.25rem;height:.575rem;width:.575rem;border:1px solid var(--tui-base-06);border-width:0 2px 2px 0;transform:rotate(45deg);transition:var(--tui-duration, .3s);-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;padding:0;background:none;cursor:pointer;outline:none}.tui-editor-socket details{width:100%;border:1px solid var(--tui-base-04);border-radius:var(--tui-radius-l)}.tui-editor-socket div[data-type=details-content]{padding:1.25rem;min-height:3rem;border:1px solid var(--tui-base-04);border-width:1px 0 0}.tui-editor-socket div[data-type=details-content] h1:first-child,.tui-editor-socket div[data-type=details-content] h2:first-child,.tui-editor-socket div[data-type=details-content] pre:first-child,.tui-editor-socket div[data-type=details-content] ul:first-child,.tui-editor-socket div[data-type=details-content] ol:first-child,.tui-editor-socket div[data-type=details-content] ol li:first-child,.tui-editor-socket div[data-type=details-content] ul li:first-child{margin-top:0}.tui-editor-socket .details-wrapper,.tui-editor-socket .t-details-wrapper{margin-bottom:.5rem;position:relative;display:flex}.tui-editor-socket .details-wrapper_rendered .details-arrow,.tui-editor-socket .t-details-wrapper_rendered .details-arrow,.tui-editor-socket .details-wrapper_rendered .t-details-arrow,.tui-editor-socket .t-details-wrapper_rendered .t-details-arrow{pointer-events:none}.tui-editor-socket .details-wrapper_rendered summary,.tui-editor-socket .t-details-wrapper_rendered summary{transition:transform var(--tui-duration, .3s);cursor:pointer;pointer-events:auto}.tui-editor-socket .details-wrapper_rendered summary:hover,.tui-editor-socket .t-details-wrapper_rendered summary:hover{background:var(--tui-base-02)}.tui-editor-socket details[open]+.details-arrow,.tui-editor-socket details[open]+.t-details-arrow{top:1.75rem;transform:rotate(225deg)}.tui-editor-socket pre{white-space:pre-wrap;word-break:break-word;border-radius:.25rem;margin:1rem 0;padding:.75rem 1rem;font-family:Courier,monospace;color:var(--tui-text-02);background:var(--tui-base-02)}.tui-editor-socket .tui-group-node{display:flex;flex-direction:row}.tui-editor-socket .tui-group-node:hover>.tui-group-pointer{pointer-events:auto;opacity:1}.tui-editor-socket .tui-group-pointer{opacity:0;min-height:.8125rem;max-height:.8125rem;min-width:.8125rem;max-width:.8125rem;margin:.3125rem .3125rem 0 0;cursor:grab;background-image:url('data:image/svg+xml;charset=UTF-8,');background-repeat:no-repeat;background-size:contain;background-position:center}.tui-editor-socket [data-mode=onDark] .tui-group-pointer{background-image:url('data:image/svg+xml;charset=UTF-8,')}\\n\"],\n encapsulation: 2,\n changeDetection: 0\n });\n return TuiEditorSocketComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorSocketModule = /*#__PURE__*/(() => {\n class TuiEditorSocketModule {}\n TuiEditorSocketModule.ɵfac = function TuiEditorSocketModule_Factory(t) {\n return new (t || TuiEditorSocketModule)();\n };\n TuiEditorSocketModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiEditorSocketModule\n });\n TuiEditorSocketModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return TuiEditorSocketModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TuiEditorSocketComponent, TuiEditorSocketModule };\n","import * as i0 from '@angular/core';\nimport { Directive, Input, Injectable, Renderer2, Component, ChangeDetectionStrategy, ElementRef, Inject, EventEmitter, ChangeDetectorRef, NgZone, Optional, Self, ViewChild, Output, NgModule } from '@angular/core';\nimport * as i7 from '@taiga-ui/cdk';\nimport { tuiIsTextNode, tuiIsElement, EMPTY_CLIENT_RECT, AbstractTuiPortalService, AbstractTuiPortalHostComponent, TuiDropdownPortalService, AbstractTuiControl, ALWAYS_TRUE_HANDLER, ALWAYS_FALSE_HANDLER, tuiZonefree, tuiAsFocusableItemAccessor, tuiAutoFocusOptionsProvider, TuiItemModule, TuiActiveZoneModule } from '@taiga-ui/cdk';\nimport * as i2 from '@taiga-ui/core';\nimport { TuiDropdownSelectionDirective, tuiGetWordRange, tuiAsDriver, tuiAsRectAccessor, TuiRectAccessor, tuiAsViewport, TUI_ANIMATIONS_DEFAULT_DURATION, TuiWrapperModule, TuiScrollbarModule, TuiDropdownModule } from '@taiga-ui/core';\nimport * as i12 from 'rxjs';\nimport { combineLatest, ReplaySubject, fromEvent } from 'rxjs';\nimport { map, distinctUntilChanged, take, shareReplay, delay, takeUntil, throttleTime } from 'rxjs/operators';\nimport * as i6 from '@angular/common';\nimport { DOCUMENT, CommonModule } from '@angular/common';\nimport * as i11 from '@angular/forms';\nimport { NgControl } from '@angular/forms';\nimport * as i1 from '@tinkoff/tui-editor/components/toolbar';\nimport { TuiToolbarComponent, TuiToolbarModule } from '@tinkoff/tui-editor/components/toolbar';\nimport { defaultEditorTools, TUI_EDITOR_RESIZE_EVENT } from '@tinkoff/tui-editor/constants';\nimport * as i10 from '@tinkoff/tui-editor/directives';\nimport { TuiTiptapEditorService, TuiTiptapEditorDirective, TuiTiptapEditorModule } from '@tinkoff/tui-editor/directives';\nimport { LAZY_EDITOR_EXTENSIONS, TUI_EDITOR_EXTENSIONS, INITIALIZATION_TIPTAP_CONTAINER, TIPTAP_EDITOR, LAZY_TIPTAP_EDITOR, TUI_EDITOR_CONTENT_PROCESSOR, TUI_EDITOR_VALUE_TRANSFORMER, TUI_EDITOR_OPTIONS } from '@tinkoff/tui-editor/tokens';\nimport { tuiGetSelectionState, tuiIsSafeLinkRange } from '@tinkoff/tui-editor/utils';\nimport * as i4 from '@tinkoff/tui-editor/components/editor-socket';\nimport { TuiEditorSocketModule } from '@tinkoff/tui-editor/components/editor-socket';\nimport * as i5 from '@tinkoff/tui-editor/components/edit-link';\nimport { TuiEditLinkModule } from '@tinkoff/tui-editor/components/edit-link';\nimport * as i13 from '@tinkoff/tui-editor/abstract';\nconst _c0 = [\"*\", [[\"tools\"]], [[\"tools\"]], [[\"mention\"]]];\nconst _c1 = [\"*\", \"tools\", \"tools\", \"mention\"];\nfunction TuiEditorComponent_div_0_tui_toolbar_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-toolbar\", 10);\n i0.ɵɵlistener(\"fileAttached\", function TuiEditorComponent_div_0_tui_toolbar_2_Template_tui_toolbar_fileAttached_0_listener($event) {\n i0.ɵɵrestoreView(_r3);\n const ctx_r1 = i0.ɵɵnextContext(2);\n return i0.ɵɵresetView(ctx_r1.fileAttached.emit($event));\n });\n i0.ɵɵprojection(1, 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵproperty(\"disabled\", !ctx_r1.interactive)(\"tools\", ctx_r1.tools);\n }\n}\nfunction TuiEditorComponent_div_0_div_5_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 11);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate1(\" \", ctx_r1.exampleText, \" \");\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r4 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-scrollbar\", 14);\n i0.ɵɵlistener(\"mousedown\", function TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_1_Template_tui_scrollbar_mousedown_0_listener($event) {\n i0.ɵɵrestoreView(_r4);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.focus($event));\n });\n i0.ɵɵelementContainer(1, 15);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const editor_r5 = i0.ɵɵreference(4);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", editor_r5);\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r6 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-scrollbar\", 16);\n i0.ɵɵlistener(\"mousedown\", function TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_2_Template_tui_scrollbar_mousedown_0_listener($event) {\n i0.ɵɵrestoreView(_r6);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.focus($event));\n });\n i0.ɵɵelementContainer(1, 15);\n i0.ɵɵelement(2, \"tui-editor-portal-host\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const editor_r5 = i0.ɵɵreference(4);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", editor_r5);\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_toolbar_1_Template(rf, ctx) {\n if (rf & 1) {\n const _r8 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-toolbar\", 21);\n i0.ɵɵlistener(\"fileAttached\", function TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_toolbar_1_Template_tui_toolbar_fileAttached_0_listener($event) {\n i0.ɵɵrestoreView(_r8);\n const ctx_r1 = i0.ɵɵnextContext(5);\n return i0.ɵɵresetView(ctx_r1.fileAttached.emit($event));\n });\n i0.ɵɵprojection(1, 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const activeZone_r9 = i0.ɵɵnextContext().$implicit;\n const ctx_r1 = i0.ɵɵnextContext(4);\n i0.ɵɵproperty(\"disabled\", !ctx_r1.interactive)(\"tools\", ctx_r1.tools)(\"tuiActiveZoneParent\", activeZone_r9);\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_edit_link_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r10 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"tui-edit-link\", 22, 2);\n i0.ɵɵlistener(\"addLink\", function TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_edit_link_2_Template_tui_edit_link_addLink_0_listener($event) {\n i0.ɵɵrestoreView(_r10);\n const link_r11 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext(5);\n return i0.ɵɵresetView(link_r11.anchorMode ? ctx_r1.addAnchor($event) : ctx_r1.addLink($event));\n })(\"removeLink\", function TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_edit_link_2_Template_tui_edit_link_removeLink_0_listener() {\n i0.ɵɵrestoreView(_r10);\n const link_r11 = i0.ɵɵreference(1);\n const ctx_r1 = i0.ɵɵnextContext(5);\n return i0.ɵɵresetView(link_r11.anchorMode ? ctx_r1.removeAnchor() : ctx_r1.removeLink());\n });\n i0.ɵɵelementEnd();\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_ng_container_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵprojection(1, 3);\n i0.ɵɵelementContainerEnd();\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\");\n i0.ɵɵtemplate(1, TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_toolbar_1_Template, 2, 3, \"tui-toolbar\", 19)(2, TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_edit_link_2_Template, 2, 0, \"tui-edit-link\", 20)(3, TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_ng_container_3_Template, 2, 0, \"ng-container\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const editorLoaded_r12 = i0.ɵɵnextContext(3).ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"t-floating\", ctx_r1.floatingToolbar);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", editorLoaded_r12 && ctx_r1.floatingToolbar);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isLinkSelected);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.isMentionMode);\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_ng_template_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 17)(1, \"tui-editor-socket\", 18);\n i0.ɵɵlistener(\"stateChange\", function TuiEditorComponent_div_0_ng_container_6_ng_template_3_Template_tui_editor_socket_stateChange_1_listener() {\n i0.ɵɵrestoreView(_r7);\n return i0.ɵɵresetView(0);\n })(\"valueChange\", function TuiEditorComponent_div_0_ng_container_6_ng_template_3_Template_tui_editor_socket_valueChange_1_listener($event) {\n i0.ɵɵrestoreView(_r7);\n const ctx_r1 = i0.ɵɵnextContext(3);\n return i0.ɵɵresetView(ctx_r1.onModelChange($event));\n });\n i0.ɵɵelementEnd()();\n i0.ɵɵtemplate(2, TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_Template, 4, 5, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor);\n }\n if (rf & 2) {\n const dropdown_r13 = i0.ɵɵreference(3);\n const ctx_r1 = i0.ɵɵnextContext(3);\n i0.ɵɵproperty(\"tuiDropdown\", dropdown_r13)(\"tuiToolbarDropdown\", ctx_r1.dropdownSelectionHandler)(\"tuiToolbarDropdownPosition\", ctx_r1.floatingToolbar ? \"selection\" : \"tag\");\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"editable\", ctx_r1.interactive)(\"value\", ctx_r1.value);\n }\n}\nfunction TuiEditorComponent_div_0_ng_container_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainerStart(0);\n i0.ɵɵtemplate(1, TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_1_Template, 2, 1, \"tui-scrollbar\", 12)(2, TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_2_Template, 3, 1, \"tui-scrollbar\", 13)(3, TuiEditorComponent_div_0_ng_container_6_ng_template_3_Template, 4, 5, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor);\n i0.ɵɵelementContainerEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", ctx_r1.floatingToolbar);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", !ctx_r1.floatingToolbar);\n }\n}\nfunction TuiEditorComponent_div_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 4);\n i0.ɵɵlistener(\"tuiActiveZoneChange\", function TuiEditorComponent_div_0_Template_div_tuiActiveZoneChange_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1.onActiveZone($event));\n });\n i0.ɵɵelementStart(1, \"div\", 5);\n i0.ɵɵtemplate(2, TuiEditorComponent_div_0_tui_toolbar_2_Template, 2, 2, \"tui-toolbar\", 6);\n i0.ɵɵelementStart(3, \"div\", 7);\n i0.ɵɵprojection(4);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(5, TuiEditorComponent_div_0_div_5_Template, 2, 1, \"div\", 8);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(6, TuiEditorComponent_div_0_ng_container_6_Template, 5, 2, \"ng-container\", 9);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const editorLoaded_r12 = ctx.ngIf;\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"appearance\", ctx_r1.options.appearence)(\"disabled\", ctx_r1.disabled)(\"focus\", ctx_r1.computedFocused)(\"hover\", ctx_r1.pseudoHover)(\"invalid\", ctx_r1.computedInvalid)(\"readOnly\", ctx_r1.readOnly);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", editorLoaded_r12 && !ctx_r1.floatingToolbar);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"t-placeholder_raised\", ctx_r1.placeholderRaised);\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngIf\", ctx_r1.hasExampleText);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngIf\", editorLoaded_r12);\n }\n}\nlet TuiDropdownToolbarDirective = /*#__PURE__*/(() => {\n class TuiDropdownToolbarDirective extends TuiDropdownSelectionDirective {\n constructor() {\n super(...arguments);\n this.previousTagPosition = null;\n this.stream$ = combineLatest([this.handler$, this.selection$.pipe(map(() => this.getRange()), distinctUntilChanged((x, y) => x.startOffset === y.startOffset && x.endOffset === y.endOffset))]).pipe(map(([handler, range]) => {\n var _a;\n const contained = this.el.nativeElement.contains(range.commonAncestorContainer) || ((_a = range.commonAncestorContainer.parentElement) === null || _a === void 0 ? void 0 : _a.closest('tui-dropdown'));\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 }\n set tuiToolbarDropdown(visible) {\n this.tuiDropdownSelection = visible;\n }\n getClientRect() {\n var _a, _b, _c, _d;\n switch (this.position) {\n case 'tag':\n {\n const {\n commonAncestorContainer\n } = this.range;\n const element = tuiIsElement(commonAncestorContainer) ? commonAncestorContainer : commonAncestorContainer.parentNode;\n if ((_a = element === null || element === void 0 ? void 0 : element.parentElement) === null || _a === void 0 ? void 0 : _a.closest('tui-dropdown')) {\n return (_b = this.previousTagPosition) !== null && _b !== void 0 ? _b : EMPTY_CLIENT_RECT;\n }\n this.previousTagPosition = element && tuiIsElement(element) ? ((_c = this.doc.querySelector('.ProseMirror-selectednode')) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect()) || element.getBoundingClientRect() : EMPTY_CLIENT_RECT;\n return this.previousTagPosition;\n }\n case 'word':\n return tuiGetWordRange(this.range).getBoundingClientRect();\n default:\n {\n const rect = this.range.getBoundingClientRect();\n if (rect.x === 0 && rect.y === 0 && rect.width === 0 && rect.height === 0) {\n return ((_d = this.el.nativeElement.querySelector('p')) !== null && _d !== void 0 ? _d : this.el.nativeElement).getBoundingClientRect();\n }\n return rect;\n }\n }\n }\n }\n TuiDropdownToolbarDirective.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiDropdownToolbarDirective_BaseFactory;\n return function TuiDropdownToolbarDirective_Factory(t) {\n return (ɵTuiDropdownToolbarDirective_BaseFactory || (ɵTuiDropdownToolbarDirective_BaseFactory = i0.ɵɵgetInheritedFactory(TuiDropdownToolbarDirective)))(t || TuiDropdownToolbarDirective);\n };\n })();\n TuiDropdownToolbarDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiDropdownToolbarDirective,\n selectors: [[\"\", \"tuiToolbarDropdown\", \"\"]],\n inputs: {\n position: [0, \"tuiToolbarDropdownPosition\", \"position\"],\n tuiToolbarDropdown: \"tuiToolbarDropdown\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsDriver(TuiDropdownToolbarDirective), tuiAsRectAccessor(TuiDropdownToolbarDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiDropdownToolbarDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorPortalService = /*#__PURE__*/(() => {\n class TuiEditorPortalService extends AbstractTuiPortalService {}\n TuiEditorPortalService.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiEditorPortalService_BaseFactory;\n return function TuiEditorPortalService_Factory(t) {\n return (ɵTuiEditorPortalService_BaseFactory || (ɵTuiEditorPortalService_BaseFactory = i0.ɵɵgetInheritedFactory(TuiEditorPortalService)))(t || TuiEditorPortalService);\n };\n })();\n TuiEditorPortalService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: TuiEditorPortalService,\n factory: TuiEditorPortalService.ɵfac\n });\n return TuiEditorPortalService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst TUI_EDITOR_PROVIDERS = [{\n provide: LAZY_EDITOR_EXTENSIONS,\n deps: [TUI_EDITOR_EXTENSIONS],\n useFactory: extensions => {\n const extensions$ = new ReplaySubject(1);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n Promise.all(extensions).then(extensions => extensions$.next(extensions));\n return extensions$;\n }\n}, {\n provide: INITIALIZATION_TIPTAP_CONTAINER,\n deps: [Renderer2],\n useFactory: renderer => renderer.createElement(`div`)\n}, {\n provide: TIPTAP_EDITOR,\n deps: [INITIALIZATION_TIPTAP_CONTAINER, LAZY_EDITOR_EXTENSIONS, LAZY_TIPTAP_EDITOR],\n useFactory: (element, extensions, editor) => combineLatest([editor, extensions]).pipe(take(1), map(([LazyEditor, extensions]) => new LazyEditor({\n element,\n extensions\n })), shareReplay({\n bufferSize: 1,\n refCount: true\n }))\n}, TuiTiptapEditorService, TuiEditorPortalService];\nlet TuiEditorPortalHostComponent = /*#__PURE__*/(() => {\n class TuiEditorPortalHostComponent extends AbstractTuiPortalHostComponent {}\n TuiEditorPortalHostComponent.ɵfac = /* @__PURE__ */(() => {\n let ɵTuiEditorPortalHostComponent_BaseFactory;\n return function TuiEditorPortalHostComponent_Factory(t) {\n return (ɵTuiEditorPortalHostComponent_BaseFactory || (ɵTuiEditorPortalHostComponent_BaseFactory = i0.ɵɵgetInheritedFactory(TuiEditorPortalHostComponent)))(t || TuiEditorPortalHostComponent);\n };\n })();\n TuiEditorPortalHostComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiEditorPortalHostComponent,\n selectors: [[\"tui-editor-portal-host\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: AbstractTuiPortalService,\n useExisting: TuiDropdownPortalService\n }, {\n provide: AbstractTuiPortalHostComponent,\n useExisting: TuiEditorPortalHostComponent\n }]), i0.ɵɵInheritDefinitionFeature],\n decls: 2,\n vars: 0,\n consts: [[\"viewContainer\", \"\"]],\n template: function TuiEditorPortalHostComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementContainer(0, null, 0);\n }\n },\n styles: [\"[_nghost-%COMP%]{position:absolute;top:0;left:0;display:block;height:100%;width:100%;pointer-events:none}\"],\n changeDetection: 0\n });\n return TuiEditorPortalHostComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorPortalDirective = /*#__PURE__*/(() => {\n class TuiEditorPortalDirective extends TuiRectAccessor {\n constructor(el) {\n super();\n this.el = el;\n this.type = 'viewport';\n }\n getClientRect() {\n return this.el.nativeElement.getBoundingClientRect();\n }\n }\n TuiEditorPortalDirective.ɵfac = function TuiEditorPortalDirective_Factory(t) {\n return new (t || TuiEditorPortalDirective)(i0.ɵɵdirectiveInject(ElementRef));\n };\n TuiEditorPortalDirective.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: TuiEditorPortalDirective,\n selectors: [[\"\", \"tuiEditorPortal\", \"\"]],\n features: [i0.ɵɵProvidersFeature([{\n provide: TuiDropdownPortalService,\n useExisting: TuiEditorPortalService\n }, tuiAsViewport(TuiEditorPortalDirective)]), i0.ɵɵInheritDefinitionFeature]\n });\n return TuiEditorPortalDirective;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorComponent = /*#__PURE__*/(() => {\n class TuiEditorComponent extends AbstractTuiControl {\n constructor(control, cdr, editorLoaded$, editorService, contentProcessor, doc, transformer, options, zone) {\n super(control, cdr, transformer);\n this.editorLoaded$ = editorLoaded$;\n this.editorService = editorService;\n this.contentProcessor = contentProcessor;\n this.doc = doc;\n this.options = options;\n this.zone = zone;\n this.exampleText = '';\n this.tools = defaultEditorTools;\n this.floatingToolbar = false;\n this.fileAttached = new EventEmitter();\n this.hasMentionPlugin = false;\n this.focused = false;\n this.openDropdownWhen = range => this.currentFocusedNodeIsTextAnchor(range) || this.currentFocusedNodeIsImageAnchor || this.isMentionMode;\n this.editorLoaded$.pipe(delay(0), takeUntil(this.destroy$)).subscribe(() => {\n this.hasMentionPlugin = !!this.editorService.getOriginTiptapEditor().extensionManager.extensions.find(extension => extension.name === 'mention');\n this.patchContentEditableElement();\n this.listenResizeEvents();\n });\n }\n get nativeFocusableElement() {\n var _a, _b;\n return this.computedDisabled ? null : ((_b = (_a = this.el) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.querySelector('[contenteditable].ProseMirror')) || null;\n }\n get dropdownSelectionHandler() {\n if (this.floatingToolbar) {\n return ALWAYS_TRUE_HANDLER;\n }\n return this.focused ? this.openDropdownWhen : ALWAYS_FALSE_HANDLER;\n }\n get editor() {\n return this.editorService.getOriginTiptapEditor() ? this.editorService : null;\n }\n get placeholderRaised() {\n return this.computedFocused && !this.readOnly || this.hasValue;\n }\n get hasExampleText() {\n return !!this.exampleText && this.computedFocused && !this.hasValue && !this.readOnly;\n }\n get isLinkSelected() {\n var _a, _b, _c, _d;\n const focusElement = (_a = this.doc.getSelection()) === null || _a === void 0 ? void 0 : _a.focusNode;\n const parentFocusElement = focusElement === null || focusElement === void 0 ? void 0 : focusElement.parentNode;\n return (parentFocusElement === null || parentFocusElement === void 0 ? void 0 : parentFocusElement.nodeName.toLowerCase()) === 'a' || ((_b = parentFocusElement === null || parentFocusElement === void 0 ? void 0 : parentFocusElement.parentNode) === null || _b === void 0 ? void 0 : _b.nodeName.toLowerCase()) === 'a' || (focusElement === null || focusElement === void 0 ? void 0 : focusElement.nodeName.toLowerCase()) === 'a' || !!((_c = focusElement === null || focusElement === void 0 ? void 0 : focusElement.parentElement) === null || _c === void 0 ? void 0 : _c.closest('tui-edit-link')) || !!((_d = focusElement === null || focusElement === void 0 ? void 0 : focusElement.parentElement) === null || _d === void 0 ? void 0 : _d.closest('tui-dropdown'));\n }\n get mentionSuggestions() {\n const before = this.selectionState.before;\n return (before === null || before === void 0 ? void 0 : before.startsWith('@')) && before.length > 1 ? (before === null || before === void 0 ? void 0 : before.replace('@', '')) || '' : '';\n }\n get isMentionMode() {\n var _a;\n return this.hasMentionPlugin && ((_a = this.selectionState.before) === null || _a === void 0 ? void 0 : _a.startsWith('@'));\n }\n writeValue(value) {\n var _a, _b;\n if (value === this.value) {\n return;\n }\n const processed = this.contentProcessor(value || '');\n super.writeValue(processed);\n if (processed !== value) {\n (_a = this.control) === null || _a === void 0 ? void 0 : _a.setValue(processed, {\n onlySelf: false,\n emitEvent: false,\n emitModelToViewChange: false,\n emitViewToModelChange: false\n });\n }\n if (!this.focused) {\n (_b = this.doc.getSelection()) === null || _b === void 0 ? void 0 : _b.removeAllRanges();\n }\n }\n onActiveZone(focused) {\n var _a;\n this.focused = focused;\n this.updateFocused(focused);\n (_a = this.control) === null || _a === void 0 ? void 0 : _a.updateValueAndValidity();\n }\n onModelChange(value) {\n this.value = value;\n }\n addAnchor(anchor) {\n var _a;\n (_a = this.editor) === null || _a === void 0 ? void 0 : _a.setAnchor(anchor);\n }\n removeAnchor() {\n var _a;\n (_a = this.editor) === null || _a === void 0 ? void 0 : _a.removeAnchor();\n }\n addLink(link) {\n var _a, _b;\n (_a = this.editor) === null || _a === void 0 ? void 0 : _a.selectClosest();\n (_b = this.editor) === null || _b === void 0 ? void 0 : _b.setLink(link);\n }\n removeLink() {\n var _a;\n (_a = this.editor) === null || _a === void 0 ? void 0 : _a.unsetLink();\n }\n get selectionState() {\n return tuiGetSelectionState(this.editor);\n }\n focus(event) {\n var _a, _b;\n if ((_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.contains(event.target)) {\n return;\n }\n event.preventDefault();\n (_b = this.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.focus();\n }\n ngOnDestroy() {\n var _a;\n (_a = this.editor) === null || _a === void 0 ? void 0 : _a.destroy();\n }\n getFallbackValue() {\n return '';\n }\n /**\n * @description:\n * The commonAncestorContainer not always relevant node element in Range,\n * so the focusNode is used for the correct behaviour from the selection,\n * which is the actual element at the moment\n */\n currentFocusedNodeIsTextAnchor(range) {\n var _a, _b;\n return !!((_b = (_a = range.startContainer.parentElement) === null || _a === void 0 ? void 0 : _a.closest('a')) === null || _b === void 0 ? void 0 : _b.contains(this.focusNode)) && tuiIsSafeLinkRange(range);\n }\n get focusNode() {\n var _a, _b;\n return (_b = (_a = this.doc.getSelection()) === null || _a === void 0 ? void 0 : _a.focusNode) !== null && _b !== void 0 ? _b : null;\n }\n get hasValue() {\n return !!this.value;\n }\n get currentFocusedNodeIsImageAnchor() {\n var _a, _b, _c;\n return ((_a = this.focusNode) === null || _a === void 0 ? void 0 : _a.nodeName) === 'A' && ['IMG', 'TUI-IMAGE-EDITOR'].includes((_c = (_b = this.focusNode) === null || _b === void 0 ? void 0 : _b.childNodes[0]) === null || _c === void 0 ? void 0 : _c.nodeName);\n }\n patchContentEditableElement() {\n var _a, _b;\n (_a = this.nativeFocusableElement) === null || _a === void 0 ? void 0 : _a.setAttribute('translate', this.options.translate);\n (_b = this.nativeFocusableElement) === null || _b === void 0 ? void 0 : _b.setAttribute('spellcheck', String(this.options.spellcheck));\n }\n listenResizeEvents() {\n var _a, _b;\n ((_a = this.el) === null || _a === void 0 ? void 0 : _a.nativeElement) && fromEvent((_b = this.el) === null || _b === void 0 ? void 0 : _b.nativeElement, TUI_EDITOR_RESIZE_EVENT).pipe(throttleTime(0), tuiZonefree(this.zone), takeUntil(this.destroy$)).subscribe(() => this.editorService.valueChange$.next(this.editorService.getHTML()));\n }\n }\n TuiEditorComponent.ɵfac = function TuiEditorComponent_Factory(t) {\n return new (t || TuiEditorComponent)(i0.ɵɵdirectiveInject(NgControl, 10), i0.ɵɵdirectiveInject(ChangeDetectorRef), i0.ɵɵdirectiveInject(TIPTAP_EDITOR), i0.ɵɵdirectiveInject(TuiTiptapEditorService), i0.ɵɵdirectiveInject(TUI_EDITOR_CONTENT_PROCESSOR), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(TUI_EDITOR_VALUE_TRANSFORMER, 8), i0.ɵɵdirectiveInject(TUI_EDITOR_OPTIONS), i0.ɵɵdirectiveInject(NgZone));\n };\n TuiEditorComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: TuiEditorComponent,\n selectors: [[\"tui-editor\"]],\n viewQuery: function TuiEditorComponent_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TuiTiptapEditorDirective, 5, ElementRef);\n i0.ɵɵviewQuery(TuiToolbarComponent, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.el = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.toolbar = _t.first);\n }\n },\n inputs: {\n exampleText: \"exampleText\",\n tools: \"tools\",\n floatingToolbar: \"floatingToolbar\"\n },\n outputs: {\n fileAttached: \"fileAttached\"\n },\n features: [i0.ɵɵProvidersFeature([tuiAsFocusableItemAccessor(TuiEditorComponent), tuiAutoFocusOptionsProvider({\n delay: TUI_ANIMATIONS_DEFAULT_DURATION\n }), TUI_EDITOR_PROVIDERS]), i0.ɵɵInheritDefinitionFeature],\n ngContentSelectors: _c1,\n decls: 2,\n vars: 3,\n consts: [[\"editor\", \"\"], [\"dropdown\", \"\"], [\"link\", \"\"], [\"tuiWrapper\", \"\", \"class\", \"t-wrapper\", 3, \"appearance\", \"disabled\", \"focus\", \"hover\", \"invalid\", \"readOnly\", \"tuiActiveZoneChange\", 4, \"ngIf\"], [\"tuiWrapper\", \"\", 1, \"t-wrapper\", 3, \"tuiActiveZoneChange\", \"appearance\", \"disabled\", \"focus\", \"hover\", \"invalid\", \"readOnly\"], [1, \"t-toolbar-wrapper\"], [3, \"disabled\", \"tools\", \"fileAttached\", 4, \"ngIf\"], [1, \"t-placeholder\"], [\"class\", \"t-example-text\", 4, \"ngIf\"], [4, \"ngIf\"], [3, \"fileAttached\", \"disabled\", \"tools\"], [1, \"t-example-text\"], [\"class\", \"t-scrollbar\", 3, \"mousedown\", 4, \"ngIf\"], [\"tuiEditorPortal\", \"\", \"class\", \"t-scrollbar\", 3, \"mousedown\", 4, \"ngIf\"], [1, \"t-scrollbar\", 3, \"mousedown\"], [3, \"ngTemplateOutlet\"], [\"tuiEditorPortal\", \"\", 1, \"t-scrollbar\", 3, \"mousedown\"], [\"tuiDropdownLimitWidth\", \"auto\", 3, \"tuiDropdown\", \"tuiToolbarDropdown\", \"tuiToolbarDropdownPosition\"], [\"tuiTiptapEditor\", \"\", 3, \"stateChange\", \"valueChange\", \"editable\", \"value\"], [3, \"disabled\", \"tools\", \"tuiActiveZoneParent\", \"fileAttached\", 4, \"ngIf\"], [3, \"addLink\", \"removeLink\", 4, \"ngIf\"], [3, \"fileAttached\", \"disabled\", \"tools\", \"tuiActiveZoneParent\"], [3, \"addLink\", \"removeLink\"]],\n template: function TuiEditorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c0);\n i0.ɵɵtemplate(0, TuiEditorComponent_div_0_Template, 7, 11, \"div\", 3);\n i0.ɵɵpipe(1, \"async\");\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngIf\", i0.ɵɵpipeBind1(1, 1, ctx.editorLoaded$));\n }\n },\n dependencies: [i1.TuiToolbarComponent, i2.TuiScrollbarComponent, TuiEditorPortalHostComponent, i4.TuiEditorSocketComponent, i5.TuiEditLinkComponent, i6.NgIf, i2.TuiWrapperDirective, i7.TuiActiveZoneDirective, i6.NgTemplateOutlet, TuiEditorPortalDirective, i2.TuiDropdownOptionsDirective, i2.TuiDropdownDirective, i2.TuiDropdownDriverDirective, i2.TuiDropdownPositionDirective, TuiDropdownToolbarDirective, i10.TuiTiptapEditorDirective, i6.AsyncPipe],\n styles: [\"[_nghost-%COMP%]{position:relative;z-index:0;display:block;font:var(--tui-font-text-m);border-radius:var(--tui-radius-m);max-height:inherit;min-height:10rem;box-sizing:border-box;overflow:clip}.t-wrapper[_ngcontent-%COMP%]{display:flex;max-height:inherit;min-height:inherit;cursor:text;overflow:clip;flex-direction:column;border-radius:inherit}.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);margin:1rem 1rem -1rem;min-height:1.625rem;width:95%;font-size:.9375rem}@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-placeholder_raised[_ngcontent-%COMP%]{width:110%}.t-placeholder[_ngcontent-%COMP%]:empty{min-height:.8rem}.t-example-text[_ngcontent-%COMP%]{position:absolute;left:1rem;margin-top:1.6rem;color:var(--tui-base-06);letter-spacing:normal;text-transform:none}.t-example-text_light[_ngcontent-%COMP%]{color:var(--tui-text-03-night)}.t-example-text_dark[_ngcontent-%COMP%]{color:var(--tui-text-03)}.t-scrollbar[_ngcontent-%COMP%]{display:flex;border-bottom:.3125rem solid transparent;padding-bottom:1.3125rem;box-sizing:border-box;flex:1}.t-floating[_ngcontent-%COMP%], .t-floating[_ngcontent-%COMP%] .t-tools-wrapper{max-width:var(--tui-floating-toolbar-max-width, 31.25rem);flex-wrap:nowrap}\"],\n changeDetection: 0\n });\n return TuiEditorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet TuiEditorModule = /*#__PURE__*/(() => {\n class TuiEditorModule {}\n TuiEditorModule.ɵfac = function TuiEditorModule_Factory(t) {\n return new (t || TuiEditorModule)();\n };\n TuiEditorModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: TuiEditorModule\n });\n TuiEditorModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [[TuiItemModule, CommonModule, TuiToolbarModule, TuiWrapperModule, TuiScrollbarModule, TuiEditLinkModule, TuiActiveZoneModule, TuiDropdownModule, TuiTiptapEditorModule, TuiEditorSocketModule]]\n });\n return TuiEditorModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { TUI_EDITOR_PROVIDERS, TuiDropdownToolbarDirective, TuiEditorComponent, TuiEditorModule, TuiEditorPortalDirective, TuiEditorPortalHostComponent, TuiEditorPortalService };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, SecurityContext, Injectable, Inject, Pipe, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport dompurify from 'dompurify';\nimport * as i2 from '@angular/platform-browser';\n\n/**\n * Token for {@link NgDompurifyConfig}\n */\nconst DOMPURIFY_CONFIG = new InjectionToken('Config for DOMPurify', {\n factory: () => ({}),\n providedIn: 'root'\n});\n\n/**\n * Token for adding hooks to DOMPurify, see {@link addHook}\n */\nconst DOMPURIFY_HOOKS = new InjectionToken('Hooks for DOMPurify', {\n factory: () => [],\n providedIn: 'root'\n});\n\n/**\n * A function that takes style rule value as input and returns a sanitized string\n *\n * NOTE: Angular 10 removed CSS sanitation so by default this method does nothing\n */\nconst SANITIZE_STYLE = new InjectionToken('A function that sanitizes value for a CSS rule', {\n factory: () => value => value,\n providedIn: 'root'\n});\nconst createDOMPurify = dompurify;\n/**\n * Implementation of Angular {@link Sanitizer} purifying via DOMPurify\n *\n * use {@link DOMPURIFY_CONFIG} token to provide config ({@link NgDompurifyConfig})\n * use {@link SANITIZE_STYLE} token to provide a style sanitizing method ({@link SanitizeStyle})\n * use {@link DOMPURIFY_HOOKS} token to provide a hooks for DOMPurify ({@link addHook})\n *\n * Ambient type cannot be used without @dynamic https://github.com/angular/angular/issues/23395\n * @dynamic\n */\nlet NgDompurifySanitizer = /*#__PURE__*/(() => {\n class NgDompurifySanitizer {\n constructor(config, sanitizeStyle, {\n defaultView\n }, hooks) {\n this.config = config;\n this.sanitizeStyle = sanitizeStyle;\n this.domPurify = createDOMPurify(defaultView);\n hooks.forEach(({\n name,\n hook\n }) => {\n this.domPurify.addHook(name, hook);\n });\n }\n sanitize(context, value, config = this.config) {\n if (context === SecurityContext.SCRIPT) {\n throw new Error('DOMPurify does not support SCRIPT context');\n }\n return context === SecurityContext.STYLE ? this.sanitizeStyle(String(value)) : this.domPurify.sanitize(String(value || ''), config);\n }\n }\n NgDompurifySanitizer.ɵfac = function NgDompurifySanitizer_Factory(t) {\n return new (t || NgDompurifySanitizer)(i0.ɵɵinject(DOMPURIFY_CONFIG), i0.ɵɵinject(SANITIZE_STYLE), i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(DOMPURIFY_HOOKS));\n };\n NgDompurifySanitizer.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: NgDompurifySanitizer,\n factory: NgDompurifySanitizer.ɵfac,\n providedIn: 'root'\n });\n return NgDompurifySanitizer;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Pipe that transforms dirty content to clean via {@link NgDompurifySanitizer}\n */\nlet NgDompurifyPipe = /*#__PURE__*/(() => {\n class NgDompurifyPipe {\n constructor(sanitizer, domSanitizer) {\n this.sanitizer = sanitizer;\n this.domSanitizer = domSanitizer;\n }\n transform(value, context = SecurityContext.HTML, config) {\n return this.bypassSecurityTrust(context, this.sanitizer.sanitize(context, value, config));\n }\n bypassSecurityTrust(context, purifiedValue) {\n switch (context) {\n case SecurityContext.HTML:\n return this.domSanitizer.bypassSecurityTrustHtml(purifiedValue);\n case SecurityContext.STYLE:\n return this.domSanitizer.bypassSecurityTrustStyle(purifiedValue);\n case SecurityContext.URL:\n return this.domSanitizer.bypassSecurityTrustUrl(purifiedValue);\n case SecurityContext.RESOURCE_URL:\n return this.domSanitizer.bypassSecurityTrustResourceUrl(purifiedValue);\n default:\n return null;\n }\n }\n }\n NgDompurifyPipe.ɵfac = function NgDompurifyPipe_Factory(t) {\n return new (t || NgDompurifyPipe)(i0.ɵɵdirectiveInject(NgDompurifySanitizer, 16), i0.ɵɵdirectiveInject(i2.DomSanitizer, 16));\n };\n NgDompurifyPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"dompurify\",\n type: NgDompurifyPipe,\n pure: true\n });\n return NgDompurifyPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet NgDompurifyModule = /*#__PURE__*/(() => {\n class NgDompurifyModule {}\n NgDompurifyModule.ɵfac = function NgDompurifyModule_Factory(t) {\n return new (t || NgDompurifyModule)();\n };\n NgDompurifyModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: NgDompurifyModule\n });\n NgDompurifyModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n return NgDompurifyModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Public API Surface of @tinkoff/ng-dompurify\n */\n\n/**\n * Generated bundle index.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B,GAASb,EAAc,EAAMa,GAASC,EAAQ,EAAMD,GAASd,EAAe,CAAC,CACxJ,EACAK,EAAqB,WAA0BW,EAAmB,CAChE,MAAOX,EACP,QAASA,EAAqB,UAC9B,WAAY,MACd,CAAC,EACMA,CACT,GAAG,EA6CH,IAAIY,IAAkC,IAAM,CAC1C,MAAMA,CAAkB,CAAC,CACzB,OAAAA,EAAkB,UAAO,SAAmC,EAAG,CAC7D,OAAO,IAAK,GAAKA,EACnB,EACAA,EAAkB,UAAyBC,EAAiB,CAC1D,KAAMD,CACR,CAAC,EACDA,EAAkB,UAAyBE,EAAiB,CAAC,CAAC,EACvDF,CACT,GAAG","names":["require_purify","__commonJSMin","exports","module","global","factory","entries","setPrototypeOf","isFrozen","getPrototypeOf","getOwnPropertyDescriptor","freeze","seal","create","apply","construct","x","fun","thisValue","args","Func","arrayForEach","unapply","arrayPop","arrayPush","stringToLowerCase","stringToString","stringMatch","stringReplace","stringIndexOf","stringTrim","objectHasOwnProperty","regExpTest","typeErrorCreate","unconstruct","func","thisArg","_len","_key","_len2","_key2","addToSet","set","array","transformCaseFunc","l","element","lcElement","cleanArray","index","clone","object","newObject","property","value","lookupGetter","prop","desc","fallbackValue","html$1","svg$1","svgFilters","svgDisallowed","mathMl$1","mathMlDisallowed","text","html","svg","mathMl","xml","MUSTACHE_EXPR","ERB_EXPR","TMPLIT_EXPR","DATA_ATTR","ARIA_ATTR","IS_ALLOWED_URI","IS_SCRIPT_OR_DATA","ATTR_WHITESPACE","DOCTYPE_NAME","CUSTOM_ELEMENT","EXPRESSIONS","NODE_TYPE","getGlobal","_createTrustedTypesPolicy","trustedTypes","purifyHostElement","suffix","ATTR_NAME","policyName","scriptUrl","createDOMPurify","window","DOMPurify","root","document","originalDocument","currentScript","DocumentFragment","HTMLTemplateElement","Node","Element","NodeFilter","NamedNodeMap","HTMLFormElement","DOMParser","ElementPrototype","cloneNode","getNextSibling","getChildNodes","getParentNode","template","trustedTypesPolicy","emptyHTML","implementation","createNodeIterator","createDocumentFragment","getElementsByTagName","importNode","hooks","IS_ALLOWED_URI$1","ALLOWED_TAGS","DEFAULT_ALLOWED_TAGS","ALLOWED_ATTR","DEFAULT_ALLOWED_ATTR","CUSTOM_ELEMENT_HANDLING","FORBID_TAGS","FORBID_ATTR","ALLOW_ARIA_ATTR","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","ALLOW_SELF_CLOSE_IN_ATTR","SAFE_FOR_TEMPLATES","SAFE_FOR_XML","WHOLE_DOCUMENT","SET_CONFIG","FORCE_BODY","RETURN_DOM","RETURN_DOM_FRAGMENT","RETURN_TRUSTED_TYPE","SANITIZE_DOM","SANITIZE_NAMED_PROPS","SANITIZE_NAMED_PROPS_PREFIX","KEEP_CONTENT","IN_PLACE","USE_PROFILES","FORBID_CONTENTS","DEFAULT_FORBID_CONTENTS","DATA_URI_TAGS","DEFAULT_DATA_URI_TAGS","URI_SAFE_ATTRIBUTES","DEFAULT_URI_SAFE_ATTRIBUTES","MATHML_NAMESPACE","SVG_NAMESPACE","HTML_NAMESPACE","NAMESPACE","IS_EMPTY_INPUT","ALLOWED_NAMESPACES","DEFAULT_ALLOWED_NAMESPACES","PARSER_MEDIA_TYPE","SUPPORTED_PARSER_MEDIA_TYPES","DEFAULT_PARSER_MEDIA_TYPE","CONFIG","formElement","isRegexOrFunction","testValue","_parseConfig","cfg","MATHML_TEXT_INTEGRATION_POINTS","HTML_INTEGRATION_POINTS","COMMON_SVG_AND_HTML_ELEMENTS","ALL_SVG_TAGS","ALL_MATHML_TAGS","_checkValidNamespace","parent","tagName","parentTagName","_forceRemove","node","_removeAttribute","name","_initDocument","dirty","doc","leadingWhitespace","matches","dirtyPayload","body","_createNodeIterator","_isClobbered","elm","_isNode","_executeHook","entryPoint","currentNode","data","hook","_sanitizeElements","content","_isBasicCustomElement","parentNode","childNodes","childCount","i","childClone","expr","_isValidAttribute","lcTag","lcName","_sanitizeAttributes","attributes","hookEvent","attr","namespaceURI","attrValue","_sanitizeShadowDOM","fragment","shadowNode","shadowIterator","importedNode","returnNode","nodeIterator","serializedHTML","tag","hookFunction","purify","EDGE","tuiIsEdgeOlderThan","version","userAgent","tuiIsFirefox","tuiIsSafari","doc","_a","_b","_c","_d","_e","_f","_g","_h","win","isMacOsSafari","isIosSafari","makeRandomSalt","escapeRegExp","search","extractLinearGradientIdsFromSvg","svg","_a","ids","url","tuiSvgLinearGradientProcessor","salt","tuiIsString","newSvg","previousId","escapedId","newId","POLYMORPHEUS_CONTEXT","InjectionToken","PolymorpheusComponent","component","i","injector","useValue","Injector","PolymorpheusTemplate","template","cdr","_dir","_ctx","ɵɵdirectiveInject","TemplateRef","ChangeDetectorRef","ɵɵdefineDirective","PolymorpheusContext","$implicit","PolymorpheusOutletDirective","vcr","t","isDirective","TemplateRef","content","_a","context","ChangeDetectorRef","proxy","_","key","isComponent","PolymorpheusContext","_dir","_ctx","isTemplate","injector","ComponentFactoryResolver$1","ɵɵdirectiveInject","ViewContainerRef","Injector","ɵɵdefineDirective","ɵɵNgOnChangesFeature","PolymorpheusTemplate","PolymorpheusComponent","PolymorpheusModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","TUI","AbstractTuiInteractive","EventEmitter","_a","focused","focusVisible","ɵɵdefineDirective","rf","ctx","ɵɵattribute","ɵɵclassProp","AbstractTuiValueTransformer","AbstractTuiControl","ngControl","cdr","valueTransformer","Subject","EMPTY_FUNCTION","value","invalid","valid","touched","disabled","control","_b","_c","controlValue","NgModel","delay","startWith","map","filter","tuiIsPresent","distinctUntilChanged","switchMap","merge","takeUntil","onChange","componentValue","onTouched","oldValue","newValue","extractor","defaultFieldValue","ɵɵdirectiveInject","NgControl","ChangeDetectorRef","ɵɵInheritDefinitionFeature","tuiAsControl","useExisting","AbstractTuiController","ɵɵNgOnChangesFeature","AbstractTuiDialogService","Observable","idService","observer","BehaviorSubject","content","options","completeWith","result","dialog","item","ɵɵinject","TuiIdService","ɵɵdefineInjectable","AbstractTuiMultipleControl","AbstractTuiControl","ɵAbstractTuiMultipleControl_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineDirective","ɵɵInheritDefinitionFeature","AbstractTuiNullableControl","ɵAbstractTuiNullableControl_BaseFactory","AbstractTuiPortalService","TuiNoHostException","host","component","hostView","templateRef","context","viewRef","ɵɵdefineInjectable","AbstractTuiPortalHostComponent","injector","el","portalService","parent","factory","ComponentFactoryResolver$1","providers","Injector","ref","ɵɵdirectiveInject","INJECTOR$1","ElementRef","rf","ctx","ɵɵviewQuery","_c0","ViewContainerRef","_t","ɵɵqueryRefresh","ɵɵloadQuery","tuiCoerceBooleanProperty","value","TuiMapperPipe","value","mapper","args","ɵɵdefinePipe","TuiMapperPipeModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiScrollControlsComponent_ng_container_0_ng_container_1_div_1_Template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","bars_r1","ɵɵnextContext","ɵɵclassProp","TuiScrollControlsComponent_ng_container_0_ng_container_1_div_2_Template","TuiScrollControlsComponent_ng_container_0_ng_container_1_Template","ɵɵelementContainerStart","ɵɵtemplate","ɵɵelementContainerEnd","ɵɵadvance","ɵɵproperty","TuiScrollControlsComponent_ng_container_0_Template","ɵɵpipe","ctx_r1","ɵɵpipeBind1","MIN_WIDTH","getOffsetVertical","clientY","top","height","getOffsetHorizontal","clientX","left","width","TuiScrollbarDirective","zone","destroy$","animationFrame$","container","doc","el","nativeElement","mousedown$","tuiTypedFromEvent","mousemove$","mouseup$","mousedownWrapper$","merge","map","event","switchMap","rect","vertical","horizontal","takeUntil","tuiZonefree","scrollTop","scrollLeft","throttleTime","POLLING_TIME","tuiScrollFrom","scrollHeight","clientHeight","scrollWidth","clientWidth","compensation","offsetVertical","offsetHorizontal","offsetHeight","offsetWidth","maxTop","maxLeft","scrolledTop","scrolledLeft","ɵɵdirectiveInject","NgZone","TuiDestroyService","ANIMATION_FRAME","TUI_SCROLL_REF","DOCUMENT","ElementRef","ɵɵdefineDirective","ɵɵProvidersFeature","TuiScrollControlsComponent","isIOS","scrollRef","startWith","distinctUntilChanged","a","b","tuiZoneOptimized","TUI_IS_IOS","ɵɵdefineComponent","NgIf","AsyncPipe","TuiScrollRefDirective","ɵɵdefineDirective","ɵɵProvidersFeature","TUI_SCROLL_REF","ElementRef","TuiScrollControlsModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","decorateMethod","originalMethod","previousArgs","originalFnWasCalledLeastAtOnce","pureValue","args","arg","index","decorateGetter","originalGetter","propertyKey","enumerable","value","tuiPure","target","propertyKeyOrContext","descriptor","context","TuiPureException","get","original","patched","TuiActiveZoneDirective","active$","zone","el","directParentActiveZone","_a","map","element","startWith","distinctUntilChanged","skip","tuiZoneOptimized","_b","node","item","index","array","activeZone","tuiArrayRemove","ɵɵdirectiveInject","TUI_ACTIVE_ELEMENT","NgZone","ElementRef","ɵɵdefineDirective","rf","ctx","ɵɵlistener","ɵɵresolveDocument","__decorate","tuiPure","TuiActiveZoneModule","ɵɵdefineNgModule","ɵɵdefineInjector","AbstractTuiAutofocusHandler","focusable","el","_a","ɵɵinvalidFactory","ɵɵdefineDirective","TIMEOUT","NG_ANIMATION_SELECTOR","TuiDefaultAutofocusHandler","animationFrame$","race","timer","throttleTime","POLLING_TIME","map","skipWhile","take","ɵɵdirectiveInject","TUI_FOCUSABLE_ITEM_ACCESSOR","ElementRef","ANIMATION_FRAME","ɵɵInheritDefinitionFeature","TEXTFIELD_ATTRS","TuiIosAutofocusHandler","renderer","zone","win","fakeInput","duration","fakeFocusTimeoutId","elementFocusTimeoutId","blurHandler","focusHandler","rect","tuiPx","element","attr","value","tuiIsPresent","Renderer2","NgZone","WINDOW","TUI_AUTOFOCUS_DEFAULT_OPTIONS","TUI_AUTOFOCUS_OPTIONS","tuiCreateToken","tuiAutoFocusOptionsProvider","options","tuiProvideOptions","TUI_AUTOFOCUS_HANDLER","InjectionToken","TUI_AUTOFOCUS_PROVIDERS","isIos","Optional","Self","TUI_IS_IOS","TuiDestroyService","TuiAutoFocusDirective","handler","destroy$","tuiCoerceBooleanProperty","takeUntil","ɵɵProvidersFeature","TuiAutoFocusModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiAutofilledStyleComponent","ɵɵdefineComponent","rf","ctx","TuiAutofilledDirective","directiveStyles","EventEmitter","propertyName","target","_a","ɵɵdirectiveInject","TuiDirectiveStylesService","ɵɵdefineDirective","ɵɵlistener","$event","ɵɵclassProp","TuiAutofilledModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiCheckedDirective","EventEmitter","checked","ɵɵdefineDirective","rf","ctx","ɵɵlistener","$event","ɵɵhostProperty","TuiCheckedModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiFocusVisibleDirective","tuiFocusVisibleChange","ɵɵdirectiveInject","TuiFocusVisibleService","ɵɵdefineDirective","ɵɵProvidersFeature","TuiDestroyService","TuiFocusVisibleModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiFocusableDirective","ɵɵdefineDirective","rf","ctx","ɵɵhostProperty","TuiFocusableModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiFocusedDirective","nativeElement","zone","merge","tuiTypedFromEvent","map","tuiIsNativeFocused","startWith","distinctUntilChanged","skip","tuiZoneOptimized","ɵɵ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","ɵɵinject","ElementRef","NgZone","ɵɵdefineInjectable","TuiHoveredDirective","tuiHoveredChange","ɵɵdirectiveInject","ɵɵdefineDirective","ɵɵProvidersFeature","TuiHoveredModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiItemDirective","ɵɵdefineDirective","TuiItemModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiLetContext","internalDirectiveInstance","TuiLetDirective","viewContainer","templateRef","_dir","_ctx","ɵɵdirectiveInject","ViewContainerRef","TemplateRef","ɵɵdefineDirective","TuiLetModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiObscuredDirective","activeZone","obscured$","Subject","mapped$","map","obscuredBy","element","tuiIfMap","enabled","ɵɵdirectiveInject","TuiActiveZoneDirective","TuiObscuredService","ɵɵdefineDirective","ɵɵProvidersFeature","TuiParentsScrollService","TuiDestroyService","TuiObscuredModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiOverscrollDirective","nativeElement","zone","destroy$","tuiTypedFromEvent","filter","tuiZonefree","takeUntil","event","switchMap","touches","clientX","clientY","deltaX","deltaY","vertical","tap","changedTouch","negative","_a","target","currentTarget","cancelable","tuiIsElement","tuiGetScrollParent","tuiCanScroll","ɵɵdirectiveInject","ElementRef","NgZone","TuiDestroyService","ɵɵdefineDirective","rf","ctx","ɵɵstyleProp","ɵɵProvidersFeature","TuiOverscrollModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","TuiDropdownPortalService","AbstractTuiPortalService","ɵTuiDropdownPortalService_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineInjectable","TuiDropdownHostComponent","AbstractTuiPortalHostComponent","ɵTuiDropdownHostComponent_BaseFactory","ɵɵdefineComponent","ɵɵProvidersFeature","ɵɵInheritDefinitionFeature","rf","ctx","ɵɵprojectionDef","ɵɵprojection","ɵɵelementContainer","TuiDropdownHostModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiPressedDirective","el","takeOnlyTrustedEvents","tuiPressedObservable","ɵɵdirectiveInject","ElementRef","TUI_TAKE_ONLY_TRUSTED_EVENTS","ɵɵdefineDirective","TuiPressedModule","ɵɵdefineNgModule","ɵɵdefineInjector","MAX_VALUE","TuiRepeatTimesContext","$implicit","TuiRepeatTimesDirective","viewContainer","templateRef","count","safeCount","tuiClamp","length","index","amount","ɵɵdirectiveInject","ViewContainerRef","TemplateRef","ɵɵdefineDirective","TuiRepeatTimesModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiDayOfWeek","TuiMonthNumber","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","TUI_CACHE_BUSTING_PAYLOAD","TUI_VERSION","DEFAULT_ICONS_PATH","name","TUI_DEFAULT_MARKER_HANDLER","EMPTY_ARRAY","TUI_DEFAULT_NUMBER_FORMAT","CHAR_NO_BREAK_SPACE","tuiEditingKeys","TUI_SCROLL_INTO_VIEW","TUI_ICON_ERROR","TUI_HINT_DIRECTIONS","tuiCheckFixedPosition","element","tuiGetViewportWidth","document","innerWidth","tuiGetWordRange","currentRange","range","startContainer","startOffset","endContainer","endOffset","ownerDocument","treeWalker","svgNodeFilter","container","textContent","content","offset","CHAR_NO_BREAK_SPACE","CHAR_ZERO_WIDTH_SPACE","result","item","WIDTH_SEARCH","HEIGHT_SEARCH","START","tuiProcessIcon","source","name","src","attributes","indexOfWidth","indexOfHeight","widthOffset","heightOffset","widthString","heightString","width","height","ITEM_SIZE","CONTENT_SIZE","tuiGetBorder","hasIcon","hasCleaner","hasTooltip","hasContent","size","offset","border","tuiIconsPathFactory","staticPath","base","name","TUI_CACHE_BUSTING_PAYLOAD","DEFAULT_ICONS_PATH","tuiIsEditingKey","key","tuiEditingKeys","tuiIsObscured","el","exceptSelector","_a","tuiGetElementObscures","tuiIsPresumedHTMLString","candidate","trimmed","tuiOverrideOptions","override","fallback","directive","options","result","SIZES","tuiSizeBigger","biggerThanSize","tuiIsMobile","win","mobile","tuiGetViewportWidth","TuiAppearance","TuiInteractiveState","TuiRangeState","TUI_REDUCED_MOTION","tuiCreateTokenFromFactory","_a","_b","_c","inject","DOCUMENT","TUI_ANIMATIONS_DEFAULT_DURATION","TUI_ANIMATIONS_DURATION","TUI_ANIMATION_OPTIONS","TUI_ASSERT_ENABLED","isDevMode","COMMON_ICONS","TUI_COMMON_ICONS","tuiCreateToken","TUI_DATA_LIST_ACCESSOR","InjectionToken","tuiAsDataListAccessor","useExisting","TUI_DATA_LIST_HOST","tuiAsDataListHost","TUI_DAY_TYPE_HANDLER","tuiCreateToken","day","TUI_DOCUMENT_OR_SHADOW_ROOT","TUI_ELEMENT_REF","TUI_FIRST_DAY_OF_WEEK","TuiDayOfWeek","TUI_MONTHS","tuiCreateTokenFromFactory","tuiExtractI18n","TUI_CLOSE_WORD","TUI_NOTHING_FOUND_MESSAGE","TUI_DEFAULT_ERROR_MESSAGE","TUI_SPIN_TEXTS","TUI_SHORT_WEEK_DAYS","TUI_DEFAULT_ICONS_PLACE","TUI_ICONS_PLACE","TUI_ICONS","TUI_ICONS_PATH","tuiIconsPathFactory","inject","TUI_MEDIA","TUI_IS_MOBILE_RES","win","WINDOW","media","tuiTypedFromEvent","share","startWith","map","tuiIsMobile","distinctUntilChanged","tuiZoneOptimized","NgZone","TUI_LEGACY_MASK","TUI_MODE","STATUS_ICON","TUI_NOTIFICATION_DEFAULT_OPTIONS","$implicit","TUI_NOTIFICATION_OPTIONS","TUI_NUMBER_FORMAT","tuiCreateToken","TUI_DEFAULT_NUMBER_FORMAT","TUI_NUMBER_FORMAT_OBSERVABLE","tuiCreateToken","of","TUI_DEFAULT_NUMBER_FORMAT","TUI_OPTION_CONTENT","InjectionToken","convertToSundayFirstWeekFormat","weekDaysNames","sundayIndex","TUI_ORDERED_SHORT_WEEK_DAYS","tuiCreateTokenFromFactory","firstDayOfWeekIndex","inject","TUI_FIRST_DAY_OF_WEEK","TUI_SHORT_WEEK_DAYS","map","weekDays","TUI_SANITIZER","InjectionToken","TUI_SELECTION_STREAM","tuiCreateTokenFromFactory","doc","inject","DOCUMENT","merge","tuiTypedFromEvent","switchMap","takeUntil","share","TUI_SPIN_ICONS","tuiCreateToken","TUI_SVG_CONTENT_PROCESSOR","tuiSvgLinearGradientProcessor","TUI_SVG_SRC_PROCESSOR","identity","TUI_TEXTFIELD_APPEARANCE","TuiAppearance","TUI_TEXTFIELD_HOST","InjectionToken","tuiAsTextfieldHost","useExisting","TUI_THEME","TUI_VALUE_ACCESSOR","TUI_VIEWPORT","win","WINDOW","tuiAsViewport","TuiDriver","Observable","tuiAsDriver","useExisting","TuiVehicle","tuiAsVehicle","AbstractTuiDriverDirective","destroy$","drivers","vehicles","vehicle","type","merge","distinctUntilChanged","takeUntil","value","ɵɵdirectiveInject","TuiDestroyService","ɵɵdefineDirective","AbstractTuiTextfieldHost","host","_a","_input","AbstractTuiControl","tuiFallbackAccessor","accessors","fallback","accessor","TuiPositionAccessor","tuiPositionAccessorFor","SkipSelf","Optional","tuiAsPositionAccessor","TuiRectAccessor","tuiRectAccessorFor","tuiFallbackRectAccessor","tuiAsRectAccessor","PRIMARY_OUTLET","RouteTitleKey","ParamsAsMap","params","name","v","convertToParamMap","defaultUrlMatcher","segments","segmentGroup","route","parts","posParams","index","part","segment","shallowEqualArrays","a","b","i","shallowEqual","k1","getDataKeys","k2","key","equalArraysOrString","obj","aSorted","bSorted","val","last","wrapIntoObservable","value","isObservable","isPromise","from","of","pathCompareMap","equalSegmentGroups","containsSegmentGroup","paramCompareMap","equalParams","containsParams","containsTree","container","containee","options","matrixParams","equalPath","matrixParamsMatch","c","containsSegmentGroupHelper","containeePaths","current","next","containerPaths","containeeSegment","UrlTree","root","UrlSegmentGroup","queryParams","fragment","DEFAULT_SERIALIZER","children","serializePaths","UrlSegment","path","parameters","serializePath","equalSegments","as","bs","mapChildrenIntoArray","fn","res","childOutlet","child","UrlSerializer","_UrlSerializer","t","ɵɵdefineInjectable","DefaultUrlSerializer","url","p","UrlParser","tree","serializeSegment","query","serializeQueryParams","encodeUriFragment","primary","k","encodeUriString","s","encodeUriQuery","encodeUriSegment","decode","decodeQuery","serializeMatrixParams","strParams","SEGMENT_RE","matchSegments","str","match","MATRIX_PARAM_SEGMENT_RE","matchMatrixKeySegments","QUERY_PARAM_RE","matchQueryParams","QUERY_PARAM_VALUE_RE","matchUrlQueryParamValue","RuntimeError","valueMatch","decodedKey","decodedVal","currentVal","allowPrimary","outletName","createRoot","rootCandidate","squashSegmentGroup","newChildren","childCandidate","grandChildOutlet","grandChild","mergeTrivialChildren","isUrlTree","createUrlTreeFromSnapshot","relativeTo","commands","relativeToUrlSegmentGroup","createSegmentGroupFromRoute","createUrlTreeFromSegmentGroup","targetGroup","createSegmentGroupFromRouteRecursive","currentRoute","childOutlets","childSnapshot","rootSegmentGroup","nav","computeNavigation","position","findStartingPositionForTargetGroup","newSegmentGroup","updateSegmentGroupChildren","updateSegmentGroup","isMatrixParams","command","isCommandWithOutlets","oldRoot","oldSegmentGroup","qp","replaceSegment","newRoot","oldSegment","newSegment","Navigation","isAbsolute","numberOfDoubleDots","cmdWithOutlet","cmd","cmdIdx","outlets","urlPart","partIndex","Position","processChildren","target","modifier","createPositionApplyingDoubleDots","group","g","ci","dd","getOutlets","startIndex","m","prefixedWith","slicedCommands","createNewSegmentGroup","o","childrenOfEmptyChild","outlet","currentCommandIndex","currentPathIndex","noMatch","curr","compare","paths","createNewSegmentChildren","stringify","IMPERATIVE_NAVIGATION","EventType","RouterEvent","id","NavigationStart","navigationTrigger","restoredState","NavigationEnd","urlAfterRedirects","NavigationCancellationCode","NavigationSkippedCode","NavigationCancel","reason","code","NavigationSkipped","NavigationError","error","RoutesRecognized","state","GuardsCheckStart","GuardsCheckEnd","shouldActivate","ResolveStart","ResolveEnd","RouteConfigLoadStart","RouteConfigLoadEnd","ChildActivationStart","snapshot","ChildActivationEnd","ActivationStart","ActivationEnd","BeforeActivateRoutes","RedirectRequest","url","navigationBehaviorOptions","OutletContext","injector","ChildrenOutletContexts","_ChildrenOutletContexts","parentInjector","childName","outlet","context","contexts","t","ɵɵinject","EnvironmentInjector","ɵɵdefineInjectable","Tree","root","p","n","findNode","findPath","c","cc","s","value","node","child","path","TreeNode","children","nodeChildrenAsMap","map","RouterState","snapshot","setRouterState","createEmptyState","rootComponent","createEmptyStateSnapshot","emptyUrl","BehaviorSubject","UrlSegment","emptyParams","emptyData","emptyQueryParams","fragment","activated","ActivatedRoute","PRIMARY_OUTLET","ActivatedRouteSnapshot","RouterStateSnapshot","urlSubject","paramsSubject","queryParamsSubject","fragmentSubject","dataSubject","component","futureSnapshot","_a","d","RouteTitleKey","of","convertToParamMap","getInherited","route","parent","paramsInheritanceStrategy","inherited","routeConfig","__spreadValues","hasStaticTitle","url","params","queryParams","data","resolve","segment","matched","serializeNode","state","advanceActivatedRoute","currentSnapshot","nextSnapshot","shallowEqual","shallowEqualArrays","equalParamsAndUrlSegments","a","b","equalUrlParams","equalSegments","parentsMismatch","config","RouterOutlet","_RouterOutlet","EventEmitter","inject","ViewContainerRef","ChangeDetectorRef","INPUT_BINDER","changes","firstChange","previousValue","outletName","RuntimeError","cmp","ref","activatedRoute","environmentInjector","location","childContexts","OutletInjector","ɵɵdefineDirective","ɵɵNgOnChangesFeature","_OutletInjector","token","notFoundValue","InjectionToken","createRouterState","routeReuseStrategy","curr","prevState","root","createNode","RouterState","value","children","createOrReuseChildren","TreeNode","detachedRouteHandle","tree","createActivatedRoute","c","child","p","ActivatedRoute","BehaviorSubject","RedirectCommand","redirectTo","navigationBehaviorOptions","NAVIGATION_CANCELING_ERROR","redirectingNavigationError","urlSerializer","redirect","isUrlTree","error","navigationCancelingError","NavigationCancellationCode","message","code","isRedirectingNavigationCancelingError","isNavigationCancelingError","ɵEmptyOutletComponent","_ɵEmptyOutletComponent","t","ɵɵdefineComponent","ɵɵStandaloneFeature","rf","ctx","ɵɵelement","RouterOutlet","getOrCreateRouteInjectorIfNeeded","route","currentInjector","createEnvironmentInjector","standardizeConfig","r","children","c","__spreadProps","__spreadValues","PRIMARY_OUTLET","ɵEmptyOutletComponent","getOutlet","route","sortByMatchingOutlets","routes","outletName","sortedConfig","getClosestRouteInjector","snapshot","_a","s","activateRoutes","rootContexts","routeReuseStrategy","forwardEvent","inputBindingEnabled","map","t","ActivateRoutes","futureState","currState","parentContexts","futureRoot","currRoot","advanceActivatedRoute","futureNode","currNode","contexts","children","nodeChildrenAsMap","futureChild","childOutletName","v","parentContext","future","curr","context","route","treeNode","componentRef","c","ActivationEnd","ChildActivationEnd","stored","injector","getClosestRouteInjector","CanActivate","path","CanDeactivate","component","getAllRouteGuards","getChildRouteGuards","getCanActivateChild","p","canActivateChild","getTokenOrFunctionIdentity","tokenOrFunction","NOT_FOUND","result","isInjectable","futurePath","checks","prevChildren","getRouteGuards","k","deactivateRouteAndItsChildren","shouldRun","shouldRunGuardsAndResolvers","mode","equalPath","shallowEqual","equalParamsAndUrlSegments","r","childName","node","isFunction","isBoolean","isCanLoad","guard","isCanActivate","isCanActivateChild","isCanDeactivate","isCanMatch","isEmptyError","EmptyError","INITIAL_VALUE","prioritizedGuardValue","switchMap","obs","combineLatest","o","take","startWith","results","isRedirect","filter","item","val","isUrlTree","RedirectCommand","checkGuards","mergeMap","targetSnapshot","currentSnapshot","canActivateChecks","canDeactivateChecks","of","__spreadProps","__spreadValues","runCanDeactivateChecks","canDeactivate","runCanActivateChecks","guardsResult","futureRSS","currRSS","from","check","runCanDeactivate","first","futureSnapshot","concatMap","concat","fireChildActivationStart","fireActivationStart","runCanActivateChild","runCanActivate","snapshot","ActivationStart","ChildActivationStart","futureARS","canActivate","canActivateObservables","defer","closestInjector","guardVal","runInInjectionContext","wrapIntoObservable","canActivateChildGuardsMapped","_","d","guardsMapped","currARS","canDeactivateObservables","runCanLoadGuards","segments","urlSerializer","canLoad","canLoadObservables","injectionToken","redirectIfUrlTree","pipe","tap","redirectingNavigationError","runCanMatchGuards","canMatch","canMatchObservables","NoMatch","segmentGroup","AbsoluteRedirect","urlTree","noMatch$1","throwError","namedOutletsRedirect","redirectTo","throwError","RuntimeError","canLoadFails","route","navigationCancelingError","NavigationCancellationCode","ApplyRedirects","urlSerializer","urlTree","res","c","of","PRIMARY_OUTLET","segments","posParams","currentSnapshot","injector","redirectToFn","queryParams","fragment","routeConfig","url","outlet","params","data","title","newRedirect","runInInjectionContext","UrlTree","AbsoluteRedirect","newTree","newRoot","redirectToParams","actualParams","k","v","sourceName","group","updatedSegments","children","name","child","UrlSegmentGroup","redirectToSegments","actualSegments","s","redirectToUrlSegment","pos","idx","noMatch","matchWithChecks","segmentGroup","result","match","getOrCreateRouteInjectorIfNeeded","runCanMatchGuards","map","__spreadValues","createWildcardMatchResult","defaultUrlMatcher","parameters","last","split","consumedSegments","slicedSegments","config","containsEmptyPathMatchesWithNamedOutlets","createChildrenForEmptyPaths","containsEmptyPathMatches","addEmptyPathsToChildrenIfNeeded","routes","emptyPathMatch","getOutlet","primarySegment","r","isImmediateMatch","rawSegment","noLeftoversInUrl","NoLeftoversInUrl","recognize$1","configLoader","rootComponentType","paramsInheritanceStrategy","Recognizer","MAX_ALLOWED_REDIRECTS","e","rootSegmentGroup","rootSnapshot","rootNode","TreeNode","routeState","RouterStateSnapshot","tree","createUrlTreeFromSnapshot","ActivatedRouteSnapshot","catchError","NoMatch","parentRoute","childOutlets","from","concatMap","childOutlet","sortedConfig","sortByMatchingOutlets","scan","outletChildren","defaultIfEmpty","mergeMap","noMatch$1","mergedChildren","mergeEmptyPathMatches","sortActivatedRouteSnapshots","allowRedirects","first","x","isEmptyError","matched","positionalParamSegments","remainingSegments","getData","getResolve","inherited","getInherited","newSegments","matchResult","switchMap","childConfig","childInjector","snapshot","matchedOnOutlet","runCanLoadGuards","shouldLoadResult","tap","cfg","nodes","a","b","hasEmptyPathConfig","node","mergedNodes","duplicateEmptyPathNode","resultNode","mergedNode","n","getData","route","getResolve","recognize","injector","configLoader","rootComponentType","config","serializer","paramsInheritanceStrategy","mergeMap","t","recognize$1","map","targetSnapshot","urlAfterRedirects","__spreadProps","__spreadValues","resolveData","canActivateChecks","of","routesWithResolversToRun","check","routesNeedingDataUpdates","newRoute","flattenRouteTree","routesProcessed","from","concatMap","runResolve","getInherited","tap","takeLast","_","EMPTY","descendants","child","futureARS","futureRSS","resolve","hasStaticTitle","RouteTitleKey","resolveNode","resolvedData","keys","getDataKeys","data","key","getResolver","first","value","RedirectCommand","redirectingNavigationError","DefaultUrlSerializer","mapTo","catchError","e","isEmptyError","throwError","injectionToken","closestInjector","getClosestRouteInjector","resolver","getTokenOrFunctionIdentity","resolverValue","runInInjectionContext","wrapIntoObservable","switchTap","next","switchMap","v","nextResult","TitleStrategy","_TitleStrategy","snapshot","pageTitle","PRIMARY_OUTLET","ɵɵdefineInjectable","inject","DefaultTitleStrategy","_DefaultTitleStrategy","title","ɵɵinject","Title","ROUTER_CONFIGURATION","InjectionToken","ROUTES","RouterConfigLoader","_RouterConfigLoader","Compiler","loadRunner","maybeUnwrapDefaultExport","component","finalize","loader","ConnectableObservable","Subject","refCount","parentInjector","loadChildren","compiler","onLoadEndListener","NgModuleFactory$1","factoryOrRoutes","rawRoutes","requireStandaloneComponents","standardizeConfig","isWrappedDefaultExport","input","UrlHandlingStrategy","_UrlHandlingStrategy","DefaultUrlHandlingStrategy","_DefaultUrlHandlingStrategy","url","newUrlPart","wholeUrl","CREATE_VIEW_TRANSITION","NAVIGATION_ERROR_HANDLER","InjectionToken","NavigationTransitions","_NavigationTransitions","Subject","inject","RouterConfigLoader","EnvironmentInjector","UrlSerializer","ChildrenOutletContexts","Location","INPUT_BINDER","TitleStrategy","ROUTER_CONFIGURATION","UrlHandlingStrategy","CREATE_VIEW_TRANSITION","of","onLoadStart","RouteConfigLoadStart","onLoadEnd","RouteConfigLoadEnd","_a","request","id","__spreadProps","__spreadValues","router","initialUrlTree","initialRouterState","BehaviorSubject","IMPERATIVE_NAVIGATION","filter","t","map","switchMap","overallTransitionState","completed","errored","NavigationCancellationCode","EMPTY","urlTransition","onSameUrlNavigation","reason","NavigationSkipped","NavigationSkippedCode","_b","transition","NavigationStart","recognize","tap","routesRecognized","RoutesRecognized","extractedUrl","source","restoredState","extras","navStart","targetSnapshot","createEmptyState","guardsStart","GuardsCheckStart","getAllRouteGuards","checkGuards","evt","redirectingNavigationError","guardsEnd","GuardsCheckEnd","switchTap","resolveStart","ResolveStart","dataResolved","resolveData","resolveEnd","ResolveEnd","loadComponents","route","loaders","loadedComponent","child","combineLatest","defaultIfEmpty","take","currentSnapshot","viewTransitionStarted","from","targetRouterState","createRouterState","BeforeActivateRoutes","activateRoutes","NavigationEnd","takeUntil","err","finalize","catchError","e","isNavigationCancelingError","NavigationCancel","isRedirectingNavigationCancelingError","RedirectRequest","navigationError","NavigationError","navigationErrorHandlerResult","runInInjectionContext","RedirectCommand","message","cancellationCode","errorHandlerResult","ee","code","navCancel","ɵɵdefineInjectable","isBrowserTriggeredNavigation","RouteReuseStrategy","_RouteReuseStrategy","DefaultRouteReuseStrategy","BaseRouteReuseStrategy","detachedTree","future","curr","_DefaultRouteReuseStrategy","ɵDefaultRouteReuseStrategy_BaseFactory","ɵɵgetInheritedFactory","StateManager","_StateManager","HistoryStateManager","_HistoryStateManager","UrlTree","listener","event","currentTransition","rawUrl","url","path","currentBrowserPageId","state","navigation","restoringFromCaughtError","targetPagePosition","navigationId","routerPageId","ɵHistoryStateManager_BaseFactory","NavigationResult","afterNextNavigation","action","result","defaultErrorHandler","error","exactMatchOptions","subsetMatchOptions","Router","_Router","Console","PendingTasks","ROUTES","Subscription","subscription","currentNavigation","opts","mergedTree","isPublicRouterEvent","rootComponentType","stateCopy","urlTree","config","standardizeConfig","commands","navigationExtras","relativeTo","queryParams","fragment","queryParamsHandling","preserveFragment","f","q","relativeToUrlSegmentGroup","relativeToSnapshot","createSegmentGroupFromRoute","createUrlTreeFromSegmentGroup","isUrlTree","validateCommands","matchOptions","options","containsTree","params","key","value","priorPromise","resolve","reject","promise","res","rej","taskId","i","RuntimeError","ROUTER_SCROLLER","InjectionToken","provideRouter","routes","features","makeEnvironmentProviders","ROUTES","ActivatedRoute","rootRoute","Router","APP_BOOTSTRAP_LISTENER","getBootstrapListener","feature","router","getBootstrapListener","injector","inject","Injector","bootstrappedComponentRef","_a","_b","ref","ApplicationRef","router","Router","bootstrapDone","BOOTSTRAP_DONE","INITIAL_NAVIGATION","ROUTER_PRELOADER","InjectFlags","ROUTER_SCROLLER","InjectionToken","Subject","ROUTER_PRELOADER","InjectionToken","TuiBreakpointService","Observable","media","ngZone","size$","subscriber","a","b","ret","key","map","width","size","distinctUntilChanged","tuiZoneOptimized","shareReplay","ɵɵinject","TUI_MEDIA","NgZone","TUI_WINDOW_SIZE","ɵɵdefineInjectable","TuiFormatDateService","locale","timestamp","of","LOCALE_ID","TuiHintService","BehaviorSubject","directive","hint","TuiPositionService","Observable","el","animationFrame","zone","accessor","subscriber","map","rect","tuiZonefree","finalize","EMPTY_CLIENT_RECT","ɵɵinject","ElementRef","ANIMATION_FRAME","NgZone","TuiPositionAccessor","ɵɵdefineInjectable","TuiSvgService","tuiSanitizer","sanitizer","icons","BehaviorSubject","value","key","name","src","map","parsed","tuiProcessIcon","SecurityContext","ɵɵinject","TUI_SANITIZER","DomSanitizer","TUI_ICONS","ɵɵdefineInjectable","TuiVisualViewportService","win","isWebkit","y","x","_a","_b","WINDOW","TUI_IS_WEBKIT","TuiSvgComponent_ng_container_0_div_1_Template","rf","ctx","ɵɵelement","innerHTML_r1","ɵɵnextContext","ɵɵproperty","ɵɵsanitizeHtml","TuiSvgComponent_ng_container_0_ng_template_2_Template","_r2","ɵɵgetCurrentView","ɵɵnamespaceSVG","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r2","ɵɵresetView","ɵɵelementEnd","ɵɵadvance","ɵɵattribute","TuiSvgComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵtemplate","ɵɵtemplateRefExtractor","ɵɵelementContainerEnd","useTemplate_r4","ɵɵreference","TUI_DEPRECATED_ICONS","TUI_SVG_DEFAULT_OPTIONS","TUI_DEFAULT_ICONS_PLACE","tuiIconsPathFactory","identity","tuiSvgLinearGradientProcessor","src","oldIcon","newIcon","TUI_SVG_OPTIONS","tuiCreateTokenFromFactory","inject","TUI_ICONS_PLACE","TUI_ICONS_PATH","TUI_SVG_SRC_PROCESSOR","TUI_SVG_CONTENT_PROCESSOR","TUI_SVG_SRC_INTERCEPTORS","InjectionToken","UNDEFINED_NAMED_ICON","MISSING_EXTERNAL_ICON","FAILED_EXTERNAL_ICON","TuiSvgComponent","doc","win","options","srcInterceptors","tuiSanitizer","svgService","staticRequestService","sanitizer","el","baseHref","ReplaySubject","switchMap","tuiIsString","of","startWith","src","_a","deprecated","newSrc","interceptor","tuiGetDocumentOrShadowRoot","TUI_CACHE_BUSTING_PAYLOAD","tuiIsPresumedHTMLString","use","isUse","message","icon","event","TUI_ICON_ERROR","name","iconsPath","SecurityContext","url","catchError","map","response","ɵɵdirectiveInject","DOCUMENT","WINDOW","TUI_SVG_OPTIONS","TUI_SVG_SRC_INTERCEPTORS","TUI_SANITIZER","TuiSvgService","TuiStaticRequestService","DomSanitizer","ElementRef","TUI_BASE_HREF","ɵɵdefineComponent","rf","ctx","ɵɵtemplate","TuiSvgComponent_ng_container_0_Template","ɵɵpipe","ɵɵproperty","ɵɵpipeBind1","TuiLetDirective","NgIf","AsyncPipe","__decorate","tuiPure","TuiSvgModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiLetModule","TRANSITION","DURATION","STAGGER","tuiHeightCollapse","trigger","transition","style","animate","tuiHeightCollapseList","query","stagger","tuiWidthCollapse","tuiWidthCollapseList","tuiFadeIn","tuiFadeInList","tuiFadeInTop","tuiFadeInBottom","tuiDropdownAnimation","tuiScaleIn","tuiPop","tuiScaleInList","tuiSlideIn","tuiSlideInLeft","tuiSlideInLeftList","tuiSlideInRight","tuiSlideInRightList","tuiSlideInTop","tuiSlideInTopList","tuiSlideInBottom","tuiSlideInBottomList","TuiModeDirective","AbstractTuiController","ɵTuiModeDirective_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineDirective","ɵɵInheritDefinitionFeature","TUI_IS_MOBILE_RES_PROVIDER","TUI_IS_MOBILE_RES","SkipSelf","ElementRef","mobile$","nativeElement","MODE_PROVIDER","TUI_MODE","Optional","TuiModeDirective","mode","mode$","startWith","map","of","_c0","TuiScrollbarComponent_tui_scroll_controls_0_Template","rf","ctx","ɵɵelement","TuiScrollbarComponent","cssRef","el","userAgent","isIos","tuiIsFirefox","ElementRef","element","detail","_a","nativeElement","offsetTop","offsetLeft","tuiGetElementOffset","clientHeight","clientWidth","offsetHeight","offsetWidth","scrollTop","scrollLeft","ɵɵ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","ɵɵadvance","TuiScrollControlsComponent","NgIf","TuiScrollbarModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiScrollControlsModule","dasharize","camel","letterLetter","AbstractEventPlugin","event","v","BindEventPlugin","element","EMPTY","method","zone$","sub","concat","takeWhile","defer","key","value","unit","ɵBindEventPlugin_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineInjectable","GLOBAL_HANDLER","InjectionToken","document","inject","DOCUMENT","name","GlobalEventPlugin","_","handler","ɵGlobalEventPlugin_BaseFactory","OptionsEventPlugin","ɵOptionsEventPlugin_BaseFactory","PreventEventPlugin","wrapped","ɵPreventEventPlugin_BaseFactory","SelfEventPlugin","ɵSelfEventPlugin_BaseFactory","SilentEventPlugin","ɵSilentEventPlugin_BaseFactory","StopEventPlugin","ɵStopEventPlugin_BaseFactory","ZoneEventPlugin","ɵZoneEventPlugin_BaseFactory","PLUGINS","NG_EVENT_PLUGINS","useClass","EVENT_MANAGER_PLUGINS","shouldCall","predicate","_target","_key","desc","args","EventPluginsModule","plugin","SilentEventPlugin","ɵɵinject","EVENT_MANAGER_PLUGINS","ɵɵdefineNgModule","ɵɵdefineInjector","NG_EVENT_PLUGINS","_c0","a0","TuiDropdownComponent_div_3_Template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","text_r2","ɵɵadvance","ɵɵtextInterpolate1","TUI_DROPDOWN_COMPONENT","tuiCreateTokenFromFactory","TuiDropdownComponent","TuiDropdownOpenDirective","EventEmitter","open","_a","ɵɵdefineDirective","ɵɵNgOnChangesFeature","TuiDropdownDirective","destroy$","el","dropdown","injector","dropdownService","Subject","PolymorpheusComponent","throttleTime","takeUntil","_b","tuiCheckFixedPosition","show","ɵɵdirectiveInject","TuiDestroyService","ElementRef","INJECTOR$1","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","ɵɵ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","TuiDropdownPositionDirective","TuiPositionAccessor","viewport","accessors","directive","width","height","_b","hostRect","EMPTY_CLIENT_RECT","viewportRect","minHeight","align","direction","offset","limitWidth","previous","available","rectWidth","right","left","position","better","tuiFallbackRectAccessor","TUI_VIEWPORT","TuiRectAccessor","TuiDropdownDirective","__decorate","tuiPure","TuiDropdownComponent","vvs","position$","destroy$","animation","el","accessor","win","mode$","hoverDirective","map","point","takeUntil","top","hovered","style","maxHeight","innerHeight","clientRect","rect","offsetX","offsetY","sided","tuiPx","nativeElement","ownerDocument","root","focusable","tuiGetClosestFocusable","TuiVisualViewportService","TuiPositionService","TuiDestroyService","TUI_ANIMATION_OPTIONS","ElementRef","WINDOW","TUI_MODE","ɵɵdefineComponent","rf","ctx","ɵɵlistener","ɵɵsyntheticHostProperty","ɵɵattribute","tuiPositionAccessorFor","tuiRectAccessorFor","MODE_PROVIDER","_r1","ɵɵgetCurrentView","ɵɵelementStart","$event","ɵɵrestoreView","ɵɵresetView","ɵɵelementEnd","ɵɵtemplate","TuiDropdownComponent_div_3_Template","activeZone_r3","ɵɵreference","ɵɵadvance","ɵɵproperty","ɵɵpureFunction1","_c0","TuiScrollbarComponent","TuiActiveZoneDirective","TuiOverscrollDirective","TuiHoveredDirective","PolymorpheusOutletDirective","tuiDropdownAnimation","TuiDropdownDriverDirective","AbstractTuiDriverDirective","destroy$","drivers","vehicles","ɵɵdirectiveInject","TuiDestroyService","TuiDriver","TuiVehicle","ɵɵdefineDirective","ɵɵProvidersFeature","ɵɵInheritDefinitionFeature","TuiDropdownManualDirective","TuiDriver","subscriber","BehaviorSubject","ɵɵdefineDirective","ɵɵProvidersFeature","tuiAsDriver","ɵɵInheritDefinitionFeature","ɵɵNgOnChangesFeature","TuiDropdownPositionSidedDirective","TuiPositionAccessor","options","viewport","vertical","rect","_a","_b","height","width","hostRect","EMPTY_CLIENT_RECT","direction","minHeight","offset","align","available","position","better","maxLeft","left","ɵɵdirectiveInject","TUI_DROPDOWN_OPTIONS","TUI_VIEWPORT","TuiDropdownPositionDirective","tuiAsPositionAccessor","TuiDropdownSelectionDirective","range","doc","selection$","el","vcr","dropdown","ALWAYS_TRUE_HANDLER","combineLatest","map","distinctUntilChanged","x","y","handler","contained","tuiIsTextNode","visible","tuiIsString","commonAncestorContainer","element","tuiIsElement","tuiGetWordRange","active","tuiGetNativeFocused","selection","tuiIsTextfield","startContainer","endContainer","nativeElement","inDropdown","hostToDropdown","dropdownToHost","ghost","top","selectionStart","selectionEnd","value","tuiPx","CHAR_ZERO_WIDTH_SPACE","CHAR_NO_BREAK_SPACE","node","font","letterSpacing","textTransform","padding","TUI_RANGE","DOCUMENT","TUI_SELECTION_STREAM","ElementRef","ViewContainerRef","TuiDropdownDirective","tuiAsRectAccessor","TuiDropdownModule","ɵɵdefineNgModule","ɵɵdefineInjector","PolymorpheusModule","TuiActiveZoneModule","TuiOverscrollModule","TuiScrollbarModule","TuiHoveredModule","_c0","TuiHintComponent_span_1_Template","rf","ctx","ɵɵelement","text_r1","ɵɵproperty","ɵɵsanitizeHtml","TUI_HINT_COMPONENT","tuiCreateTokenFromFactory","TuiHintComponent","TUI_HINT_DEFAULT_OPTIONS","TUI_HINT_OPTIONS","tuiCreateToken","TuiHintOptionsDirective","AbstractTuiController","options","ɵɵdirectiveInject","TUI_HINT_OPTIONS","ɵɵdefineDirective","ɵɵProvidersFeature","forwardRef","ɵɵInheritDefinitionFeature","TuiHintDirective","el","component","hintService","activeZone","content","_a","show","ElementRef","PolymorpheusComponent","TuiHintService","TuiActiveZoneDirective","tuiAsRectAccessor","tuiAsVehicle","TUI_HINT_COMPONENT","INJECTOR$1","TuiHintHoverDirective","TuiDriver","hovered$","parent","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","t","ɵɵgetInheritedFactory","rf","ctx","ɵɵlistener","$event","OFFSET","ARROW_OFFSET","TOP","LEFT","TuiHintPositionDirective","TuiPositionAccessor","viewport","directive","accessors","TUI_HINT_DIRECTIONS","acc","direction","width","height","_b","hostRect","leftCenter","topCenter","tuiFallbackRectAccessor","top","left","TUI_VIEWPORT","TuiRectAccessor","__decorate","tuiPure","GAP","TuiHintComponent","position$","destroy$","animation","pointer","accessor","polymorpheus","hover","mode","vvs","point","target","style","rect","safeLeft","tuiClamp","beakTop","beakLeft","tuiPx","TuiPositionService","TuiDestroyService","TUI_ANIMATION_OPTIONS","POLYMORPHEUS_CONTEXT","TuiModeDirective","TuiVisualViewportService","ɵɵdefineComponent","ɵɵresolveDocument","ɵɵsyntheticHostProperty","ɵɵattribute","ɵɵclassProp","tuiPositionAccessorFor","tuiRectAccessorFor","_c0","ɵɵprojectionDef","ɵɵprojection","ɵɵtemplate","TuiHintComponent_span_1_Template","ɵɵadvance","ɵɵproperty","PolymorpheusOutletDirective","tuiFadeIn","TuiHintDescribeDirective","zone","doc","ReplaySubject","tuiIfMap","tuiTypedFromEvent","tuiIsPresent","debounce","timer","startWith","distinctUntilChanged","skip","tuiZoneOptimized","tuiIsNativeFocused","NgZone","DOCUMENT","ɵɵNgOnChangesFeature","TuiHintDriverDirective","AbstractTuiDriverDirective","drivers","vehicles","TuiVehicle","TuiHintModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","PolymorpheusModule","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","TuiMaskAccessorDirective","ɵɵdefineDirective","ɵɵProvidersFeature","NG_VALUE_ACCESSOR","Optional","TUI_VALUE_ACCESSOR","DefaultValueAccessor","accessor","fallback","TuiMaskAccessorModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiWrapperDirective","mode$","TuiInteractiveState","ɵɵdirectiveInject","TUI_MODE","ɵɵdefineDirective","rf","ctx","ɵɵlistener","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","MODE_PROVIDER","TuiWrapperModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","TuiLoaderComponent_div_2_div_3_ng_container_1_Template","rf","ctx","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","text_r1","ɵɵadvance","ɵɵtextInterpolate1","TuiLoaderComponent_div_2_div_3_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ctx_r1","ɵɵnextContext","ɵɵclassProp","ɵɵproperty","TuiLoaderComponent_div_2_Template","ɵɵnamespaceSVG","ɵɵelement","ɵɵattribute","TUI_LOADER_DEFAULT_OPTIONS","TUI_LOADER_OPTIONS","tuiCreateToken","TuiLoaderComponent","doc","el","isIos","options","tuiIsSafari","value","tuiBlurNativeFocused","tuiSizeBigger","tuiIsNativeFocusedIn","ɵɵdirectiveInject","DOCUMENT","ElementRef","TUI_IS_IOS","TUI_LOADER_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵclassProp","_c0","ɵɵprojectionDef","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵtemplate","TuiLoaderComponent_div_2_Template","ɵɵproperty","ɵɵattribute","ɵɵadvance","NgIf","PolymorpheusOutletDirective","TuiLoaderModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","PolymorpheusModule","_c0","_c1","TuiButtonComponent_ng_container_0_Template","rf","ctx","ɵɵelementContainer","TuiButtonComponent_span_4_tui_svg_1_Template","ɵɵelement","text_r1","ɵɵproperty","TuiButtonComponent_span_4_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ctx_r1","ɵɵnextContext","ɵɵadvance","TuiButtonComponent_span_6_tui_svg_1_Template","text_r3","TuiButtonComponent_span_6_Template","TuiButtonComponent_tui_loader_7_Template","TUI_BUTTON_DEFAULT_OPTIONS","TuiAppearance","TUI_BUTTON_OPTIONS","tuiCreateToken","TuiButtonComponent","AbstractTuiInteractive","mode","el","options","_a","EMPTY","startWith","map","distinctUntilChanged","tuiIsNativeFocused","focused","ɵɵdirectiveInject","TuiModeDirective","ElementRef","TUI_BUTTON_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵlistener","ɵɵhostProperty","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","TuiDestroyService","ɵɵInheritDefinitionFeature","_c0","_c1","ɵɵprojectionDef","ɵɵtemplate","TuiButtonComponent_ng_container_0_Template","ɵɵpipe","ɵɵelementStart","TuiButtonComponent_span_4_Template","ɵɵprojection","TuiButtonComponent_span_6_Template","ɵɵelementEnd","TuiButtonComponent_tui_loader_7_Template","ɵɵproperty","ɵɵpipeBind1","ɵɵadvance","TuiSvgComponent","TuiLoaderComponent","NgIf","TuiWrapperDirective","PolymorpheusOutletDirective","AsyncPipe","TuiButtonModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","PolymorpheusModule","TuiWrapperModule","TuiSvgModule","TuiLoaderModule","_c0","_c1","TuiLinkComponent_tui_svg_0_Template","rf","ctx","ɵɵelement","ctx_r0","ɵɵnextContext","ɵɵproperty","TuiLinkComponent_tui_svg_3_Template","TuiLinkComponent","el","mode$","focusVisible$","merge","tuiTypedFromEvent","map","ALWAYS_TRUE_HANDLER","ALWAYS_FALSE_HANDLER","visible","tuiIsNativeFocused","ɵɵdirectiveInject","ElementRef","TUI_MODE","TuiFocusVisibleService","ɵɵdefineComponent","ɵɵlistener","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","TuiDestroyService","MODE_PROVIDER","ɵɵprojectionDef","ɵɵtemplate","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","ɵɵadvance","TuiSvgComponent","NgIf","TuiLinkModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiSvgModule","TuiDialogComponent_header_0_ng_container_1_Template","rf","ctx","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","text_r1","ɵɵadvance","ɵɵtextInterpolate1","TuiDialogComponent_header_0_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ctx_r1","ɵɵnextContext","ɵɵproperty","TuiDialogComponent_ng_container_4_Template","_r3","ɵɵgetCurrentView","ɵɵelement","ɵɵlistener","ɵɵrestoreView","ɵɵresetView","text_r4","ɵɵsanitizeHtml","TuiDialogComponent_div_6_Template","_r5","ɵɵpipe","ɵɵpipeBind1","TUI_DIALOG_DEFAULT_OPTIONS","TUI_DIALOGS_CLOSE","tuiCreateToken","EMPTY","TUI_DIALOG_OPTIONS","SCROLLBAR_PLACEHOLDER","TuiDialogCloseService","Observable","win","doc","el","subscriber","merge","tuiTypedFromEvent","filter","event","target","tuiGetActualTarget","tuiGetViewportWidth","switchMap","take","map","tuiIsElement","tuiContainsOrAfter","ɵɵinject","WINDOW","DOCUMENT","ElementRef","ɵɵdefineInjectable","REQUIRED_ERROR","toObservable","valueOrStream","isObservable","of","TuiDialogComponent","duration","isMobile","context","destroy$","dialogClose$","close$","closeWord$","icons","Subject","ALWAYS_TRUE_HANDLER","takeUntil","ɵɵdirectiveInject","TUI_ANIMATIONS_DURATION","TUI_IS_MOBILE","POLYMORPHEUS_CONTEXT","TuiDestroyService","TUI_DIALOGS_CLOSE","TUI_CLOSE_WORD","TUI_COMMON_ICONS","ɵɵdefineComponent","rf","ctx","ɵɵsyntheticHostProperty","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","ɵɵtemplate","TuiDialogComponent_header_0_Template","ɵɵelementStart","ɵɵelement","TuiDialogComponent_ng_container_4_Template","ɵɵelementEnd","TuiDialogComponent_div_6_Template","ɵɵproperty","ɵɵadvance","TuiButtonComponent","NgIf","PolymorpheusOutletDirective","TuiAutoFocusDirective","AsyncPipe","tuiSlideInTop","tuiFadeIn","DIALOG","PolymorpheusComponent","TuiDialogService","AbstractTuiDialogService","inject","TUI_DIALOG_OPTIONS","ɵTuiDialogService_BaseFactory","t","ɵɵgetInheritedFactory","TuiDialogModule","ɵɵdefineNgModule","ɵɵdefineInjector","tuiAsDialog","TuiDialogService","PolymorpheusModule","TuiButtonModule","CommonModule","TuiAutoFocusModule","TuiFormatDatePipe","service","timestampOrDate","ɵɵdirectiveInject","TuiFormatDateService","ɵɵdefinePipe","TuiFormatDatePipeModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiMonthPipe","months$","month","map","months","ɵɵdirectiveInject","TUI_MONTHS","ɵɵdefinePipe","TuiMonthPipeModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","_c1","_c2","a0","TuiOptionComponent_ng_container_0_Template","rf","ctx","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","text_r1","ɵɵadvance","ɵɵtextInterpolate1","TuiOptionComponent_ng_template_1_tui_svg_1_Template","ɵɵelement","ctx_r1","ɵɵnextContext","ɵɵproperty","TuiOptionComponent_ng_template_1_Template","ɵɵprojection","ɵɵtemplate","TuiDataListComponent_div_2_ng_container_1_Template","TuiDataListComponent_div_2_Template","ɵɵelementStart","ɵɵpipe","ɵɵelementEnd","ɵɵpipeBind1","shouldFocus","currentTarget","tuiIsNativeFocused","TuiOptionComponent","isMobile","content","dataList","el","host","dropdown","icons","_a","ɵɵdirectiveInject","TUI_IS_MOBILE","TUI_OPTION_CONTENT","forwardRef","TuiDataListComponent","ElementRef","TUI_DATA_LIST_HOST","TuiDropdownDirective","TUI_COMMON_ICONS","ɵɵdefineComponent","ɵɵlistener","$event","ɵɵattribute","ɵɵclassProp","ɵɵprojectionDef","ɵɵtemplateRefExtractor","base_r3","ɵɵreference","ɵɵpureFunction1","TuiSvgComponent","PolymorpheusOutletDirective","NgIf","__decorate","shouldCall","controller","defaultEmptyContent$","EMPTY_QUERY","tuiQueryListChanges","map","length","relatedTarget","current","step","elements","tuiMoveFocus","element","tuiIsNativeFocusedIn","tuiSetNativeMouseFocused","includeDisabled","disabled","value","tuiIsPresent","target","top","tuiIsElement","TUI_TEXTFIELD_WATCHED_CONTROLLER","TUI_NOTHING_FOUND_MESSAGE","dirIndex","ɵɵcontentQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵProvidersFeature","tuiAsDataListAccessor","TEXTFIELD_CONTROLLER_PROVIDER","AsyncPipe","tuiPure","TuiDataListDirective","ɵɵdefineDirective","TuiOptGroupDirective","ɵɵdefineDirective","rf","ctx","ɵɵattribute","TuiDataListModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiSvgModule","PolymorpheusModule","_c0","_c1","_c2","a0","a1","TuiHostedDropdownComponent_div_0_ng_template_3_div_2_Template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","text_r4","ɵɵadvance","ɵɵtextInterpolate1","TuiHostedDropdownComponent_div_0_ng_template_3_Template","_r3","ɵɵgetCurrentView","ɵɵlistener","$event","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵtemplate","ɵɵelement","activeZone_r5","ɵɵreference","ɵɵproperty","ɵɵpureFunction2","TuiHostedDropdownComponent_div_0_Template","_r1","ɵɵprojection","ɵɵtemplateRefExtractor","isOpen_r6","dropdown_r7","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","tuiAsFocusableItemAccessor","Self","position","ɵɵprojectionDef","ɵɵpipe","tmp_0_0","ɵɵpipeBind1","TuiLetDirective","TuiDropdownDriverDirective","TuiDropdownPositionDirective","TuiDropdownManualDirective","TuiDropdownPositionSidedDirective","TuiObscuredDirective","PolymorpheusTemplate","PolymorpheusOutletDirective","AsyncPipe","__decorate","shouldCall","TuiHostedDropdownModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","PolymorpheusModule","TuiLetModule","TuiObscuredModule","TuiActiveZoneModule","TuiDropdownModule","TuiTooltipComponent_tui_svg_3_Template","rf","ctx","ɵɵelement","src_r1","ɵɵproperty","TuiTooltipComponent","TuiHintOptionsDirective","destroy$","mode$","options","isMobile","takeUntil","mode","event","_a","ɵɵ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","driver_r2","ɵɵreference","ɵɵpipeBind1","ɵɵadvance","TuiSvgComponent","TuiWrapperDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintPositionDirective","TuiHintDescribeDirective","PolymorpheusOutletDirective","AsyncPipe","TuiTooltipModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiWrapperModule","TuiSvgModule","TuiHintModule","PolymorpheusModule","_c0","_c1","_c2","_c3","_c4","a0","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_r2","ɵɵproperty","TuiPrimitiveTextfieldComponent_div_12_Template","ɵɵtemplate","ctx_r2","ɵɵnextContext","ɵɵadvance","ɵɵpureFunction1","TuiPrimitiveTextfieldComponent_label_14_Template","ɵɵclassProp","TuiPrimitiveTextfieldComponent_div_20_tui_svg_1_Template","src_r4","TuiPrimitiveTextfieldComponent_div_20_Template","TuiPrimitiveTextfieldComponent_span_21_tui_svg_1_Template","src_r6","TuiPrimitiveTextfieldComponent_span_21_Template","_r5","ɵɵgetCurrentView","ɵɵlistener","ɵɵrestoreView","ɵɵresetView","TuiPrimitiveTextfieldComponent_tui_tooltip_22_Template","TuiPrimitiveTextfieldComponent_div_23_tui_svg_1_Template","src_r7","TuiPrimitiveTextfieldComponent_div_23_Template","TuiValueDecorationComponent","textfield","fontsReady$","BehaviorSubject","merge","delay","filter","_a","map","distinctUntilChanged","TuiAppearance","focused","placeholder","exampleText","value","ɵɵ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","_c3","_r1","ɵɵgetCurrentView","ɵɵprojectionDef","_c2","ɵɵtemplate","TuiPrimitiveTextfieldComponent_ng_container_0_Template","ɵɵpipe","TuiPrimitiveTextfieldComponent_ng_container_2_Template","ɵɵelementStart","$event","ɵɵrestoreView","ɵɵresetView","ɵɵ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","focusableElement_r8","ɵɵreference","decor_r9","ɵɵpipeBind1","TuiSvgComponent","TuiTooltipComponent","NgIf","TuiWrapperDirective","TuiAutofilledDirective","TuiMaskAccessorDirective","DefaultValueAccessor","NgControlStatus","NgModel","TuiFocusableDirective","AsyncPipe","__decorate","tuiPure","TuiPrimitiveTextfieldDirective","AbstractTuiTextfieldHost","ɵɵdefineDirective","tuiAsTextfieldHost","TuiPrimitiveTextfieldModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","FormsModule","PolymorpheusModule","TuiMaskAccessorModule","TuiFocusableModule","TuiWrapperModule","TuiSvgModule","TuiTooltipModule","TuiAutofilledModule","_c0","_c1","TuiPushComponent_button_2_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵpipe","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","ɵɵstyleProp","ɵɵproperty","ɵɵpipeBind1","TuiPushComponent_span_7_Template","ɵɵelement","TuiPushAlertComponent_tui_push_0_img_1_Template","ɵɵsanitizeUrl","TuiPushAlertComponent_tui_push_0_tui_svg_2_Template","TuiPushAlertComponent_tui_push_0_div_3_Template","text_r3","ɵɵsanitizeHtml","TuiPushAlertComponent_tui_push_0_button_4_Template","_r4","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate1","TuiPushAlertComponent_tui_push_0_button_5_Template","_r5","TuiPushAlertComponent_tui_push_0_Template","ɵɵtemplate","TuiPushAlertComponent_ng_template_1_ng_container_0_Template","ɵɵelementContainer","TuiPushAlertComponent_ng_template_1_Template","TuiPushComponent","closeWord$","icons","EventEmitter","tuiIsString","tuiIsObserved","ɵɵdirectiveInject","TUI_CLOSE_WORD","TUI_COMMON_ICONS","ɵɵdefineComponent","ɵɵprojectionDef","ɵɵprojection","TuiButtonComponent","NgIf","AsyncPipe","TuiFormatDatePipe","TuiPushDirective","TuiModeDirective","modeDirective","_a","Subject","ɵɵdefineDirective","ɵɵProvidersFeature","TUI_BUTTON_OPTIONS","ɵɵInheritDefinitionFeature","TUI_PUSH_DEFAULT_OPTIONS","TUI_PUSH_OPTIONS","tuiCreateToken","TuiPushAlertDirective","PolymorpheusTemplate","template","cdr","destroy$","push","Subject","tuiIfMap","takeUntil","show","ɵɵdirectiveInject","TemplateRef","ChangeDetectorRef","TuiDestroyService","forwardRef","TuiPushService","ɵɵdefineDirective","ɵɵProvidersFeature","ɵɵInheritDefinitionFeature","TuiPushAlertComponent","animation","context","TUI_ANIMATION_OPTIONS","POLYMORPHEUS_CONTEXT","ɵɵdefineComponent","rf","ctx","ɵɵsyntheticHostProperty","ɵɵtemplate","TuiPushAlertComponent_tui_push_0_Template","TuiPushAlertComponent_ng_template_1_Template","ɵɵtemplateRefExtractor","directive_r6","ɵɵreference","ɵɵproperty","TuiPushComponent","TuiSvgComponent","TuiButtonComponent","TuiLinkComponent","NgIf","TuiPushDirective","PolymorpheusOutletDirective","tuiFadeIn","tuiSlideInRight","tuiHeightCollapse","AbstractTuiDialogService","PolymorpheusComponent","inject","TUI_PUSH_OPTIONS","ɵTuiPushService_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineInjectable","TuiPushModule","ɵɵdefineNgModule","ɵɵdefineInjector","TUI_ALERTS","CommonModule","PolymorpheusModule","TuiButtonModule","TuiLinkModule","TuiSvgModule","TuiFormatDatePipeModule","_c0","_c1","a0","TuiToggleComponent_tui_loader_2_Template","rf","ctx","ɵɵelement","ctx_r1","ɵɵnextContext","ɵɵproperty","TuiToggleComponent_span_3_tui_svg_1_Template","src_r3","TuiToggleComponent_span_3_Template","ɵɵelementStart","ɵɵtemplate","ɵɵelementEnd","ɵɵadvance","ɵɵpureFunction1","TuiToggleComponent_tui_loader_5_Template","TuiToggleComponent_span_6_tui_svg_1_Template","src_r4","TuiToggleComponent_span_6_Template","TUI_TOGGLE_DEFAULT_OPTIONS","$implicit","TuiAppearance","TUI_TOGGLE_OPTIONS","tuiCreateToken","TuiToggleComponent","AbstractTuiControl","control","cdr","modeDirective","options","_a","_b","tuiIsNativeFocused","checked","focused","focusVisible","ɵɵdirectiveInject","NgControl","ChangeDetectorRef","TuiModeDirective","TUI_TOGGLE_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","_c0","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵattribute","ɵɵclassProp","ɵɵProvidersFeature","tuiAsFocusableItemAccessor","tuiAsControl","ɵɵInheritDefinitionFeature","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵtemplate","TuiToggleComponent_tui_loader_2_Template","TuiToggleComponent_span_3_Template","ɵɵelement","TuiToggleComponent_tui_loader_5_Template","TuiToggleComponent_span_6_Template","ɵɵelementEnd","ɵɵtwoWayListener","$event","ɵɵrestoreView","ɵɵtwoWayBindingSet","ɵɵresetView","ɵɵlistener","ɵɵproperty","ɵɵadvance","ɵɵtwoWayProperty","TuiLoaderComponent","TuiSvgComponent","TuiWrapperDirective","NgIf","PolymorpheusOutletDirective","TuiCheckedDirective","TuiFocusableDirective","TuiFocusedDirective","TuiFocusVisibleDirective","TuiToggleModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiFocusedModule","TuiFocusableModule","TuiPressedModule","TuiFocusVisibleModule","TuiCheckedModule","TuiWrapperModule","TuiSvgModule","TuiLoaderModule","PolymorpheusModule","AbstractTuiEditor","Subject","ɵɵdefineDirective","tuiIsEmptyParagraph","json","TuiTiptapEditorService","AbstractTuiEditor","editorRef","editor","update","content","value","editable","EDITOR_BLANK_COLOR","size","tuiPx","_a","_b","_c","_d","style","styles","tuiParseStyle","align","src","commands","state","setImage","anchor","color","type","nameOrAttributes","startWith","map","distinctUntilChanged","cols","rows","level","options","href","EditorState","pos","schema","doc","range","tuiGetMarkRange","preview","typeOrName","attributes","ɵɵinject","TIPTAP_EDITOR","ɵɵdefineInjectable","TuiTiptapEditorDirective","el","renderer","editorContainer","editorLoaded$","destroy$","takeUntil","ɵɵdirectiveInject","ElementRef","Renderer2","INITIALIZATION_TIPTAP_CONTAINER","TuiDestroyService","ɵɵdefineDirective","ɵɵProvidersFeature","TuiTiptapEditorModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","alignState_r3","texts_r4","ɵɵadvance","ɵɵproperty","TuiAlignContentComponent_ng_container_0_tui_hosted_dropdown_1_Template","ɵɵelement","ɵɵtemplate","ɵɵtemplateRefExtractor","align_r5","ɵɵreference","alignDropdown_r6","TuiAlignContentComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵpipe","ɵɵelementContainerEnd","ɵɵpipeBind1","TuiAlignContentComponent","options","editor","texts$","combineLatest","map","left","right","center","justify","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","NgIf","TuiLetDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiAlignContentModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiHintModule","TuiLetModule","TuiCodeComponent_ng_template_5_button_1_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","index_r2","ɵɵrestoreView","ctx_r2","ɵɵnextContext","ɵɵresetView","ɵɵtext","ɵɵelementEnd","item_r4","ɵɵadvance","ɵɵtextInterpolate1","TuiCodeComponent_ng_template_5_Template","ɵɵtemplate","ɵɵpipe","ɵɵproperty","ɵɵpipeBind1","TuiCodeComponent","options","editor","texts$","codeOptionsTexts$","map","texts","distinctUntilChanged","isCodeBlock","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_CODE_OPTIONS","ɵɵdefineComponent","ɵɵelement","ɵɵtemplateRefExtractor","codes_r5","ɵɵreference","codesDropdown_r6","TuiHostedDropdownComponent","TuiButtonComponent","TuiDataListComponent","TuiOptionComponent","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","NgForOf","AsyncPipe","TuiCodeModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiHintModule","TuiDataListModule","TuiDetailsComponent_button_0_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","text_r3","ɵɵproperty","TuiDetailsRemoveComponent_button_0_Template","ɵɵpipe","ɵɵpipeBind1","TuiDetailsComponent","editor","texts$","options","ɵɵdirectiveInject","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_OPTIONS","ɵɵdefineComponent","ɵɵtemplate","TuiButtonComponent","NgIf","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiDetailsRemoveComponent","map","distinctUntilChanged","TuiDetailsModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiButtonModule","TuiHintModule","_c0","TuiFontSizeComponent_ng_template_4_button_1_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵpipe","ɵɵlistener","item_r2","ɵɵrestoreView","ctx_r2","ɵɵnextContext","ɵɵresetView","ɵɵtext","ɵɵelementEnd","ɵɵstyleProp","ɵɵproperty","ɵɵpureFunction0","ɵɵattribute","ɵɵpipeBind1","ɵɵadvance","ɵɵtextInterpolate1","TuiFontSizeComponent_ng_template_4_Template","ɵɵtemplate","TuiFontSizeComponent","options","editor","texts$","fontOptionsTexts$","map","texts","headingLevel","px","color","tuiPx","EDITOR_BLANK_COLOR","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_FONT_OPTIONS","ɵɵdefineComponent","ɵɵelement","ɵɵtemplateRefExtractor","fonts_r4","ɵɵreference","fontsDropdown_r5","TuiHostedDropdownComponent","TuiButtonComponent","TuiDataListComponent","TuiOptionComponent","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","NgForOf","NgClass","NgStyle","AsyncPipe","LowerCasePipe","TuiFontSizeModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiHintModule","TuiDataListModule","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_1_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","state_r3","texts_r4","ɵɵproperty","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_2_Template","_r5","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_3_Template","_r6","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_button_4_Template","_r7","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template","ɵɵtemplate","ɵɵadvance","TuiFontStyleComponent_ng_container_0_tui_hosted_dropdown_1_Template","ɵɵelement","ɵɵtemplateRefExtractor","format_r8","ɵɵreference","formatDropdown_r9","TuiFontStyleComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵpipe","ɵɵelementContainerEnd","ɵɵpipeBind1","TuiFontStyleComponent","options","editor","texts$","defaultEditorTools","TuiEditorTool","combineLatest","map","bold","italic","underline","strike","value","tool","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","NgIf","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiFontStyleModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiHintModule","TuiEditorGroupToolComponent","editor","texts$","options","map","texts","distinctUntilChanged","ɵɵdirectiveInject","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵelementStart","ɵɵpipe","ɵɵlistener","ɵɵelementEnd","ɵɵproperty","ɵɵpipeBind1","ɵɵadvance","TuiButtonComponent","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiEditorToolGroup","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiButtonModule","TuiHintModule","tuiControlValueFactory","control","valueTransformer","tuiControlValue","map","value","of","TUI_CALENDAR_DATE_STREAM","InjectionToken","tuiDateStreamWithTransformer","transformer","Optional","Self","NgControl","tuiControlValueFactory","TUI_COUNTRIES_DEFAULT_MASKS","TuiCountryIsoCode","TUI_COUNTRIES_MASKS","tuiCreateToken","TUI_DATE_VALUE_TRANSFORMER","InjectionToken","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","tuiCreateToken","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","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","ɵɵdefineDirective","ɵɵProvidersFeature","TUI_VALUE_ACCESSOR_PROVIDER","TuiValueAccessorModule","ɵɵdefineNgModule","ɵɵdefineInjector","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","MaskitoDirective","ngZone","elementRef","MASKITO_DEFAULT_OPTIONS","MASKITO_DEFAULT_ELEMENT_PREDICATE","_a","__awaiter","predicate","predicateResult","Maskito","ɵɵdirectiveInject","NgZone","ElementRef","ɵɵdefineDirective","ɵɵNgOnChangesFeature","MaskitoModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","_c1","_c2","TuiInputInlineComponent_span_2_Template","rf","ctx","ɵɵelementStart","ɵɵprojection","ɵɵelementEnd","TuiInputInlineComponent","AbstractTuiControl","control","cdr","tuiIsNativeFocused","value","focused","_a","indent","ɵɵdirectiveInject","NgControl","ChangeDetectorRef","ɵɵdefineComponent","ɵɵviewQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵProvidersFeature","TUI_VALUE_ACCESSOR_PROVIDER","tuiAsFocusableItemAccessor","ɵɵInheritDefinitionFeature","_r1","ɵɵgetCurrentView","ɵɵprojectionDef","ɵɵelement","ɵɵtemplate","ɵɵlistener","$event","ɵɵrestoreView","ɵɵresetView","ɵɵstyleProp","ɵɵproperty","ɵɵadvance","ɵɵattribute","NgIf","TuiMaskAccessorDirective","DefaultValueAccessor","NgControlStatus","NgModel","TuiFocusableDirective","TuiFocusedDirective","TuiInputInlineModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","FormsModule","TuiFocusableModule","TuiFocusedModule","TuiMaskAccessorModule","TuiPaletteComponent_button_0_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","color_r2","ɵɵrestoreView","ctx_r2","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","ɵɵstyleProp","ɵɵproperty","TuiPaletteComponent","EventEmitter","_a","_b","ɵɵdefineComponent","rf","ctx","ɵɵtemplate","TuiPaletteComponent_button_0_Template","ɵɵpipe","ɵɵproperty","ɵɵpipeBind2","NgForOf","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","TuiHintDescribeDirective","KeyValuePipe","TuiPaletteModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHintModule","TuiHighlightColorComponent_tui_hosted_dropdown_0_div_4_Template","rf","ctx","ɵɵelement","selectedColor_r1","ɵɵnextContext","ɵɵstyleProp","TuiHighlightColorComponent_tui_hosted_dropdown_0_ng_template_5_Template","_r2","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","ctx_r2","ɵɵresetView","ɵɵelementEnd","activeZone_r4","ɵɵproperty","TuiHighlightColorComponent_tui_hosted_dropdown_0_Template","ɵɵpipe","ɵɵtemplate","ɵɵtemplateRefExtractor","hilite_r5","ɵɵreference","hiliteDropdown_r6","ɵɵadvance","ɵɵpipeBind1","TuiHighlightColorComponent","options","editor","texts$","map","distinctUntilChanged","texts","color","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","TuiPaletteComponent","TuiLetDirective","TuiDropdownOptionsDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","NgIf","TuiActiveZoneDirective","AsyncPipe","TuiHighlightColorModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiPaletteModule","TuiHintModule","TuiDropdownModule","TuiActiveZoneModule","TuiLetModule","TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_3_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","state_r3","texts_r4","ɵɵadvance","ɵɵproperty","TuiListConfigsComponent_ng_container_0_tui_hosted_dropdown_1_Template","ɵɵelement","ɵɵtemplate","ɵɵtemplateRefExtractor","list_r5","ɵɵreference","listDropdown_r6","TuiListConfigsComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵpipe","ɵɵelementContainerEnd","ɵɵpipeBind1","TuiListConfigsComponent","options","editor","texts$","combineLatest","map","ordered","unordered","tasked","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","NgIf","TuiLetDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiListConfigsModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiButtonModule","TuiHintModule","TuiLetModule","TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_div_4_Template","rf","ctx","ɵɵelement","color_r1","ɵɵnextContext","ɵɵstyleProp","TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_ng_template_5_Template","_r2","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","colorSelect_r3","ɵɵreference","ɵɵresetView","ɵɵelementEnd","activeZone_r5","ctx_r3","ɵɵproperty","TuiTableCellColorComponent_ng_container_0_tui_hosted_dropdown_1_Template","ɵɵpipe","ɵɵtemplate","ɵɵtemplateRefExtractor","isActive_r6","cellColorDropdown_r7","ɵɵadvance","ɵɵpipeBind1","TuiTableCellColorComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵelementContainerEnd","TuiTableCellColorComponent","options","editor","texts$","map","texts","combineLatest","table","group","distinctUntilChanged","color","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","TuiPaletteComponent","TuiLetDirective","TuiDropdownOptionsDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","NgIf","TuiActiveZoneDirective","AsyncPipe","TuiTableCellColorModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiPaletteModule","TuiButtonModule","TuiHintModule","TuiActiveZoneModule","TuiDropdownModule","TuiLetModule","TuiTableSizeSelectorComponent_div_0_div_1_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","$event","y_r3","x_r4","ɵɵelementEnd","ɵɵclassProp","TuiTableSizeSelectorComponent_div_0_Template","ɵɵtemplate","ɵɵadvance","ɵɵproperty","MAX_COLS_NUMBER","MAX_ROWS_NUMBER","MIN_DISTANCE_PX","TuiTableSizeSelectorComponent","win","EventEmitter","x","y","rows","cols","event","tuiGetViewportWidth","ɵɵdirectiveInject","WINDOW","ɵɵdefineComponent","ɵɵtext","ɵɵtextInterpolate2","TuiRepeatTimesDirective","TuiTableSizeSelectorModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiRepeatTimesModule","TuiTableCreateComponent_ng_template_4_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","TuiTableCreateComponent","options","editor","texts$","map","texts","rows","cols","prevLine","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","ɵɵelement","ɵɵpipe","ɵɵtemplate","ɵɵtemplateRefExtractor","table_r3","ɵɵreference","tableDropdown_r4","ɵɵproperty","ɵɵadvance","ɵɵpipeBind1","TuiHostedDropdownComponent","TuiButtonComponent","TuiTableSizeSelectorComponent","TuiDropdownOptionsDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiTableCreateModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiDropdownModule","TuiButtonModule","TuiHintModule","TuiTableSizeSelectorModule","_c0","a0","a1","TuiTableMergeCellsComponent_ng_container_0_button_1_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","can_r2","ɵɵnextContext","ctx_r2","ɵɵresetView","ɵɵelementEnd","texts_r4","ɵɵproperty","TuiTableMergeCellsComponent_ng_container_0_Template","ɵɵelementContainerStart","ɵɵtemplate","ɵɵpipe","ɵɵelementContainerEnd","ɵɵadvance","ɵɵpipeBind1","TuiTableMergeCellsComponent","editor","texts$","map","distinctUntilChanged","ɵɵdirectiveInject","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","ɵɵpureFunction2","TuiButtonComponent","TuiLetDirective","NgIf","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiTableMergeCellsModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiButtonModule","TuiHintModule","TuiLetModule","TuiTableRowColumnManagerComponent_tui_hosted_dropdown_0_Template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵpipe","ɵɵelementEnd","active_r1","tableCommand_r2","ɵɵreference","ctx_r2","ɵɵnextContext","tableOptionsDropdown_r4","ɵɵproperty","ɵɵadvance","ɵɵpipeBind1","TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_button_1_Template","_r5","ɵɵgetCurrentView","ɵɵlistener","j_r6","ɵɵrestoreView","i_r7","ɵɵresetView","ɵɵtext","item_r8","ɵɵtextInterpolate1","TuiTableRowColumnManagerComponent_ng_template_2_tui_opt_group_1_Template","ɵɵtemplate","group_r9","TuiTableRowColumnManagerComponent_ng_template_2_Template","TuiTableCommands","TuiTableRowColumnManagerComponent","options","editor","texts$","tableCommandTexts$","map","texts","command","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_TABLE_COMMANDS","ɵɵdefineComponent","ɵɵtemplateRefExtractor","TuiHostedDropdownComponent","TuiButtonComponent","TuiDataListComponent","TuiOptionComponent","TuiLetDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","NgForOf","TuiOptGroupDirective","AsyncPipe","TuiTableRowColumnManagerModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHostedDropdownModule","TuiHintModule","TuiButtonModule","TuiDataListModule","TuiLetModule","TuiTextColorComponent_tui_hosted_dropdown_0_ng_template_5_Template","rf","ctx","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","activeZone_r3","ɵɵproperty","TuiTextColorComponent_tui_hosted_dropdown_0_Template","ɵɵelement","ɵɵpipe","ɵɵtemplate","ɵɵtemplateRefExtractor","selectedColor_r4","color_r5","ɵɵreference","colorDropdown_r6","ɵɵadvance","ɵɵpipeBind1","ɵɵstyleProp","TuiTextColorComponent","options","editor","texts$","map","distinctUntilChanged","texts","ɵɵdirectiveInject","TUI_EDITOR_OPTIONS","TuiTiptapEditorService","TUI_EDITOR_TOOLBAR_TEXTS","ɵɵdefineComponent","TuiHostedDropdownComponent","TuiButtonComponent","TuiPaletteComponent","TuiLetDirective","TuiDropdownOptionsDirective","TuiHintDescribeDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","TuiActiveZoneDirective","AsyncPipe","TuiTextColorModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiButtonModule","TuiHostedDropdownModule","TuiDropdownModule","TuiHintModule","TuiPaletteModule","TuiActiveZoneModule","TuiLetModule","TuiEditLinkComponent_ng_container_1_ng_container_3_Template","rf","ctx","ɵɵelementContainerStart","ɵɵtext","ɵɵelementContainerEnd","TuiEditLinkComponent_ng_container_1_ng_template_4_span_0_Template","ɵɵelementStart","ɵɵelementEnd","TuiEditLinkComponent_ng_container_1_ng_template_4_ng_template_1_Template","TuiEditLinkComponent_ng_container_1_ng_template_4_Template","ɵɵtemplate","ɵɵtemplateRefExtractor","urlTitle_r2","ɵɵreference","ctx_r2","ɵɵnextContext","ɵɵproperty","TuiEditLinkComponent_ng_container_1_ng_container_10_Template","text_r4","ɵɵadvance","ɵɵtextInterpolate1","TuiEditLinkComponent_ng_container_1_Template","_r1","ɵɵgetCurrentView","ɵɵtwoWayListener","$event","ɵɵrestoreView","ɵɵtwoWayBindingSet","ɵɵresetView","ɵɵlistener","ɵɵpipe","fullOptions_r5","ɵɵtextInterpolate","ɵɵclassProp","ɵɵtwoWayProperty","ɵɵpipeBind1","TuiEditLinkComponent_ng_template_2_Template","_r6","ɵɵsanitizeUrl","TuiEditLinkComponent_ng_container_4_button_4_Template","_r7","id_r8","TuiEditLinkComponent_ng_container_4_Template","ɵɵelement","ɵɵpipeBind3","splitOsiProtocol","url","_a","protocolPosition","TUI_EDITOR_LINK_OSI_PROTOCOL_DIVIDER","prefix","path","result","splitSimpleProtocol","tuiIsValidUrl","tuiEditLinkParseUrl","TUI_EDITOR_LINK_HASH_PREFIX","TUI_EDITOR_LINK_SIMPLE_PROTOCOL_DIVIDER","protocol","otherPart","MAX_LENGTH","START","END","TuiShortUrlPipe","ɵɵdefinePipe","TuiFilterAnchorsPipe","anchors","currentUrl","anchor","TuiEditLinkComponent","doc","texts$","editor","options","EventEmitter","_b","TUI_EDITOR_LINK_HTTPS_PREFIX","mode","event","tuiIsElement","isPrefix","a","defaultPrefix","_c","focusable","fullPath","nodes","node","ɵɵdirectiveInject","DOCUMENT","TUI_EDITOR_LINK_TEXTS","TuiTiptapEditorService","TUI_EDITOR_OPTIONS","ɵɵdefineComponent","ɵɵresolveDocument","view_r9","TuiInputInlineComponent","TuiSvgComponent","TuiButtonComponent","TuiLinkComponent","TuiScrollbarComponent","NgIf","TuiAutoFocusDirective","NgControlStatus","NgModel","NgForOf","AsyncPipe","TuiEditLinkModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","FormsModule","TuiAutoFocusModule","TuiButtonModule","TuiSvgModule","TuiLinkModule","TuiInputInlineModule","TuiToggleModule","TuiScrollbarModule","_c0","_c1","TuiToolbarComponent_ng_container_1_Template","rf","ctx","ɵɵelementContainer","TuiToolbarComponent_section_5_div_1_Template","_r1","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵelementEnd","texts_r3","ɵɵadvance","ɵɵproperty","TuiToolbarComponent_section_5_div_2_Template","ɵɵelement","TuiToolbarComponent_section_5_div_3_tui_font_style_1_Template","TuiToolbarComponent_section_5_div_3_tui_align_content_2_Template","TuiToolbarComponent_section_5_div_3_tui_list_configs_3_Template","TuiToolbarComponent_section_5_div_3_button_4_Template","_r4","TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_ng_template_4_Template","_r5","$event","link_r6","ɵɵreference","TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_5_Template","ɵɵtemplate","ɵɵtemplateRefExtractor","linkDropdown_r7","TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_ng_template_3_Template","_r8","anchor_r9","TuiToolbarComponent_section_5_div_3_tui_hosted_dropdown_6_Template","anchorDropdown_r10","TuiToolbarComponent_section_5_div_3_ng_container_7_Template","_r11","ɵɵelementContainerStart","fileUpload_r12","ɵɵelementContainerEnd","TuiToolbarComponent_section_5_div_3_Template","TuiToolbarComponent_section_5_div_4_button_1_Template","_r13","TuiToolbarComponent_section_5_div_4_button_2_Template","_r14","TuiToolbarComponent_section_5_div_4_Template","TuiToolbarComponent_section_5_div_5_tui_text_color_1_Template","TuiToolbarComponent_section_5_div_5_tui_highlight_color_2_Template","TuiToolbarComponent_section_5_div_5_Template","TuiToolbarComponent_section_5_div_6_tui_code_1_Template","TuiToolbarComponent_section_5_div_6_button_2_Template","_r15","TuiToolbarComponent_section_5_div_6_div_3_Template","_r16","image_r17","TuiToolbarComponent_section_5_div_6_button_4_Template","_r18","TuiToolbarComponent_section_5_div_6_Template","TuiToolbarComponent_section_5_div_7_Template","_r19","TuiToolbarComponent_section_5_div_8_Template","TuiToolbarComponent_section_5_div_9_tui_table_cell_color_2_Template","TuiToolbarComponent_section_5_div_9_Template","TuiToolbarComponent_section_5_div_10_Template","TuiToolbarComponent_section_5_Template","ɵɵprojection","TuiToolbarNavigationManagerDirective","el","toPrevious","toolsContainers","focusedToolIndex","tuiIsNativeFocusedIn","targetToolIndex","tuiClamp","targetToolWrapper","targetTool","reversed","tools","focusableElement","tuiIsNativeMouseFocusable","tuiGetClosestFocusable","wrapper","ɵɵdirectiveInject","ElementRef","ɵɵdefineDirective","TuiToolbarComponent","editor","imageLoader","attachOptions","filesLoader","texts$","options","destroy$","EMPTY_QUERY","EventEmitter","TuiEditorTool","defaultEditorTools","value","nativeElement","event","target","input","_a","file","take","takeUntil","image","files","attachedFiles","hosted","url","anchor","tool","firstButton","lastButton","TuiTiptapEditorService","TUI_IMAGE_LOADER","TUI_ATTACH_FILES_OPTIONS","TUI_ATTACH_FILES_LOADER","TUI_EDITOR_TOOLBAR_TEXTS","TUI_EDITOR_OPTIONS","TuiDestroyService","ɵɵdefineComponent","ɵɵviewQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵclassProp","ɵɵProvidersFeature","ɵɵprojectionDef","ɵɵpipe","ɵɵpipeBind1","TuiButtonComponent","TuiFontSizeComponent","TuiFontStyleComponent","TuiAlignContentComponent","TuiListConfigsComponent","TuiHostedDropdownComponent","TuiEditLinkComponent","TuiTextColorComponent","TuiHighlightColorComponent","TuiCodeComponent","TuiDetailsComponent","TuiDetailsRemoveComponent","TuiEditorGroupToolComponent","TuiTableCellColorComponent","TuiTableCreateComponent","TuiTableRowColumnManagerComponent","TuiTableMergeCellsComponent","NgIf","TuiFocusableDirective","TuiHintDescribeDirective","TuiItemDirective","TuiHintDirective","TuiHintDriverDirective","TuiHintHoverDirective","TuiHintPositionDirective","AsyncPipe","TuiToolbarModule","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","TuiHintModule","TuiFocusableModule","TuiButtonModule","TuiHostedDropdownModule","TuiEditLinkModule","TuiTableMergeCellsModule","TuiTableCellColorModule","TuiTableRowColumnManagerModule","TuiTableCreateModule","TuiFontSizeModule","TuiFontStyleModule","TuiAlignContentModule","TuiListConfigsModule","TuiTextColorModule","TuiHighlightColorModule","TuiCodeModule","TuiDetailsModule","TuiItemModule","TuiEditorToolGroup","TuiEditorSocketComponent","el","renderer","sanitizer","tuiSanitizer","document","editor","options","content","_a","SecurityContext","event","_b","tuiIsElement","href","ɵɵdirectiveInject","ElementRef","Renderer2","Sanitizer","TUI_SANITIZER","DOCUMENT","TuiTiptapEditorDirective","TUI_EDITOR_OPTIONS","ɵɵdefineComponent","rf","ctx","ɵɵlistener","$event","ɵɵclassProp","TuiEditorSocketModule","ɵɵdefineNgModule","ɵɵdefineInjector","_c0","_c1","TuiEditorComponent_div_0_tui_toolbar_2_Template","rf","ctx","_r3","ɵɵgetCurrentView","ɵɵelementStart","ɵɵlistener","$event","ɵɵrestoreView","ctx_r1","ɵɵnextContext","ɵɵresetView","ɵɵprojection","ɵɵelementEnd","ɵɵproperty","TuiEditorComponent_div_0_div_5_Template","ɵɵtext","ɵɵadvance","ɵɵtextInterpolate1","TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_1_Template","_r4","ɵɵelementContainer","editor_r5","ɵɵreference","TuiEditorComponent_div_0_ng_container_6_tui_scrollbar_2_Template","_r6","ɵɵelement","TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_toolbar_1_Template","_r8","activeZone_r9","TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_tui_edit_link_2_Template","_r10","link_r11","TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_ng_container_3_Template","ɵɵelementContainerStart","ɵɵelementContainerEnd","TuiEditorComponent_div_0_ng_container_6_ng_template_3_ng_template_2_Template","ɵɵtemplate","editorLoaded_r12","ɵɵclassProp","TuiEditorComponent_div_0_ng_container_6_ng_template_3_Template","_r7","ɵɵtemplateRefExtractor","dropdown_r13","TuiEditorComponent_div_0_ng_container_6_Template","TuiEditorComponent_div_0_Template","_r1","TuiDropdownToolbarDirective","TuiDropdownSelectionDirective","combineLatest","map","distinctUntilChanged","x","y","handler","range","_a","contained","tuiIsTextNode","visible","_b","_c","_d","commonAncestorContainer","element","tuiIsElement","EMPTY_CLIENT_RECT","tuiGetWordRange","rect","ɵTuiDropdownToolbarDirective_BaseFactory","t","ɵɵgetInheritedFactory","ɵɵdefineDirective","ɵɵProvidersFeature","tuiAsDriver","tuiAsRectAccessor","ɵɵInheritDefinitionFeature","TuiEditorPortalService","AbstractTuiPortalService","ɵTuiEditorPortalService_BaseFactory","ɵɵdefineInjectable","TUI_EDITOR_PROVIDERS","LAZY_EDITOR_EXTENSIONS","TUI_EDITOR_EXTENSIONS","extensions","extensions$","ReplaySubject","INITIALIZATION_TIPTAP_CONTAINER","Renderer2","renderer","TIPTAP_EDITOR","LAZY_TIPTAP_EDITOR","editor","take","LazyEditor","shareReplay","TuiTiptapEditorService","TuiEditorPortalHostComponent","AbstractTuiPortalHostComponent","ɵTuiEditorPortalHostComponent_BaseFactory","ɵɵdefineComponent","TuiDropdownPortalService","TuiEditorPortalDirective","TuiRectAccessor","el","ɵɵdirectiveInject","ElementRef","tuiAsViewport","TuiEditorComponent","AbstractTuiControl","control","cdr","editorLoaded$","editorService","contentProcessor","doc","transformer","options","zone","defaultEditorTools","EventEmitter","delay","takeUntil","extension","ALWAYS_TRUE_HANDLER","ALWAYS_FALSE_HANDLER","focusElement","parentFocusElement","before","value","processed","focused","anchor","link","tuiGetSelectionState","event","tuiIsSafeLinkRange","fromEvent","TUI_EDITOR_RESIZE_EVENT","throttleTime","tuiZonefree","NgControl","ChangeDetectorRef","TUI_EDITOR_CONTENT_PROCESSOR","DOCUMENT","TUI_EDITOR_VALUE_TRANSFORMER","TUI_EDITOR_OPTIONS","NgZone","ɵɵviewQuery","TuiTiptapEditorDirective","TuiToolbarComponent","_t","ɵɵqueryRefresh","ɵɵloadQuery","tuiAsFocusableItemAccessor","tuiAutoFocusOptionsProvider","TUI_ANIMATIONS_DEFAULT_DURATION","ɵɵprojectionDef","ɵɵpipe","ɵɵpipeBind1","TuiScrollbarComponent","TuiEditorSocketComponent","TuiEditLinkComponent","NgIf","TuiWrapperDirective","TuiActiveZoneDirective","NgTemplateOutlet","TuiDropdownOptionsDirective","TuiDropdownDirective","TuiDropdownDriverDirective","TuiDropdownPositionDirective","AsyncPipe","TuiEditorModule","ɵɵdefineNgModule","ɵɵdefineInjector","TuiItemModule","CommonModule","TuiToolbarModule","TuiWrapperModule","TuiScrollbarModule","TuiEditLinkModule","TuiActiveZoneModule","TuiDropdownModule","TuiTiptapEditorModule","TuiEditorSocketModule","import_dompurify","DOMPURIFY_CONFIG","InjectionToken","DOMPURIFY_HOOKS","SANITIZE_STYLE","value","createDOMPurify","dompurify","NgDompurifySanitizer","config","sanitizeStyle","defaultView","hooks","name","hook","context","SecurityContext","ɵɵinject","DOCUMENT","ɵɵdefineInjectable","NgDompurifyModule","ɵɵdefineNgModule","ɵɵdefineInjector"],"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,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87]} \ No newline at end of file diff --git a/index.csr.html b/index.csr.html index abae086b..992f84cb 100644 --- a/index.csr.html +++ b/index.csr.html @@ -25,5 +25,5 @@ - + diff --git a/index.html b/index.html index 29768554..e2e6cb15 100644 --- a/index.html +++ b/index.html @@ -30,7 +30,7 @@

Dozens of
components -

Angular
Open source
June
Mon
Tue
Wed
Thu
Fri
Sat
Sun
27
28
29
30
31
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
1
2
3
4
5
6
7
- +
Angular
Open source
June
Mon
Tue
Wed
Thu
Fri
Sat
Sun
27
28
29
30
31
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
1
2
3
4
5
6
7
+ \ No newline at end of file diff --git a/main-EMD2MDEP.js b/main-LXQ3UEIO.js similarity index 99% rename from main-EMD2MDEP.js rename to main-LXQ3UEIO.js index 944da2f8..b1845e6c 100644 --- a/main-EMD2MDEP.js +++ b/main-LXQ3UEIO.js @@ -1,4 +1,4 @@ -import{Ba as Ve,Ca as We,Da as Ge,Ea as Ze,Eb as ti,Fa as Ye,G as Ne,Ga as Xe,H as pt,I as we,Ib as ii,J as He,Jb as oi,K as je,L as Fe,La as Je,a as te,ab as Ke,b as ee,bb as qe,ca as xe,d as rt,da as Ee,e as de,ea as Re,g as w,h as H,ib as Qe,l as Ie,la as ke,ma as Be,na as Ue,o as be,oa as Le,p as De,q as ct,r as Se,s as ut,sa as ze,u as Pe,v as Ae,wa as mt,xa as $e}from"./chunk-7Z3ZNFQW.js";import{$ as fe,Aa as h,D as ce,Da as Oe,E as ue,H as pe,Q as me,Sa as ei,b as Jt,c as Kt,ca as ge,d as qt,da as G,ea as st,f as Qt,fa as ve,g as ie,ga as at,ha as he,i as oe,ia as _e,j as Mt,k as Ot,ka as Te,l as It,la as Ce,na as lt,sa as ye,ta as B,ua as Me,w as nt}from"./chunk-HJXCO6QW.js";import"./chunk-J5MQQQCD.js";import{Ab as c,Bb as u,Cb as m,Cc as Yt,Da as z,Db as x,Dc as N,Ea as $,Eb as E,Ec as O,Fa as V,Fb as D,Gb as et,H as At,Ha as jt,Hb as Ut,Hc as k,Ib as Lt,Ja as J,Jb as y,Kb as v,Kc as _,La as Ft,Lb as it,Mb as I,Nc as Xt,Qa as xt,Ra as yt,Rb as zt,Sb as $t,U as Nt,Ub as Vt,Zb as M,_b as Wt,aa as C,ac as ot,bd as ne,cb as W,cd as re,dc as S,eb as K,ec as R,fc as Gt,ha as Y,hb as l,hd as se,ia as d,ib as n,jc as Zt,ma as j,mb as Et,na as wt,nb as Rt,nd as ae,p as Z,pb as kt,qb as Bt,qd as le,ra as X,sc as P,t as L,ta as g,u as F,ua as f,va as Ct,vb as a,wb as q,xb as s,y as Tt,ya as Ht,yb as Q,yc as A,z as Pt,zb as tt}from"./chunk-5EVGTXYE.js";import{f as St}from"./chunk-GOOAHOWT.js";function Di(t,i){if(t&1&&(D(0,3),S(1,"tuiMapper")),t&2){let e=i.$implicit,o=v(2);s("ngComponentOutlet",e.component.component)("ngComponentOutletInjector",Gt(1,2,e,o.mapper))}}function Si(t,i){if(t&1&&(c(0,"div",1),a(1,Di,2,5,"ng-container",2),u()),t&2){let e=i.$implicit;s("@tuiParentAnimation",void 0),l(),s("ngForOf",e)}}var ni=(()=>{class t{constructor(e,o,r,p){this.allAlerts=e,this.injector=o,this.destroy$=r,this.cdr=p,this.alerts=[],this.trackBy=T=>T,this.mapper=T=>jt.create({providers:[{provide:rt,useValue:T}],parent:this.injector})}ngOnInit(){F(this.allAlerts).pipe(C(this.destroy$)).subscribe(e=>{this.alerts=e,this.cdr.detectChanges()})}}return t.\u0275fac=function(e){return new(e||t)(n(Te),n(X),n(h,2),n(P))},t.\u0275cmp=g({type:t,selectors:[["tui-alert-host"]],features:[M([h])],decls:1,vars:2,consts:[["class","t-wrapper",4,"ngFor","ngForOf","ngForTrackBy"],[1,"t-wrapper"],[3,"ngComponentOutlet","ngComponentOutletInjector",4,"ngFor","ngForOf"],[3,"ngComponentOutlet","ngComponentOutletInjector"]],template:function(e,o){e&1&&a(0,Si,2,2,"div",0),e&2&&s("ngForOf",o.alerts)("ngForTrackBy",o.trackBy)},dependencies:[N,Yt,be],styles:[`tui-alert-host>.t-wrapper{position:fixed;top:0;left:0;display:flex;width:100%;height:100%;flex-direction:column;pointer-events:none}tui-alert-host>.t-wrapper>*{pointer-events:auto} +import{Ba as Ve,Ca as We,Da as Ge,Ea as Ze,Eb as ti,Fa as Ye,G as Ne,Ga as Xe,H as pt,I as we,Ib as ii,J as He,Jb as oi,K as je,L as Fe,La as Je,a as te,ab as Ke,b as ee,bb as qe,ca as xe,d as rt,da as Ee,e as de,ea as Re,g as w,h as H,ib as Qe,l as Ie,la as ke,ma as Be,na as Ue,o as be,oa as Le,p as De,q as ct,r as Se,s as ut,sa as ze,u as Pe,v as Ae,wa as mt,xa as $e}from"./chunk-DFAUMSGH.js";import{$ as fe,Aa as h,D as ce,Da as Oe,E as ue,H as pe,Q as me,Sa as ei,b as Jt,c as Kt,ca as ge,d as qt,da as G,ea as st,f as Qt,fa as ve,g as ie,ga as at,ha as he,i as oe,ia as _e,j as Mt,k as Ot,ka as Te,l as It,la as Ce,na as lt,sa as ye,ta as B,ua as Me,w as nt}from"./chunk-HJXCO6QW.js";import"./chunk-J5MQQQCD.js";import{Ab as c,Bb as u,Cb as m,Cc as Yt,Da as z,Db as x,Dc as N,Ea as $,Eb as E,Ec as O,Fa as V,Fb as D,Gb as et,H as At,Ha as jt,Hb as Ut,Hc as k,Ib as Lt,Ja as J,Jb as y,Kb as v,Kc as _,La as Ft,Lb as it,Mb as I,Nc as Xt,Qa as xt,Ra as yt,Rb as zt,Sb as $t,U as Nt,Ub as Vt,Zb as M,_b as Wt,aa as C,ac as ot,bd as ne,cb as W,cd as re,dc as S,eb as K,ec as R,fc as Gt,ha as Y,hb as l,hd as se,ia as d,ib as n,jc as Zt,ma as j,mb as Et,na as wt,nb as Rt,nd as ae,p as Z,pb as kt,qb as Bt,qd as le,ra as X,sc as P,t as L,ta as g,u as F,ua as f,va as Ct,vb as a,wb as q,xb as s,y as Tt,ya as Ht,yb as Q,yc as A,z as Pt,zb as tt}from"./chunk-5EVGTXYE.js";import{f as St}from"./chunk-GOOAHOWT.js";function Di(t,i){if(t&1&&(D(0,3),S(1,"tuiMapper")),t&2){let e=i.$implicit,o=v(2);s("ngComponentOutlet",e.component.component)("ngComponentOutletInjector",Gt(1,2,e,o.mapper))}}function Si(t,i){if(t&1&&(c(0,"div",1),a(1,Di,2,5,"ng-container",2),u()),t&2){let e=i.$implicit;s("@tuiParentAnimation",void 0),l(),s("ngForOf",e)}}var ni=(()=>{class t{constructor(e,o,r,p){this.allAlerts=e,this.injector=o,this.destroy$=r,this.cdr=p,this.alerts=[],this.trackBy=T=>T,this.mapper=T=>jt.create({providers:[{provide:rt,useValue:T}],parent:this.injector})}ngOnInit(){F(this.allAlerts).pipe(C(this.destroy$)).subscribe(e=>{this.alerts=e,this.cdr.detectChanges()})}}return t.\u0275fac=function(e){return new(e||t)(n(Te),n(X),n(h,2),n(P))},t.\u0275cmp=g({type:t,selectors:[["tui-alert-host"]],features:[M([h])],decls:1,vars:2,consts:[["class","t-wrapper",4,"ngFor","ngForOf","ngForTrackBy"],[1,"t-wrapper"],[3,"ngComponentOutlet","ngComponentOutletInjector",4,"ngFor","ngForOf"],[3,"ngComponentOutlet","ngComponentOutletInjector"]],template:function(e,o){e&1&&a(0,Si,2,2,"div",0),e&2&&s("ngForOf",o.alerts)("ngForTrackBy",o.trackBy)},dependencies:[N,Yt,be],styles:[`tui-alert-host>.t-wrapper{position:fixed;top:0;left:0;display:flex;width:100%;height:100%;flex-direction:column;pointer-events:none}tui-alert-host>.t-wrapper>*{pointer-events:auto} `],encapsulation:2,data:{animation:[nt]}}),t})(),ri=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f({type:t}),t.\u0275inj=d({imports:[[_,De]]}),t})();var si=(()=>{class t{constructor(e,o,r){this.doc=e,this.el=o,this.renderer=r,this.activeElement=ce(this.doc),Promise.resolve().then(()=>this.el.nativeElement.focus())}onBlur(){this.renderer.removeAttribute(this.el.nativeElement,"tabIndex")}onFocusIn(e){let{nativeElement:o}=this.el;if(ae(o,e))return;let r=pe({initial:o,root:o});r&&r.focus()}ngOnDestroy(){ue(this.doc),Promise.resolve().then(()=>{le(this.activeElement)&&this.activeElement.focus()})}}return t.\u0275fac=function(e){return new(e||t)(n(A),n(J),n(Rt))},t.\u0275dir=Ct({type:t,selectors:[["","tuiFocusTrap",""]],hostAttrs:["tabIndex","0"],hostBindings:function(e,o){e&1&&y("blur",function(){return o.onBlur()})("focusin.silent",function(p){return o.onFocusIn(p.target)},!1,K)}}),t})(),ai=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f({type:t}),t.\u0275inj=d({}),t})();function Pi(t,i){t&1&&D(0)}function Ai(t,i){t&1&&m(0,"tui-scroll-controls",5)}function Ni(t,i){if(t&1&&(c(0,"section",2),a(1,Pi,1,0,"ng-container",3)(2,Ai,1,0,"tui-scroll-controls",4),u()),t&2){let e=i.$implicit,o=v();s("@host",void 0),q("aria-labelledby",e.id),l(),s("polymorpheusOutlet",e.component)("polymorpheusOutletContext",e),l(),s("ngIf",!o.isMobile)}}function wi(t,i){if(t&1){let e=et();c(0,"div",6),y("transitionend",function(r){let p=z(e).tuiLet,T=v();return $(T.onDialog(r,!!T.dialogs.length,!!p))})("popstate",function(){let r=z(e).tuiLet,p=v();return $(p.closeLast(p.dialogs,!!r))},!1,K),u()}if(t&2){let e=v();tt("t-overlay_visible",e.dialogs.length)}}var bt={label:"ignoreMe"},Hi=t=>(t==null?void 0:t.label)===bt.label,ji=ne(Z(!1)),li=(()=>{class t{constructor(e,o,r,p,T,ft,gt,vt){this.isMobile=e,this.isDialogClosesOnBack$=o,this.dialogsByType=r,this.historyRef=p,this.titleService=T,this.destroy$=ft,this.cdr=gt,this.doc=vt,this.dialogs=[]}ngOnInit(){F(this.dialogsByType).pipe(L(e=>[].concat(...e).sort((o,r)=>o.createdAt-r.createdAt)),C(this.destroy$)).subscribe(e=>{var o;this.dialogs=e,this.cdr.markForCheck(),(o=this.doc.defaultView)===null||o===void 0||o.document.documentElement.classList.toggle("t-overscroll-none",!!e.length)})}closeLast(e,o){if(!o)return;let[r]=e.slice(-1);r&&(e.length>1&&this.historyRef.pushState(bt,this.titleService.getTitle()),r.$implicit.complete())}onDialog({propertyName:e},o,r){!r||e!=="letter-spacing"||(o?this.historyRef.pushState(bt,this.titleService.getTitle()):Hi(this.historyRef.state)&&this.historyRef.back())}}return t.\u0275fac=function(e){return new(e||t)(n(B),n(ji),n(lt),n(fe),n(qt),n(h,2),n(P),n(A))},t.\u0275cmp=g({type:t,selectors:[["tui-dialog-host"]],features:[M([h])],decls:3,vars:4,consts:[["aria-modal","true","role","dialog","tuiFocusTrap","","tuiOverscroll","all","tuiScrollRef","","class","t-dialog",4,"ngFor","ngForOf"],["class","t-overlay",3,"t-overlay_visible","transitionend","popstate",4,"tuiLet"],["aria-modal","true","role","dialog","tuiFocusTrap","","tuiOverscroll","all","tuiScrollRef","",1,"t-dialog"],[4,"polymorpheusOutlet","polymorpheusOutletContext"],["class","t-scrollbars",4,"ngIf"],[1,"t-scrollbars"],[1,"t-overlay",3,"transitionend","popstate"]],template:function(e,o){e&1&&(a(0,Ni,3,5,"section",0)(1,wi,1,2,"div",1),S(2,"async")),e&2&&(s("ngForOf",o.dialogs),l(),s("tuiLet",R(2,2,o.isDialogClosesOnBack$)))},dependencies:[ct,N,si,we,Se,w,O,Ne,k],styles:["[_nghost-%COMP%]{position:fixed;left:0;bottom:0;width:100%;height:0}.t-overlay[_ngcontent-%COMP%], .t-dialog[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:flex-start;outline:none;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.t-overlay.ng-animating[_ngcontent-%COMP%], .t-dialog.ng-animating[_ngcontent-%COMP%]{overflow:clip}.t-overlay[_ngcontent-%COMP%]::-webkit-scrollbar, .t-dialog[_ngcontent-%COMP%]::-webkit-scrollbar, .t-overlay[_ngcontent-%COMP%]::-webkit-scrollbar-thumb, .t-dialog[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{display:none}.t-dialog[_ngcontent-%COMP%]{bottom:auto;height:100%}.t-overlay[_ngcontent-%COMP%]{height:100%;pointer-events:none;touch-action:none;opacity:0;letter-spacing:normal;transition:opacity var(--tui-duration, .3s),letter-spacing .01s;background:rgba(0,0,0,.75);-webkit-backdrop-filter:var(--tui-backdrop, none);backdrop-filter:var(--tui-backdrop, none)}.t-overlay_visible[_ngcontent-%COMP%]{opacity:1;letter-spacing:1px}.t-dialog[_ngcontent-%COMP%]:last-of-type{z-index:1}.t-scrollbars[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;bottom:0;margin:0;color:#747474}"],data:{animation:[ie("host",[Mt(":enter",[oe({overflow:"clip"}),It(":scope > *",[Ot()],{optional:!0})]),Mt(":leave",[It(":scope > *",[Ot()],{optional:!0})])])]}}),t})(),ci=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f({type:t}),t.\u0275inj=d({imports:[[_,H,He,ai,pt,ut]]}),t})();var Fi=["*"],xi=t=>({$implicit:t});function Ei(t,i){if(t&1&&m(0,"tui-svg",5),t&2){let e=i.polymorpheusOutlet;s("src",e)}}function Ri(t,i){if(t&1&&(x(0),a(1,Ei,1,1,"tui-svg",4),E()),t&2){let e=v();l(),s("polymorpheusOutlet",e.icon)("polymorpheusOutletContext",ot(2,xi,e.status))}}function ki(t,i){if(t&1){let e=et();c(0,"button",6),S(1,"async"),y("click",function(){z(e);let r=v();return $(r.close.emit())}),u()}if(t&2){let e=v();s("icon",e.icons.close)("title",R(1,2,e.closeWord$))}}var ui=(()=>{class t{constructor(e,o,r){this.closeWord$=e,this.icons=o,this.options=r,this.hasIcon=this.options.hasIcon,this.icon=this.options.icon,this.status=this.options.status,this.size=this.options.size,this.hideClose=!1,this.close=new Ft}get hasClose(){return!this.hideClose&&me(this.close)}}return t.\u0275fac=function(e){return new(e||t)(n(ze),n(Le),n(mt))},t.\u0275cmp=g({type:t,selectors:[["tui-notification"],["a","tuiNotification",""],["button","tuiNotification",""]],hostVars:2,hostBindings:function(e,o){e&2&&q("data-status",o.status)("data-size",o.size)},inputs:{hasIcon:"hasIcon",icon:"icon",status:"status",size:"size",hideClose:"hideClose"},outputs:{close:"close"},ngContentSelectors:Fi,decls:5,vars:3,consts:[[4,"ngIf"],[1,"t-content"],["appearance","icon","automation-id","tui-notification__close","size","xs","tuiIconButton","","type","button","class","t-close",3,"icon","title","click",4,"ngIf"],["automation-id","tui-notification__more",1,"t-more",3,"src"],["automation-id","tui-notification__icon","class","t-icon",3,"src",4,"polymorpheusOutlet","polymorpheusOutletContext"],["automation-id","tui-notification__icon",1,"t-icon",3,"src"],["appearance","icon","automation-id","tui-notification__close","size","xs","tuiIconButton","","type","button",1,"t-close",3,"click","icon","title"]],template:function(e,o){e&1&&(it(),a(0,Ri,2,4,"ng-container",0),c(1,"div",1),I(2),u(),a(3,ki,2,4,"button",2),m(4,"tui-svg",3)),e&2&&(s("ngIf",o.icon&&o.hasIcon),l(3),s("ngIf",o.hasClose),l(),s("src",o.icons.more))},dependencies:[Ye,Ke,O,w,k],styles:["[_nghost-%COMP%]{font:var(--tui-font-text-s);color:var(--tui-text-01);position:relative;display:flex;padding:.75rem 1rem;border-radius:var(--tui-radius-m);background:#fff;background:var(--tui-base-01);box-sizing:border-box;overflow:hidden;text-align:left}[_nghost-%COMP%] .t-more[_ngcontent-%COMP%]{display:none}button[_nghost-%COMP%], a[_nghost-%COMP%]{border:none;cursor:pointer}button[_nghost-%COMP%] .t-more[_ngcontent-%COMP%], a[_nghost-%COMP%] .t-more[_ngcontent-%COMP%]{display:inline-flex;color:var(--tui-text-01);opacity:.5}[data-size=s][_nghost-%COMP%]{padding:.375rem .625rem}[data-size=s][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{width:1rem;height:1.25rem;margin:0 .375rem 0 -.125rem}[data-size=s][_nghost-%COMP%] .t-close[_ngcontent-%COMP%]{margin:-.125rem -.375rem -.125rem .75rem}[data-size=s][_nghost-%COMP%] .t-more[_ngcontent-%COMP%]{margin:-.125rem -.375rem -.125rem 0}[data-size=m][_nghost-%COMP%]{padding:.75rem}[data-size=m][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{width:1.25rem;height:1.25rem;margin-right:.5rem}[data-size=m][_nghost-%COMP%] .t-close[_ngcontent-%COMP%]{margin:-.125rem -.125rem -.125rem 1rem}[data-size=m][_nghost-%COMP%] .t-more[_ngcontent-%COMP%]{margin:-.125rem -.375rem -.125rem 0}[data-size=l][_nghost-%COMP%]{padding:1rem;font:var(--tui-font-text-m);border-radius:var(--tui-radius-l)}[data-size=l][_nghost-%COMP%] .t-icon[_ngcontent-%COMP%]{width:1.5rem;height:1.5rem;margin-right:.5rem}[data-size=l][_nghost-%COMP%] .t-more[_ngcontent-%COMP%]{margin-right:-.5rem}[data-status=info][_nghost-%COMP%]{color:var(--tui-info-fill);background:linear-gradient(var(--tui-info-bg),var(--tui-info-bg)),var(--tui-base-01)}[data-status=success][_nghost-%COMP%]{color:var(--tui-success-fill);background:linear-gradient(var(--tui-success-bg),var(--tui-success-bg)),var(--tui-base-01)}[data-status=error][_nghost-%COMP%]{color:var(--tui-error-fill);background:linear-gradient(var(--tui-error-bg),var(--tui-error-bg)),var(--tui-base-01)}[data-status=warning][_nghost-%COMP%]{color:var(--tui-warning-fill);background:linear-gradient(var(--tui-warning-bg),var(--tui-warning-bg)),var(--tui-base-01)}[data-status=neutral][_nghost-%COMP%]{color:var(--tui-neutral-fill);background:linear-gradient(var(--tui-neutral-bg),var(--tui-neutral-bg)),var(--tui-base-01)}.t-content[_ngcontent-%COMP%]{flex:1;word-break:break-word;color:var(--tui-text-01);text-align:inherit;align-self:center}"],changeDetection:0}),t})(),pi=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f({type:t}),t.\u0275inj=d({imports:[[_,Xe,qe,H]]}),t})();function Ui(t,i){if(t&1&&(x(0),$t(1),E()),t&2){let e=i.polymorpheusOutlet;l(),Vt(" ",e," ")}}function Li(t,i){if(t&1&&(c(0,"label",4),a(1,Ui,2,1,"ng-container",5),u()),t&2){let e=v();l(),s("polymorpheusOutlet",e.item.label)("polymorpheusOutletContext",e.item)}}function zi(t,i){if(t&1&&m(0,"div",6),t&2){let e=i.polymorpheusOutlet;s("innerHTML",e,W)}}var $i=re(()=>wt(B)?"1rem 1rem 0 auto":"2rem 3rem 0 auto"),Vi=(()=>{class t{constructor(e,o,r,p,T){this.el=e,this.destroy$=o,this.position=r,this.options=p,this.item=T,this.autoClose=typeof this.item.autoClose=="function"?this.item.autoClose(this.item.status):this.item.autoClose,this.animation=this.position.endsWith("auto")?Object.assign(Object.assign({},this.options),{value:"right"}):Object.assign(Object.assign({},this.options),{value:"left"})}ngOnInit(){this.initAutoClose()}close(){this.item.$implicit.complete()}initAutoClose(){this.autoClose&&Pt(se(this.autoClose)?this.autoClose:3e3).pipe(C(Tt(this.el.nativeElement,"mouseenter")),Nt(()=>Tt(this.el.nativeElement,"mouseleave")),C(this.destroy$)).subscribe(()=>this.close())}}return t.\u0275fac=function(e){return new(e||t)(n(J),n(h,2),n($i),n(Ue),n(rt))},t.\u0275cmp=g({type:t,selectors:[["tui-alert"]],hostAttrs:["role","alert"],hostVars:5,hostBindings:function(e,o){e&2&&(Lt("@tuiFadeIn",o.options)("@tuiSlideIn",o.animation)("@tuiHeightCollapse",o.animation),Q("margin",o.position))},features:[M([h])],decls:4,vars:7,consts:[[3,"close","hasIcon","hideClose","icon","status"],["automation-id","tui-notification-alert__heading","class","t-heading",4,"ngIf"],["automation-id","tui-notification-alert__content",1,"t-content"],[3,"innerHTML",4,"polymorpheusOutlet","polymorpheusOutletContext"],["automation-id","tui-notification-alert__heading",1,"t-heading"],[4,"polymorpheusOutlet","polymorpheusOutletContext"],[3,"innerHTML"]],template:function(e,o){e&1&&(c(0,"tui-notification",0),y("close",function(){return o.close()}),a(1,Li,2,2,"label",1),c(2,"div",2),a(3,zi,1,1,"div",3),u()()),e&2&&(s("hasIcon",o.item.hasIcon)("hideClose",!o.item.hasCloseButton)("icon",o.item.icon)("status",o.item.status),l(),s("ngIf",o.item.label),l(2),s("polymorpheusOutlet",o.item.content)("polymorpheusOutletContext",o.item))},dependencies:[ui,O,w],styles:["[_nghost-%COMP%]{display:block;box-shadow:var(--tui-shadow-dropdown);border-radius:var(--tui-radius-l);width:18rem}[_nghost-%COMP%]:not(:first-child){margin-top:.75rem!important}[_nghost-%COMP%]:not(:last-child){margin-bottom:0!important}.t-heading[_ngcontent-%COMP%]{margin:0}[data-size=s][_ngcontent-%COMP%] .t-heading[_ngcontent-%COMP%]{font:var(--tui-font-text-s);font-weight:bold}[data-size=m][_ngcontent-%COMP%] .t-heading[_ngcontent-%COMP%]{font:var(--tui-font-text-m);line-height:1.25rem;font-weight:bold}[data-size=l][_ngcontent-%COMP%] .t-heading[_ngcontent-%COMP%]{font:var(--tui-font-text-l);line-height:1.5rem;font-weight:bold}.t-content[_ngcontent-%COMP%]{color:var(--tui-text-01);word-wrap:break-word;word-break:break-word}.t-content[_ngcontent-%COMP%]:empty{display:none}"],data:{animation:[Ee,Re,xe]},changeDetection:0}),t})(),Wi=(()=>{class t extends Ie{constructor(e,o){super(o),this.defaultOptions=e,this.component=new de(Vi)}}return t.\u0275fac=function(e){return new(e||t)(j(mt),j(Oe))},t.\u0275prov=Y({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var mi=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f({type:t}),t.\u0275inj=d({providers:[Ce(Wi)],imports:[[_,H,pi]]}),t})();var Zi=t=>({$implicit:t});function Yi(t,i){t&1&&D(0)}function Xi(t,i){if(t&1&&(c(0,"div",1),a(1,Yi,1,0,"ng-container",2),u()),t&2){let e=i.$implicit;s("@tuiParentAnimation",void 0)("tuiActiveZoneParent",e.activeZone||null),l(),s("polymorpheusOutlet",e.component)("polymorpheusOutletContext",ot(4,Zi,e))}}var di=(()=>{class t{constructor(e,o,r){this.hints$=e,this.destroy$=o,this.cdr=r,this.hints=[]}ngOnInit(){this.hints$.pipe(C(this.destroy$)).subscribe(e=>{this.hints=e,this.cdr.detectChanges()})}}return t.\u0275fac=function(e){return new(e||t)(n(Ge),n(h,2),n(P))},t.\u0275cmp=g({type:t,selectors:[["tui-hints-host"]],hostAttrs:["aria-live","polite"],features:[M([h])],decls:1,vars:1,consts:[["role","tooltip",3,"tuiActiveZoneParent",4,"ngFor","ngForOf"],["role","tooltip",3,"tuiActiveZoneParent"],[4,"polymorpheusOutlet","polymorpheusOutletContext"]],template:function(e,o){e&1&&a(0,Xi,2,6,"div",0),e&2&&s("ngForOf",o.hints)},dependencies:[N,Pe,w],styles:["[_nghost-%COMP%]{position:fixed;top:0;left:0;width:100%;height:0}"],data:{animation:[nt]}}),t})(),fi=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f({type:t}),t.\u0275inj=d({imports:[[_,H,Ae]]}),t})();function Ki(t,i){if(t&1&&(V(),m(0,"defs",4)),t&2){let e=i.$implicit;s("innerHTML",e,W)}}function qi(t,i){if(t&1&&(V(),x(0),a(1,Ki,1,1,"defs",3),E()),t&2){let e=v();l(),s("ngForOf",e.items)}}function Qi(t,i){if(t&1&&(V(),c(0,"defs"),m(1,"svg",6),u()),t&2){let e=i.$implicit;l(),s("outerHTML",e,W)}}function to(t,i){if(t&1&&a(0,Qi,2,1,"defs",5),t&2){let e=v();s("ngForOf",e.items)}}var gi=(()=>{class t{constructor(e,o,r,p){this.svgService=e,this.cdr=o,this.destroy$=r,this.isBrowser=!0,this.isBrowser=!Xt(p)}ngOnInit(){this.svgService.items$.pipe(C(this.destroy$)).subscribe(e=>{this.items=e.values(),this.cdr.detectChanges()})}}return t.\u0275fac=function(e){return new(e||t)(n(Ze),n(P),n(h,2),n(xt))},t.\u0275cmp=g({type:t,selectors:[["tui-svg-defs-host"]],features:[M([h])],decls:4,vars:2,consts:[["server",""],["version","1.1",0,"xmlns","xlink","http://www.w3.org/1999/xlink","xmlns","http://www.w3.org/2000/svg"],[4,"ngIf","ngIfElse"],[3,"innerHTML",4,"ngFor","ngForOf"],[3,"innerHTML"],[4,"ngFor","ngForOf"],[3,"outerHTML"]],template:function(e,o){if(e&1&&(V(),c(0,"svg",1),a(1,qi,2,1,"ng-container",2)(2,to,1,1,"ng-template",null,0,Zt),u()),e&2){let r=zt(3);l(),s("ngIf",o.isBrowser)("ngIfElse",r)}},dependencies:[O,N],styles:["[_nghost-%COMP%]{display:none}"],changeDetection:0}),t})(),vi=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f({type:t}),t.\u0275inj=d({imports:[[_,pt]]}),t})();var io=["*",[["tuiOverContent"]],[["tuiOverDialogs"]],[["tuiOverAlerts"]],[["tuiOverPortals"]],[["tuiOverHints"]]],oo=["*","tuiOverContent","tuiOverDialogs","tuiOverAlerts","tuiOverPortals","tuiOverHints"];function no(t,i){t&1&&m(0,"tui-scroll-controls",2)}var hi=(()=>{class t{constructor(e,o,r,p,T,ft,gt,vt,Ii){var ht;this.reducedMotion=e,this.duration=o,this.dialogs=r,this.isMobile=p,this.breakpoint=T,this.isIOS=ft,this.isAndroid=gt,this.isMobileRes$=this.breakpoint.pipe(L(_t=>_t==="mobile")),this.scrollbars$=this.dialogs.length&&!this.isMobile?F([...this.dialogs]).pipe(L(_t=>!_t.some(({length:bi})=>bi)),At(0)):Z(!this.isMobile),(ht=vt.defaultView)===null||ht===void 0||ht.document.body.setAttribute("data-tui-theme",Ii.toLowerCase())}}return t.\u0275fac=function(e){return new(e||t)(n(ke),n(Be),n(lt),n(B),n(We),n(ye),n(Me),n(A),n(Ve))},t.\u0275cmp=g({type:t,selectors:[["tui-root"]],hostAttrs:["data-tui-version","3.84.0"],hostVars:9,hostBindings:function(e,o){e&1&&y("touchstart.passive.silent",function(){return 0})("$.class._mobile",function(){return o.isMobileRes$}),e&2&&(Ut("$.class._mobile",o.isMobileRes$),Q("--tui-duration",o.duration,"ms"),tt("_ios",o.isIOS)("_android",o.isAndroid)("_reduced-motion",o.reducedMotion))},ngContentSelectors:oo,decls:14,vars:3,consts:[["class","t-root-scrollbar",4,"ngIf"],[1,"t-root-content"],[1,"t-root-scrollbar"]],template:function(e,o){e&1&&(it(io),a(0,no,1,0,"tui-scroll-controls",0),S(1,"async"),m(2,"tui-svg-defs-host"),c(3,"tui-dropdown-host")(4,"div",1),I(5),u(),I(6,1),m(7,"tui-dialog-host"),I(8,2),m(9,"tui-alert-host"),I(10,3),u(),I(11,4),m(12,"tui-hints-host"),I(13,5)),e&2&&s("ngIf",R(1,1,o.scrollbars$))},dependencies:[ct,gi,je,li,ni,di,O,k],styles:[`@keyframes tuiPresent{to{content:"1"}}@keyframes tuiSkeletonVibe{to{opacity:.5}}html,.tui-zero-scrollbar{scrollbar-width:none;-ms-overflow-style:none}html::-webkit-scrollbar,.tui-zero-scrollbar::-webkit-scrollbar,html::-webkit-scrollbar-thumb,.tui-zero-scrollbar::-webkit-scrollbar-thumb{display:none}body[data-tui-theme]{font:var(--tui-font-text-s);color:var(--tui-text-01);background:var(--tui-base-01);margin:0}tui-root{position:relative;display:block;flex:1;-webkit-tap-highlight-color:transparent}tui-root>.t-root-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;display:none;margin:0}[data-tui-theme] tui-root>.t-root-scrollbar{display:block}.t-root-content{height:100%;isolation:isolate;transform:translateY(var(--t-root-top))}[tuiDropdownButton][tuiDropdownButton]{display:none}.t-overscroll-none{overscroll-behavior:none} -`],encapsulation:2}),t})(),dt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f({type:t}),t.\u0275inj=d({imports:[[_,Je,Fe,vi,fi,ci,ri,ut]]}),t})();var ro=[import("./chunk-TDHOYHWP.js").then(({StarterKit:t})=>t).then(t=>t.configure({heading:{levels:[1,2,3,4,5,6]}})),import("./chunk-FIA4QGVF.js").then(({default:t})=>t.configure({types:["heading","paragraph"]})),import("./chunk-4UKZBYPS.js").then(({default:t})=>t),import("./chunk-FUMOYEVA.js").then(({default:t})=>t),import("./chunk-DAPS4CYE.js").then(({default:t})=>t),import("./chunk-YCMBXQIW.js").then(({default:t})=>t),import("./chunk-2C42PP3N.js").then(({FontColor:t})=>t),import("./chunk-HIF7AY24.js").then(({TuiLink:t})=>t),import("./chunk-JOF5LDD4.js").then(({TuiJumpAnchor:t})=>t),import("./chunk-4KXESJXW.js").then(({TuiFileLink:t})=>t),import("./chunk-LMX2ACGI.js").then(({BackgroundColor:t})=>t),import("./chunk-4TB5QD4Q.js").then(({TuiTable:t})=>t.configure({resizable:!0})),import("./chunk-WBOTJDKX.js").then(({TuiTableCell:t})=>t),import("./chunk-YBSSW44U.js").then(({default:t})=>t),import("./chunk-NRKGVSLD.js").then(({TableHeader:t})=>t),import("./chunk-WQ5F45AV.js").then(({TuiTabExtension:t})=>t),import("./chunk-NEE5JZUV.js").then(({TableCellBackground:t})=>t),import("./chunk-ERBXCQNZ.js").then(({TuiDetailsContent:t})=>t),import("./chunk-ERBXCQNZ.js").then(({TuiDetails:t})=>t),import("./chunk-ERBXCQNZ.js").then(({TuiSummary:t})=>t),import("./chunk-ZISPUAXL.js").then(({TuiFontSize:t})=>t)],_i=ro;var Ti=(()=>{let i=class i{};i.\u0275fac=function(r){return new(r||i)},i.\u0275cmp=g({type:i,selectors:[["app"]],standalone:!0,features:[Wt],decls:7,vars:0,consts:[["ngProjectAs","tuiOverContent",5,["tuiOverContent"]],["ngProjectAs","tuiOverDialogs",5,["tuiOverDialogs"]],["ngProjectAs","tuiOverAlerts",5,["tuiOverAlerts"]],["ngProjectAs","tuiOverPortals",5,["tuiOverPortals"]],["ngProjectAs","tuiOverHints",5,["tuiOverHints"]]],template:function(r,p){r&1&&(c(0,"tui-root"),m(1,"router-outlet"),D(2,0)(3,1)(4,2)(5,3)(6,4),u())},dependencies:[dt,hi,te,ii],encapsulation:2,changeDetection:0});let t=i;return t})();var so=(()=>{let i=class i extends at{constructor(o,r,p){super(o,r,p)}ngOnDestroy(){this.flush()}};i.\u0275fac=function(r){return new(r||i)(j(A),j(G),j(st))},i.\u0275prov=Y({token:i,factory:i.\u0275fac});let t=i;return t})();function ao(){return new ve}function lo(t,i,e){return new _e(t,i,e)}var Ci=[{provide:st,useFactory:ao},{provide:at,useClass:so},{provide:Et,useFactory:lo,deps:[Jt,at,Bt]}],co=[{provide:G,useFactory:()=>new he},{provide:yt,useValue:"BrowserAnimations"},...Ci],Fr=[{provide:G,useClass:ge},{provide:yt,useValue:"NoopAnimations"},...Ci];function yi(){return kt("NgEagerAnimations"),[...co]}var Mi={providers:[yi(),ee([{path:"",pathMatch:"full",loadComponent:()=>St(void 0,null,function*(){return import("./chunk-FEQBHM2J.js")})}]),Qt(),Ht(dt,mi,Qe,ti),{provide:ei,deps:[X],useFactory:t=>[..._i,import("./chunk-GLZEUBPZ.js").then(({tuiCreateImageEditorExtension:i})=>i({injector:t}))]},{provide:$e,useClass:oi}]};var Oi={production:!1};Oi.production&&void 0;Kt(Ti,Mi).catch(t=>console.error(t)); -//# sourceMappingURL=main-EMD2MDEP.js.map +`],encapsulation:2}),t})(),dt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=f({type:t}),t.\u0275inj=d({imports:[[_,Je,Fe,vi,fi,ci,ri,ut]]}),t})();var ro=[import("./chunk-TDHOYHWP.js").then(({StarterKit:t})=>t).then(t=>t.configure({heading:{levels:[1,2,3,4,5,6]}})),import("./chunk-FIA4QGVF.js").then(({default:t})=>t.configure({types:["heading","paragraph"]})),import("./chunk-4UKZBYPS.js").then(({default:t})=>t),import("./chunk-FUMOYEVA.js").then(({default:t})=>t),import("./chunk-DAPS4CYE.js").then(({default:t})=>t),import("./chunk-YCMBXQIW.js").then(({default:t})=>t),import("./chunk-2C42PP3N.js").then(({FontColor:t})=>t),import("./chunk-HIF7AY24.js").then(({TuiLink:t})=>t),import("./chunk-JOF5LDD4.js").then(({TuiJumpAnchor:t})=>t),import("./chunk-4KXESJXW.js").then(({TuiFileLink:t})=>t),import("./chunk-LMX2ACGI.js").then(({BackgroundColor:t})=>t),import("./chunk-4TB5QD4Q.js").then(({TuiTable:t})=>t.configure({resizable:!0})),import("./chunk-WBOTJDKX.js").then(({TuiTableCell:t})=>t),import("./chunk-YBSSW44U.js").then(({default:t})=>t),import("./chunk-NRKGVSLD.js").then(({TableHeader:t})=>t),import("./chunk-WQ5F45AV.js").then(({TuiTabExtension:t})=>t),import("./chunk-NEE5JZUV.js").then(({TableCellBackground:t})=>t),import("./chunk-ERBXCQNZ.js").then(({TuiDetailsContent:t})=>t),import("./chunk-ERBXCQNZ.js").then(({TuiDetails:t})=>t),import("./chunk-ERBXCQNZ.js").then(({TuiSummary:t})=>t),import("./chunk-ZISPUAXL.js").then(({TuiFontSize:t})=>t)],_i=ro;var Ti=(()=>{let i=class i{};i.\u0275fac=function(r){return new(r||i)},i.\u0275cmp=g({type:i,selectors:[["app"]],standalone:!0,features:[Wt],decls:7,vars:0,consts:[["ngProjectAs","tuiOverContent",5,["tuiOverContent"]],["ngProjectAs","tuiOverDialogs",5,["tuiOverDialogs"]],["ngProjectAs","tuiOverAlerts",5,["tuiOverAlerts"]],["ngProjectAs","tuiOverPortals",5,["tuiOverPortals"]],["ngProjectAs","tuiOverHints",5,["tuiOverHints"]]],template:function(r,p){r&1&&(c(0,"tui-root"),m(1,"router-outlet"),D(2,0)(3,1)(4,2)(5,3)(6,4),u())},dependencies:[dt,hi,te,ii],encapsulation:2,changeDetection:0});let t=i;return t})();var so=(()=>{let i=class i extends at{constructor(o,r,p){super(o,r,p)}ngOnDestroy(){this.flush()}};i.\u0275fac=function(r){return new(r||i)(j(A),j(G),j(st))},i.\u0275prov=Y({token:i,factory:i.\u0275fac});let t=i;return t})();function ao(){return new ve}function lo(t,i,e){return new _e(t,i,e)}var Ci=[{provide:st,useFactory:ao},{provide:at,useClass:so},{provide:Et,useFactory:lo,deps:[Jt,at,Bt]}],co=[{provide:G,useFactory:()=>new he},{provide:yt,useValue:"BrowserAnimations"},...Ci],Fr=[{provide:G,useClass:ge},{provide:yt,useValue:"NoopAnimations"},...Ci];function yi(){return kt("NgEagerAnimations"),[...co]}var Mi={providers:[yi(),ee([{path:"",pathMatch:"full",loadComponent:()=>St(void 0,null,function*(){return import("./chunk-3GE2UJOD.js")})}]),Qt(),Ht(dt,mi,Qe,ti),{provide:ei,deps:[X],useFactory:t=>[..._i,import("./chunk-GLZEUBPZ.js").then(({tuiCreateImageEditorExtension:i})=>i({injector:t}))]},{provide:$e,useClass:oi}]};var Oi={production:!1};Oi.production&&void 0;Kt(Ti,Mi).catch(t=>console.error(t)); +//# sourceMappingURL=main-LXQ3UEIO.js.map diff --git a/main-EMD2MDEP.js.map b/main-LXQ3UEIO.js.map similarity index 100% rename from main-EMD2MDEP.js.map rename to main-LXQ3UEIO.js.map