[59329aa] | 1 | import { NgModule, Component, Input, Output, EventEmitter, ContentChildren, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, forwardRef, Inject } from '@angular/core';
|
---|
| 2 | import { CommonModule } from '@angular/common';
|
---|
| 3 | import { TooltipModule } from 'primeng/tooltip';
|
---|
| 4 | import { RippleModule } from 'primeng/ripple';
|
---|
| 5 | import { SharedModule, PrimeTemplate } from 'primeng/api';
|
---|
| 6 | import { DomHandler } from 'primeng/dom';
|
---|
| 7 | import * as i0 from "@angular/core";
|
---|
| 8 | import * as i1 from "@angular/common";
|
---|
| 9 | import * as i2 from "primeng/ripple";
|
---|
| 10 | import * as i3 from "primeng/tooltip";
|
---|
| 11 | let idx = 0;
|
---|
| 12 | export class TabPanel {
|
---|
| 13 | constructor(tabView, viewContainer, cd) {
|
---|
| 14 | this.viewContainer = viewContainer;
|
---|
| 15 | this.cd = cd;
|
---|
| 16 | this.cache = true;
|
---|
| 17 | this.tooltipPosition = 'top';
|
---|
| 18 | this.tooltipPositionStyle = 'absolute';
|
---|
| 19 | this.id = `p-tabpanel-${idx++}`;
|
---|
| 20 | this.tabView = tabView;
|
---|
| 21 | }
|
---|
| 22 | ngAfterContentInit() {
|
---|
| 23 | this.templates.forEach((item) => {
|
---|
| 24 | switch (item.getType()) {
|
---|
| 25 | case 'header':
|
---|
| 26 | this.headerTemplate = item.template;
|
---|
| 27 | break;
|
---|
| 28 | case 'content':
|
---|
| 29 | this.contentTemplate = item.template;
|
---|
| 30 | break;
|
---|
| 31 | default:
|
---|
| 32 | this.contentTemplate = item.template;
|
---|
| 33 | break;
|
---|
| 34 | }
|
---|
| 35 | });
|
---|
| 36 | }
|
---|
| 37 | get selected() {
|
---|
| 38 | return this._selected;
|
---|
| 39 | }
|
---|
| 40 | set selected(val) {
|
---|
| 41 | this._selected = val;
|
---|
| 42 | if (!this.loaded) {
|
---|
| 43 | this.cd.detectChanges();
|
---|
| 44 | }
|
---|
| 45 | if (val)
|
---|
| 46 | this.loaded = true;
|
---|
| 47 | }
|
---|
| 48 | get disabled() {
|
---|
| 49 | return this._disabled;
|
---|
| 50 | }
|
---|
| 51 | ;
|
---|
| 52 | set disabled(disabled) {
|
---|
| 53 | this._disabled = disabled;
|
---|
| 54 | this.tabView.cd.markForCheck();
|
---|
| 55 | }
|
---|
| 56 | get header() {
|
---|
| 57 | return this._header;
|
---|
| 58 | }
|
---|
| 59 | set header(header) {
|
---|
| 60 | this._header = header;
|
---|
| 61 | this.tabView.cd.markForCheck();
|
---|
| 62 | }
|
---|
| 63 | get leftIcon() {
|
---|
| 64 | return this._leftIcon;
|
---|
| 65 | }
|
---|
| 66 | set leftIcon(leftIcon) {
|
---|
| 67 | this._leftIcon = leftIcon;
|
---|
| 68 | this.tabView.cd.markForCheck();
|
---|
| 69 | }
|
---|
| 70 | get rightIcon() {
|
---|
| 71 | return this._rightIcon;
|
---|
| 72 | }
|
---|
| 73 | set rightIcon(rightIcon) {
|
---|
| 74 | this._rightIcon = rightIcon;
|
---|
| 75 | this.tabView.cd.markForCheck();
|
---|
| 76 | }
|
---|
| 77 | ngOnDestroy() {
|
---|
| 78 | this.view = null;
|
---|
| 79 | }
|
---|
| 80 | }
|
---|
| 81 | TabPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TabPanel, deps: [{ token: forwardRef(() => TabView) }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
---|
| 82 | TabPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: TabPanel, selector: "p-tabPanel", inputs: { closable: "closable", headerStyle: "headerStyle", headerStyleClass: "headerStyleClass", cache: "cache", tooltip: "tooltip", tooltipPosition: "tooltipPosition", tooltipPositionStyle: "tooltipPositionStyle", tooltipStyleClass: "tooltipStyleClass", selected: "selected", disabled: "disabled", header: "header", leftIcon: "leftIcon", rightIcon: "rightIcon" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], ngImport: i0, template: `
|
---|
| 83 | <div [attr.id]="id" class="p-tabview-panel" [hidden]="!selected"
|
---|
| 84 | role="tabpanel" [attr.aria-hidden]="!selected" [attr.aria-labelledby]="id + '-label'" *ngIf="!closed">
|
---|
| 85 | <ng-content></ng-content>
|
---|
| 86 | <ng-container *ngIf="contentTemplate && (cache ? loaded : selected)">
|
---|
| 87 | <ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
|
---|
| 88 | </ng-container>
|
---|
| 89 | </div>
|
---|
| 90 | `, isInline: true, directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
---|
| 91 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TabPanel, decorators: [{
|
---|
| 92 | type: Component,
|
---|
| 93 | args: [{
|
---|
| 94 | selector: 'p-tabPanel',
|
---|
| 95 | template: `
|
---|
| 96 | <div [attr.id]="id" class="p-tabview-panel" [hidden]="!selected"
|
---|
| 97 | role="tabpanel" [attr.aria-hidden]="!selected" [attr.aria-labelledby]="id + '-label'" *ngIf="!closed">
|
---|
| 98 | <ng-content></ng-content>
|
---|
| 99 | <ng-container *ngIf="contentTemplate && (cache ? loaded : selected)">
|
---|
| 100 | <ng-container *ngTemplateOutlet="contentTemplate"></ng-container>
|
---|
| 101 | </ng-container>
|
---|
| 102 | </div>
|
---|
| 103 | `,
|
---|
| 104 | host: {
|
---|
| 105 | 'class': 'p-element'
|
---|
| 106 | }
|
---|
| 107 | }]
|
---|
| 108 | }], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
---|
| 109 | type: Inject,
|
---|
| 110 | args: [forwardRef(() => TabView)]
|
---|
| 111 | }] }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { closable: [{
|
---|
| 112 | type: Input
|
---|
| 113 | }], headerStyle: [{
|
---|
| 114 | type: Input
|
---|
| 115 | }], headerStyleClass: [{
|
---|
| 116 | type: Input
|
---|
| 117 | }], cache: [{
|
---|
| 118 | type: Input
|
---|
| 119 | }], tooltip: [{
|
---|
| 120 | type: Input
|
---|
| 121 | }], tooltipPosition: [{
|
---|
| 122 | type: Input
|
---|
| 123 | }], tooltipPositionStyle: [{
|
---|
| 124 | type: Input
|
---|
| 125 | }], tooltipStyleClass: [{
|
---|
| 126 | type: Input
|
---|
| 127 | }], templates: [{
|
---|
| 128 | type: ContentChildren,
|
---|
| 129 | args: [PrimeTemplate]
|
---|
| 130 | }], selected: [{
|
---|
| 131 | type: Input
|
---|
| 132 | }], disabled: [{
|
---|
| 133 | type: Input
|
---|
| 134 | }], header: [{
|
---|
| 135 | type: Input
|
---|
| 136 | }], leftIcon: [{
|
---|
| 137 | type: Input
|
---|
| 138 | }], rightIcon: [{
|
---|
| 139 | type: Input
|
---|
| 140 | }] } });
|
---|
| 141 | export class TabView {
|
---|
| 142 | constructor(el, cd) {
|
---|
| 143 | this.el = el;
|
---|
| 144 | this.cd = cd;
|
---|
| 145 | this.orientation = 'top';
|
---|
| 146 | this.onChange = new EventEmitter();
|
---|
| 147 | this.onClose = new EventEmitter();
|
---|
| 148 | this.activeIndexChange = new EventEmitter();
|
---|
| 149 | this.backwardIsDisabled = true;
|
---|
| 150 | this.forwardIsDisabled = false;
|
---|
| 151 | }
|
---|
| 152 | ngAfterContentInit() {
|
---|
| 153 | this.initTabs();
|
---|
| 154 | this.tabPanels.changes.subscribe(_ => {
|
---|
| 155 | this.initTabs();
|
---|
| 156 | });
|
---|
| 157 | }
|
---|
| 158 | ngAfterViewChecked() {
|
---|
| 159 | if (this.tabChanged) {
|
---|
| 160 | this.updateInkBar();
|
---|
| 161 | this.tabChanged = false;
|
---|
| 162 | }
|
---|
| 163 | }
|
---|
| 164 | initTabs() {
|
---|
| 165 | this.tabs = this.tabPanels.toArray();
|
---|
| 166 | let selectedTab = this.findSelectedTab();
|
---|
| 167 | if (!selectedTab && this.tabs.length) {
|
---|
| 168 | if (this.activeIndex != null && this.tabs.length > this.activeIndex)
|
---|
| 169 | this.tabs[this.activeIndex].selected = true;
|
---|
| 170 | else
|
---|
| 171 | this.tabs[0].selected = true;
|
---|
| 172 | this.tabChanged = true;
|
---|
| 173 | }
|
---|
| 174 | this.cd.markForCheck();
|
---|
| 175 | }
|
---|
| 176 | open(event, tab) {
|
---|
| 177 | if (tab.disabled) {
|
---|
| 178 | if (event) {
|
---|
| 179 | event.preventDefault();
|
---|
| 180 | }
|
---|
| 181 | return;
|
---|
| 182 | }
|
---|
| 183 | if (!tab.selected) {
|
---|
| 184 | let selectedTab = this.findSelectedTab();
|
---|
| 185 | if (selectedTab) {
|
---|
| 186 | selectedTab.selected = false;
|
---|
| 187 | }
|
---|
| 188 | this.tabChanged = true;
|
---|
| 189 | tab.selected = true;
|
---|
| 190 | let selectedTabIndex = this.findTabIndex(tab);
|
---|
| 191 | this.preventActiveIndexPropagation = true;
|
---|
| 192 | this.activeIndexChange.emit(selectedTabIndex);
|
---|
| 193 | this.onChange.emit({ originalEvent: event, index: selectedTabIndex });
|
---|
| 194 | this.updateScrollBar(selectedTabIndex);
|
---|
| 195 | }
|
---|
| 196 | if (event) {
|
---|
| 197 | event.preventDefault();
|
---|
| 198 | }
|
---|
| 199 | }
|
---|
| 200 | close(event, tab) {
|
---|
| 201 | if (this.controlClose) {
|
---|
| 202 | this.onClose.emit({
|
---|
| 203 | originalEvent: event,
|
---|
| 204 | index: this.findTabIndex(tab),
|
---|
| 205 | close: () => {
|
---|
| 206 | this.closeTab(tab);
|
---|
| 207 | }
|
---|
| 208 | });
|
---|
| 209 | }
|
---|
| 210 | else {
|
---|
| 211 | this.closeTab(tab);
|
---|
| 212 | this.onClose.emit({
|
---|
| 213 | originalEvent: event,
|
---|
| 214 | index: this.findTabIndex(tab)
|
---|
| 215 | });
|
---|
| 216 | }
|
---|
| 217 | event.stopPropagation();
|
---|
| 218 | }
|
---|
| 219 | closeTab(tab) {
|
---|
| 220 | if (tab.disabled) {
|
---|
| 221 | return;
|
---|
| 222 | }
|
---|
| 223 | if (tab.selected) {
|
---|
| 224 | this.tabChanged = true;
|
---|
| 225 | tab.selected = false;
|
---|
| 226 | for (let i = 0; i < this.tabs.length; i++) {
|
---|
| 227 | let tabPanel = this.tabs[i];
|
---|
| 228 | if (!tabPanel.closed && !tab.disabled) {
|
---|
| 229 | tabPanel.selected = true;
|
---|
| 230 | break;
|
---|
| 231 | }
|
---|
| 232 | }
|
---|
| 233 | }
|
---|
| 234 | tab.closed = true;
|
---|
| 235 | }
|
---|
| 236 | findSelectedTab() {
|
---|
| 237 | for (let i = 0; i < this.tabs.length; i++) {
|
---|
| 238 | if (this.tabs[i].selected) {
|
---|
| 239 | return this.tabs[i];
|
---|
| 240 | }
|
---|
| 241 | }
|
---|
| 242 | return null;
|
---|
| 243 | }
|
---|
| 244 | findTabIndex(tab) {
|
---|
| 245 | let index = -1;
|
---|
| 246 | for (let i = 0; i < this.tabs.length; i++) {
|
---|
| 247 | if (this.tabs[i] == tab) {
|
---|
| 248 | index = i;
|
---|
| 249 | break;
|
---|
| 250 | }
|
---|
| 251 | }
|
---|
| 252 | return index;
|
---|
| 253 | }
|
---|
| 254 | getBlockableElement() {
|
---|
| 255 | return this.el.nativeElement.children[0];
|
---|
| 256 | }
|
---|
| 257 | get activeIndex() {
|
---|
| 258 | return this._activeIndex;
|
---|
| 259 | }
|
---|
| 260 | set activeIndex(val) {
|
---|
| 261 | this._activeIndex = val;
|
---|
| 262 | if (this.preventActiveIndexPropagation) {
|
---|
| 263 | this.preventActiveIndexPropagation = false;
|
---|
| 264 | return;
|
---|
| 265 | }
|
---|
| 266 | if (this.tabs && this.tabs.length && this._activeIndex != null && this.tabs.length > this._activeIndex) {
|
---|
| 267 | this.findSelectedTab().selected = false;
|
---|
| 268 | this.tabs[this._activeIndex].selected = true;
|
---|
| 269 | this.tabChanged = true;
|
---|
| 270 | this.updateScrollBar(val);
|
---|
| 271 | }
|
---|
| 272 | }
|
---|
| 273 | updateInkBar() {
|
---|
| 274 | let tabHeader = DomHandler.findSingle(this.navbar.nativeElement, 'li.p-highlight');
|
---|
| 275 | this.inkbar.nativeElement.style.width = DomHandler.getWidth(tabHeader) + 'px';
|
---|
| 276 | this.inkbar.nativeElement.style.left = DomHandler.getOffset(tabHeader).left - DomHandler.getOffset(this.navbar.nativeElement).left + 'px';
|
---|
| 277 | }
|
---|
| 278 | updateScrollBar(index) {
|
---|
| 279 | let tabHeader = this.navbar.nativeElement.children[index];
|
---|
| 280 | tabHeader.scrollIntoView({ block: 'nearest' });
|
---|
| 281 | }
|
---|
| 282 | updateButtonState() {
|
---|
| 283 | const content = this.content.nativeElement;
|
---|
| 284 | const { scrollLeft, scrollWidth } = content;
|
---|
| 285 | const width = DomHandler.getWidth(content);
|
---|
| 286 | this.backwardIsDisabled = scrollLeft === 0;
|
---|
| 287 | this.forwardIsDisabled = scrollLeft === scrollWidth - width;
|
---|
| 288 | }
|
---|
| 289 | onScroll(event) {
|
---|
| 290 | this.scrollable && this.updateButtonState();
|
---|
| 291 | event.preventDefault();
|
---|
| 292 | }
|
---|
| 293 | getVisibleButtonWidths() {
|
---|
| 294 | return [this.prevBtn?.nativeElement, this.nextBtn?.nativeElement].reduce((acc, el) => el ? acc + DomHandler.getWidth(el) : acc, 0);
|
---|
| 295 | }
|
---|
| 296 | navBackward() {
|
---|
| 297 | const content = this.content.nativeElement;
|
---|
| 298 | const width = DomHandler.getWidth(content) - this.getVisibleButtonWidths();
|
---|
| 299 | const pos = content.scrollLeft - width;
|
---|
| 300 | content.scrollLeft = pos <= 0 ? 0 : pos;
|
---|
| 301 | }
|
---|
| 302 | navForward() {
|
---|
| 303 | const content = this.content.nativeElement;
|
---|
| 304 | const width = DomHandler.getWidth(content) - this.getVisibleButtonWidths();
|
---|
| 305 | const pos = content.scrollLeft + width;
|
---|
| 306 | const lastPos = content.scrollWidth - width;
|
---|
| 307 | content.scrollLeft = pos >= lastPos ? lastPos : pos;
|
---|
| 308 | }
|
---|
| 309 | }
|
---|
| 310 | TabView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TabView, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
---|
| 311 | TabView.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: TabView, selector: "p-tabView", inputs: { orientation: "orientation", style: "style", styleClass: "styleClass", controlClose: "controlClose", scrollable: "scrollable", activeIndex: "activeIndex" }, outputs: { onChange: "onChange", onClose: "onClose", activeIndexChange: "activeIndexChange" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "tabPanels", predicate: TabPanel }], viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true }, { propertyName: "navbar", first: true, predicate: ["navbar"], descendants: true }, { propertyName: "prevBtn", first: true, predicate: ["prevBtn"], descendants: true }, { propertyName: "nextBtn", first: true, predicate: ["nextBtn"], descendants: true }, { propertyName: "inkbar", first: true, predicate: ["inkbar"], descendants: true }], ngImport: i0, template: `
|
---|
| 312 | <div [ngClass]="{'p-tabview p-component': true, 'p-tabview-scrollable': scrollable}" [ngStyle]="style" [class]="styleClass">
|
---|
| 313 | <div class="p-tabview-nav-container">
|
---|
| 314 | <button *ngIf="scrollable && !backwardIsDisabled" #prevBtn class="p-tabview-nav-prev p-tabview-nav-btn p-link" (click)="navBackward()" type="button" pRipple>
|
---|
| 315 | <span class="pi pi-chevron-left"></span>
|
---|
| 316 | </button>
|
---|
| 317 | <div #content class="p-tabview-nav-content" (scroll)="onScroll($event)">
|
---|
| 318 | <ul #navbar class="p-tabview-nav" role="tablist">
|
---|
| 319 | <ng-template ngFor let-tab [ngForOf]="tabs">
|
---|
| 320 | <li role="presentation" [ngClass]="{'p-highlight': tab.selected, 'p-disabled': tab.disabled}" [ngStyle]="tab.headerStyle" [class]="tab.headerStyleClass" *ngIf="!tab.closed">
|
---|
| 321 | <a role="tab" class="p-tabview-nav-link" [attr.id]="tab.id + '-label'" [attr.aria-selected]="tab.selected" [attr.aria-controls]="tab.id" [pTooltip]="tab.tooltip" [tooltipPosition]="tab.tooltipPosition"
|
---|
| 322 | [attr.aria-selected]="tab.selected" [positionStyle]="tab.tooltipPositionStyle" [tooltipStyleClass]="tab.tooltipStyleClass"
|
---|
| 323 | (click)="open($event,tab)" (keydown.enter)="open($event,tab)" pRipple [attr.tabindex]="tab.disabled ? null : '0'">
|
---|
| 324 | <ng-container *ngIf="!tab.headerTemplate">
|
---|
| 325 | <span class="p-tabview-left-icon" [ngClass]="tab.leftIcon" *ngIf="tab.leftIcon"></span>
|
---|
| 326 | <span class="p-tabview-title">{{tab.header}}</span>
|
---|
| 327 | <span class="p-tabview-right-icon" [ngClass]="tab.rightIcon" *ngIf="tab.rightIcon"></span>
|
---|
| 328 | </ng-container>
|
---|
| 329 | <ng-container *ngTemplateOutlet="tab.headerTemplate"></ng-container>
|
---|
| 330 | <span *ngIf="tab.closable" class="p-tabview-close pi pi-times" (click)="close($event,tab)"></span>
|
---|
| 331 | </a>
|
---|
| 332 | </li>
|
---|
| 333 | </ng-template>
|
---|
| 334 | <li #inkbar class="p-tabview-ink-bar"></li>
|
---|
| 335 | </ul>
|
---|
| 336 | </div>
|
---|
| 337 | <button *ngIf="scrollable && !forwardIsDisabled" #nextBtn class="p-tabview-nav-next p-tabview-nav-btn p-link" (click)="navForward()" type="button" pRipple>
|
---|
| 338 | <span class="pi pi-chevron-right"></span>
|
---|
| 339 | </button>
|
---|
| 340 | </div>
|
---|
| 341 | <div class="p-tabview-panels">
|
---|
| 342 | <ng-content></ng-content>
|
---|
| 343 | </div>
|
---|
| 344 | </div>
|
---|
| 345 | `, isInline: true, styles: [".p-tabview-nav-container{position:relative}.p-tabview-scrollable .p-tabview-nav-container{overflow:hidden}.p-tabview-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;-ms-scroll-chaining:contain auto;overscroll-behavior:contain auto}.p-tabview-nav{display:flex;margin:0;padding:0;list-style-type:none;flex:1 1 auto}.p-tabview-nav-link{cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabview-ink-bar{display:none;z-index:1}.p-tabview-nav-link:focus{z-index:1}.p-tabview-title{line-height:1;white-space:nowrap}.p-tabview-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabview-nav-prev{left:0}.p-tabview-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabview-close{z-index:1}\n"], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.Ripple, selector: "[pRipple]" }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
---|
| 346 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TabView, decorators: [{
|
---|
| 347 | type: Component,
|
---|
| 348 | args: [{ selector: 'p-tabView', template: `
|
---|
| 349 | <div [ngClass]="{'p-tabview p-component': true, 'p-tabview-scrollable': scrollable}" [ngStyle]="style" [class]="styleClass">
|
---|
| 350 | <div class="p-tabview-nav-container">
|
---|
| 351 | <button *ngIf="scrollable && !backwardIsDisabled" #prevBtn class="p-tabview-nav-prev p-tabview-nav-btn p-link" (click)="navBackward()" type="button" pRipple>
|
---|
| 352 | <span class="pi pi-chevron-left"></span>
|
---|
| 353 | </button>
|
---|
| 354 | <div #content class="p-tabview-nav-content" (scroll)="onScroll($event)">
|
---|
| 355 | <ul #navbar class="p-tabview-nav" role="tablist">
|
---|
| 356 | <ng-template ngFor let-tab [ngForOf]="tabs">
|
---|
| 357 | <li role="presentation" [ngClass]="{'p-highlight': tab.selected, 'p-disabled': tab.disabled}" [ngStyle]="tab.headerStyle" [class]="tab.headerStyleClass" *ngIf="!tab.closed">
|
---|
| 358 | <a role="tab" class="p-tabview-nav-link" [attr.id]="tab.id + '-label'" [attr.aria-selected]="tab.selected" [attr.aria-controls]="tab.id" [pTooltip]="tab.tooltip" [tooltipPosition]="tab.tooltipPosition"
|
---|
| 359 | [attr.aria-selected]="tab.selected" [positionStyle]="tab.tooltipPositionStyle" [tooltipStyleClass]="tab.tooltipStyleClass"
|
---|
| 360 | (click)="open($event,tab)" (keydown.enter)="open($event,tab)" pRipple [attr.tabindex]="tab.disabled ? null : '0'">
|
---|
| 361 | <ng-container *ngIf="!tab.headerTemplate">
|
---|
| 362 | <span class="p-tabview-left-icon" [ngClass]="tab.leftIcon" *ngIf="tab.leftIcon"></span>
|
---|
| 363 | <span class="p-tabview-title">{{tab.header}}</span>
|
---|
| 364 | <span class="p-tabview-right-icon" [ngClass]="tab.rightIcon" *ngIf="tab.rightIcon"></span>
|
---|
| 365 | </ng-container>
|
---|
| 366 | <ng-container *ngTemplateOutlet="tab.headerTemplate"></ng-container>
|
---|
| 367 | <span *ngIf="tab.closable" class="p-tabview-close pi pi-times" (click)="close($event,tab)"></span>
|
---|
| 368 | </a>
|
---|
| 369 | </li>
|
---|
| 370 | </ng-template>
|
---|
| 371 | <li #inkbar class="p-tabview-ink-bar"></li>
|
---|
| 372 | </ul>
|
---|
| 373 | </div>
|
---|
| 374 | <button *ngIf="scrollable && !forwardIsDisabled" #nextBtn class="p-tabview-nav-next p-tabview-nav-btn p-link" (click)="navForward()" type="button" pRipple>
|
---|
| 375 | <span class="pi pi-chevron-right"></span>
|
---|
| 376 | </button>
|
---|
| 377 | </div>
|
---|
| 378 | <div class="p-tabview-panels">
|
---|
| 379 | <ng-content></ng-content>
|
---|
| 380 | </div>
|
---|
| 381 | </div>
|
---|
| 382 | `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
---|
| 383 | 'class': 'p-element'
|
---|
| 384 | }, styles: [".p-tabview-nav-container{position:relative}.p-tabview-scrollable .p-tabview-nav-container{overflow:hidden}.p-tabview-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;-ms-scroll-chaining:contain auto;overscroll-behavior:contain auto}.p-tabview-nav{display:flex;margin:0;padding:0;list-style-type:none;flex:1 1 auto}.p-tabview-nav-link{cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabview-ink-bar{display:none;z-index:1}.p-tabview-nav-link:focus{z-index:1}.p-tabview-title{line-height:1;white-space:nowrap}.p-tabview-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabview-nav-prev{left:0}.p-tabview-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabview-close{z-index:1}\n"] }]
|
---|
| 385 | }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { orientation: [{
|
---|
| 386 | type: Input
|
---|
| 387 | }], style: [{
|
---|
| 388 | type: Input
|
---|
| 389 | }], styleClass: [{
|
---|
| 390 | type: Input
|
---|
| 391 | }], controlClose: [{
|
---|
| 392 | type: Input
|
---|
| 393 | }], scrollable: [{
|
---|
| 394 | type: Input
|
---|
| 395 | }], content: [{
|
---|
| 396 | type: ViewChild,
|
---|
| 397 | args: ['content']
|
---|
| 398 | }], navbar: [{
|
---|
| 399 | type: ViewChild,
|
---|
| 400 | args: ['navbar']
|
---|
| 401 | }], prevBtn: [{
|
---|
| 402 | type: ViewChild,
|
---|
| 403 | args: ['prevBtn']
|
---|
| 404 | }], nextBtn: [{
|
---|
| 405 | type: ViewChild,
|
---|
| 406 | args: ['nextBtn']
|
---|
| 407 | }], inkbar: [{
|
---|
| 408 | type: ViewChild,
|
---|
| 409 | args: ['inkbar']
|
---|
| 410 | }], tabPanels: [{
|
---|
| 411 | type: ContentChildren,
|
---|
| 412 | args: [TabPanel]
|
---|
| 413 | }], onChange: [{
|
---|
| 414 | type: Output
|
---|
| 415 | }], onClose: [{
|
---|
| 416 | type: Output
|
---|
| 417 | }], activeIndexChange: [{
|
---|
| 418 | type: Output
|
---|
| 419 | }], activeIndex: [{
|
---|
| 420 | type: Input
|
---|
| 421 | }] } });
|
---|
| 422 | export class TabViewModule {
|
---|
| 423 | }
|
---|
| 424 | TabViewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TabViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
---|
| 425 | TabViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TabViewModule, declarations: [TabView, TabPanel], imports: [CommonModule, SharedModule, TooltipModule, RippleModule], exports: [TabView, TabPanel, SharedModule] });
|
---|
| 426 | TabViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TabViewModule, imports: [[CommonModule, SharedModule, TooltipModule, RippleModule], SharedModule] });
|
---|
| 427 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: TabViewModule, decorators: [{
|
---|
| 428 | type: NgModule,
|
---|
| 429 | args: [{
|
---|
| 430 | imports: [CommonModule, SharedModule, TooltipModule, RippleModule],
|
---|
| 431 | exports: [TabView, TabPanel, SharedModule],
|
---|
| 432 | declarations: [TabView, TabPanel]
|
---|
| 433 | }]
|
---|
| 434 | }] });
|
---|
| 435 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFidmlldy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy90YWJ2aWV3L3RhYnZpZXcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFFBQVEsRUFBQyxTQUFTLEVBQXNCLEtBQUssRUFBQyxNQUFNLEVBQUMsWUFBWSxFQUNqRSxlQUFlLEVBQTBFLHVCQUF1QixFQUFFLGlCQUFpQixFQUFFLFNBQVMsRUFBb0IsVUFBVSxFQUFFLE1BQU0sRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNuTixPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDN0MsT0FBTyxFQUFDLGFBQWEsRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzlDLE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxnQkFBZ0IsQ0FBQztBQUM1QyxPQUFPLEVBQUMsWUFBWSxFQUFDLGFBQWEsRUFBQyxNQUFNLGFBQWEsQ0FBQztBQUV2RCxPQUFPLEVBQUMsVUFBVSxFQUFDLE1BQU0sYUFBYSxDQUFDOzs7OztBQUV2QyxJQUFJLEdBQUcsR0FBVyxDQUFDLENBQUM7QUFpQnBCLE1BQU0sT0FBTyxRQUFRO0lBNENqQixZQUErQyxPQUFPLEVBQVMsYUFBK0IsRUFBUyxFQUFxQjtRQUE3RCxrQkFBYSxHQUFiLGFBQWEsQ0FBa0I7UUFBUyxP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YXRlUmVmPGFueT47XG5cbiAgICB0YWJWaWV3OiBUYWJWaWV3O1xuXG4gICAgY29uc3RydWN0b3IoQEluamVjdChmb3J3YXJkUmVmKCgpID0+IFRhYlZpZXcpKSB0YWJWaWV3LCBwdWJsaWMgdmlld0NvbnRhaW5lcjogVmlld0NvbnRhaW5lclJlZiwgcHVibGljIGNkOiBDaGFuZ2VEZXRlY3RvclJlZikge1xuICAgICAgICB0aGlzLnRhYlZpZXcgPSB0YWJWaWV3IGFzIFRhYlZpZXc7XG4gICAgfVxuXG4gICAgbmdBZnRlckNvbnRlbnRJbml0KCkge1xuICAgICAgICB0aGlzLnRlbXBsYXRlcy5mb3JFYWNoKChpdGVtKSA9PiB7XG4gICAgICAgICAgICBzd2l0Y2goaXRlbS5nZXRUeXBlKCkpIHtcbiAgICAgICAgICAgICAgICBjYXNlICdoZWFkZXInOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmhlYWRlclRlbXBsYXRlID0gaXRlbS50ZW1wbGF0ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgICAgIGNhc2UgJ2NvbnRlbnQnOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRlbnRUZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbnRlbnRUZW1wbGF0ZSA9IGl0ZW0udGVtcGxhdGU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIEBJbnB1dCgpIGdldCBzZWxlY3RlZCgpOiBib29sZWFuIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuX3NlbGVjdGVkO1xuICAgIH1cblxuICAgIHNldCBzZWxlY3RlZCh2YWw6IGJvb2xlYW4pIHtcbiAgICAgICAgdGhpcy5fc2Vs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Aoa2V5ZG93bi5lbnRlcik9XCJvcGVuKCRldmVudCx0YWIpXCIgcFJpcHBsZSBbYXR0ci50YWJpbmRleF09XCJ0YWIuZGlzYWJsZWQgPyBudWxsIDogJzAnXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmctY29udGFpbmVyICpuZ0lmPVwiIXRhYi5oZWFkZXJUZW1wbGF0ZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwicC10YWJ2aWV3LWxlZnQtaWNvblwiIFtuZ0NsYXNzXT1cInRhYi5sZWZ0SWNvblwiICpuZ0lmPVwidGFiLmxlZnRJY29uXCI+PC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVwicC10YWJ2aWV3LXRpdGxlXCI+e3t0YWIuaGVhZGVyfX08L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJwLXRhYnZpZXctcmlnaHQtaWNvblwiIFtuZ0NsYXNzXT1cInRhYi5yaWdodEljb25cIiAqbmdJZj1cInRhYi5yaWdodEljb25cIj48L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nVGVtcGxhdGVPdXRsZXQ9XCJ0YWIuaGVhZGVyVGVtcGxhdGVcIj48L25nLWNvbnRhaW5lcj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuICpuZ0lmPVwidGFiLmNsb3NhYmxlXCIgY2xhc3M9XCJwLXRhYnZpZXctY2xvc2UgcGkgcGktdGltZXNcIiAoY2xpY2spPVwiY2xvc2UoJGV2ZW50LHRhYilcIj48L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvYT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2xpPlxuICAgICAgICAgICAgICAgICAgICAgICAgPC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxsaSAjaW5rYmFyIGNsYXNzPVwicC10YWJ2aWV3LWluay1iYXJcIj48L2xpPlxuICAgICAgICAgICAgICAgICAgICA8L3VsPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxidXR0b24gKm5nSWY9XCJzY3JvbGxhYmxlICYmICFmb3J3YXJkSXNEaXNhYmxlZFwiICNuZXh0QnRuIGNsYXNzPVwicC10YWJ2aWV3LW5hdi1uZXh0IHAtdGFidmlldy1uYXYtYnRuIHAtbGlua1wiIChjbGljayk9XCJuYXZGb3J3YXJkKClcIiB0eXBlPVwiYnV0dG9uXCIgcFJpcHBsZT5cbiAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJwaSBwaS1jaGV2cm9uLXJpZ2h0XCI+PC9zcGFuPlxuICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwicC10YWJ2aWV3LXBhbmVsc1wiPlxuICAgICAgICAgICAgICAgIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICBgLFxuICAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsXG4gICBlbmNhcHN1bGF0aW9uOiBWaWV3RW5jYXBzdWxhdGlvbi5Ob25lLFxuICAgc3R5bGVVcmxzOiBbJy4vdGFidmlldy5jc3MnXSxcbiAgIGhvc3Q6IHtcbiAgICAnY2xhc3MnOiAncC1lbGVtZW50J1xufVxufSlcbmV4cG9ydCBjbGFzcyBUYWJWaWV3IGltcGxlbWV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cy5hY3RpdmVJbmRleClcbiAgICAgICAgICAgICAgICB0aGlzLnRhYnNbdGhpcy5hY3RpdmVJbmRleF0uc2VsZWN0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIHRoaXMudGFic1swXS5zZWxlY3RlZCA9IHRydWU7XG5cbiAgICAgICAgICAgIHRoaXMudGFiQ2hhbmdlZCA9IHRydWU7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmNkLm1hcmtGb3JDaGVjaygpO1xuICAgIH1cblxuICAgIG9wZW4oZXZlbnQ6IEV2ZW50LCB0YWI6IFRhYlBhbmVsKSB7XG4gICAgICAgIGlmICh0YWIuZGlzYWJsZWQpIHtcbiAgICAgICAgICAgIGlmIChldmVudCkge1xuICAgICAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIXRhYi5zZWxlY3RlZCkge1xuICAgICAgICAgICAgbGV0IHNlbGVjdGVkVGFiOiBUYWJQYW5lbCA9IHRoaXMuZmluZFNlbGVjdGVkVGFiKCk7XG4gICAgICAgICAgICBpZiAoc2VsZWN0ZWRUYWIpIHtcbiAgICAgICAgICAgICAgICBzZWxlY3RlZFRhYi5zZWxlY3RlZCA9IGZhbHNlXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMudGFiQ2hhbmdlZCA9IHRydWU7XG4gICAgICAgICAgICB0YWIuc2VsZWN0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgbGV0IHNlbGVjdGVkVGFiSW5kZXggPSB0aGlzLmZpbmRUYWJJbmRleCh0YWIpO1xuICAgICAgICAgICAgdGhpcy5wcmV2ZW50QWN0aXZlSW5kZXhQcm9wYWdhdGlvbiA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLmFjdGl2ZUluZGV4Q2hhbmdlLmVtaXQoc2VsZWN0ZWRUYWJJbmRleCk7XG4gICAgICAgICAgICB0aGlzLm9uQ2hhbmdlLmVtaXQoe29yaWdpbmFsRXZlbnQ6IGV2ZW50LCBpbmRleDogc2VsZWN0ZWRUYWJJbmRleH0pO1xuXG4gICAgICAgICAgICB0aGlzLnVwZGF0ZVNjcm9sbEJhcihzZWxlY3RlZFRhYkluZGV4KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChldmVudCkge1xuICAgICAgICAgICAgZXZlbnQucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNsb3NlKGV2ZW50OiBFdmVudCwgdGFiOiBUYWJQYW5lbCkge1xuICAgICAgICBpZiAodGhpcy5jb250cm9sQ2xvc2UpIHtcbiAgICAgICAgICAgIHRoaXMub25DbG9zZS5lbWl0KHtcbiAgICAgICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBldmVudCxcbiAgICAgICAgICAgICAgICBpbmRleDogdGhpcy5maW5kVGFiSW5kZXgodGFiKSxcbiAgICAgICAgICAgICAgICBjbG9zZTogKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNsb3NlVGFiKHRhYik7XG4gICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aGlzLmNsb3NlVGFiKHRhYik7XG4gICAgICAgICAgICB0aGlzLm9uQ2xvc2UuZW1pdCh7XG4gICAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZXZlbnQsXG4gICAgICAgICAgICAgICAgaW5kZXg6IHRoaXMuZmluZFRhYkluZGV4KHRhYilcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7XG4gICAgfVxuXG4gICAgY2xvc2VUYWIodGFiOiBUYWJQYW5lbCkge1xuICAgICAgICBpZiAodGFiLmRpc2FibGVkKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRhYi5zZWxlY3RlZCkge1xuICAgICAgICAgICAgdGhpcy50YWJDaGFuZ2VkID0gdHJ1ZTtcbiAgICAgICAgICAgIHRhYi5zZWxlY3RlZCA9IGZhbHNlO1xuICAgICAgICAgICAgZm9yKGxldCBpID0gMDsgaSA8IHRoaXMudGFicy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGxldCB0YWJQYW5lbCA9IHRoaXMudGFic1tpXTtcbiAgICAgICAgICAgICAgICBpZiAoIXRhYlBhbmVsLmNsb3NlZCYmIXRhYi5kaXNhYmxlZCkge1xuICAgICAgICAgICAgICAgICAgICB0YWJQYW5lbC5zZWxlY3RlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRhYi5jbG9zZWQgPSB0cnVlO1xuICAgIH1cblxuICAgIGZpbmRTZWxlY3RlZFRhYigpIHtcbiAgICAgICAgZm9yKGxldCBpID0gMDsgaSA8IHRoaXMudGFicy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKHRoaXMudGFic1tpXS5zZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnRhYnNbaV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgZmluZFRhYkluZGV4KHRhYjogVGFiUGFuZWwpIHtcbiAgICAgICAgbGV0IGluZGV4ID0gLTE7XG4gICAgICAgIGZvcihsZXQgaSA9IDA7IGkgPCB0aGlzLnRhYnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnRhYnNbaV0gPT0gdGFiKSB7XG4gICAgICAgICAgICAgICAgaW5kZXggPSBpO1xuICAgICAgICAgICAgICAgIGJyZWFrO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