web.6.653b19da0028e34e.js Maven / Gradle / Ivy
"use strict";(self.webpackChunkflink=self.webpackChunkflink||[]).push([[6],{60006:(ut,w,r)=>{r.d(w,{J:()=>S});var e=r(36895),C=r(19132),E=r(77579),N=r(39300),O=r(68675),R=r(95577),T=r(82722),M=r(54004),I=r(27830),h=r(94650);function H(f,x){if(1&f){const c=h.EpF();h.TgZ(0,"nz-tab",2),h.NdJ("nzClick",function(){const F=h.CHM(c).$implicit,Y=h.oxw();return h.KtG(Y.navigateTo(F.path))}),h.qZA()}2&f&&h.Q6J("nzTitle",x.$implicit.title)}let S=(()=>{class f{constructor(c,b,k){this.activatedRoute=c,this.router=b,this.cdr=k,this.listOfNavigation=[],this.size="default",this.navIndex=0,this.destroy$=new E.x}navigateTo(c){this.router.navigate([c],{relativeTo:this.activatedRoute}).then()}ngOnInit(){this.router.events.pipe((0,N.h)(c=>c instanceof C.m2),(0,O.O)(!0),(0,N.h)(()=>!(!this.activatedRoute||!this.activatedRoute.firstChild)),(0,R.z)(()=>this.activatedRoute.firstChild.data),(0,T.R)(this.destroy$),(0,M.U)(c=>c.path)).subscribe(c=>{this.navIndex=this.listOfNavigation.map(b=>b.path).indexOf(c),this.cdr.markForCheck()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}}return f.\u0275fac=function(c){return new(c||f)(h.Y36(C.gz),h.Y36(C.F0),h.Y36(h.sBO))},f.\u0275cmp=h.Xpm({type:f,selectors:[["flink-navigation"]],inputs:{listOfNavigation:"listOfNavigation",size:"size"},standalone:!0,features:[h.jDz],decls:2,vars:3,consts:[[3,"nzSelectedIndex","nzSize"],[3,"nzTitle","nzClick",4,"ngFor","ngForOf"],[3,"nzTitle","nzClick"]],template:function(c,b){1&c&&(h.TgZ(0,"nz-tabset",0),h.YNc(1,H,1,1,"nz-tab",1),h.qZA()),2&c&&(h.Q6J("nzSelectedIndex",b.navIndex)("nzSize",b.size),h.xp6(1),h.Q6J("ngForOf",b.listOfNavigation))},dependencies:[I.we,I.xH,I.xw,e.sg],styles:["[_nghost-%COMP%] .ant-tabs-nav{margin-bottom:0}"],changeDetection:0}),f})()},27830:(ut,w,r)=>{r.d(w,{cj:()=>X,we:()=>jt,xH:()=>dt,xw:()=>$});var e=r(94650),C=r(21102),E=r(66287),N=r(85469),O=r(12687),R=r(21281),T=r(29521),M=r(54968),I=r(50727),h=r(66406),H=r(53101),S=r(77579),f=r(39646),x=r(56451),c=r(82722),b=r(23601),k=r(68675),F=r(50590),Y=r(39300),mt=r(91005),_=r(36895),V=r(73325),U=r(29562),q=r(82540),pt=r(11519),K=r(40445),p=r(70655),z=r(3187),P=r(19132),ft=r(49643),bt=r(83353),B=r(72536),_t=r(88932);function gt(i,o){if(1&i&&(e.ynx(0),e._UZ(1,"span",1),e.BQk()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("nzType",t)}}function Tt(i,o){if(1&i&&(e.ynx(0),e._uU(1),e.BQk()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.hij(" ",t.tab.label," ")}}const zt=function(){return{visible:!1}};function vt(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"li",8),e.NdJ("click",function(){const a=e.CHM(t).$implicit,l=e.oxw(2);return e.KtG(l.onSelect(a))})("contextmenu",function(s){const l=e.CHM(t).$implicit,d=e.oxw(2);return e.KtG(d.onContextmenu(l,s))}),e.YNc(1,Tt,2,1,"ng-container",9),e.qZA()}if(2&i){const t=o.$implicit;e.ekj("ant-tabs-dropdown-menu-item-disabled",t.disabled),e.Q6J("nzSelected",t.active)("nzDisabled",t.disabled),e.xp6(1),e.Q6J("nzStringTemplateOutlet",t.tab.label)("nzStringTemplateOutletContext",e.DdM(6,zt))}}function Ct(i,o){if(1&i&&(e.TgZ(0,"ul",6),e.YNc(1,vt,2,7,"li",7),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.items)}}function It(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",10),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.addClicked.emit())}),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("addIcon",t.addIcon)}}const xt=function(){return{minWidth:"46px"}},Et=["navWarp"],yt=["navList"];function Dt(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",8),e.NdJ("click",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.addClicked.emit())}),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("addIcon",t.addIcon)}}function Mt(i,o){}function At(i,o){if(1&i&&(e.TgZ(0,"div",9),e.YNc(1,Mt,0,0,"ng-template",10),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",t.extraTemplate)}}const Nt=["*"],Ot=["nz-tab-body",""];function St(i,o){}function kt(i,o){if(1&i&&(e.ynx(0),e.YNc(1,St,0,0,"ng-template",1),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngTemplateOutlet",t.content)}}function Bt(i,o){if(1&i&&(e.ynx(0),e._UZ(1,"span",1),e.BQk()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("nzType",t)}}const Rt=["contentTemplate"];function Pt(i,o){1&i&&e.Hsn(0)}function Lt(i,o){1&i&&e.Hsn(0,1)}const Wt=[[["","nz-tab-link",""]],"*"],wt=["[nz-tab-link]","*"];function Ht(i,o){if(1&i&&(e.ynx(0),e._uU(1),e.BQk()),2&i){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(t.label)}}function Ft(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",10),e.NdJ("click",function(s){e.CHM(t);const a=e.oxw().index,l=e.oxw(2);return e.KtG(l.onClose(a,s))}),e.qZA()}if(2&i){const t=e.oxw().$implicit;e.Q6J("closeIcon",t.nzCloseIcon)}}const Yt=function(){return{visible:!0}};function Ut(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("click",function(s){const a=e.CHM(t),l=a.$implicit,d=a.index,u=e.oxw(2);return e.KtG(u.clickNavItem(l,d,s))})("contextmenu",function(s){const l=e.CHM(t).$implicit,d=e.oxw(2);return e.KtG(d.contextmenuNavItem(l,s))}),e.TgZ(1,"div",7),e.YNc(2,Ht,2,1,"ng-container",8),e.YNc(3,Ft,1,1,"button",9),e.qZA()()}if(2&i){const t=o.$implicit,n=o.index,s=e.oxw(2);e.Udp("margin-right","horizontal"===s.position?s.nzTabBarGutter:null,"px")("margin-bottom","vertical"===s.position?s.nzTabBarGutter:null,"px"),e.ekj("ant-tabs-tab-active",s.nzSelectedIndex===n)("ant-tabs-tab-disabled",t.nzDisabled),e.xp6(1),e.Q6J("disabled",t.nzDisabled)("tab",t)("active",s.nzSelectedIndex===n),e.uIk("tabIndex",s.getTabIndex(t,n))("aria-disabled",t.nzDisabled)("aria-selected",s.nzSelectedIndex===n&&!s.nzHideAll)("aria-controls",s.getTabContentId(n)),e.xp6(1),e.Q6J("nzStringTemplateOutlet",t.label)("nzStringTemplateOutletContext",e.DdM(18,Yt)),e.xp6(1),e.Q6J("ngIf",t.nzClosable&&s.closable&&!t.nzDisabled)}}function Kt(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"nz-tabs-nav",4),e.NdJ("tabScroll",function(s){e.CHM(t);const a=e.oxw();return e.KtG(a.nzTabListScroll.emit(s))})("selectFocusedIndex",function(s){e.CHM(t);const a=e.oxw();return e.KtG(a.setSelectedIndex(s))})("addClicked",function(){e.CHM(t);const s=e.oxw();return e.KtG(s.onAdd())}),e.YNc(1,Ut,4,19,"div",5),e.qZA()}if(2&i){const t=e.oxw();e.Q6J("ngStyle",t.nzTabBarStyle)("selectedIndex",t.nzSelectedIndex||0)("inkBarAnimated",t.inkBarAnimated)("addable",t.addable)("addIcon",t.nzAddIcon)("hideBar",t.nzHideAll)("position",t.position)("extraTemplate",t.nzTabBarExtraContent),e.xp6(1),e.Q6J("ngForOf",t.tabs)}}function Zt(i,o){if(1&i&&e._UZ(0,"div",11),2&i){const t=o.$implicit,n=o.index,s=e.oxw();e.Q6J("active",s.nzSelectedIndex===n&&!s.nzHideAll)("content",t.content)("forceRender",t.nzForceRender)("tabPaneAnimated",s.tabPaneAnimated)}}let L=(()=>{class i{constructor(t){this.elementRef=t,this.addIcon="plus",this.element=this.elementRef.nativeElement}getElementWidth(){var t;return(null===(t=this.element)||void 0===t?void 0:t.offsetWidth)||0}getElementHeight(){var t;return(null===(t=this.element)||void 0===t?void 0:t.offsetHeight)||0}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq))},i.\u0275cmp=e.Xpm({type:i,selectors:[["nz-tab-add-button"],["button","nz-tab-add-button",""]],hostAttrs:["aria-label","Add tab","type","button",1,"ant-tabs-nav-add"],inputs:{addIcon:"addIcon"},decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nz-icon","","nzTheme","outline",3,"nzType"]],template:function(t,n){1&t&&e.YNc(0,gt,2,1,"ng-container",0),2&t&&e.Q6J("nzStringTemplateOutlet",n.addIcon)},dependencies:[C.Ls,E.f],encapsulation:2}),i})(),Z=(()=>{class i{constructor(t,n,s){this.elementRef=t,this.ngZone=n,this.animationMode=s,this.position="horizontal",this.animated=!0}get _animated(){return"NoopAnimations"!==this.animationMode&&this.animated}alignToElement(t){this.ngZone.runOutsideAngular(()=>{(0,N.e)(()=>this.setStyles(t))})}setStyles(t){const n=this.elementRef.nativeElement;"horizontal"===this.position?(n.style.top="",n.style.height="",n.style.left=this.getLeftPosition(t),n.style.width=this.getElementWidth(t)):(n.style.left="",n.style.width="",n.style.top=this.getTopPosition(t),n.style.height=this.getElementHeight(t))}getLeftPosition(t){return t?`${t.offsetLeft||0}px`:"0"}getElementWidth(t){return t?`${t.offsetWidth||0}px`:"0"}getTopPosition(t){return t?`${t.offsetTop||0}px`:"0"}getElementHeight(t){return t?`${t.offsetHeight||0}px`:"0"}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq),e.Y36(e.R0b),e.Y36(e.QbO,8))},i.\u0275dir=e.lG2({type:i,selectors:[["nz-tabs-ink-bar"],["","nz-tabs-ink-bar",""]],hostAttrs:[1,"ant-tabs-ink-bar"],hostVars:2,hostBindings:function(t,n){2&t&&e.ekj("ant-tabs-ink-bar-animated",n._animated)},inputs:{position:"position",animated:"animated"}}),i})(),Q=(()=>{class i{constructor(t){this.elementRef=t,this.disabled=!1,this.active=!1,this.el=t.nativeElement,this.parentElement=this.el.parentElement}focus(){this.el.focus()}get width(){return this.parentElement.offsetWidth}get height(){return this.parentElement.offsetHeight}get left(){return this.parentElement.offsetLeft}get top(){return this.parentElement.offsetTop}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq))},i.\u0275dir=e.lG2({type:i,selectors:[["","nzTabNavItem",""]],inputs:{disabled:"disabled",tab:"tab",active:"active"}}),i})(),J=(()=>{class i{constructor(t,n){this.cdr=t,this.elementRef=n,this.items=[],this.addable=!1,this.addIcon="plus",this.addClicked=new e.vpe,this.selected=new e.vpe,this.closeAnimationWaitTimeoutId=-1,this.menuOpened=!1,this.element=this.elementRef.nativeElement}onSelect(t){t.disabled||(t.tab.nzClick.emit(),this.selected.emit(t))}onContextmenu(t,n){t.disabled||t.tab.nzContextmenu.emit(n)}showItems(){clearTimeout(this.closeAnimationWaitTimeoutId),this.menuOpened=!0,this.cdr.markForCheck()}menuVisChange(t){t||(this.closeAnimationWaitTimeoutId=setTimeout(()=>{this.menuOpened=!1,this.cdr.markForCheck()},150))}getElementWidth(){var t;return(null===(t=this.element)||void 0===t?void 0:t.offsetWidth)||0}getElementHeight(){var t;return(null===(t=this.element)||void 0===t?void 0:t.offsetHeight)||0}ngOnDestroy(){clearTimeout(this.closeAnimationWaitTimeoutId)}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.sBO),e.Y36(e.SBq))},i.\u0275cmp=e.Xpm({type:i,selectors:[["nz-tab-nav-operation"]],hostAttrs:[1,"ant-tabs-nav-operations"],hostVars:2,hostBindings:function(t,n){2&t&&e.ekj("ant-tabs-nav-operations-hidden",0===n.items.length)},inputs:{items:"items",addable:"addable",addIcon:"addIcon"},outputs:{addClicked:"addClicked",selected:"selected"},exportAs:["nzTabNavOperation"],decls:7,vars:6,consts:[["nz-dropdown","","type","button","tabindex","-1","aria-hidden","true","nzOverlayClassName","nz-tabs-dropdown",1,"ant-tabs-nav-more",3,"nzDropdownMenu","nzOverlayStyle","nzMatchWidthElement","nzVisibleChange","mouseenter"],["dropdownTrigger","nzDropdown"],["nz-icon","","nzType","ellipsis"],["menu","nzDropdownMenu"],["nz-menu","",4,"ngIf"],["nz-tab-add-button","",3,"addIcon","click",4,"ngIf"],["nz-menu",""],["nz-menu-item","","class","ant-tabs-dropdown-menu-item",3,"ant-tabs-dropdown-menu-item-disabled","nzSelected","nzDisabled","click","contextmenu",4,"ngFor","ngForOf"],["nz-menu-item","",1,"ant-tabs-dropdown-menu-item",3,"nzSelected","nzDisabled","click","contextmenu"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["nz-tab-add-button","",3,"addIcon","click"]],template:function(t,n){if(1&t&&(e.TgZ(0,"button",0,1),e.NdJ("nzVisibleChange",function(a){return n.menuVisChange(a)})("mouseenter",function(){return n.showItems()}),e._UZ(2,"span",2),e.qZA(),e.TgZ(3,"nz-dropdown-menu",null,3),e.YNc(5,Ct,2,1,"ul",4),e.qZA(),e.YNc(6,It,1,1,"button",5)),2&t){const s=e.MAs(4);e.Q6J("nzDropdownMenu",s)("nzOverlayStyle",e.DdM(5,xt))("nzMatchWidthElement",null),e.xp6(5),e.Q6J("ngIf",n.menuOpened),e.xp6(1),e.Q6J("ngIf",n.addable)}},dependencies:[_.sg,_.O5,C.Ls,E.f,V.wO,V.r9,U.cm,U.RR,L],encapsulation:2,changeDetection:0}),i})();const et=.995**20;let nt=(()=>{class i{constructor(t,n){this.ngZone=t,this.elementRef=n,this.lastWheelDirection=null,this.lastWheelTimestamp=0,this.lastTimestamp=0,this.lastTimeDiff=0,this.lastMixedWheel=0,this.lastWheelPrevent=!1,this.touchPosition=null,this.lastOffset=null,this.motion=-1,this.unsubscribe=()=>{},this.offsetChange=new e.vpe,this.tabScroll=new e.vpe,this.onTouchEnd=s=>{if(!this.touchPosition)return;const a=this.lastOffset,l=this.lastTimeDiff;if(this.lastOffset=this.touchPosition=null,a){const d=a.x/l,u=a.y/l,g=Math.abs(d),y=Math.abs(u);if(Math.max(g,y)<.1)return;let v=d,D=u;this.motion=window.setInterval(()=>{Math.abs(v)<.01&&Math.abs(D)<.01?window.clearInterval(this.motion):(v*=et,D*=et,this.onOffset(20*v,20*D,s))},20)}},this.onTouchMove=s=>{if(!this.touchPosition)return;s.preventDefault();const{screenX:a,screenY:l}=s.touches[0],d=a-this.touchPosition.x,u=l-this.touchPosition.y;this.onOffset(d,u,s);const g=Date.now();this.lastTimeDiff=g-this.lastTimestamp,this.lastTimestamp=g,this.lastOffset={x:d,y:u},this.touchPosition={x:a,y:l}},this.onTouchStart=s=>{const{screenX:a,screenY:l}=s.touches[0];this.touchPosition={x:a,y:l},window.clearInterval(this.motion)},this.onWheel=s=>{const{deltaX:a,deltaY:l}=s;let d;const u=Math.abs(a),g=Math.abs(l);u===g?d="x"===this.lastWheelDirection?a:l:u>g?(d=a,this.lastWheelDirection="x"):(d=l,this.lastWheelDirection="y");const y=Date.now(),v=Math.abs(d);(y-this.lastWheelTimestamp>100||v-this.lastMixedWheel>10)&&(this.lastWheelPrevent=!1),this.onOffset(-d,-d,s),(s.defaultPrevented||this.lastWheelPrevent)&&(this.lastWheelPrevent=!0),this.lastWheelTimestamp=y,this.lastMixedWheel=v}}ngOnInit(){this.unsubscribe=this.ngZone.runOutsideAngular(()=>{const t=this.elementRef.nativeElement,n=(0,M.R)(t,"wheel"),s=(0,M.R)(t,"touchstart"),a=(0,M.R)(t,"touchmove"),l=(0,M.R)(t,"touchend"),d=new I.w0;return d.add(this.subscribeWrap("wheel",n,this.onWheel)),d.add(this.subscribeWrap("touchstart",s,this.onTouchStart)),d.add(this.subscribeWrap("touchmove",a,this.onTouchMove)),d.add(this.subscribeWrap("touchend",l,this.onTouchEnd)),()=>{d.unsubscribe()}})}subscribeWrap(t,n,s){return n.subscribe(a=>{this.tabScroll.emit({type:t,event:a}),a.defaultPrevented||s(a)})}onOffset(t,n,s){this.ngZone.run(()=>{this.offsetChange.emit({x:t,y:n,event:s})})}ngOnDestroy(){this.unsubscribe()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.R0b),e.Y36(e.SBq))},i.\u0275dir=e.lG2({type:i,selectors:[["","nzTabScrollList",""]],outputs:{offsetChange:"offsetChange",tabScroll:"tabScroll"}}),i})();const Jt=typeof requestAnimationFrame<"u"?h.Z:H.E;let G=(()=>{class i{constructor(t,n,s,a,l){this.cdr=t,this.ngZone=n,this.viewportRuler=s,this.nzResizeObserver=a,this.dir=l,this.indexFocused=new e.vpe,this.selectFocusedIndex=new e.vpe,this.addClicked=new e.vpe,this.tabScroll=new e.vpe,this.position="horizontal",this.addable=!1,this.hideBar=!1,this.addIcon="plus",this.inkBarAnimated=!0,this.translate=null,this.transformX=0,this.transformY=0,this.pingLeft=!1,this.pingRight=!1,this.pingTop=!1,this.pingBottom=!1,this.hiddenItems=[],this.destroy$=new S.x,this._selectedIndex=0,this.wrapperWidth=0,this.wrapperHeight=0,this.scrollListWidth=0,this.scrollListHeight=0,this.operationWidth=0,this.operationHeight=0,this.addButtonWidth=0,this.addButtonHeight=0,this.selectedIndexChanged=!1,this.lockAnimationTimeoutId=-1,this.cssTransformTimeWaitingId=-1}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){const n=(0,R.su)(t);this._selectedIndex!==n&&(this._selectedIndex=t,this.selectedIndexChanged=!0,this.keyManager&&this.keyManager.updateActiveItem(t))}get focusIndex(){return this.keyManager?this.keyManager.activeItemIndex:0}set focusIndex(t){!this.isValidIndex(t)||this.focusIndex===t||!this.keyManager||this.keyManager.setActiveItem(t)}get showAddButton(){return 0===this.hiddenItems.length&&this.addable}ngAfterViewInit(){const t=this.dir?this.dir.change:(0,f.of)(null),n=this.viewportRuler.change(150),s=()=>{this.updateScrollListPosition(),this.alignInkBarToSelectedTab()};this.keyManager=new O.Em(this.items).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(this.selectedIndex),(0,N.e)(s),(0,x.T)(this.nzResizeObserver.observe(this.navWarpRef),this.nzResizeObserver.observe(this.navListRef)).pipe((0,c.R)(this.destroy$),(0,b.e)(16,Jt)).subscribe(()=>{s()}),(0,x.T)(t,n,this.items.changes).pipe((0,c.R)(this.destroy$)).subscribe(()=>{Promise.resolve().then(s),this.keyManager.withHorizontalOrientation(this.getLayoutDirection())}),this.keyManager.change.pipe((0,c.R)(this.destroy$)).subscribe(a=>{this.indexFocused.emit(a),this.setTabFocus(a),this.scrollToTab(this.keyManager.activeItem)})}ngAfterContentChecked(){this.selectedIndexChanged&&(this.updateScrollListPosition(),this.alignInkBarToSelectedTab(),this.selectedIndexChanged=!1,this.cdr.markForCheck())}ngOnDestroy(){clearTimeout(this.lockAnimationTimeoutId),clearTimeout(this.cssTransformTimeWaitingId),this.destroy$.next(),this.destroy$.complete()}onSelectedFromMenu(t){const n=this.items.toArray().findIndex(s=>s===t);-1!==n&&(this.keyManager.updateActiveItem(n),this.focusIndex!==this.selectedIndex&&(this.selectFocusedIndex.emit(this.focusIndex),this.scrollToTab(t)))}onOffsetChange(t){if("horizontal"===this.position){if(-1===this.lockAnimationTimeoutId&&(this.transformX>=0&&t.x>0||this.transformX<=this.wrapperWidth-this.scrollListWidth&&t.x<0))return;t.event.preventDefault(),this.transformX=this.clampTransformX(this.transformX+t.x),this.setTransform(this.transformX,0)}else{if(-1===this.lockAnimationTimeoutId&&(this.transformY>=0&&t.y>0||this.transformY<=this.wrapperHeight-this.scrollListHeight&&t.y<0))return;t.event.preventDefault(),this.transformY=this.clampTransformY(this.transformY+t.y),this.setTransform(0,this.transformY)}this.lockAnimation(),this.setVisibleRange(),this.setPingStatus()}handleKeydown(t){const n=this.navWarpRef.nativeElement.contains(t.target);if(!(0,T.Vb)(t)&&n)switch(t.keyCode){case T.oh:case T.LH:case T.SV:case T.JH:this.lockAnimation(),this.keyManager.onKeydown(t);break;case T.K5:case T.L_:this.focusIndex!==this.selectedIndex&&this.selectFocusedIndex.emit(this.focusIndex);break;default:this.keyManager.onKeydown(t)}}isValidIndex(t){if(!this.items)return!0;const n=this.items?this.items.toArray()[t]:null;return!!n&&!n.disabled}scrollToTab(t){if(!this.items.find(s=>s===t))return;const n=this.items.toArray();if("horizontal"===this.position){let s=this.transformX;if("rtl"===this.getLayoutDirection()){const a=n[0].left+n[0].width-t.left-t.width;athis.transformX+this.wrapperWidth&&(s=a+t.width-this.wrapperWidth)}else t.left<-this.transformX?s=-t.left:t.left+t.width>-this.transformX+this.wrapperWidth&&(s=-(t.left+t.width-this.wrapperWidth));this.transformX=s,this.transformY=0,this.setTransform(s,0)}else{let s=this.transformY;t.top<-this.transformY?s=-t.top:t.top+t.height>-this.transformY+this.wrapperHeight&&(s=-(t.top+t.height-this.wrapperHeight)),this.transformY=s,this.transformX=0,this.setTransform(0,s)}clearTimeout(this.cssTransformTimeWaitingId),this.cssTransformTimeWaitingId=setTimeout(()=>{this.setVisibleRange()},150)}lockAnimation(){-1===this.lockAnimationTimeoutId&&this.ngZone.runOutsideAngular(()=>{this.navListRef.nativeElement.style.transition="none",this.lockAnimationTimeoutId=setTimeout(()=>{this.navListRef.nativeElement.style.transition="",this.lockAnimationTimeoutId=-1},150)})}setTransform(t,n){this.navListRef.nativeElement.style.transform=`translate(${t}px, ${n}px)`}clampTransformX(t){const n=this.wrapperWidth-this.scrollListWidth;return"rtl"===this.getLayoutDirection()?Math.max(Math.min(n,t),0):Math.min(Math.max(n,t),0)}clampTransformY(t){return Math.min(Math.max(this.wrapperHeight-this.scrollListHeight,t),0)}updateScrollListPosition(){this.resetSizes(),this.transformX=this.clampTransformX(this.transformX),this.transformY=this.clampTransformY(this.transformY),this.setVisibleRange(),this.setPingStatus(),this.keyManager&&(this.keyManager.updateActiveItem(this.keyManager.activeItemIndex),this.keyManager.activeItem&&this.scrollToTab(this.keyManager.activeItem))}resetSizes(){this.addButtonWidth=this.addBtnRef?this.addBtnRef.getElementWidth():0,this.addButtonHeight=this.addBtnRef?this.addBtnRef.getElementHeight():0,this.operationWidth=this.operationRef.getElementWidth(),this.operationHeight=this.operationRef.getElementHeight(),this.wrapperWidth=this.navWarpRef.nativeElement.offsetWidth||0,this.wrapperHeight=this.navWarpRef.nativeElement.offsetHeight||0,this.scrollListHeight=this.navListRef.nativeElement.offsetHeight||0,this.scrollListWidth=this.navListRef.nativeElement.offsetWidth||0}alignInkBarToSelectedTab(){const t=this.items&&this.items.length?this.items.toArray()[this.selectedIndex]:null,n=t?t.elementRef.nativeElement:null;n&&this.inkBar.alignToElement(n.parentElement)}setPingStatus(){const t={top:!1,right:!1,bottom:!1,left:!1},n=this.navWarpRef.nativeElement;"horizontal"===this.position?"rtl"===this.getLayoutDirection()?(t.right=this.transformX>0,t.left=this.transformX+this.wrapperWidth{const a=`ant-tabs-nav-wrap-ping-${s}`;t[s]?n.classList.add(a):n.classList.remove(a)})}setVisibleRange(){let t,n,s,a,l,d;const u=this.items.toArray(),g={width:0,height:0,left:0,top:0,right:0},y=m=>{let A;return A="right"===n?u[0].left+u[0].width-u[m].left-u[m].width:(u[m]||g)[n],A};"horizontal"===this.position?(t="width",a=this.wrapperWidth,l=this.scrollListWidth-(this.hiddenItems.length?this.operationWidth:0),d=this.addButtonWidth,s=Math.abs(this.transformX),"rtl"===this.getLayoutDirection()?(n="right",this.pingRight=this.transformX>0,this.pingLeft=this.transformX+this.wrapperWidtha&&(v=a-d),!u.length)return this.hiddenItems=[],void this.cdr.markForCheck();const D=u.length;let ct=D;for(let m=0;ms+v){ct=m-1;break}let ht=0;for(let m=D-1;m>=0;m-=1)if(y(m){class i{constructor(){this.content=null,this.active=!1,this.tabPaneAnimated=!0,this.forceRender=!1}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["","nz-tab-body",""]],hostAttrs:[1,"ant-tabs-tabpane"],hostVars:12,hostBindings:function(t,n){2&t&&(e.uIk("tabindex",n.active?0:-1)("aria-hidden",!n.active),e.Udp("visibility",n.tabPaneAnimated?n.active?null:"hidden":null)("height",n.tabPaneAnimated?n.active?null:0:null)("overflow-y",n.tabPaneAnimated?n.active?null:"none":null)("display",n.tabPaneAnimated||n.active?null:"none"),e.ekj("ant-tabs-tabpane-active",n.active))},inputs:{content:"content",active:"active",tabPaneAnimated:"tabPaneAnimated",forceRender:"forceRender"},exportAs:["nzTabBody"],attrs:Ot,decls:1,vars:1,consts:[[4,"ngIf"],[3,"ngTemplateOutlet"]],template:function(t,n){1&t&&e.YNc(0,kt,2,1,"ng-container",0),2&t&&e.Q6J("ngIf",n.active||n.forceRender)},dependencies:[_.O5,_.tP],encapsulation:2,changeDetection:0}),i})(),at=(()=>{class i{constructor(){this.closeIcon="close"}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=e.Xpm({type:i,selectors:[["nz-tab-close-button"],["button","nz-tab-close-button",""]],hostAttrs:["aria-label","Close tab","type","button",1,"ant-tabs-tab-remove"],inputs:{closeIcon:"closeIcon"},decls:1,vars:1,consts:[[4,"nzStringTemplateOutlet"],["nz-icon","","nzTheme","outline",3,"nzType"]],template:function(t,n){1&t&&e.YNc(0,Bt,2,1,"ng-container",0),2&t&&e.Q6J("nzStringTemplateOutlet",n.closeIcon)},dependencies:[C.Ls,E.f],encapsulation:2}),i})(),ot=(()=>{class i{constructor(t){this.templateRef=t}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.Rgc,1))},i.\u0275dir=e.lG2({type:i,selectors:[["ng-template","nzTabLink",""]],exportAs:["nzTabLinkTemplate"]}),i})(),rt=(()=>{class i{constructor(t,n,s){this.elementRef=t,this.routerLink=n,this.routerLinkWithHref=s}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(e.SBq),e.Y36(P.rH,10),e.Y36(P.yS,10))},i.\u0275dir=e.lG2({type:i,selectors:[["a","nz-tab-link",""]],exportAs:["nzTabLink"]}),i})(),X=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275dir=e.lG2({type:i,selectors:[["","nz-tab",""]],exportAs:["nzTab"]}),i})();const lt=new e.OlP("NZ_TAB_SET");let $=(()=>{class i{constructor(t){this.closestTabSet=t,this.nzTitle="",this.nzClosable=!1,this.nzCloseIcon="close",this.nzDisabled=!1,this.nzForceRender=!1,this.nzSelect=new e.vpe,this.nzDeselect=new e.vpe,this.nzClick=new e.vpe,this.nzContextmenu=new e.vpe,this.template=null,this.isActive=!1,this.position=null,this.origin=null,this.stateChanges=new S.x}get content(){return this.template||this.contentTemplate}get label(){var t;return this.nzTitle||(null===(t=this.nzTabLinkTemplateDirective)||void 0===t?void 0:t.templateRef)}ngOnChanges(t){const{nzTitle:n,nzDisabled:s,nzForceRender:a}=t;(n||s||a)&&this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete()}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(lt))},i.\u0275cmp=e.Xpm({type:i,selectors:[["nz-tab"]],contentQueries:function(t,n,s){if(1&t&&(e.Suo(s,ot,5),e.Suo(s,X,5,e.Rgc),e.Suo(s,rt,5)),2&t){let a;e.iGM(a=e.CRH())&&(n.nzTabLinkTemplateDirective=a.first),e.iGM(a=e.CRH())&&(n.template=a.first),e.iGM(a=e.CRH())&&(n.linkDirective=a.first)}},viewQuery:function(t,n){if(1&t&&e.Gf(Rt,7),2&t){let s;e.iGM(s=e.CRH())&&(n.contentTemplate=s.first)}},inputs:{nzTitle:"nzTitle",nzClosable:"nzClosable",nzCloseIcon:"nzCloseIcon",nzDisabled:"nzDisabled",nzForceRender:"nzForceRender"},outputs:{nzSelect:"nzSelect",nzDeselect:"nzDeselect",nzClick:"nzClick",nzContextmenu:"nzContextmenu"},exportAs:["nzTab"],features:[e.TTD],ngContentSelectors:wt,decls:4,vars:0,consts:[["tabLinkTemplate",""],["contentTemplate",""]],template:function(t,n){1&t&&(e.F$t(Wt),e.YNc(0,Pt,1,0,"ng-template",null,0,e.W1O),e.YNc(2,Lt,1,0,"ng-template",null,1,e.W1O))},encapsulation:2,changeDetection:0}),(0,p.gn)([(0,z.yF)()],i.prototype,"nzClosable",void 0),(0,p.gn)([(0,z.yF)()],i.prototype,"nzDisabled",void 0),(0,p.gn)([(0,z.yF)()],i.prototype,"nzForceRender",void 0),i})();class Gt{}let $t=0,dt=(()=>{class i{constructor(t,n,s,a,l){this.nzConfigService=t,this.ngZone=n,this.cdr=s,this.directionality=a,this.router=l,this._nzModuleName="tabs",this.nzTabPosition="top",this.nzCanDeactivate=null,this.nzAddIcon="plus",this.nzTabBarStyle=null,this.nzType="line",this.nzSize="default",this.nzAnimated=!0,this.nzTabBarGutter=void 0,this.nzHideAdd=!1,this.nzCentered=!1,this.nzHideAll=!1,this.nzLinkRouter=!1,this.nzLinkExact=!0,this.nzSelectChange=new e.vpe(!0),this.nzSelectedIndexChange=new e.vpe,this.nzTabListScroll=new e.vpe,this.nzClose=new e.vpe,this.nzAdd=new e.vpe,this.allTabs=new e.n_E,this.tabs=new e.n_E,this.dir="ltr",this.destroy$=new S.x,this.indexToSelect=0,this.selectedIndex=null,this.tabLabelSubscription=I.w0.EMPTY,this.tabsSubscription=I.w0.EMPTY,this.canDeactivateSubscription=I.w0.EMPTY,this.tabSetId=$t++}get nzSelectedIndex(){return this.selectedIndex}set nzSelectedIndex(t){this.indexToSelect=(0,R.su)(t,null)}get position(){return-1===["top","bottom"].indexOf(this.nzTabPosition)?"vertical":"horizontal"}get addable(){return"editable-card"===this.nzType&&!this.nzHideAdd}get closable(){return"editable-card"===this.nzType}get line(){return"line"===this.nzType}get inkBarAnimated(){return this.line&&("boolean"==typeof this.nzAnimated?this.nzAnimated:this.nzAnimated.inkBar)}get tabPaneAnimated(){return"horizontal"===this.position&&this.line&&("boolean"==typeof this.nzAnimated?this.nzAnimated:this.nzAnimated.tabPane)}ngOnInit(){var t;this.dir=this.directionality.value,null===(t=this.directionality.change)||void 0===t||t.pipe((0,c.R)(this.destroy$)).subscribe(n=>{this.dir=n,this.cdr.detectChanges()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.tabs.destroy(),this.tabLabelSubscription.unsubscribe(),this.tabsSubscription.unsubscribe(),this.canDeactivateSubscription.unsubscribe()}ngAfterContentInit(){this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>this.setUpRouter())}),this.subscribeToTabLabels(),this.subscribeToAllTabChanges(),this.tabsSubscription=this.tabs.changes.subscribe(()=>{if(this.clampTabIndex(this.indexToSelect)===this.selectedIndex){const n=this.tabs.toArray();for(let s=0;s{this.tabs.forEach((s,a)=>s.isActive=a===t),n||this.nzSelectedIndexChange.emit(t)})}this.tabs.forEach((n,s)=>{n.position=s-t,null!=this.selectedIndex&&0===n.position&&!n.origin&&(n.origin=t-this.selectedIndex)}),this.selectedIndex!==t&&(this.selectedIndex=t,this.cdr.markForCheck())}onClose(t,n){n.preventDefault(),n.stopPropagation(),this.nzClose.emit({index:t})}onAdd(){this.nzAdd.emit()}clampTabIndex(t){return Math.min(this.tabs.length-1,Math.max(t||0,0))}createChangeEvent(t){const n=new Gt;return n.index=t,this.tabs&&this.tabs.length&&(n.tab=this.tabs.toArray()[t],this.tabs.forEach((s,a)=>{a!==t&&s.nzDeselect.emit()}),n.tab.nzSelect.emit()),n}subscribeToTabLabels(){this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=(0,x.T)(...this.tabs.map(t=>t.stateChanges)).subscribe(()=>this.cdr.markForCheck())}subscribeToAllTabChanges(){this.allTabs.changes.pipe((0,k.O)(this.allTabs)).subscribe(t=>{this.tabs.reset(t.filter(n=>n.closestTabSet===this)),this.tabs.notifyOnChanges()})}canDeactivateFun(t,n){return"function"==typeof this.nzCanDeactivate?(0,z.lN)(this.nzCanDeactivate(t,n)).pipe((0,F.P)(),(0,c.R)(this.destroy$)):(0,f.of)(!0)}clickNavItem(t,n,s){t.nzDisabled||(t.nzClick.emit(),this.isRouterLinkClickEvent(n,s)||this.setSelectedIndex(n))}isRouterLinkClickEvent(t,n){const s=n.target;var a,l;return!!this.nzLinkRouter&&!(null===(a=this.tabs.toArray()[t])||void 0===a||null===(l=a.linkDirective)||void 0===l||!l.elementRef.nativeElement.contains(s))}contextmenuNavItem(t,n){t.nzDisabled||t.nzContextmenu.emit(n)}setSelectedIndex(t){this.canDeactivateSubscription.unsubscribe(),this.canDeactivateSubscription=this.canDeactivateFun(this.selectedIndex,t).subscribe(n=>{n&&(this.nzSelectedIndex=t,this.tabNavBarRef.focusIndex=t,this.cdr.markForCheck())})}getTabIndex(t,n){return t.nzDisabled?null:this.selectedIndex===n?0:-1}getTabContentId(t){return`nz-tabs-${this.tabSetId}-tab-${t}`}setUpRouter(){if(this.nzLinkRouter){if(!this.router)throw new Error(`${_t.Bq} you should import 'RouterModule' if you want to use 'nzLinkRouter'!`);this.router.events.pipe((0,c.R)(this.destroy$),(0,Y.h)(t=>t instanceof P.m2),(0,k.O)(!0),(0,mt.g)(0)).subscribe(()=>{this.updateRouterActive(),this.cdr.markForCheck()})}}updateRouterActive(){if(this.router.navigated){const t=this.findShouldActiveTabIndex();t!==this.selectedIndex&&this.setSelectedIndex(t),this.nzHideAll=-1===t}}findShouldActiveTabIndex(){const t=this.tabs.toArray(),n=this.isLinkActive(this.router);return t.findIndex(s=>{const a=s.linkDirective;return!!a&&(n(a.routerLink)||n(a.routerLinkWithHref))})}isLinkActive(t){return n=>!!n&&t.isActive(n.urlTree||"",{paths:this.nzLinkExact?"exact":"subset",queryParams:this.nzLinkExact?"exact":"subset",fragment:"ignored",matrixParams:"ignored"})}getTabContentMarginValue(){return 100*-(this.nzSelectedIndex||0)}getTabContentMarginLeft(){return this.tabPaneAnimated&&"rtl"!==this.dir?`${this.getTabContentMarginValue()}%`:""}getTabContentMarginRight(){return this.tabPaneAnimated&&"rtl"===this.dir?`${this.getTabContentMarginValue()}%`:""}}return i.\u0275fac=function(t){return new(t||i)(e.Y36(B.jY),e.Y36(e.R0b),e.Y36(e.sBO),e.Y36(K.Is,8),e.Y36(P.F0,8))},i.\u0275cmp=e.Xpm({type:i,selectors:[["nz-tabset"]],contentQueries:function(t,n,s){if(1&t&&e.Suo(s,$,5),2&t){let a;e.iGM(a=e.CRH())&&(n.allTabs=a)}},viewQuery:function(t,n){if(1&t&&e.Gf(G,5),2&t){let s;e.iGM(s=e.CRH())&&(n.tabNavBarRef=s.first)}},hostAttrs:[1,"ant-tabs"],hostVars:24,hostBindings:function(t,n){2&t&&e.ekj("ant-tabs-card","card"===n.nzType||"editable-card"===n.nzType)("ant-tabs-editable","editable-card"===n.nzType)("ant-tabs-editable-card","editable-card"===n.nzType)("ant-tabs-centered",n.nzCentered)("ant-tabs-rtl","rtl"===n.dir)("ant-tabs-top","top"===n.nzTabPosition)("ant-tabs-bottom","bottom"===n.nzTabPosition)("ant-tabs-left","left"===n.nzTabPosition)("ant-tabs-right","right"===n.nzTabPosition)("ant-tabs-default","default"===n.nzSize)("ant-tabs-small","small"===n.nzSize)("ant-tabs-large","large"===n.nzSize)},inputs:{nzSelectedIndex:"nzSelectedIndex",nzTabPosition:"nzTabPosition",nzTabBarExtraContent:"nzTabBarExtraContent",nzCanDeactivate:"nzCanDeactivate",nzAddIcon:"nzAddIcon",nzTabBarStyle:"nzTabBarStyle",nzType:"nzType",nzSize:"nzSize",nzAnimated:"nzAnimated",nzTabBarGutter:"nzTabBarGutter",nzHideAdd:"nzHideAdd",nzCentered:"nzCentered",nzHideAll:"nzHideAll",nzLinkRouter:"nzLinkRouter",nzLinkExact:"nzLinkExact"},outputs:{nzSelectChange:"nzSelectChange",nzSelectedIndexChange:"nzSelectedIndexChange",nzTabListScroll:"nzTabListScroll",nzClose:"nzClose",nzAdd:"nzAdd"},exportAs:["nzTabset"],features:[e._Bn([{provide:lt,useExisting:i}])],decls:4,vars:16,consts:[[3,"ngStyle","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","tabScroll","selectFocusedIndex","addClicked",4,"ngIf"],[1,"ant-tabs-content-holder"],[1,"ant-tabs-content"],["nz-tab-body","",3,"active","content","forceRender","tabPaneAnimated",4,"ngFor","ngForOf"],[3,"ngStyle","selectedIndex","inkBarAnimated","addable","addIcon","hideBar","position","extraTemplate","tabScroll","selectFocusedIndex","addClicked"],["class","ant-tabs-tab",3,"margin-right","margin-bottom","ant-tabs-tab-active","ant-tabs-tab-disabled","click","contextmenu",4,"ngFor","ngForOf"],[1,"ant-tabs-tab",3,"click","contextmenu"],["role","tab","nzTabNavItem","","cdkMonitorElementFocus","",1,"ant-tabs-tab-btn",3,"disabled","tab","active"],[4,"nzStringTemplateOutlet","nzStringTemplateOutletContext"],["nz-tab-close-button","",3,"closeIcon","click",4,"ngIf"],["nz-tab-close-button","",3,"closeIcon","click"],["nz-tab-body","",3,"active","content","forceRender","tabPaneAnimated"]],template:function(t,n){1&t&&(e.YNc(0,Kt,2,9,"nz-tabs-nav",0),e.TgZ(1,"div",1)(2,"div",2),e.YNc(3,Zt,1,4,"div",3),e.qZA()()),2&t&&(e.Q6J("ngIf",n.tabs.length||n.addable),e.xp6(2),e.Udp("margin-left",n.getTabContentMarginLeft())("margin-right",n.getTabContentMarginRight()),e.ekj("ant-tabs-content-top","top"===n.nzTabPosition)("ant-tabs-content-bottom","bottom"===n.nzTabPosition)("ant-tabs-content-left","left"===n.nzTabPosition)("ant-tabs-content-right","right"===n.nzTabPosition)("ant-tabs-content-animated",n.tabPaneAnimated),e.xp6(1),e.Q6J("ngForOf",n.tabs))},dependencies:[_.sg,_.O5,_.PC,E.f,O.kH,G,Q,at,st],encapsulation:2}),(0,p.gn)([(0,B.oS)()],i.prototype,"nzType",void 0),(0,p.gn)([(0,B.oS)()],i.prototype,"nzSize",void 0),(0,p.gn)([(0,B.oS)()],i.prototype,"nzAnimated",void 0),(0,p.gn)([(0,B.oS)()],i.prototype,"nzTabBarGutter",void 0),(0,p.gn)([(0,z.yF)()],i.prototype,"nzHideAdd",void 0),(0,p.gn)([(0,z.yF)()],i.prototype,"nzCentered",void 0),(0,p.gn)([(0,z.yF)()],i.prototype,"nzHideAll",void 0),(0,p.gn)([(0,z.yF)()],i.prototype,"nzLinkRouter",void 0),(0,p.gn)([(0,z.yF)()],i.prototype,"nzLinkExact",void 0),i})(),jt=(()=>{class i{}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=e.oAB({type:i}),i.\u0275inj=e.cJS({imports:[K.vT,_.ez,ft.Q8,C.PV,E.T,bt.ud,O.rt,q.ZD,U.b1]}),i})()}}]);
© 2015 - 2025 Weber Informatics LLC | Privacy Policy