!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/router"),require("@angular/forms"),require("rxjs/operators"),require("@angular/animations"),require("primeng/table"),require("rxjs"),require("moment"),require("moment-timezone"),require("@angular/material-moment-adapter"),require("@angular/material/core"),require("google-libphonenumber"),require("underscore"),require("primeng/panel"),require("primeng/paginator"),require("primeng/radiobutton"),require("primeng/accordion"),require("primeng/dropdown"),require("primeng/calendar"),require("primeng/keyfilter"),require("primeng/fileupload"),require("primeng/dialog"),require("primeng/growl"),require("primeng/blockui"),require("primeng/confirmdialog"),require("primeng/autocomplete"),require("primeng/multiselect"),require("primeng/sidebar"),require("primeng/overlaypanel"),require("primeng/tooltip"),require("primeng/treetable"),require("@angular/material/datepicker"),require("primeng/inplace"),require("@angular/material"),require("@angular/material/checkbox"),require("@angular/material/expansion"),require("@ng-bootstrap/ng-bootstrap"),require("primeng/api"),require("codelyzer/util/isNotNullOrUndefined"),require("@angular/common/http"),require("@auth0/angular-jwt"),require("@auth0/angular-jwt/src/jwthelper.service")):"function"==typeof define&&define.amd?define("@copart/angular-components",["exports","@angular/core","@angular/common","@angular/router","@angular/forms","rxjs/operators","@angular/animations","primeng/table","rxjs","moment","moment-timezone","@angular/material-moment-adapter","@angular/material/core","google-libphonenumber","underscore","primeng/panel","primeng/paginator","primeng/radiobutton","primeng/accordion","primeng/dropdown","primeng/calendar","primeng/keyfilter","primeng/fileupload","primeng/dialog","primeng/growl","primeng/blockui","primeng/confirmdialog","primeng/autocomplete","primeng/multiselect","primeng/sidebar","primeng/overlaypanel","primeng/tooltip","primeng/treetable","@angular/material/datepicker","primeng/inplace","@angular/material","@angular/material/checkbox","@angular/material/expansion","@ng-bootstrap/ng-bootstrap","primeng/api","codelyzer/util/isNotNullOrUndefined","@angular/common/http","@auth0/angular-jwt","@auth0/angular-jwt/src/jwthelper.service"],t):t(((e=e||self).copart=e.copart||{},e.copart["angular-components"]={}),e.ng.core,e.ng.common,e.ng.router,e.ng.forms,e.rxjs.operators,e.ng.animations,e.table,e.rxjs,e.moment,e.moment,e.ng["material-moment-adapter"],e.ng.material.core,e.googleLibphonenumber,e.underscore,e.panel,e.paginator,e.radiobutton,e.accordion,e.dropdown,e.calendar,e.keyfilter,e.fileupload,e.dialog,e.growl,e.blockui,e.confirmdialog,e.autocomplete,e.multiselect,e.sidebar,e.overlaypanel,e.tooltip,e.treetable,e.ng.material.datepicker,e.inplace,e.ng.material,e.ng.material.checkbox,e.ng.material.expansion,e.ngBootstrap,e.api,e.isNotNullOrUndefined,e.ng.common.http,e.angularJwt,e.jwthelper_service)}(this,function(e,t,n,i,r,a,o,l,s,c,p,u,d,h,f,g,m,y,b,v,C,w,x,I,D,S,k,F,O,M,T,E,j,R,V,P,N,A,L,G,B,z,_,q){"use strict";var Y=function(e,t){return(Y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function U(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function H(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)o.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o}function K(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(H(arguments[t]));return e}var $=function(){function e(){}return e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}(),J=function(){function e(){}return e.prototype.ngOnInit=function(){},e.decorators=[{type:t.Component,args:[{selector:"copart-copart-ng-components",template:"\n    <p>\n      copart-ng-components works!\n    </p>\n  "}]}],e.ctorParameters=function(){return[]},e}(),W=function(){function e(e){this.route=e}return e.prototype.ngOnInit=function(){var e=this;this.route.data.pipe(a.take(1)).subscribe(function(t){e.suggestedPage=t.path})},e.decorators=[{type:t.Component,args:[{selector:"copart-page-not-found",template:'<h2>\n   404 - Page not found\n</h2>\n<p *ngIf="suggestedPage">You might want to go to the <a [routerLink]="suggestedPage">"{{ suggestedPage }}" page</a></p>\n',styles:[""]}]}],e.ctorParameters=function(){return[{type:i.ActivatedRoute}]},e}();var Z=function(e,t,n,i,r){this.translateHeader=!1,this.field=e,this.header=t,this.sortable=n,this.sortField=i,this.translateHeader=r};var Q=function(e,t,n,i){this.value=e,this.label=t,this.facetName=n,this.columns=i};var X="Invalid Goto Page Number",ee=function(){function e(){this.config={},this.loading=!1,this.config={startRow:0,dataKey:"",isresponsive:!0},this.msgs=[],this.onChange=new t.EventEmitter,this.updateData=new t.EventEmitter,this.onSelectionChange=new t.EventEmitter,this.onRowClick=new t.EventEmitter}return Object.defineProperty(e.prototype,"page",{set:function(e){e&&(this.table.first=0,this.pageNumber=null)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.sorted=!0,this.config.filterValue&&(this.sorted=!1),void 0!==this.config.isresponsive&&null!=this.config.isresponsive||(this.config.isresponsive=!0)},e.prototype.ngAfterViewInit=function(){this.config.filterValue&&(this.searchBar.nativeElement.value=this.config.filterValue)},e.prototype.getData=function(e){e.filters.global||this.config.filterValue?this.config.multiSortMeta=null:e.multiSortMeta?this.config.multiSortMeta=e.multiSortMeta:this.config.multiSortMeta=this.defaultMetaInfo&&this.defaultMetaInfo.sortInfo,this.config.filterValue&&(e.globalFilter=this.config.filterValue),this.updateData.emit(e)},e.prototype.getValue=function(e,t){return e.customGetter?e.customGetter(t[e.field]):t[e.field]},e.prototype.gotoPage=function(){this.pageNumber&&this.pageNumber!==Math.ceil(this.table.first/this.table.rows)+1?(this.table.first=(this.pageNumber-1)*this.table.rows>this.table.totalRecords?0:(this.pageNumber-1)*this.table.rows,this.pageNumber=null,this.table.onPageChange({first:this.table.first,rows:this.table.rows})):this.showErrorMsg(X)},e.prototype.getPageLastRow=function(){var e=this.table.first+this.table.rows;return e>this.table.totalRecords?this.table.totalRecords:e},e.prototype.getPageCount=function(){return Math.ceil(this.table.totalRecords/this.table.rows)},e.prototype.showErrorMsg=function(e){this.msgs=[],this.msgs.push({severity:"error",summary:e,detail:""})},e.prototype.filter=function(e){this.config.minLengthForFilter&&e.length>0&&e.length<this.config.minLengthForFilter||(this.sorted&&!this.config.isStatic&&(this.sorted=!1,this.table.reset()),this.table._multiSortMeta=this.config.multiSortMeta,this.config.filterValue=e,this.table.filterGlobal(e,"contains"))},e.prototype.emitChange=function(e,t){"sort"===e&&(this.sorted=!0),this.onChange.emit({eventType:e,param:t})},e.prototype.onRowSelect=function(e){this.onSelectionChange.emit(e.data),this.onRowClick.emit(e.data)},e.prototype.onRowUnselect=function(e){this.onSelectionChange.emit(null),this.onRowClick.emit(e.data)},e.decorators=[{type:t.Component,args:[{selector:"copart-table",template:'<div class="searchgroup" *ngIf="!config.hideSearch">\n    <i class="material-icons search-icon">search</i>\n    \x3c!--<input  maxlength="30" type="text" pInputText size="50" placeholder={{config.searchOnList}}--\x3e\n           \x3c!--(input)="mt.filterGlobal($event.target.value, \'contains\')" #searchBar data-uname="tableSearchBar">--\x3e\n    <input  maxlength="50" type="text" pInputText size="50" placeholder={{config.searchOnList}}\n            (input)="filter($event.target.value)" #searchBar data-uname="tableSearchBar">\n</div>\n\n<hr class="dotted clr" *ngIf="!config.hideRowCount">\n<div class="datatable-results">\n    <div class="spinner">\n        <mat-progress-spinner mode="indeterminate" diameter="60" *ngIf="loading"></mat-progress-spinner>\n    </div>\n    <label class="showing-results" *ngIf="data && !config.hideRowCount" data-uname="show-records">\n      {{translateObject.showing}} {{mt.totalRecords == 0 ? 0 : mt.first+1}} {{translateObject.to}} {{getPageLastRow()}} {{translateObject.of}} {{mt.totalRecords}} {{translateObject.entries}}\n    </label>\n    <p-table #mt  [value]="data" [dataKey]="config.dataKey" [globalFilterFields]="config.globalFilters" [rows]="config.rows || 20"\n             [selectionMode]="config.selectionMode" [(selection)]="config.selectedRow" (onRowSelect)="onRowSelect($event)" (onRowUnselect)="onRowUnselect($event)"\n             [resizableColumns]="true"  (onLazyLoad)="getData($event)" [totalRecords]="totalRecords" [style]="style"\n             [rowsPerPageOptions]="[10,20,50,100]" [paginatorPosition]="config.paginatorPosition || \'both\'" [paginator]="!config.noPagination"\n             [multiSortMeta]="config.multiSortMeta"  [scrollable]="config.scrollable" [scrollHeight]="config.scrollHeight"\n             [virtualScroll]="config.virtualScroll"  [responsive]="config.isresponsive"  class="table table-striped" [sortField]="config.sortField"\n             [first]="config.startRow || 0"  [sortOrder]="config.sortOrder" [lazy]="!config.isStatic" (onSort)="emitChange(\'sort\',$event)"\n             (onFilter)="emitChange(\'filter\',$event.filters)" [sortMode]="config.sortMode || \'single\'" (onHeaderCheckboxToggle)="onRowSelect($event)" [columnResizeMode]="config.columnResizeMode">\n        <ng-template pTemplate="header">\n            <tr>\n              <th *ngIf="config.selectionMode === \'multiple\'" style="width: 3em">\n                <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n              </th>\n                <ng-container *ngFor="let col of columns">\n                    <th *ngIf="col.sortable" [pSortableColumn]="col.sortField" pResizableColumn\n                        class="copart-table-thead"  [attr.data-uname]="col.header">\n                        {{col.header}}\n                        <p-sortIcon [field]="col.sortField"></p-sortIcon>\n                    </th>\n                    <th *ngIf="!col.sortable" pResizableColumn class="copart-table-thead"> {{col.header}}\n                        <span *ngIf="col.isNotes"><i class="fa fa-sort-alpha-desc" aria-hidden="true"></i></span>\n                    </th>\n                </ng-container>\n                <th *ngIf= "config.rowexpandable">\n                    <span>&nbsp;</span>\n                </th>\n            </tr>\n        </ng-template>\n        <ng-template pTemplate="body"  let-item let-rowIndex="rowIndex" let-expanded="expanded">\n            <tr [pSelectableRow]="item">\n              <td *ngIf="config.selectionMode === \'multiple\'" style="width: 3em" class="ui-resizable-column">\n                <p-tableCheckbox [value]="item"></p-tableCheckbox>\n              </td>\n            \n                <td *ngFor="let col of columns" class="ui-resizable-column">\n                    <span class="ui-column-title">{{col.header}}</span>\n                    <span class="ui-cell-data" *ngIf="tableBodyTemplate; else defaultBody">\n                        <ng-container\n                                *ngTemplateOutlet="tableBodyTemplate; context:{$implicit:{column:col,value:getValue(col,item), item:item,\n                                rowIndex:rowIndex}}">\n                        </ng-container>\n                    </span>\n                    <ng-template #defaultBody>\n                        <span class="ui-cell-data" *ngIf="!tableBodyTemplate">\n                            {{getValue(col,item)}}\n                        </span>\n                    </ng-template>\n                </td>\n                <td *ngIf= "config.rowexpandable">\n                    <button type="button" pButton pRipple [pRowToggler]="item" class="p-button-text p-button-rounded p-button-plain" [icon]="expanded ? \'pi pi-minus-circle\' : \'pi pi-plus-circle\'"></button>\n                </td>\n            </tr>\n        </ng-template>\n        <ng-template pTemplate="rowexpansion" let-item  let-rowIndex="rowIndex" >\n            <ng-container\n                *ngTemplateOutlet="tableExpandedBodyTemplate; context:{$implicit:{item:item, rowIndex:rowIndex}}">\n            </ng-container>\n        </ng-template>\n        <ng-template pTemplate="emptymessage">\n            <tr *ngIf="!loading">\n                <td [attr.colspan]="columns && config.selectionMode === \'multiple\' ? columns.length + 1 : columns.length" >\n                  {{translateObject.noRecordsFound}}\n                </td>\n            </tr>\n        </ng-template>\n        \n    </p-table>\n</div>\n\n\n<div class="goto" *ngIf="config.showGoto">\n    <p-growl [(value)]="msgs" [life]="2000"></p-growl>\n    <label class="golabel">{{translateObject.goToPage}}</label> <input integerOnly [min]=1 [max]="getPageCount()" type="text"\n                                                     class="form-control goinput"\n                                                     name="gotopage" attr.data-uname="gotopage" [(ngModel)]="pageNumber">\n    <button class="btn btn-lblue btn-sm" type="button" (click)="gotoPage()">{{translateObject.go}}</button>\n</div>\n\n\n\n',animations:[o.trigger("rowExpansionTrigger",[o.state("void",o.style({transform:"translateX(-10%)",opacity:0})),o.state("active",o.style({transform:"translateX(0)",opacity:1})),o.transition("* <=> *",o.animate("400ms cubic-bezier(0.86, 0, 0.07, 1)"))])],styles:[":host .searchgroup{position:relative;border-bottom:0;float:right;display:inline-block;width:29.6%;margin-bottom:5px}:host .searchgroup .search-icon{position:absolute;right:20px;top:0}:host .searchgroup input{color:#1d1d1d;border-radius:4px;border:1px inset #eee;line-height:20px;width:100%;font-size:11px;background-color:#fff}:host .datatable-results{position:relative;margin-top:10px;border:1px solid #ddd}:host .datatable-results .showing-results{float:left;padding:10px 0 0 5px}:host .goto .goinput{width:90px;display:inline}@media (min-width:992px){:host .goto{margin:-40px 0 0 5px;position:absolute}}:host-context(.overlay-dialog) .goto{display:none}:host-context(.cardholders-table) .datatable-results{margin-top:0}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={translateObject:[{type:t.Input}],data:[{type:t.Input}],loading:[{type:t.Input}],totalRecords:[{type:t.Input}],columns:[{type:t.Input}],config:[{type:t.Input}],style:[{type:t.Input}],updateData:[{type:t.Output}],onChange:[{type:t.Output}],tableBodyTemplate:[{type:t.ContentChild,args:[t.TemplateRef,{static:!0}]}],tableExpandedBodyTemplate:[{type:t.ContentChild,args:["expanded",{static:!1}]}],table:[{type:t.ViewChild,args:["mt",{static:!0}]}],searchBar:[{type:t.ViewChild,args:["searchBar",{static:!1}]}],onSelectionChange:[{type:t.Output}],onRowClick:[{type:t.Output}],defaultMetaInfo:[{type:t.Input}],page:[{type:t.Input,args:["resetPage"]}]},e}();var te=function(){};var ne=function(){function e(e){this.filterService=e,this.hideFilterCountsForCodes=[],this.showtimeFilter=!1,this.regionalDistanceSupport={enableRegionalDistance:!1,regionalDistanceList:[{label:"10 km",value:10},{label:"25 km",value:25},{label:"50 km",value:50},{label:"100 km",value:100},{label:"150 km",value:150}],regionalDistanceDefault:50,codesToEnable:["LOC","LCITY","LZIP"]},this.regionalDistance=50,this.clearFilter=new t.EventEmitter,this.searchText=[],this._filters=[],this.disableCount=!1}return Object.defineProperty(e.prototype,"filters",{set:function(e){var t=this;e&&(this._filters=e,this.filtersState=this._filters.map(function(e){return t.openAllFilters||e.shouldOpen||t.filterService.getFilter(e)}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hideFilterCounts",{set:function(e){this.hideFilterCountsForCodes=e.split(",")},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.regionalDistance=this.regionalDistanceSupport&&this.regionalDistanceSupport.regionalDistanceDefault?this.regionalDistanceSupport.regionalDistanceDefault:50},e.prototype.closeOpenAll=function(){var e=this;this.openAllFilters=!this.openAllFilters,this.filtersState=this._filters.map(function(){return e.openAllFilters})},e.prototype.openSelf=function(e){this.filtersState[e]=!this.filtersState[e]},e.prototype.clearAllFilters=function(){this.searchText=[],this.filterService.clearAllFilters(),this.clearFilter.emit()},e.prototype.clearSectionFilters=function(e,t){this.filterService.clearFilter(e),t&&this.clearFilter.emit(e)},e.prototype.clearSearchTextBox=function(e){this.searchText[e]=""},e.prototype.isFilterApplied=function(e,t){var n=this.filterService.getFilter(e);return n&&null!=n.find(function(e){return e.code===t.code})},e.prototype.applyFilters=function(e,t){this.regionalDistanceSupport.enableRegionalDistance&&-1!=this.regionalDistanceSupport.codesToEnable.indexOf(e.code)&&(t.extra={regionalDistance:this.regionalDistance}),this.filterService.applyFilters(e,t)},e.prototype.applyCustomFilter=function(e){return this.applyFilters(e.filter,e.item)},e.prototype.applyCustomFilterDistance=function(e){var t=this,n=this.filterService.getFilter(e);n&&n.forEach(function(i,r){i.extra={regionalDistance:t.regionalDistance,updateDistanceOnly:!0},t.filterService.applyFilters(e,i,n.length-1===r)})},e.prototype.isAnyFilterApplied=function(e){var t=this.filterService.getFilter(e);return t&&t.length>0},e.prototype.getItemLabel=function(e,t){var n,i=e.name;return n=!(!t||!t.code)&&this.hideFilterCountsForCodes.indexOf(t.code)>-1,this.disableCount||n||(i+=" ("+e.count+")"),i},e.prototype.filterIdentity=function(e,t){return t.id},e.prototype.applyNewFilter=function(e,t,n){if(e&&""!=t){var i={code:(e.filterItems&&e.filterItems.length>0?e.filterItems[0].code.split(":")[0]:"location_zip")+":"+t,count:7,name:t};this.isFilterAppliedByVal(e,i)||(this.applyFilters(e,i),this.searchText[n]="")}},e.prototype.isFilterAppliedByVal=function(e,t){var n=this.filterService.getFilter(e);return n&&null!=n.find(function(e){return e.name===t.name})},e.decorators=[{type:t.Component,args:[{selector:"copart-filters",template:'<div class="filter-options">\n    <h3 class="nmt filter-header">\n        <span class="ftitle" data-uname="lbl-filteroptions"> {{ translateObject.filterOptions}}</span>\n        <div><a (click)="closeOpenAll();" class="closeall" data-uname="openAllFilters">\n            <i class="material-icons" *ngIf="!openAllFilters">&#xE147;</i>\n            <i class="material-icons" *ngIf="openAllFilters">&#xE15C;</i></a>\n            <a class="cursor-pointer pull-right" (click)="clearAllFilters();" data-uname="clearAllFilters">\n                <span class="clear-all">{{ translateObject.clearAll }}</span>\n            </a>\n        </div>\n    </h3>\n    <ul class="list-group filter-list">\n        <li class="filter-item" *ngFor="let filter of _filters; trackBy:filterIdentity; let filterIdx = index;">\n            \x3c!-- ToDo: replace the below div with this, we need to update the css to remove the lines below every li tag\n            <div *ngIf="filter.filterItems.length > 0">\n            ---\x3e\n            <div>\n                <h4 class="panel-title">\n                    <a (click)="openSelf(filterIdx)" [attr.data-uname]="filter.code + \'-toggle\'">\n                        <i class="material-icons md-18" *ngIf="filtersState[filterIdx]"\n                           [attr.data-uname]="filter.code + \'-open\'">&#xE15C;</i>\n                        <i class="material-icons md-18" *ngIf="!filtersState[filterIdx]"\n                           [attr.data-uname]="filter.code + \'-close\'">&#xE147;</i>\n                        {{filter.name}}\n                    </a>\n                    <a class="cursor-pointer clearlink"\n                       (click)="clearSectionFilters(filter,filter.hasCustomTemplate);clearSearchTextBox(filterIdx)"\n                       [attr.data-uname]="filter.code + \'-clear\'"><span>{{ translateObject.clear }}</span></a>\n                </h4>\n                <div class="panel-collapse"\n                     [ngClass]="filtersState[filterIdx]? \'\' : \'collapse\'">\n                    <div *ngIf="!filter.hasCustomTemplate;then default else custom"></div>\n                    <ng-template #default>\n                        <div class="form-group  search-input" [ngClass]="(regionalDistanceSupport?.enableRegionalDistance && regionalDistanceSupport?.codesToEnable?.indexOf(filter.code)!=-1)?\'d-flex\':\'\'">\n                            <input [(ngModel)]="searchText[filterIdx]" type="text" [ngClass]="(regionalDistanceSupport?.enableRegionalDistance && regionalDistanceSupport?.codesToEnable?.indexOf(filter.code)!=-1)?\'col-9 d-flex\':\'\'" class="form-control"\n                                   placeholder="{{ translateObject.search }}" [attr.data-uname]="filter.code + \'-search\'">\n                            <button  (click)="applyNewFilter(filter,searchText[filterIdx],filterIdx)" style="margin-bottom:0px" *ngIf="regionalDistanceSupport?.enableRegionalDistance && regionalDistanceSupport?.codesToEnable?.indexOf(filter.code)!=-1"  class="btn btn-primary form-control" type="button">\n                            <i class="fa fa-search"></i>\n                          </button>\n                        </div>\n                        <div class="form-group" *ngIf="regionalDistanceSupport?.enableRegionalDistance && regionalDistanceSupport?.codesToEnable?.indexOf(filter.code)!=-1">\n                          <mat-form-field appearance="fill" style="width:100%">\n                            <mat-label>{{translateObject.regionalDistance}}</mat-label>\n                            <mat-select [(ngModel)]="regionalDistance"  (selectionChange)="applyCustomFilterDistance(filter)">\n                              <mat-option [value]="distance.value" *ngFor="let distance of regionalDistanceSupport?.regionalDistanceList">{{distance.label}}</mat-option>\n                            </mat-select>\n                          </mat-form-field>\n                          \n                        </div>\n                        <ul class="list-unstyled  scroll-out">\n                            <li *ngFor="let item of filter.filterItems | filter :searchText[filterIdx]:[\'name\',\'extra\'];">\n                                <div class="checkbox" title="{{getItemLabel(item, filter) | uppercase}}">\n                                    <label>\n                                        <input type="checkbox" *ngIf="!(regionalDistanceSupport?.enableRegionalDistance && regionalDistanceSupport?.codesToEnable?.indexOf(filter.code)!=-1)"  [checked]="isFilterApplied(filter,item)"\n                                               (click)="applyFilters(filter, item)" [attr.data-uname]="filter.code + \'-\' + item.name">\n                                        <input type="checkbox" #locationRef *ngIf="(regionalDistanceSupport?.enableRegionalDistance && regionalDistanceSupport?.codesToEnable?.indexOf(filter.code)!=-1)" [checked]="isFilterApplied(filter,item) || isFilterAppliedByVal(filter,item)"\n                                               (click)="applyFilters(filter, item)" [attr.data-uname]="filter.code + \'-\' + item.name">\n                                        {{getItemLabel(item, filter)  | uppercase}}\n                                    </label>\n                                </div>\n                            </li>\n                        </ul>\n                    </ng-template>\n                  <ng-template #custom>\n                    <ng-container *ngIf="filter.rangeQueryType === \'DATE\'; else ageRange">\n                      <copart-date-range-filter *ngIf="filter.rangeQueryType === \'DATE\'" [filterData]="filter" [translateObject]="translateObject" [clearFilter]="clearFilter" [showtimeFilter]="showtimeFilter" (response)="applyCustomFilter($event)"></copart-date-range-filter>\n                    </ng-container>\n                  </ng-template>\n                  <ng-template  #ageRange>\n                    <ng-container  *ngIf="filter.rangeQueryType === \'NUMBER\' && filter.code === \'FRGD\'; else numberRange" >\n                      <copart-age-range-filter [filterData]="filter" [translateObject]="translateObject" [clearFilter]="clearFilter" (response)="applyCustomFilter($event)"></copart-age-range-filter>\n                    </ng-container>\n                  </ng-template>\n                  <ng-template #numberRange>\n                    <ng-container *ngIf="filter.rangeQueryType === \'NUMBER\'">\n                      <copart-number-range-filter [filterData]="filter" [translateObject]="translateObject" [clearFilter]="clearFilter" (response)="applyCustomFilter($event)"></copart-number-range-filter>\n                    </ng-container>\n                  </ng-template>\n                </div>\n            </div>\n        </li>\n    </ul>\n</div>\n',styles:[".filter-list .filter-item{border:0;padding:3px 0 3px 3px;border-top:1px solid #1d1d1d;background-color:inherit;list-style-type:none}.filter-list .panel-title{font-size:12px;margin-bottom:0;line-height:16px}.filter-list .search-input{margin-right:10px}.filter-list label{white-space:nowrap;width:100%;text-overflow:ellipsis;overflow:hidden;line-height:18px!important;min-height:0;margin-bottom:0}.clearlink{color:#1d5ab9!important;float:right;margin-right:5px;font-weight:400}.clear-all{color:#1d5ab9!important;text-align:right;padding-left:23px;font-size:13px}.filter-list{clear:both}.list-unstyled{max-height:135px;overflow-y:auto}.filter-options{padding-left:10px;padding-right:5px}.filter-options a{color:#1d1d1d!important;text-decoration:none!important}@media (max-width:768px){.ftitle{display:none}.filter-list .filter-item{border:1px solid #ddd;padding:10px;border-bottom:0;list-style-type:none}.filter-list .filter-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.filter-list .filter-item:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:1px solid #ddd}.filter-options{padding:0}}"]}]}],e.ctorParameters=function(){return[{type:te}]},e.propDecorators={translateObject:[{type:t.Input}],filtersState:[{type:t.Input}],openAllFilters:[{type:t.Input}],disableCount:[{type:t.Input}],filters:[{type:t.Input}],hideFilterCounts:[{type:t.Input}],clearFilter:[{type:t.Output}],customFilterTemplate:[{type:t.ContentChild,args:[t.TemplateRef,{static:!1}]}],showtimeFilter:[{type:t.Input}],regionalDistanceSupport:[{type:t.Input}]},e}();var ie=c,re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function n(){this.constructor=e}Y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.parse=function(e,t){return e&&"string"==typeof e?("en-GB"==this.locale?t=["D-M-YYYY","D/M/YYYY","D.M.YYYY","DMYYYY"]:"de-DE"==this.locale&&(t=["D.M.YYYY"]),ie(e,t,this.locale,!0)):e?ie(e).locale(this.locale):null},t}(u.MomentDateAdapter),ae=p,oe={parse:{dateInput:["M-D-YYYY","M/D/YYYY","M.D.YYYY","MDYYYY"]},display:u.MAT_MOMENT_DATE_FORMATS.display},le=function(){function e(e,n){this.filterService=e,this.adapter=n,this.response=new t.EventEmitter,this.timepicker1=new Date,this.timepicker2=new Date,this.showtimeFilter=!1,this.isEndInValid=!1,this.isStartInvalid=!1,this.invalidRange=!1,this.isApplied=!1,this.minDate=new Date(1900,0,1),this.setFilterTimeTODefault()}return e.prototype.ngOnInit=function(){var e=this;this.preferredLocale=this.translateObject.preferredLocale,this.preferredDateFormat=this.translateObject.preferredDateFormat,this.preferredTimeZone=this.translateObject.preferredTimeZone,this.adapter.setLocale(this.preferredLocale),this.clearSubscription=this.clearFilter.subscribe(function(t){e.clearCustomFilter(t)})},e.prototype.search=function(){if(this.startDate||this.endDate){var e=this.filterData.rangeQuery;e&&(e=(e=(e=e.replace("#from",this.toUtc(this.startDate,!1))).replace("#to",this.toUtc(this.endDate,!0))).replace("to","TO"));var t=this.getDate(this.startDate)+" - "+this.getDate(this.endDate);this.filterService.clearFilter(this.filterData,!1),this.response.emit({filter:this.filterData,item:{code:e,name:t}})}},e.prototype.getDate=function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n="*"),e?e.format(this.preferredDateFormat):"*"},e.prototype.toUtc=function(e,t){if(!e)return"*";var n=ae(e).format("YYYY-MM-DD"),i=ae.utc(n),r={hour:this.timepicker1&&this.timepicker1.getHours()>=0?this.timepicker1.getHours():0,minute:this.timepicker1&&this.timepicker1.getMinutes()>=0?this.timepicker1.getMinutes():0,second:0,millisecond:0};return t&&(r={hour:this.timepicker2&&this.timepicker2.getHours()>=0?this.timepicker2.getHours():23,minute:this.timepicker2&&this.timepicker2.getMinutes()>=0?this.timepicker2.getMinutes():59,second:59,millisecond:0}),i.set(r),ae.utc(ae.tz(n,this.preferredTimeZone).set(r)).toISOString(!1)},e.prototype.clearCustomFilter=function(e){(!e||this.filterData&&e.code===this.filterData.code)&&this.clearCurrentFilter()},e.prototype.clearCurrentFilter=function(){this.startDate=null,this.endDate=null,this.isEndInValid=!1,this.isStartInvalid=!1,this.invalidRange=!1,this.setFilterTimeTODefault()},e.prototype.validate=function(e,t){var n=t.targetElement;t.targetElement&&(e?this.isStartInvalid=n.value&&this.checkIfInvalid(this.startDate):this.isEndInValid=n.value&&this.checkIfInvalid(this.endDate)),this.checkRange()},e.prototype.checkIfInvalid=function(e){return null==e||ae(this.minDate).isAfter(ae(e))},e.prototype.checkRange=function(){if(this.startDate&&this.endDate){var e=ae(this.startDate);this.invalidRange=e.isAfter(ae(this.endDate)),this.invalidRange||this.timeValidate()}else this.invalidRange=!1},e.prototype.setFilterTimeTODefault=function(){this.timepicker1.setHours(0),this.timepicker1.setMinutes(0),this.timepicker1.setSeconds(0),this.timepicker2.setHours(23),this.timepicker2.setMinutes(59),this.timepicker2.setSeconds(59)},e.prototype.timeValidate=function(){var e=ae(this.timepicker1);0==ae.duration(ae.utc(this.endDate).diff(ae.utc(this.startDate))).asDays()&&(this.invalidRange=e.isAfter(ae(this.timepicker2)))},e.prototype.ngOnDestroy=function(){this.clearSubscription.unsubscribe()},e.decorators=[{type:t.Component,args:[{selector:"copart-date-range-filter",template:'<mat-form-field class="fit-width">\n    <input matInput [matDatepicker]="picker1" placeholder="{{ translateObject.startDate}}" [(ngModel)]="startDate"\n           [attr.data-uname]="filterData.code + \'-startDate\'" (change)="validate(true,$event)" allowOnly="[\\d\\.\\\\/-]"\n           maxlength="10" [min]="minDate" (dateChange)="validate(true,$event)">\n    <mat-datepicker-toggle matSuffix [for]="picker1"></mat-datepicker-toggle>\n    <mat-datepicker #picker1></mat-datepicker>\n</mat-form-field>\n\n<p-calendar *ngIf="showtimeFilter && startDate" [timeOnly]="true" [(ngModel)]="timepicker1" [showIcon]="true" icon="pi pi-clock" placeholder="From time" (onBlur)="checkRange()"></p-calendar>\n\n<label class="field-invalid" *ngIf="isStartInvalid">{{ translateObject.invalidStartDate }}</label>\n\n<mat-form-field class="fit-width">\n    <input matInput [matDatepicker]="picker2" placeholder="{{ translateObject.endDate}}" [(ngModel)]="endDate"\n           [attr.data-uname]="filterData.code + \'-endDate\'" (change)="validate(false,$event)" allowOnly="[\\d\\.\\\\/-]"\n           maxlength="10" [min]="minDate" (dateChange)="validate(false,$event)">\n    <mat-datepicker-toggle matSuffix [for]="picker2"></mat-datepicker-toggle>\n    <mat-datepicker #picker2></mat-datepicker>\n</mat-form-field>\n<p-calendar *ngIf="showtimeFilter && endDate" [timeOnly]="true" [(ngModel)]="timepicker2" [showIcon]="true" icon="pi pi-clock" placeholder="To time" (onBlur)="checkRange()"></p-calendar>\n\n\n<label class="field-invalid" *ngIf="isEndInValid">{{ translateObject.invalidEndDate}}</label>\n\n<label class="field-invalid" *ngIf="invalidRange">{{ translateObject.invalidRange}}!!</label>\n<p></p>\n\n<button class="btn btn-lblue pull-right" (click)="search()"\n        [attr.data-uname]="filterData.code+\'-search\'" [disabled]="invalidRange || isEndInValid || isStartInvalid" >{{ translateObject.search}}\n</button>\n',providers:[{provide:d.DateAdapter,useClass:re,deps:[d.MAT_DATE_LOCALE]},{provide:d.MAT_DATE_FORMATS,useValue:oe}],styles:["@media (min-width:768px){h3{margin-top:5px;margin-bottom:5px}.actions-list{background-color:#fff!important;margin-top:-6px;padding-left:10px;margin-bottom:20px}.filter-options{padding-left:10px;padding-right:5px}label{margin-bottom:0;overflow:hidden;line-height:18px!important;min-height:0}}.fit-width{width:100%}@media (max-width:768px){.actions-list{border:1px solid #ddd;padding:10px;border-radius:4px;margin:10px 0}.filter-options{padding:0}}.field-invalid{color:#f44336}"]}]}],e.ctorParameters=function(){return[{type:te},{type:d.DateAdapter}]},e.propDecorators={filterData:[{type:t.Input}],clearFilter:[{type:t.Input}],minDate:[{type:t.Input}],translateObject:[{type:t.Input}],response:[{type:t.Output}],showtimeFilter:[{type:t.Input}]},e}();var se=function(){function e(){this.loaderSubject=new s.Subject,this.loaderState=this.loaderSubject.asObservable()}return e.prototype.show=function(){this.loaderSubject.next({show:!0})},e.prototype.hide=function(){this.loaderSubject.next({show:!1})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[]},e}();var ce=function(){function e(e){this.loaderService=e,this.show=!1}return e.prototype.ngOnInit=function(){var e=this;this.subscription=this.loaderService.loaderState.subscribe(function(t){e.show=t.show})},e.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},e.decorators=[{type:t.Component,args:[{selector:"copart-loader",template:'<div class="spinner">\n  <mat-progress-spinner mode="indeterminate" diameter="60" *ngIf="show"></mat-progress-spinner>\n</div>',styles:[""]}]}],e.ctorParameters=function(){return[{type:se}]},e}();var pe=function(){this.allCountries=[["Afghanistan (‫افغانستان‬‎)","af","93"],["Albania (Shqipëri)","al","355"],["Algeria (‫الجزائر‬‎)","dz","213"],["American Samoa","as","1684"],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1264"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54"],["Armenia (Հայաստան)","am","374"],["Aruba","aw","297"],["Australia","au","61",0],["Austria (Österreich)","at","43"],["Azerbaijan (Azərbaycan)","az","994"],["Bahamas","bs","1242"],["Bahrain (‫البحرين‬‎)","bh","973"],["Bangladesh (বাংলাদেশ)","bd","880"],["Barbados","bb","1246"],["Belarus (Беларусь)","by","375"],["Belgium (België)","be","32"],["Belize","bz","501"],["Benin (Bénin)","bj","229"],["Bermuda","bm","1441"],["Bhutan (འབྲུག)","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina (Босна и Херцеговина)","ba","387"],["Botswana","bw","267"],["Brazil (Brasil)","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1284"],["Brunei","bn","673"],["Bulgaria (България)","bg","359"],["Burkina Faso","bf","226"],["Burundi (Uburundi)","bi","257"],["Cambodia (កម្ពុជា)","kh","855"],["Cameroon (Cameroun)","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde (Kabu Verdi)","cv","238"],["Caribbean Netherlands","bq","599",1],["Cayman Islands","ky","1345"],["Central African Republic (République centrafricaine)","cf","236"],["Chad (Tchad)","td","235"],["Chile","cl","56"],["China (中国)","cn","86"],["Christmas Island","cx","61",2],["Cocos (Keeling) Islands","cc","61",1],["Colombia","co","57"],["Comoros (‫جزر القمر‬‎)","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Côte d’Ivoire","ci","225"],["Croatia (Hrvatska)","hr","385"],["Cuba","cu","53"],["Curaçao","cw","599",0],["Cyprus (Κύπρος)","cy","357"],["Czech Republic (Česká republika)","cz","420"],["Denmark (Danmark)","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1767"],["Dominican Republic (República Dominicana)","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt (‫مصر‬‎)","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea (Guinea Ecuatorial)","gq","240"],["Eritrea","er","291"],["Estonia (Eesti)","ee","372"],["Ethiopia","et","251"],["Falkland Islands (Islas Malvinas)","fk","500"],["Faroe Islands (Føroyar)","fo","298"],["Fiji","fj","679"],["Finland (Suomi)","fi","358",0],["France","fr","33"],["French Guiana (Guyane française)","gf","594"],["French Polynesia (Polynésie française)","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia (საქართველო)","ge","995"],["Germany (Deutschland)","de","49"],["Ghana (Gaana)","gh","233"],["Gibraltar","gi","350"],["Greece (Ελλάδα)","gr","30"],["Greenland (Kalaallit Nunaat)","gl","299"],["Grenada","gd","1473"],["Guadeloupe","gp","590",0],["Guam","gu","1671"],["Guatemala","gt","502"],["Guernsey","gg","44",1],["Guinea (Guinée)","gn","224"],["Guinea-Bissau (Guiné Bissau)","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong (香港)","hk","852"],["Hungary (Magyarország)","hu","36"],["Iceland (Ísland)","is","354"],["India (भारत)","in","91"],["Indonesia","id","62"],["Iran (‫ایران‬‎)","ir","98"],["Iraq (‫العراق‬‎)","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2],["Israel (‫ישראל‬‎)","il","972"],["Italy (Italia)","it","39",0],["Jamaica","jm","1876"],["Japan (日本)","jp","81"],["Jersey","je","44",3],["Jordan (‫الأردن‬‎)","jo","962"],["Kazakhstan (Казахстан)","kz","7",1],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait (‫الكويت‬‎)","kw","965"],["Kyrgyzstan (Кыргызстан)","kg","996"],["Laos (ລາວ)","la","856"],["Latvia (Latvija)","lv","371"],["Lebanon (‫لبنان‬‎)","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya (‫ليبيا‬‎)","ly","218"],["Liechtenstein","li","423"],["Lithuania (Lietuva)","lt","370"],["Luxembourg","lu","352"],["Macau (澳門)","mo","853"],["Macedonia (FYROM) (Македонија)","mk","389"],["Madagascar (Madagasikara)","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania (‫موريتانيا‬‎)","mr","222"],["Mauritius (Moris)","mu","230"],["Mayotte","yt","262",1],["Mexico (México)","mx","52"],["Micronesia","fm","691"],["Moldova (Republica Moldova)","md","373"],["Monaco","mc","377"],["Mongolia (Монгол)","mn","976"],["Montenegro (Crna Gora)","me","382"],["Montserrat","ms","1664"],["Morocco (‫المغرب‬‎)","ma","212",0],["Mozambique (Moçambique)","mz","258"],["Myanmar (Burma) (မြန်မာ)","mm","95"],["Namibia (Namibië)","na","264"],["Nauru","nr","674"],["Nepal (नेपाल)","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia (Nouvelle-Calédonie)","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger (Nijar)","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea (조선 민주주의 인민 공화국)","kp","850"],["Northern Mariana Islands","mp","1670"],["Norway (Norge)","no","47",0],["Oman (‫عُمان‬‎)","om","968"],["Pakistan (‫پاکستان‬‎)","pk","92"],["Palau","pw","680"],["Palestine (‫فلسطين‬‎)","ps","970"],["Panama (Panamá)","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru (Perú)","pe","51"],["Philippines","ph","63"],["Poland (Polska)","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar (‫قطر‬‎)","qa","974"],["Réunion (La Réunion)","re","262",0],["Romania (România)","ro","40"],["Russia (Россия)","ru","7",0],["Rwanda","rw","250"],["Saint Barthélemy (Saint-Barthélemy)","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Martin (Saint-Martin (partie française))","mf","590",2],["Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)","pm","508"],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["São Tomé and Príncipe (São Tomé e Príncipe)","st","239"],["Saudi Arabia (‫المملكة العربية السعودية‬‎)","sa","966"],["Senegal (Sénégal)","sn","221"],["Serbia (Србија)","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1721"],["Slovakia (Slovensko)","sk","421"],["Slovenia (Slovenija)","si","386"],["Solomon Islands","sb","677"],["Somalia (Soomaaliya)","so","252"],["South Africa","za","27"],["South Korea (대한민국)","kr","82"],["South Sudan (‫جنوب السودان‬‎)","ss","211"],["Spain (España)","es","34"],["Sri Lanka (ශ්‍රී ලංකාව)","lk","94"],["Sudan (‫السودان‬‎)","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1],["Swaziland","sz","268"],["Sweden (Sverige)","se","46"],["Switzerland (Schweiz)","ch","41"],["Syria (‫سوريا‬‎)","sy","963"],["Taiwan (台灣)","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand (ไทย)","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia (‫تونس‬‎)","tn","216"],["Turkey (Türkiye)","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1649"],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1340"],["Uganda","ug","256"],["Ukraine (Україна)","ua","380"],["United Arab Emirates (‫الإمارات العربية المتحدة‬‎)","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan (Oʻzbekiston)","uz","998"],["Vanuatu","vu","678"],["Vatican City (Città del Vaticano)","va","39",1],["Venezuela","ve","58"],["Vietnam (Việt Nam)","vn","84"],["Wallis and Futuna","wf","681"],["Western Sahara (‫الصحراء الغربية‬‎)","eh","212",1],["Yemen (‫اليمن‬‎)","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Åland Islands","ax","358",1]]};var ue=function(){this.name="",this.iso2="",this.dialCode="",this.priority=0,this.areaCode=null,this.flagClass="",this.placeHolder=""};var de=h.PhoneNumber,he=function(){function e(){this.phoneUtil=h.PhoneNumberUtil.getInstance(),this.phoneNumberFormat=h.PhoneNumberFormat}return e.prototype.formatPhoneNumber=function(e,t){try{var n=this.getGooglePhoneNumberObj(e,t);return this.phoneUtil.format(n,this.phoneNumberFormat.INTERNATIONAL)}catch(e){console.log('CountryCode: "'+t+'" '+e)}return e.toString()},e.prototype.isValidNumber=function(e,t){try{var n=this.getGooglePhoneNumberObj(e,t);return this.phoneUtil.isValidNumber(n)}catch(e){console.log('CountryCode: "'+t+'" '+e)}return!1},e.prototype.getGooglePhoneNumberObj=function(e,t){var n=new de;return n.setCountryCode(Number(t)),n.setNationalNumber(Number(e)),n},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}();var fe=function(){function e(){}return e.prototype.buildFormGroup=function(e,t){var n,i;t=t||{};try{for(var a=U(Object.keys(e)),o=a.next();!o.done;o=a.next()){var l=o.value,s=e[l];if(s.isFormGroup){var c=s.group||{};t[l]=this.buildFormGroup(c)}else t[l]=new r.FormControl(s.value||"",this.mapValidators(s.validation))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return new r.FormGroup(t)||null},e.prototype.buildEditFormGroup=function(e,t,n){var i,a;n=n||{};try{for(var o=U(Object.keys(e)),l=o.next();!l.done;l=o.next()){var s=l.value,c=e[s];if(c.isFormGroup){var p=c.group||{};n[s]=this.buildFormGroup(p)}else n[s]=new r.FormControl(t.hasOwnProperty(c.value)?t[c.value]:"",this.mapValidators(c.validation))}}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}return new r.FormGroup(n)||null},e.prototype.mapValidators=function(e){var t,n,i=[];if(e)try{for(var a=U(Object.keys(e)),o=a.next();!o.done;o=a.next()){var l=o.value;"required"===l&&e[l]?i.push(r.Validators.required):"min"===l?i.push(r.Validators.min(e[l])):"pattern"===l&&i.push(r.Validators.pattern(e[l]))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},e.prototype.buildFormAndFieldErrors=function(e,t){t=t||[];var n={fieldErrorsMap:{},formErrors:[]},i=this.buildFieldsMapForIteration(e,"errorField");return t.forEach(function(e){var t=e.field,r=i[t];r?n.fieldErrorsMap[r]=e:n.formErrors.push(e)}),n},e.prototype.buildFieldsMapForIteration=function(e,t){var n,i,r={};e=e||{};try{for(var a=U(Object.keys(e)),o=a.next();!o.done;o=a.next()){var l=o.value,s=e[l];if(s.isFormGroup){var c=this.buildFieldsMapForIteration(s.group,t);c&&Object.assign(r,c)}else s[t]&&(r[s[t]]=l)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return r},e.prototype.findFieldControl=function(e,t){var n;if("base"===e)n=t;else if(t.contains(e))n=t.get(e);else if(e.match(/_id$/)&&t.contains(e.substring(0,e.length-3)))n=t.get(e.substring(0,e.length-3));else if(e.indexOf(".")>0){var i=t;e.split(".").forEach(function(e){i.contains(e)?(n=i.get(e))instanceof r.FormGroup&&(i=n):n=i})}else n=t;return n},e.prototype.getFormControl=function(e,t){return this.findFieldControl(e,t)},e.prototype.getFormControlValue=function(e,t){var n=this.getFormControl(e,t);return n?n.value:null},e.prototype.setFormControlValue=function(e,t,n){var i=this.getFormControl(e,t);i&&i.setValue(n)},e.prototype.hasError=function(e,t,n){return this.getFormControl(e,t).hasError(n)},e.prototype.isFormSubmittedOrTouched=function(e,t,n){var i=this.getFormControl(e,t);return n||i.dirty||i.touched},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}(),ge=function(){function e(e,n,i,r){this.countryCodeData=e,this.phoneValidationService=n,this.parentGroupControl=i,this.dynamicFormValidationService=r,this.value="",this.preferredCountries=[],this.valueChange=new t.EventEmitter,this.allCountries=[],this.preferredCountriesInDropDown=[],this.selectedCountry=new ue,this.PLUS="+",this.fetchCountryData(),this.preferredCountries=[]}return e.prototype.ngOnInit=function(){this.buildCountryDropdown(),this.buildPhoneFormGroup(),f.isNull(this.phone)||f.isEmpty(this.phone)||(this.phoneFormGroup.controls.intlDialCode.setValue(this.phone.intlDialCode?this.phone.intlDialCode:""),this.phoneFormGroup.controls.isoTwoCharCntryCode.setValue(this.phone.isoTwoCharCntryCode?this.phone.isoTwoCharCntryCode:""),this.phoneFormGroup.controls.phoneExtension.setValue(this.phone.phoneExtension?this.phone.phoneExtension:""),this.phoneFormGroup.controls.phoneNumber.setValue(this.phone.phoneNumber?this.phone.phoneNumber:""),this.selectedCountry=this.getSelectedCountry(this.phone))},e.prototype.getSelectedCountry=function(e){if(e){var t={};e.isoTwoCharCntryCode&&(t.iso2=e.isoTwoCharCntryCode?e.isoTwoCharCntryCode.toLowerCase():e.isoTwoCharCntryCode),e.intlDialCode&&(t.dialCode=e.intlDialCode.toString()),""==e.isoTwoCharCntryCode&&(t.iso2="us");var n=f.find(this.allCountries,t)||new ue;return Object.assign(new ue,n)}return new ue},e.prototype.buildCountryDropdown=function(){var e=this;0===this.preferredCountries.length&&(this.preferredCountries=["de","fr","hu","lt","pl","ru","sk"]),this.preferredCountries.forEach(function(t){var n=e.allCountries.filter(function(e){return e.iso2===t});e.preferredCountriesInDropDown.push(n[0])}),this.preferredCountriesInDropDown.length?this.selectedCountry=Object.assign(new ue,this.preferredCountriesInDropDown[0]):this.selectedCountry=Object.assign(new ue,this.allCountries[0])},e.prototype.onPhoneNumberChange=function(){this.value=this.getFormValue("isoTwoCharCntryCode")+this.getFormValue("intlDialCode")+this.getFormValue("phoneNumber"),this.valueChange.emit(this.value),this.validatePhoneNumber()},e.prototype.onCountrySelect=function(e,t){this.selectedCountry=e,this.getFormValue("phoneNumber").length>0&&(this.value=this.selectedCountry.dialCode+this.getFormValue("phoneNumber"),this.valueChange.emit(this.value)),t.focus()},e.prototype.onInputKeyPress=function(e){var t=String.fromCharCode(e.charCode);/[0-9\+\-\ ]/.test(t)||e.preventDefault()},e.prototype.getFormValue=function(e){var t=this.dynamicFormValidationService.getFormControlValue(e,this.phoneFormGroup);return t||""},e.prototype.fetchCountryData=function(){var e=this;this.countryCodeData.allCountries.forEach(function(t){var n=new ue;n.name=t[0].toString(),n.iso2=t[1].toString(),n.dialCode=t[2].toString(),n.priority=+t[3]||0,n.areaCode=+t[4]||null,n.flagClass=n.iso2.toLocaleLowerCase(),n.placeHolder=e.getPhoneNumberPlaceHolder(n.dialCode),e.allCountries.push(n)})},e.prototype.getPhoneNumberPlaceHolder=function(e){var t=this.phoneValidationService.formatPhoneNumber("2236512366",e);return(t=t.replace(/\s/g,"")).startsWith(this.PLUS)?t.split(this.PLUS+e)[1]:t},e.prototype.buildPhoneFormGroup=function(){this.phoneFormGroup=this.parentGroupControl.control},e.prototype.isPhoneNumberValid=function(){return this.phoneValidationService.isValidNumber(this.getFormValue("phoneNumber"),this.getFormValue("intlDialCode"))},e.prototype.validatePhoneNumber=function(){var e=null,t=this.phoneFormGroup.controls.phoneNumber;""!==this.phoneFormGroup.controls.phoneNumber.value&&(this.isPhoneNumberValid()||(e={invalidNumber:!0}),t.setErrors(e))},e.prototype.setPhoneNumber=function(e){this.phoneFormGroup.controls.phoneNumber.setValue(e)},e.decorators=[{type:t.Component,args:[{selector:"copart-phone-number-intl",template:'<ng-container [formGroup]="phoneFormGroup">\n  <div class="intl-tel-input allow-dropdown clearfix form-control">\n    <input type="hidden" formControlName="isoTwoCharCntryCode" [(ngModel)]="selectedCountry.iso2">\n    <input type="hidden" formControlName="intlDialCode" [(ngModel)]="selectedCountry.dialCode">\n    <div class="flag-container" ngbDropdown>\n      <div class="selected-flag dropdown-toggle" ngbDropdownToggle>\n        <div class="iti-flag" [ngClass]="selectedCountry.flagClass"></div>\n        <div class="iti-arrow"></div>\n      </div>\n      <ul class="country-list dropdown-menu" ngbDropdownMenu>\n        <li class="country" ngbDropdownItem *ngFor="let country of preferredCountriesInDropDown"\n            (click)="onCountrySelect(country, focusable)">\n          <div class="flag-box">\n            <div class="iti-flag" [ngClass]="country.flagClass"></div>\n          </div>\n          <span class="country-name">{{country.name}}</span>\n          <span class="dial-code">+{{country.dialCode}}</span>\n        </li>\n        <li class="divider" ngbDropdownItem></li>\n        <li class="country" *ngFor="let country of allCountries" (click)="onCountrySelect(country, focusable)" ngbDropdownItem>\n          <div class="flag-box">\n            <div class="iti-flag" [ngClass]="country.flagClass"></div>\n          </div>\n          <span class="country-name">{{country.name}}</span>\n          <span class="dial-code">+{{country.dialCode}}</span>\n        </li>\n      </ul>\n\n    </div>\n    <span class="country-code-position">+{{selectedCountry.dialCode}}</span>\n    <input type="text" id="phone" class="" autocomplete="off" maxlength="70"\n           (ngModelChange)="onPhoneNumberChange()"\n           formControlName="phoneNumber"\n           [placeholder]="selectedCountry.placeHolder"\n           #focusable>\n  </div>\n</ng-container>\n',providers:[pe],styles:["li.country:hover{background-color:rgba(0,0,0,.05)}.country-code-position{z-index:1;line-height:1.7}.selected-flag::after{display:none}.clearfix:after{display:block;clear:both;visibility:hidden;line-height:0;height:0}.clearfix{display:inline-block}html[xmlns] .clearfix{display:block}* html .clearfix{height:1%}.intl-tel-input{width:100%;height:28px;overflow:inherit}.intl-tel-input.allow-dropdown input{padding-left:0;padding-right:0;float:none!important;border:0!important}.intl-tel-input.allow-dropdown .flag-container,.intl-tel-input.separate-dial-code .flag-container{height:20px;position:inherit;float:left}.intl-tel-input input,.intl-tel-input input[type=tel],.intl-tel-input input[type=text]{position:absolute;margin-bottom:0!important;padding-right:0;margin-left:9px;margin-right:0;width:auto;outline:0}.intl-tel-input input:focus,.intl-tel-input input[type=tel]:focus,.intl-tel-input input[type=text]:focus{outline-offset:0!important;outline:0}.phn-input{width:70%;display:inline-block}.phn-ext{width:30%;padding-left:15px;display:inline-block}"]}]}],e.ctorParameters=function(){return[{type:pe},{type:he},{type:r.ControlContainer,decorators:[{type:t.SkipSelf}]},{type:fe}]},e.propDecorators={groupName:[{type:t.Input}],phone:[{type:t.Input}],preferredCountries:[{type:t.Input}],valueChange:[{type:t.Output}]},e}();var me=function(){function e(){}return e.prototype.onKeyDown=function(e){this.pattern||(this.pattern=new RegExp("^"+this.allowOnly+"*$")),-1!==[46,8,9,27,13,110,190].indexOf(e.keyCode)||65==e.keyCode&&!0===e.ctrlKey||67==e.keyCode&&!0===e.ctrlKey||86==e.keyCode&&!0===e.ctrlKey||88==e.keyCode&&!0===e.ctrlKey||e.keyCode>=35&&e.keyCode<=39||this.pattern.test(e.key)||e.preventDefault()},e.decorators=[{type:t.Directive,args:[{selector:"[allowOnly]"}]}],e.propDecorators={allowOnly:[{type:t.Input}],onKeyDown:[{type:t.HostListener,args:["keydown",["$event"]]}]},e}();var ye=function(){function e(){this.allowedFileExtensions=[],this.onFileChangeEmitter=new t.EventEmitter,this.fileInvalidEmitter=new t.EventEmitter,this.background="#eee"}return e.prototype.onDragOver=function(e){e.preventDefault(),e.stopPropagation(),this.background="#999"},e.prototype.onDragLeave=function(e){e.preventDefault(),e.stopPropagation(),this.background="#eee"},e.prototype.onDrop=function(e){var t,n;e.preventDefault(),e.stopPropagation(),this.background="#eee";var i=e.dataTransfer.files,r=[],a=[];if(i.length>0){try{for(var o=U(i),l=o.next();!l.done;l=o.next()){var s=l.value,c=s.name.split(".")[s.name.split(".").length-1].toLowerCase();-1!==this.allowedFileExtensions.lastIndexOf(c)?r.push(s):(a.push(s),this.fileInvalidEmitter.emit(c))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}this.onFileChangeEmitter.emit(r)}},e.decorators=[{type:t.Directive,args:[{selector:"[copartDragdrop]"}]}],e.ctorParameters=function(){return[]},e.propDecorators={allowedFileExtensions:[{type:t.Input}],onFileChangeEmitter:[{type:t.Output}],fileInvalidEmitter:[{type:t.Output}],background:[{type:t.HostBinding,args:["style.background"]}],onDragOver:[{type:t.HostListener,args:["dragover",["$event"]]}],onDragLeave:[{type:t.HostListener,args:["dragleave",["$event"]]}],onDrop:[{type:t.HostListener,args:["drop",["$event"]]}]},e}();var be=function(){function e(e){this.el=e,this.allowNegative=!0}return e.prototype.onKeyDown=function(e){-1!==[46,8,9,27,13,110,190].indexOf(e.keyCode)||65==e.keyCode&&!0===e.ctrlKey||67==e.keyCode&&!0===e.ctrlKey||88==e.keyCode&&!0===e.ctrlKey||e.keyCode>=35&&e.keyCode<=39||/^[-,+]?[0-9]*/.test(e.key)&&this.isInRange(e.key)||e.preventDefault()},e.prototype.isInRange=function(e){if(0==this.el.nativeElement.value.length&&"-"==e)return!this.min||this.min<0;var t=+(this.el.nativeElement.value+e);return(!this.min||t>=this.min)&&(!this.max||t<=this.max)},e.decorators=[{type:t.Directive,args:[{selector:"[integerOnly]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={allowNegative:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],onKeyDown:[{type:t.HostListener,args:["keydown",["$event"]]}]},e}();var ve=function(){function e(){this._printStyle=[]}return Object.defineProperty(e.prototype,"printStyle",{set:function(e){for(var t in e)e.hasOwnProperty(t)&&this._printStyle.push((t+JSON.stringify(e[t])).replace(/['"]+/g,""));this.returnStyleValues()},enumerable:!0,configurable:!0}),e.prototype.returnStyleValues=function(){return this._printStyle.join(" ").replace(",",";")},e.prototype.print=function(){var e,t;e=document.getElementById(this.printSectionId).innerHTML,(t=window.open("","_blank","top=0,left=0,height=100%,width=auto")).document.open(),t.document.write("\n      <html>\n        <head>\n          <title>"+(this.printTitle?this.printTitle:"")+"</title>\n          <style>\n            "+this.returnStyleValues()+'\n          </style>\n        </head>\n    <body onload="window.print();window.close()">'+e+"</body>\n      </html>"),t.document.close()},e.decorators=[{type:t.Directive,args:[{selector:"[copartPrint]"}]}],e.ctorParameters=function(){return[]},e.propDecorators={printSectionId:[{type:t.Input}],printTitle:[{type:t.Input}],printStyle:[{type:t.Input}],print:[{type:t.HostListener,args:["click",["$event.target"]]}]},e}();var Ce=function(){function e(e,n){this.ref=e,this.renderer=n,this.uppercaseChange=new t.EventEmitter}return e.prototype.format=function(e){var t=e.target.value||"";this.ref.nativeElement.value=t.toUpperCase()},e.decorators=[{type:t.Directive,args:[{selector:"[uppercase]",host:{"(uppercase)":"format($event)"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={uppercase:[{type:t.Input}],uppercaseChange:[{type:t.Output}]},e}();var we=function(){function e(){}return e.prototype.transform=function(e,t){return e?t?e.toLowerCase().replace(/\b\w/g,function(e){return e.toLocaleUpperCase()}):(e=e.toLowerCase()).charAt(0).toUpperCase()+e.slice(1):e},e.decorators=[{type:t.Pipe,args:[{name:"capitalizeFirst"}]}],e}(),xe=function(){function e(){}return e.prototype.transform=function(e,t){return t-e.length},e.decorators=[{type:t.Pipe,args:[{name:"countdownChars"}]}],e}(),Ie=function(){function e(){}return e.prototype.transform=function(e,t,n){return e?t?(t=t.toLowerCase().trim(),n?Array.isArray(n)&&n.length?this.filterOnField(e,n,t):"string"==typeof n&&n?this.filterOnField(e,[n],t):e:e.filter(function(e){return e.toLowerCase().includes(t)})):e:[]},e.prototype.filterOnField=function(e,t,n){var i=e.filter(function(e){return t.some(function(t){return e[t]&&e[t].toLowerCase().startsWith(n)})}),r=e.filter(function(e){return t.some(function(t){return e[t]&&!e[t].toLowerCase().startsWith(n)&&e[t].toLowerCase().includes(n)})});return i.concat(r)},e.decorators=[{type:t.Pipe,args:[{name:"filter"}]}],e}(),De=function(){function e(){}return e.prototype.transform=function(e){if(e&&null!==e&&"string"!=typeof e)return e;var t=e&&null!==e&&""!==e&&0!==e.trim().length?e:"";if(t.length>=10&&!/^0*$/.test(t)){var n=10==t.length?"":t.slice(0,1),i=10==t.length?t.slice(0,3):t.slice(1,4),r=10==t.length?t.slice(3,6):t.slice(4,7),a=10==t.length?t.slice(6):t.slice(7);return t=n+i+"  "+r+" "+a}return t.length>0&&!/^0*$/.test(t)?t=t.replace(" ","-"):""},e.decorators=[{type:t.Pipe,args:[{name:"phonenumber"}]}],e}(),Se=function(){function e(){}return e.prototype.transform=function(e){if(e&&null!==e&&"string"!=typeof e)return e;var t=e&&null!==e&&""!==e&&0!==e.trim().length?e:"";return t.length>0&&!/^0*$/.test(t)?t="("+t+")":""},e.decorators=[{type:t.Pipe,args:[{name:"phoneareacode"}]}],e}(),ke=function(){function e(){}return e.prototype.transform=function(e){if(e&&null!==e&&"string"!=typeof e)return e;var t=e&&null!==e&&""!==e&&0!==e.trim().length?e:"";return"Y"===t.trim().toUpperCase()||"YES"===t.trim().toUpperCase()?t="Yes":"N"!==t.trim().toUpperCase()&&"NO"!==t.trim().toUpperCase()||(t="No"),t},e.decorators=[{type:t.Pipe,args:[{name:"yesNo"}]}],e}(),Fe=function(){function e(){}return e.prototype.transform=function(e){if(e&&0!=e){var t=e.toString();return t.length<4?" ":4==t.length?t.slice(2,4)+"/"+t.slice(0,2):t.slice(4,6)+"/"+t.slice(6,8)+"/"+t.slice(0,4)}},e.decorators=[{type:t.Pipe,args:[{name:"ymdDate"}]}],e}(),Oe=function(){this.documentNumber=null};var Me={documentTypes:{MemberRegistration:"Member Registration",ID:"ID"}},Te=function(){function e(e){this.http=e,this.sharedVarChange=new t.EventEmitter,this.submitDocs=new t.EventEmitter,this.newDocument=[]}return e.prototype.onFileUpload=function(e){this.newDocument=[];var t=new Oe;t.name=e.target.files[0].name,t.file=e.target.files[0],t.fileType=e.target.files[0].type,t.entityType=this.entityType,t.documentType=this.docType,t.objectId=this.initialData.companyId,this.docType===Me.documentTypes.MemberRegistration&&(t.documentNumber=this.initialData.vatId),this.newDocument.push(t),this.sharedVarChange.emit()},e.prototype.removeSelectedFile=function(e){this.newDocument=[],this.sharedVarChange.emit(),e.value=""},e.prototype.onSuccess=function(){this.submitDocs.emit("SUCCESS")},e.prototype.submitDocumentPayload=function(e,t){var n=this;this.submitDocs.emit(!0);for(var i=new FormData,r=0;r<e.length;r++){i.append("file",e[r].file),delete e[r].file;var a=e[r].name.replace(/ /g,"_");i.append(a,JSON.stringify(e[r]))}this.http.post(t,i).subscribe(function(e){var t=!0;B.isNotNullOrUndefined(e)&&(e.forEach(function(e){t=t&&"SUCCESS"===Object.values(e)[0]}),t?n.onSuccess():n.submitDocs.emit("FAILURE"))},function(e){n.submitDocs.emit("FAILURE")})},e.decorators=[{type:t.Component,args:[{selector:"copart-upload-document",template:'<div class="file">\n    <label for="file-input" class="btn btn-black">Browse</label>\n    <input type = \'file\' class=\'input-btn\'  (change)="onFileUpload($event)" #inputFile (click)=\'inputFile.value = ""\' id="file-input"  accept="*/*" />\n    <div   class= \'fileDetails\' *ngIf = \'newDocument.length > 0\' >\n      <p><span class="document-name">{{newDocument[0]?.name}}  </span> <span id=\'close\'(click) =\'removeSelectedFile(inputFile)\'><i class="fas fa-times"></i></span>\n      </p>\n</div>\n</div>\n\n\n',providers:[G.MessageService],styles:[".fileDetails{border:1px solid #ddd;background-color:#eee;width:60%;margin:10px 5px}@media (max-width:1024px){.fileDetails{width:100%}}.fileDetails p{font-weight:600;margin-bottom:0}.fileDetails .document-name{padding:5px 10px;display:inline-block}.fileDetails #close{background:#a7a7a7;width:35px;float:right;text-align:center;padding:5px;font-size:16px;cursor:pointer}.file{position:relative}.file>input[type=file]{opacity:0}.file>label{line-height:30px;text-align:center;cursor:pointer;background:#fff;border:1px solid #2768ce;color:#2768ce;font-weight:600;font-size:14px;border-radius:6px;padding:1px 15px;position:absolute}.fileDetails{display:block;padding:10px;box-sizing:border-box;text-decoration:none;width:-webkit-max-content;width:-moz-max-content;width:max-content;border-style:outset;margin-top:-34px;margin-left:190px}#close{float:right;display:inline-block;padding:2px 5px;background:beige;color:red}.input-btn{width:81px;margin-left:5px;height:33px}"]}]}],e.ctorParameters=function(){return[{type:z.HttpClient}]},e.propDecorators={docType:[{type:t.Input}],entityType:[{type:t.Input}],initialData:[{type:t.Input}],sharedVarChange:[{type:t.Output}],submitDocs:[{type:t.Output}]},e}();var Ee=function(){function e(){this.showCustomizeColumns=!1,this.source=[],this.target=[],this.output=new t.EventEmitter,this.filter=new t.EventEmitter,this.sourceFilter="",this.targetFilter="",this.addColumns=[],this.removeColumns=[],this.copy={},this.searchSource=!1,this.searchTarget=!1,this.filterSource=[],this.filterTarget=[]}return e.prototype.ngOnInit=function(){this.copy.source=K(this.source),this.copy.target=K(this.target)},e.prototype.search=function(e,t){"source"==t?this.doFilterSource(e):this.doFilterTarget(e),0!==e.length?"source"==t?this.searchSource=!0:this.searchTarget=!0:(this.searchSource=!1,this.searchTarget=!1)},e.prototype.doFilterSource=function(e){var t=this;this.sourceFilter=e,e=e.toLocaleLowerCase(),this.filterSource=e?this.source.filter(function(n){return-1!==n[t.label].toLocaleLowerCase().indexOf(e)}):K(this.source)},e.prototype.doFilterTarget=function(e){var t=this;this.targetFilter=e,e=e.toLocaleLowerCase(),this.filterTarget=e?this.target.filter(function(n){return-1!==n[t.label].toLocaleLowerCase().indexOf(e)}):K(this.target)},e.prototype.changeAddColumns=function(e){this.addColumns=Array.apply(null,e).filter(function(e){return e.selected})},e.prototype.changeRemoveColumns=function(e){this.removeColumns=Array.apply(null,e).filter(function(e){return e.selected})},e.prototype.addColumn=function(){var e=this;this.addColumns.forEach(function(t){e.target.push(e.source.find(function(n){return n[e.label]==t.value}));var n=e.source.indexOf(e.source.find(function(n){return n[e.label]==t.value}));e.source.splice(n,1);var i=e.filterSource.indexOf(e.filterSource.find(function(n){return n[e.label]==t.value}));e.filterSource.splice(i,1)}),this.addColumns=[],this.doFilterTarget(this.targetFilter)},e.prototype.addAll=function(){var e=this;this.source.forEach(function(t){return e.target.push(t)}),this.source=[],this.filterSource=K(this.source)},e.prototype.removeAll=function(){var e=this;this.target.forEach(function(t){return e.source.push(t)}),this.target=[]},e.prototype.removeColumn=function(){var e=this;this.removeColumns.forEach(function(t){e.source.push(e.target.find(function(n){return n[e.label]==t.value}));var n=e.target.indexOf(e.target.find(function(n){return n[e.label]==t.value}));e.target.splice(n,1);var i=e.filterTarget.indexOf(e.filterTarget.find(function(n){return n[e.label]==t.value}));e.filterTarget.splice(i,1)}),this.removeColumns=[],this.doFilterSource(this.sourceFilter)},e.prototype.doOutput=function(e){e?this.output.emit(this.target):(this.source=K(this.copy.source),this.target=K(this.copy.target),this.output.emit(!1))},e.decorators=[{type:t.Component,args:[{selector:"copart-custom-picklist",template:'<div class="row custom-picklist">\n  <div class="col-sm-5 col-xs-5">\n\n    <div class="content-box">\n      <div class="custom-picklist-header">{{translateObject.source}}</div>\n      <form class="search-box">\n        <input type="text" placeholder="{{translateObject.search}}" name="search" class="form-control" [(ngModel)]="sourceFilter" (ngModelChange)="search(sourceFilter, \'source\')">\n        <button type="submit" class="search-button"(click)="search(sourceFilter, \'source\')"><i class="fa fa-search"></i></button>\n      </form>\n      <select multiple="" size="12" (change)="changeAddColumns($event.target.options)"  class="col-sm-12 col-xs-12 custom-picklist-select">\n\n        <option *ngFor="let column of (searchSource ? filterSource : source)" [value]="column[label]">\n          {{column[label]}}\n        </option>\n      </select>\n    </div>\n  </div>\n  <div class="col-sm-2 col-xs-2 custom-picklist-actions">\n    <a><div class="picklist-action-btn" (click)="addColumn()"><a  class="action-btn" >\n      <span>{{translateObject.add}} <i class="fa fa-angle-right"></i></span>\n    </a></div></a>\n    <a><div  class="picklist-action-btn" (click)="addAll()"><a class="action-btn" >\n      <span>{{translateObject.addAll}}<i class="fa fa-angle-right"></i></span>\n    </a></div></a>\n    <a><div  class="picklist-action-btn" (click)="removeColumn()"><a class="action-btn" >\n      <span><i class="fa fa-angle-left"></i> {{translateObject.remove}}</span>\n    </a></div></a>\n    <a><div  class="picklist-action-btn"(click)="removeAll()"><a  class="action-btn" >\n      <span><i class="fa fa-angle-left"></i>{{translateObject.removeAll}}</span>\n    </a></div></a>\n  </div>\n\n\n  <div class="col-sm-5 col-xs-5">\n\n    <div class="content-box">\n      <div class="custom-picklist-header">{{translateObject.target}}</div>\n      <form class="search-box">\n        <input type="text" placeholder="{{translateObject.search}}" name="search" class="form-control" [(ngModel)]="targetFilter" (ngModelChange)="search(targetFilter, \'target\')">\n        <button type="submit" class="search-button"(click)="search(targetFilter, \'target\')"><i class="fa fa-search"></i></button>\n      </form>\n      <select #preferredSelect size="12" multiple=""  (change)="changeRemoveColumns($event.target.options)"  class="col-sm-12 col-xs-12 custom-picklist-select">\n        <option *ngFor="let column of (searchTarget ? filterTarget : target)" [value]="column[label]">\n          {{column[label]}}\n        </option>\n      </select>\n    </div>\n  </div>\n</div>\n<div class="btn-actions">\n  <button class="btn btn-dgray" (click)="doOutput(false)">{{translateObject.reset}}</button>\n  <button class="btn btn-lblue" (click)="doOutput(true)" >{{translateObject.save }}</button>\n</div>\n',styles:[".custom-picklist{background-color:#fff!important}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={showCustomizeColumns:[{type:t.Input}],label:[{type:t.Input}],translateObject:[{type:t.Input}],source:[{type:t.Input}],target:[{type:t.Input}],output:[{type:t.Output}],filter:[{type:t.Output}],select:[{type:t.ViewChildren,args:["preferredSelect"]}]},e}();var je=function(){function e(e){this.filterService=e,this.response=new t.EventEmitter,this.isEndInValid=!1,this.isStartInvalid=!1,this.invalidRange=!1,this.minValue=0}return e.prototype.ngOnInit=function(){var e=this;this.clearSubscription=this.clearFilter.subscribe(function(t){e.clearCustomFilter(t)})},e.prototype.search=function(){if(this.startValue||this.endValue){var e=this.filterData.rangeQuery;e&&(e=(e=(e=e.replace("#from",this.startValue?String(this.startValue):"*")).replace("#to",this.endValue?String(this.endValue):"*")).replace("to","TO"));var t=this.getValue(this.startValue)+" - "+this.getValue(this.endValue);this.filterService.clearFilter(this.filterData,!1),this.response.emit({filter:this.filterData,item:{code:e,name:t}})}},e.prototype.getValue=function(e){return e?e.toString():"*"},e.prototype.clearCustomFilter=function(e){(!e||this.filterData&&e.code===this.filterData.code)&&this.clearCurrentFilter()},e.prototype.validate=function(e){e?this.isStartInvalid=this.checkIfInvalid(this.startValue):this.isEndInValid=this.checkIfInvalid(this.endValue),this.checkRange()},e.prototype.checkIfInvalid=function(e){return null!=e&&e<this.minValue},e.prototype.checkRange=function(){this.startValue&&this.endValue?this.invalidRange=this.endValue<this.startValue:this.invalidRange=!1},e.prototype.clearCurrentFilter=function(){this.startValue=null,this.endValue=null,this.isEndInValid=!1,this.isStartInvalid=!1,this.invalidRange=!1},e.prototype.ngOnDestroy=function(){this.clearSubscription.unsubscribe()},e.decorators=[{type:t.Component,args:[{selector:"copart-number-range-filter",template:'<mat-form-field class="fit-width">\n  <input matInput type="number" placeholder="{{translateObject.startValue}}" [(ngModel)]="startValue"\n         [attr.data-uname]="filterData.code + \'-startValue\'" (change)="validate(true)"\n         maxlength="10" min="1">\n</mat-form-field>\n<label class="field-invalid" *ngIf="isStartInvalid">{{ translateObject.invalidStartValue}}</label>\n\n<mat-form-field class="fit-width">\n  <input matInput type="number" placeholder="{{ translateObject.endValue }}" [(ngModel)]="endValue"\n         [attr.data-uname]="filterData.code + \'-endValue\'" (change)="validate(false)"\n         maxlength="10" min="1">\n</mat-form-field>\n\n<label class="field-invalid" *ngIf="isEndInValid">{{ translateObject.invalidEndValue}}</label>\n\n<label class="field-invalid" *ngIf="invalidRange">{{ translateObject.invalidRange}}!!</label>\n\n<button class="btn btn-lblue pull-right" (click)="search()"\n        [attr.data-uname]="filterData.code+\'-search\'" [disabled]="invalidRange || isEndInValid || isStartInvalid" >{{ translateObject.search}}\n</button>\n',styles:["@media (min-width:768px){h3{margin-top:5px;margin-bottom:5px}.actions-list{background-color:#fff!important;margin-top:-6px;padding-left:10px;margin-bottom:20px}.filter-options{padding-left:10px;padding-right:5px}label{margin-bottom:0;overflow:hidden;line-height:18px!important;min-height:0}}.fit-width{width:100%}@media (max-width:768px){.actions-list{border:1px solid #ddd;padding:10px;border-radius:4px;margin:10px 0}.filter-options{padding:0}}.field-invalid{color:#f44336}"]}]}],e.ctorParameters=function(){return[{type:te}]},e.propDecorators={filterData:[{type:t.Input}],clearFilter:[{type:t.Input}],minValue:[{type:t.Input}],translateObject:[{type:t.Input}],response:[{type:t.Output}]},e}();var Re=p,Ve=function(){function e(e){this.filterService=e,this.response=new t.EventEmitter,this.isEndInValid=!1,this.isStartInvalid=!1,this.invalidRange=!1,this.minValue=0}return e.prototype.ngOnInit=function(){var e=this;this.preferredTimeZone=this.translateObject.preferredTimeZone,this.clearSubscription=this.clearFilter.subscribe(function(t){e.clearCustomFilter(t)})},e.prototype.search=function(){if(this.startValue||this.endValue){var e=this.filterData.rangeQuery;e&&(e=(e=(e=e.replace("#to",this.toUtc(this.startValue,!0))).replace("#from",this.toUtc(this.endValue,!1))).replace("to","TO"));var t=this.getValue(this.startValue)+" - "+this.getValue(this.endValue);this.filterService.clearFilter(this.filterData,!1),this.response.emit({filter:this.filterData,item:{code:e,name:t}})}},e.prototype.toUtc=function(e,t){if(!e)return"*";var n=Re().subtract(e,"years").format("YYYY-MM-DD"),i={hour:0,minute:0,second:0,millisecond:0};return t&&(i={hour:23,minute:59,second:59,millisecond:0}),Re.utc(Re.tz(n,this.preferredTimeZone).set(i)).toISOString(!1)},e.prototype.getValue=function(e){return e?e.toString():"*"},e.prototype.clearCustomFilter=function(e){(!e||this.filterData&&e.code===this.filterData.code)&&this.clearCurrentFilter()},e.prototype.validate=function(e){e?this.isStartInvalid=this.checkIfInvalid(this.startValue):this.isEndInValid=this.checkIfInvalid(this.endValue),this.checkRange()},e.prototype.checkIfInvalid=function(e){return null!=e&&e<this.minValue},e.prototype.checkRange=function(){this.startValue&&this.endValue?this.invalidRange=this.endValue<this.startValue:this.invalidRange=!1},e.prototype.clearCurrentFilter=function(){this.startValue=null,this.endValue=null,this.isEndInValid=!1,this.isStartInvalid=!1,this.invalidRange=!1},e.prototype.ngOnDestroy=function(){this.clearSubscription.unsubscribe()},e.decorators=[{type:t.Component,args:[{selector:"copart-age-range-filter",template:'<mat-form-field class="fit-width">\n  <input matInput type="number" placeholder="{{translateObject.startValue}}" [(ngModel)]="startValue"\n         [attr.data-uname]="filterData.code + \'-startValue\'" (change)="validate(true)"\n         maxlength="10" min="0">\n</mat-form-field>\n<label class="field-invalid" *ngIf="isStartInvalid">{{ translateObject.invalidStartValue}}</label>\n\n<mat-form-field class="fit-width">\n  <input matInput type="number" placeholder="{{ translateObject.endValue }}" [(ngModel)]="endValue"\n         [attr.data-uname]="filterData.code + \'-endValue\'" (change)="validate(false)"\n         maxlength="10" min="0">\n</mat-form-field>\n\n<label class="field-invalid" *ngIf="isEndInValid">{{ translateObject.invalidEndValue}}</label>\n\n<label class="field-invalid" *ngIf="invalidRange">{{ translateObject.invalidRange}}!!</label>\n\n<button class="btn btn-lblue pull-right" (click)="search()"\n        [attr.data-uname]="filterData.code+\'-search\'" [disabled]="invalidRange || isEndInValid || isStartInvalid" >{{ translateObject.search}}\n</button>\n',styles:["@media (min-width:768px){h3{margin-top:5px;margin-bottom:5px}.actions-list{background-color:#fff!important;margin-top:-6px;padding-left:10px;margin-bottom:20px}.filter-options{padding-left:10px;padding-right:5px}label{margin-bottom:0;overflow:hidden;line-height:18px!important;min-height:0}}.fit-width{width:100%}@media (max-width:768px){.actions-list{border:1px solid #ddd;padding:10px;border-radius:4px;margin:10px 0}.filter-options{padding:0}}.field-invalid{color:#f44336}"]}]}],e.ctorParameters=function(){return[{type:te}]},e.propDecorators={filterData:[{type:t.Input}],clearFilter:[{type:t.Input}],minValue:[{type:t.Input}],translateObject:[{type:t.Input}],response:[{type:t.Output}]},e}();var Pe=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[J,W,ee,ne,le,ce,ge,me,ye,be,ve,Ce,we,xe,Ie,De,Se,ke,Fe,Te,Ee,je,Ve],imports:[n.CommonModule,i.RouterModule,r.FormsModule,r.ReactiveFormsModule,l.TableModule,g.PanelModule,m.PaginatorModule,y.RadioButtonModule,n.CommonModule,b.AccordionModule,I.DialogModule,R.MatDatepickerModule,P.MatNativeDateModule,P.MatFormFieldModule,P.MatInputModule,v.DropdownModule,C.CalendarModule,w.KeyFilterModule,x.FileUploadModule,b.AccordionModule,I.DialogModule,P.MatTabsModule,P.MatIconModule,P.MatCardModule,P.MatInputModule,P.MatSelectModule,P.MatChipsModule,P.MatIconModule,P.MatProgressSpinnerModule,N.MatCheckboxModule,D.GrowlModule,u.MatMomentDateModule,S.BlockUIModule,k.ConfirmDialogModule,u.MatMomentDateModule,r.ReactiveFormsModule,F.AutoCompleteModule,V.InplaceModule,E.TooltipModule,P.MatProgressBarModule,j.TreeTableModule,O.MultiSelectModule,M.SidebarModule,A.MatExpansionModule,T.OverlayPanelModule,L.NgbModule],exports:[J,W,ee,ne,le,ce,ge,me,ye,be,ve,Ce,we,xe,Ie,De,Se,ke,Fe,Te,Ee]}]}],e}(),Ne=function(){function e(){}return e.prototype.resolve=function(e,t){var n=t.url.replace("/",""),i=this.getThreshold(n),r=Object.values({1:"about",2:"home",3:"contact"}).filter(function(e){return Math.abs(e.length-n.length)<i});return r.length?(this.sortByDistances(n,r),"/"+r[0]):null},e.prototype.getThreshold=function(e){return e.length<5?3:5},e.prototype.sortByDistances=function(e,t){var n=this,i={};t.sort(function(t,r){return t in i||(i[t]=n.levenshteinDistance(t,e)),r in i||(i[r]=n.levenshteinDistance(r,e)),i[t]-i[r]})},e.prototype.levenshteinDistance=function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;for(var n=[],i=0;i<=t.length;i++)n[i]=[i];for(var r=0;r<=e.length;r++)n[0][r]=r;for(i=1;i<=t.length;i++)for(r=1;r<=e.length;r++)t.charAt(i-1)===e.charAt(r-1)?n[i][r]=n[i-1][r-1]:n[i][r]=Math.min(n[i-1][r-1]+1,n[i][r-1]+1,n[i-1][r]+1);return n[t.length][e.length]},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}();var Ae={Off:0,Error:1,Warning:2,Info:3,Debug:4};Ae[Ae.Off]="Off",Ae[Ae.Error]="Error",Ae[Ae.Warning]="Warning",Ae[Ae.Info]="Info",Ae[Ae.Debug]="Debug";var Le=function(){function e(e){this.source=e}return e.enableProductionMode=function(){e.level=Ae.Warning},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log(console.log,Ae.Debug,e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log(console.info,Ae.Info,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log(console.warn,Ae.Warning,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log(console.error,Ae.Error,e)},e.prototype.log=function(t,n,i){var r=this;if(n<=e.level){var a=this.source?["["+this.source+"]"].concat(i):i;t.apply(console,a),e.outputs.forEach(function(e){return e.apply(e,K([r.source,n],i))})}},e.level=Ae.Debug,e.outputs=[],e}();var Ge=function(){};var Be="credentials",ze=function(){function e(e){this.jwtHelper=e,this._credentials=null;var t=sessionStorage.getItem(Be)||localStorage.getItem(Be);t&&(this._credentials=JSON.parse(t))}return e.prototype.isAuthenticated=function(){try{return this._credentials&&!this.jwtHelper.isTokenExpired(this._credentials.token)}catch(e){return!1}},e.prototype.isRefreshNotExpired=function(){try{return this._credentials&&!this.jwtHelper.isTokenExpired(this._credentials.refreshtoken)}catch(e){return!1}},Object.defineProperty(e.prototype,"credentials",{get:function(){return this._credentials},enumerable:!0,configurable:!0}),e.prototype.setCredentials=function(e,t){(this._credentials=e||null,e)?(t?localStorage:sessionStorage).setItem(Be,JSON.stringify(e)):(sessionStorage.removeItem(Be),localStorage.removeItem(Be))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:_.JwtHelperService}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(q.JwtHelperService))},token:e,providedIn:"root"}),e}();var _e=function(){function e(e,t,n){this.credentialsService=e,this.http=t,this.router=n,this.GRANT_TYPE_REFRESH="refresh_token",this.GRANT_TYPE="password",this.GET_TOKEN="/oauth/token",this.HEADER="gls-web:gls-secret",this.tokenSubject=new s.BehaviorSubject(null),this.token=this.tokenSubject.asObservable()}return e.prototype.login=function(e){return this.loadAccessToken(!0,e.username,e.password)},e.prototype.logout=function(){return this.credentialsService.setCredentials(),this.stopRefreshTokenTimer(),this.tokenSubject.next(null),s.of(!0)},e.prototype.fetchNewAccessToken=function(e){var t=this;return new s.Observable(function(n){t.loadAccessToken(!1).subscribe(function(i){var r={username:e,token:i.access_token,refreshtoken:i.refresh_token,expiry:i.expires_in?i.expires_in:JSON.parse(atob(i.access_token.split(".")[1])).exp};t.credentialsService.setCredentials(r,!0),n.next(!0)},function(e){t.logout().subscribe(function(){return t.router.navigate(["/login"],{replaceUrl:!0})}),n.next(!1)})})},e.prototype.loadAccessToken=function(e,t,n){var i=this,r=new FormData,o=new FormData;e?(r.append("grant_type",this.GRANT_TYPE),r.append("password",n),r.append("username",t)):(o.append("grant_type",this.GRANT_TYPE_REFRESH),o.append("refresh_token",this.credentialsService.credentials.refreshtoken));var l=new z.HttpHeaders({Authorization:"Basic "+btoa(this.HEADER)});return this.http.post(this.GET_TOKEN,e?r:o,{headers:l}).pipe(a.map(function(e){var n={username:t,token:e.access_token,refreshtoken:e.refresh_token,expiry:e.expires_in?e.expires_in:JSON.parse(atob(e.access_token.split(".")[1])).exp};return i.credentialsService.setCredentials(n,!0),i.tokenSubject.next(e),e}))},e.prototype.startRefreshTokenTimer=function(e){var t=this,n=new Date(1e3*e).getTime()-Date.now()-3e5;this.refreshTokenTimeout=setTimeout(function(){return t.loadAccessToken(!1).subscribe()},n)},e.prototype.stopRefreshTokenTimer=function(){clearTimeout(this.refreshTokenTimeout)},e.prototype.setHeader=function(e){this.HEADER=e},e.prototype.setGrantType=function(e){this.GRANT_TYPE=e},e.prototype.setGetTokenUrl=function(e){this.GET_TOKEN=e},e.prototype.setGrantTypeRefresh=function(e){this.GRANT_TYPE_REFRESH=e},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:ze},{type:z.HttpClient},{type:i.Router}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(ze),t.ɵɵinject(z.HttpClient),t.ɵɵinject(i.Router))},token:e,providedIn:"root"}),e}();var qe=new Le("AuthenticationGuard"),Ye=function(){function e(e,t,n){this.router=e,this.credentialsService=t,this.authenticationService=n}return e.prototype.canActivateChild=function(e,t){var n=this;return this.credentialsService.isAuthenticated()?(this.authenticationService.redirectUrl=t.url,!0):this.credentialsService.isRefreshNotExpired()?new s.Observable(function(e){n.authenticationService.fetchNewAccessToken(n.credentialsService.credentials.username).subscribe(function(t){e.next(!0),e.complete()})}):(qe.debug("Not authenticated, redirecting and adding redirect url..."),this.authenticationService.logout().subscribe(function(){return n.router.navigate(["/login"],{queryParams:{returnUrl:t.url}})}),!1)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:i.Router},{type:ze},{type:_e}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(i.Router),t.ɵɵinject(ze),t.ɵɵinject(_e))},token:e,providedIn:"root"}),e}();e.Action=Q,e.AllowOnly=me,e.AuthenticationGuard=Ye,e.AuthenticationService=_e,e.CapitalizeFirstPipe=we,e.CopartNgComponentsComponent=J,e.CopartNgComponentsModule=Pe,e.CopartNgComponentsService=$,e.CountdownCharsPipe=xe,e.CredentialsService=ze,e.CustomPicklistComponent=Ee,e.DateRangeFilterComponent=le,e.DragdropDirective=ye,e.DynamicFormValidationService=fe,e.FileInfo=Oe,e.FilterPipe=Ie,e.FilterService=te,e.FiltersComponent=ne,e.IntegerOnly=be,e.LoaderComponent=ce,e.LoaderService=se,e.LogLevel=Ae,e.Logger=Le,e.MY_FORMATS=oe,e.MomentDateStrictAdapter=re,e.PageNotFoundComponent=W,e.PageNotFoundService=Ne,e.PhoneAreaCodePipe=Se,e.PhoneNumberIntlComponent=ge,e.PhoneValidationIntlService=he,e.PhonenumberPipe=De,e.PrintDirective=ve,e.SearchResultColumn=Z,e.TableComponent=ee,e.TokenBody=Ge,e.UploadDocumentComponent=Te,e.UpperCaseText=Ce,e.YesNoPipe=ke,e.YmdDatePipe=Fe,e.constants=Me,e.ɵa=pe,e.ɵb=je,e.ɵc=Ve,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=copart-angular-components.umd.min.js.map