text: !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-bootstrap/pagination",["exports","@angular/core","@angular/forms","@angular/common"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["ngx-bootstrap"]=e["ngx-bootstrap"]||{},e["ngx-bootstrap"].pagination={}),e.ng.core,e.ng.forms,e.ng.common)}(this,(function(e,t,n,i){"use strict";var a=function(){this.main={maxSize:void 0,itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",pageBtnClass:"",rotate:!0},this.pager={itemsPerPage:15,previousText:"« Previous",nextText:"Next »",pageBtnClass:"",align:!0}};a.ɵfac=function(e){return new(e||a)},a.ɵprov=t.ɵɵdefineInjectable({token:a,factory:a.ɵfac,providedIn:"root"}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(a,[{type:t.Injectable,args:[{providedIn:"root"}]}],null,null);var s=function(e,t){return{"pull-left":e,"float-left":t}},o=function(e,t){return{"pull-right":e,"float-right":t}},r={provide:n.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return p})),multi:!0},p=function(){function e(e,n,i){this.elementRef=e,this.changeDetection=i,this.numPages=new t.EventEmitter,this.pageChanged=new t.EventEmitter,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.inited=!1,this._page=1,this.elementRef=e,this.config||this.configureOptions(Object.assign({},n.main,n.pager))}return Object.defineProperty(e.prototype,"itemsPerPage",{get:function(){return this._itemsPerPage},set:function(e){this._itemsPerPage=e,this.totalPages=this.calculateTotalPages()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalItems",{get:function(){return this._totalItems},set:function(e){this._totalItems=e,this.totalPages=this.calculateTotalPages()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalPages",{get:function(){return this._totalPages},set:function(e){this._totalPages=e,this.numPages.emit(e),this.inited&&this.selectPage(this.page)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(e){var t=this._page;this._page=e>this.totalPages?this.totalPages:e||1,this.changeDetection.markForCheck(),t!==this._page&&void 0!==t&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})},enumerable:!1,configurable:!0}),e.prototype.configureOptions=function(e){this.config=Object.assign({},e)},e.prototype.ngOnInit=function(){"undefined"!=typeof window&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),this.maxSize=void 0!==this.maxSize?this.maxSize:this.config.maxSize,this.rotate=void 0!==this.rotate?this.rotate:this.config.rotate,this.boundaryLinks=void 0!==this.boundaryLinks?this.boundaryLinks:this.config.boundaryLinks,this.directionLinks=void 0!==this.directionLinks?this.directionLinks:this.config.directionLinks,this.pageBtnClass=void 0!==this.pageBtnClass?this.pageBtnClass:this.config.pageBtnClass,this.itemsPerPage=void 0!==this.itemsPerPage?this.itemsPerPage:this.config.itemsPerPage,this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0},e.prototype.writeValue=function(e){this.page=e,this.pages=this.getPages(this.page,this.totalPages)},e.prototype.getText=function(e){return this[e+"Text"]||this.config[e+"Text"]},e.prototype.noPrevious=function(){return 1===this.page},e.prototype.noNext=function(){return this.page===this.totalPages},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.selectPage=function(e,t){if(t&&t.preventDefault(),!this.disabled){if(t&&t.target)t.target.blur();this.writeValue(e),this.onChange(this.page)}},e.prototype.makePage=function(e,t,n){return{text:t,number:e,active:n}},e.prototype.getPages=function(e,t){var n=[],i=1,a=t,s=void 0!==this.maxSize&&this.maxSize<t;s&&(this.rotate?(a=(i=Math.max(e-Math.floor(this.maxSize/2),1))+this.maxSize-1)>t&&(i=(a=t)-this.maxSize+1):(i=(Math.ceil(e/this.maxSize)-1)*this.maxSize+1,a=Math.min(i+this.maxSize-1,t)));for(var o=i;o<=a;o++){var r=this.makePage(o,o.toString(),o===e);n.push(r)}if(s&&!this.rotate){if(i>1){var p=this.makePage(i-1,"...",!1);n.unshift(p)}if(a<t){var l=this.makePage(a+1,"...",!1);n.push(l)}}return n},e.prototype.calculateTotalPages=function(){var e=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(e||0,1)},e}();p.ɵfac=function(e){return new(e||p)(t.ɵɵdirectiveInject(t.ElementRef),t.ɵɵdirectiveInject(a),t.ɵɵdirectiveInject(t.ChangeDetectorRef))},p.ɵcmp=t.ɵɵdefineComponent({type:p,selectors:[["pager"]],inputs:{align:"align",maxSize:"maxSize",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",firstText:"firstText",previousText:"previousText",nextText:"nextText",lastText:"lastText",rotate:"rotate",pageBtnClass:"pageBtnClass",disabled:"disabled",itemsPerPage:"itemsPerPage",totalItems:"totalItems"},outputs:{numPages:"numPages",pageChanged:"pageChanged"},features:[t.ɵɵProvidersFeature([r])],decls:7,vars:24,consts:[[1,"pager"],[3,"ngClass"],["href","",3,"click"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"ul",0),t.ɵɵelementStart(1,"li",1),t.ɵɵelementStart(2,"a",2),t.ɵɵlistener("click",(function(e){return n.selectPage(n.page-1,e)})),t.ɵɵtext(3),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementStart(4,"li",1),t.ɵɵelementStart(5,"a",2),t.ɵɵlistener("click",(function(e){return n.selectPage(n.page+1,e)})),t.ɵɵtext(6),t.ɵɵelementEnd(),t.ɵɵelementEnd(),t.ɵɵelementEnd()),2&e&&(t.ɵɵadvance(1),t.ɵɵclassMap(n.pageBtnClass),t.ɵɵclassProp("disabled",n.noPrevious())("previous",n.align),t.ɵɵproperty("ngClass",t.ɵɵpureFunction2(18,s,n.align,n.align)),t.ɵɵadvance(2),t.ɵɵtextInterpolate(n.getText("previous")),t.ɵɵadvance(1),t.ɵɵclassMap(n.pageBtnClass),t.ɵɵclassProp("disabled",n.noNext())("next",n.align),t.ɵɵproperty("ngClass",t.ɵɵpureFunction2(21,o,n.align,n.align)),t.ɵɵadvance(2),t.ɵɵtextInterpolate(n.getText("next")))},directives:[i.NgClass],encapsulation:2}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(p,[{type:t.Component,args:[{selector:"pager",templateUrl:"./pager.component.html",providers:[r]}]}],(function(){return[{type:t.ElementRef},{type:a},{type:t.ChangeDetectorRef}]}),{align:[{type:t.Input}],maxSize:[{type:t.Input}],boundaryLinks:[{type:t.Input}],directionLinks:[{type:t.Input}],firstText:[{type:t.Input}],previousText:[{type:t.Input}],nextText:[{type:t.Input}],lastText:[{type:t.Input}],rotate:[{type:t.Input}],pageBtnClass:[{type:t.Input}],disabled:[{type:t.Input}],numPages:[{type:t.Output}],pageChanged:[{type:t.Output}],itemsPerPage:[{type:t.Input}],totalItems:[{type:t.Input}]});var l=function(e,t){return{disabled:e,currentPage:t}};function g(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"li",11),t.ɵɵelementStart(1,"a",12),t.ɵɵlistener("click",(function(e){return t.ɵɵrestoreView(i),t.ɵɵnextContext().selectPage(1,e)})),t.ɵɵelementContainer(2,13),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext(),s=t.ɵɵreference(13);t.ɵɵclassProp("disabled",a.noPrevious()||a.disabled),t.ɵɵadvance(2),t.ɵɵproperty("ngTemplateOutlet",a.customFirstTemplate||s)("ngTemplateOutletContext",t.ɵɵpureFunction2(4,l,a.noPrevious()||a.disabled,a.page))}}function u(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"li",14),t.ɵɵelementStart(1,"a",12),t.ɵɵlistener("click",(function(e){t.ɵɵrestoreView(i);var n=t.ɵɵnextContext();return n.selectPage(n.page-1,e)})),t.ɵɵelementContainer(2,13),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext(),s=t.ɵɵreference(11);t.ɵɵclassProp("disabled",a.noPrevious()||a.disabled),t.ɵɵadvance(2),t.ɵɵproperty("ngTemplateOutlet",a.customPreviousTemplate||s)("ngTemplateOutletContext",t.ɵɵpureFunction2(4,l,a.noPrevious()||a.disabled,a.page))}}var c=function(e,t,n){return{disabled:e,$implicit:t,currentPage:n}};function m(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"li",15),t.ɵɵelementStart(1,"a",12),t.ɵɵlistener("click",(function(e){t.ɵɵrestoreView(i);var a=n.$implicit;return t.ɵɵnextContext().selectPage(a.number,e)})),t.ɵɵelementContainer(2,13),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=n.$implicit,s=t.ɵɵnextContext(),o=t.ɵɵreference(7);t.ɵɵclassProp("active",a.active)("disabled",s.disabled&&!a.active),t.ɵɵadvance(2),t.ɵɵproperty("ngTemplateOutlet",s.customPageTemplate||o)("ngTemplateOutletContext",t.ɵɵpureFunction3(6,c,s.disabled,a,s.page))}}function h(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"li",16),t.ɵɵelementStart(1,"a",12),t.ɵɵlistener("click",(function(e){t.ɵɵrestoreView(i);var n=t.ɵɵnextContext();return n.selectPage(n.page+1,e)})),t.ɵɵelementContainer(2,13),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext(),s=t.ɵɵreference(9);t.ɵɵclassProp("disabled",a.noNext()||a.disabled),t.ɵɵadvance(2),t.ɵɵproperty("ngTemplateOutlet",a.customNextTemplate||s)("ngTemplateOutletContext",t.ɵɵpureFunction2(4,l,a.noNext()||a.disabled,a.page))}}function d(e,n){if(1&e){var i=t.ɵɵgetCurrentView();t.ɵɵelementStart(0,"li",17),t.ɵɵelementStart(1,"a",12),t.ɵɵlistener("click",(function(e){t.ɵɵrestoreView(i);var n=t.ɵɵnextContext();return n.selectPage(n.totalPages,e)})),t.ɵɵelementContainer(2,13),t.ɵɵelementEnd(),t.ɵɵelementEnd()}if(2&e){var a=t.ɵɵnextContext(),s=t.ɵɵreference(15);t.ɵɵclassProp("disabled",a.noNext()||a.disabled),t.ɵɵadvance(2),t.ɵɵproperty("ngTemplateOutlet",a.customLastTemplate||s)("ngTemplateOutletContext",t.ɵɵpureFunction2(4,l,a.noNext()||a.disabled,a.page))}}function f(e,n){if(1&e&&t.ɵɵtext(0),2&e){var i=n.$implicit;t.ɵɵtextInterpolate(i.text)}}function x(e,n){if(1&e&&t.ɵɵtext(0),2&e){var i=t.ɵɵnextContext();t.ɵɵtextInterpolate(i.getText("next"))}}function P(e,n){if(1&e&&t.ɵɵtext(0),2&e){var i=t.ɵɵnextContext();t.ɵɵtextInterpolate(i.getText("previous"))}}function v(e,n){if(1&e&&t.ɵɵtext(0),2&e){var i=t.ɵɵnextContext();t.ɵɵtextInterpolate(i.getText("first"))}}function y(e,n){if(1&e&&t.ɵɵtext(0),2&e){var i=t.ɵɵnextContext();t.ɵɵtextInterpolate(i.getText("last"))}}var C={provide:n.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return T})),multi:!0},T=function(){function e(e,n,i){this.elementRef=e,this.changeDetection=i,this.numPages=new t.EventEmitter,this.pageChanged=new t.EventEmitter,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.inited=!1,this._page=1,this.elementRef=e,this.config||this.configureOptions(n.main)}return Object.defineProperty(e.prototype,"itemsPerPage",{get:function(){return this._itemsPerPage},set:function(e){this._itemsPerPage=e,this.totalPages=this.calculateTotalPages()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalItems",{get:function(){return this._totalItems},set:function(e){this._totalItems=e,this.totalPages=this.calculateTotalPages()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalPages",{get:function(){return this._totalPages},set:function(e){this._totalPages=e,this.numPages.emit(e),this.inited&&this.selectPage(this.page)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(e){var t=this._page;this._page=e>this.totalPages?this.totalPages:e||1,this.changeDetection.markForCheck(),t!==this._page&&void 0!==t&&this.pageChanged.emit({page:this._page,itemsPerPage:this.itemsPerPage})},enumerable:!1,configurable:!0}),e.prototype.configureOptions=function(e){this.config=Object.assign({},e)},e.prototype.ngOnInit=function(){"undefined"!=typeof window&&(this.classMap=this.elementRef.nativeElement.getAttribute("class")||""),this.maxSize=void 0!==this.maxSize?this.maxSize:this.config.maxSize,this.rotate=void 0!==this.rotate?this.rotate:this.config.rotate,this.boundaryLinks=void 0!==this.boundaryLinks?this.boundaryLinks:this.config.boundaryLinks,this.directionLinks=void 0!==this.directionLinks?this.directionLinks:this.config.directionLinks,this.pageBtnClass=void 0!==this.pageBtnClass?this.pageBtnClass:this.config.pageBtnClass,this.itemsPerPage=void 0!==this.itemsPerPage?this.itemsPerPage:this.config.itemsPerPage,this.totalPages=this.calculateTotalPages(),this.pages=this.getPages(this.page,this.totalPages),this.inited=!0},e.prototype.writeValue=function(e){this.page=e,this.pages=this.getPages(this.page,this.totalPages)},e.prototype.getText=function(e){return this[e+"Text"]||this.config[e+"Text"]},e.prototype.noPrevious=function(){return 1===this.page},e.prototype.noNext=function(){return this.page===this.totalPages},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.selectPage=function(e,t){if(t&&t.preventDefault(),!this.disabled){if(t&&t.target)t.target.blur();this.writeValue(e),this.onChange(this.page)}},e.prototype.makePage=function(e,t,n){return{text:t,number:e,active:n}},e.prototype.getPages=function(e,t){var n=[],i=1,a=t,s=void 0!==this.maxSize&&this.maxSize<t;s&&(this.rotate?(a=(i=Math.max(e-Math.floor(this.maxSize/2),1))+this.maxSize-1)>t&&(i=(a=t)-this.maxSize+1):(i=(Math.ceil(e/this.maxSize)-1)*this.maxSize+1,a=Math.min(i+this.maxSize-1,t)));for(var o=i;o<=a;o++){var r=this.makePage(o,o.toString(),o===e);n.push(r)}if(s&&!this.rotate){if(i>1){var p=this.makePage(i-1,"...",!1);n.unshift(p)}if(a<t){var l=this.makePage(a+1,"...",!1);n.push(l)}}return n},e.prototype.calculateTotalPages=function(){var e=this.itemsPerPage<1?1:Math.ceil(this.totalItems/this.itemsPerPage);return Math.max(e||0,1)},e}();T.ɵfac=function(e){return new(e||T)(t.ɵɵdirectiveInject(t.ElementRef),t.ɵɵdirectiveInject(a),t.ɵɵdirectiveInject(t.ChangeDetectorRef))},T.ɵcmp=t.ɵɵdefineComponent({type:T,selectors:[["pagination"]],inputs:{align:"align",maxSize:"maxSize",boundaryLinks:"boundaryLinks",directionLinks:"directionLinks",firstText:"firstText",previousText:"previousText",nextText:"nextText",lastText:"lastText",rotate:"rotate",pageBtnClass:"pageBtnClass",disabled:"disabled",customPageTemplate:"customPageTemplate",customNextTemplate:"customNextTemplate",customPreviousTemplate:"customPreviousTemplate",customFirstTemplate:"customFirstTemplate",customLastTemplate:"customLastTemplate",itemsPerPage:"itemsPerPage",totalItems:"totalItems"},outputs:{numPages:"numPages",pageChanged:"pageChanged"},features:[t.ɵɵProvidersFeature([C])],decls:16,vars:6,consts:[[1,"pagination",3,"ngClass"],["class","pagination-first page-item",3,"disabled",4,"ngIf"],["class","pagination-prev page-item",3,"disabled",4,"ngIf"],["class","pagination-page page-item",3,"active","disabled",4,"ngFor","ngForOf"],["class","pagination-next page-item",3,"disabled",4,"ngIf"],["class","pagination-last page-item",3,"disabled",4,"ngIf"],["defaultPageTemplate",""],["defaultNextTemplate",""],["defaultPreviousTemplate",""],["defaultFirstTemplate",""],["defaultLastTemplate",""],[1,"pagination-first","page-item"],["href","",1,"page-link",3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"pagination-prev","page-item"],[1,"pagination-page","page-item"],[1,"pagination-next","page-item"],[1,"pagination-last","page-item"]],template:function(e,n){1&e&&(t.ɵɵelementStart(0,"ul",0),t.ɵɵtemplate(1,g,3,7,"li",1),t.ɵɵtemplate(2,u,3,7,"li",2),t.ɵɵtemplate(3,m,3,10,"li",3),t.ɵɵtemplate(4,h,3,7,"li",4),t.ɵɵtemplate(5,d,3,7,"li",5),t.ɵɵelementEnd(),t.ɵɵtemplate(6,f,1,1,"ng-template",null,6,t.ɵɵtemplateRefExtractor),t.ɵɵtemplate(8,x,1,1,"ng-template",null,7,t.ɵɵtemplateRefExtractor),t.ɵɵtemplate(10,P,1,1,"ng-template",null,8,t.ɵɵtemplateRefExtractor),t.ɵɵtemplate(12,v,1,1,"ng-template",null,9,t.ɵɵtemplateRefExtractor),t.ɵɵtemplate(14,y,1,1,"ng-template",null,10,t.ɵɵtemplateRefExtractor)),2&e&&(t.ɵɵproperty("ngClass",n.classMap),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.boundaryLinks),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.directionLinks),t.ɵɵadvance(1),t.ɵɵproperty("ngForOf",n.pages),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.directionLinks),t.ɵɵadvance(1),t.ɵɵproperty("ngIf",n.boundaryLinks))},directives:[i.NgClass,i.NgIf,i.NgForOf,i.NgTemplateOutlet],encapsulation:2}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(T,[{type:t.Component,args:[{selector:"pagination",templateUrl:"./pagination.component.html",providers:[C]}]}],(function(){return[{type:t.ElementRef},{type:a},{type:t.ChangeDetectorRef}]}),{align:[{type:t.Input}],maxSize:[{type:t.Input}],boundaryLinks:[{type:t.Input}],directionLinks:[{type:t.Input}],firstText:[{type:t.Input}],previousText:[{type:t.Input}],nextText:[{type:t.Input}],lastText:[{type:t.Input}],rotate:[{type:t.Input}],pageBtnClass:[{type:t.Input}],disabled:[{type:t.Input}],customPageTemplate:[{type:t.Input}],customNextTemplate:[{type:t.Input}],customPreviousTemplate:[{type:t.Input}],customFirstTemplate:[{type:t.Input}],customLastTemplate:[{type:t.Input}],numPages:[{type:t.Output}],pageChanged:[{type:t.Output}],itemsPerPage:[{type:t.Input}],totalItems:[{type:t.Input}]});var b=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[]}},e}();b.ɵmod=t.ɵɵdefineNgModule({type:b}),b.ɵinj=t.ɵɵdefineInjector({factory:function(e){return new(e||b)},imports:[[i.CommonModule]]}),("undefined"==typeof ngJitMode||ngJitMode)&&t.ɵɵsetNgModuleScope(b,{declarations:[p,T],imports:[i.CommonModule],exports:[p,T]}),("undefined"==typeof ngDevMode||ngDevMode)&&t.ɵsetClassMetadata(b,[{type:t.NgModule,args:[{imports:[i.CommonModule],declarations:[p,T],exports:[p,T]}]}],null,null),e.PagerComponent=p,e.PaginationComponent=T,e.PaginationConfig=a,e.PaginationModule=b,Object.defineProperty(e,"__esModule",{value:!0})}));
  //# sourceMappingURL=ngx-bootstrap-pagination.umd.min.js.map