import{B as Xe,s as Q,m as b,am as ue,ah as N,an as pe,o as i,c as f,u as v,A as M,C as g,O as A,ao as Ae,ap as T,p as E,y as p,aq as Ne,ae as F,ar as qe,R as Qe,q as Je,x as Le,W as z,z as k,v as C,N as ne,as as be,ak as B,a3 as le,at as oe,ai as Ye,X as j,au as me,av as ge,aw as ye,ax as ve,a0 as ke,Y as Ze,ay as et,a6 as tt,j as y,al as we,E as nt,G as ot,J as K,b as rt,a as lt,w as at,K as I,L as ee,U as it,P as st,ad as Se,_ as ct}from"./CVN9mXi8.js";import{g as J,_ as dt}from"./Cnr6hwyY.js";import{s as He}from"./ByD9s0OG.js";import{b as Ce,c as Pe,d as xe,e as ut,a as pt}from"./BLsGNFkl.js";import{s as ft}from"./O5JmsoSo.js";import{s as ht}from"./BzjqEU2Y.js";import{s as bt}from"./CeHl1rk9.js";import{s as mt,a as gt}from"./U-WKJCH1.js";import{S as ae}from"./ZIw2O0V5.js";import{aw as yt,ay as vt,az as kt,aA as wt,aB as St,aD as Ct}from"./BvtdJvEQ.js";import"./DOlpiDlz.js";import"./CG5Ae_0g.js";import"./2PnuRw05.js";import"./oLVS05MJ.js";const Pt=""+new URL("logo-ecovias-do-araguaia.DN45DeHx.png",import.meta.url).href;var xt=function(e){var t=e.dt;return`
.p-treetable {
    position: relative;
}

.p-treetable-table {
    border-spacing: 0;
    border-collapse: separate;
    width: 100%;
}

.p-treetable-scrollable > .p-treetable-table-container {
    position: relative;
}

.p-treetable-scrollable-table > .p-treetable-thead {
    inset-block-start: 0;
    z-index: 1;
}

.p-treetable-scrollable-table > .p-treetable-frozen-tbody {
    position: sticky;
    z-index: 1;
}

.p-treetable-scrollable-table > .p-treetable-tfoot {
    inset-block-end: 0;
    z-index: 1;
}

.p-treetable-scrollable .p-treetable-frozen-column {
    position: sticky;
    background: `.concat(t("treetable.header.cell.background"),`;
}

.p-treetable-scrollable th.p-treetable-frozen-column {
    z-index: 1;
}

.p-treetable-scrollable > .p-treetable-table-container > .p-treetable-table > .p-treetable-thead {
    background: `).concat(t("treetable.header.cell.background"),`;
}

.p-treetable-scrollable > .p-treetable-table-container > .p-treetable-table > .p-treetable-tfoot {
    background: `).concat(t("treetable.footer.cell.background"),`;
}

.p-treetable-flex-scrollable {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.p-treetable-flex-scrollable > .p-treetable-table-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.p-treetable-scrollable-table > .p-treetable-tbody > .p-treetable-row-group-header {
    position: sticky;
    z-index: 1;
}

.p-treetable-resizable-table > .p-treetable-thead > tr > th,
.p-treetable-resizable-table > .p-treetable-tfoot > tr > td,
.p-treetable-resizable-table > .p-treetable-tbody > tr > td {
    overflow: hidden;
    white-space: nowrap;
}

.p-treetable-resizable-table > .p-treetable-thead > tr > th.p-treetable-resizable-column:not(.p-treetable-frozen-column) {
    background-clip: padding-box;
    position: relative;
}

.p-treetable-resizable-table-fit > .p-treetable-thead > tr > th.p-treetable-resizable-column:last-child .p-treetable-column-resizer {
    display: none;
}

.p-treetable-column-resizer {
    display: block;
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
    margin: 0;
    width: `).concat(t("treetable.column.resizer.width"),`;
    height: 100%;
    padding: 0;
    cursor: col-resize;
    border: 1px solid transparent;
}

.p-treetable-column-header-content {
    display: flex;
    align-items: center;
    gap: `).concat(t("treetable.header.cell.gap"),`;
}

.p-treetable-column-resize-indicator {
    width: `).concat(t("treetable.resize.indicator.width"),`;
    position: absolute;
    z-index: 10;
    display: none;
    background: `).concat(t("treetable.resize.indicator.color"),`;
}

.p-treetable-mask {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.p-treetable-paginator-top {
    border-color: `).concat(t("treetable.paginator.top.border.color"),`;
    border-style: solid;
    border-width: `).concat(t("treetable.paginator.top.border.width"),`;
}

.p-treetable-paginator-bottom {
    border-color: `).concat(t("treetable.paginator.bottom.border.color"),`;
    border-style: solid;
    border-width: `).concat(t("treetable.paginator.bottom.border.width"),`;
}

.p-treetable-header {
    background: `).concat(t("treetable.header.background"),`;
    color: `).concat(t("treetable.header.color"),`;
    border-color: `).concat(t("treetable.header.border.color"),`;
    border-style: solid;
    border-width: `).concat(t("treetable.header.border.width"),`;
    padding: `).concat(t("treetable.header.padding"),`;
}

.p-treetable-footer {
    background: `).concat(t("treetable.footer.background"),`;
    color: `).concat(t("treetable.footer.color"),`;
    border-color: `).concat(t("treetable.footer.border.color"),`;
    border-style: solid;
    border-width: `).concat(t("treetable.footer.border.width"),`;
    padding: `).concat(t("treetable.footer.padding"),`;
}

.p-treetable-header-cell {
    padding: `).concat(t("treetable.header.cell.padding"),`;
    background: `).concat(t("treetable.header.cell.background"),`;
    border-color: `).concat(t("treetable.header.cell.border.color"),`;
    border-style: solid;
    border-width: 0 0 1px 0;
    color: `).concat(t("treetable.header.cell.color"),`;
    font-weight: normal;
    text-align: start;
    transition: background `).concat(t("treetable.transition.duration"),", color ").concat(t("treetable.transition.duration"),", border-color ").concat(t("treetable.transition.duration"),`,
            outline-color `).concat(t("treetable.transition.duration"),", box-shadow ").concat(t("treetable.transition.duration"),`;
}

.p-treetable-column-title {
    font-weight: `).concat(t("treetable.column.title.font.weight"),`;
}

.p-treetable-tbody > tr {
    outline-color: transparent;
    background: `).concat(t("treetable.row.background"),`;
    color: `).concat(t("treetable.row.color"),`;
    transition: background `).concat(t("treetable.transition.duration"),", color ").concat(t("treetable.transition.duration"),", border-color ").concat(t("treetable.transition.duration"),`,
            outline-color `).concat(t("treetable.transition.duration"),", box-shadow ").concat(t("treetable.transition.duration"),`;
}

.p-treetable-tbody > tr > td {
    text-align: start;
    border-color: `).concat(t("treetable.body.cell.border.color"),`;
    border-style: solid;
    border-width: 0 0 1px 0;
    padding: `).concat(t("treetable.body.cell.padding"),`;
}

.p-treetable-hoverable .p-treetable-tbody > tr:not(.p-treetable-row-selected):hover {
    background: `).concat(t("treetable.row.hover.background"),`;
    color: `).concat(t("treetable.row.hover.color"),`;
}

.p-treetable-tbody > tr.p-treetable-row-selected {
    background: `).concat(t("treetable.row.selected.background"),`;
    color: `).concat(t("treetable.row.selected.color"),`;
}

.p-treetable-tbody > tr:has(+ .p-treetable-row-selected) > td {
    border-block-end-color: `).concat(t("treetable.body.cell.selected.border.color"),`;
}

.p-treetable-tbody > tr.p-treetable-row-selected > td {
    border-block-end-color: `).concat(t("treetable.body.cell.selected.border.color"),`;
}

.p-treetable-tbody > tr:focus-visible,
.p-treetable-tbody > tr.p-treetable-contextmenu-row-selected {
    box-shadow: `).concat(t("treetable.row.focus.ring.shadow"),`;
    outline: `).concat(t("treetable.row.focus.ring.width")," ").concat(t("treetable.row.focus.ring.style")," ").concat(t("treetable.row.focus.ring.color"),`;
    outline-offset: `).concat(t("treetable.row.focus.ring.offset"),`;
}

.p-treetable-tfoot > tr > td {
    text-align: start;
    padding: `).concat(t("treetable.footer.cell.padding"),`;
    border-color: `).concat(t("treetable.footer.cell.border.color"),`;
    border-style: solid;
    border-width: 0 0 1px 0;
    color: `).concat(t("treetable.footer.cell.color"),`;
    background: `).concat(t("treetable.footer.cell.background"),`;
}

.p-treetable-column-footer {
    font-weight: `).concat(t("treetable.column.footer.font.weight"),`;
}

.p-treetable-sortable-column {
    cursor: pointer;
    user-select: none;
    outline-color: transparent;
}

.p-treetable-column-title,
.p-treetable-sort-icon,
.p-treetable-sort-badge {
    vertical-align: middle;
}

.p-treetable-sort-icon {
    color: `).concat(t("treetable.sort.icon.color"),`;
    font-size: `).concat(t("treetable.sort.icon.size"),`;
    width: `).concat(t("treetable.sort.icon.size"),`;
    height: `).concat(t("treetable.sort.icon.size"),`;
    transition: color `).concat(t("treetable.transition.duration"),`;
}

.p-treetable-sortable-column:not(.p-treetable-column-sorted):hover {
    background: `).concat(t("treetable.header.cell.hover.background"),`;
    color: `).concat(t("treetable.header.cell.hover.color"),`;
}

.p-treetable-sortable-column:not(.p-treetable-column-sorted):hover .p-treetable-sort-icon {
    color: `).concat(t("treetable.sort.icon.hover.color"),`;
}

.p-treetable-column-sorted {
    background: `).concat(t("treetable.header.cell.selected.background"),`;
    color: `).concat(t("treetable.header.cell.selected.color"),`;
}

.p-treetable-column-sorted .p-treetable-sort-icon {
    color: `).concat(t("treetable.header.cell.selected.color"),`;
}

.p-treetable-sortable-column:focus-visible {
    box-shadow: `).concat(t("treetable.header.cell.focus.ring.shadow"),`;
    outline: `).concat(t("treetable.header.cell.focus.ring.width")," ").concat(t("treetable.header.cell.focus.ring.style")," ").concat(t("treetable.header.cell.focus.ring.color"),`;
    outline-offset: `).concat(t("treetable.header.cell.focus.ring.offset"),`;
}

.p-treetable-hoverable .p-treetable-selectable-row {
    cursor: pointer;
}

.p-treetable-loading-icon {
    font-size: `).concat(t("treetable.loading.icon.size"),`;
    width: `).concat(t("treetable.loading.icon.size"),`;
    height: `).concat(t("treetable.loading.icon.size"),`;
}

.p-treetable-gridlines .p-treetable-header {
    border-width: 1px 1px 0 1px;
}

.p-treetable-gridlines .p-treetable-footer {
    border-width: 0 1px 1px 1px;
}

.p-treetable-gridlines .p-treetable-paginator-top {
    border-width: 1px 1px 0 1px;
}

.p-treetable-gridlines .p-treetable-paginator-bottom {
    border-width: 0 1px 1px 1px;
}

.p-treetable-gridlines .p-treetable-thead > tr > th {
    border-width: 1px 0 1px 1px;
}

.p-treetable-gridlines .p-treetable-thead > tr > th:last-child {
    border-width: 1px;
}

.p-treetable-gridlines .p-treetable-tbody > tr > td {
    border-width: 1px 0 0 1px;
}

.p-treetable-gridlines .p-treetable-tbody > tr > td:last-child {
    border-width: 1px 1px 0 1px;
}

.p-treetable-gridlines .p-treetable-tbody > tr:last-child > td {
    border-width: 1px 0 1px 1px;
}

.p-treetable-gridlines .p-treetable-tbody > tr:last-child > td:last-child {
    border-width: 1px;
}

.p-treetable-gridlines .p-treetable-tfoot > tr > td {
    border-width: 1px 0 1px 1px;
}

.p-treetable-gridlines .p-treetable-tfoot > tr > td:last-child {
    border-width: 1px 1px 1px 1px;
}

.p-treetable.p-treetable-gridlines .p-treetable-thead + .p-treetable-tfoot > tr > td {
    border-width: 0 0 1px 1px;
}

.p-treetable.p-treetable-gridlines .p-treetable-thead + .p-treetable-tfoot > tr > td:last-child {
    border-width: 0 1px 1px 1px;
}

.p-treetable.p-treetable-gridlines:has(.p-treetable-thead):has(.p-treetable-tbody) .p-treetable-tbody > tr > td {
    border-width: 0 0 1px 1px;
}

.p-treetable.p-treetable-gridlines:has(.p-treetable-thead):has(.p-treetable-tbody) .p-treetable-tbody > tr > td:last-child {
    border-width: 0 1px 1px 1px;
}

.p-treetable.p-treetable-gridlines:has(.p-treetable-tbody):has(.p-treetable-tfoot) .p-treetable-tbody > tr:last-child > td {
    border-width: 0 0 0 1px;
}

.p-treetable.p-treetable-gridlines:has(.p-treetable-tbody):has(.p-treetable-tfoot) .p-treetable-tbody > tr:last-child > td:last-child {
    border-width: 0 1px 0 1px;
}

.p-treetable.p-treetable-sm .p-treetable-header {
    padding: 0.375rem 0.5rem;
}

.p-treetable.p-treetable-sm .p-treetable-thead > tr > th {
    padding: 0.375rem 0.5rem;
}

.p-treetable.p-treetable-sm .p-treetable-tbody > tr > td {
    padding: 0.375rem 0.5rem;
}

.p-treetable.p-treetable-sm .p-treetable-tfoot > tr > td {
    padding: 0.375rem 0.5rem;
}

.p-treetable.p-treetable-sm .p-treetable-footer {
    padding: 0.375rem 0.5rem;
}

.p-treetable.p-treetable-lg .p-treetable-header {
    padding: 0.9375rem 1.25rem;
}

.p-treetable.p-treetable-lg .p-treetable-thead > tr > th {
    padding: 0.9375rem 1.25rem;
}

.p-treetable.p-treetable-lg .p-treetable-tbody > tr > td {
    padding: 0.9375rem 1.25rem;
}

.p-treetable.p-treetable-lg .p-treetable-tfoot > tr > td {
    padding: 0.9375rem 1.25rem;
}

.p-treetable.p-treetable-lg .p-treetable-footer {
    padding: 0.9375rem 1.25rem;
}

.p-treetable-body-cell-content {
    display: flex;
    align-items: center;
    gap: `).concat(t("treetable.body.cell.gap"),`;
}

.p-treetable-tbody > tr.p-treetable-row-selected .p-treetable-node-toggle-button {
    color: inherit;
}

.p-treetable-node-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: `).concat(t("treetable.node.toggle.button.size"),`;
    height: `).concat(t("treetable.node.toggle.button.size"),`;
    color: `).concat(t("treetable.node.toggle.button.color"),`;
    border: 0 none;
    background: transparent;
    cursor: pointer;
    border-radius: `).concat(t("treetable.node.toggle.button.border.radius"),`;
    transition: background `).concat(t("treetable.transition.duration"),", color ").concat(t("treetable.transition.duration"),", border-color ").concat(t("treetable.transition.duration"),`,
            outline-color `).concat(t("treetable.transition.duration"),", box-shadow ").concat(t("treetable.transition.duration"),`;
    outline-color: transparent;
    user-select: none;
}

.p-treetable-node-toggle-button:enabled:hover {
    color: `).concat(t("treetable.node.toggle.button.hover.color"),`;
    background: `).concat(t("treetable.node.toggle.button.hover.background"),`;
}

.p-treetable-tbody > tr.p-treetable-row-selected .p-treetable-node-toggle-button:hover {
    background: `).concat(t("treetable.node.toggle.button.selected.hover.background"),`;
    color: `).concat(t("treetable.node.toggle.button.selected.hover.color"),`;
}

.p-treetable-node-toggle-button:focus-visible {
    box-shadow: `).concat(t("treetable.node.toggle.button.focus.ring.shadow"),`;
    outline: `).concat(t("treetable.node.toggle.button.focus.ring.width")," ").concat(t("treetable.node.toggle.button.focus.ring.style")," ").concat(t("treetable.node.toggle.button.focus.ring.color"),`;
    outline-offset: `).concat(t("treetable.node.toggle.button.focus.ring.offset"),`;
}

.p-treetable-node-toggle-icon:dir(rtl) {
    transform: rotate(180deg);
}
`)},zt={root:function(e){var t=e.instance,o=e.props;return["p-treetable p-component",{"p-treetable-hoverable":o.rowHover||t.rowSelectionMode,"p-treetable-resizable":o.resizableColumns,"p-treetable-resizable-fit":o.resizableColumns&&o.columnResizeMode==="fit","p-treetable-scrollable":o.scrollable,"p-treetable-flex-scrollable":o.scrollable&&o.scrollHeight==="flex","p-treetable-gridlines":o.showGridlines,"p-treetable-sm":o.size==="small","p-treetable-lg":o.size==="large"}]},loading:"p-treetable-loading",mask:"p-treetable-mask p-overlay-mask",loadingIcon:"p-treetable-loading-icon",header:"p-treetable-header",paginator:function(e){var t=e.position;return"p-treetable-paginator-"+t},tableContainer:"p-treetable-table-container",table:function(e){var t=e.props;return["p-treetable-table",{"p-treetable-scrollable-table":t.scrollable,"p-treetable-resizable-table":t.resizableColumns,"p-treetable-resizable-table-fit":t.resizableColumns&&t.columnResizeMode==="fit"}]},thead:"p-treetable-thead",headerCell:function(e){var t=e.instance,o=e.props,l=e.context;return["p-treetable-header-cell",{"p-treetable-sortable-column":t.columnProp("sortable"),"p-treetable-resizable-column":o.resizableColumns,"p-treetable-column-sorted":l==null?void 0:l.sorted,"p-treetable-frozen-column":t.columnProp("frozen")}]},columnResizer:"p-treetable-column-resizer",columnHeaderContent:"p-treetable-column-header-content",columnTitle:"p-treetable-column-title",sortIcon:"p-treetable-sort-icon",pcSortBadge:"p-treetable-sort-badge",tbody:"p-treetable-tbody",row:function(e){var t=e.props,o=e.instance;return[{"p-treetable-row-selected":o.selected,"p-treetable-contextmenu-row-selected":t.contextMenuSelection&&o.isSelectedWithContextMenu}]},bodyCell:function(e){var t=e.instance;return[{"p-treetable-frozen-column":t.columnProp("frozen")}]},bodyCellContent:function(e){var t=e.instance;return["p-treetable-body-cell-content",{"p-treetable-body-cell-content-expander":t.columnProp("expander")}]},nodeToggleButton:"p-treetable-node-toggle-button",nodeToggleIcon:"p-treetable-node-toggle-icon",pcNodeCheckbox:"p-treetable-node-checkbox",emptyMessage:"p-treetable-empty-message",tfoot:"p-treetable-tfoot",footerCell:function(e){var t=e.instance;return[{"p-treetable-frozen-column":t.columnProp("frozen")}]},footer:"p-treetable-footer",columnResizeIndicator:"p-treetable-column-resize-indicator"},Mt={tableContainer:{overflow:"auto"},thead:{position:"sticky"},tfoot:{position:"sticky"}},Ot=Xe.extend({name:"treetable",theme:xt,classes:zt,inlineStyles:Mt}),Tt={name:"BaseTreeTable",extends:Q,props:{value:{type:null,default:null},dataKey:{type:[String,Function],default:"key"},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},metaKeySelection:{type:Boolean,default:!1},contextMenu:{type:Boolean,default:!1},contextMenuSelection:{type:Object,default:null},rows:{type:Number,default:0},first:{type:Number,default:0},totalRecords:{type:Number,default:0},paginator:{type:Boolean,default:!1},paginatorPosition:{type:String,default:"bottom"},alwaysShowPaginator:{type:Boolean,default:!0},paginatorTemplate:{type:String,default:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown"},pageLinkSize:{type:Number,default:5},rowsPerPageOptions:{type:Array,default:null},currentPageReportTemplate:{type:String,default:"({currentPage} of {totalPages})"},lazy:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},loadingMode:{type:String,default:"mask"},rowHover:{type:Boolean,default:!1},autoLayout:{type:Boolean,default:!1},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},defaultSortOrder:{type:Number,default:1},multiSortMeta:{type:Array,default:null},sortMode:{type:String,default:"single"},removableSort:{type:Boolean,default:!1},filters:{type:Object,default:null},filterMode:{type:String,default:"lenient"},filterLocale:{type:String,default:void 0},resizableColumns:{type:Boolean,default:!1},columnResizeMode:{type:String,default:"fit"},indentation:{type:Number,default:1},showGridlines:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},scrollHeight:{type:String,default:null},size:{type:String,default:null},tableStyle:{type:null,default:null},tableClass:{type:[String,Object],default:null},tableProps:{type:Object,default:null}},style:Ot,provide:function(){return{$pcTreeTable:this,$parentInstance:this}}},_e={name:"FooterCell",hostName:"TreeTable",extends:Q,props:{column:{type:Object,default:null},index:{type:Number,default:null}},data:function(){return{styleObject:{}}},mounted:function(){this.columnProp("frozen")&&this.updateStickyPosition()},updated:function(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{columnProp:function(e){return J(this.column,e)},getColumnPT:function(e){var t,o={props:this.column.props,parent:{instance:this,props:this.$props,state:this.$data},context:{index:this.index,frozen:this.columnProp("frozen"),size:(t=this.$parentInstance)===null||t===void 0?void 0:t.size}};return b(this.ptm("column.".concat(e),{column:o}),this.ptm("column.".concat(e),o),this.ptmo(this.getColumnProp(),e,o))},getColumnProp:function(){return this.column.props&&this.column.props.pt?this.column.props.pt:void 0},updateStickyPosition:function(){if(this.columnProp("frozen")){var e=this.columnProp("alignFrozen");if(e==="right"){var t=0,o=ue(this.$el,'[data-p-frozen-column="true"]');o&&(t=N(o)+parseFloat(o.style.right||0)),this.styleObject.insetInlineEnd=t+"px"}else{var l=0,r=pe(this.$el,'[data-p-frozen-column="true"]');r&&(l=N(r)+parseFloat(r.style.left||0)),this.styleObject.insetInlineStart=l+"px"}}}},computed:{containerClass:function(){return[this.columnProp("footerClass"),this.columnProp("class"),this.cx("footerCell")]},containerStyle:function(){var e=this.columnProp("footerStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]}}};function U(n){"@babel/helpers - typeof";return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(n)}function ze(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),t.push.apply(t,o)}return t}function Me(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ze(Object(t),!0).forEach(function(o){Kt(n,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ze(Object(t)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(t,o))})}return n}function Kt(n,e,t){return(e=Et(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Et(n){var e=jt(n,"string");return U(e)=="symbol"?e:e+""}function jt(n,e){if(U(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var o=t.call(n,e||"default");if(U(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var It=["data-p-frozen-column"];function Rt(n,e,t,o,l,r){return i(),f("td",b({style:r.containerStyle,class:r.containerClass,role:"cell"},Me(Me({},r.getColumnPT("root")),r.getColumnPT("footerCell")),{"data-p-frozen-column":r.columnProp("frozen")}),[t.column.children&&t.column.children.footer?(i(),v(M(t.column.children.footer),{key:0,column:t.column},null,8,["column"])):g("",!0),r.columnProp("footer")?(i(),f("span",b({key:1,class:n.cx("columnFooter")},r.getColumnPT("columnFooter")),A(r.columnProp("footer")),17)):g("",!0)],16,It)}_e.render=Rt;var Be={name:"HeaderCell",hostName:"TreeTable",extends:Q,emits:["column-click","column-resizestart"],props:{column:{type:Object,default:null},resizableColumns:{type:Boolean,default:!1},sortField:{type:[String,Function],default:null},sortOrder:{type:Number,default:null},multiSortMeta:{type:Array,default:null},sortMode:{type:String,default:"single"},index:{type:Number,default:null}},data:function(){return{styleObject:{}}},mounted:function(){this.columnProp("frozen")&&this.updateStickyPosition()},updated:function(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{columnProp:function(e){return J(this.column,e)},getColumnPT:function(e){var t,o={props:this.column.props,parent:{instance:this,props:this.$props,state:this.$data},context:{index:this.index,sorted:this.isColumnSorted(),frozen:this.$parentInstance.scrollable&&this.columnProp("frozen"),resizable:this.resizableColumns,scrollable:this.$parentInstance.scrollable,showGridlines:this.$parentInstance.showGridlines,size:(t=this.$parentInstance)===null||t===void 0?void 0:t.size}};return b(this.ptm("column.".concat(e),{column:o}),this.ptm("column.".concat(e),o),this.ptmo(this.getColumnProp(),e,o))},getColumnProp:function(){return this.column.props&&this.column.props.pt?this.column.props.pt:void 0},updateStickyPosition:function(){if(this.columnProp("frozen")){var e=this.columnProp("alignFrozen");if(e==="right"){var t=0,o=ue(this.$el,'[data-p-frozen-column="true"]');o&&(t=N(o)+parseFloat(o.style.right||0)),this.styleObject.insetInlineEnd=t+"px"}else{var l=0,r=pe(this.$el,'[data-p-frozen-column="true"]');r&&(l=N(r)+parseFloat(r.style.left||0)),this.styleObject.insetInlineStart=l+"px"}var d=this.$el.parentElement.nextElementSibling;if(d){var s=Ae(this.$el);d.children[s].style.left=this.styleObject.left,d.children[s].style.right=this.styleObject.right}}},onClick:function(e){this.$emit("column-click",{originalEvent:e,column:this.column})},onKeyDown:function(e){(e.code==="Enter"||e.code==="NumpadEnter"||e.code==="Space")&&e.currentTarget.nodeName==="TH"&&T(e.currentTarget,"data-p-sortable-column")&&(this.$emit("column-click",{originalEvent:e,column:this.column}),e.preventDefault())},onResizeStart:function(e){this.$emit("column-resizestart",e)},getMultiSortMetaIndex:function(){for(var e=-1,t=0;t<this.multiSortMeta.length;t++){var o=this.multiSortMeta[t];if(o.field===this.columnProp("field")||o.field===this.columnProp("sortField")){e=t;break}}return e},isMultiSorted:function(){return this.columnProp("sortable")&&this.getMultiSortMetaIndex()>-1},isColumnSorted:function(){return this.sortMode==="single"?this.sortField&&(this.sortField===this.columnProp("field")||this.sortField===this.columnProp("sortField")):this.isMultiSorted()}},computed:{containerClass:function(){return[this.columnProp("headerClass"),this.columnProp("class"),this.cx("headerCell")]},containerStyle:function(){var e=this.columnProp("headerStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]},sortState:function(){var e=!1,t=null;if(this.sortMode==="single")e=this.sortField&&(this.sortField===this.columnProp("field")||this.sortField===this.columnProp("sortField")),t=e?this.sortOrder:0;else if(this.sortMode==="multiple"){var o=this.getMultiSortMetaIndex();o>-1&&(e=!0,t=this.multiSortMeta[o].order)}return{sorted:e,sortOrder:t}},sortableColumnIcon:function(){var e=this.sortState,t=e.sorted,o=e.sortOrder;if(t){if(t&&o>0)return Pe;if(t&&o<0)return xe}else return Ce;return null},ariaSort:function(){if(this.columnProp("sortable")){var e=this.sortState,t=e.sorted,o=e.sortOrder;return t&&o<0?"descending":t&&o>0?"ascending":"none"}else return null}},components:{Badge:ft,SortAltIcon:Ce,SortAmountUpAltIcon:Pe,SortAmountDownIcon:xe}};function W(n){"@babel/helpers - typeof";return W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},W(n)}function Oe(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),t.push.apply(t,o)}return t}function Te(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Oe(Object(t),!0).forEach(function(o){Ft(n,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Oe(Object(t)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(t,o))})}return n}function Ft(n,e,t){return(e=Dt(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Dt(n){var e=At(n,"string");return W(e)=="symbol"?e:e+""}function At(n,e){if(W(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var o=t.call(n,e||"default");if(W(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Nt=["tabindex","aria-sort","data-p-sortable-column","data-p-resizable-column","data-p-sorted","data-p-frozen-column"];function Lt(n,e,t,o,l,r){var d=E("Badge");return i(),f("th",b({class:r.containerClass,style:[r.containerStyle],onClick:e[1]||(e[1]=function(){return r.onClick&&r.onClick.apply(r,arguments)}),onKeydown:e[2]||(e[2]=function(){return r.onKeyDown&&r.onKeyDown.apply(r,arguments)}),tabindex:r.columnProp("sortable")?"0":null,"aria-sort":r.ariaSort,role:"columnheader"},Te(Te({},r.getColumnPT("root")),r.getColumnPT("headerCell")),{"data-p-sortable-column":r.columnProp("sortable"),"data-p-resizable-column":t.resizableColumns,"data-p-sorted":r.isColumnSorted(),"data-p-frozen-column":r.columnProp("frozen")}),[t.resizableColumns&&!r.columnProp("frozen")?(i(),f("span",b({key:0,class:n.cx("columnResizer"),onMousedown:e[0]||(e[0]=function(){return r.onResizeStart&&r.onResizeStart.apply(r,arguments)})},r.getColumnPT("columnResizer")),null,16)):g("",!0),p("div",b({class:n.cx("columnHeaderContent")},r.getColumnPT("columnHeaderContent")),[t.column.children&&t.column.children.header?(i(),v(M(t.column.children.header),{key:0,column:t.column},null,8,["column"])):g("",!0),r.columnProp("header")?(i(),f("span",b({key:1,class:n.cx("columnTitle")},r.getColumnPT("columnTitle")),A(r.columnProp("header")),17)):g("",!0),r.columnProp("sortable")?(i(),f("span",Ne(b({key:2},r.getColumnPT("sort"))),[(i(),v(M(t.column.children&&t.column.children.sorticon||r.sortableColumnIcon),b({sorted:r.sortState.sorted,sortOrder:r.sortState.sortOrder,class:n.cx("sortIcon")},r.getColumnPT("sortIcon")),null,16,["sorted","sortOrder","class"]))],16)):g("",!0),r.isMultiSorted()?(i(),v(d,b({key:3,class:n.cx("pcSortBadge")},r.getColumnPT("pcSortBadge"),{value:r.getMultiSortMetaIndex()+1,size:"small"}),null,16,["class","value"])):g("",!0)],16)],16,Nt)}Be.render=Lt;var $e={name:"BodyCell",hostName:"TreeTable",extends:Q,emits:["node-toggle","checkbox-toggle"],props:{node:{type:Object,default:null},column:{type:Object,default:null},level:{type:Number,default:0},indentation:{type:Number,default:1},leaf:{type:Boolean,default:!1},expanded:{type:Boolean,default:!1},selectionMode:{type:String,default:null},checked:{type:Boolean,default:!1},partialChecked:{type:Boolean,default:!1},templates:{type:Object,default:null},index:{type:Number,default:null},loadingMode:{type:String,default:"mask"}},data:function(){return{styleObject:{}}},mounted:function(){this.columnProp("frozen")&&this.updateStickyPosition()},updated:function(){this.columnProp("frozen")&&this.updateStickyPosition()},methods:{toggle:function(){this.$emit("node-toggle",this.node)},columnProp:function(e){return J(this.column,e)},getColumnPT:function(e){var t,o={props:this.column.props,parent:{instance:this,props:this.$props,state:this.$data},context:{index:this.index,selectable:this.$parentInstance.rowHover||this.$parentInstance.rowSelectionMode,selected:this.$parent.selected,frozen:this.columnProp("frozen"),scrollable:this.$parentInstance.scrollable,showGridlines:this.$parentInstance.showGridlines,size:(t=this.$parentInstance)===null||t===void 0?void 0:t.size}};return b(this.ptm("column.".concat(e),{column:o}),this.ptm("column.".concat(e),o),this.ptmo(this.getColumnProp(),e,o))},getColumnProp:function(){return this.column.props&&this.column.props.pt?this.column.props.pt:void 0},getColumnCheckboxPT:function(e){var t={props:this.column.props,parent:{instance:this,props:this.$props,state:this.$data},context:{checked:this.checked,partialChecked:this.partialChecked}};return b(this.ptm("column.".concat(e),{column:t}),this.ptm("column.".concat(e),t),this.ptmo(this.getColumnProp(),e,t))},updateStickyPosition:function(){if(this.columnProp("frozen")){var e=this.columnProp("alignFrozen");if(e==="right"){var t=0,o=ue(this.$el,'[data-p-frozen-column="true"]');o&&(t=N(o)+parseFloat(o.style.right||0)),this.styleObject.insetInlineEnd=t+"px"}else{var l=0,r=pe(this.$el,'[data-p-frozen-column="true"]');r&&(l=N(r)+parseFloat(r.style.left||0)),this.styleObject.insetInlineStart=l+"px"}}},resolveFieldData:function(e,t){return F(e,t)},toggleCheckbox:function(){this.$emit("checkbox-toggle")}},computed:{containerClass:function(){return[this.columnProp("bodyClass"),this.columnProp("class"),this.cx("bodyCell")]},containerStyle:function(){var e=this.columnProp("bodyStyle"),t=this.columnProp("style");return this.columnProp("frozen")?[t,e,this.styleObject]:[t,e]},togglerStyle:function(){return{marginLeft:this.level*this.indentation+"rem",visibility:this.leaf?"hidden":"visible"}},checkboxSelectionMode:function(){return this.selectionMode==="checkbox"}},components:{Checkbox:mt,ChevronRightIcon:bt,ChevronDownIcon:ht,CheckIcon:qe,MinusIcon:gt,SpinnerIcon:He},directives:{ripple:Qe}};function V(n){"@babel/helpers - typeof";return V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(n)}function Ke(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),t.push.apply(t,o)}return t}function Ee(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ke(Object(t),!0).forEach(function(o){Ht(n,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Ke(Object(t)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(t,o))})}return n}function Ht(n,e,t){return(e=_t(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function _t(n){var e=Bt(n,"string");return V(e)=="symbol"?e:e+""}function Bt(n,e){if(V(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var o=t.call(n,e||"default");if(V(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var $t=["data-p-frozen-column"];function Ut(n,e,t,o,l,r){var d=E("SpinnerIcon"),s=E("Checkbox"),c=Je("ripple");return i(),f("td",b({style:r.containerStyle,class:r.containerClass,role:"cell"},Ee(Ee({},r.getColumnPT("root")),r.getColumnPT("bodyCell")),{"data-p-frozen-column":r.columnProp("frozen")}),[p("div",b({class:n.cx("bodyCellContent")},r.getColumnPT("bodyCellContent")),[r.columnProp("expander")?Le((i(),f("button",b({key:0,type:"button",class:n.cx("nodeToggleButton"),onClick:e[0]||(e[0]=function(){return r.toggle&&r.toggle.apply(r,arguments)}),style:r.togglerStyle,tabindex:"-1"},r.getColumnPT("nodeToggleButton"),{"data-pc-group-section":"rowactionbutton"}),[t.node.loading&&t.loadingMode==="icon"?(i(),f(z,{key:0},[t.templates.nodetoggleicon?(i(),v(M(t.templates.nodetoggleicon),{key:0})):g("",!0),t.templates.nodetogglericon?(i(),v(M(t.templates.nodetogglericon),{key:1})):(i(),v(d,b({key:2,spin:""},n.ptm("nodetoggleicon")),null,16))],64)):(i(),f(z,{key:1},[t.column.children&&t.column.children.rowtoggleicon?(i(),v(M(t.column.children.rowtoggleicon),{key:0,node:t.node,expanded:t.expanded,class:k(n.cx("nodeToggleIcon"))},null,8,["node","expanded","class"])):g("",!0),t.column.children&&t.column.children.rowtogglericon?(i(),v(M(t.column.children.rowtogglericon),{key:1,node:t.node,expanded:t.expanded,class:k(n.cx("nodeToggleIcon"))},null,8,["node","expanded","class"])):t.expanded?(i(),v(M(t.node.expandedIcon?"span":"ChevronDownIcon"),b({key:2,class:n.cx("nodeToggleIcon")},r.getColumnPT("nodeToggleIcon")),null,16,["class"])):(i(),v(M(t.node.collapsedIcon?"span":"ChevronRightIcon"),b({key:3,class:n.cx("nodeToggleIcon")},r.getColumnPT("nodeToggleIcon")),null,16,["class"]))],64))],16)),[[c]]):g("",!0),r.checkboxSelectionMode&&r.columnProp("expander")?(i(),v(s,{key:1,modelValue:t.checked,binary:!0,class:k(n.cx("pcNodeCheckbox")),disabled:t.node.selectable===!1,onChange:r.toggleCheckbox,tabindex:-1,indeterminate:t.partialChecked,unstyled:n.unstyled,pt:r.getColumnCheckboxPT("pcNodeCheckbox"),"data-p-partialchecked":t.partialChecked},{icon:C(function(u){return[t.templates.checkboxicon?(i(),v(M(t.templates.checkboxicon),{key:0,checked:u.checked,partialChecked:t.partialChecked,class:k(u.class)},null,8,["checked","partialChecked","class"])):g("",!0)]}),_:1},8,["modelValue","class","disabled","onChange","indeterminate","unstyled","pt","data-p-partialchecked"])):g("",!0),t.column.children&&t.column.children.body?(i(),v(M(t.column.children.body),{key:2,node:t.node,column:t.column},null,8,["node","column"])):(i(),f(z,{key:3},[ne(A(r.resolveFieldData(t.node.data,r.columnProp("field"))),1)],64))],16)],16,$t)}$e.render=Ut;function G(n){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(n)}function ie(n,e){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=Ue(n))||e){t&&(n=t);var o=0,l=function(){};return{s:l,n:function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}},e:function(u){throw u},f:l}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r,d=!0,s=!1;return{s:function(){t=t.call(n)},n:function(){var u=t.next();return d=u.done,u},e:function(u){s=!0,r=u},f:function(){try{d||t.return==null||t.return()}finally{if(s)throw r}}}}function je(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),t.push.apply(t,o)}return t}function se(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?je(Object(t),!0).forEach(function(o){Wt(n,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):je(Object(t)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(t,o))})}return n}function Wt(n,e,t){return(e=Vt(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Vt(n){var e=Gt(n,"string");return G(e)=="symbol"?e:e+""}function Gt(n,e){if(G(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var o=t.call(n,e||"default");if(G(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function Ie(n){return Qt(n)||qt(n)||Ue(n)||Xt()}function Xt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(n,e){if(n){if(typeof n=="string")return ce(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ce(n,e):void 0}}function qt(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function Qt(n){if(Array.isArray(n))return ce(n)}function ce(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,o=Array(e);t<e;t++)o[t]=n[t];return o}var We={name:"TreeTableRow",hostName:"TreeTable",extends:Q,emits:["node-click","node-toggle","checkbox-change","nodeClick","nodeToggle","checkboxChange","row-rightclick","rowRightclick"],props:{node:{type:null,default:null},dataKey:{type:[String,Function],default:"key"},parentNode:{type:null,default:null},columns:{type:null,default:null},expandedKeys:{type:null,default:null},selectionKeys:{type:null,default:null},selectionMode:{type:String,default:null},level:{type:Number,default:0},indentation:{type:Number,default:1},tabindex:{type:Number,default:-1},ariaSetSize:{type:Number,default:null},ariaPosInset:{type:Number,default:null},loadingMode:{type:String,default:"mask"},templates:{type:Object,default:null},contextMenu:{type:Boolean,default:!1},contextMenuSelection:{type:Object,default:null}},nodeTouched:!1,methods:{columnProp:function(e,t){return J(e,t)},toggle:function(){this.$emit("node-toggle",this.node)},onClick:function(e){be(e.target)||T(e.target,"data-pc-section")==="nodetogglebutton"||T(e.target,"data-pc-section")==="nodetoggleicon"||e.target.tagName==="path"||(this.setTabIndexForSelectionMode(e,this.nodeTouched),this.$emit("node-click",{originalEvent:e,nodeTouched:this.nodeTouched,node:this.node}),this.nodeTouched=!1)},onRowRightClick:function(e){this.$emit("row-rightclick",{originalEvent:e,node:this.node})},onTouchEnd:function(){this.nodeTouched=!0},nodeKey:function(e){return F(e,this.dataKey)},onKeyDown:function(e,t){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Enter":case"NumpadEnter":case"Space":be(e.target)||this.onEnterKey(e,t);break;case"Tab":this.onTabKey(e);break}},onArrowDownKey:function(e){var t=e.currentTarget.nextElementSibling;t&&this.focusRowChange(e.currentTarget,t),e.preventDefault()},onArrowUpKey:function(e){var t=e.currentTarget.previousElementSibling;t&&this.focusRowChange(e.currentTarget,t),e.preventDefault()},onArrowRightKey:function(e){var t=this,o=B(e.currentTarget,"button").style.visibility==="hidden",l=B(this.$refs.node,'[data-pc-section="nodetogglebutton"]');o||(!this.expanded&&l.click(),this.$nextTick(function(){t.onArrowDownKey(e)}),e.preventDefault())},onArrowLeftKey:function(e){if(!(this.level===0&&!this.expanded)){var t=e.currentTarget,o=B(t,"button").style.visibility==="hidden",l=B(t,'[data-pc-section="nodetogglebutton"]');if(this.expanded&&!o){l.click();return}var r=this.findBeforeClickableNode(t);r&&this.focusRowChange(t,r)}},onHomeKey:function(e){var t=B(e.currentTarget.parentElement,'tr[aria-level="'.concat(this.level+1,'"]'));t&&le(t),e.preventDefault()},onEndKey:function(e){var t=oe(e.currentTarget.parentElement,'tr[aria-level="'.concat(this.level+1,'"]')),o=t[t.length-1];le(o),e.preventDefault()},onEnterKey:function(e){if(e.preventDefault(),this.setTabIndexForSelectionMode(e,this.nodeTouched),this.selectionMode==="checkbox"){this.toggleCheckbox();return}this.$emit("node-click",{originalEvent:e,nodeTouched:this.nodeTouched,node:this.node}),this.nodeTouched=!1},onTabKey:function(){var e=Ie(oe(this.$refs.node.parentElement,"tr")),t=e.some(function(l){return T(l,"data-p-selected")||l.getAttribute("aria-checked")==="true"});if(e.forEach(function(l){l.tabIndex=-1}),t){var o=e.filter(function(l){return T(l,"data-p-selected")||l.getAttribute("aria-checked")==="true"});o[0].tabIndex=0;return}e[0].tabIndex=0},focusRowChange:function(e,t){e.tabIndex="-1",t.tabIndex="0",le(t)},findBeforeClickableNode:function(e){var t=e.previousElementSibling;if(t){var o=t.querySelector("button");return o&&o.style.visibility!=="hidden"?t:this.findBeforeClickableNode(t)}return null},toggleCheckbox:function(){var e=this.selectionKeys?se({},this.selectionKeys):{},t=!this.checked;this.propagateDown(this.node,t,e),this.$emit("checkbox-change",{node:this.node,check:t,selectionKeys:e})},propagateDown:function(e,t,o){if(t?o[this.nodeKey(e)]={checked:!0,partialChecked:!1}:delete o[this.nodeKey(e)],e.children&&e.children.length){var l=ie(e.children),r;try{for(l.s();!(r=l.n()).done;){var d=r.value;this.propagateDown(d,t,o)}}catch(s){l.e(s)}finally{l.f()}}},propagateUp:function(e){var t=e.check,o=se({},e.selectionKeys),l=0,r=!1,d=ie(this.node.children),s;try{for(d.s();!(s=d.n()).done;){var c=s.value;o[this.nodeKey(c)]&&o[this.nodeKey(c)].checked?l++:o[this.nodeKey(c)]&&o[this.nodeKey(c)].partialChecked&&(r=!0)}}catch(u){d.e(u)}finally{d.f()}t&&l===this.node.children.length?o[this.nodeKey(this.node)]={checked:!0,partialChecked:!1}:(t||delete o[this.nodeKey(this.node)],r||l>0&&l!==this.node.children.length?o[this.nodeKey(this.node)]={checked:!1,partialChecked:!0}:o[this.nodeKey(this.node)]={checked:!1,partialChecked:!1}),this.$emit("checkbox-change",{node:e.node,check:e.check,selectionKeys:o})},onCheckboxChange:function(e){var t=e.check,o=se({},e.selectionKeys),l=0,r=!1,d=ie(this.node.children),s;try{for(d.s();!(s=d.n()).done;){var c=s.value;o[this.nodeKey(c)]&&o[this.nodeKey(c)].checked?l++:o[this.nodeKey(c)]&&o[this.nodeKey(c)].partialChecked&&(r=!0)}}catch(u){d.e(u)}finally{d.f()}t&&l===this.node.children.length?o[this.nodeKey(this.node)]={checked:!0,partialChecked:!1}:(t||delete o[this.nodeKey(this.node)],r||l>0&&l!==this.node.children.length?o[this.nodeKey(this.node)]={checked:!1,partialChecked:!0}:o[this.nodeKey(this.node)]={checked:!1,partialChecked:!1}),this.$emit("checkbox-change",{node:e.node,check:e.check,selectionKeys:o})},setTabIndexForSelectionMode:function(e,t){if(this.selectionMode!==null){var o=Ie(oe(this.$refs.node.parentElement,"tr"));e.currentTarget.tabIndex=t===!1?-1:0,o.every(function(l){return l.tabIndex===-1})&&(o[0].tabIndex=0)}}},computed:{containerClass:function(){return[this.node.styleClass,this.cx("row")]},expanded:function(){return this.expandedKeys&&this.expandedKeys[this.nodeKey(this.node)]===!0},leaf:function(){return this.node.leaf===!1?!1:!(this.node.children&&this.node.children.length)},selected:function(){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(this.node)]===!0:!1},isSelectedWithContextMenu:function(){return this.node&&this.contextMenuSelection?Ye(this.node,this.contextMenuSelection,this.dataKey):!1},checked:function(){return this.selectionKeys?this.selectionKeys[this.nodeKey(this.node)]&&this.selectionKeys[this.nodeKey(this.node)].checked:!1},partialChecked:function(){return this.selectionKeys?this.selectionKeys[this.nodeKey(this.node)]&&this.selectionKeys[this.nodeKey(this.node)].partialChecked:!1},getAriaSelected:function(){return this.selectionMode==="single"||this.selectionMode==="multiple"?this.selected:null},ptmOptions:function(){return{context:{selectable:this.$parentInstance.rowHover||this.$parentInstance.rowSelectionMode,selected:this.selected,scrollable:this.$parentInstance.scrollable}}}},components:{TTBodyCell:$e}},Jt=["tabindex","aria-expanded","aria-level","aria-setsize","aria-posinset","aria-selected","aria-checked","data-p-selected","data-p-selected-contextmenu"];function Yt(n,e,t,o,l,r){var d=E("TTBodyCell"),s=E("TreeTableRow",!0);return i(),f(z,null,[p("tr",b({ref:"node",class:r.containerClass,style:t.node.style,tabindex:t.tabindex,role:"row","aria-expanded":t.node.children&&t.node.children.length?r.expanded:void 0,"aria-level":t.level+1,"aria-setsize":t.ariaSetSize,"aria-posinset":t.ariaPosInset,"aria-selected":r.getAriaSelected,"aria-checked":r.checked||void 0,onClick:e[1]||(e[1]=function(){return r.onClick&&r.onClick.apply(r,arguments)}),onKeydown:e[2]||(e[2]=function(){return r.onKeyDown&&r.onKeyDown.apply(r,arguments)}),onTouchend:e[3]||(e[3]=function(){return r.onTouchEnd&&r.onTouchEnd.apply(r,arguments)}),onContextmenu:e[4]||(e[4]=function(){return r.onRowRightClick&&r.onRowRightClick.apply(r,arguments)})},n.ptm("row",r.ptmOptions),{"data-p-selected":r.selected,"data-p-selected-contextmenu":t.contextMenuSelection&&r.isSelectedWithContextMenu}),[(i(!0),f(z,null,j(t.columns,function(c,u){return i(),f(z,{key:r.columnProp(c,"columnKey")||r.columnProp(c,"field")||u},[r.columnProp(c,"hidden")?g("",!0):(i(),v(d,{key:0,column:c,node:t.node,level:t.level,leaf:r.leaf,indentation:t.indentation,expanded:r.expanded,selectionMode:t.selectionMode,checked:r.checked,partialChecked:r.partialChecked,templates:t.templates,onNodeToggle:e[0]||(e[0]=function(a){return n.$emit("node-toggle",a)}),onCheckboxToggle:r.toggleCheckbox,index:u,loadingMode:t.loadingMode,unstyled:n.unstyled,pt:n.pt},null,8,["column","node","level","leaf","indentation","expanded","selectionMode","checked","partialChecked","templates","onCheckboxToggle","index","loadingMode","unstyled","pt"]))],64)}),128))],16,Jt),r.expanded&&t.node.children&&t.node.children.length?(i(!0),f(z,{key:0},j(t.node.children,function(c){return i(),v(s,{key:r.nodeKey(c),dataKey:t.dataKey,columns:t.columns,node:c,parentNode:t.node,level:t.level+1,expandedKeys:t.expandedKeys,selectionMode:t.selectionMode,selectionKeys:t.selectionKeys,contextMenu:t.contextMenu,contextMenuSelection:t.contextMenuSelection,indentation:t.indentation,ariaPosInset:t.node.children.indexOf(c)+1,ariaSetSize:t.node.children.length,templates:t.templates,onNodeToggle:e[5]||(e[5]=function(u){return n.$emit("node-toggle",u)}),onNodeClick:e[6]||(e[6]=function(u){return n.$emit("node-click",u)}),onRowRightclick:e[7]||(e[7]=function(u){return n.$emit("row-rightclick",u)}),onCheckboxChange:r.onCheckboxChange,unstyled:n.unstyled,pt:n.pt},null,8,["dataKey","columns","node","parentNode","level","expandedKeys","selectionMode","selectionKeys","contextMenu","contextMenuSelection","indentation","ariaPosInset","ariaSetSize","templates","onCheckboxChange","unstyled","pt"])}),128)):g("",!0)],64)}We.render=Yt;function X(n){"@babel/helpers - typeof";return X=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(n)}function te(n,e){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=Ve(n))||e){t&&(n=t);var o=0,l=function(){};return{s:l,n:function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}},e:function(u){throw u},f:l}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r,d=!0,s=!1;return{s:function(){t=t.call(n)},n:function(){var u=t.next();return d=u.done,u},e:function(u){s=!0,r=u},f:function(){try{d||t.return==null||t.return()}finally{if(s)throw r}}}}function Re(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),t.push.apply(t,o)}return t}function R(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Re(Object(t),!0).forEach(function(o){Zt(n,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Re(Object(t)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(t,o))})}return n}function Zt(n,e,t){return(e=en(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function en(n){var e=tn(n,"string");return X(e)=="symbol"?e:e+""}function tn(n,e){if(X(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var o=t.call(n,e||"default");if(X(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function $(n){return rn(n)||on(n)||Ve(n)||nn()}function nn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ve(n,e){if(n){if(typeof n=="string")return de(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?de(n,e):void 0}}function on(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function rn(n){if(Array.isArray(n))return de(n)}function de(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,o=Array(e);t<e;t++)o[t]=n[t];return o}var Ge={name:"TreeTable",extends:Tt,inheritAttrs:!1,emits:["node-expand","node-collapse","update:expandedKeys","update:selectionKeys","node-select","node-unselect","update:first","update:rows","page","update:sortField","update:sortOrder","update:multiSortMeta","sort","filter","column-resize-end","update:contextMenuSelection","row-contextmenu"],provide:function(){return{$columns:this.d_columns}},data:function(){return{d_expandedKeys:this.expandedKeys||{},d_first:this.first,d_rows:this.rows,d_sortField:this.sortField,d_sortOrder:this.sortOrder,d_multiSortMeta:this.multiSortMeta?$(this.multiSortMeta):[],hasASelectedNode:!1,d_columns:new dt({type:"Column"})}},documentColumnResizeListener:null,documentColumnResizeEndListener:null,lastResizeHelperX:null,resizeColumnElement:null,watch:{expandedKeys:function(e){this.d_expandedKeys=e},first:function(e){this.d_first=e},rows:function(e){this.d_rows=e},sortField:function(e){this.d_sortField=e},sortOrder:function(e){this.d_sortOrder=e},multiSortMeta:function(e){this.d_multiSortMeta=e}},beforeUnmount:function(){this.destroyStyleElement(),this.d_columns.clear()},methods:{columnProp:function(e,t){return J(e,t)},ptHeaderCellOptions:function(e){return{context:{frozen:this.columnProp(e,"frozen")}}},onNodeToggle:function(e){var t=this.nodeKey(e);this.d_expandedKeys[t]?(delete this.d_expandedKeys[t],this.$emit("node-collapse",e)):(this.d_expandedKeys[t]=!0,this.$emit("node-expand",e)),this.d_expandedKeys=R({},this.d_expandedKeys),this.$emit("update:expandedKeys",this.d_expandedKeys)},onNodeClick:function(e){if(this.rowSelectionMode&&e.node.selectable!==!1){var t=e.nodeTouched?!1:this.metaKeySelection,o=t?this.handleSelectionWithMetaKey(e):this.handleSelectionWithoutMetaKey(e);this.$emit("update:selectionKeys",o)}},nodeKey:function(e){return F(e,this.dataKey)},handleSelectionWithMetaKey:function(e){var t=e.originalEvent,o=e.node,l=this.nodeKey(o),r=t.metaKey||t.ctrlKey,d=this.isNodeSelected(o),s;return d&&r?(this.isSingleSelectionMode()?s={}:(s=R({},this.selectionKeys),delete s[l]),this.$emit("node-unselect",o)):(this.isSingleSelectionMode()?s={}:this.isMultipleSelectionMode()&&(s=r?this.selectionKeys?R({},this.selectionKeys):{}:{}),s[l]=!0,this.$emit("node-select",o)),s},handleSelectionWithoutMetaKey:function(e){var t=e.node,o=this.nodeKey(t),l=this.isNodeSelected(t),r;return this.isSingleSelectionMode()?l?(r={},this.$emit("node-unselect",t)):(r={},r[o]=!0,this.$emit("node-select",t)):l?(r=R({},this.selectionKeys),delete r[o],this.$emit("node-unselect",t)):(r=this.selectionKeys?R({},this.selectionKeys):{},r[o]=!0,this.$emit("node-select",t)),r},onCheckboxChange:function(e){this.$emit("update:selectionKeys",e.selectionKeys),e.check?this.$emit("node-select",e.node):this.$emit("node-unselect",e.node)},onRowRightClick:function(e){this.contextMenu&&(me(),e.originalEvent.target.focus()),this.$emit("update:contextMenuSelection",e.node),this.$emit("row-contextmenu",e)},isSingleSelectionMode:function(){return this.selectionMode==="single"},isMultipleSelectionMode:function(){return this.selectionMode==="multiple"},onPage:function(e){this.d_first=e.first,this.d_rows=e.rows;var t=this.createLazyLoadEvent(e);t.pageCount=e.pageCount,t.page=e.page,this.d_expandedKeys={},this.$emit("update:expandedKeys",this.d_expandedKeys),this.$emit("update:first",this.d_first),this.$emit("update:rows",this.d_rows),this.$emit("page",t)},resetPage:function(){this.d_first=0,this.$emit("update:first",this.d_first)},getFilterColumnHeaderClass:function(e){return[this.cx("headerCell",{column:e}),this.columnProp(e,"filterHeaderClass")]},onColumnHeaderClick:function(e){var t=e.originalEvent,o=e.column;if(this.columnProp(o,"sortable")){var l=t.target,r=this.columnProp(o,"sortField")||this.columnProp(o,"field");if(T(l,"data-p-sortable-column")===!0||T(l,"data-pc-section")==="columntitle"||T(l,"data-pc-section")==="columnheadercontent"||T(l,"data-pc-section")==="sorticon"||T(l.parentElement,"data-pc-section")==="sorticon"||T(l.parentElement.parentElement,"data-pc-section")==="sorticon"||l.closest('[data-p-sortable-column="true"]')){if(me(),this.sortMode==="single")this.d_sortField===r?this.removableSort&&this.d_sortOrder*-1===this.defaultSortOrder?(this.d_sortOrder=null,this.d_sortField=null):this.d_sortOrder=this.d_sortOrder*-1:(this.d_sortOrder=this.defaultSortOrder,this.d_sortField=r),this.$emit("update:sortField",this.d_sortField),this.$emit("update:sortOrder",this.d_sortOrder),this.resetPage();else if(this.sortMode==="multiple"){var d=t.metaKey||t.ctrlKey;d||(this.d_multiSortMeta=this.d_multiSortMeta.filter(function(s){return s.field===r})),this.addMultiSortField(r),this.$emit("update:multiSortMeta",this.d_multiSortMeta)}this.$emit("sort",this.createLazyLoadEvent(t))}}},addMultiSortField:function(e){var t=this.d_multiSortMeta.findIndex(function(o){return o.field===e});t>=0?this.removableSort&&this.d_multiSortMeta[t].order*-1===this.defaultSortOrder?this.d_multiSortMeta.splice(t,1):this.d_multiSortMeta[t]={field:e,order:this.d_multiSortMeta[t].order*-1}:this.d_multiSortMeta.push({field:e,order:this.defaultSortOrder}),this.d_multiSortMeta=$(this.d_multiSortMeta)},sortSingle:function(e){return this.sortNodesSingle(e)},sortNodesSingle:function(e){var t=this,o=$(e),l=ge();return o.sort(function(r,d){var s=F(r.data,t.d_sortField),c=F(d.data,t.d_sortField);return ye(s,c,t.d_sortOrder,l)}),o},sortMultiple:function(e){return this.sortNodesMultiple(e)},sortNodesMultiple:function(e){var t=this,o=$(e);return o.sort(function(l,r){return t.multisortField(l,r,0)}),o},multisortField:function(e,t,o){var l=F(e.data,this.d_multiSortMeta[o].field),r=F(t.data,this.d_multiSortMeta[o].field),d=ge();return l===r?this.d_multiSortMeta.length-1>o?this.multisortField(e,t,o+1):0:ye(l,r,this.d_multiSortMeta[o].order,d)},filter:function(e){var t=[],o=this.filterMode==="strict",l=te(e),r;try{for(l.s();!(r=l.n()).done;){for(var d=r.value,s=R({},d),c=!0,u=!1,a=0;a<this.columns.length;a++){var P=this.columns[a],O=this.columnProp(P,"filterField")||this.columnProp(P,"field");if(Object.prototype.hasOwnProperty.call(this.filters,O)){var Y=this.columnProp(P,"filterMatchMode")||"startsWith",re=this.filters[O],Z=ve.filters[Y],L={filterField:O,filterValue:re,filterConstraint:Z,strict:o};if((o&&!(this.findFilteredNodes(s,L)||this.isFilterMatched(s,L))||!o&&!(this.isFilterMatched(s,L)||this.findFilteredNodes(s,L)))&&(c=!1),!c)break}if(this.hasGlobalFilter()&&!u){var m=R({},s),w=this.filters.global,x=ve.filters.contains,h={filterField:O,filterValue:w,filterConstraint:x,strict:o};(o&&(this.findFilteredNodes(m,h)||this.isFilterMatched(m,h))||!o&&(this.isFilterMatched(m,h)||this.findFilteredNodes(m,h)))&&(u=!0,s=m)}}var S=c;this.hasGlobalFilter()&&(S=c&&u),S&&t.push(s)}}catch(H){l.e(H)}finally{l.f()}var D=this.createLazyLoadEvent(event);return D.filteredValue=t,this.$emit("filter",D),t},findFilteredNodes:function(e,t){if(e){var o=!1;if(e.children){var l=$(e.children);e.children=[];var r=te(l),d;try{for(r.s();!(d=r.n()).done;){var s=d.value,c=R({},s);this.isFilterMatched(c,t)&&(o=!0,e.children.push(c))}}catch(u){r.e(u)}finally{r.f()}}if(o)return!0}},isFilterMatched:function(e,t){var o=t.filterField,l=t.filterValue,r=t.filterConstraint,d=t.strict,s=!1,c=F(e.data,o);return r(c,l,this.filterLocale)&&(s=!0),(!s||d&&!this.isNodeLeaf(e))&&(s=this.findFilteredNodes(e,{filterField:o,filterValue:l,filterConstraint:r,strict:d})||s),s},isNodeSelected:function(e){return this.selectionMode&&this.selectionKeys?this.selectionKeys[this.nodeKey(e)]===!0:!1},isNodeLeaf:function(e){return e.leaf===!1?!1:!(e.children&&e.children.length)},createLazyLoadEvent:function(e){var t=this,o;return this.hasFilters()&&(o={},this.columns.forEach(function(l){t.columnProp(l,"field")&&(o[l.props.field]=t.columnProp(l,"filterMatchMode"))})),{originalEvent:e,first:this.d_first,rows:this.d_rows,sortField:this.d_sortField,sortOrder:this.d_sortOrder,multiSortMeta:this.d_multiSortMeta,filters:this.filters,filterMatchModes:o}},onColumnResizeStart:function(e){var t=ke(this.$el).left;this.resizeColumnElement=e.target.parentElement,this.columnResizing=!0,this.lastResizeHelperX=e.pageX-t+this.$el.scrollLeft,this.bindColumnResizeEvents()},onColumnResize:function(e){var t=ke(this.$el).left;this.$el.setAttribute("data-p-unselectable-text","true"),!this.isUnstyled&&Ze(this.$el,{"user-select":"none"}),this.$refs.resizeHelper.style.height=this.$el.offsetHeight+"px",this.$refs.resizeHelper.style.top="0px",this.$refs.resizeHelper.style.left=e.pageX-t+this.$el.scrollLeft+"px",this.$refs.resizeHelper.style.display="block"},onColumnResizeEnd:function(){var e=et(this.$el)?this.lastResizeHelperX-this.$refs.resizeHelper.offsetLeft:this.$refs.resizeHelper.offsetLeft-this.lastResizeHelperX,t=this.resizeColumnElement.offsetWidth,o=t+e,l=this.resizeColumnElement.style.minWidth||15;if(t+e>parseInt(l,10)){if(this.columnResizeMode==="fit"){var r=this.resizeColumnElement.nextElementSibling,d=r.offsetWidth-e;o>15&&d>15&&this.resizeTableCells(o,d)}else if(this.columnResizeMode==="expand"){var s=this.$refs.table.offsetWidth+e+"px",c=function(a){a&&(a.style.width=a.style.minWidth=s)};this.resizeTableCells(o),c(this.$refs.table)}this.$emit("column-resize-end",{element:this.resizeColumnElement,delta:e})}this.$refs.resizeHelper.style.display="none",this.resizeColumn=null,this.$el.removeAttribute("data-p-unselectable-text"),!this.isUnstyled&&(this.$el.style["user-select"]=""),this.unbindColumnResizeEvents()},resizeTableCells:function(e,t){var o=Ae(this.resizeColumnElement),l=[],r=oe(this.$refs.table,'thead[data-pc-section="thead"] > tr > th');r.forEach(function(c){return l.push(N(c))}),this.destroyStyleElement(),this.createStyleElement();var d="",s='[data-pc-name="treetable"]['.concat(this.$attrSelector,'] > [data-pc-section="tablecontainer"] > table[data-pc-section="table"]');l.forEach(function(c,u){var a=u===o?e:t&&u===o+1?t:c,P="width: ".concat(a,"px !important; max-width: ").concat(a,"px !important");d+=`
                    `.concat(s,' > thead[data-pc-section="thead"] > tr > th:nth-child(').concat(u+1,`),
                    `).concat(s,' > tbody[data-pc-section="tbody"] > tr > td:nth-child(').concat(u+1,`),
                    `).concat(s,' > tfoot[data-pc-section="tfoot"] > tr > td:nth-child(').concat(u+1,`) {
                        `).concat(P,`
                    }
                `)}),this.styleElement.innerHTML=d},bindColumnResizeEvents:function(){var e=this;this.documentColumnResizeListener||(this.documentColumnResizeListener=document.addEventListener("mousemove",function(t){e.columnResizing&&e.onColumnResize(t)})),this.documentColumnResizeEndListener||(this.documentColumnResizeEndListener=document.addEventListener("mouseup",function(){e.columnResizing&&(e.columnResizing=!1,e.onColumnResizeEnd())}))},unbindColumnResizeEvents:function(){this.documentColumnResizeListener&&(document.removeEventListener("document",this.documentColumnResizeListener),this.documentColumnResizeListener=null),this.documentColumnResizeEndListener&&(document.removeEventListener("document",this.documentColumnResizeEndListener),this.documentColumnResizeEndListener=null)},onColumnKeyDown:function(e,t){(e.code==="Enter"||e.code==="NumpadEnter")&&e.currentTarget.nodeName==="TH"&&T(e.currentTarget,"data-p-sortable-column")&&this.onColumnHeaderClick(e,t)},hasColumnFilter:function(){if(this.columns){var e=te(this.columns),t;try{for(e.s();!(t=e.n()).done;){var o=t.value;if(o.children&&o.children.filter)return!0}}catch(l){e.e(l)}finally{e.f()}}return!1},hasFilters:function(){return this.filters&&Object.keys(this.filters).length>0&&this.filters.constructor===Object},hasGlobalFilter:function(){return this.filters&&Object.prototype.hasOwnProperty.call(this.filters,"global")},getItemLabel:function(e){return e.data.name},createStyleElement:function(){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",tt(this.styleElement,"nonce",(e=this.$primevue)===null||e===void 0||(e=e.config)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce),document.head.appendChild(this.styleElement)},destroyStyleElement:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},setTabindex:function(e,t){if(this.isNodeSelected(e))return this.hasASelectedNode=!0,0;if(this.selectionMode){if(!this.isNodeSelected(e)&&t===0&&!this.hasASelectedNode)return 0}else if(!this.selectionMode&&t===0)return 0;return-1}},computed:{columns:function(){return this.d_columns.get(this)},processedData:function(){if(this.lazy)return this.value;if(this.value&&this.value.length){var e=this.value;return this.sorted&&(this.sortMode==="single"?e=this.sortSingle(e):this.sortMode==="multiple"&&(e=this.sortMultiple(e))),this.hasFilters()&&(e=this.filter(e)),e}else return null},dataToRender:function(){var e=this.processedData;if(this.paginator){var t=this.lazy?0:this.d_first;return e.slice(t,t+this.d_rows)}else return e},empty:function(){var e=this.processedData;return!e||e.length===0},sorted:function(){return this.d_sortField||this.d_multiSortMeta&&this.d_multiSortMeta.length>0},hasFooter:function(){var e=!1,t=te(this.columns),o;try{for(t.s();!(o=t.n()).done;){var l=o.value;if(this.columnProp(l,"footer")||l.children&&l.children.footer){e=!0;break}}}catch(r){t.e(r)}finally{t.f()}return e},paginatorTop:function(){return this.paginator&&(this.paginatorPosition!=="bottom"||this.paginatorPosition==="both")},paginatorBottom:function(){return this.paginator&&(this.paginatorPosition!=="top"||this.paginatorPosition==="both")},singleSelectionMode:function(){return this.selectionMode&&this.selectionMode==="single"},multipleSelectionMode:function(){return this.selectionMode&&this.selectionMode==="multiple"},rowSelectionMode:function(){return this.singleSelectionMode||this.multipleSelectionMode},totalRecordsLength:function(){if(this.lazy)return this.totalRecords;var e=this.processedData;return e?e.length:0}},components:{TTRow:We,TTPaginator:ut,TTHeaderCell:Be,TTFooterCell:_e,SpinnerIcon:He}};function q(n){"@babel/helpers - typeof";return q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(n)}function Fe(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(n,l).enumerable})),t.push.apply(t,o)}return t}function De(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Fe(Object(t),!0).forEach(function(o){ln(n,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Fe(Object(t)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(t,o))})}return n}function ln(n,e,t){return(e=an(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function an(n){var e=sn(n,"string");return q(e)=="symbol"?e:e+""}function sn(n,e){if(q(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var o=t.call(n,e||"default");if(q(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var cn=["colspan"];function dn(n,e,t,o,l,r){var d=E("TTPaginator"),s=E("TTHeaderCell"),c=E("TTRow"),u=E("TTFooterCell");return i(),f("div",b({class:n.cx("root"),"data-scrollselectors":".p-treetable-scrollable-body"},n.ptmi("root")),[y(n.$slots,"default"),n.loading&&n.loadingMode==="mask"?(i(),f("div",b({key:0,class:n.cx("loading")},n.ptm("loading")),[p("div",b({class:n.cx("mask")},n.ptm("mask")),[y(n.$slots,"loadingicon",{class:k(n.cx("loadingIcon"))},function(){return[(i(),v(M(n.loadingIcon?"span":"SpinnerIcon"),b({spin:"",class:[n.cx("loadingIcon"),n.loadingIcon]},n.ptm("loadingIcon")),null,16,["class"]))]})],16)],16)):g("",!0),n.$slots.header?(i(),f("div",b({key:1,class:n.cx("header")},n.ptm("header")),[y(n.$slots,"header")],16)):g("",!0),r.paginatorTop?(i(),v(d,{key:2,rows:l.d_rows,first:l.d_first,totalRecords:r.totalRecordsLength,pageLinkSize:n.pageLinkSize,template:n.paginatorTemplate,rowsPerPageOptions:n.rowsPerPageOptions,currentPageReportTemplate:n.currentPageReportTemplate,class:k(n.cx("pcPaginator",{position:"top"})),onPage:e[0]||(e[0]=function(a){return r.onPage(a)}),alwaysShow:n.alwaysShowPaginator,unstyled:n.unstyled,pt:n.ptm("pcPaginator")},we({_:2},[n.$slots.paginatorcontainer?{name:"container",fn:C(function(a){return[y(n.$slots,"paginatorcontainer",{first:a.first,last:a.last,rows:a.rows,page:a.page,pageCount:a.pageCount,totalRecords:a.totalRecords,firstPageCallback:a.firstPageCallback,lastPageCallback:a.lastPageCallback,prevPageCallback:a.prevPageCallback,nextPageCallback:a.nextPageCallback,rowChangeCallback:a.rowChangeCallback})]}),key:"0"}:void 0,n.$slots.paginatorstart?{name:"start",fn:C(function(){return[y(n.$slots,"paginatorstart")]}),key:"1"}:void 0,n.$slots.paginatorend?{name:"end",fn:C(function(){return[y(n.$slots,"paginatorend")]}),key:"2"}:void 0,n.$slots.paginatorfirstpagelinkicon?{name:"firstpagelinkicon",fn:C(function(a){return[y(n.$slots,"paginatorfirstpagelinkicon",{class:k(a.class)})]}),key:"3"}:void 0,n.$slots.paginatorprevpagelinkicon?{name:"prevpagelinkicon",fn:C(function(a){return[y(n.$slots,"paginatorprevpagelinkicon",{class:k(a.class)})]}),key:"4"}:void 0,n.$slots.paginatornextpagelinkicon?{name:"nextpagelinkicon",fn:C(function(a){return[y(n.$slots,"paginatornextpagelinkicon",{class:k(a.class)})]}),key:"5"}:void 0,n.$slots.paginatorlastpagelinkicon?{name:"lastpagelinkicon",fn:C(function(a){return[y(n.$slots,"paginatorlastpagelinkicon",{class:k(a.class)})]}),key:"6"}:void 0,n.$slots.paginatorjumptopagedropdownicon?{name:"jumptopagedropdownicon",fn:C(function(a){return[y(n.$slots,"paginatorjumptopagedropdownicon",{class:k(a.class)})]}),key:"7"}:void 0,n.$slots.paginatorrowsperpagedropdownicon?{name:"rowsperpagedropdownicon",fn:C(function(a){return[y(n.$slots,"paginatorrowsperpagedropdownicon",{class:k(a.class)})]}),key:"8"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):g("",!0),p("div",b({class:n.cx("tableContainer"),style:[n.sx("tableContainer"),{maxHeight:n.scrollHeight}]},n.ptm("tableContainer")),[p("table",b({ref:"table",role:"table",class:[n.cx("table"),n.tableClass],style:n.tableStyle},De(De({},n.tableProps),n.ptm("table"))),[p("thead",b({class:n.cx("thead"),style:n.sx("thead"),role:"rowgroup"},n.ptm("thead")),[p("tr",b({role:"row"},n.ptm("headerRow")),[(i(!0),f(z,null,j(r.columns,function(a,P){return i(),f(z,{key:r.columnProp(a,"columnKey")||r.columnProp(a,"field")||P},[r.columnProp(a,"hidden")?g("",!0):(i(),v(s,{key:0,column:a,resizableColumns:n.resizableColumns,sortField:l.d_sortField,sortOrder:l.d_sortOrder,multiSortMeta:l.d_multiSortMeta,sortMode:n.sortMode,onColumnClick:e[1]||(e[1]=function(O){return r.onColumnHeaderClick(O)}),onColumnResizestart:e[2]||(e[2]=function(O){return r.onColumnResizeStart(O)}),index:P,unstyled:n.unstyled,pt:n.pt},null,8,["column","resizableColumns","sortField","sortOrder","multiSortMeta","sortMode","index","unstyled","pt"]))],64)}),128))],16),r.hasColumnFilter()?(i(),f("tr",Ne(b({key:0},n.ptm("headerRow"))),[(i(!0),f(z,null,j(r.columns,function(a,P){return i(),f(z,{key:r.columnProp(a,"columnKey")||r.columnProp(a,"field")||P},[r.columnProp(a,"hidden")?g("",!0):(i(),f("th",b({key:0,class:r.getFilterColumnHeaderClass(a),style:[r.columnProp(a,"style"),r.columnProp(a,"filterHeaderStyle")],ref_for:!0},n.ptm("headerCell",r.ptHeaderCellOptions(a))),[a.children&&a.children.filter?(i(),v(M(a.children.filter),{key:0,column:a,index:P},null,8,["column","index"])):g("",!0)],16))],64)}),128))],16)):g("",!0)],16),p("tbody",b({class:n.cx("tbody"),role:"rowgroup"},n.ptm("tbody")),[r.empty?(i(),f("tr",b({key:1,class:n.cx("emptyMessage")},n.ptm("emptyMessage")),[p("td",b({colspan:r.columns.length},n.ptm("emptyMessageCell")),[y(n.$slots,"empty")],16,cn)],16)):(i(!0),f(z,{key:0},j(r.dataToRender,function(a,P){return i(),v(c,{key:r.nodeKey(a),dataKey:n.dataKey,columns:r.columns,node:a,level:0,expandedKeys:l.d_expandedKeys,indentation:n.indentation,selectionMode:n.selectionMode,selectionKeys:n.selectionKeys,ariaSetSize:r.dataToRender.length,ariaPosInset:P+1,tabindex:r.setTabindex(a,P),loadingMode:n.loadingMode,contextMenu:n.contextMenu,contextMenuSelection:n.contextMenuSelection,templates:n.$slots,onNodeToggle:r.onNodeToggle,onNodeClick:r.onNodeClick,onCheckboxChange:r.onCheckboxChange,onRowRightclick:e[3]||(e[3]=function(O){return r.onRowRightClick(O)}),unstyled:n.unstyled,pt:n.pt},null,8,["dataKey","columns","node","expandedKeys","indentation","selectionMode","selectionKeys","ariaSetSize","ariaPosInset","tabindex","loadingMode","contextMenu","contextMenuSelection","templates","onNodeToggle","onNodeClick","onCheckboxChange","unstyled","pt"])}),128))],16),r.hasFooter?(i(),f("tfoot",b({key:0,class:n.cx("tfoot"),style:n.sx("tfoot"),role:"rowgroup"},n.ptm("tfoot")),[p("tr",b({role:"row"},n.ptm("footerRow")),[(i(!0),f(z,null,j(r.columns,function(a,P){return i(),f(z,{key:r.columnProp(a,"columnKey")||r.columnProp(a,"field")||P},[r.columnProp(a,"hidden")?g("",!0):(i(),v(u,{key:0,column:a,index:P,unstyled:n.unstyled,pt:n.pt},null,8,["column","index","unstyled","pt"]))],64)}),128))],16)],16)):g("",!0)],16)],16),r.paginatorBottom?(i(),v(d,{key:3,rows:l.d_rows,first:l.d_first,totalRecords:r.totalRecordsLength,pageLinkSize:n.pageLinkSize,template:n.paginatorTemplate,rowsPerPageOptions:n.rowsPerPageOptions,currentPageReportTemplate:n.currentPageReportTemplate,class:k(n.cx("pcPaginator",{position:"bottom"})),onPage:e[4]||(e[4]=function(a){return r.onPage(a)}),alwaysShow:n.alwaysShowPaginator,unstyled:n.unstyled,pt:n.ptm("pcPaginator")},we({_:2},[n.$slots.paginatorcontainer?{name:"container",fn:C(function(a){return[y(n.$slots,"paginatorcontainer",{first:a.first,last:a.last,rows:a.rows,page:a.page,pageCount:a.pageCount,totalRecords:a.totalRecords,firstPageCallback:a.firstPageCallback,lastPageCallback:a.lastPageCallback,prevPageCallback:a.prevPageCallback,nextPageCallback:a.nextPageCallback,rowChangeCallback:a.rowChangeCallback})]}),key:"0"}:void 0,n.$slots.paginatorstart?{name:"start",fn:C(function(){return[y(n.$slots,"paginatorstart")]}),key:"1"}:void 0,n.$slots.paginatorend?{name:"end",fn:C(function(){return[y(n.$slots,"paginatorend")]}),key:"2"}:void 0,n.$slots.paginatorfirstpagelinkicon?{name:"firstpagelinkicon",fn:C(function(a){return[y(n.$slots,"paginatorfirstpagelinkicon",{class:k(a.class)})]}),key:"3"}:void 0,n.$slots.paginatorprevpagelinkicon?{name:"prevpagelinkicon",fn:C(function(a){return[y(n.$slots,"paginatorprevpagelinkicon",{class:k(a.class)})]}),key:"4"}:void 0,n.$slots.paginatornextpagelinkicon?{name:"nextpagelinkicon",fn:C(function(a){return[y(n.$slots,"paginatornextpagelinkicon",{class:k(a.class)})]}),key:"5"}:void 0,n.$slots.paginatorlastpagelinkicon?{name:"lastpagelinkicon",fn:C(function(a){return[y(n.$slots,"paginatorlastpagelinkicon",{class:k(a.class)})]}),key:"6"}:void 0,n.$slots.paginatorjumptopagedropdownicon?{name:"jumptopagedropdownicon",fn:C(function(a){return[y(n.$slots,"paginatorjumptopagedropdownicon",{class:k(a.class)})]}),key:"7"}:void 0,n.$slots.paginatorrowsperpagedropdownicon?{name:"rowsperpagedropdownicon",fn:C(function(a){return[y(n.$slots,"paginatorrowsperpagedropdownicon",{class:k(a.class)})]}),key:"8"}:void 0]),1032,["rows","first","totalRecords","pageLinkSize","template","rowsPerPageOptions","currentPageReportTemplate","class","alwaysShow","unstyled","pt"])):g("",!0),n.$slots.footer?(i(),f("div",b({key:4,class:n.cx("footer")},n.ptm("footer")),[y(n.$slots,"footer")],16)):g("",!0),p("div",b({ref:"resizeHelper",class:n.cx("columnResizeIndicator"),style:{display:"none"}},n.ptm("columnResizeIndicator")),null,16)],16)}Ge.render=dn;const un={class:"flex flex-col h-screen"},pn={class:"flex flex-grow p-4"},fn={class:"flex w-full space-x-4"},hn={class:"w-1/2 bg-white shadow-md p-4 rounded-lg overflow-auto max-h-screen"},bn={class:"w-1/2 bg-white shadow-md rounded-lg p-4 flex flex-col items-center"},mn={class:"flex flex-row items-center text-center w-full"},gn={class:"flex justify-center items-center"},yn={class:"flex space-x-4 mt-4 mb-4"},vn={key:0,class:"flex flex-col mt-6"},kn=["value"],wn={class:"border-2 border-black p-6 w-full h-full"},Sn={class:"flex items-center"},Cn=["onUpdate:modelValue","onChange"],Pn={class:"flex space-x-2"},xn={class:"text-blue-500"},zn={class:"text-black"},Mn={key:0},On={class:"flex items-center"},Tn={class:"flex space-x-2"},Kn={class:"text-blue-500"},En={class:"text-black"},jn={class:"flex items-center"},In={class:"flex space-x-2"},Rn={class:"text-blue-500"},Fn={class:"text-black"},Dn=nt({__name:"index",setup(n){yt([vt,kt,wt,St]);const e=ot(),t=K([]),o=K([]),l=K([]),r=K([]),d=K([]),s=K([]),c=K([]),u=K("parametros"),a=K("TBI");rt(()=>{Y(),Z(),L()});const P=lt(()=>{const m=[];for(const w of r.value)w.fase===a.value&&m.push(w);return m}),O=K({tooltip:{trigger:"item"},series:[{type:"pie",radius:["40%","55%"],color:["#007353","#cdcdcd"],avoidLabelOverlap:!1,label:{show:!0,position:"center",formatter:"PER",fontSize:30,fontWeight:"bold",color:"#333"},emphasis:{scale:!1},labelLine:{show:!1},data:[{value:200,name:"Atendido"},{value:100,name:"Não atendido"}]}]});at([s,u],async()=>{const m=Object.keys(s.value);console.log("SELECIONADOS",m),await Promise.all([Y(),Z()]);function w(S){return S.filter(D=>!S.some(H=>H.startsWith(D+".")))}const x=w(m);console.log("NUMERO ITEM",x);const h=u.value==="parametros"?o.value??[]:r.value??[];c.value=h.filter(S=>x.includes(S.item.nroItem)).map(S=>({key:S.id+"",data:{name:S.descricao},selected:!0,children:[]})).reverse(),console.log("PARAMETROS",Se(o)),console.log("SELECTED ITEMS",Se(c))});async function Y(){try{const m=await ae.itensContratos.findParametros(e.empresaAtual.sigla);o.value=m,console.log("AQUI ------>",m)}catch(m){console.log(m)}}function re(m){m.selected||(m.selected=!1)}async function Z(){try{const m=await ae.itensContratos.findEscopos(e.empresaAtual.sigla);r.value=m,console.log("AQUI ------>",m)}catch(m){console.log(m)}}async function L(){try{let m=function(h,S,D){const H=h.split("."),fe=[];for(let _=0;_<=D;_++)fe.push(H[_]);const he=S.find(_=>_.key===fe.join("."));return he?m(h,he.children,D+1):S},x=await ae.itensContratos.find(e.empresaAtual.sigla);for(;x.length>0;){const h=x[0];if(h.nroItem.length===1){t.value.push({key:h.nroItem,data:{name:h.nroItem+" - "+h.descricao},children:[]}),x=x.slice(1);continue}else{const S=m(h.nroItem,t.value,0);S==null||S.push({key:h.nroItem,data:{name:h.nroItem+" - "+h.descricao},children:[]}),x=x.slice(1)}}}catch(m){console.error("Erro ao buscar itens contratuais:",m)}}return(m,w)=>{const x=E("fa-icon");return i(),f("div",un,[p("div",pn,[p("div",fn,[p("aside",hn,[I(ee(Ge),{"selection-keys":s.value,"onUpdate:selectionKeys":w[0]||(w[0]=h=>s.value=h),value:t.value,"selection-mode":"checkbox",tablestyle:"min-width: 100%",class:"custom-treetable"},{default:C(()=>[I(ee(pt),{field:"name",expander:"",style:{width:"100%"},class:"colunaTable"})]),_:1},8,["selection-keys","value"])]),p("main",bn,[p("div",mn,[w[3]||(w[3]=it('<div class="flex items-center justify-between w-full" data-v-9968869e><div class="flex flex-col gap-6" data-v-9968869e><img src="'+Pt+'" alt="logo" class="max-h-12 max-w-full object-contain" data-v-9968869e><div class="flex items-center space-x-4" data-v-9968869e><div class="bg-emerald-800 text-white px-3 py-1 rounded-md" data-v-9968869e> 200 </div><span data-v-9968869e>ATENDIDO</span><div class="bg-gray-300 text-black px-3 py-1 rounded-md" data-v-9968869e> 100 </div><span data-v-9968869e>NÃO ATENDIDO</span></div></div></div>',1)),p("div",gn,[I(ee(Ct),{class:"chart",option:O.value},null,8,["option"])])]),p("div",yn,[p("button",{class:k([{"bg-emerald-800 text-white":u.value==="escopos","bg-gray-300 text-black":u.value!=="escopos"},"px-4 py-2 rounded-md shadow-md hover:bg-emerald-900"]),onClick:w[1]||(w[1]=h=>u.value="escopos")}," Escopo ",2),p("button",{class:k([{"bg-emerald-800 text-white":u.value==="parametros","bg-gray-300 text-black":u.value!=="parametros"},"px-4 py-2 rounded-md shadow-md hover:bg-emerald-900"]),onClick:w[2]||(w[2]=h=>u.value="parametros")}," Parâmetros ",2)]),s.value.length?(i(),f("div",vn,[(i(!0),f(z,null,j(ee(P),h=>(i(),f("div",{key:h.id,class:"mb-2"},[p("label",null,A(h.descricao),1),p("input",{type:"checkbox",value:h},null,8,kn)]))),128))])):g("",!0),p("div",wn,[p("ul",null,[(i(!0),f(z,null,j(c.value,h=>(i(),f("li",{key:h.key,class:"p-2 border-b listaItens flex items-center justify-between"},[p("div",Sn,[Le(p("input",{"onUpdate:modelValue":S=>h.selected=S,type:"checkbox",class:"mr-2",onChange:S=>re(h)},null,40,Cn),[[st,h.selected]]),ne(" "+A(h.data.name),1)]),p("div",Pn,[p("button",xn,[I(x,{icon:"fas fa-download"})]),p("button",zn,[I(x,{icon:"fas fa-times"})])])]))),128))]),d.value.length?(i(),f("ul",Mn,[(i(!0),f(z,null,j(d.value,h=>(i(),f("li",{key:h.id,class:"p-2 border-b flex items-center justify-between"},[p("div",On,[w[4]||(w[4]=p("input",{type:"checkbox",class:"mr-2"},null,-1)),ne(" "+A(h.descricao),1)]),p("div",Tn,[p("button",Kn,[I(x,{icon:"fas fa-download"})]),p("button",En,[I(x,{icon:"fas fa-times"})])])]))),128))])):g("",!0),p("ul",null,[(i(!0),f(z,null,j(l.value,h=>(i(),f("li",{key:h.id,class:"p-2 border-b flex items-center justify-between"},[p("div",jn,[w[5]||(w[5]=p("input",{type:"checkbox",class:"mr-2"},null,-1)),ne(" "+A(h.descricao),1)]),p("div",In,[p("button",Rn,[I(x,{icon:"fas fa-download"})]),p("button",Fn,[I(x,{icon:"fas fa-times"})])])]))),128))])])])])])])}}}),Jn=ct(Dn,[["__scopeId","data-v-9968869e"]]);export{Jn as default};
