UNPKG

primevue

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue) [![Discord Chat](https://img.shields.io/discord/55794023

1 lines 99.8 kB
import{ZIndexUtils as e,DomHandler as t,ConnectedOverlayScrollHandler as o,ObjectUtils as l,UniqueComponentId as i}from"primevue/utils";import{FilterOperator as n,FilterService as r,FilterMatchMode as s}from"primevue/api";import a from"primevue/paginator";import{openBlock as d,createBlock as c,withKeys as u,withModifiers as p,createVNode as h,resolveComponent as m,resolveDynamicComponent as f,createCommentVNode as g,Teleport as w,Transition as y,withCtx as b,Fragment as x,renderList as C,toDisplayString as R,resolveDirective as v,withDirectives as k,createTextVNode as S,renderSlot as M,createSlots as E}from"vue";import $ from"primevue/overlayeventbus";import D from"primevue/dropdown";import P from"primevue/button";import z from"primevue/ripple";var F={name:"HeaderCheckbox",inheritAttrs:!1,emits:["change"],props:{checked:null},data:()=>({focused:!1}),methods:{onClick(e){this.$attrs.disabled||(this.focused=!0,this.$emit("change",e))},onFocus(){this.focused=!0},onBlur(){this.focused=!1}}};F.render=function(e,t,o,l,i,n){return d(),c("div",{class:"p-checkbox p-component",onClick:t[3]||(t[3]=(...e)=>n.onClick&&n.onClick(...e)),onKeydown:t[4]||(t[4]=u(p(((...e)=>n.onClick&&n.onClick(...e)),["prevent"]),["space"]))},[h("div",{ref:"box",class:["p-checkbox-box p-component",{"p-highlight":o.checked,"p-disabled":e.$attrs.disabled,"p-focus":i.focused}],role:"checkbox","aria-checked":o.checked,tabindex:e.$attrs.disabled?null:"0",onFocus:t[1]||(t[1]=e=>n.onFocus(e)),onBlur:t[2]||(t[2]=e=>n.onBlur(e))},[h("span",{class:["p-checkbox-icon",{"pi pi-check":o.checked}]},null,2)],42,["aria-checked","tabindex"])],32)};var I={name:"ColumnFilter",emits:["filter-change","filter-apply","operator-change","matchmode-change","constraint-add","constraint-remove","filter-clear","apply-click"],props:{field:{type:String,default:null},type:{type:String,default:"text"},display:{type:String,default:null},showMenu:{type:Boolean,default:!0},matchMode:{type:String,default:null},showOperator:{type:Boolean,default:!0},showClearButton:{type:Boolean,default:!0},showApplyButton:{type:Boolean,default:!0},showMatchModes:{type:Boolean,default:!0},showAddButton:{type:Boolean,default:!0},matchModeOptions:{type:Array,default:null},maxConstraints:{type:Number,default:2},filterElement:null,filterHeaderTemplate:null,filterFooterTemplate:null,filterClearTemplate:null,filterApplyTemplate:null,filters:{type:Object,default:null},filtersStore:{type:Object,default:null},filterMenuClass:{type:String,default:null},filterMenuStyle:{type:null,default:null}},data:()=>({overlayVisible:!1,defaultMatchMode:null,defaultOperator:null}),overlay:null,selfClick:!1,overlayEventListener:null,beforeUnmount(){this.overlayEventListener&&($.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null),this.overlay&&(e.clear(this.overlay),this.onOverlayHide())},mounted(){if(this.filters&&this.filters[this.field]){let e=this.filters[this.field];e.operator?(this.defaultMatchMode=e.constraints[0].matchMode,this.defaultOperator=e.operator):this.defaultMatchMode=this.filters[this.field].matchMode}},methods:{clearFilter(){let e={...this.filters};e[this.field].operator?(e[this.field].constraints.splice(1),e[this.field].operator=this.defaultOperator,e[this.field].constraints[0]={value:null,matchMode:this.defaultMatchMode}):(e[this.field].value=null,e[this.field].matchMode=this.defaultMatchMode),this.$emit("filter-clear"),this.$emit("filter-change",e),this.$emit("filter-apply"),this.hide()},applyFilter(){this.$emit("apply-click",{field:this.field,constraints:this.filters[this.field]}),this.$emit("filter-apply"),this.hide()},hasFilter(){if(this.filtersStore){let e=this.filtersStore[this.field];if(e)return e.operator?!this.isFilterBlank(e.constraints[0].value):!this.isFilterBlank(e.value)}return!1},hasRowFilter(){return this.filters[this.field]&&!this.isFilterBlank(this.filters[this.field].value)},isFilterBlank:e=>null==e||("string"==typeof e&&0==e.trim().length||e instanceof Array&&0==e.length),toggleMenu(){this.overlayVisible=!this.overlayVisible},onToggleButtonKeyDown(e){switch(e.key){case"Escape":case"Tab":this.overlayVisible=!1;break;case"ArrowDown":if(this.overlayVisible){let o=t.getFocusableElements(this.overlay);o&&o[0].focus(),e.preventDefault()}else e.altKey&&(this.overlayVisible=!0,e.preventDefault())}},onEscape(){this.overlayVisible=!1,this.$refs.icon&&this.$refs.icon.focus()},onRowMatchModeChange(e){let t={...this.filters};t[this.field].matchMode=e,this.$emit("matchmode-change",{field:this.field,matchMode:e}),this.$emit("filter-change",t),this.$emit("filter-apply"),this.hide()},onRowMatchModeKeyDown(e){let t=e.target;switch(e.key){case"ArrowDown":var o=this.findNextItem(t);o&&(t.removeAttribute("tabindex"),o.tabIndex="0",o.focus()),e.preventDefault();break;case"ArrowUp":var l=this.findPrevItem(t);l&&(t.removeAttribute("tabindex"),l.tabIndex="0",l.focus()),e.preventDefault()}},isRowMatchModeSelected(e){return this.filters[this.field].matchMode===e},onOperatorChange(e){let t={...this.filters};t[this.field].operator=e,this.$emit("filter-change",t),this.$emit("operator-change",{field:this.field,operator:e}),this.showApplyButton||this.$emit("filter-apply")},onMenuMatchModeChange(e,t){({...this.filters})[this.field].constraints[t].matchMode=e,this.$emit("matchmode-change",{field:this.field,matchMode:e,index:t}),this.showApplyButton||this.$emit("filter-apply")},addConstraint(){let e={...this.filters},t={value:null,matchMode:this.defaultMatchMode};e[this.field].constraints.push(t),this.$emit("constraint-add",{field:this.field,constraing:t}),this.$emit("filter-change",e),this.showApplyButton||this.$emit("filter-apply")},removeConstraint(e){let t={...this.filters},o=t[this.field].constraints.splice(e,1);this.$emit("constraint-remove",{field:this.field,constraing:o}),this.$emit("filter-change",t),this.showApplyButton||this.$emit("filter-apply")},filterCallback(){this.$emit("filter-apply")},findNextItem(e){let o=e.nextElementSibling;return o?t.hasClass(o,"p-column-filter-separator")?this.findNextItem(o):o:e.parentElement.firstElementChild},findPrevItem(e){let o=e.previousElementSibling;if(!o)return e.parentElement.lastElementChild;t.hasClass(o,"p-column-filter-separator")&&this.findPrevItem(o)},hide(){this.overlayVisible=!1},onContentClick(){this.selfClick=!0},onOverlayEnter(o){this.filterMenuStyle&&t.applyStyle(this.overlay,this.filterMenuStyle),e.set("overlay",o,this.$primevue.config.zIndex.overlay),t.absolutePosition(this.overlay,this.$refs.icon),this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.overlayEventListener=e=>{this.overlay.contains(e.target)&&(this.selfClick=!0)},$.on("overlay-click",this.overlayEventListener)},onOverlayLeave(){this.onOverlayHide()},onOverlayAfterLeave(t){e.clear(t)},onOverlayHide(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindScrollListener(),this.overlay=null,$.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null},overlayRef(e){this.overlay=e},isTargetClicked(e){return this.$refs.icon&&(this.$refs.icon===e.target||this.$refs.icon.contains(e.target))},bindOutsideClickListener(){this.outsideClickListener||(this.outsideClickListener=e=>{!this.overlayVisible||this.selfClick||this.isTargetClicked(e)||(this.overlayVisible=!1),this.selfClick=!1},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null,this.selfClick=!1)},bindScrollListener(){this.scrollHandler||(this.scrollHandler=new o(this.$refs.icon,(()=>{this.overlayVisible&&this.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener(){this.resizeListener||(this.resizeListener=()=>{this.overlayVisible&&this.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}},computed:{containerClass(){return["p-column-filter p-fluid",{"p-column-filter-row":"row"===this.display,"p-column-filter-menu":"menu"===this.display}]},overlayClass(){return[this.filterMenuClass,{"p-column-filter-overlay p-component p-fluid":!0,"p-column-filter-overlay-menu":"menu"===this.display,"p-input-filled":"filled"===this.$primevue.config.inputStyle,"p-ripple-disabled":!1===this.$primevue.config.ripple}]},showMenuButton(){return this.showMenu&&("row"!==this.display||"boolean"!==this.type)},matchModes(){return this.matchModeOptions||this.$primevue.config.filterMatchModeOptions[this.type].map((e=>({label:this.$primevue.config.locale[e],value:e})))},isShowMatchModes(){return"boolean"!==this.type&&this.showMatchModes&&this.matchModes},operatorOptions(){return[{label:this.$primevue.config.locale.matchAll,value:n.AND},{label:this.$primevue.config.locale.matchAny,value:n.OR}]},noFilterLabel(){return this.$primevue.config.locale.noFilter},isShowOperator(){return this.showOperator&&this.filters[this.field].operator},operator(){return this.filters[this.field].operator},fieldConstraints(){return this.filters[this.field].constraints||[this.filters[this.field]]},showRemoveIcon(){return this.fieldConstraints.length>1},removeRuleButtonLabel(){return this.$primevue.config.locale.removeRule},addRuleButtonLabel(){return this.$primevue.config.locale.addRule},isShowAddConstraint(){return this.showAddButton&&this.filters[this.field].operator&&this.fieldConstraints&&this.fieldConstraints.length<this.maxConstraints},clearButtonLabel(){return this.$primevue.config.locale.clear},applyButtonLabel(){return this.$primevue.config.locale.apply}},components:{CFDropdown:D,CFButton:P}};const O={key:0,class:"p-fluid p-column-filter-element"},L=h("span",{class:"pi pi-filter-icon pi-filter"},null,-1),B=h("span",{class:"pi pi-filter-slash"},null,-1),T={key:0,class:"p-column-filter-row-items"},K=h("li",{class:"p-column-filter-separator"},null,-1),_={key:0,class:"p-column-filter-operator"},G={class:"p-column-filter-constraints"},A={key:1,class:"p-column-filter-add-rule"},H={class:"p-column-filter-buttonbar"};I.render=function(e,t,o,l,i,n){const r=m("CFDropdown"),s=m("CFButton");return d(),c("div",{class:n.containerClass},["row"===o.display?(d(),c("div",O,[(d(),c(f(o.filterElement),{field:o.field,filterModel:o.filters[o.field],filterCallback:n.filterCallback},null,8,["field","filterModel","filterCallback"]))])):g("",!0),n.showMenuButton?(d(),c("button",{key:1,ref:"icon",type:"button",class:["p-column-filter-menu-button p-link",{"p-column-filter-menu-button-open":i.overlayVisible,"p-column-filter-menu-button-active":n.hasFilter()}],"aria-haspopup":"true","aria-expanded":i.overlayVisible,onClick:t[1]||(t[1]=e=>n.toggleMenu()),onKeydown:t[2]||(t[2]=e=>n.onToggleButtonKeyDown(e))},[L],42,["aria-expanded"])):g("",!0),n.showMenuButton&&"row"===o.display?(d(),c("button",{key:2,class:[{"p-hidden-space":!n.hasRowFilter()},"p-column-filter-clear-button p-link"],type:"button",onClick:t[3]||(t[3]=e=>n.clearFilter())},[B],2)):g("",!0),(d(),c(w,{to:"body"},[h(y,{name:"p-connected-overlay",onEnter:n.onOverlayEnter,onLeave:n.onOverlayLeave,onAfterLeave:n.onOverlayAfterLeave},{default:b((()=>[i.overlayVisible?(d(),c("div",{key:0,ref:n.overlayRef,class:n.overlayClass,onKeydown:t[12]||(t[12]=u(((...e)=>n.onEscape&&n.onEscape(...e)),["escape"])),onClick:t[13]||(t[13]=(...e)=>n.onContentClick&&n.onContentClick(...e))},[(d(),c(f(o.filterHeaderTemplate),{field:o.field,filterModel:o.filters[o.field],filterCallback:n.filterCallback},null,8,["field","filterModel","filterCallback"])),"row"===o.display?(d(),c("ul",T,[(d(!0),c(x,null,C(n.matchModes,((e,o)=>(d(),c("li",{class:["p-column-filter-row-item",{"p-highlight":n.isRowMatchModeSelected(e.value)}],key:e.label,onClick:t=>n.onRowMatchModeChange(e.value),onKeydown:[t[4]||(t[4]=e=>n.onRowMatchModeKeyDown(e)),u(p((t=>n.onRowMatchModeChange(e.value)),["prevent"]),["enter"])],tabindex:0===o?"0":null},R(e.label),43,["onClick","onKeydown","tabindex"])))),128)),K,h("li",{class:"p-column-filter-row-item",onClick:t[5]||(t[5]=e=>n.clearFilter()),onKeydown:[t[6]||(t[6]=e=>n.onRowMatchModeKeyDown(e)),t[7]||(t[7]=u((t=>e.onRowClearItemClick()),["enter"]))]},R(n.noFilterLabel),33)])):(d(),c(x,{key:1},[n.isShowOperator?(d(),c("div",_,[h(r,{options:n.operatorOptions,modelValue:n.operator,"onUpdate:modelValue":t[8]||(t[8]=e=>n.onOperatorChange(e)),class:"p-column-filter-operator-dropdown",optionLabel:"label",optionValue:"value"},null,8,["options","modelValue"])])):g("",!0),h("div",G,[(d(!0),c(x,null,C(n.fieldConstraints,((e,t)=>(d(),c("div",{key:t,class:"p-column-filter-constraint"},[n.isShowMatchModes?(d(),c(r,{key:0,options:n.matchModes,modelValue:e.matchMode,optionLabel:"label",optionValue:"value","onUpdate:modelValue":e=>n.onMenuMatchModeChange(e,t),class:"p-column-filter-matchmode-dropdown"},null,8,["options","modelValue","onUpdate:modelValue"])):g("",!0),"menu"===o.display?(d(),c(f(o.filterElement),{key:1,field:o.field,filterModel:e,filterCallback:n.filterCallback},null,8,["field","filterModel","filterCallback"])):g("",!0),h("div",null,[n.showRemoveIcon?(d(),c(s,{key:0,type:"button",icon:"pi pi-trash",class:"p-column-filter-remove-button p-button-text p-button-danger p-button-sm",onClick:e=>n.removeConstraint(t),label:n.removeRuleButtonLabel},null,8,["onClick","label"])):g("",!0)])])))),128))]),n.isShowAddConstraint?(d(),c("div",A,[h(s,{type:"button",label:n.addRuleButtonLabel,icon:"pi pi-plus",class:"p-column-filter-add-button p-button-text p-button-sm",onClick:t[9]||(t[9]=e=>n.addConstraint())},null,8,["label"])])):g("",!0),h("div",H,[o.filterClearTemplate?(d(),c(f(o.filterClearTemplate),{key:1,field:o.field,filterModel:o.filters[o.field],filterCallback:n.clearFilter},null,8,["field","filterModel","filterCallback"])):(d(),c(s,{key:0,type:"button",class:"p-button-outlined p-button-sm",onClick:t[10]||(t[10]=e=>n.clearFilter()),label:n.clearButtonLabel},null,8,["label"])),o.showApplyButton?(d(),c(x,{key:2},[o.filterApplyTemplate?(d(),c(f(o.filterApplyTemplate),{key:1,field:o.field,filterModel:o.filters[o.field],filterCallback:n.applyFilter},null,8,["field","filterModel","filterCallback"])):(d(),c(s,{key:0,type:"button",class:"p-button-sm",onClick:t[11]||(t[11]=e=>n.applyFilter()),label:n.applyButtonLabel},null,8,["label"]))],64)):g("",!0)])],64)),(d(),c(f(o.filterFooterTemplate),{field:o.field,filterModel:o.filters[o.field],filterCallback:n.filterCallback},null,8,["field","filterModel","filterCallback"]))],34)):g("",!0)])),_:1},8,["onEnter","onLeave","onAfterLeave"])]))],2)};var W={name:"HeaderCell",emits:["column-click","column-mousedown","column-dragstart","column-dragover","column-dragleave","column-drop","column-resizestart","checkbox-change","filter-change","filter-apply","operator-change","matchmode-change","constraint-add","constraint-remove","filter-clear","apply-click"],props:{column:{type:Object,default:null},resizableColumns:{type:Boolean,default:!1},sortMode:{type:String,default:"single"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},multiSortMeta:{type:Array,default:null},allRowsSelected:{type:Boolean,default:!1},empty:{type:Boolean,default:!1},filterDisplay:{type:String,default:null},filters:{type:Object,default:null},filtersStore:{type:Object,default:null},filterColumn:{type:Boolean,default:!1}},data:()=>({styleObject:{}}),mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{columnProp(e){return this.column.props?this.column.type.props[e].type===Boolean&&""===this.column.props[e]||this.column.props[e]:null},onClick(e){this.$emit("column-click",{originalEvent:e,column:this.column})},onKeyDown(e){13===e.which&&"TH"===e.currentTarget.nodeName&&t.hasClass(e.currentTarget,"p-sortable-column")&&this.$emit("column-click",{originalEvent:e,column:this.column})},onMouseDown(e){this.$emit("column-mousedown",{originalEvent:e,column:this.column})},onDragStart(e){this.$emit("column-dragstart",e)},onDragOver(e){this.$emit("column-dragover",e)},onDragLeave(e){this.$emit("column-dragleave",e)},onDrop(e){this.$emit("column-drop",e)},onResizeStart(e){this.$emit("column-resizestart",e)},getMultiSortMetaIndex(){let e=-1;for(let t=0;t<this.multiSortMeta.length;t++){let o=this.multiSortMeta[t];if(o.field===this.columnProp("field")||o.field===this.columnProp("sortField")){e=t;break}}return e},isMultiSorted(){return this.columnProp("sortable")&&this.getMultiSortMetaIndex()>-1},isColumnSorted(){return"single"===this.sortMode?this.sortField&&(this.sortField===this.columnProp("field")||this.sortField===this.columnProp("sortField")):this.isMultiSorted()},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let e=0,o=this.$el.nextElementSibling;o&&(e=t.getOuterWidth(o)+parseFloat(o.style.right)),this.styleObject.right=e+"px"}else{let e=0,o=this.$el.previousElementSibling;o&&(e=t.getOuterWidth(o)+parseFloat(o.style.left)),this.styleObject.left=e+"px"}let e=this.$el.parentElement.nextElementSibling;if(e){let o=t.index(this.$el);e.children[o].style.left=this.styleObject.left,e.children[o].style.right=this.styleObject.right}}},onHeaderCheckboxChange(e){this.$emit("checkbox-change",e)}},computed:{containerClass(){return[this.filterColumn?this.columnProp("filterHeaderClass"):this.columnProp("headerClass"),this.columnProp("class"),{"p-sortable-column":this.columnProp("sortable"),"p-resizable-column":this.resizableColumns,"p-highlight":this.isColumnSorted(),"p-filter-column":this.filterColumn,"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.filterColumn?this.columnProp("filterHeaderStyle"):this.columnProp("headerStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]},sortableColumnIcon(){let e=!1,t=null;if("single"===this.sortMode)e=this.sortField&&(this.sortField===this.columnProp("field")||this.sortField===this.columnProp("sortField")),t=e?this.sortOrder:0;else if("multiple"===this.sortMode){let o=this.getMultiSortMetaIndex();o>-1&&(e=!0,t=this.multiSortMeta[o].order)}return["p-sortable-column-icon pi pi-fw",{"pi-sort-alt":!e,"pi-sort-amount-up-alt":e&&t>0,"pi-sort-amount-down":e&&t<0}]},ariaSort(){if(this.columnProp("sortable")){const e=this.sortableColumnIcon;return e[1]["pi-sort-amount-down"]?"descending":e[1]["pi-sort-amount-up-alt"]?"ascending":"none"}return null}},components:{DTHeaderCheckbox:F,DTColumnFilter:I}};const j={class:"p-column-header-content"},V={key:1,class:"p-column-title"},N={key:3,class:"p-sortable-column-badge"};W.render=function(e,t,o,l,i,n){const r=m("DTHeaderCheckbox"),s=m("DTColumnFilter");return d(),c("th",{style:n.containerStyle,class:n.containerClass,tabindex:n.columnProp("sortable")?"0":null,role:"cell",onClick:t[9]||(t[9]=(...e)=>n.onClick&&n.onClick(...e)),onKeydown:t[10]||(t[10]=(...e)=>n.onKeyDown&&n.onKeyDown(...e)),onMousedown:t[11]||(t[11]=(...e)=>n.onMouseDown&&n.onMouseDown(...e)),onDragstart:t[12]||(t[12]=(...e)=>n.onDragStart&&n.onDragStart(...e)),onDragover:t[13]||(t[13]=(...e)=>n.onDragOver&&n.onDragOver(...e)),onDragleave:t[14]||(t[14]=(...e)=>n.onDragLeave&&n.onDragLeave(...e)),onDrop:t[15]||(t[15]=(...e)=>n.onDrop&&n.onDrop(...e)),colspan:n.columnProp("colspan"),rowspan:n.columnProp("rowspan"),"aria-sort":n.ariaSort},[o.resizableColumns&&!n.columnProp("frozen")?(d(),c("span",{key:0,class:"p-column-resizer",onMousedown:t[1]||(t[1]=(...e)=>n.onResizeStart&&n.onResizeStart(...e))},null,32)):g("",!0),h("div",j,[o.column.children&&o.column.children.header?(d(),c(f(o.column.children.header),{key:0,column:o.column},null,8,["column"])):g("",!0),n.columnProp("header")?(d(),c("span",V,R(n.columnProp("header")),1)):g("",!0),n.columnProp("sortable")?(d(),c("span",{key:2,class:n.sortableColumnIcon},null,2)):g("",!0),n.isMultiSorted()?(d(),c("span",N,R(n.getMultiSortMetaIndex()+1),1)):g("",!0),"multiple"===n.columnProp("selectionMode")&&"row"!==o.filterDisplay?(d(),c(r,{key:4,checked:o.allRowsSelected,onChange:n.onHeaderCheckboxChange,disabled:o.empty},null,8,["checked","onChange","disabled"])):g("",!0),"menu"===o.filterDisplay&&o.column.children&&o.column.children.filter?(d(),c(s,{key:5,field:n.columnProp("filterField")||n.columnProp("field"),type:n.columnProp("dataType"),display:"menu",showMenu:n.columnProp("showFilterMenu"),filterElement:o.column.children&&o.column.children.filter,filterHeaderTemplate:o.column.children&&o.column.children.filterheader,filterFooterTemplate:o.column.children&&o.column.children.filterfooter,filterClearTemplate:o.column.children&&o.column.children.filterclear,filterApplyTemplate:o.column.children&&o.column.children.filterapply,filters:o.filters,filtersStore:o.filtersStore,onFilterChange:t[2]||(t[2]=t=>e.$emit("filter-change",t)),onFilterApply:t[3]||(t[3]=t=>e.$emit("filter-apply")),filterMenuStyle:n.columnProp("filterMenuStyle"),filterMenuClass:n.columnProp("filterMenuClass"),showOperator:n.columnProp("showFilterOperator"),showClearButton:n.columnProp("showClearButton"),showApplyButton:n.columnProp("showApplyButton"),showMatchModes:n.columnProp("showFilterMatchModes"),showAddButton:n.columnProp("showAddButton"),matchModeOptions:n.columnProp("filterMatchModeOptions"),maxConstraints:n.columnProp("maxConstraints"),onOperatorChange:t[4]||(t[4]=t=>e.$emit("operator-change",t)),onMatchmodeChange:t[5]||(t[5]=t=>e.$emit("matchmode-change",t)),onConstraintAdd:t[6]||(t[6]=t=>e.$emit("constraint-add",t)),onConstraintRemove:t[7]||(t[7]=t=>e.$emit("constraint-remove",t)),onApplyClick:t[8]||(t[8]=t=>e.$emit("apply-click",t))},null,8,["field","type","showMenu","filterElement","filterHeaderTemplate","filterFooterTemplate","filterClearTemplate","filterApplyTemplate","filters","filtersStore","filterMenuStyle","filterMenuClass","showOperator","showClearButton","showApplyButton","showMatchModes","showAddButton","matchModeOptions","maxConstraints"])):g("",!0)])],46,["tabindex","colspan","rowspan","aria-sort"])};var U={name:"TableHeader",emits:["column-click","column-mousedown","column-dragstart","column-dragover","column-dragleave","column-drop","column-resizestart","checkbox-change","filter-change","filter-apply","operator-change","matchmode-change","constraint-add","constraint-remove","filter-clear","apply-click"],props:{columnGroup:{type:null,default:null},columns:{type:null,default:null},rowGroupMode:{type:String,default:null},groupRowsBy:{type:[Array,String],default:null},resizableColumns:{type:Boolean,default:!1},allRowsSelected:{type:Boolean,default:!1},empty:{type:Boolean,default:!1},sortMode:{type:String,default:"single"},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},multiSortMeta:{type:Array,default:null},filterDisplay:{type:String,default:null},filters:{type:Object,default:null},filtersStore:{type:Object,default:null}},methods:{columnProp:(e,t)=>e.props?e.type.props[t].type===Boolean&&""===e.props[t]||e.props[t]:null,getFilterColumnHeaderClass(e){return["p-filter-column",this.columnProp(e,"filterHeaderClass"),this.columnProp(e,"class"),{"p-frozen-column":this.columnProp(e,"frozen")}]},getFilterColumnHeaderStyle(e){return[this.columnProp(e,"filterHeaderStyle"),this.columnProp(e,"style")]}},components:{DTHeaderCell:W,DTHeaderCheckbox:F,DTColumnFilter:I}};const q={class:"p-datatable-thead",role:"rowgroup"},X={role:"row"},J={key:0,role:"row"};U.render=function(e,t,o,l,i,n){const r=m("DTHeaderCell"),s=m("DTHeaderCheckbox"),a=m("DTColumnFilter");return d(),c("thead",q,[o.columnGroup?(d(!0),c(x,{key:1},C(o.columnGroup.children.default(),((l,i)=>(d(),c("tr",{key:i,role:"row"},[(d(!0),c(x,null,C(l.children.default(),((l,i)=>(d(),c(x,{key:n.columnProp(l,"columnKey")||n.columnProp(l,"field")||i},[n.columnProp(l,"hidden")||"subheader"===o.rowGroupMode&&o.groupRowsBy===n.columnProp(l,"field")?g("",!0):(d(),c(r,{key:0,column:l,onColumnClick:t[24]||(t[24]=t=>e.$emit("column-click",t)),onColumnMousedown:t[25]||(t[25]=t=>e.$emit("column-mousedown",t)),sortMode:o.sortMode,sortField:o.sortField,sortOrder:o.sortOrder,multiSortMeta:o.multiSortMeta,allRowsSelected:o.allRowsSelected,empty:o.empty,onCheckboxChange:t[26]||(t[26]=t=>e.$emit("checkbox-change",t)),filters:o.filters,filterDisplay:o.filterDisplay,filtersStore:o.filtersStore,onFilterChange:t[27]||(t[27]=t=>e.$emit("filter-change",t)),onFilterApply:t[28]||(t[28]=t=>e.$emit("filter-apply")),onOperatorChange:t[29]||(t[29]=t=>e.$emit("operator-change",t)),onMatchmodeChange:t[30]||(t[30]=t=>e.$emit("matchmode-change",t)),onConstraintAdd:t[31]||(t[31]=t=>e.$emit("constraint-add",t)),onConstraintRemove:t[32]||(t[32]=t=>e.$emit("constraint-remove",t)),onApplyClick:t[33]||(t[33]=t=>e.$emit("apply-click",t))},null,8,["column","sortMode","sortField","sortOrder","multiSortMeta","allRowsSelected","empty","filters","filterDisplay","filtersStore"]))],64)))),128))])))),128)):(d(),c(x,{key:0},[h("tr",X,[(d(!0),c(x,null,C(o.columns,((l,i)=>(d(),c(x,{key:n.columnProp(l,"columnKey")||n.columnProp(l,"field")||i},[n.columnProp(l,"hidden")||"subheader"===o.rowGroupMode&&o.groupRowsBy===n.columnProp(l,"field")?g("",!0):(d(),c(r,{key:0,column:l,onColumnClick:t[1]||(t[1]=t=>e.$emit("column-click",t)),onColumnMousedown:t[2]||(t[2]=t=>e.$emit("column-mousedown",t)),onColumnDragstart:t[3]||(t[3]=t=>e.$emit("column-dragstart",t)),onColumnDragover:t[4]||(t[4]=t=>e.$emit("column-dragover",t)),onColumnDragleave:t[5]||(t[5]=t=>e.$emit("column-dragleave",t)),onColumnDrop:t[6]||(t[6]=t=>e.$emit("column-drop",t)),resizableColumns:o.resizableColumns,onColumnResizestart:t[7]||(t[7]=t=>e.$emit("column-resizestart",t)),sortMode:o.sortMode,sortField:o.sortField,sortOrder:o.sortOrder,multiSortMeta:o.multiSortMeta,allRowsSelected:o.allRowsSelected,empty:o.empty,onCheckboxChange:t[8]||(t[8]=t=>e.$emit("checkbox-change",t)),filters:o.filters,filterDisplay:o.filterDisplay,filtersStore:o.filtersStore,onFilterChange:t[9]||(t[9]=t=>e.$emit("filter-change",t)),onFilterApply:t[10]||(t[10]=t=>e.$emit("filter-apply")),onOperatorChange:t[11]||(t[11]=t=>e.$emit("operator-change",t)),onMatchmodeChange:t[12]||(t[12]=t=>e.$emit("matchmode-change",t)),onConstraintAdd:t[13]||(t[13]=t=>e.$emit("constraint-add",t)),onConstraintRemove:t[14]||(t[14]=t=>e.$emit("constraint-remove",t)),onApplyClick:t[15]||(t[15]=t=>e.$emit("apply-click",t))},null,8,["column","resizableColumns","sortMode","sortField","sortOrder","multiSortMeta","allRowsSelected","empty","filters","filterDisplay","filtersStore"]))],64)))),128))]),"row"===o.filterDisplay?(d(),c("tr",J,[(d(!0),c(x,null,C(o.columns,((l,i)=>(d(),c(x,{key:n.columnProp(l,"columnKey")||n.columnProp(l,"field")||i},[n.columnProp(l,"hidden")?g("",!0):(d(),c("th",{key:0,style:n.getFilterColumnHeaderStyle(l),class:n.getFilterColumnHeaderClass(l)},["multiple"===n.columnProp(l,"selectionMode")?(d(),c(s,{key:0,checked:o.allRowsSelected,onChange:t[16]||(t[16]=t=>e.$emit("checkbox-change",t)),disabled:o.empty},null,8,["checked","disabled"])):g("",!0),l.children&&l.children.filter?(d(),c(a,{key:1,field:n.columnProp(l,"filterField")||n.columnProp(l,"field"),type:n.columnProp(l,"dataType"),display:"row",showMenu:n.columnProp(l,"showFilterMenu"),filterElement:l.children&&l.children.filter,filterHeaderTemplate:l.children&&l.children.filterheader,filterFooterTemplate:l.children&&l.children.filterfooter,filterClearTemplate:l.children&&l.children.filterclear,filterApplyTemplate:l.children&&l.children.filterapply,filters:o.filters,filtersStore:o.filtersStore,onFilterChange:t[17]||(t[17]=t=>e.$emit("filter-change",t)),onFilterApply:t[18]||(t[18]=t=>e.$emit("filter-apply")),filterMenuStyle:n.columnProp(l,"filterMenuStyle"),filterMenuClass:n.columnProp(l,"filterMenuClass"),showOperator:n.columnProp(l,"showFilterOperator"),showClearButton:n.columnProp(l,"showClearButton"),showApplyButton:n.columnProp(l,"showApplyButton"),showMatchModes:n.columnProp(l,"showFilterMatchModes"),showAddButton:n.columnProp(l,"showAddButton"),matchModeOptions:n.columnProp(l,"filterMatchModeOptions"),maxConstraints:n.columnProp(l,"maxConstraints"),onOperatorChange:t[19]||(t[19]=t=>e.$emit("operator-change",t)),onMatchmodeChange:t[20]||(t[20]=t=>e.$emit("matchmode-change",t)),onConstraintAdd:t[21]||(t[21]=t=>e.$emit("constraint-add",t)),onConstraintRemove:t[22]||(t[22]=t=>e.$emit("constraint-remove",t)),onApplyClick:t[23]||(t[23]=t=>e.$emit("apply-click",t))},null,8,["field","type","showMenu","filterElement","filterHeaderTemplate","filterFooterTemplate","filterClearTemplate","filterApplyTemplate","filters","filtersStore","filterMenuStyle","filterMenuClass","showOperator","showClearButton","showApplyButton","showMatchModes","showAddButton","matchModeOptions","maxConstraints"])):g("",!0)],6))],64)))),128))])):g("",!0)],64))])};var Y={name:"RowRadioButton",inheritAttrs:!1,emits:["change"],props:{value:null,checked:null},data:()=>({focused:!1}),methods:{onClick(e){this.disabled||this.checked||this.$emit("change",{originalEvent:e,data:this.value})},onFocus(){this.focused=!0},onBlur(){this.focused=!1}}};const Z=h("div",{class:"p-radiobutton-icon"},null,-1);Y.render=function(e,t,o,l,i,n){return d(),c("div",{class:"p-radiobutton p-component",onClick:t[1]||(t[1]=(...e)=>n.onClick&&n.onClick(...e)),tabindex:"0",onFocus:t[2]||(t[2]=e=>n.onFocus(e)),onBlur:t[3]||(t[3]=e=>n.onBlur(e)),onKeydown:t[4]||(t[4]=u(p(((...e)=>n.onClick&&n.onClick(...e)),["prevent"]),["space"]))},[h("div",{ref:"box",class:["p-radiobutton-box p-component",{"p-highlight":o.checked,"p-disabled":e.$attrs.disabled,"p-focus":i.focused}],role:"radio","aria-checked":o.checked},[Z],10,["aria-checked"])],32)};var Q={name:"RowCheckbox",inheritAttrs:!1,emits:["change"],props:{value:null,checked:null},data:()=>({focused:!1}),methods:{onClick(e){this.$attrs.disabled||(this.focused=!0,this.$emit("change",{originalEvent:e,data:this.value}))},onFocus(){this.focused=!0},onBlur(){this.focused=!1}}};Q.render=function(e,t,o,l,i,n){return d(),c("div",{class:"p-checkbox p-component",onClick:t[4]||(t[4]=(...e)=>n.onClick&&n.onClick(...e))},[h("div",{ref:"box",class:["p-checkbox-box p-component",{"p-highlight":o.checked,"p-disabled":e.$attrs.disabled,"p-focus":i.focused}],role:"checkbox","aria-checked":o.checked,tabindex:e.$attrs.disabled?null:"0",onKeydown:t[1]||(t[1]=u(p(((...e)=>n.onClick&&n.onClick(...e)),["prevent"]),["space"])),onFocus:t[2]||(t[2]=e=>n.onFocus(e)),onBlur:t[3]||(t[3]=e=>n.onBlur(e))},[h("span",{class:["p-checkbox-icon",{"pi pi-check":o.checked}]},null,2)],42,["aria-checked","tabindex"])])};var ee={name:"BodyCell",emits:["cell-edit-init","cell-edit-complete","cell-edit-cancel","row-edit-init","row-edit-save","row-edit-cancel","editing-cell-change","row-toggle","radio-change","checkbox-change"],props:{rowData:{type:Object,default:null},column:{type:Object,default:null},frozenRow:{type:Boolean,default:!1},rowIndex:{type:Number,default:null},index:{type:Number,default:null},rowTogglerIcon:{type:Array,default:null},selected:{type:Boolean,default:!1},editing:{type:Boolean,default:!1},editMode:{type:String,default:null},responsiveLayout:{type:String,default:"stack"}},documentEditListener:null,selfClick:!1,overlayEventListener:null,data(){return{d_editing:this.editing,styleObject:{}}},watch:{editing(e){this.d_editing=e}},mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition()},beforeUnmount(){this.overlayEventListener&&($.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null)},methods:{columnProp(e){return this.column.props?this.column.type.props[e].type===Boolean&&""===this.column.props[e]||this.column.props[e]:null},resolveFieldData(){return l.resolveFieldData(this.rowData,this.columnProp("field"))},toggleRow(e){this.$emit("row-toggle",{originalEvent:e,data:this.rowData})},toggleRowWithRadio(e){this.$emit("radio-change",e)},toggleRowWithCheckbox(e){this.$emit("checkbox-change",e)},isEditable(){return this.column.children&&null!=this.column.children.editor},bindDocumentEditListener(){this.documentEditListener||(this.documentEditListener=e=>{this.selfClick||this.completeEdit(e,"outside"),this.selfClick=!1},document.addEventListener("click",this.documentEditListener))},unbindDocumentEditListener(){this.documentEditListener&&(document.removeEventListener("click",this.documentEditListener),this.documentEditListener=null,this.selfClick=!1)},switchCellToViewMode(){this.d_editing=!1,this.unbindDocumentEditListener(),this.$emit("editing-cell-change",{rowIndex:this.rowIndex,cellIndex:this.index,editing:!1}),$.off("overlay-click",this.overlayEventListener),this.overlayEventListener=null},onClick(e){"cell"===this.editMode&&this.isEditable()&&(this.selfClick=!0,this.d_editing||(this.d_editing=!0,this.bindDocumentEditListener(),this.$emit("cell-edit-init",{originalEvent:e,data:this.rowData,field:this.columnProp("field"),index:this.rowIndex}),this.$emit("editing-cell-change",{rowIndex:this.rowIndex,cellIndex:this.index,editing:!0}),this.overlayEventListener=e=>{this.$el&&this.$el.contains(e.target)&&(this.selfClick=!0)},$.on("overlay-click",this.overlayEventListener)))},completeEdit(e,t){let o={originalEvent:e,data:this.rowData,field:this.columnProp("field"),index:this.rowIndex,type:t,defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=!0}};this.$emit("cell-edit-complete",o),o.defaultPrevented||this.switchCellToViewMode()},onKeyDown(e){if("cell"===this.editMode)switch(e.which){case 13:this.completeEdit(e,"enter");break;case 27:this.switchCellToViewMode(),this.$emit("cell-edit-cancel",{originalEvent:e,data:this.rowData,field:this.columnProp("field"),index:this.rowIndex});break;case 9:this.completeEdit(e,"tab"),e.shiftKey?this.moveToPreviousCell(e):this.moveToNextCell(e)}},moveToPreviousCell(e){let o=this.findCell(e.target),l=this.findPreviousEditableColumn(o);l&&(t.invokeElementMethod(l,"click"),e.preventDefault())},moveToNextCell(e){let o=this.findCell(e.target),l=this.findNextEditableColumn(o);l&&(t.invokeElementMethod(l,"click"),e.preventDefault())},findCell(e){if(e){let o=e;for(;o&&!t.hasClass(o,"p-cell-editing");)o=o.parentElement;return o}return null},findPreviousEditableColumn(e){let o=e.previousElementSibling;if(!o){let t=e.parentElement.previousElementSibling;t&&(o=t.lastElementChild)}return o?t.hasClass(o,"p-editable-column")?o:this.findPreviousEditableColumn(o):null},findNextEditableColumn(e){let o=e.nextElementSibling;if(!o){let t=e.parentElement.nextElementSibling;t&&(o=t.firstElementChild)}return o?t.hasClass(o,"p-editable-column")?o:this.findNextEditableColumn(o):null},isEditingCellValid(){return 0===t.find(this.$el,".p-invalid").length},onRowEditInit(e){this.$emit("row-edit-init",{originalEvent:e,data:this.rowData,field:this.columnProp("field"),index:this.rowIndex})},onRowEditSave(e){this.$emit("row-edit-save",{originalEvent:e,data:this.rowData,field:this.columnProp("field"),index:this.rowIndex})},onRowEditCancel(e){this.$emit("row-edit-cancel",{originalEvent:e,data:this.rowData,field:this.columnProp("field"),index:this.rowIndex})},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let e=0,o=this.$el.nextElementSibling;o&&(e=t.getOuterWidth(o)+parseFloat(o.style.left)),this.styleObject.right=e+"px"}else{let e=0,o=this.$el.previousElementSibling;o&&(e=t.getOuterWidth(o)+parseFloat(o.style.left)),this.styleObject.left=e+"px"}}}},computed:{containerClass(){return[this.columnProp("bodyClass"),this.columnProp("class"),{"p-selection-column":null!=this.columnProp("selectionMode"),"p-editable-column":this.isEditable(),"p-cell-editing":this.d_editing,"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.columnProp("bodyStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]}},components:{DTRadioButton:Y,DTCheckbox:Q},directives:{ripple:z}};const te={key:0,class:"p-column-title"},oe=h("span",{class:"p-row-editor-init-icon pi pi-fw pi-pencil"},null,-1),le=h("span",{class:"p-row-editor-save-icon pi pi-fw pi-check"},null,-1),ie=h("span",{class:"p-row-editor-cancel-icon pi pi-fw pi-times"},null,-1);ee.render=function(e,t,o,l,i,n){const r=m("DTRadioButton"),s=m("DTCheckbox"),a=v("ripple");return d(),c("td",{style:n.containerStyle,class:n.containerClass,onClick:t[5]||(t[5]=(...e)=>n.onClick&&n.onClick(...e)),onKeydown:t[6]||(t[6]=(...e)=>n.onKeyDown&&n.onKeyDown(...e)),role:"cell"},["stack"===o.responsiveLayout?(d(),c("span",te,R(n.columnProp("header")),1)):g("",!0),o.column.children&&o.column.children.body&&!i.d_editing?(d(),c(f(o.column.children.body),{key:1,data:o.rowData,column:o.column,index:o.rowIndex,frozenRow:o.frozenRow},null,8,["data","column","index","frozenRow"])):o.column.children&&o.column.children.editor&&i.d_editing?(d(),c(f(o.column.children.editor),{key:2,data:o.rowData,column:o.column,index:o.index,frozenRow:o.frozenRow},null,8,["data","column","index","frozenRow"])):n.columnProp("selectionMode")?(d(),c(x,{key:3},["single"===o.column.props.selectionMode?(d(),c(r,{key:0,value:o.rowData,checked:o.selected,onChange:n.toggleRowWithRadio},null,8,["value","checked","onChange"])):"multiple"===o.column.props.selectionMode?(d(),c(s,{key:1,value:o.rowData,checked:o.selected,onChange:n.toggleRowWithCheckbox},null,8,["value","checked","onChange"])):g("",!0)],64)):n.columnProp("rowReorder")?(d(),c("i",{key:4,class:["p-datatable-reorderablerow-handle",n.columnProp("rowReorderIcon")||"pi pi-bars"]},null,2)):n.columnProp("expander")?k((d(),c("button",{key:5,class:"p-row-toggler p-link",onClick:t[1]||(t[1]=(...e)=>n.toggleRow&&n.toggleRow(...e)),type:"button"},[h("span",{class:o.rowTogglerIcon},null,2)],512)),[[a]]):"row"===o.editMode&&n.columnProp("rowEditor")?(d(),c(x,{key:6},[i.d_editing?g("",!0):k((d(),c("button",{key:0,class:"p-row-editor-init p-link",onClick:t[2]||(t[2]=(...e)=>n.onRowEditInit&&n.onRowEditInit(...e)),type:"button"},[oe],512)),[[a]]),i.d_editing?k((d(),c("button",{key:1,class:"p-row-editor-save p-link",onClick:t[3]||(t[3]=(...e)=>n.onRowEditSave&&n.onRowEditSave(...e)),type:"button"},[le],512)),[[a]]):g("",!0),i.d_editing?k((d(),c("button",{key:2,class:"p-row-editor-cancel p-link",onClick:t[4]||(t[4]=(...e)=>n.onRowEditCancel&&n.onRowEditCancel(...e)),type:"button"},[ie],512)),[[a]]):g("",!0)],64)):(d(),c(x,{key:7},[S(R(n.resolveFieldData()),1)],64))],38)};var ne={name:"TableBody",emits:["rowgroup-toggle","row-click","row-dblclick","row-rightclick","row-touchend","row-keydown","row-mousedown","row-dragstart","row-dragover","row-dragleave","row-dragend","row-drop","row-toggle","radio-change","checkbox-change","cell-edit-init","cell-edit-complete","cell-edit-cancel","row-edit-init","row-edit-save","row-edit-cancel","editing-cell-change"],props:{value:{type:Array,default:null},columns:{type:null,default:null},frozenRow:{type:Boolean,default:!1},empty:{type:Boolean,default:!1},rowGroupMode:{type:String,default:null},groupRowsBy:{type:[Array,String],default:null},expandableRowGroups:{type:Boolean,default:!1},expandedRowGroups:{type:Array,default:null},dataKey:{type:String,default:null},expandedRowIcon:{type:String,default:null},collapsedRowIcon:{type:String,default:null},expandedRows:{type:Array,default:null},expandedRowKeys:{type:null,default:null},selection:{type:[Array,Object],default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},contextMenu:{type:Boolean,default:!1},contextMenuSelection:{type:Object,default:null},rowClass:{type:null,default:null},editMode:{type:String,default:null},compareSelectionBy:{type:String,default:"deepEquals"},editingRows:{type:Array,default:null},editingRowKeys:{type:null,default:null},loading:{type:Boolean,default:!1},templates:{type:null,default:null},scrollable:{type:Boolean,default:!1},responsiveLayout:{type:String,default:"stack"}},mounted(){this.frozenRow&&this.updateFrozenRowStickyPosition(),this.scrollable&&"subheader"===this.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()},updated(){this.frozenRow&&this.updateFrozenRowStickyPosition(),this.scrollable&&"subheader"===this.rowGroupMode&&this.updateFrozenRowGroupHeaderStickyPosition()},data:()=>({rowGroupHeaderStyleObject:{}}),methods:{columnProp:(e,t)=>e.props?e.type.props[t].type===Boolean&&""===e.props[t]||e.props[t]:null,shouldRenderRowGroupHeader(e,t,o){let i=l.resolveFieldData(t,this.groupRowsBy),n=e[o-1];if(n){return i!==l.resolveFieldData(n,this.groupRowsBy)}return!0},getRowKey(e,t){return this.dataKey?l.resolveFieldData(e,this.dataKey):t},getRowClass(e){let t=[];if(this.selectionMode&&t.push("p-selectable-row"),this.selection&&t.push({"p-highlight":this.isSelected(e)}),this.contextMenuSelection&&t.push({"p-highlight-contextmenu":this.isSelectedWithContextMenu(e)}),this.rowClass){let o=this.rowClass(e);o&&t.push(o)}return t},shouldRenderRowGroupFooter(e,t,o){if(this.expandableRowGroups&&!this.isRowGroupExpanded(t))return!1;{let i=l.resolveFieldData(t,this.groupRowsBy),n=e[o+1];if(n){return i!==l.resolveFieldData(n,this.groupRowsBy)}return!0}},shouldRenderBodyCell(e,t,o){if(!this.rowGroupMode)return!this.columnProp(t,"hidden");if("subheader"===this.rowGroupMode)return this.groupRowsBy!==this.columnProp(t,"field");if("rowspan"===this.rowGroupMode){if(this.isGrouped(t)){let i=e[o-1];if(i){return l.resolveFieldData(e[o],this.columnProp(t,"field"))!==l.resolveFieldData(i,this.columnProp(t,"field"))}return!0}return!0}},calculateRowGroupSize(e,t,o){if(this.isGrouped(t)){let i=l.resolveFieldData(e[o],this.columnProp(t,"field")),n=i,r=0;for(;i===n;){r++;let i=e[++o];if(!i)break;n=l.resolveFieldData(i,this.columnProp(t,"field"))}return 1===r?null:r}return null},rowTogglerIcon(e){return["p-row-toggler-icon pi",this.isRowExpanded(e)?this.expandedRowIcon:this.collapsedRowIcon]},rowGroupTogglerIcon(e){return["p-row-toggler-icon pi",this.isRowGroupExpanded(e)?this.expandedRowIcon:this.collapsedRowIcon]},isGrouped(e){return!(!this.groupRowsBy||!this.columnProp(e,"field"))&&(Array.isArray(this.groupRowsBy)?this.groupRowsBy.indexOf(e.props.field)>-1:this.groupRowsBy===e.props.field)},isRowEditing(e){return!(!e||!this.editingRows)&&(this.dataKey?!!this.editingRowKeys&&void 0!==this.editingRowKeys[l.resolveFieldData(e,this.dataKey)]:this.findIndex(e,this.editingRows)>-1)},isRowExpanded(e){return!(!e||!this.expandedRows)&&(this.dataKey?!!this.expandedRowKeys&&void 0!==this.expandedRowKeys[l.resolveFieldData(e,this.dataKey)]:this.findIndex(e,this.expandedRows)>-1)},isRowGroupExpanded(e){if(this.expandableRowGroups&&this.expandedRowGroups){let t=l.resolveFieldData(e,this.groupRowsBy);return this.expandedRowGroups.indexOf(t)>-1}return!1},isSelected(e){return!(!e||!this.selection)&&(this.dataKey?!!this.selectionKeys&&void 0!==this.selectionKeys[l.resolveFieldData(e,this.dataKey)]:this.selection instanceof Array?this.findIndexInSelection(e)>-1:this.equals(e,this.selection))},isSelectedWithContextMenu(e){return!(!e||!this.contextMenuSelection)&&this.equals(e,this.contextMenuSelection,this.dataKey)},findIndexInSelection(e){return this.findIndex(e,this.selection)},findIndex(e,t){let o=-1;if(t&&t.length)for(let l=0;l<t.length;l++)if(this.equals(e,t[l])){o=l;break}return o},equals(e,t){return"equals"===this.compareSelectionBy?e===t:l.equals(e,t,this.dataKey)},onRowGroupToggle(e,t){this.$emit("rowgroup-toggle",{originalEvent:e,data:t})},onRowClick(e,t,o){this.$emit("row-click",{originalEvent:e,data:t,index:o})},onRowDblClick(e,t,o){this.$emit("row-dblclick",{originalEvent:e,data:t,index:o})},onRowRightClick(e,t,o){this.$emit("row-rightclick",{originalEvent:e,data:t,index:o})},onRowTouchEnd(e){this.$emit("row-touchend",e)},onRowKeyDown(e,t,o){this.$emit("row-keydown",{originalEvent:e,data:t,index:o})},onRowMouseDown(e){this.$emit("row-mousedown",e)},onRowDragStart(e,t){this.$emit("row-dragstart",{originalEvent:e,index:t})},onRowDragOver(e,t){this.$emit("row-dragover",{originalEvent:e,index:t})},onRowDragLeave(e){this.$emit("row-dragleave",e)},onRowDragEnd(e){this.$emit("row-dragend",e)},onRowDrop(e){this.$emit("row-drop",e)},onRowToggle(e){this.$emit("row-toggle",e)},onRadioChange(e){this.$emit("radio-change",e)},onCheckboxChange(e){this.$emit("checkbox-change",e)},onCellEditInit(e){this.$emit("cell-edit-init",e)},onCellEditComplete(e){this.$emit("cell-edit-complete",e)},onCellEditCancel(e){this.$emit("cell-edit-cancel",e)},onRowEditInit(e){this.$emit("row-edit-init",e)},onRowEditSave(e){this.$emit("row-edit-save",e)},onRowEditCancel(e){this.$emit("row-edit-cancel",e)},onEditingCellChange(e){this.$emit("editing-cell-change",e)},updateFrozenRowStickyPosition(){this.$el.style.top=t.getOuterHeight(this.$el.previousElementSibling)+"px"},updateFrozenRowGroupHeaderStickyPosition(){let e=t.getOuterHeight(this.$el.previousElementSibling);this.rowGroupHeaderStyleObject.top=e+"px"}},computed:{columnsLength(){return this.columns?this.columns.length:0},rowGroupHeaderStyle(){return this.scrollable?{top:this.rowGroupHeaderStyleObject.top}:null}},components:{DTBodyCell:ee}};const re={class:"p-datatable-tbody",role:"rowgroup"},se={key:1,class:"p-datatable-emptymessage",role:"row"};ne.render=function(e,t,o,l,i,n){const r=m("DTBodyCell");return d(),c("tbody",re,[o.empty?(d(),c("tr",se,[h("td",{colspan:n.columnsLength},[o.templates.empty&&!o.loading?(d(),c(f(o.templates.empty),{key:0})):g("",!0),o.templates.loading&&o.loading?(d(),c(f(o.templates.loading),{key:1})):g("",!0)],8,["colspan"])])):(d(!0),c(x,{key:0},C(o.value,((e,l)=>(d(),c(x,{key:n.getRowKey(e,l)+"_subheader"},[o.templates.groupheader&&"subheader"===o.rowGroupMode&&n.shouldRenderRowGroupHeader(o.value,e,l)?(d(),c("tr",{key:0,class:"p-rowgroup-header",style:n.rowGroupHeaderStyle,role:"row"},[h("td",{colspan:n.columnsLength-1},[o.expandableRowGroups?(d(),c("button",{key:0,class:"p-row-toggler p-link",onClick:t=>n.onRowGroupToggle(t,e),type:"button"},[h("span",{class:n.rowGroupTogglerIcon(e)},null,2)],8,["onClick"])):g("",!0),(d(),c(f(o.templates.groupheader),{data:e,index:l},null,8,["data","index"]))],8,["colspan"])],4)):g("",!0),!o.expandableRowGroups||n.isRowGroupExpanded(e)?(d(),c("tr",{class:n.getRowClass(e),key:n.getRowKey(e,l),onClick:t=>n.onRowClick(t,e,l),onDblclick:t=>n.onRowDblClick(t,e,l),onContextmenu:t=>n.onRowRightClick(t,e,l),onTouchend:t[11]||(t[11]=e=>n.onRowTouchEnd(e)),onKeydown:t=>n.onRowKeyDown(t,e,l),tabindex:o.selectionMode||o.contextMenu?"0":null,onMousedown:t[12]||(t[12]=e=>n.onRowMouseDown(e)),onDragstart:e=>n.onRowDragStart(e,l),onDragover:e=>n.onRowDragOver(e,l),onDragleave:t[13]||(t[13]=e=>n.onRowDragLeave(e)),onDragend:t[14]||(t[14]=e=>n.onRowDragEnd(e)),onDrop:t[15]||(t[15]=e=>n.onRowDrop(e)),role:"row"},[(d(!0),c(x,null,C(o.columns,((i,s)=>(d(),c(x,{key:n.columnProp(i,"columnKey")||n.columnProp(i,"field")||s},[n.shouldRenderBodyCell(o.value,i,l)?(d(),c(r,{key:0,rowData:e,column:i,rowIndex:l,index:s,selected:n.isSelected(e),rowTogglerIcon:n.columnProp(i,"expander")?n.rowTogglerIcon(e):null,frozenRow:o.frozenRow,rowspan:"rowspan"===o.rowGroupMode?n.calculateRowGroupSize(o.value,i,l):null,editMode:o.editMode,editing:"row"===o.editMode&&n.isRowEditing(e),responsiveLayout:o.responsiveLayout,onRadioChange:t[1]||(t[1]=e=>n.onRadioChange(e)),onCheckboxChange:t[2]||(t[2]=e=>n.onCheckboxChange(e)),onRowToggle:t[3]||(t[3]=e=>n.onRowToggle(e)),onCellEditInit:t[4]||(t[4]=e=>n.onCellEditInit(e)),onCellEditComplete:t[5]||(t[5]=e=>n.onCellEditComplete(e)),onCellEditCancel:t[6]||(t[6]=e=>n.onCellEditCancel(e)),onRowEditInit:t[7]||(t[7]=e=>n.onRowEditInit(e)),onRowEditSave:t[8]||(t[8]=e=>n.onRowEditSave(e)),onRowEditCancel:t[9]||(t[9]=e=>n.onRowEditCancel(e)),onEditingCellChange:t[10]||(t[10]=e=>n.onEditingCellChange(e))},null,8,["rowData","column","rowIndex","index","selected","rowTogglerIcon","frozenRow","rowspan","editMode","editing","responsiveLayout"])):g("",!0)],64)))),128))],42,["onClick","onDblclick","onContextmenu","onKeydown","tabindex","onDragstart","onDragover"])):g("",!0),o.templates.expansion&&o.expandedRows&&n.isRowExpanded(e)?(d(),c("tr",{class:"p-datatable-row-expansion",key:n.getRowKey(e,l)+"_expansion",role:"row"},[h("td",{colspan:n.columnsLength},[(d(),c(f(o.templates.expansion),{data:e,index:l},null,8,["data","index"]))],8,["colspan"])])):g("",!0),o.templates.groupfooter&&"subheader"===o.rowGroupMode&&n.shouldRenderRowGroupFooter(o.value,e,l)?(d(),c("tr",{class:"p-rowgroup-footer",key:n.getRowKey(e,l)+"_subfooter",role:"row"},[(d(),c(f(o.templates.groupfooter),{data:e,index:l},null,8,["data","index"]))])):g("",!0)],64)))),128))])};var ae={name:"FooterCell",props:{column:{type:null,default:null}},data:()=>({styleObject:{}}),mounted(){this.columnProp("frozen")&&this.updateStickyPosition()},updated(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{columnProp(e){return this.column.props?this.column.type.props[e].type===Boolean&&""===this.column.props[e]||this.column.props[e]:null},updateStickyPosition(){if(this.columnProp("frozen")){if("right"===this.columnProp("alignFrozen")){let e=0,o=this.$el.nextElementSibling;o&&(e=t.getOuterWidth(o)+parseFloat(o.style.left)),this.styleObject.right=e+"px"}else{let e=0,o=this.$el.previousElementSibling;o&&(e=t.getOuterWidth(o)+parseFloat(o.style.left)),this.styleObject.left=e+"px"}}}},computed:{containerClass(){return[this.columnProp("footerClass"),this.columnProp("class"),{"p-frozen-column":this.columnProp("frozen")}]},containerStyle(){let e=this.columnProp("footerStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]}}};ae.render=function(e,t,o,l,i,n){return d(),c("td",{style:n.containerStyle,class:n.containerClass,role:"cell",colspan:n.columnProp("colspan"),rowspan:n.columnProp("rowspan")},[o.column.children&&o.column.children.footer?(d(),c(f(o.column.children.footer),{key:0,column:o.column},null,8,["column"])):g("",!0),S(" "+R(n.columnProp("footer")),1)],14,["colspan","