@stonecrop/atable 0.8.2 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,22 @@
1
- (function(O,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","pinia"],e):(O=typeof globalThis<"u"?globalThis:O||self,e(O["@stonecrop/atable"]={},O.Vue,O.pinia))})(this,(function(O,e,bt){"use strict";var Xe=document.createElement("style");Xe.textContent=`@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&display=swap";.atable-cell{border-radius:0;box-sizing:border-box;outline:none;box-shadow:none;color:var(--sc-cell-text-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);border-spacing:0px;border-collapse:collapse;overflow:hidden;text-overflow:ellipsis;order:1;white-space:nowrap;max-width:40ch;border-top:1px solid var(--sc-row-border-color);margin:0 0 0 1px}.atable-cell a{color:var(--sc-cell-text-color);text-decoration:none}.atable-cell:focus,.atable-cell:focus-within{background-color:var(--sc-focus-cell-background);outline-width:var(--sc-atable-cell-border-width);outline-style:solid;outline-offset:calc(var(--sc-atable-cell-border-width) * -1);outline-color:var(--sc-focus-cell-outline);box-shadow:none;overflow:hidden;text-wrap:nowrap;box-sizing:border-box}.cell-modified{font-weight:700;font-style:italic}.cell-modified-highlight{background-color:var(--sc-cell-changed-color)}.row-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;display:flex;align-items:center;justify-content:center}.expandable-row{border-top:1px solid var(--sc-row-border-color);height:var(--sc-atable-row-height)}.expandable-row>td:first-child{border-left:4px solid var(--sc-row-border-color)}.expanded-row{border-left:2px solid var(--sc-row-border-color)}.expandable-row:last-child{border-bottom:1px solid var(--sc-row-border-color)}.expanded-row-content{border-top:1px solid var(--sc-row-border-color);padding:1.5rem}.expandable-row.changed-row-gradient[data-v-a42297c7]:has(td.cell-modified){--cell-color-start: color-mix(in srgb, var(--sc-cell-changed-color), #fff 20%);--cell-color-end: color-mix(in srgb, var(--sc-cell-changed-color), #fff 60%);background:linear-gradient(90deg,var(--cell-color-start),var(--cell-color-end))}.aganttcell[data-v-8917a8a3]{background-color:#f9f9f9;width:100%;padding:0;height:100%}.gantt-container[data-v-8917a8a3]{position:relative;height:100%;background-color:#f0f0f0;border-radius:4px;overflow:visible}.gantt-bar[data-v-8917a8a3]{position:absolute;border-radius:4px;display:flex;align-items:center;justify-content:space-between;cursor:grab;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);transition:left .1s ease-out,width .1s ease-out;height:80%;top:50%;z-index:2;transform:translateY(-50%)}.gantt-bar[data-v-8917a8a3]:active{cursor:grabbing}.gantt-bar.is-dragging[data-v-8917a8a3]{z-index:10}.gantt-label[data-v-8917a8a3]{flex:1;text-align:center;font-size:12px;color:#aaa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 8px;-webkit-user-select:none;user-select:none}.resize-handle[data-v-8917a8a3]{position:relative;width:12px;height:100%;cursor:ew-resize;display:flex;align-items:center;justify-content:center;z-index:0;background:#00000040}.left-resize-handle[data-v-8917a8a3]{border-right:1px solid rgba(0,0,0,.5)}.right-resize-handle[data-v-8917a8a3]{border-left:1px solid rgba(0,0,0,.5)}.handle-grip[data-v-8917a8a3]{width:4px;height:12px;border-radius:2px;background:#000c}.resize-handle[data-v-8917a8a3]:hover{background-color:#ffffff80}.vertical-indicator[data-v-8917a8a3]{position:absolute;width:2px;opacity:0;pointer-events:none;transition:opacity .2s ease;top:-100vh;height:100vh;z-index:5;background-color:var(--v6d722296)}.left-indicator[data-v-8917a8a3]{left:50%;transform:translate(-50%)}.right-indicator[data-v-8917a8a3]{right:50%;transform:translate(50%)}.resize-handle.is-dragging .vertical-indicator[data-v-8917a8a3]{opacity:.7}.gantt-container[data-v-8917a8a3]:after{content:"";position:absolute;inset:0;background-size:calc(100% / var(--v260b36f8)) 100%;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px);pointer-events:none;z-index:1}.connection-handle[data-v-8917a8a3]{position:absolute;top:50%;transform:translateY(-50%);width:16px;height:16px;opacity:0;transition:opacity .2s ease;cursor:crosshair;z-index:15;display:flex;align-items:center;justify-content:center}.connection-handle.visible[data-v-8917a8a3]{opacity:1}.left-connection-handle[data-v-8917a8a3]{left:-16px}.right-connection-handle[data-v-8917a8a3]{right:-16px}.connection-dot[data-v-8917a8a3]{width:8px;height:8px;border-radius:50%;background-color:#2196f3;border:2px solid white;box-shadow:0 1px 3px #0000004d}.connection-handle:hover .connection-dot[data-v-8917a8a3]{background-color:#1976d2;transform:scale(1.2)}.connection-handle.is-dragging[data-v-8917a8a3]{opacity:1!important}.connection-handle.is-dragging .connection-dot[data-v-8917a8a3]{background-color:#1976d2;transform:scale(1.3);box-shadow:0 2px 8px #2196f366}.atable-row-actions{width:2rem;min-width:2rem;padding:0 .25rem;vertical-align:middle;white-space:nowrap;border-top:1px solid var(--sc-row-border-color);background:#fff;-webkit-user-select:none;user-select:none;position:relative}.atable-row-actions.dropdown-active{z-index:500}.row-actions-icons{display:flex;gap:.25rem;align-items:center;justify-content:center}.row-action-btn{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:.125rem;border:none;background:transparent;cursor:pointer;border-radius:.25rem;transition:background-color .15s ease}.row-action-btn:hover{background-color:var(--sc-gray-10, #e5e5e5)}.row-action-btn:focus{outline:2px solid var(--sc-focus-cell-outline, #3b82f6);outline-offset:1px}.row-action-btn .action-icon{display:flex;align-items:center;justify-content:center;width:1rem;height:1rem}.row-action-btn .action-icon :deep(svg){width:100%;height:100%}.row-actions-dropdown{position:relative;display:inline-block}.row-actions-dropdown:has(button:focus){outline:2px solid var(--sc-focus-cell-outline);outline-offset:-2px}.row-actions-toggle{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;border:none;background:transparent;cursor:pointer;border-radius:.25rem;font-size:1rem;font-weight:700;transition:background-color .15s ease}.row-actions-toggle:hover{background-color:var(--sc-gray-10, #e5e5e5)}.dropdown-icon{line-height:1}.row-actions-menu{position:fixed;z-index:9999;min-width:10rem;padding:.25rem 0;background:#fff;border:1px solid var(--sc-row-border-color);border-left:4px solid var(--sc-row-border-color);border-radius:0}.row-actions-menu.menu-flipped{box-shadow:0 -4px 6px -1px #0000001a,0 -2px 4px -2px #0000001a}.row-action-menu-item{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .75rem;border:none;background:transparent;cursor:pointer;text-align:left;font-size:.875rem;transition:background-color .15s ease}.row-action-menu-item:hover{background-color:var(--sc-gray-10, #f5f5f5)}.row-action-menu-item:focus{outline:none;background-color:var(--sc-gray-10, #f5f5f5)}.row-action-menu-item .action-icon{display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;flex-shrink:0}.row-action-menu-item .action-icon :deep(svg){width:100%;height:100%}.row-action-menu-item .action-label{flex:1}.atable-row{background-color:#fff}.atable-row>td:first-child{border-left:4px solid var(--sc-row-border-color)}.list-index{color:var(--sc-header-text-color);font-weight:700;padding-left:var(--sc-atable-row-padding);padding-right:.5em;text-align:left;-webkit-user-select:none;user-select:none;border-top:1px solid var(--sc-row-border-color);text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.tree-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.atable-row:has(td.cell-modified)>td.sticky-column,.atable-row:has(td.cell-modified)>th.sticky-column,.atable-row:has(td.cell-modified)>td.sticky-index,.atable-row:has(td.cell-modified)>th.sticky-index{background:var(--sc-cell-changed-color)}.atable-row.changed-row-gradient[data-v-c35a3748]:has(td.cell-modified){--cell-color-start: color-mix(in srgb, var(--sc-cell-changed-color), #fff 20%);--cell-color-end: color-mix(in srgb, var(--sc-cell-changed-color), #fff 60%);background:linear-gradient(90deg,var(--cell-color-start),var(--cell-color-end))}.gantt-connection-overlay[data-v-71911260]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1}.connection-path[data-v-71911260]{transition:stroke-width .2s ease;pointer-events:auto;cursor:pointer;stroke-dasharray:5px;stroke:var(--sc-cell-text-color)}#arrowhead-marker polygon[data-v-71911260]{fill:var(--sc-cell-text-color)}.animated-path[data-v-71911260]{animation:animated-dash-71911260 infinite 1.5s linear}.connection-path[data-v-71911260]:hover{stroke-width:3px}.connection-hitbox[data-v-71911260]{pointer-events:auto;cursor:pointer}@keyframes animated-dash-71911260{0%{stroke-dashoffset:0px}to{stroke-dashoffset:-10px}}.column-filter[data-v-8487462d]{display:flex;align-items:center;gap:.25rem;width:100%}.filter-input[data-v-8487462d],.filter-select[data-v-8487462d]{background-color:var(--sc-form-background)!important;padding:.15rem .2rem;border:1px solid var(--sc-form-border);border-radius:3px;font-size:.875rem;color:var(--sc-text-color);width:100%;box-sizing:border-box}.filter-input[data-v-8487462d]:focus,.filter-select[data-v-8487462d]:focus{outline:none;border-color:var(--sc-input-active-border-color)}.checkbox-filter[data-v-8487462d]{display:flex;align-items:center;gap:.25rem;font-size:.875rem;color:var(--sc-text-color);cursor:pointer}.filter-checkbox[data-v-8487462d]{margin:0}.date-range-filter[data-v-8487462d]{display:flex;gap:.25rem;align-items:center;width:100%}.date-range-filter .filter-input[data-v-8487462d]{flex:1;min-width:0}.date-separator[data-v-8487462d]{color:var(--sc-gray-50);font-weight:500;padding:0 .25rem;flex-shrink:0}.clear-btn[data-v-8487462d]{background:var(--sc-gray-10, #f0f0f0);border:1px solid var(--sc-form-border);border-radius:3px;color:var(--sc-gray-70);cursor:pointer;font-size:1rem;padding:.15rem .4rem;line-height:1;flex-shrink:0}.atable-header-row th{padding-left:.5ch!important;font-weight:700;min-width:3ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);box-sizing:border-box;color:var(--sc-header-text-color);position:relative}#header-index{padding-left:var(--sc-atable-row-padding);box-sizing:border-box;border-top:none}.tree-index{padding-right:0}th{order:1}.list-expansion-index{width:2ch;margin-left:5px}.cursor-pointer{cursor:pointer}.atable-filters-row th{padding:.25rem .5ch;vertical-align:top}.row-actions-header{width:2rem;min-width:2rem;padding:0 .25rem}:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-changed-color: #d8edff;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: .125rem;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-table-loading-color: 204, 204, 204;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.amodal{position:absolute;background-color:var(--sc-row-color-zebra-dark);z-index:5}.atable-container{position:relative}.sticky-index{position:sticky;left:0;z-index:10;order:0}.sticky-column,th.sticky-column,td.sticky-column,th.sticky-index,td.sticky-index{position:sticky;z-index:10;order:0;background:#fff}.sticky-column-edge,.atable th.sticky-column-edge{border-right:1px solid var(--sc-row-border-color)}[data-v-3d00d51b]:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-changed-color: #d8edff;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: .125rem;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-table-loading-color: 204, 204, 204;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.atable[data-v-3d00d51b]{position:relative;font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);border-collapse:collapse;box-sizing:border-box;table-layout:auto;width:auto;overflow:clip;height:1px}.atable th[data-v-3d00d51b]{border-width:0px;border-style:solid;border-radius:0;padding-left:.5ch;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);color:var(--sc-gray-60);height:var(--sc-atable-row-height);font-weight:300;letter-spacing:.05rem;order:1;box-sizing:border-box}.atable th[data-v-3d00d51b]:focus{outline:none}.atable[data-v-3d00d51b]:tbody{overflow:hidden;position:relative}.atable[data-v-3d00d51b]:tbody:before{content:"";position:absolute;top:0;left:0;right:0;height:1px;background-color:transparent;z-index:100}.aloading[data-v-a930a25b]{width:100%;border-top:1px solid var(--sc-row-border-color);border-bottom:1px solid var(--sc-row-border-color);display:flex;background-color:#fff;border-left:4px solid var(--sc-row-border-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);align-items:center;box-sizing:border-box;background:var(--sc-focus-cell-background);overflow:hidden;position:relative}.aloading-bar[data-v-a930a25b]{width:100%;height:100%;position:absolute;left:-100%;top:0;background:linear-gradient(90deg,rgba(var(--sc-table-loading-color),0),rgba(var(--sc-table-loading-color),1),rgba(var(--sc-table-loading-color),0));animation:gradient-a930a25b infinite 2s;z-index:0}.aloading-header[data-v-a930a25b]{color:var(--sc-cell-text-color);font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);padding:0;margin:0;font-weight:400;z-index:1}.aloading-header[data-v-a930a25b]:after{content:"...";animation:ellipse-a930a25b 2s;animation-iteration-count:infinite}@keyframes gradient-a930a25b{0%{left:-100%}to{left:100%}}@keyframes ellipse-a930a25b{0%{content:""}20%{content:""}40%{content:"."}60%{content:".."}80%{content:"..."}}.aloading[data-v-e1165876]{width:100%;border-top:1px solid var(--sc-row-border-color);border-bottom:1px solid var(--sc-row-border-color);display:flex;background-color:#fff;border-left:4px solid var(--sc-row-border-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);align-items:center;box-sizing:border-box;background:var(--sc-focus-cell-background);overflow:hidden;position:relative}.aloading-bar[data-v-e1165876]{width:50%;height:3px;position:absolute;left:-100%;bottom:0;background:var(--sc-row-border-color);animation:bar-left-e1165876 infinite 2s;z-index:0}.aloading-header[data-v-e1165876]{color:var(--sc-cell-text-color);font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);padding:0;margin:0;font-weight:400;z-index:1}.aloading-header[data-v-e1165876]:after{content:"...";animation:ellipse-e1165876 2s;animation-iteration-count:infinite}@keyframes bar-left-e1165876{0%{left:-50%}to{left:100%}}@keyframes ellipse-e1165876{0%{content:""}20%{content:""}40%{content:"."}60%{content:".."}80%{content:"..."}}
2
- /*$vite$:1*/`,document.head.appendChild(Xe);function Ge(t,n){return e.getCurrentScope()?(e.onScopeDispose(t,n),!0):!1}const vt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const xt=t=>t!=null,yt=Object.prototype.toString,kt=t=>yt.call(t)==="[object Object]",Ct=()=>{};function ce(t){return Array.isArray(t)?t:[t]}function Et(t,n,i){return e.watch(t,n,{...i,immediate:!0})}const ne=vt?window:void 0;function oe(t){var n;const i=e.toValue(t);return(n=i?.$el)!==null&&n!==void 0?n:i}function ae(...t){const n=(s,f,l,r)=>(s.addEventListener(f,l,r),()=>s.removeEventListener(f,l,r)),i=e.computed(()=>{const s=ce(e.toValue(t[0])).filter(f=>f!=null);return s.every(f=>typeof f!="string")?s:void 0});return Et(()=>{var s,f;return[(s=(f=i.value)===null||f===void 0?void 0:f.map(l=>oe(l)))!==null&&s!==void 0?s:[ne].filter(l=>l!=null),ce(e.toValue(i.value?t[1]:t[0])),ce(e.unref(i.value?t[2]:t[1])),e.toValue(i.value?t[3]:t[2])]},([s,f,l,r],o,d)=>{if(!s?.length||!f?.length||!l?.length)return;const c=kt(r)?{...r}:r,m=s.flatMap(w=>f.flatMap(M=>l.map(V=>n(w,M,V,c))));d(()=>{m.forEach(w=>w())})},{flush:"post"})}function Bt(){const t=e.shallowRef(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function Mt(t){const n=Bt();return e.computed(()=>(n.value,!!t()))}function Rt(t,n,i={}){const{window:s=ne,...f}=i;let l;const r=Mt(()=>s&&"MutationObserver"in s),o=()=>{l&&(l.disconnect(),l=void 0)},d=e.watch(e.computed(()=>{const w=ce(e.toValue(t)).map(oe).filter(xt);return new Set(w)}),w=>{o(),r.value&&w.size&&(l=new MutationObserver(n),w.forEach(M=>l.observe(M,f)))},{immediate:!0,flush:"post"}),c=()=>l?.takeRecords(),m=()=>{d(),o()};return Ge(m),{isSupported:r,stop:m,takeRecords:c}}function Vt(t,n,i={}){const{window:s=ne,document:f=s?.document,flush:l="sync"}=i;if(!s||!f)return Ct;let r;const o=m=>{r?.(),r=m},d=e.watchEffect(()=>{const m=oe(t);if(m){const{stop:w}=Rt(f,M=>{M.map(V=>[...V.removedNodes]).flat().some(V=>V===m||V.contains(m))&&n(M)},{window:s,childList:!0,subtree:!0});o(w)}},{flush:l}),c=()=>{d(),o()};return Ge(c),c}function It(t={}){var n;const{window:i=ne,deep:s=!0,triggerOnRemoval:f=!1}=t,l=(n=t.document)!==null&&n!==void 0?n:i?.document,r=()=>{let c=l?.activeElement;if(s)for(var m;c?.shadowRoot;)c=c==null||(m=c.shadowRoot)===null||m===void 0?void 0:m.activeElement;return c},o=e.shallowRef(),d=()=>{o.value=r()};if(i){const c={capture:!0,passive:!0};ae(i,"blur",m=>{m.relatedTarget===null&&d()},c),ae(i,"focus",d,c)}return f&&Vt(o,d,{document:l}),d(),o}const St="focusin",$t="focusout",At=":focus-within";function Dt(t,n={}){const{window:i=ne}=n,s=e.computed(()=>oe(t)),f=e.shallowRef(!1),l=e.computed(()=>f.value);if(!i||!It(n).value)return{focused:l};const r={passive:!0};return ae(s,St,()=>f.value=!0,r),ae(s,$t,()=>{var o,d,c;return f.value=(o=(d=s.value)===null||d===void 0||(c=d.matches)===null||c===void 0?void 0:c.call(d,At))!==null&&o!==void 0?o:!1},r),{focused:l}}function Tt(t,{window:n=ne,scrollTarget:i}={}){const s=e.ref(!1),f=()=>{if(!n)return;const l=n.document,r=oe(t);if(!r)s.value=!1;else{const o=r.getBoundingClientRect();s.value=o.top<=(n.innerHeight||l.documentElement.clientHeight)&&o.left<=(n.innerWidth||l.documentElement.clientWidth)&&o.bottom>=0&&o.right>=0}};return e.watch(()=>oe(t),()=>f(),{immediate:!0,flush:"post"}),n&&ae(i||n,"scroll",f,{capture:!1,passive:!0}),s}const q=t=>{let n=Tt(t).value;return n=n&&t.offsetHeight>0,n},J=t=>t.tabIndex>=0,je=t=>{const n=t.target;return ke(n)},ke=t=>{let n;if(t instanceof HTMLTableCellElement){const i=t.parentElement?.previousElementSibling;if(i){const s=Array.from(i.children)[t.cellIndex];s&&(n=s)}}else if(t instanceof HTMLTableRowElement){const i=t.previousElementSibling;i&&(n=i)}return n&&(!J(n)||!q(n))?ke(n):n},zt=t=>{const n=t.target;let i;if(n instanceof HTMLTableCellElement){const s=n.parentElement?.parentElement;if(s){const f=s.firstElementChild?.children[n.cellIndex];f&&(i=f)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const f=s.firstElementChild;f&&(i=f)}}return i&&(!J(i)||!q(i))?Ce(i):i},Ue=t=>{const n=t.target;return Ce(n)},Ce=t=>{let n;if(t instanceof HTMLTableCellElement){const i=t.parentElement?.nextElementSibling;if(i){const s=Array.from(i.children)[t.cellIndex];s&&(n=s)}}else if(t instanceof HTMLTableRowElement){const i=t.nextElementSibling;i&&(n=i)}return n&&(!J(n)||!q(n))?Ce(n):n},Nt=t=>{const n=t.target;let i;if(n instanceof HTMLTableCellElement){const s=n.parentElement?.parentElement;if(s){const f=s.lastElementChild?.children[n.cellIndex];f&&(i=f)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const f=s.lastElementChild;f&&(i=f)}}return i&&(!J(i)||!q(i))?ke(i):i},Ye=t=>{const n=t.target;return Ee(n)},Ee=t=>{let n;return t.previousElementSibling?n=t.previousElementSibling:n=t.parentElement?.previousElementSibling?.lastElementChild,n&&(!J(n)||!q(n))?Ee(n):n},qe=t=>{const n=t.target;return Be(n)},Be=t=>{let n;return t.nextElementSibling?n=t.nextElementSibling:n=t.parentElement?.nextElementSibling?.firstElementChild,n&&(!J(n)||!q(n))?Be(n):n},Je=t=>{const n=t.target.parentElement?.firstElementChild;return n&&(!J(n)||!q(n))?Be(n):n},Qe=t=>{const n=t.target.parentElement?.lastElementChild;return n&&(!J(n)||!q(n))?Ee(n):n},de=["alt","control","shift","meta"],Ht={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},fe={"keydown.up":t=>{const n=je(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.down":t=>{const n=Ue(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.left":t=>{const n=Ye(t);t.preventDefault(),t.stopPropagation(),n&&n.focus()},"keydown.right":t=>{const n=qe(t);t.preventDefault(),t.stopPropagation(),n&&n.focus()},"keydown.control.up":t=>{const n=zt(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.down":t=>{const n=Nt(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.left":t=>{const n=Je(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.right":t=>{const n=Qe(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.end":t=>{const n=Qe(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const n=Ue(t);n&&n.focus()}},"keydown.shift.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const n=je(t);n&&n.focus()}},"keydown.home":t=>{const n=Je(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.tab":t=>{const n=qe(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.shift.tab":t=>{const n=Ye(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())}};function Me(t){const n=r=>{let o=null;return r.parent&&(typeof r.parent=="string"?o=document.querySelector(r.parent):r.parent instanceof HTMLElement?o=r.parent:o=r.parent.value),o},i=r=>{const o=n(r);let d=[];if(typeof r.selectors=="string")d=Array.from(o?o.querySelectorAll(r.selectors):document.querySelectorAll(r.selectors));else if(Array.isArray(r.selectors))for(const c of r.selectors)c instanceof HTMLElement?d.push(c):d.push(c.$el);else if(r.selectors instanceof HTMLElement)d.push(r.selectors);else if(r.selectors?.value)if(Array.isArray(r.selectors.value))for(const c of r.selectors.value)c instanceof HTMLElement?d.push(c):d.push(c.$el);else d.push(r.selectors.value);return d},s=r=>{const o=n(r);let d=[];return r.selectors?d=i(r):o&&(d=Array.from(o.children).filter(c=>J(c)&&q(c))),d},f=r=>o=>{const d=Ht[o.key]||o.key.toLowerCase();if(de.includes(d))return;const c=r.handlers||fe;for(const m of Object.keys(c)){const[w,...M]=m.split(".");if(w==="keydown"&&M.includes(d)){const V=c[m],x=M.filter(g=>de.includes(g)),v=de.some(g=>{const h=g.charAt(0).toUpperCase()+g.slice(1);return o.getModifierState(h)});if(x.length>0){if(v){for(const g of de)if(M.includes(g)){const h=g.charAt(0).toUpperCase()+g.slice(1);o.getModifierState(h)&&V(o)}}}else v||V(o)}}},l=[];e.onMounted(()=>{for(const r of t){const o=n(r),d=s(r),c=f(r),m=o?[o]:d;for(const w of m){const{focused:M}=Dt(e.ref(w)),V=e.watch(M,x=>{x?w.addEventListener("keydown",c):w.removeEventListener("keydown",c)});l.push(V)}}}),e.onBeforeUnmount(()=>{for(const r of l)r()})}function Re(t,n){return e.getCurrentScope()?(e.onScopeDispose(t,n),!0):!1}const Ke=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Lt=t=>t!=null,Ot=Object.prototype.toString,Pt=t=>Ot.call(t)==="[object Object]",ee=()=>{};function Zt(...t){if(t.length!==1)return e.toRef(...t);const n=t[0];return typeof n=="function"?e.readonly(e.customRef(()=>({get:n,set:ee}))):e.ref(n)}function Ft(t,n){function i(...s){return new Promise((f,l)=>{Promise.resolve(t(()=>n.apply(this,s),{fn:n,thisArg:this,args:s})).then(f).catch(l)})}return i}function Wt(t,n={}){let i,s,f=ee;const l=d=>{clearTimeout(d),f(),f=ee};let r;return d=>{const c=e.toValue(t),m=e.toValue(n.maxWait);return i&&l(i),c<=0||m!==void 0&&m<=0?(s&&(l(s),s=void 0),Promise.resolve(d())):new Promise((w,M)=>{f=n.rejectOnCancel?M:w,r=d,m&&!s&&(s=setTimeout(()=>{i&&l(i),s=void 0,w(r())},m)),i=setTimeout(()=>{s&&l(s),s=void 0,w(d())},c)})}}function ue(t){return Array.isArray(t)?t:[t]}function Xt(t){return e.getCurrentInstance()}function Gt(t,n=200,i={}){return Ft(Wt(n,i),t)}function jt(t,n={}){if(!e.isRef(t))return e.toRefs(t);const i=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const s in t.value)i[s]=e.customRef(()=>({get(){return t.value[s]},set(f){var l;if(!((l=e.toValue(n.replaceRef))!==null&&l!==void 0)||l)if(Array.isArray(t.value)){const r=[...t.value];r[s]=f,t.value=r}else{const r={...t.value,[s]:f};Object.setPrototypeOf(r,Object.getPrototypeOf(t.value)),t.value=r}else t.value[s]=f}}));return i}function Ut(t,n=!0,i){Xt()?e.onMounted(t,i):n?t():e.nextTick(t)}function Yt(t,n,i){return e.watch(t,n,{...i,immediate:!0})}const le=Ke?window:void 0;function Y(t){var n;const i=e.toValue(t);return(n=i?.$el)!==null&&n!==void 0?n:i}function Q(...t){const n=(s,f,l,r)=>(s.addEventListener(f,l,r),()=>s.removeEventListener(f,l,r)),i=e.computed(()=>{const s=ue(e.toValue(t[0])).filter(f=>f!=null);return s.every(f=>typeof f!="string")?s:void 0});return Yt(()=>{var s,f;return[(s=(f=i.value)===null||f===void 0?void 0:f.map(l=>Y(l)))!==null&&s!==void 0?s:[le].filter(l=>l!=null),ue(e.toValue(i.value?t[1]:t[0])),ue(e.unref(i.value?t[2]:t[1])),e.toValue(i.value?t[3]:t[2])]},([s,f,l,r],o,d)=>{if(!s?.length||!f?.length||!l?.length)return;const c=Pt(r)?{...r}:r,m=s.flatMap(w=>f.flatMap(M=>l.map(V=>n(w,M,V,c))));d(()=>{m.forEach(w=>w())})},{flush:"post"})}function Ve(t,n,i={}){const{window:s=le,ignore:f=[],capture:l=!0,detectIframe:r=!1,controls:o=!1}=i;if(!s)return o?{stop:ee,cancel:ee,trigger:ee}:ee;let d=!0;const c=g=>e.toValue(f).some(h=>{if(typeof h=="string")return Array.from(s.document.querySelectorAll(h)).some(p=>p===g.target||g.composedPath().includes(p));{const p=Y(h);return p&&(g.target===p||g.composedPath().includes(p))}});function m(g){const h=e.toValue(g);return h&&h.$.subTree.shapeFlag===16}function w(g,h){const p=e.toValue(g),E=p.$.subTree&&p.$.subTree.children;return E==null||!Array.isArray(E)?!1:E.some(I=>I.el===h.target||h.composedPath().includes(I.el))}const M=g=>{const h=Y(t);if(g.target!=null&&!(!(h instanceof Element)&&m(t)&&w(t,g))&&!(!h||h===g.target||g.composedPath().includes(h))){if("detail"in g&&g.detail===0&&(d=!c(g)),!d){d=!0;return}n(g)}};let V=!1;const x=[Q(s,"click",g=>{V||(V=!0,setTimeout(()=>{V=!1},0),M(g))},{passive:!0,capture:l}),Q(s,"pointerdown",g=>{const h=Y(t);d=!c(g)&&!!(h&&!g.composedPath().includes(h))},{passive:!0}),r&&Q(s,"blur",g=>{setTimeout(()=>{var h;const p=Y(t);((h=s.document.activeElement)===null||h===void 0?void 0:h.tagName)==="IFRAME"&&!p?.contains(s.document.activeElement)&&n(g)},0)},{passive:!0})].filter(Boolean),v=()=>x.forEach(g=>g());return o?{stop:v,cancel:()=>{d=!1},trigger:g=>{d=!0,M(g),d=!1}}:v}function qt(){const t=e.shallowRef(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function _e(t){const n=qt();return e.computed(()=>(n.value,!!t()))}function et(t,n,i={}){const{window:s=le,...f}=i;let l;const r=_e(()=>s&&"MutationObserver"in s),o=()=>{l&&(l.disconnect(),l=void 0)},d=e.watch(e.computed(()=>{const w=ue(e.toValue(t)).map(Y).filter(Lt);return new Set(w)}),w=>{o(),r.value&&w.size&&(l=new MutationObserver(n),w.forEach(M=>l.observe(M,f)))},{immediate:!0,flush:"post"}),c=()=>l?.takeRecords(),m=()=>{d(),o()};return Re(m),{isSupported:r,stop:m,takeRecords:c}}function Ie(t,n={}){var i;const{pointerTypes:s,preventDefault:f,stopPropagation:l,exact:r,onMove:o,onEnd:d,onStart:c,initialValue:m,axis:w="both",draggingElement:M=le,containerElement:V,handle:x=t,buttons:v=[0]}=n,g=e.ref((i=e.toValue(m))!==null&&i!==void 0?i:{x:0,y:0}),h=e.ref(),p=y=>s?s.includes(y.pointerType):!0,E=y=>{e.toValue(f)&&y.preventDefault(),e.toValue(l)&&y.stopPropagation()},I=y=>{var S;if(!e.toValue(v).includes(y.button)||e.toValue(n.disabled)||!p(y)||e.toValue(r)&&y.target!==e.toValue(t))return;const Z=e.toValue(V),L=Z==null||(S=Z.getBoundingClientRect)===null||S===void 0?void 0:S.call(Z),z=e.toValue(t).getBoundingClientRect(),U={x:y.clientX-(Z?z.left-L.left+Z.scrollLeft:z.left),y:y.clientY-(Z?z.top-L.top+Z.scrollTop:z.top)};c?.(U,y)!==!1&&(h.value=U,E(y))},N=y=>{if(e.toValue(n.disabled)||!p(y)||!h.value)return;const S=e.toValue(V),Z=e.toValue(t).getBoundingClientRect();let{x:L,y:z}=g.value;(w==="x"||w==="both")&&(L=y.clientX-h.value.x,S&&(L=Math.min(Math.max(0,L),S.scrollWidth-Z.width))),(w==="y"||w==="both")&&(z=y.clientY-h.value.y,S&&(z=Math.min(Math.max(0,z),S.scrollHeight-Z.height))),g.value={x:L,y:z},o?.(g.value,y),E(y)},A=y=>{e.toValue(n.disabled)||!p(y)||h.value&&(h.value=void 0,d?.(g.value,y),E(y))};if(Ke){const y=()=>{var S;return{capture:(S=n.capture)!==null&&S!==void 0?S:!0,passive:!e.toValue(f)}};Q(x,"pointerdown",I,y),Q(M,"pointermove",N,y),Q(M,"pointerup",A,y)}return{...jt(g),position:g,isDragging:e.computed(()=>!!h.value),style:e.computed(()=>`left:${g.value.x}px;top:${g.value.y}px;`)}}function me(t,n,i={}){const{window:s=le,...f}=i;let l;const r=_e(()=>s&&"ResizeObserver"in s),o=()=>{l&&(l.disconnect(),l=void 0)},d=e.watch(e.computed(()=>{const m=e.toValue(t);return Array.isArray(m)?m.map(w=>Y(w)):[Y(m)]}),m=>{if(o(),r.value&&s){l=new ResizeObserver(n);for(const w of m)w&&l.observe(w,f)}},{immediate:!0,flush:"post"}),c=()=>{o(),d()};return Re(c),{isSupported:r,stop:c}}function te(t,n={}){const{reset:i=!0,windowResize:s=!0,windowScroll:f=!0,immediate:l=!0,updateTiming:r="sync"}=n,o=e.shallowRef(0),d=e.shallowRef(0),c=e.shallowRef(0),m=e.shallowRef(0),w=e.shallowRef(0),M=e.shallowRef(0),V=e.shallowRef(0),x=e.shallowRef(0);function v(){const h=Y(t);if(!h){i&&(o.value=0,d.value=0,c.value=0,m.value=0,w.value=0,M.value=0,V.value=0,x.value=0);return}const p=h.getBoundingClientRect();o.value=p.height,d.value=p.bottom,c.value=p.left,m.value=p.right,w.value=p.top,M.value=p.width,V.value=p.x,x.value=p.y}function g(){r==="sync"?v():r==="next-frame"&&requestAnimationFrame(()=>v())}return me(t,g),e.watch(()=>Y(t),h=>!h&&g()),et(t,g,{attributeFilter:["style","class"]}),f&&Q("scroll",g,{capture:!0,passive:!0}),s&&Q("resize",g,{passive:!0}),Ut(()=>{l&&g()}),{height:o,bottom:d,left:c,right:m,top:w,width:M,x:V,y:x,update:g}}function Se(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}const $e=new WeakMap;function Jt(t,n=!1){const i=e.shallowRef(n);let s="";e.watch(Zt(t),r=>{const o=Se(e.toValue(r));if(o){const d=o;if($e.get(d)||$e.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(s=d.style.overflow),d.style.overflow==="hidden")return i.value=!0;if(i.value)return d.style.overflow="hidden"}},{immediate:!0});const f=()=>{const r=Se(e.toValue(t));!r||i.value||(r.style.overflow="hidden",i.value=!0)},l=()=>{const r=Se(e.toValue(t));!r||!i.value||(r.style.overflow=s,$e.delete(r),i.value=!1)};return Re(l),e.computed({get(){return i.value},set(r){r?f():l()}})}const Qt=t=>{const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(i=>i.nodeType===1)},Kt=(t=8)=>Array.from({length:t},()=>Math.floor(Math.random()*16).toString(16)).join(""),_t=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],en=["innerHTML"],tn={key:2},tt=e.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},store:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},pinned:{type:Boolean,default:!1},debounce:{default:300}},setup(t,{expose:n}){const i=e.useTemplateRef("cell"),s=t.store.getCellData(t.colIndex,t.rowIndex),f=e.ref(""),l=e.ref(!1),r=t.store.columns[t.colIndex],o=t.store.rows[t.rowIndex],d=r.align||"center",c=r.width||"40ch",m=e.computed(()=>t.store.getCellDisplayValue(t.colIndex,t.rowIndex)),w=e.computed(()=>typeof m.value=="string"?Qt(m.value):!1),M=e.computed(()=>({textAlign:d,width:c,fontWeight:l.value?"bold":"inherit",paddingLeft:t.store.getIndent(t.colIndex,t.store.display[t.rowIndex]?.indent)})),V=e.computed(()=>({"sticky-column":t.pinned,"cell-modified":l.value})),x=()=>{g(),v()},v=()=>{const{left:A,bottom:y,width:S,height:Z}=te(i);r.mask,r.modalComponent&&t.store.$patch(L=>{L.modal.visible=!0,L.modal.colIndex=t.colIndex,L.modal.rowIndex=t.rowIndex,L.modal.left=A,L.modal.bottom=y,L.modal.width=S,L.modal.height=Z,L.modal.cell=i.value,typeof r.modalComponent=="function"?L.modal.component=r.modalComponent({table:L.table,row:o,column:r}):L.modal.component=r.modalComponent,L.modal.componentProps=r.modalComponentExtraProps})};if(t.addNavigation){let A={...fe,"keydown.f2":v,"keydown.alt.up":v,"keydown.alt.down":v,"keydown.alt.left":v,"keydown.alt.right":v};typeof t.addNavigation=="object"&&(A={...A,...t.addNavigation}),Me([{selectors:i,handlers:A}])}const g=()=>{if(i.value&&r.edit){const A=window.getSelection();if(A)try{const y=document.createRange();y.selectNodeContents&&(y.selectNodeContents(i.value),A.removeAllRanges(),A.addRange(y))}catch{}}},h=()=>{i.value&&(f.value=i.value.textContent,g())},p=()=>{try{const A=window.getSelection();if(A&&A.rangeCount>0&&i.value){const y=A.getRangeAt(0),S=y.cloneRange();if(S.selectNodeContents&&S.setEnd)return S.selectNodeContents(i.value),S.setEnd(y.endContainer,y.endOffset),S.toString().length}}catch{}return 0},E=A=>{if(i.value)try{const y=window.getSelection();if(!y)return;let S=0;const Z=document.createTreeWalker?document.createTreeWalker(i.value,NodeFilter.SHOW_TEXT,null):null;if(!Z)return;let L,z=null;for(;L=Z.nextNode();){const U=L,_=S+U.textContent.length;if(A<=_&&(z=document.createRange(),z.setStart&&z.setEnd)){z.setStart(U,A-S),z.setEnd(U,A-S);break}S=_}z&&y.removeAllRanges&&y.addRange&&(y.removeAllRanges(),y.addRange(z))}catch{}},I=A=>{if(!r.edit)return;const y=A.target;if(y.textContent===f.value)return;const S=p();f.value=y.textContent,r.format?(l.value=y.textContent!==t.store.getFormattedValue(t.colIndex,t.rowIndex,s),t.store.setCellText(t.colIndex,t.rowIndex,y.textContent)):(l.value=y.textContent!==s,t.store.setCellData(t.colIndex,t.rowIndex,y.textContent)),e.nextTick().then(()=>{E(S)})},N=Gt(I,t.debounce);return n({currentData:f}),(A,y)=>(e.openBlock(),e.createElementBlock("td",{ref:"cell","data-colindex":t.colIndex,"data-rowindex":t.rowIndex,"data-editable":e.unref(r).edit,contenteditable:e.unref(r).edit,tabindex:t.tabIndex,spellcheck:!1,style:e.normalizeStyle(M.value),class:e.normalizeClass(["atable-cell",V.value]),onFocus:h,onPaste:I,onInput:y[0]||(y[0]=(...S)=>e.unref(N)&&e.unref(N)(...S)),onClick:x},[e.unref(r).cellComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r).cellComponent),e.mergeProps({key:0,value:m.value},e.unref(r).cellComponentProps),null,16,["value"])):w.value?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:m.value},null,8,en)):(e.openBlock(),e.createElementBlock("span",tn,e.toDisplayString(m.value),1))],46,_t))}}),nn=["tabindex"],on=["tabindex"],an=["colspan"],ln=e.defineComponent({__name:"AExpansionRow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:()=>fe}},setup(t){const n=e.useTemplateRef("rowEl"),i=e.computed(()=>t.store.display[t.rowIndex].expanded?"▼":"►");if(t.addNavigation){const s={"keydown.control.g":f=>{f.stopPropagation(),f.preventDefault(),t.store.toggleRowExpand(t.rowIndex)}};typeof t.addNavigation=="object"&&Object.assign(s,t.addNavigation),Me([{selectors:n,handlers:s}])}return(s,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",e.mergeProps(s.$attrs,{ref:"rowEl",tabindex:t.tabIndex,class:"expandable-row"}),[e.createElementVNode("td",{tabIndex:-1,class:"row-index",onClick:f[0]||(f[0]=l=>t.store.toggleRowExpand(t.rowIndex))},e.toDisplayString(i.value),1),e.renderSlot(s.$slots,"row",{},void 0,!0)],16,nn),t.store.display[t.rowIndex].expanded?(e.openBlock(),e.createElementBlock("tr",{key:0,ref:"rowExpanded",tabindex:t.tabIndex,class:"expanded-row"},[e.createElementVNode("td",{tabIndex:-1,colspan:t.store.columns.length+1,class:"expanded-row-content"},[e.renderSlot(s.$slots,"content",{},void 0,!0)],8,an)],8,on)):e.createCommentVNode("",!0)],64))}}),K=(t,n)=>{const i=t.__vccOpts||t;for(const[s,f]of n)i[s]=f;return i},nt=K(ln,[["__scopeId","data-v-a42297c7"]]),rn=["colspan"],sn={ref:"container",class:"gantt-container"},cn=["data-rowindex","data-colindex"],dn={key:2,class:"gantt-label"},fn=["x1","y1","x2","y2"],ot=K(e.defineComponent({__name:"AGanttCell",props:{store:{},columnsCount:{},rowIndex:{},colIndex:{},start:{default:0},end:{default:0},colspan:{default:1},label:{default:""},color:{default:"#cccccc"}},emits:["connection:create"],setup(t,{expose:n,emit:i}){e.useCssVars(R=>({v6d722296:f.value,v260b36f8:R.colspan}));const s=i,f=e.ref(t.color.length>=6?t.color:"#cccccc"),l=`gantt-bar-row-${t.rowIndex}-col-${t.colIndex}`,r=e.useTemplateRef("container"),o=e.useTemplateRef("bar"),d=e.useTemplateRef("leftResizeHandle"),c=e.useTemplateRef("rightResizeHandle"),m=e.useTemplateRef("leftConnectionHandle"),w=e.useTemplateRef("rightConnectionHandle"),{width:M}=te(r),{left:V,right:x}=te(o),v=e.ref(t.start),g=e.ref(t.end||v.value+t.colspan),h=e.ref(!1),p=e.ref(!1),E=e.ref(!1),I=e.ref(!1),N=e.ref(!1),A=e.ref({startX:0,startY:0,endX:0,endY:0}),y=e.computed(()=>he.value||U.value||_.value),S=e.computed(()=>t.colspan>0?M.value/t.colspan:0),Z=e.computed(()=>{const R=v.value/t.colspan*100,D=g.value/t.colspan*100;return{left:`${R}%`,width:`${D-R}%`,backgroundColor:f.value}}),L=e.computed(()=>({position:"fixed",top:0,left:0,width:"100vw",height:"100vh",pointerEvents:"none",zIndex:1e3})),z=e.ref({startX:0,startPos:0}),{isDragging:U}=Ie(d,{axis:"x",onStart:()=>ie(V.value,v.value),onMove:({x:R})=>Ne(R),onEnd:({x:R})=>He(R)}),{isDragging:_}=Ie(c,{axis:"x",onStart:()=>ie(x.value,g.value),onMove:({x:R})=>Le(R),onEnd:({x:R})=>pe(R)}),{isDragging:he}=Ie(o,{exact:!0,axis:"x",onStart:()=>ie(V.value,v.value),onMove:({x:R})=>Oe(R),onEnd:({x:R})=>we(R)});e.onMounted(()=>{Pe()}),e.onUnmounted(()=>{Ze()});function ie(R,D){o.value&&(o.value.style.transition="none"),z.value={startX:R,startPos:D}}function Ne(R){if(!U.value||!o.value)return;const P=(R-z.value.startX)/S.value,H=Math.max(0,Math.min(g.value-1,z.value.startPos+P));o.value.style.left=`${H/t.colspan*100}%`,o.value.style.width=`${(g.value-H)/t.colspan*100}%`}function He(R){if(!o.value)return;const D=R-z.value.startX,P=Math.round(D/S.value),H=v.value,F=Math.max(0,Math.min(g.value-1,z.value.startPos+P));v.value=F,t.store.updateGanttBar({rowIndex:t.rowIndex,colIndex:t.colIndex,type:"resize",edge:"start",oldStart:H,newStart:F,end:g.value,delta:P,oldColspan:g.value-H,newColspan:g.value-F})}function Le(R){if(!_.value||!o.value)return;const P=(R-z.value.startX)/S.value,H=Math.max(v.value+1,Math.min(t.columnsCount,z.value.startPos+P));o.value.style.width=`${(H-v.value)/t.colspan*100}%`}function pe(R){if(!o.value)return;const D=R-z.value.startX,P=Math.round(D/S.value),H=g.value,F=Math.max(v.value+1,Math.min(t.columnsCount,z.value.startPos+P));g.value=F,t.store.updateGanttBar({rowIndex:t.rowIndex,colIndex:t.colIndex,type:"resize",edge:"end",oldEnd:H,newEnd:F,start:v.value,delta:P,oldColspan:H-v.value,newColspan:F-v.value})}function Oe(R){if(!he.value||!o.value)return;const P=(R-z.value.startX)/S.value,H=g.value-v.value,F=Math.max(0,Math.min(z.value.startPos+P,t.columnsCount-H));o.value.style.left=`${F/t.colspan*100}%`}function we(R){if(!o.value)return;const D=R-z.value.startX,P=Math.round(D/S.value),H=g.value-v.value,F=v.value,X=g.value;let G=z.value.startPos+P,j=G+H;G<0?(G=0,j=H):j>t.columnsCount&&(j=t.columnsCount,G=j-H),v.value=G,g.value=j,t.store.updateGanttBar({rowIndex:t.rowIndex,colIndex:t.colIndex,type:"bar",oldStart:F,oldEnd:X,newStart:G,newEnd:j,delta:P,colspan:j-G})}function Pe(){const{x:R,y:D}=te(o),{x:P,y:H}=te(m),{x:F,y:X}=te(w);t.store.registerGanttBar({id:l,rowIndex:t.rowIndex,colIndex:t.colIndex,startIndex:v,endIndex:g,color:f,label:t.label,position:{x:R,y:D}}),t.store.isDependencyGraphEnabled&&(t.store.registerConnectionHandle({id:`${l}-connection-left`,rowIndex:t.rowIndex,colIndex:t.colIndex,side:"left",position:{x:P,y:H},visible:h,barId:l}),t.store.registerConnectionHandle({id:`${l}-connection-right`,rowIndex:t.rowIndex,colIndex:t.colIndex,side:"right",position:{x:F,y:X},visible:p,barId:l}))}function Ze(){t.store.unregisterGanttBar(l),t.store.isDependencyGraphEnabled&&(t.store.unregisterConnectionHandle(`${l}-connection-left`),t.store.unregisterConnectionHandle(`${l}-connection-right`))}function Fe(){t.store.isDependencyGraphEnabled&&(h.value=!0,p.value=!0)}function be(){!E.value&&!I.value&&(h.value=!1,p.value=!1)}function ve(R,D){D.preventDefault(),D.stopPropagation(),N.value=!0,R==="left"?E.value=!0:I.value=!0;const P=R==="left"?m.value:w.value;if(P){const X=P.getBoundingClientRect(),G=X.left+X.width/2,j=X.top+X.height/2;A.value={startX:G,startY:j,endX:G,endY:j}}const H=X=>{A.value.endX=X.clientX,A.value.endY=X.clientY},F=X=>{xe(X,R),ye(H,F)};document.addEventListener("mousemove",H),document.addEventListener("mouseup",F)}function xe(R,D){const H=document.elementFromPoint(R.clientX,R.clientY)?.closest(".connection-handle");if(H&&H!==(D==="left"?m.value:w.value)){const F=H.closest(".gantt-bar");if(F){const X=parseInt(F.getAttribute("data-rowindex")||"0"),G=parseInt(F.getAttribute("data-colindex")||"0"),j=H.classList.contains("left-connection-handle")?"left":"right",se=`gantt-bar-row-${X}-col-${G}`,We=t.store.createConnection(`${l}-connection-${D}`,`${se}-connection-${j}`);We&&s("connection:create",We)}}}function ye(R,D){N.value=!1,E.value=!1,I.value=!1,document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",D),o.value?.matches(":hover")||be()}return n({barStyle:Z,cleanupConnectionDrag:ye,currentEnd:g,handleConnectionDrop:xe,isLeftConnectionDragging:E,isLeftConnectionVisible:h,isRightConnectionDragging:I,isRightConnectionVisible:p,showDragPreview:N}),(R,D)=>(e.openBlock(),e.createElementBlock("td",{class:"aganttcell",colspan:t.colspan},[e.createElementVNode("div",sn,[e.createElementVNode("div",{ref:"bar","data-rowindex":t.rowIndex,"data-colindex":t.colIndex,class:e.normalizeClass(["gantt-bar",{"is-dragging":y.value}]),style:e.normalizeStyle(Z.value),onMouseenter:Fe,onMouseleave:be},[t.store.isDependencyGraphEnabled?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"leftConnectionHandle",class:e.normalizeClass(["connection-handle left-connection-handle",{visible:h.value,"is-dragging":E.value}]),onMousedown:D[0]||(D[0]=e.withModifiers(P=>ve("left",P),["stop"]))},[...D[2]||(D[2]=[e.createElementVNode("div",{class:"connection-dot"},null,-1)])],34)):e.createCommentVNode("",!0),t.store.isDependencyGraphEnabled?(e.openBlock(),e.createElementBlock("div",{key:1,ref:"rightConnectionHandle",class:e.normalizeClass(["connection-handle right-connection-handle",{visible:p.value,"is-dragging":I.value}]),onMousedown:D[1]||(D[1]=e.withModifiers(P=>ve("right",P),["stop"]))},[...D[3]||(D[3]=[e.createElementVNode("div",{class:"connection-dot"},null,-1)])],34)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref:"leftResizeHandle",class:e.normalizeClass(["resize-handle left-resize-handle",{"is-dragging":e.unref(U)}])},[...D[4]||(D[4]=[e.createElementVNode("div",{class:"handle-grip"},null,-1),e.createElementVNode("div",{class:"vertical-indicator left-indicator"},null,-1)])],2),t.label?(e.openBlock(),e.createElementBlock("label",dn,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref:"rightResizeHandle",class:e.normalizeClass(["resize-handle right-resize-handle",{"is-dragging":e.unref(_)}])},[...D[5]||(D[5]=[e.createElementVNode("div",{class:"handle-grip"},null,-1),e.createElementVNode("div",{class:"vertical-indicator right-indicator"},null,-1)])],2)],46,cn)],512),t.store.isDependencyGraphEnabled&&N.value?(e.openBlock(),e.createElementBlock("svg",{key:0,style:e.normalizeStyle(L.value)},[e.createElementVNode("line",{x1:A.value.startX,y1:A.value.startY,x2:A.value.endX,y2:A.value.endY,stroke:"#2196f3","stroke-width":"2","stroke-dasharray":"5,5"},null,8,fn)],4)):e.createCommentVNode("",!0)],8,rn))}}),[["__scopeId","data-v-8917a8a3"]]),at=`<?xml version="1.0" encoding="UTF-8"?>
1
+ (function(W,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","pinia"],e):(W=typeof globalThis<"u"?globalThis:W||self,e(W["@stonecrop/atable"]={},W.Vue,W.pinia))})(this,(function(W,e,vt){"use strict";var Ge=document.createElement("style");Ge.textContent=`@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&display=swap";.atable-cell{border-radius:0;box-sizing:border-box;outline:none;box-shadow:none;color:var(--sc-cell-text-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);border-spacing:0px;border-collapse:collapse;overflow:hidden;text-overflow:ellipsis;order:1;white-space:nowrap;max-width:40ch;border-top:1px solid var(--sc-row-border-color);margin:0 0 0 1px}.atable-cell a{color:var(--sc-cell-text-color);text-decoration:none}.atable-cell:focus,.atable-cell:focus-within{background-color:var(--sc-focus-cell-background);outline-width:var(--sc-atable-cell-border-width);outline-style:solid;outline-offset:calc(var(--sc-atable-cell-border-width) * -1);outline-color:var(--sc-focus-cell-outline);box-shadow:none;overflow:hidden;text-wrap:nowrap;box-sizing:border-box}.cell-modified{font-weight:700;font-style:italic}.cell-modified-highlight{background-color:var(--sc-cell-changed-color)}.row-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;display:flex;align-items:center;justify-content:center}.expandable-row{border-top:1px solid var(--sc-row-border-color);height:var(--sc-atable-row-height)}.expandable-row>td:first-child{border-left:4px solid var(--sc-row-border-color)}.expanded-row{border-left:2px solid var(--sc-row-border-color)}.expandable-row:last-child{border-bottom:1px solid var(--sc-row-border-color)}.expanded-row-content{border-top:1px solid var(--sc-row-border-color);padding:1.5rem}.expandable-row.changed-row-gradient[data-v-a42297c7]:has(td.cell-modified){--cell-color-start: color-mix(in srgb, var(--sc-cell-changed-color), #fff 20%);--cell-color-end: color-mix(in srgb, var(--sc-cell-changed-color), #fff 60%);background:linear-gradient(90deg,var(--cell-color-start),var(--cell-color-end))}.aganttcell[data-v-8917a8a3]{background-color:#f9f9f9;width:100%;padding:0;height:100%}.gantt-container[data-v-8917a8a3]{position:relative;height:100%;background-color:#f0f0f0;border-radius:4px;overflow:visible}.gantt-bar[data-v-8917a8a3]{position:absolute;border-radius:4px;display:flex;align-items:center;justify-content:space-between;cursor:grab;box-sizing:border-box;border:1px solid rgba(0,0,0,.5);transition:left .1s ease-out,width .1s ease-out;height:80%;top:50%;z-index:2;transform:translateY(-50%)}.gantt-bar[data-v-8917a8a3]:active{cursor:grabbing}.gantt-bar.is-dragging[data-v-8917a8a3]{z-index:10}.gantt-label[data-v-8917a8a3]{flex:1;text-align:center;font-size:12px;color:#aaa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 8px;-webkit-user-select:none;user-select:none}.resize-handle[data-v-8917a8a3]{position:relative;width:12px;height:100%;cursor:ew-resize;display:flex;align-items:center;justify-content:center;z-index:0;background:#00000040}.left-resize-handle[data-v-8917a8a3]{border-right:1px solid rgba(0,0,0,.5)}.right-resize-handle[data-v-8917a8a3]{border-left:1px solid rgba(0,0,0,.5)}.handle-grip[data-v-8917a8a3]{width:4px;height:12px;border-radius:2px;background:#000c}.resize-handle[data-v-8917a8a3]:hover{background-color:#ffffff80}.vertical-indicator[data-v-8917a8a3]{position:absolute;width:2px;opacity:0;pointer-events:none;transition:opacity .2s ease;top:-100vh;height:100vh;z-index:5;background-color:var(--v6d722296)}.left-indicator[data-v-8917a8a3]{left:50%;transform:translate(-50%)}.right-indicator[data-v-8917a8a3]{right:50%;transform:translate(50%)}.resize-handle.is-dragging .vertical-indicator[data-v-8917a8a3]{opacity:.7}.gantt-container[data-v-8917a8a3]:after{content:"";position:absolute;inset:0;background-size:calc(100% / var(--v260b36f8)) 100%;background-image:linear-gradient(to right,rgba(0,0,0,.1) 1px,transparent 1px);pointer-events:none;z-index:1}.connection-handle[data-v-8917a8a3]{position:absolute;top:50%;transform:translateY(-50%);width:16px;height:16px;opacity:0;transition:opacity .2s ease;cursor:crosshair;z-index:15;display:flex;align-items:center;justify-content:center}.connection-handle.visible[data-v-8917a8a3]{opacity:1}.left-connection-handle[data-v-8917a8a3]{left:-16px}.right-connection-handle[data-v-8917a8a3]{right:-16px}.connection-dot[data-v-8917a8a3]{width:8px;height:8px;border-radius:50%;background-color:#2196f3;border:2px solid white;box-shadow:0 1px 3px #0000004d}.connection-handle:hover .connection-dot[data-v-8917a8a3]{background-color:#1976d2;transform:scale(1.2)}.connection-handle.is-dragging[data-v-8917a8a3]{opacity:1!important}.connection-handle.is-dragging .connection-dot[data-v-8917a8a3]{background-color:#1976d2;transform:scale(1.3);box-shadow:0 2px 8px #2196f366}.atable-row-actions{width:2rem;min-width:2rem;padding:0 .25rem;vertical-align:middle;white-space:nowrap;border-top:1px solid var(--sc-row-border-color);background:#fff;-webkit-user-select:none;user-select:none;position:relative}.atable-row-actions.dropdown-active{z-index:500}.row-actions-icons{display:flex;gap:.25rem;align-items:center;justify-content:center}.row-action-btn{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:.125rem;border:none;background:transparent;cursor:pointer;border-radius:.25rem;transition:background-color .15s ease}.row-action-btn:hover{background-color:var(--sc-gray-10, #e5e5e5)}.row-action-btn:focus{outline:2px solid var(--sc-focus-cell-outline, #3b82f6);outline-offset:1px}.row-action-btn .action-icon{display:flex;align-items:center;justify-content:center;width:1rem;height:1rem}.row-action-btn .action-icon :deep(svg){width:100%;height:100%}.row-actions-dropdown{position:relative;display:inline-block}.row-actions-dropdown:has(button:focus){outline:2px solid var(--sc-focus-cell-outline);outline-offset:-2px}.row-actions-toggle{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;border:none;background:transparent;cursor:pointer;border-radius:.25rem;font-size:1rem;font-weight:700;transition:background-color .15s ease}.row-actions-toggle:hover{background-color:var(--sc-gray-10, #e5e5e5)}.dropdown-icon{line-height:1}.row-actions-menu{position:fixed;z-index:9999;min-width:10rem;padding:.25rem 0;background:#fff;border:1px solid var(--sc-row-border-color);border-left:4px solid var(--sc-row-border-color);border-radius:0}.row-actions-menu.menu-flipped{box-shadow:0 -4px 6px -1px #0000001a,0 -2px 4px -2px #0000001a}.row-action-menu-item{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .75rem;border:none;background:transparent;cursor:pointer;text-align:left;font-size:.875rem;transition:background-color .15s ease}.row-action-menu-item:hover{background-color:var(--sc-gray-10, #f5f5f5)}.row-action-menu-item:focus{outline:none;background-color:var(--sc-gray-10, #f5f5f5)}.row-action-menu-item .action-icon{display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;flex-shrink:0}.row-action-menu-item .action-icon :deep(svg){width:100%;height:100%}.row-action-menu-item .action-label{flex:1}.atable-row{background-color:#fff}.atable-row>td:first-child{border-left:4px solid var(--sc-row-border-color)}.list-index{color:var(--sc-header-text-color);font-weight:700;padding-left:var(--sc-atable-row-padding);padding-right:.5em;text-align:left;-webkit-user-select:none;user-select:none;border-top:1px solid var(--sc-row-border-color);text-overflow:ellipsis;overflow:hidden;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.tree-index{color:var(--sc-header-text-color);font-weight:700;text-align:center;-webkit-user-select:none;user-select:none;width:2ch;box-sizing:border-box;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding)}.atable-row:has(td.cell-modified)>td.sticky-column,.atable-row:has(td.cell-modified)>th.sticky-column,.atable-row:has(td.cell-modified)>td.sticky-index,.atable-row:has(td.cell-modified)>th.sticky-index{background:var(--sc-cell-changed-color)}.atable-row.changed-row-gradient[data-v-c35a3748]:has(td.cell-modified){--cell-color-start: color-mix(in srgb, var(--sc-cell-changed-color), #fff 20%);--cell-color-end: color-mix(in srgb, var(--sc-cell-changed-color), #fff 60%);background:linear-gradient(90deg,var(--cell-color-start),var(--cell-color-end))}.gantt-connection-overlay[data-v-71911260]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1}.connection-path[data-v-71911260]{transition:stroke-width .2s ease;pointer-events:auto;cursor:pointer;stroke-dasharray:5px;stroke:var(--sc-cell-text-color)}#arrowhead-marker polygon[data-v-71911260]{fill:var(--sc-cell-text-color)}.animated-path[data-v-71911260]{animation:animated-dash-71911260 infinite 1.5s linear}.connection-path[data-v-71911260]:hover{stroke-width:3px}.connection-hitbox[data-v-71911260]{pointer-events:auto;cursor:pointer}@keyframes animated-dash-71911260{0%{stroke-dashoffset:0px}to{stroke-dashoffset:-10px}}.column-filter[data-v-8487462d]{display:flex;align-items:center;gap:.25rem;width:100%}.filter-input[data-v-8487462d],.filter-select[data-v-8487462d]{background-color:var(--sc-form-background)!important;padding:.15rem .2rem;border:1px solid var(--sc-form-border);border-radius:3px;font-size:.875rem;color:var(--sc-text-color);width:100%;box-sizing:border-box}.filter-input[data-v-8487462d]:focus,.filter-select[data-v-8487462d]:focus{outline:none;border-color:var(--sc-input-active-border-color)}.checkbox-filter[data-v-8487462d]{display:flex;align-items:center;gap:.25rem;font-size:.875rem;color:var(--sc-text-color);cursor:pointer}.filter-checkbox[data-v-8487462d]{margin:0}.date-range-filter[data-v-8487462d]{display:flex;gap:.25rem;align-items:center;width:100%}.date-range-filter .filter-input[data-v-8487462d]{flex:1;min-width:0}.date-separator[data-v-8487462d]{color:var(--sc-gray-50);font-weight:500;padding:0 .25rem;flex-shrink:0}.clear-btn[data-v-8487462d]{background:var(--sc-gray-10, #f0f0f0);border:1px solid var(--sc-form-border);border-radius:3px;color:var(--sc-gray-70);cursor:pointer;font-size:1rem;padding:.15rem .4rem;line-height:1;flex-shrink:0}.atable-header-row th{padding-left:.5ch!important;font-weight:700;min-width:3ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);box-sizing:border-box;color:var(--sc-header-text-color);position:relative}#header-index{padding-left:var(--sc-atable-row-padding);box-sizing:border-box;border-top:none}.tree-index{padding-right:0}th{order:1}.list-expansion-index{width:2ch;margin-left:5px}.cursor-pointer{cursor:pointer}.atable-filters-row th{padding:.25rem .5ch;vertical-align:top}.row-actions-header{width:2rem;min-width:2rem;padding:0 .25rem}:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-changed-color: #d8edff;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: .125rem;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-table-loading-color: 204, 204, 204;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.amodal{position:absolute;background-color:var(--sc-row-color-zebra-dark);z-index:5}.atable-container{position:relative}.sticky-index{position:sticky;left:0;z-index:10;order:0}.sticky-column,th.sticky-column,td.sticky-column,th.sticky-index,td.sticky-index{position:sticky;z-index:10;order:0;background:#fff}.sticky-column-edge,.atable th.sticky-column-edge{border-right:1px solid var(--sc-row-border-color)}[data-v-3d00d51b]:root{--sc-primary-color: #0098c9;--sc-primary-text-color: #ffffff;--sc-brand-color: #202a44;--sc-gray-5: #f2f2f2;--sc-gray-10: #e6e6e6;--sc-gray-20: #cccccc;--sc-gray-50: #808080;--sc-gray-60: #666666;--sc-gray-80: #333333;--sc-brand-danger: #e63c28;--sc-brand-success: #155724;--sc-brand-warning: #b99d3e;--sc-active-cell-background: #ffffff;--sc-active-cell-outline: #e6a92d;--sc-cell-border-color: #ffffff;--sc-cell-text-color: #3a3c41;--sc-focus-cell-background: #ffffff;--sc-focus-cell-outline: #000000;--sc-header-border-color: #ffffff;--sc-header-text-color: var(--sc-gray-20);--sc-row-border-color: var(--sc-gray-20);--sc-row-color-zebra-dark: #dddddd;--sc-row-color-zebra-light: #eeeeee;--sc-row-number-background-color: #ffffff;--sc-input-active-border-color: #000000;--sc-input-active-label-color: #000000;--sc-input-border-color: var(--sc-gray-20);--sc-input-label-color: var(--sc-gray-60);--sc-required-border: #e63c28;--sc-cell-changed-color: #d8edff;--sc-form-border: var(--sc-gray-5);--sc-form-background: #ffffff;--sc-input-field-background: #ffffff;--sc-input-field-disabled-background: var(--sc-gray-5);--sc-font-size: 10px;--sc-font-family: Arimo, Arial, sans-serif;--sc-table-font-size: 16px;--sc-atable-font-family: "Arimo", sans-serif;--sc-atable-row-padding: .125rem;--sc-atable-row-height: 1.5em;--sc-atable-cell-border-width: 2px;--sc-table-loading-color: 204, 204, 204;--sc-btn-border: #cccccc;--sc-btn-color: white;--sc-btn-hover: #f2f2f2;--sc-btn-label-color: black}.atable[data-v-3d00d51b]{position:relative;font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);border-collapse:collapse;box-sizing:border-box;table-layout:auto;width:auto;overflow:clip;height:1px}.atable th[data-v-3d00d51b]{border-width:0px;border-style:solid;border-radius:0;padding-left:.5ch;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);color:var(--sc-gray-60);height:var(--sc-atable-row-height);font-weight:300;letter-spacing:.05rem;order:1;box-sizing:border-box}.atable th[data-v-3d00d51b]:focus{outline:none}.atable[data-v-3d00d51b]:tbody{overflow:hidden;position:relative}.atable[data-v-3d00d51b]:tbody:before{content:"";position:absolute;top:0;left:0;right:0;height:1px;background-color:transparent;z-index:100}.aloading[data-v-a930a25b]{width:100%;border-top:1px solid var(--sc-row-border-color);border-bottom:1px solid var(--sc-row-border-color);display:flex;background-color:#fff;border-left:4px solid var(--sc-row-border-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);align-items:center;box-sizing:border-box;background:var(--sc-focus-cell-background);overflow:hidden;position:relative}.aloading-bar[data-v-a930a25b]{width:100%;height:100%;position:absolute;left:-100%;top:0;background:linear-gradient(90deg,rgba(var(--sc-table-loading-color),0),rgba(var(--sc-table-loading-color),1),rgba(var(--sc-table-loading-color),0));animation:gradient-a930a25b infinite 2s;z-index:0}.aloading-header[data-v-a930a25b]{color:var(--sc-cell-text-color);font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);padding:0;margin:0;font-weight:400;z-index:1}.aloading-header[data-v-a930a25b]:after{content:"...";animation:ellipse-a930a25b 2s;animation-iteration-count:infinite}@keyframes gradient-a930a25b{0%{left:-100%}to{left:100%}}@keyframes ellipse-a930a25b{0%{content:""}20%{content:""}40%{content:"."}60%{content:".."}80%{content:"..."}}.aloading[data-v-e1165876]{width:100%;border-top:1px solid var(--sc-row-border-color);border-bottom:1px solid var(--sc-row-border-color);display:flex;background-color:#fff;border-left:4px solid var(--sc-row-border-color);padding-left:.5ch!important;padding-right:.5ch;padding-top:var(--sc-atable-row-padding);padding-bottom:var(--sc-atable-row-padding);align-items:center;box-sizing:border-box;background:var(--sc-focus-cell-background);overflow:hidden;position:relative}.aloading-bar[data-v-e1165876]{width:50%;height:3px;position:absolute;left:-100%;bottom:0;background:var(--sc-row-border-color);animation:bar-left-e1165876 infinite 2s;z-index:0}.aloading-header[data-v-e1165876]{color:var(--sc-cell-text-color);font-family:var(--sc-atable-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--sc-table-font-size);padding:0;margin:0;font-weight:400;z-index:1}.aloading-header[data-v-e1165876]:after{content:"...";animation:ellipse-e1165876 2s;animation-iteration-count:infinite}@keyframes bar-left-e1165876{0%{left:-50%}to{left:100%}}@keyframes ellipse-e1165876{0%{content:""}20%{content:""}40%{content:"."}60%{content:".."}80%{content:"..."}}
2
+ /*$vite$:1*/`,document.head.appendChild(Ge);function je(t,n){return e.getCurrentScope()?(e.onScopeDispose(t,n),!0):!1}const xt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const yt=t=>t!=null,kt=Object.prototype.toString,Ct=t=>kt.call(t)==="[object Object]",Et=()=>{};function Ce(t){return Array.isArray(t)?t:[t]}function Bt(t,n,i){return e.watch(t,n,{...i,immediate:!0})}const fe=xt?window:void 0;function ue(t){var n;const i=e.toValue(t);return(n=i?.$el)!==null&&n!==void 0?n:i}function ge(...t){const n=(s,f,l,r)=>(s.addEventListener(f,l,r),()=>s.removeEventListener(f,l,r)),i=e.computed(()=>{const s=Ce(e.toValue(t[0])).filter(f=>f!=null);return s.every(f=>typeof f!="string")?s:void 0});return Bt(()=>{var s,f;return[(s=(f=i.value)===null||f===void 0?void 0:f.map(l=>ue(l)))!==null&&s!==void 0?s:[fe].filter(l=>l!=null),Ce(e.toValue(i.value?t[1]:t[0])),Ce(e.unref(i.value?t[2]:t[1])),e.toValue(i.value?t[3]:t[2])]},([s,f,l,r],o,d)=>{if(!s?.length||!f?.length||!l?.length)return;const c=Ct(r)?{...r}:r,m=s.flatMap(p=>f.flatMap(M=>l.map(A=>n(p,M,A,c))));d(()=>{m.forEach(p=>p())})},{flush:"post"})}function Mt(){const t=e.shallowRef(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function Rt(t){const n=Mt();return e.computed(()=>(n.value,!!t()))}function Vt(t,n,i={}){const{window:s=fe,...f}=i;let l;const r=Rt(()=>s&&"MutationObserver"in s),o=()=>{l&&(l.disconnect(),l=void 0)},d=e.watch(e.computed(()=>{const p=Ce(e.toValue(t)).map(ue).filter(yt);return new Set(p)}),p=>{o(),r.value&&p.size&&(l=new MutationObserver(n),p.forEach(M=>l.observe(M,f)))},{immediate:!0,flush:"post"}),c=()=>l?.takeRecords(),m=()=>{d(),o()};return je(m),{isSupported:r,stop:m,takeRecords:c}}function St(t,n,i={}){const{window:s=fe,document:f=s?.document,flush:l="sync"}=i;if(!s||!f)return Et;let r;const o=m=>{r?.(),r=m},d=e.watchEffect(()=>{const m=ue(t);if(m){const{stop:p}=Vt(f,M=>{M.map(A=>[...A.removedNodes]).flat().some(A=>A===m||A.contains(m))&&n(M)},{window:s,childList:!0,subtree:!0});o(p)}},{flush:l}),c=()=>{d(),o()};return je(c),c}function It(t={}){var n;const{window:i=fe,deep:s=!0,triggerOnRemoval:f=!1}=t,l=(n=t.document)!==null&&n!==void 0?n:i?.document,r=()=>{let c=l?.activeElement;if(s)for(var m;c?.shadowRoot;)c=c==null||(m=c.shadowRoot)===null||m===void 0?void 0:m.activeElement;return c},o=e.shallowRef(),d=()=>{o.value=r()};if(i){const c={capture:!0,passive:!0};ge(i,"blur",m=>{m.relatedTarget===null&&d()},c),ge(i,"focus",d,c)}return f&&St(o,d,{document:l}),d(),o}const $t="focusin",Tt="focusout",At=":focus-within";function Dt(t,n={}){const{window:i=fe}=n,s=e.computed(()=>ue(t)),f=e.shallowRef(!1),l=e.computed(()=>f.value);if(!i||!It(n).value)return{focused:l};const r={passive:!0};return ge(s,$t,()=>f.value=!0,r),ge(s,Tt,()=>{var o,d,c;return f.value=(o=(d=s.value)===null||d===void 0||(c=d.matches)===null||c===void 0?void 0:c.call(d,At))!==null&&o!==void 0?o:!1},r),{focused:l}}function zt(t,{window:n=fe,scrollTarget:i}={}){const s=e.ref(!1),f=()=>{if(!n)return;const l=n.document,r=ue(t);if(!r)s.value=!1;else{const o=r.getBoundingClientRect();s.value=o.top<=(n.innerHeight||l.documentElement.clientHeight)&&o.left<=(n.innerWidth||l.documentElement.clientWidth)&&o.bottom>=0&&o.right>=0}};return e.watch(()=>ue(t),()=>f(),{immediate:!0,flush:"post"}),n&&ge(i||n,"scroll",f,{capture:!1,passive:!0}),s}const ne=t=>{let n=zt(t).value;return n=n&&t.offsetHeight>0,n},oe=t=>t.tabIndex>=0,Ye=t=>{const n=t.target;return Ie(n)},Ie=t=>{let n;if(t instanceof HTMLTableCellElement){const i=t.parentElement?.previousElementSibling;if(i){const s=Array.from(i.children)[t.cellIndex];s&&(n=s)}}else if(t instanceof HTMLTableRowElement){const i=t.previousElementSibling;i&&(n=i)}return n&&(!oe(n)||!ne(n))?Ie(n):n},Nt=t=>{const n=t.target;let i;if(n instanceof HTMLTableCellElement){const s=n.parentElement?.parentElement;if(s){const f=s.firstElementChild?.children[n.cellIndex];f&&(i=f)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const f=s.firstElementChild;f&&(i=f)}}return i&&(!oe(i)||!ne(i))?$e(i):i},Ue=t=>{const n=t.target;return $e(n)},$e=t=>{let n;if(t instanceof HTMLTableCellElement){const i=t.parentElement?.nextElementSibling;if(i){const s=Array.from(i.children)[t.cellIndex];s&&(n=s)}}else if(t instanceof HTMLTableRowElement){const i=t.nextElementSibling;i&&(n=i)}return n&&(!oe(n)||!ne(n))?$e(n):n},Ht=t=>{const n=t.target;let i;if(n instanceof HTMLTableCellElement){const s=n.parentElement?.parentElement;if(s){const f=s.lastElementChild?.children[n.cellIndex];f&&(i=f)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const f=s.lastElementChild;f&&(i=f)}}return i&&(!oe(i)||!ne(i))?Ie(i):i},qe=t=>{const n=t.target;return Te(n)},Te=t=>{let n;return t.previousElementSibling?n=t.previousElementSibling:n=t.parentElement?.previousElementSibling?.lastElementChild,n&&(!oe(n)||!ne(n))?Te(n):n},Je=t=>{const n=t.target;return Ae(n)},Ae=t=>{let n;return t.nextElementSibling?n=t.nextElementSibling:n=t.parentElement?.nextElementSibling?.firstElementChild,n&&(!oe(n)||!ne(n))?Ae(n):n},Qe=t=>{const n=t.target.parentElement?.firstElementChild;return n&&(!oe(n)||!ne(n))?Ae(n):n},Ke=t=>{const n=t.target.parentElement?.lastElementChild;return n&&(!oe(n)||!ne(n))?Te(n):n},Ee=["alt","control","shift","meta"],Lt={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Be={"keydown.up":t=>{const n=Ye(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.down":t=>{const n=Ue(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.left":t=>{const n=qe(t);t.preventDefault(),t.stopPropagation(),n&&n.focus()},"keydown.right":t=>{const n=Je(t);t.preventDefault(),t.stopPropagation(),n&&n.focus()},"keydown.control.up":t=>{const n=Nt(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.down":t=>{const n=Ht(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.left":t=>{const n=Qe(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.control.right":t=>{const n=Ke(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.end":t=>{const n=Ke(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const n=Ue(t);n&&n.focus()}},"keydown.shift.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const n=Ye(t);n&&n.focus()}},"keydown.home":t=>{const n=Qe(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.tab":t=>{const n=Je(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())},"keydown.shift.tab":t=>{const n=qe(t);n&&(t.preventDefault(),t.stopPropagation(),n.focus())}};function De(t){const n=r=>{let o=null;return r.parent&&(typeof r.parent=="string"?o=document.querySelector(r.parent):r.parent instanceof HTMLElement?o=r.parent:o=r.parent.value),o},i=r=>{const o=n(r);let d=[];if(typeof r.selectors=="string")d=Array.from(o?o.querySelectorAll(r.selectors):document.querySelectorAll(r.selectors));else if(Array.isArray(r.selectors))for(const c of r.selectors)c instanceof HTMLElement?d.push(c):d.push(c.$el);else if(r.selectors instanceof HTMLElement)d.push(r.selectors);else if(r.selectors?.value)if(Array.isArray(r.selectors.value))for(const c of r.selectors.value)c instanceof HTMLElement?d.push(c):d.push(c.$el);else d.push(r.selectors.value);return d},s=r=>{const o=n(r);let d=[];return r.selectors?d=i(r):o&&(d=Array.from(o.children).filter(c=>oe(c)&&ne(c))),d},f=r=>o=>{const d=Lt[o.key]||o.key.toLowerCase();if(Ee.includes(d))return;const c=r.handlers||Be;for(const m of Object.keys(c)){const[p,...M]=m.split(".");if(p==="keydown"&&M.includes(d)){const A=c[m],x=M.filter(h=>Ee.includes(h)),v=Ee.some(h=>{const g=h.charAt(0).toUpperCase()+h.slice(1);return o.getModifierState(g)});if(x.length>0){if(v){for(const h of Ee)if(M.includes(h)){const g=h.charAt(0).toUpperCase()+h.slice(1);o.getModifierState(g)&&A(o)}}}else v||A(o)}}},l=[];e.onMounted(()=>{for(const r of t){const o=n(r),d=s(r),c=f(r),m=o?[o]:d;for(const p of m){const{focused:M}=Dt(e.ref(p)),A=e.watch(M,x=>{x?p.addEventListener("keydown",c):p.removeEventListener("keydown",c)});l.push(A)}}}),e.onBeforeUnmount(()=>{for(const r of l)r()})}function ze(t,n){return e.getCurrentScope()?(e.onScopeDispose(t,n),!0):!1}const _e=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ot=t=>t!=null,Pt=Object.prototype.toString,Zt=t=>Pt.call(t)==="[object Object]",ce=()=>{};function Ft(...t){if(t.length!==1)return e.toRef(...t);const n=t[0];return typeof n=="function"?e.readonly(e.customRef(()=>({get:n,set:ce}))):e.ref(n)}function Wt(t,n){function i(...s){return new Promise((f,l)=>{Promise.resolve(t(()=>n.apply(this,s),{fn:n,thisArg:this,args:s})).then(f).catch(l)})}return i}function Xt(t,n={}){let i,s,f=ce;const l=d=>{clearTimeout(d),f(),f=ce};let r;return d=>{const c=e.toValue(t),m=e.toValue(n.maxWait);return i&&l(i),c<=0||m!==void 0&&m<=0?(s&&(l(s),s=void 0),Promise.resolve(d())):new Promise((p,M)=>{f=n.rejectOnCancel?M:p,r=d,m&&!s&&(s=setTimeout(()=>{i&&l(i),s=void 0,p(r())},m)),i=setTimeout(()=>{s&&l(s),s=void 0,p(d())},c)})}}function Me(t){return Array.isArray(t)?t:[t]}function Gt(t){return e.getCurrentInstance()}function jt(t,n=200,i={}){return Wt(Xt(n,i),t)}function Yt(t,n={}){if(!e.isRef(t))return e.toRefs(t);const i=Array.isArray(t.value)?Array.from({length:t.value.length}):{};for(const s in t.value)i[s]=e.customRef(()=>({get(){return t.value[s]},set(f){var l;if(!((l=e.toValue(n.replaceRef))!==null&&l!==void 0)||l)if(Array.isArray(t.value)){const r=[...t.value];r[s]=f,t.value=r}else{const r={...t.value,[s]:f};Object.setPrototypeOf(r,Object.getPrototypeOf(t.value)),t.value=r}else t.value[s]=f}}));return i}function Ut(t,n=!0,i){Gt()?e.onMounted(t,i):n?t():e.nextTick(t)}function qt(t,n,i){return e.watch(t,n,{...i,immediate:!0})}const pe=_e?window:void 0;function te(t){var n;const i=e.toValue(t);return(n=i?.$el)!==null&&n!==void 0?n:i}function ae(...t){const n=(s,f,l,r)=>(s.addEventListener(f,l,r),()=>s.removeEventListener(f,l,r)),i=e.computed(()=>{const s=Me(e.toValue(t[0])).filter(f=>f!=null);return s.every(f=>typeof f!="string")?s:void 0});return qt(()=>{var s,f;return[(s=(f=i.value)===null||f===void 0?void 0:f.map(l=>te(l)))!==null&&s!==void 0?s:[pe].filter(l=>l!=null),Me(e.toValue(i.value?t[1]:t[0])),Me(e.unref(i.value?t[2]:t[1])),e.toValue(i.value?t[3]:t[2])]},([s,f,l,r],o,d)=>{if(!s?.length||!f?.length||!l?.length)return;const c=Zt(r)?{...r}:r,m=s.flatMap(p=>f.flatMap(M=>l.map(A=>n(p,M,A,c))));d(()=>{m.forEach(p=>p())})},{flush:"post"})}function Ne(t,n,i={}){const{window:s=pe,ignore:f=[],capture:l=!0,detectIframe:r=!1,controls:o=!1}=i;if(!s)return o?{stop:ce,cancel:ce,trigger:ce}:ce;let d=!0;const c=h=>e.toValue(f).some(g=>{if(typeof g=="string")return Array.from(s.document.querySelectorAll(g)).some(w=>w===h.target||h.composedPath().includes(w));{const w=te(g);return w&&(h.target===w||h.composedPath().includes(w))}});function m(h){const g=e.toValue(h);return g&&g.$.subTree.shapeFlag===16}function p(h,g){const w=e.toValue(h),B=w.$.subTree&&w.$.subTree.children;return B==null||!Array.isArray(B)?!1:B.some(R=>R.el===g.target||g.composedPath().includes(R.el))}const M=h=>{const g=te(t);if(h.target!=null&&!(!(g instanceof Element)&&m(t)&&p(t,h))&&!(!g||g===h.target||h.composedPath().includes(g))){if("detail"in h&&h.detail===0&&(d=!c(h)),!d){d=!0;return}n(h)}};let A=!1;const x=[ae(s,"click",h=>{A||(A=!0,setTimeout(()=>{A=!1},0),M(h))},{passive:!0,capture:l}),ae(s,"pointerdown",h=>{const g=te(t);d=!c(h)&&!!(g&&!h.composedPath().includes(g))},{passive:!0}),r&&ae(s,"blur",h=>{setTimeout(()=>{var g;const w=te(t);((g=s.document.activeElement)===null||g===void 0?void 0:g.tagName)==="IFRAME"&&!w?.contains(s.document.activeElement)&&n(h)},0)},{passive:!0})].filter(Boolean),v=()=>x.forEach(h=>h());return o?{stop:v,cancel:()=>{d=!1},trigger:h=>{d=!0,M(h),d=!1}}:v}function Jt(){const t=e.shallowRef(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function et(t){const n=Jt();return e.computed(()=>(n.value,!!t()))}function tt(t,n,i={}){const{window:s=pe,...f}=i;let l;const r=et(()=>s&&"MutationObserver"in s),o=()=>{l&&(l.disconnect(),l=void 0)},d=e.watch(e.computed(()=>{const p=Me(e.toValue(t)).map(te).filter(Ot);return new Set(p)}),p=>{o(),r.value&&p.size&&(l=new MutationObserver(n),p.forEach(M=>l.observe(M,f)))},{immediate:!0,flush:"post"}),c=()=>l?.takeRecords(),m=()=>{d(),o()};return ze(m),{isSupported:r,stop:m,takeRecords:c}}const Re={speed:2,margin:30,direction:"both"};function Qt(t){t.scrollLeft>t.scrollWidth-t.clientWidth&&(t.scrollLeft=Math.max(0,t.scrollWidth-t.clientWidth)),t.scrollTop>t.scrollHeight-t.clientHeight&&(t.scrollTop=Math.max(0,t.scrollHeight-t.clientHeight))}function He(t,n={}){var i,s,f,l;const{pointerTypes:r,preventDefault:o,stopPropagation:d,exact:c,onMove:m,onEnd:p,onStart:M,initialValue:A,axis:x="both",draggingElement:v=pe,containerElement:h,handle:g=t,buttons:w=[0],restrictInView:B,autoScroll:R=!1}=n,I=e.ref((i=e.toValue(A))!==null&&i!==void 0?i:{x:0,y:0}),S=e.ref(),$=k=>r?r.includes(k.pointerType):!0,L=k=>{e.toValue(o)&&k.preventDefault(),e.toValue(d)&&k.stopPropagation()},Q=e.toValue(R),F=typeof Q=="object"?{speed:(s=e.toValue(Q.speed))!==null&&s!==void 0?s:Re.speed,margin:(f=e.toValue(Q.margin))!==null&&f!==void 0?f:Re.margin,direction:(l=Q.direction)!==null&&l!==void 0?l:Re.direction}:Re,X=k=>typeof k=="number"?[k,k]:[k.x,k.y],ee=(k,T,H)=>{const{clientWidth:G,clientHeight:O,scrollLeft:q,scrollTop:le,scrollWidth:se,scrollHeight:V}=k,[D,Z]=X(F.margin),[P,j]=X(F.speed);let Y=0,J=0;(F.direction==="x"||F.direction==="both")&&(H.x<D&&q>0?Y=-P:H.x+T.width>G-D&&q<se-G&&(Y=P)),(F.direction==="y"||F.direction==="both")&&(H.y<Z&&le>0?J=-j:H.y+T.height>O-Z&&le<V-O&&(J=j)),(Y||J)&&k.scrollBy({left:Y,top:J,behavior:"auto"})};let K=null;const me=()=>{const k=e.toValue(h);k&&!K&&(K=setInterval(()=>{const T=e.toValue(t).getBoundingClientRect(),{x:H,y:G}=I.value,O={x:H-k.scrollLeft,y:G-k.scrollTop};O.x>=0&&O.y>=0&&(ee(k,T,O),O.x+=k.scrollLeft,O.y+=k.scrollTop,I.value=O)},1e3/60))},ie=()=>{K&&(clearInterval(K),K=null)},be=(k,T,H,G)=>{const[O,q]=typeof H=="number"?[H,H]:[H.x,H.y],{clientWidth:le,clientHeight:se}=T;return k.x<O||k.x+G.width>le-O||k.y<q||k.y+G.height>se-q},ve=()=>{if(e.toValue(n.disabled)||!S.value)return;const k=e.toValue(h);if(!k)return;const T=e.toValue(t).getBoundingClientRect(),{x:H,y:G}=I.value;be({x:H-k.scrollLeft,y:G-k.scrollTop},k,F.margin,T)?me():ie()};e.toValue(R)&&e.watch(I,ve);const xe=k=>{var T;if(!e.toValue(w).includes(k.button)||e.toValue(n.disabled)||!$(k)||e.toValue(c)&&k.target!==e.toValue(t))return;const H=e.toValue(h),G=H==null||(T=H.getBoundingClientRect)===null||T===void 0?void 0:T.call(H),O=e.toValue(t).getBoundingClientRect(),q={x:k.clientX-(H?O.left-G.left+(R?0:H.scrollLeft):O.left),y:k.clientY-(H?O.top-G.top+(R?0:H.scrollTop):O.top)};M?.(q,k)!==!1&&(S.value=q,L(k))},he=k=>{if(e.toValue(n.disabled)||!$(k)||!S.value)return;const T=e.toValue(h);T instanceof HTMLElement&&Qt(T);const H=e.toValue(t).getBoundingClientRect();let{x:G,y:O}=I.value;if((x==="x"||x==="both")&&(G=k.clientX-S.value.x,T&&(G=Math.min(Math.max(0,G),T.scrollWidth-H.width))),(x==="y"||x==="both")&&(O=k.clientY-S.value.y,T&&(O=Math.min(Math.max(0,O),T.scrollHeight-H.height))),e.toValue(R)&&T&&(K===null&&ee(T,H,{x:G,y:O}),G+=T.scrollLeft,O+=T.scrollTop),T&&(B||R)){if(x!=="y"){const q=G-T.scrollLeft;q<0?G=T.scrollLeft:q>T.clientWidth-H.width&&(G=T.clientWidth-H.width+T.scrollLeft)}if(x!=="x"){const q=O-T.scrollTop;q<0?O=T.scrollTop:q>T.clientHeight-H.height&&(O=T.clientHeight-H.height+T.scrollTop)}}I.value={x:G,y:O},m?.(I.value,k),L(k)},ye=k=>{e.toValue(n.disabled)||!$(k)||S.value&&(S.value=void 0,R&&ie(),p?.(I.value,k),L(k))};if(_e){const k=()=>{var T;return{capture:(T=n.capture)!==null&&T!==void 0?T:!0,passive:!e.toValue(o)}};ae(g,"pointerdown",xe,k),ae(v,"pointermove",he,k),ae(v,"pointerup",ye,k)}return{...Yt(I),position:I,isDragging:e.computed(()=>!!S.value),style:e.computed(()=>`
3
+ left: ${I.value.x}px;
4
+ top: ${I.value.y}px;
5
+ ${R?"text-wrap: nowrap;":""}
6
+ `)}}function Ve(t,n,i={}){const{window:s=pe,...f}=i;let l;const r=et(()=>s&&"ResizeObserver"in s),o=()=>{l&&(l.disconnect(),l=void 0)},d=e.watch(e.computed(()=>{const m=e.toValue(t);return Array.isArray(m)?m.map(p=>te(p)):[te(m)]}),m=>{if(o(),r.value&&s){l=new ResizeObserver(n);for(const p of m)p&&l.observe(p,f)}},{immediate:!0,flush:"post"}),c=()=>{o(),d()};return ze(c),{isSupported:r,stop:c}}function de(t,n={}){const{reset:i=!0,windowResize:s=!0,windowScroll:f=!0,immediate:l=!0,updateTiming:r="sync"}=n,o=e.shallowRef(0),d=e.shallowRef(0),c=e.shallowRef(0),m=e.shallowRef(0),p=e.shallowRef(0),M=e.shallowRef(0),A=e.shallowRef(0),x=e.shallowRef(0);function v(){const g=te(t);if(!g){i&&(o.value=0,d.value=0,c.value=0,m.value=0,p.value=0,M.value=0,A.value=0,x.value=0);return}const w=g.getBoundingClientRect();o.value=w.height,d.value=w.bottom,c.value=w.left,m.value=w.right,p.value=w.top,M.value=w.width,A.value=w.x,x.value=w.y}function h(){r==="sync"?v():r==="next-frame"&&requestAnimationFrame(()=>v())}return Ve(t,h),e.watch(()=>te(t),g=>!g&&h()),tt(t,h,{attributeFilter:["style","class"]}),f&&ae("scroll",h,{capture:!0,passive:!0}),s&&ae("resize",h,{passive:!0}),Ut(()=>{l&&h()}),{height:o,bottom:d,left:c,right:m,top:p,width:M,x:A,y:x,update:h}}function Le(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}const Oe=new WeakMap;function Kt(t,n=!1){const i=e.shallowRef(n);let s="";e.watch(Ft(t),r=>{const o=Le(e.toValue(r));if(o){const d=o;if(Oe.get(d)||Oe.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(s=d.style.overflow),d.style.overflow==="hidden")return i.value=!0;if(i.value)return d.style.overflow="hidden"}},{immediate:!0});const f=()=>{const r=Le(e.toValue(t));!r||i.value||(r.style.overflow="hidden",i.value=!0)},l=()=>{const r=Le(e.toValue(t));!r||!i.value||(r.style.overflow=s,Oe.delete(r),i.value=!1)};return ze(l),e.computed({get(){return i.value},set(r){r?f():l()}})}const _t=t=>{const n=new DOMParser().parseFromString(t,"text/html");return Array.from(n.body.childNodes).some(i=>i.nodeType===1)},en=(t=8)=>Array.from({length:t},()=>Math.floor(Math.random()*16).toString(16)).join(""),tn=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],nn=["innerHTML"],on={key:2},nt=e.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},store:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},pinned:{type:Boolean,default:!1},debounce:{default:300}},setup(t,{expose:n}){const i=e.useTemplateRef("cell"),s=t.store.getCellData(t.colIndex,t.rowIndex),f=e.ref(""),l=e.ref(!1),r=t.store.columns[t.colIndex],o=t.store.rows[t.rowIndex],d=r.align||"center",c=r.width||"40ch",m=e.computed(()=>t.store.getCellDisplayValue(t.colIndex,t.rowIndex)),p=e.computed(()=>typeof m.value=="string"?_t(m.value):!1),M=e.computed(()=>({textAlign:d,width:c,fontWeight:l.value?"bold":"inherit",paddingLeft:t.store.getIndent(t.colIndex,t.store.display[t.rowIndex]?.indent)})),A=e.computed(()=>({"sticky-column":t.pinned,"cell-modified":l.value})),x=()=>{h(),v()},v=()=>{const{left:S,bottom:$,width:L,height:Q}=de(i);r.mask,r.modalComponent&&t.store.$patch(F=>{F.modal.visible=!0,F.modal.colIndex=t.colIndex,F.modal.rowIndex=t.rowIndex,F.modal.left=S,F.modal.bottom=$,F.modal.width=L,F.modal.height=Q,F.modal.cell=i.value,typeof r.modalComponent=="function"?F.modal.component=r.modalComponent({table:F.table,row:o,column:r}):F.modal.component=r.modalComponent,F.modal.componentProps=r.modalComponentExtraProps})};if(t.addNavigation){let S={...Be,"keydown.f2":v,"keydown.alt.up":v,"keydown.alt.down":v,"keydown.alt.left":v,"keydown.alt.right":v};typeof t.addNavigation=="object"&&(S={...S,...t.addNavigation}),De([{selectors:i,handlers:S}])}const h=()=>{if(i.value&&r.edit){const S=window.getSelection();if(S)try{const $=document.createRange();$.selectNodeContents&&($.selectNodeContents(i.value),S.removeAllRanges(),S.addRange($))}catch{}}},g=()=>{i.value&&(f.value=i.value.textContent,h())},w=()=>{try{const S=window.getSelection();if(S&&S.rangeCount>0&&i.value){const $=S.getRangeAt(0),L=$.cloneRange();if(L.selectNodeContents&&L.setEnd)return L.selectNodeContents(i.value),L.setEnd($.endContainer,$.endOffset),L.toString().length}}catch{}return 0},B=S=>{if(i.value)try{const $=window.getSelection();if(!$)return;let L=0;const Q=document.createTreeWalker?document.createTreeWalker(i.value,NodeFilter.SHOW_TEXT,null):null;if(!Q)return;let F,X=null;for(;F=Q.nextNode();){const ee=F,K=L+ee.textContent.length;if(S<=K&&(X=document.createRange(),X.setStart&&X.setEnd)){X.setStart(ee,S-L),X.setEnd(ee,S-L);break}L=K}X&&$.removeAllRanges&&$.addRange&&($.removeAllRanges(),$.addRange(X))}catch{}},R=S=>{if(!r.edit)return;const $=S.target;if($.textContent===f.value)return;const L=w();f.value=$.textContent,r.format?(l.value=$.textContent!==t.store.getFormattedValue(t.colIndex,t.rowIndex,s),t.store.setCellText(t.colIndex,t.rowIndex,$.textContent)):(l.value=$.textContent!==s,t.store.setCellData(t.colIndex,t.rowIndex,$.textContent)),e.nextTick().then(()=>{B(L)})},I=jt(R,t.debounce);return n({currentData:f}),(S,$)=>(e.openBlock(),e.createElementBlock("td",{ref:"cell","data-colindex":t.colIndex,"data-rowindex":t.rowIndex,"data-editable":e.unref(r).edit,contenteditable:e.unref(r).edit,tabindex:t.tabIndex,spellcheck:!1,style:e.normalizeStyle(M.value),class:e.normalizeClass(["atable-cell",A.value]),onFocus:g,onPaste:R,onInput:$[0]||($[0]=(...L)=>e.unref(I)&&e.unref(I)(...L)),onClick:x},[e.unref(r).cellComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r).cellComponent),e.mergeProps({key:0,value:m.value},e.unref(r).cellComponentProps),null,16,["value"])):p.value?(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:m.value},null,8,nn)):(e.openBlock(),e.createElementBlock("span",on,e.toDisplayString(m.value),1))],46,tn))}}),ln=["tabindex"],an=["tabindex"],rn=["colspan"],sn=e.defineComponent({__name:"AExpansionRow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:()=>Be}},setup(t){const n=e.useTemplateRef("rowEl"),i=e.computed(()=>t.store.display[t.rowIndex].expanded?"▼":"►");if(t.addNavigation){const s={"keydown.control.g":f=>{f.stopPropagation(),f.preventDefault(),t.store.toggleRowExpand(t.rowIndex)}};typeof t.addNavigation=="object"&&Object.assign(s,t.addNavigation),De([{selectors:n,handlers:s}])}return(s,f)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",e.mergeProps(s.$attrs,{ref:"rowEl",tabindex:t.tabIndex,class:"expandable-row"}),[e.createElementVNode("td",{tabIndex:-1,class:"row-index",onClick:f[0]||(f[0]=l=>t.store.toggleRowExpand(t.rowIndex))},e.toDisplayString(i.value),1),e.renderSlot(s.$slots,"row",{},void 0,!0)],16,ln),t.store.display[t.rowIndex].expanded?(e.openBlock(),e.createElementBlock("tr",{key:0,ref:"rowExpanded",tabindex:t.tabIndex,class:"expanded-row"},[e.createElementVNode("td",{tabIndex:-1,colspan:t.store.columns.length+1,class:"expanded-row-content"},[e.renderSlot(s.$slots,"content",{},void 0,!0)],8,rn)],8,an)):e.createCommentVNode("",!0)],64))}}),re=(t,n)=>{const i=t.__vccOpts||t;for(const[s,f]of n)i[s]=f;return i},ot=re(sn,[["__scopeId","data-v-a42297c7"]]),cn=["colspan"],dn={ref:"container",class:"gantt-container"},fn=["data-rowindex","data-colindex"],un={key:2,class:"gantt-label"},mn=["x1","y1","x2","y2"],lt=re(e.defineComponent({__name:"AGanttCell",props:{store:{},columnsCount:{},rowIndex:{},colIndex:{},start:{default:0},end:{default:0},colspan:{default:1},label:{default:""},color:{default:"#cccccc"}},emits:["connection:create"],setup(t,{expose:n,emit:i}){e.useCssVars(V=>({v6d722296:f.value,v260b36f8:V.colspan}));const s=i,f=e.ref(t.color.length>=6?t.color:"#cccccc"),l=`gantt-bar-row-${t.rowIndex}-col-${t.colIndex}`,r=e.useTemplateRef("container"),o=e.useTemplateRef("bar"),d=e.useTemplateRef("leftResizeHandle"),c=e.useTemplateRef("rightResizeHandle"),m=e.useTemplateRef("leftConnectionHandle"),p=e.useTemplateRef("rightConnectionHandle"),{width:M}=de(r),{left:A,right:x}=de(o),v=e.ref(t.start),h=e.ref(t.end||v.value+t.colspan),g=e.ref(!1),w=e.ref(!1),B=e.ref(!1),R=e.ref(!1),I=e.ref(!1),S=e.ref({startX:0,startY:0,endX:0,endY:0}),$=e.computed(()=>me.value||ee.value||K.value),L=e.computed(()=>t.colspan>0?M.value/t.colspan:0),Q=e.computed(()=>{const V=v.value/t.colspan*100,D=h.value/t.colspan*100;return{left:`${V}%`,width:`${D-V}%`,backgroundColor:f.value}}),F=e.computed(()=>({position:"fixed",top:0,left:0,width:"100vw",height:"100vh",pointerEvents:"none",zIndex:1e3})),X=e.ref({startX:0,startPos:0}),{isDragging:ee}=He(d,{axis:"x",onStart:()=>ie(A.value,v.value),onMove:({x:V})=>be(V),onEnd:({x:V})=>ve(V)}),{isDragging:K}=He(c,{axis:"x",onStart:()=>ie(x.value,h.value),onMove:({x:V})=>xe(V),onEnd:({x:V})=>he(V)}),{isDragging:me}=He(o,{exact:!0,axis:"x",onStart:()=>ie(A.value,v.value),onMove:({x:V})=>ye(V),onEnd:({x:V})=>k(V)});e.onMounted(()=>{T()}),e.onUnmounted(()=>{H()});function ie(V,D){o.value&&(o.value.style.transition="none"),X.value={startX:V,startPos:D}}function be(V){if(!ee.value||!o.value)return;const Z=(V-X.value.startX)/L.value,P=Math.max(0,Math.min(h.value-1,X.value.startPos+Z));o.value.style.left=`${P/t.colspan*100}%`,o.value.style.width=`${(h.value-P)/t.colspan*100}%`}function ve(V){if(!o.value)return;const D=V-X.value.startX,Z=Math.round(D/L.value),P=v.value,j=Math.max(0,Math.min(h.value-1,X.value.startPos+Z));v.value=j,t.store.updateGanttBar({rowIndex:t.rowIndex,colIndex:t.colIndex,type:"resize",edge:"start",oldStart:P,newStart:j,end:h.value,delta:Z,oldColspan:h.value-P,newColspan:h.value-j})}function xe(V){if(!K.value||!o.value)return;const Z=(V-X.value.startX)/L.value,P=Math.max(v.value+1,Math.min(t.columnsCount,X.value.startPos+Z));o.value.style.width=`${(P-v.value)/t.colspan*100}%`}function he(V){if(!o.value)return;const D=V-X.value.startX,Z=Math.round(D/L.value),P=h.value,j=Math.max(v.value+1,Math.min(t.columnsCount,X.value.startPos+Z));h.value=j,t.store.updateGanttBar({rowIndex:t.rowIndex,colIndex:t.colIndex,type:"resize",edge:"end",oldEnd:P,newEnd:j,start:v.value,delta:Z,oldColspan:P-v.value,newColspan:j-v.value})}function ye(V){if(!me.value||!o.value)return;const Z=(V-X.value.startX)/L.value,P=h.value-v.value,j=Math.max(0,Math.min(X.value.startPos+Z,t.columnsCount-P));o.value.style.left=`${j/t.colspan*100}%`}function k(V){if(!o.value)return;const D=V-X.value.startX,Z=Math.round(D/L.value),P=h.value-v.value,j=v.value,Y=h.value;let J=X.value.startPos+Z,_=J+P;J<0?(J=0,_=P):_>t.columnsCount&&(_=t.columnsCount,J=_-P),v.value=J,h.value=_,t.store.updateGanttBar({rowIndex:t.rowIndex,colIndex:t.colIndex,type:"bar",oldStart:j,oldEnd:Y,newStart:J,newEnd:_,delta:Z,colspan:_-J})}function T(){const{x:V,y:D}=de(o),{x:Z,y:P}=de(m),{x:j,y:Y}=de(p);t.store.registerGanttBar({id:l,rowIndex:t.rowIndex,colIndex:t.colIndex,startIndex:v,endIndex:h,color:f,label:t.label,position:{x:V,y:D}}),t.store.isDependencyGraphEnabled&&(t.store.registerConnectionHandle({id:`${l}-connection-left`,rowIndex:t.rowIndex,colIndex:t.colIndex,side:"left",position:{x:Z,y:P},visible:g,barId:l}),t.store.registerConnectionHandle({id:`${l}-connection-right`,rowIndex:t.rowIndex,colIndex:t.colIndex,side:"right",position:{x:j,y:Y},visible:w,barId:l}))}function H(){t.store.unregisterGanttBar(l),t.store.isDependencyGraphEnabled&&(t.store.unregisterConnectionHandle(`${l}-connection-left`),t.store.unregisterConnectionHandle(`${l}-connection-right`))}function G(){t.store.isDependencyGraphEnabled&&(g.value=!0,w.value=!0)}function O(){!B.value&&!R.value&&(g.value=!1,w.value=!1)}function q(V,D){D.preventDefault(),D.stopPropagation(),I.value=!0,V==="left"?B.value=!0:R.value=!0;const Z=V==="left"?m.value:p.value;if(Z){const Y=Z.getBoundingClientRect(),J=Y.left+Y.width/2,_=Y.top+Y.height/2;S.value={startX:J,startY:_,endX:J,endY:_}}const P=Y=>{S.value.endX=Y.clientX,S.value.endY=Y.clientY},j=Y=>{le(Y,V),se(P,j)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",j)}function le(V,D){const P=document.elementFromPoint(V.clientX,V.clientY)?.closest(".connection-handle");if(P&&P!==(D==="left"?m.value:p.value)){const j=P.closest(".gantt-bar");if(j){const Y=parseInt(j.getAttribute("data-rowindex")||"0"),J=parseInt(j.getAttribute("data-colindex")||"0"),_=P.classList.contains("left-connection-handle")?"left":"right",ke=`gantt-bar-row-${Y}-col-${J}`,Xe=t.store.createConnection(`${l}-connection-${D}`,`${ke}-connection-${_}`);Xe&&s("connection:create",Xe)}}}function se(V,D){I.value=!1,B.value=!1,R.value=!1,document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",D),o.value?.matches(":hover")||O()}return n({barStyle:Q,cleanupConnectionDrag:se,currentEnd:h,handleConnectionDrop:le,isLeftConnectionDragging:B,isLeftConnectionVisible:g,isRightConnectionDragging:R,isRightConnectionVisible:w,showDragPreview:I}),(V,D)=>(e.openBlock(),e.createElementBlock("td",{class:"aganttcell",colspan:t.colspan},[e.createElementVNode("div",dn,[e.createElementVNode("div",{ref:"bar","data-rowindex":t.rowIndex,"data-colindex":t.colIndex,class:e.normalizeClass(["gantt-bar",{"is-dragging":$.value}]),style:e.normalizeStyle(Q.value),onMouseenter:G,onMouseleave:O},[t.store.isDependencyGraphEnabled?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"leftConnectionHandle",class:e.normalizeClass(["connection-handle left-connection-handle",{visible:g.value,"is-dragging":B.value}]),onMousedown:D[0]||(D[0]=e.withModifiers(Z=>q("left",Z),["stop"]))},[...D[2]||(D[2]=[e.createElementVNode("div",{class:"connection-dot"},null,-1)])],34)):e.createCommentVNode("",!0),t.store.isDependencyGraphEnabled?(e.openBlock(),e.createElementBlock("div",{key:1,ref:"rightConnectionHandle",class:e.normalizeClass(["connection-handle right-connection-handle",{visible:w.value,"is-dragging":R.value}]),onMousedown:D[1]||(D[1]=e.withModifiers(Z=>q("right",Z),["stop"]))},[...D[3]||(D[3]=[e.createElementVNode("div",{class:"connection-dot"},null,-1)])],34)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref:"leftResizeHandle",class:e.normalizeClass(["resize-handle left-resize-handle",{"is-dragging":e.unref(ee)}])},[...D[4]||(D[4]=[e.createElementVNode("div",{class:"handle-grip"},null,-1),e.createElementVNode("div",{class:"vertical-indicator left-indicator"},null,-1)])],2),t.label?(e.openBlock(),e.createElementBlock("label",un,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref:"rightResizeHandle",class:e.normalizeClass(["resize-handle right-resize-handle",{"is-dragging":e.unref(K)}])},[...D[5]||(D[5]=[e.createElementVNode("div",{class:"handle-grip"},null,-1),e.createElementVNode("div",{class:"vertical-indicator right-indicator"},null,-1)])],2)],46,fn)],512),t.store.isDependencyGraphEnabled&&I.value?(e.openBlock(),e.createElementBlock("svg",{key:0,style:e.normalizeStyle(F.value)},[e.createElementVNode("line",{x1:S.value.startX,y1:S.value.startY,x2:S.value.endX,y2:S.value.endY,stroke:"#2196f3","stroke-width":"2","stroke-dasharray":"5,5"},null,8,mn)],4)):e.createCommentVNode("",!0)],8,cn))}}),[["__scopeId","data-v-8917a8a3"]]),at=`<?xml version="1.0" encoding="UTF-8"?>
3
7
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
4
8
  <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
5
9
  <polygon points="34 18 30 18 30 30 18 30 18 34 30 34 30 46 34 46 34 34 46 34 46 30 34 30 34 18" style="fill: #000; stroke-width: 0px;"/>
6
10
  </svg>
7
- `,lt=`<?xml version="1.0" encoding="UTF-8"?>
11
+ `,rt=`<?xml version="1.0" encoding="UTF-8"?>
8
12
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
9
13
  <path d="M32,64C14.35,64,0,49.65,0,32S14.35,0,32,0s32,14.35,32,32-14.35,32-32,32ZM32,4c-15.44,0-28,12.56-28,28s12.56,28,28,28,28-12.56,28-28S47.44,4,32,4Z" style="fill: #000; stroke-width: 0px;"/>
10
14
  <polygon points="46.84 19.99 44.01 17.16 32 29.17 19.99 17.16 17.16 19.99 29.17 32 17.16 44.01 19.99 46.84 32 34.83 44.01 46.84 46.84 44.01 34.83 32 46.84 19.99" style="fill: #000; stroke-width: 0px;"/>
11
- </svg>`,rt=`<?xml version="1.0" encoding="UTF-8"?>
15
+ </svg>`,it=`<?xml version="1.0" encoding="UTF-8"?>
12
16
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.67">
13
17
  <path d="M68.67,16.67h-14.67V2c0-1.1-.9-2-2-2H2C.9,0,0,.9,0,2v50c0,1.1.9,2,2,2h14.67v14.67c0,1.1.9,2,2,2h50c1.1,0,2-.9,2-2V18.67c0-1.1-.9-2-2-2ZM4,4h46v46H4V4ZM66.67,66.67H20.67v-12.67h31.33c1.1,0,2-.9,2-2v-31.33h12.67v46Z" style="fill: #000; stroke-width: 0px;"/>
14
18
  <polygon points="41 25 29 25 29 13 25 13 25 25 13 25 13 29 25 29 25 41 29 41 29 29 41 29 41 25" style="fill: #000; stroke-width: 0px;"/>
15
- </svg>`,it=`<?xml version="1.0" encoding="UTF-8"?>
19
+ </svg>`,st=`<?xml version="1.0" encoding="UTF-8"?>
16
20
  <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 70.6 61.5">
17
21
  <path d="M68.6,45.8v13.7H2v-13.7h66.6M70.6,43.8H0v17.7h70.6v-17.7h0Z"/>
18
22
  <path d="M68.6,24.2v13.7H2v-13.7h66.6M70.6,22.2H0v17.7h70.6v-17.7h0Z"/>
@@ -26,7 +30,7 @@
26
30
  <polygon points="70.6 18.7 68.1 18.7 68.1 16.7 68.6 16.7 68.6 16.2 70.6 16.2 70.6 18.7"/>
27
31
  <path d="M70.6,13.4h-2v-2.7h2v2.7ZM70.6,8h-2v-2.7h2v2.7Z"/>
28
32
  </g>
29
- </svg>`,st=`<?xml version="1.0" encoding="UTF-8"?>
33
+ </svg>`,ct=`<?xml version="1.0" encoding="UTF-8"?>
30
34
  <svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 70.6 61.5">
31
35
  <g>
32
36
  <polygon points="70.6 45.3 68.6 45.3 68.6 44.8 68.1 44.8 68.1 42.8 70.6 42.8 70.6 45.3"/>
@@ -40,8 +44,8 @@
40
44
  </g>
41
45
  <path d="M68.6,23.7v13.7H2v-13.7h66.6M70.6,21.7H0v17.7h70.6v-17.7h0Z"/>
42
46
  <path d="M68.6,2v13.7H2V2h66.6M70.6,0H0v17.7h70.6V0h0Z"/>
43
- </svg>`,ct=`<?xml version="1.0" encoding="UTF-8"?>
47
+ </svg>`,dt=`<?xml version="1.0" encoding="UTF-8"?>
44
48
  <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70.67 70.64">
45
49
  <path d="M70.08,33.9l-9.75-9.75-2.83,2.83,6.33,6.33h-26.51V6.81l6.33,6.33,2.83-2.83L36.75.56c-.75-.75-2.08-.75-2.83,0l-9.75,9.75,2.83,2.83,6.33-6.33v26.5H6.83l6.33-6.33-2.83-2.83L.59,33.9c-.38.38-.59.88-.59,1.41s.21,1.04.59,1.41l9.75,9.75,2.83-2.83-6.33-6.33h26.5v26.51l-6.33-6.33-2.83,2.83,9.75,9.75c.38.38.88.59,1.41.59s1.04-.21,1.41-.59l9.75-9.75-2.83-2.83-6.33,6.33v-26.51h26.51l-6.33,6.33,2.83,2.83,9.75-9.75c.38-.38.59-.88.59-1.41s-.21-1.04-.59-1.41Z" style="fill: #000; stroke-width: 0px;"/>
46
- </svg>`,dt={add:at,delete:lt,duplicate:rt,insertAbove:it,insertBelow:st,move:ct},un={key:0,class:"row-actions-dropdown"},mn=["aria-expanded"],gn=["onClick"],hn=["innerHTML"],pn={class:"action-label"},wn={key:1,class:"row-actions-icons"},bn=["title","aria-label","onClick"],vn=["innerHTML"],re=e.defineComponent({__name:"ARowActions",props:{rowIndex:{},store:{},config:{},position:{}},emits:["action"],setup(t,{emit:n}){const i=t,s=n,f=e.useTemplateRef("actionsCell"),l=e.useTemplateRef("toggleButton"),r=e.ref(0),o=e.ref(!1),d=e.ref(!1),c=e.ref({top:0,left:0}),m={add:"Add Row",delete:"Delete Row",duplicate:"Duplicate Row",insertAbove:"Insert Above",insertBelow:"Insert Below",move:"Move Row"},w=e.computed(()=>{const h=[],p=i.config.actions||{},E=["add","delete","duplicate","insertAbove","insertBelow","move"];for(const I of E){const N=p[I];if(N===!1||N===void 0)continue;let A=!0,y=m[I],S=dt[I];typeof N=="object"&&(A=N.enabled!==!1,y=N.label||y,S=N.icon||S),A&&h.push({type:I,label:y,icon:S})}return h}),M=e.computed(()=>{if(i.config.forceDropdown)return!0;const h=i.config.dropdownThreshold??150;return h===0?!1:r.value>0&&r.value<h}),V=e.computed(()=>o.value?d.value?{position:"fixed",bottom:`${window.innerHeight-c.value.top}px`,left:`${c.value.left}px`,top:"auto"}:{position:"fixed",top:`${c.value.top}px`,left:`${c.value.left}px`}:{});me(f,h=>{const p=h[0];p&&(r.value=p.contentRect.width)});const x=()=>{o.value||v(),o.value=!o.value},v=()=>{if(!l.value)return;const h=l.value.getBoundingClientRect(),p=window.innerHeight,E=w.value.length*40+16,I=p-h.bottom,N=h.top;d.value=I<E&&N>E,d.value?c.value={top:h.top,left:h.left}:c.value={top:h.bottom,left:h.left}};Ve(f,()=>{o.value=!1});const g=h=>{o.value=!1;const p=i.config.actions?.[h];typeof p=="object"&&p.handler&&p.handler(i.rowIndex,i.store)===!1||s("action",h,i.rowIndex)};return(h,p)=>(e.openBlock(),e.createElementBlock("td",{ref:"actionsCell",class:e.normalizeClass(["atable-row-actions",{"sticky-column":t.position==="before-index","dropdown-active":o.value}])},[M.value?(e.openBlock(),e.createElementBlock("div",un,[e.createElementVNode("button",{ref:"toggleButton",type:"button",class:"row-actions-toggle","aria-expanded":o.value,"aria-haspopup":"true",onClick:e.withModifiers(x,["stop"])},[...p[0]||(p[0]=[e.createElementVNode("span",{class:"dropdown-icon"},"⋮",-1)])],8,mn),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["row-actions-menu",{"menu-flipped":d.value}]),style:e.normalizeStyle(V.value),role:"menu"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,E=>(e.openBlock(),e.createElementBlock("button",{key:E.type,type:"button",class:"row-action-menu-item",role:"menuitem",onClick:e.withModifiers(I=>g(E.type),["stop"])},[e.createElementVNode("span",{class:"action-icon",innerHTML:E.icon},null,8,hn),e.createElementVNode("span",pn,e.toDisplayString(E.label),1)],8,gn))),128))],6),[[e.vShow,o.value]])])):(e.openBlock(),e.createElementBlock("div",wn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,E=>(e.openBlock(),e.createElementBlock("button",{key:E.type,type:"button",class:"row-action-btn",title:E.label,"aria-label":E.label,onClick:e.withModifiers(I=>g(E.type),["stop"])},[e.createElementVNode("span",{class:"action-icon",innerHTML:E.icon},null,8,vn)],8,bn))),128))]))],2))}}),xn=["tabindex"],Ae=K(e.defineComponent({__name:"ARow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},emits:["row:action"],setup(t,{emit:n}){const i=n,s=e.useTemplateRef("rowEl"),f=e.computed(()=>t.store.isRowVisible(t.rowIndex)),l=e.computed(()=>t.store.getRowExpandSymbol(t.rowIndex)),r=e.computed(()=>t.store.config.rowActions||{enabled:!1}),o=e.computed(()=>r.value.enabled),d=e.computed(()=>r.value.position||"before-index"),c=(m,w)=>{i("row:action",m,w)};if(t.addNavigation){let m=fe;typeof t.addNavigation=="object"&&(m={...m,...t.addNavigation}),Me([{selectors:s,handlers:m}])}return(m,w)=>e.withDirectives((e.openBlock(),e.createElementBlock("tr",{ref:"rowEl",tabindex:t.tabIndex,class:"atable-row"},[o.value&&d.value==="before-index"?(e.openBlock(),e.createBlock(re,{key:0,"row-index":t.rowIndex,store:t.store,config:r.value,position:d.value,onAction:c},null,8,["row-index","store","config","position"])):e.createCommentVNode("",!0),t.store.config.view!=="uncounted"?e.renderSlot(m.$slots,"index",{key:1},()=>[t.store.config.view==="list"?(e.openBlock(),e.createElementBlock("td",{key:0,tabIndex:-1,class:e.normalizeClass(["list-index",t.store.hasPinnedColumns?"sticky-index":""])},e.toDisplayString(t.rowIndex+1),3)):t.store.isTreeView?(e.openBlock(),e.createElementBlock("td",{key:1,tabIndex:-1,class:e.normalizeClass(["tree-index",t.store.hasPinnedColumns?"sticky-index":""]),onClick:w[0]||(w[0]=M=>t.store.toggleRowExpand(t.rowIndex))},e.toDisplayString(l.value),3)):e.createCommentVNode("",!0)],!0):e.createCommentVNode("",!0),o.value&&d.value==="after-index"?(e.openBlock(),e.createBlock(re,{key:2,"row-index":t.rowIndex,store:t.store,config:r.value,position:d.value,onAction:c},null,8,["row-index","store","config","position"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default",{},void 0,!0),o.value&&d.value==="end"?(e.openBlock(),e.createBlock(re,{key:3,"row-index":t.rowIndex,store:t.store,config:r.value,position:d.value,onAction:c},null,8,["row-index","store","config","position"])):e.createCommentVNode("",!0)],8,xn)),[[e.vShow,f.value]])}}),[["__scopeId","data-v-c35a3748"]]),De=new WeakMap,yn={mounted(t,n){const i=!n.modifiers.bubble;let s;if(typeof n.value=="function")s=Ve(t,n.value,{capture:i});else{const[f,l]=n.value;s=Ve(t,f,Object.assign({capture:i},l))}De.set(t,s)},unmounted(t){const n=De.get(t);n&&typeof n=="function"?n():n?.stop(),De.delete(t)}},kn={mounted(t,n){typeof n.value=="function"?me(t,n.value):me(t,...n.value)}};function Cn(){let t=!1;const n=e.shallowRef(!1);return(i,s)=>{if(n.value=s.value,t)return;t=!0;const f=Jt(i,s.value);e.watch(n,l=>f.value=l)}}Cn();const En={class:"gantt-connection-overlay"},Bn={class:"connection-svg",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1}},Mn=["d","stroke-width","onDblclick"],Rn=["id","d","stroke","stroke-width","onDblclick"],Vn=.25,ge=16,In=K(e.defineComponent({__name:"AGanttConnection",props:{store:{}},emits:["connection:delete"],setup(t,{emit:n}){const i=n,s=e.computed(()=>t.store.connectionPaths.filter(r=>{const o=t.store.ganttBars.find(c=>c.id===r.from.barId),d=t.store.ganttBars.find(c=>c.id===r.to.barId);return o&&d})),f=r=>{const o=t.store.connectionHandles.find(y=>y.barId===r.from.barId&&y.side===r.from.side),d=t.store.connectionHandles.find(y=>y.barId===r.to.barId&&y.side===r.to.side);if(!o||!d)return"";const c=o.position.x+ge/2,m=o.position.y+ge/2,w=d.position.x+ge/2,M=d.position.y+ge/2,V=Math.abs(w-c),x=Math.max(V*Vn,50),v=c+(r.from.side==="left"?-x:x),g=w+(r.to.side==="left"?-x:x),h={x:.5*c+.5*v,y:.5*m+.5*m},p={x:.5*v+.5*g,y:.5*m+.5*M},E={x:.5*g+.5*w,y:.5*M+.5*M},I={x:.5*h.x+.5*p.x,y:.5*h.y+.5*p.y},N={x:.5*p.x+.5*E.x,y:.5*p.y+.5*E.y},A={x:.5*I.x+.5*N.x,y:.5*I.y+.5*N.y};return`M ${c} ${m} Q ${v} ${m}, ${A.x} ${A.y} Q ${g} ${M}, ${w} ${M}`},l=r=>{t.store.deleteConnection(r.id)&&i("connection:delete",r)};return(r,o)=>(e.openBlock(),e.createElementBlock("div",En,[(e.openBlock(),e.createElementBlock("svg",Bn,[o[0]||(o[0]=e.createElementVNode("defs",null,[e.createElementVNode("path",{id:"arrowhead",d:"M 0 -7 L 20 0 L 0 7Z",stroke:"black","stroke-width":"1",fill:"currentColor"}),e.createElementVNode("marker",{id:"arrowhead-marker",markerWidth:"10",markerHeight:"7",refX:"5",refY:"3.5",orient:"auto",markerUnits:"strokeWidth"},[e.createElementVNode("polygon",{points:"0 0, 10 3.5, 0 7",fill:"currentColor"})])],-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createElementBlock("path",{key:`${d.id}-hitbox`,d:f(d),stroke:"transparent","stroke-width":(d.style?.width||2)+10,fill:"none",class:"connection-hitbox",onDblclick:c=>l(d)},null,40,Mn))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createElementBlock("path",{id:d.id,key:d.id,d:f(d),stroke:d.style?.color||"#666","stroke-width":d.style?.width||2,fill:"none","marker-mid":"url(#arrowhead-marker)",class:"connection-path animated-path",onDblclick:c=>l(d)},null,40,Rn))),128))]))]))}}),[["__scopeId","data-v-71911260"]]),Sn={class:"column-filter"},$n={key:2,class:"checkbox-filter"},An=["value"],Dn={key:5,class:"date-range-filter"},Tn=K(e.defineComponent({__name:"ATableColumnFilter",props:{column:{},colIndex:{},store:{}},setup(t){const n=e.ref(""),i=e.reactive({startValue:"",endValue:""}),s=d=>{if(d.filterOptions)return d.filterOptions;const c=new Set;return t.store.rows.forEach(m=>{const w=m[d.name];w!=null&&w!==""&&c.add(w)}),Array.from(c).map(m=>({value:m,label:String(m)}))},f=e.computed(()=>!!(n.value||i.startValue||i.endValue)),l=d=>{!d&&t.column.filterType!=="checkbox"?(t.store.clearFilter(t.colIndex),n.value=""):(n.value=d,t.store.setFilter(t.colIndex,{value:d}))},r=(d,c)=>{d==="start"?i.startValue=c:i.endValue=c,!i.startValue&&!i.endValue?t.store.clearFilter(t.colIndex):t.store.setFilter(t.colIndex,{value:null,startValue:i.startValue,endValue:i.endValue})},o=()=>{n.value="",i.startValue="",i.endValue="",t.store.clearFilter(t.colIndex)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",Sn,[(t.column.filterType||"text")==="text"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":c[0]||(c[0]=m=>n.value=m),type:"text",class:"filter-input",onInput:c[1]||(c[1]=m=>l(n.value))},null,544)),[[e.vModelText,n.value]]):t.column.filterType==="number"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":c[2]||(c[2]=m=>n.value=m),type:"number",class:"filter-input",onInput:c[3]||(c[3]=m=>l(n.value))},null,544)),[[e.vModelText,n.value]]):t.column.filterType==="checkbox"?(e.openBlock(),e.createElementBlock("label",$n,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[4]||(c[4]=m=>n.value=m),type:"checkbox",class:"filter-checkbox",onChange:c[5]||(c[5]=m=>l(n.value))},null,544),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",null,e.toDisplayString(t.column.label),1)])):t.column.filterType==="select"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:3,"onUpdate:modelValue":c[6]||(c[6]=m=>n.value=m),class:"filter-select",onChange:c[7]||(c[7]=m=>l(n.value))},[c[15]||(c[15]=e.createElementVNode("option",{value:""},"All",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s(t.column),m=>(e.openBlock(),e.createElementBlock("option",{key:m.value||m,value:m.value||m},e.toDisplayString(m.label||m),9,An))),128))],544)),[[e.vModelSelect,n.value]]):t.column.filterType==="date"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:4,"onUpdate:modelValue":c[8]||(c[8]=m=>n.value=m),type:"date",class:"filter-input",onChange:c[9]||(c[9]=m=>l(n.value))},null,544)),[[e.vModelText,n.value]]):t.column.filterType==="dateRange"?(e.openBlock(),e.createElementBlock("div",Dn,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[10]||(c[10]=m=>i.startValue=m),type:"date",class:"filter-input",onChange:c[11]||(c[11]=m=>r("start",i.startValue))},null,544),[[e.vModelText,i.startValue]]),c[16]||(c[16]=e.createElementVNode("span",{class:"date-separator"},"-",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[12]||(c[12]=m=>i.endValue=m),type:"date",class:"filter-input",onChange:c[13]||(c[13]=m=>r("end",i.endValue))},null,544),[[e.vModelText,i.endValue]])])):t.column.filterType==="component"&&t.column.filterComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.column.filterComponent),{key:6,value:n.value,column:t.column,colIndex:t.colIndex,store:t.store,"onUpdate:value":c[14]||(c[14]=m=>l(m))},null,40,["value","column","colIndex","store"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("button",{key:7,onClick:o,class:"clear-btn",title:"Clear"},"×")):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-8487462d"]]),zn={key:0},Nn={class:"atable-header-row",tabindex:"-1"},Hn={key:2,class:"row-actions-header"},Ln=["data-colindex","onClick"],On={key:3,class:"row-actions-header"},Pn={key:0,class:"atable-filters-row"},Zn={key:2,class:"row-actions-header"},Fn={key:3,class:"row-actions-header"},Te=e.defineComponent({__name:"ATableHeader",props:{columns:{},store:{}},setup(t){const n=t,i=e.computed(()=>n.columns.filter(o=>o.filterable)),s=e.computed(()=>n.store.config.value?.rowActions?.enabled??!1),f=e.computed(()=>n.store.config.value?.rowActions?.position??"before-index"),l=o=>n.store.sortByColumn(o),r=o=>{for(const d of o){if(d.borderBoxSize.length===0)continue;const m=d.borderBoxSize[0].inlineSize,w=Number(d.target.dataset.colindex),M=n.store.columns[w]?.width;typeof M=="number"&&M!==m&&n.store.resizeColumn(w,m)}};return(o,d)=>n.columns.length?(e.openBlock(),e.createElementBlock("thead",zn,[e.createElementVNode("tr",Nn,[s.value&&f.value==="before-index"?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(["row-actions-header",{"sticky-column":f.value==="before-index"}])},null,2)):e.createCommentVNode("",!0),n.store.zeroColumn?(e.openBlock(),e.createElementBlock("th",{key:1,id:"header-index",class:e.normalizeClass([[n.store.hasPinnedColumns?"sticky-index":"",n.store.isTreeView?"tree-index":"",n.store.config.view==="list-expansion"?"list-expansion-index":""],"list-index"])},null,2)):e.createCommentVNode("",!0),s.value&&f.value==="after-index"?(e.openBlock(),e.createElementBlock("th",Hn)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(c,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("th",{key:c.name,"data-colindex":m,tabindex:"-1",style:e.normalizeStyle(n.store.getHeaderCellStyle(c)),class:e.normalizeClass(`${c.pinned?"sticky-column":""} ${c.sortable===!1?"":"cursor-pointer"}`),onClick:w=>c.sortable!==!1?l(m):void 0},[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(c.label||String.fromCharCode(m+97).toUpperCase()),1)])],14,Ln)),[[e.unref(kn),r]])),128)),s.value&&f.value==="end"?(e.openBlock(),e.createElementBlock("th",On)):e.createCommentVNode("",!0)]),i.value.length>0?(e.openBlock(),e.createElementBlock("tr",Pn,[s.value&&f.value==="before-index"?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(["row-actions-header",{"sticky-column":f.value==="before-index"}])},null,2)):e.createCommentVNode("",!0),n.store.zeroColumn?(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass([[n.store.hasPinnedColumns?"sticky-index":"",n.store.isTreeView?"tree-index":"",n.store.config.view==="list-expansion"?"list-expansion-index":""],"list-index"])},null,2)):e.createCommentVNode("",!0),s.value&&f.value==="after-index"?(e.openBlock(),e.createElementBlock("th",Zn)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(c,m)=>(e.openBlock(),e.createElementBlock("th",{key:`filter-${c.name}`,class:e.normalizeClass(`${c.pinned?"sticky-column":""}`),style:e.normalizeStyle(n.store.getHeaderCellStyle(c))},[c.filterable?(e.openBlock(),e.createBlock(Tn,{key:0,column:c,"col-index":m,store:n.store},null,8,["column","col-index","store"])):e.createCommentVNode("",!0)],6))),128)),s.value&&f.value==="end"?(e.openBlock(),e.createElementBlock("th",Fn)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}),ze=e.defineComponent({__name:"ATableModal",props:{store:{}},setup(t){const n=e.useTemplateRef("amodal"),{width:i,height:s}=te(n),f=e.computed(()=>{if(!(t.store.modal.height&&t.store.modal.width&&t.store.modal.left&&t.store.modal.bottom))return;const l=t.store.modal.cell?.closest("table");if(!l)return{};const r=l.offsetHeight||0,o=l.offsetWidth||0;let d=t.store.modal.cell?.offsetTop||0;const c=l.querySelector("thead")?.offsetHeight||0;d+=c,d=d+s.value<r?d:d-(s.value+t.store.modal.height);let m=t.store.modal.cell?.offsetLeft||0;return m=m+i.value<=o?m:m-(i.value-t.store.modal.width),{left:`${m}px`,top:`${d}px`}});return(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref:"amodal",class:"amodal",tabindex:"-1",style:e.normalizeStyle(f.value),onClick:r[0]||(r[0]=e.withModifiers(()=>{},["stop"])),onInput:r[1]||(r[1]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(l.$slots,"default")],36))}}),ft=t=>{const n=t.id||Kt();return bt.defineStore(`table-${n}`,()=>{const s=()=>{const a=[Object.assign({},{rowModified:!1})],u=new Set;for(let k=0;k<l.value.length;k++){const C=l.value[k];C.parent!==null&&C.parent!==void 0&&u.add(C.parent)}const b=k=>l.value[k]?.gantt!==void 0,B=k=>{for(let C=0;C<l.value.length;C++)if(l.value[C].parent===k&&(b(C)||B(C)))return!0;return!1},$=k=>{const C=r.value,T=C.view==="tree"||C.view==="tree-gantt"?C.defaultTreeExpansion:void 0;if(!T)return!0;switch(T){case"root":return!1;case"branch":return B(k);case"leaf":return!0;default:return!0}};for(let k=0;k<l.value.length;k++){const C=l.value[k],T=C.parent===null||C.parent===void 0,W=u.has(k);a[k]={childrenOpen:$(k),expanded:!1,indent:C.indent||0,isParent:W,isRoot:T,rowModified:!1,open:T,parent:C.parent}}return a},f=e.ref(t.columns),l=e.ref(t.rows),r=e.ref(t.config||{}),o=e.ref({}),d=e.ref({}),c=e.computed(()=>{const a={};for(const[u,b]of f.value.entries())for(const[B,$]of l.value.entries())a[`${u}:${B}`]=$[b.name];return a}),m=e.computed({get:()=>{const a=s();for(let u=0;u<a.length;u++)o.value[u]&&(a[u].rowModified=o.value[u]),d.value[u]&&(d.value[u].childrenOpen!==void 0&&(a[u].childrenOpen=d.value[u].childrenOpen),d.value[u].expanded!==void 0&&(a[u].expanded=d.value[u].expanded));if(I.value){const u=(b,B)=>{const $=B[b];if($.isRoot||$.parent===null||$.parent===void 0)return!0;const k=$.parent;return k<0||k>=B.length?!1:(B[k].childrenOpen||!1)&&u(k,B)};for(let b=0;b<a.length;b++)a[b].isRoot||(a[b].open=u(b,a))}return a},set:a=>{JSON.stringify(a)!==JSON.stringify(m.value)&&(m.value=a)}}),w=e.ref(t.modal||{visible:!1}),M=e.ref({}),V=e.ref([]),x=e.ref([]),v=e.ref([]),g=e.ref({column:null,direction:null}),h=e.ref({}),p=e.computed(()=>f.value.some(a=>a.pinned)),E=e.computed(()=>r.value.view==="gantt"||r.value.view==="tree-gantt"),I=e.computed(()=>r.value.view==="tree"||r.value.view==="tree-gantt"),N=e.computed(()=>{const a=r.value;return a.view==="gantt"||a.view==="tree-gantt"?a.dependencyGraph!==!1:!0}),A=e.computed(()=>`${Math.ceil(l.value.length/100+1)}ch`),y=e.computed(()=>r.value.view?["list","tree","tree-gantt","list-expansion"].includes(r.value.view):!1),S=e.computed(()=>{let a=l.value.map((u,b)=>({...u,originalIndex:b}));if(Object.entries(h.value).forEach(([u,b])=>{const B=parseInt(u),$=f.value[B];!$||!(b.value||b.startValue||b.endValue||$.filterType==="checkbox"&&b.value!==void 0)||(a=a.filter(C=>{const T=C[$.name];return X(T,b,$)}))}),g.value.column!==null&&g.value.direction){const u=f.value[g.value.column],b=g.value.direction;a.sort((B,$)=>{let k=B[u.name],C=$[u.name];k==null&&(k=""),C==null&&(C="");const T=Number(k),W=Number(C);if(!isNaN(T)&&!isNaN(W)&&k!==""&&C!=="")return b==="asc"?T-W:W-T;{const pt=String(k).toLowerCase(),wt=String(C).toLowerCase();return b==="asc"?pt.localeCompare(wt):wt.localeCompare(pt)}})}return a}),Z=(a,u)=>c.value[`${a}:${u}`],L=(a,u,b)=>{const B=`${a}:${u}`,$=f.value[a];c.value[B]!==b&&(o.value[u]=!0),c.value[B]=b,l.value[u]={...l.value[u],[$.name]:b}},z=a=>{l.value=a},U=(a,u,b)=>{const B=`${a}:${u}`;c.value[B]!==b&&(o.value[u]=!0,M.value[B]=b)},_=a=>{const u=f.value.indexOf(a)===f.value.length-1,b=r.value.fullWidth?a.resizable&&!u:a.resizable;return{width:a.width||"40ch",textAlign:a.align||"center",...b&&{resize:"horizontal",overflow:"hidden",whiteSpace:"nowrap"}}},he=(a,u)=>{if(a<0||a>=f.value.length)return;const B=Math.max(u,40);f.value[a]={...f.value[a],width:`${B}px`}},ie=a=>{const u=l.value[a];return E.value&&u.gantt!==void 0},Ne=a=>!I.value||m.value[a].isRoot||m.value[a].open,He=a=>!I.value&&r.value.view!=="list-expansion"?"":I.value&&(m.value[a].isRoot||m.value[a].isParent)?m.value[a].childrenOpen?"▼":"►":r.value.view==="list-expansion"?m.value[a].expanded?"▼":"►":"",Le=a=>{if(I.value){const u=d.value[a]||{},B=!(u.childrenOpen??m.value[a].childrenOpen);d.value[a]={...u,childrenOpen:B},B||pe(a)}else if(r.value.view==="list-expansion"){const u=d.value[a]||{},b=u.expanded??m.value[a].expanded;d.value[a]={...u,expanded:!b}}},pe=a=>{for(let u=0;u<l.value.length;u++)if(m.value[u].parent===a){const b=d.value[u]||{};d.value[u]={...b,childrenOpen:!1},pe(u)}},Oe=(a,u)=>{const b=Z(a,u);return we(a,u,b)},we=(a,u,b)=>{const B=f.value[a],$=l.value[u],k=B.format;return k?typeof k=="function"?k(b,{table:c.value,row:$,column:B}):typeof k=="string"?Function(`"use strict";return (${k})`)()(b,{table:c.value,row:$,column:B}):b:b},Pe=a=>{a.target instanceof Node&&w.value.parent?.contains(a.target)||w.value.visible&&(w.value.visible=!1)},Ze=(a,u)=>u&&a===0&&u>0?`${u}ch`:"inherit",Fe=a=>{const u=l.value[a.rowIndex]?.gantt;u&&(a.type==="resize"?a.edge==="start"?(u.startIndex=a.newStart,u.endIndex=a.end,u.colspan=u.endIndex-u.startIndex):a.edge==="end"&&(u.startIndex=a.start,u.endIndex=a.newEnd,u.colspan=u.endIndex-u.startIndex):a.type==="bar"&&(u.startIndex=a.newStart,u.endIndex=a.newEnd,u.colspan=u.endIndex-u.startIndex))},be=a=>{const u=V.value.findIndex(b=>b.id===a.id);u>=0?V.value[u]=a:V.value.push(a)},ve=a=>{const u=V.value.findIndex(b=>b.id===a);u>=0&&V.value.splice(u,1)},xe=a=>{const u=x.value.findIndex(b=>b.id===a.id);u>=0?x.value[u]=a:x.value.push(a)},ye=a=>{const u=x.value.findIndex(b=>b.id===a);u>=0&&x.value.splice(u,1)},R=(a,u,b)=>{const B=x.value.find(C=>C.id===a),$=x.value.find(C=>C.id===u);if(!B||!$)return console.warn("Cannot create connection: handle not found"),null;const k={id:`connection-${a}-${u}`,from:{barId:B.barId,side:B.side},to:{barId:$.barId,side:$.side},style:b?.style,label:b?.label};return v.value.push(k),k},D=a=>{const u=v.value.findIndex(b=>b.id===a);return u>=0?(v.value.splice(u,1),!0):!1},P=a=>v.value.filter(u=>u.from.barId===a||u.to.barId===a),H=a=>x.value.filter(u=>u.barId===a),F=a=>{if(f.value[a].sortable===!1)return;let b;g.value.column===a&&g.value.direction==="asc"?b="desc":b="asc",g.value.column=a,g.value.direction=b},X=(a,u,b)=>{const B=b.filterType||"text",$=u.value;if(!$&&B!=="dateRange"&&B!=="checkbox")return!0;switch(B){case"text":{let k="";return typeof a=="object"&&a!==null?k=Object.values(a).join(" "):k=String(a||""),k.toLowerCase().includes(String($).toLowerCase())}case"number":{const k=Number(a),C=Number($);return!isNaN(k)&&!isNaN(C)&&k===C}case"select":return a===$;case"checkbox":return $===!0?!!a:!0;case"date":{let k;if(typeof a=="number"){const T=new Date(a),W=new Date().getFullYear();k=new Date(W,T.getMonth(),T.getDate())}else k=new Date(String(a));const C=new Date(String($));return k.toDateString()===C.toDateString()}case"dateRange":{const k=u.startValue,C=u.endValue;if(!k&&!C)return!0;let T;if(typeof a=="number"){const W=new Date(a),ht=new Date().getFullYear();T=new Date(ht,W.getMonth(),W.getDate())}else T=new Date(String(a));return!(k&&T<new Date(String(k))||C&&T>new Date(String(C)))}default:return!0}},G=(a,u)=>{!u.value&&!u.startValue&&!u.endValue?delete h.value[a]:h.value[a]=u},j=a=>{delete h.value[a]},se=(a,u="end")=>{const b={};for(const $ of f.value)b[$.name]="";a&&Object.assign(b,a);let B;return u==="start"?(B=0,l.value.unshift(b)):u==="end"?(B=l.value.length,l.value.push(b)):(B=Math.max(0,Math.min(u,l.value.length)),l.value.splice(B,0,b)),B};return{columns:f,config:r,connectionHandles:x,connectionPaths:v,display:m,filterState:h,ganttBars:V,modal:w,rows:l,sortState:g,table:c,updates:M,filteredRows:S,hasPinnedColumns:p,isGanttView:E,isTreeView:I,isDependencyGraphEnabled:N,numberedRowWidth:A,zeroColumn:y,addRow:se,clearFilter:j,closeModal:Pe,createConnection:R,deleteConnection:D,deleteRow:a=>{if(a<0||a>=l.value.length)return null;const[u]=l.value.splice(a,1);delete o.value[a],delete d.value[a];const b={},B={};for(const[$,k]of Object.entries(o.value)){const C=parseInt($);C>a?b[C-1]=k:b[C]=k}for(const[$,k]of Object.entries(d.value)){const C=parseInt($);C>a?B[C-1]=k:B[C]=k}return o.value=b,d.value=B,u},duplicateRow:a=>{if(a<0||a>=l.value.length)return-1;const u=l.value[a],b=JSON.parse(JSON.stringify(u)),B=a+1;return l.value.splice(B,0,b),B},getCellData:Z,getCellDisplayValue:Oe,getConnectionsForBar:P,getFormattedValue:we,getHandlesForBar:H,getHeaderCellStyle:_,getIndent:Ze,getRowExpandSymbol:He,insertRowAbove:(a,u)=>{const b=Math.max(0,a);return se(u,b)},insertRowBelow:(a,u)=>{const b=Math.min(a+1,l.value.length);return se(u,b)},isRowGantt:ie,isRowVisible:Ne,moveRow:(a,u)=>{if(a<0||a>=l.value.length||u<0||u>=l.value.length||a===u)return!1;const[b]=l.value.splice(a,1);l.value.splice(u,0,b);const B={},$={};for(const[k,C]of Object.entries(o.value)){const T=parseInt(k);let W=T;T===a?W=u:a<u?T>a&&T<=u&&(W=T-1):T>=u&&T<a&&(W=T+1),B[W]=C}for(const[k,C]of Object.entries(d.value)){const T=parseInt(k);let W=T;T===a?W=u:a<u?T>a&&T<=u&&(W=T-1):T>=u&&T<a&&(W=T+1),$[W]=C}return o.value=B,d.value=$,!0},registerConnectionHandle:xe,registerGanttBar:be,resizeColumn:he,setCellData:L,setCellText:U,setFilter:G,sortByColumn:F,toggleRowExpand:Le,unregisterConnectionHandle:ye,unregisterGanttBar:ve,updateGanttBar:Fe,updateRows:z}})()},Wn={class:"atable-container",style:{position:"relative"}},ut=K(e.defineComponent({__name:"ATable",props:e.mergeModels({id:{default:""},config:{default:()=>new Object}},{rows:{required:!0},rowsModifiers:{},columns:{required:!0},columnsModifiers:{}}),emits:e.mergeModels(["cellUpdate","gantt:drag","connection:event","columns:update","row:add","row:delete","row:duplicate","row:insert-above","row:insert-below","row:move"],["update:rows","update:columns"]),setup(t,{expose:n,emit:i}){const s=e.useModel(t,"rows"),f=e.useModel(t,"columns"),l=i,r=e.useTemplateRef("table"),o=ft({columns:f.value,rows:s.value,id:t.id,config:t.config});o.$onAction(({name:x,store:v,args:g,after:h})=>{if(x==="setCellData"||x==="setCellText"){const[p,E,I]=g,N=v.getCellData(p,E);h(()=>{s.value=[...v.rows],l("cellUpdate",{colIndex:p,rowIndex:E,newValue:I,oldValue:N})})}else if(x==="updateGanttBar"){const[p]=g;let E=!1;p.type==="resize"?E=p.oldColspan!==p.newColspan:p.type==="bar"&&(E=p.oldStart!==p.newStart||p.oldEnd!==p.newEnd),E&&h(()=>{l("gantt:drag",p)})}else x==="resizeColumn"&&h(()=>{f.value=[...v.columns],l("columns:update",[...v.columns])})}),e.watch(()=>s.value,x=>{JSON.stringify(x)!==JSON.stringify(o.rows)&&(o.rows=[...x])},{deep:!0}),e.watch(f,x=>{JSON.stringify(x)!==JSON.stringify(o.columns)&&(o.columns=[...x],l("columns:update",[...x]))},{deep:!0}),e.onMounted(()=>{f.value.some(x=>x.pinned)&&(c(),o.isTreeView&&et(r,c,{childList:!0,subtree:!0}))});const d=e.computed(()=>o.columns.filter(x=>x.pinned).length),c=()=>{const x=r.value,v=x?.rows[0],g=x?.rows[1],h=v?Array.from(v.cells):[];for(const[p,E]of h.entries()){const I=g?.cells[p];I&&(E.style.width=`${I.offsetWidth}px`)}for(const p of x?.rows||[]){let E=0;const I=[];for(const N of p.cells)(N.classList.contains("sticky-column")||N.classList.contains("sticky-index"))&&(N.style.left=`${E}px`,E+=N.offsetWidth,I.push(N));I.length>0&&I[I.length-1].classList.add("sticky-column-edge")}};window.addEventListener("keydown",x=>{if(x.key==="Escape"&&o.modal.visible){o.modal.visible=!1;const v=o.modal.parent;v&&e.nextTick().then(()=>{v.focus()})}});const m=x=>{if(!x.gantt||d.value===0)return o.columns;const v=[];for(let g=0;g<d.value;g++){const h={...o.columns[g]};h.originalIndex=g,v.push(h)}return v.push({...o.columns[d.value],isGantt:!0,colspan:x.gantt?.colspan||o.columns.length-d.value,originalIndex:d.value,width:"auto"}),v},w=x=>{l("connection:event",{type:"create",connection:x})},M=x=>{l("connection:event",{type:"delete",connection:x})},V=(x,v)=>{switch(x){case"add":{const g=o.addRow({},v+1),h=o.rows[g];s.value=[...o.rows],l("row:add",{rowIndex:g,row:h});break}case"delete":{const g=o.deleteRow(v);g&&(s.value=[...o.rows],l("row:delete",{rowIndex:v,row:g}));break}case"duplicate":{const g=o.duplicateRow(v);if(g>=0){const h=o.rows[g];s.value=[...o.rows],l("row:duplicate",{sourceIndex:v,newIndex:g,row:h})}break}case"insertAbove":{const g=o.insertRowAbove(v),h=o.rows[g];s.value=[...o.rows],l("row:insert-above",{targetIndex:v,newIndex:g,row:h});break}case"insertBelow":{const g=o.insertRowBelow(v),h=o.rows[g];s.value=[...o.rows],l("row:insert-below",{targetIndex:v,newIndex:g,row:h});break}case"move":{l("row:move",{fromIndex:v,toIndex:-1});break}}};return n({store:o,createConnection:o.createConnection,deleteConnection:o.deleteConnection,getConnectionsForBar:o.getConnectionsForBar,getHandlesForBar:o.getHandlesForBar,addRow:o.addRow,deleteRow:o.deleteRow,duplicateRow:o.duplicateRow,insertRowAbove:o.insertRowAbove,insertRowBelow:o.insertRowBelow,moveRow:o.moveRow}),(x,v)=>(e.openBlock(),e.createElementBlock("div",Wn,[e.withDirectives((e.openBlock(),e.createElementBlock("table",{ref:"table",class:"atable",style:e.normalizeStyle({width:e.unref(o).config.fullWidth?"100%":"auto"})},[e.renderSlot(x.$slots,"header",{data:e.unref(o)},()=>[e.createVNode(Te,{columns:e.unref(o).columns,store:e.unref(o)},null,8,["columns","store"])],!0),e.createElementVNode("tbody",null,[e.renderSlot(x.$slots,"body",{data:e.unref(o)},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).filteredRows,(g,h)=>(e.openBlock(),e.createBlock(Ae,{key:`${g.originalIndex}-${h}`,row:g,rowIndex:g.originalIndex,store:e.unref(o),"onRow:action":V},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m(g),(p,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:p.name},[p.isGantt?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.ganttComponent||"AGanttCell"),{key:0,store:e.unref(o),"columns-count":e.unref(o).columns.length-d.value,color:g.gantt?.color,start:g.gantt?.startIndex,end:g.gantt?.endIndex,colspan:p.colspan,pinned:p.pinned,rowIndex:g.originalIndex,colIndex:p.originalIndex??E,style:e.normalizeStyle({textAlign:p?.align||"center",minWidth:p?.width||"40ch",width:e.unref(o).config.fullWidth?"auto":null}),"onConnection:create":w},null,40,["store","columns-count","color","start","end","colspan","pinned","rowIndex","colIndex","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p.cellComponent||"ACell"),{key:1,store:e.unref(o),pinned:p.pinned,rowIndex:g.originalIndex,colIndex:E,style:e.normalizeStyle({textAlign:p?.align||"center",width:e.unref(o).config.fullWidth?"auto":null}),spellcheck:"false"},null,8,["store","pinned","rowIndex","colIndex","style"]))],64))),128))]),_:2},1032,["row","rowIndex","store"]))),128))],!0)]),e.renderSlot(x.$slots,"footer",{data:e.unref(o)},void 0,!0),e.renderSlot(x.$slots,"modal",{data:e.unref(o)},()=>[e.withDirectives(e.createVNode(ze,{store:e.unref(o)},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).modal.component),e.mergeProps({key:`${e.unref(o).modal.rowIndex}:${e.unref(o).modal.colIndex}`,"col-index":e.unref(o).modal.colIndex,"row-index":e.unref(o).modal.rowIndex,store:e.unref(o)},e.unref(o).modal.componentProps),null,16,["col-index","row-index","store"]))]),_:1},8,["store"]),[[e.vShow,e.unref(o).modal.visible]])],!0)],4)),[[e.unref(yn),e.unref(o).closeModal]]),e.unref(o).isGanttView&&e.unref(o).isDependencyGraphEnabled?(e.openBlock(),e.createBlock(In,{key:0,store:e.unref(o),"onConnection:delete":M},null,8,["store"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3d00d51b"]]),Xn={},Gn={class:"aloading"},jn={class:"aloading-header"};function Un(t,n){return e.openBlock(),e.createElementBlock("div",Gn,[e.createElementVNode("h2",jn,[e.renderSlot(t.$slots,"default",{},void 0,!0)]),n[0]||(n[0]=e.createElementVNode("div",{class:"aloading-bar"},null,-1))])}const mt=K(Xn,[["render",Un],["__scopeId","data-v-a930a25b"]]),Yn={},qn={class:"aloading"},Jn={class:"aloading-header"};function Qn(t,n){return e.openBlock(),e.createElementBlock("div",qn,[e.createElementVNode("h2",Jn,[e.renderSlot(t.$slots,"default",{},void 0,!0)]),n[0]||(n[0]=e.createElementVNode("div",{class:"aloading-bar"},null,-1))])}const gt=K(Yn,[["render",Qn],["__scopeId","data-v-e1165876"]]);function Kn(t){t.component("ACell",tt),t.component("AExpansionRow",nt),t.component("AGanttCell",ot),t.component("ARow",Ae),t.component("ARowActions",re),t.component("ATable",ut),t.component("ATableHeader",Te),t.component("ATableLoading",mt),t.component("ATableLoadingBar",gt),t.component("ATableModal",ze)}O.ACell=tt,O.AExpansionRow=nt,O.AGanttCell=ot,O.ARow=Ae,O.ARowActions=re,O.ATable=ut,O.ATableHeader=Te,O.ATableLoading=mt,O.ATableLoadingBar=gt,O.ATableModal=ze,O.AddIcon=at,O.DeleteIcon=lt,O.DuplicateIcon=rt,O.InsertAboveIcon=it,O.InsertBelowIcon=st,O.MoveIcon=ct,O.actionIcons=dt,O.createTableStore=ft,O.install=Kn,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})}));
50
+ </svg>`,ft={add:at,delete:rt,duplicate:it,insertAbove:st,insertBelow:ct,move:dt},hn={key:0,class:"row-actions-dropdown"},gn=["aria-expanded"],pn=["onClick"],wn=["innerHTML"],bn={class:"action-label"},vn={key:1,class:"row-actions-icons"},xn=["title","aria-label","onClick"],yn=["innerHTML"],we=e.defineComponent({__name:"ARowActions",props:{rowIndex:{},store:{},config:{},position:{}},emits:["action"],setup(t,{emit:n}){const i=t,s=n,f=e.useTemplateRef("actionsCell"),l=e.useTemplateRef("toggleButton"),r=e.ref(0),o=e.ref(!1),d=e.ref(!1),c=e.ref({top:0,left:0}),m={add:"Add Row",delete:"Delete Row",duplicate:"Duplicate Row",insertAbove:"Insert Above",insertBelow:"Insert Below",move:"Move Row"},p=e.computed(()=>{const g=[],w=i.config.actions||{},B=["add","delete","duplicate","insertAbove","insertBelow","move"];for(const R of B){const I=w[R];if(I===!1||I===void 0)continue;let S=!0,$=m[R],L=ft[R];typeof I=="object"&&(S=I.enabled!==!1,$=I.label||$,L=I.icon||L),S&&g.push({type:R,label:$,icon:L})}return g}),M=e.computed(()=>{if(i.config.forceDropdown)return!0;const g=i.config.dropdownThreshold??150;return g===0?!1:r.value>0&&r.value<g}),A=e.computed(()=>o.value?d.value?{position:"fixed",bottom:`${window.innerHeight-c.value.top}px`,left:`${c.value.left}px`,top:"auto"}:{position:"fixed",top:`${c.value.top}px`,left:`${c.value.left}px`}:{});Ve(f,g=>{const w=g[0];w&&(r.value=w.contentRect.width)});const x=()=>{o.value||v(),o.value=!o.value},v=()=>{if(!l.value)return;const g=l.value.getBoundingClientRect(),w=window.innerHeight,B=p.value.length*40+16,R=w-g.bottom,I=g.top;d.value=R<B&&I>B,d.value?c.value={top:g.top,left:g.left}:c.value={top:g.bottom,left:g.left}};Ne(f,()=>{o.value=!1});const h=g=>{o.value=!1;const w=i.config.actions?.[g];typeof w=="object"&&w.handler&&w.handler(i.rowIndex,i.store)===!1||s("action",g,i.rowIndex)};return(g,w)=>(e.openBlock(),e.createElementBlock("td",{ref:"actionsCell",class:e.normalizeClass(["atable-row-actions",{"sticky-column":t.position==="before-index","dropdown-active":o.value}])},[M.value?(e.openBlock(),e.createElementBlock("div",hn,[e.createElementVNode("button",{ref:"toggleButton",type:"button",class:"row-actions-toggle","aria-expanded":o.value,"aria-haspopup":"true",onClick:e.withModifiers(x,["stop"])},[...w[0]||(w[0]=[e.createElementVNode("span",{class:"dropdown-icon"},"⋮",-1)])],8,gn),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["row-actions-menu",{"menu-flipped":d.value}]),style:e.normalizeStyle(A.value),role:"menu"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,B=>(e.openBlock(),e.createElementBlock("button",{key:B.type,type:"button",class:"row-action-menu-item",role:"menuitem",onClick:e.withModifiers(R=>h(B.type),["stop"])},[e.createElementVNode("span",{class:"action-icon",innerHTML:B.icon},null,8,wn),e.createElementVNode("span",bn,e.toDisplayString(B.label),1)],8,pn))),128))],6),[[e.vShow,o.value]])])):(e.openBlock(),e.createElementBlock("div",vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,B=>(e.openBlock(),e.createElementBlock("button",{key:B.type,type:"button",class:"row-action-btn",title:B.label,"aria-label":B.label,onClick:e.withModifiers(R=>h(B.type),["stop"])},[e.createElementVNode("span",{class:"action-icon",innerHTML:B.icon},null,8,yn)],8,xn))),128))]))],2))}}),kn=["tabindex"],Pe=re(e.defineComponent({__name:"ARow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},emits:["row:action"],setup(t,{emit:n}){const i=n,s=e.useTemplateRef("rowEl"),f=e.computed(()=>t.store.isRowVisible(t.rowIndex)),l=e.computed(()=>t.store.getRowExpandSymbol(t.rowIndex)),r=e.computed(()=>t.store.config.rowActions||{enabled:!1}),o=e.computed(()=>r.value.enabled),d=e.computed(()=>r.value.position||"before-index"),c=(m,p)=>{i("row:action",m,p)};if(t.addNavigation){let m=Be;typeof t.addNavigation=="object"&&(m={...m,...t.addNavigation}),De([{selectors:s,handlers:m}])}return(m,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("tr",{ref:"rowEl",tabindex:t.tabIndex,class:"atable-row"},[o.value&&d.value==="before-index"?(e.openBlock(),e.createBlock(we,{key:0,"row-index":t.rowIndex,store:t.store,config:r.value,position:d.value,onAction:c},null,8,["row-index","store","config","position"])):e.createCommentVNode("",!0),t.store.config.view!=="uncounted"?e.renderSlot(m.$slots,"index",{key:1},()=>[t.store.config.view==="list"?(e.openBlock(),e.createElementBlock("td",{key:0,tabIndex:-1,class:e.normalizeClass(["list-index",t.store.hasPinnedColumns?"sticky-index":""])},e.toDisplayString(t.rowIndex+1),3)):t.store.isTreeView?(e.openBlock(),e.createElementBlock("td",{key:1,tabIndex:-1,class:e.normalizeClass(["tree-index",t.store.hasPinnedColumns?"sticky-index":""]),onClick:p[0]||(p[0]=M=>t.store.toggleRowExpand(t.rowIndex))},e.toDisplayString(l.value),3)):e.createCommentVNode("",!0)],!0):e.createCommentVNode("",!0),o.value&&d.value==="after-index"?(e.openBlock(),e.createBlock(we,{key:2,"row-index":t.rowIndex,store:t.store,config:r.value,position:d.value,onAction:c},null,8,["row-index","store","config","position"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default",{},void 0,!0),o.value&&d.value==="end"?(e.openBlock(),e.createBlock(we,{key:3,"row-index":t.rowIndex,store:t.store,config:r.value,position:d.value,onAction:c},null,8,["row-index","store","config","position"])):e.createCommentVNode("",!0)],8,kn)),[[e.vShow,f.value]])}}),[["__scopeId","data-v-c35a3748"]]),Ze=new WeakMap,Cn={mounted(t,n){const i=!n.modifiers.bubble;let s;if(typeof n.value=="function")s=Ne(t,n.value,{capture:i});else{const[f,l]=n.value;s=Ne(t,f,Object.assign({capture:i},l))}Ze.set(t,s)},unmounted(t){const n=Ze.get(t);n&&typeof n=="function"?n():n?.stop(),Ze.delete(t)}},En={mounted(t,n){typeof n.value=="function"?Ve(t,n.value):Ve(t,...n.value)}};function Bn(){let t=!1;const n=e.shallowRef(!1);return(i,s)=>{if(n.value=s.value,t)return;t=!0;const f=Kt(i,s.value);e.watch(n,l=>f.value=l)}}Bn();const Mn={class:"gantt-connection-overlay"},Rn={class:"connection-svg",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1}},Vn=["d","stroke-width","onDblclick"],Sn=["id","d","stroke","stroke-width","onDblclick"],In=.25,Se=16,$n=re(e.defineComponent({__name:"AGanttConnection",props:{store:{}},emits:["connection:delete"],setup(t,{emit:n}){const i=n,s=e.computed(()=>t.store.connectionPaths.filter(r=>{const o=t.store.ganttBars.find(c=>c.id===r.from.barId),d=t.store.ganttBars.find(c=>c.id===r.to.barId);return o&&d})),f=r=>{const o=t.store.connectionHandles.find($=>$.barId===r.from.barId&&$.side===r.from.side),d=t.store.connectionHandles.find($=>$.barId===r.to.barId&&$.side===r.to.side);if(!o||!d)return"";const c=o.position.x+Se/2,m=o.position.y+Se/2,p=d.position.x+Se/2,M=d.position.y+Se/2,A=Math.abs(p-c),x=Math.max(A*In,50),v=c+(r.from.side==="left"?-x:x),h=p+(r.to.side==="left"?-x:x),g={x:.5*c+.5*v,y:.5*m+.5*m},w={x:.5*v+.5*h,y:.5*m+.5*M},B={x:.5*h+.5*p,y:.5*M+.5*M},R={x:.5*g.x+.5*w.x,y:.5*g.y+.5*w.y},I={x:.5*w.x+.5*B.x,y:.5*w.y+.5*B.y},S={x:.5*R.x+.5*I.x,y:.5*R.y+.5*I.y};return`M ${c} ${m} Q ${v} ${m}, ${S.x} ${S.y} Q ${h} ${M}, ${p} ${M}`},l=r=>{t.store.deleteConnection(r.id)&&i("connection:delete",r)};return(r,o)=>(e.openBlock(),e.createElementBlock("div",Mn,[(e.openBlock(),e.createElementBlock("svg",Rn,[o[0]||(o[0]=e.createElementVNode("defs",null,[e.createElementVNode("path",{id:"arrowhead",d:"M 0 -7 L 20 0 L 0 7Z",stroke:"black","stroke-width":"1",fill:"currentColor"}),e.createElementVNode("marker",{id:"arrowhead-marker",markerWidth:"10",markerHeight:"7",refX:"5",refY:"3.5",orient:"auto",markerUnits:"strokeWidth"},[e.createElementVNode("polygon",{points:"0 0, 10 3.5, 0 7",fill:"currentColor"})])],-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createElementBlock("path",{key:`${d.id}-hitbox`,d:f(d),stroke:"transparent","stroke-width":(d.style?.width||2)+10,fill:"none",class:"connection-hitbox",onDblclick:c=>l(d)},null,40,Vn))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,d=>(e.openBlock(),e.createElementBlock("path",{id:d.id,key:d.id,d:f(d),stroke:d.style?.color||"#666","stroke-width":d.style?.width||2,fill:"none","marker-mid":"url(#arrowhead-marker)",class:"connection-path animated-path",onDblclick:c=>l(d)},null,40,Sn))),128))]))]))}}),[["__scopeId","data-v-71911260"]]),Tn={class:"column-filter"},An={key:2,class:"checkbox-filter"},Dn=["value"],zn={key:5,class:"date-range-filter"},Nn=re(e.defineComponent({__name:"ATableColumnFilter",props:{column:{},colIndex:{},store:{}},setup(t){const n=e.ref(""),i=e.reactive({startValue:"",endValue:""}),s=d=>{if(d.filterOptions)return d.filterOptions;const c=new Set;return t.store.rows.forEach(m=>{const p=m[d.name];p!=null&&p!==""&&c.add(p)}),Array.from(c).map(m=>({value:m,label:String(m)}))},f=e.computed(()=>!!(n.value||i.startValue||i.endValue)),l=d=>{!d&&t.column.filterType!=="checkbox"?(t.store.clearFilter(t.colIndex),n.value=""):(n.value=d,t.store.setFilter(t.colIndex,{value:d}))},r=(d,c)=>{d==="start"?i.startValue=c:i.endValue=c,!i.startValue&&!i.endValue?t.store.clearFilter(t.colIndex):t.store.setFilter(t.colIndex,{value:null,startValue:i.startValue,endValue:i.endValue})},o=()=>{n.value="",i.startValue="",i.endValue="",t.store.clearFilter(t.colIndex)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",Tn,[(t.column.filterType||"text")==="text"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":c[0]||(c[0]=m=>n.value=m),type:"text",class:"filter-input",onInput:c[1]||(c[1]=m=>l(n.value))},null,544)),[[e.vModelText,n.value]]):t.column.filterType==="number"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":c[2]||(c[2]=m=>n.value=m),type:"number",class:"filter-input",onInput:c[3]||(c[3]=m=>l(n.value))},null,544)),[[e.vModelText,n.value]]):t.column.filterType==="checkbox"?(e.openBlock(),e.createElementBlock("label",An,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[4]||(c[4]=m=>n.value=m),type:"checkbox",class:"filter-checkbox",onChange:c[5]||(c[5]=m=>l(n.value))},null,544),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",null,e.toDisplayString(t.column.label),1)])):t.column.filterType==="select"?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:3,"onUpdate:modelValue":c[6]||(c[6]=m=>n.value=m),class:"filter-select",onChange:c[7]||(c[7]=m=>l(n.value))},[c[15]||(c[15]=e.createElementVNode("option",{value:""},"All",-1)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s(t.column),m=>(e.openBlock(),e.createElementBlock("option",{key:m.value||m,value:m.value||m},e.toDisplayString(m.label||m),9,Dn))),128))],544)),[[e.vModelSelect,n.value]]):t.column.filterType==="date"?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:4,"onUpdate:modelValue":c[8]||(c[8]=m=>n.value=m),type:"date",class:"filter-input",onChange:c[9]||(c[9]=m=>l(n.value))},null,544)),[[e.vModelText,n.value]]):t.column.filterType==="dateRange"?(e.openBlock(),e.createElementBlock("div",zn,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[10]||(c[10]=m=>i.startValue=m),type:"date",class:"filter-input",onChange:c[11]||(c[11]=m=>r("start",i.startValue))},null,544),[[e.vModelText,i.startValue]]),c[16]||(c[16]=e.createElementVNode("span",{class:"date-separator"},"-",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[12]||(c[12]=m=>i.endValue=m),type:"date",class:"filter-input",onChange:c[13]||(c[13]=m=>r("end",i.endValue))},null,544),[[e.vModelText,i.endValue]])])):t.column.filterType==="component"&&t.column.filterComponent?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.column.filterComponent),{key:6,value:n.value,column:t.column,colIndex:t.colIndex,store:t.store,"onUpdate:value":c[14]||(c[14]=m=>l(m))},null,40,["value","column","colIndex","store"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("button",{key:7,onClick:o,class:"clear-btn",title:"Clear"},"×")):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-8487462d"]]),Hn={key:0},Ln={class:"atable-header-row",tabindex:"-1"},On={key:2,class:"row-actions-header"},Pn=["data-colindex","onClick"],Zn={key:3,class:"row-actions-header"},Fn={key:0,class:"atable-filters-row"},Wn={key:2,class:"row-actions-header"},Xn={key:3,class:"row-actions-header"},Fe=e.defineComponent({__name:"ATableHeader",props:{columns:{},store:{}},setup(t){const n=t,i=e.computed(()=>n.columns.filter(o=>o.filterable)),s=e.computed(()=>n.store.config.value?.rowActions?.enabled??!1),f=e.computed(()=>n.store.config.value?.rowActions?.position??"before-index"),l=o=>n.store.sortByColumn(o),r=o=>{for(const d of o){if(d.borderBoxSize.length===0)continue;const m=d.borderBoxSize[0].inlineSize,p=Number(d.target.dataset.colindex),M=n.store.columns[p]?.width;typeof M=="number"&&M!==m&&n.store.resizeColumn(p,m)}};return(o,d)=>n.columns.length?(e.openBlock(),e.createElementBlock("thead",Hn,[e.createElementVNode("tr",Ln,[s.value&&f.value==="before-index"?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(["row-actions-header",{"sticky-column":f.value==="before-index"}])},null,2)):e.createCommentVNode("",!0),n.store.zeroColumn?(e.openBlock(),e.createElementBlock("th",{key:1,id:"header-index",class:e.normalizeClass([[n.store.hasPinnedColumns?"sticky-index":"",n.store.isTreeView?"tree-index":"",n.store.config.view==="list-expansion"?"list-expansion-index":""],"list-index"])},null,2)):e.createCommentVNode("",!0),s.value&&f.value==="after-index"?(e.openBlock(),e.createElementBlock("th",On)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(c,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("th",{key:c.name,"data-colindex":m,tabindex:"-1",style:e.normalizeStyle(n.store.getHeaderCellStyle(c)),class:e.normalizeClass(`${c.pinned?"sticky-column":""} ${c.sortable===!1?"":"cursor-pointer"}`),onClick:p=>c.sortable!==!1?l(m):void 0},[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(c.label||String.fromCharCode(m+97).toUpperCase()),1)])],14,Pn)),[[e.unref(En),r]])),128)),s.value&&f.value==="end"?(e.openBlock(),e.createElementBlock("th",Zn)):e.createCommentVNode("",!0)]),i.value.length>0?(e.openBlock(),e.createElementBlock("tr",Fn,[s.value&&f.value==="before-index"?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(["row-actions-header",{"sticky-column":f.value==="before-index"}])},null,2)):e.createCommentVNode("",!0),n.store.zeroColumn?(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass([[n.store.hasPinnedColumns?"sticky-index":"",n.store.isTreeView?"tree-index":"",n.store.config.view==="list-expansion"?"list-expansion-index":""],"list-index"])},null,2)):e.createCommentVNode("",!0),s.value&&f.value==="after-index"?(e.openBlock(),e.createElementBlock("th",Wn)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.columns,(c,m)=>(e.openBlock(),e.createElementBlock("th",{key:`filter-${c.name}`,class:e.normalizeClass(`${c.pinned?"sticky-column":""}`),style:e.normalizeStyle(n.store.getHeaderCellStyle(c))},[c.filterable?(e.openBlock(),e.createBlock(Nn,{key:0,column:c,"col-index":m,store:n.store},null,8,["column","col-index","store"])):e.createCommentVNode("",!0)],6))),128)),s.value&&f.value==="end"?(e.openBlock(),e.createElementBlock("th",Xn)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}),We=e.defineComponent({__name:"ATableModal",props:{store:{}},setup(t){const n=e.useTemplateRef("amodal"),{width:i,height:s}=de(n),f=e.computed(()=>{if(!(t.store.modal.height&&t.store.modal.width&&t.store.modal.left&&t.store.modal.bottom))return;const l=t.store.modal.cell?.closest("table");if(!l)return{};const r=l.offsetHeight||0,o=l.offsetWidth||0;let d=t.store.modal.cell?.offsetTop||0;const c=l.querySelector("thead")?.offsetHeight||0;d+=c,d=d+s.value<r?d:d-(s.value+t.store.modal.height);let m=t.store.modal.cell?.offsetLeft||0;return m=m+i.value<=o?m:m-(i.value-t.store.modal.width),{left:`${m}px`,top:`${d}px`}});return(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref:"amodal",class:"amodal",tabindex:"-1",style:e.normalizeStyle(f.value),onClick:r[0]||(r[0]=e.withModifiers(()=>{},["stop"])),onInput:r[1]||(r[1]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(l.$slots,"default")],36))}}),ut=t=>{const n=t.id||en();return vt.defineStore(`table-${n}`,()=>{const s=()=>{const a=[Object.assign({},{rowModified:!1})],u=new Set;for(let y=0;y<l.value.length;y++){const C=l.value[y];C.parent!==null&&C.parent!==void 0&&u.add(C.parent)}const b=y=>l.value[y]?.gantt!==void 0,E=y=>{for(let C=0;C<l.value.length;C++)if(l.value[C].parent===y&&(b(C)||E(C)))return!0;return!1},z=y=>{const C=r.value,N=C.view==="tree"||C.view==="tree-gantt"?C.defaultTreeExpansion:void 0;if(!N)return!0;switch(N){case"root":return!1;case"branch":return E(y);case"leaf":return!0;default:return!0}};for(let y=0;y<l.value.length;y++){const C=l.value[y],N=C.parent===null||C.parent===void 0,U=u.has(y);a[y]={childrenOpen:z(y),expanded:!1,indent:C.indent||0,isParent:U,isRoot:N,rowModified:!1,open:N,parent:C.parent}}return a},f=e.ref(t.columns),l=e.ref(t.rows),r=e.ref(t.config||{}),o=e.ref({}),d=e.ref({}),c=e.computed(()=>{const a={};for(const[u,b]of f.value.entries())for(const[E,z]of l.value.entries())a[`${u}:${E}`]=z[b.name];return a}),m=e.computed({get:()=>{const a=s();for(let u=0;u<a.length;u++)o.value[u]&&(a[u].rowModified=o.value[u]),d.value[u]&&(d.value[u].childrenOpen!==void 0&&(a[u].childrenOpen=d.value[u].childrenOpen),d.value[u].expanded!==void 0&&(a[u].expanded=d.value[u].expanded));if(R.value){const u=(b,E)=>{const z=E[b];if(z.isRoot||z.parent===null||z.parent===void 0)return!0;const y=z.parent;return y<0||y>=E.length?!1:(E[y].childrenOpen||!1)&&u(y,E)};for(let b=0;b<a.length;b++)a[b].isRoot||(a[b].open=u(b,a))}return a},set:a=>{JSON.stringify(a)!==JSON.stringify(m.value)&&(m.value=a)}}),p=e.ref(t.modal||{visible:!1}),M=e.ref({}),A=e.ref([]),x=e.ref([]),v=e.ref([]),h=e.ref({column:null,direction:null}),g=e.ref({}),w=e.computed(()=>f.value.some(a=>a.pinned)),B=e.computed(()=>r.value.view==="gantt"||r.value.view==="tree-gantt"),R=e.computed(()=>r.value.view==="tree"||r.value.view==="tree-gantt"),I=e.computed(()=>{const a=r.value;return a.view==="gantt"||a.view==="tree-gantt"?a.dependencyGraph!==!1:!0}),S=e.computed(()=>`${Math.ceil(l.value.length/100+1)}ch`),$=e.computed(()=>r.value.view?["list","tree","tree-gantt","list-expansion"].includes(r.value.view):!1),L=e.computed(()=>{let a=l.value.map((u,b)=>({...u,originalIndex:b}));if(Object.entries(g.value).forEach(([u,b])=>{const E=parseInt(u),z=f.value[E];!z||!(b.value||b.startValue||b.endValue||z.filterType==="checkbox"&&b.value!==void 0)||(a=a.filter(C=>{const N=C[z.name];return Y(N,b,z)}))}),h.value.column!==null&&h.value.direction){const u=f.value[h.value.column],b=h.value.direction;a.sort((E,z)=>{let y=E[u.name],C=z[u.name];y==null&&(y=""),C==null&&(C="");const N=Number(y),U=Number(C);if(!isNaN(N)&&!isNaN(U)&&y!==""&&C!=="")return b==="asc"?N-U:U-N;{const wt=String(y).toLowerCase(),bt=String(C).toLowerCase();return b==="asc"?wt.localeCompare(bt):bt.localeCompare(wt)}})}return a}),Q=(a,u)=>c.value[`${a}:${u}`],F=(a,u,b)=>{const E=`${a}:${u}`,z=f.value[a];c.value[E]!==b&&(o.value[u]=!0),c.value[E]=b,l.value[u]={...l.value[u],[z.name]:b}},X=a=>{l.value=a},ee=(a,u,b)=>{const E=`${a}:${u}`;c.value[E]!==b&&(o.value[u]=!0,M.value[E]=b)},K=a=>{const u=f.value.indexOf(a)===f.value.length-1,b=r.value.fullWidth?a.resizable&&!u:a.resizable;return{width:a.width||"40ch",textAlign:a.align||"center",...b&&{resize:"horizontal",overflow:"hidden",whiteSpace:"nowrap"}}},me=(a,u)=>{if(a<0||a>=f.value.length)return;const E=Math.max(u,40);f.value[a]={...f.value[a],width:`${E}px`}},ie=a=>{const u=l.value[a];return B.value&&u.gantt!==void 0},be=a=>!R.value||m.value[a].isRoot||m.value[a].open,ve=a=>!R.value&&r.value.view!=="list-expansion"?"":R.value&&(m.value[a].isRoot||m.value[a].isParent)?m.value[a].childrenOpen?"▼":"►":r.value.view==="list-expansion"?m.value[a].expanded?"▼":"►":"",xe=a=>{if(R.value){const u=d.value[a]||{},E=!(u.childrenOpen??m.value[a].childrenOpen);d.value[a]={...u,childrenOpen:E},E||he(a)}else if(r.value.view==="list-expansion"){const u=d.value[a]||{},b=u.expanded??m.value[a].expanded;d.value[a]={...u,expanded:!b}}},he=a=>{for(let u=0;u<l.value.length;u++)if(m.value[u].parent===a){const b=d.value[u]||{};d.value[u]={...b,childrenOpen:!1},he(u)}},ye=(a,u)=>{const b=Q(a,u);return k(a,u,b)},k=(a,u,b)=>{const E=f.value[a],z=l.value[u],y=E.format;return y?typeof y=="function"?y(b,{table:c.value,row:z,column:E}):typeof y=="string"?Function(`"use strict";return (${y})`)()(b,{table:c.value,row:z,column:E}):b:b},T=a=>{a.target instanceof Node&&p.value.parent?.contains(a.target)||p.value.visible&&(p.value.visible=!1)},H=(a,u)=>u&&a===0&&u>0?`${u}ch`:"inherit",G=a=>{const u=l.value[a.rowIndex]?.gantt;u&&(a.type==="resize"?a.edge==="start"?(u.startIndex=a.newStart,u.endIndex=a.end,u.colspan=u.endIndex-u.startIndex):a.edge==="end"&&(u.startIndex=a.start,u.endIndex=a.newEnd,u.colspan=u.endIndex-u.startIndex):a.type==="bar"&&(u.startIndex=a.newStart,u.endIndex=a.newEnd,u.colspan=u.endIndex-u.startIndex))},O=a=>{const u=A.value.findIndex(b=>b.id===a.id);u>=0?A.value[u]=a:A.value.push(a)},q=a=>{const u=A.value.findIndex(b=>b.id===a);u>=0&&A.value.splice(u,1)},le=a=>{const u=x.value.findIndex(b=>b.id===a.id);u>=0?x.value[u]=a:x.value.push(a)},se=a=>{const u=x.value.findIndex(b=>b.id===a);u>=0&&x.value.splice(u,1)},V=(a,u,b)=>{const E=x.value.find(C=>C.id===a),z=x.value.find(C=>C.id===u);if(!E||!z)return console.warn("Cannot create connection: handle not found"),null;const y={id:`connection-${a}-${u}`,from:{barId:E.barId,side:E.side},to:{barId:z.barId,side:z.side},style:b?.style,label:b?.label};return v.value.push(y),y},D=a=>{const u=v.value.findIndex(b=>b.id===a);return u>=0?(v.value.splice(u,1),!0):!1},Z=a=>v.value.filter(u=>u.from.barId===a||u.to.barId===a),P=a=>x.value.filter(u=>u.barId===a),j=a=>{if(f.value[a].sortable===!1)return;let b;h.value.column===a&&h.value.direction==="asc"?b="desc":b="asc",h.value.column=a,h.value.direction=b},Y=(a,u,b)=>{const E=b.filterType||"text",z=u.value;if(!z&&E!=="dateRange"&&E!=="checkbox")return!0;switch(E){case"text":{let y="";return typeof a=="object"&&a!==null?y=Object.values(a).join(" "):y=String(a||""),y.toLowerCase().includes(String(z).toLowerCase())}case"number":{const y=Number(a),C=Number(z);return!isNaN(y)&&!isNaN(C)&&y===C}case"select":return a===z;case"checkbox":return z===!0?!!a:!0;case"date":{let y;if(typeof a=="number"){const N=new Date(a),U=new Date().getFullYear();y=new Date(U,N.getMonth(),N.getDate())}else y=new Date(String(a));const C=new Date(String(z));return y.toDateString()===C.toDateString()}case"dateRange":{const y=u.startValue,C=u.endValue;if(!y&&!C)return!0;let N;if(typeof a=="number"){const U=new Date(a),pt=new Date().getFullYear();N=new Date(pt,U.getMonth(),U.getDate())}else N=new Date(String(a));return!(y&&N<new Date(String(y))||C&&N>new Date(String(C)))}default:return!0}},J=(a,u)=>{!u.value&&!u.startValue&&!u.endValue?delete g.value[a]:g.value[a]=u},_=a=>{delete g.value[a]},ke=(a,u="end")=>{const b={};for(const z of f.value)b[z.name]="";a&&Object.assign(b,a);let E;return u==="start"?(E=0,l.value.unshift(b)):u==="end"?(E=l.value.length,l.value.push(b)):(E=Math.max(0,Math.min(u,l.value.length)),l.value.splice(E,0,b)),E};return{columns:f,config:r,connectionHandles:x,connectionPaths:v,display:m,filterState:g,ganttBars:A,modal:p,rows:l,sortState:h,table:c,updates:M,filteredRows:L,hasPinnedColumns:w,isGanttView:B,isTreeView:R,isDependencyGraphEnabled:I,numberedRowWidth:S,zeroColumn:$,addRow:ke,clearFilter:_,closeModal:T,createConnection:V,deleteConnection:D,deleteRow:a=>{if(a<0||a>=l.value.length)return null;const[u]=l.value.splice(a,1);delete o.value[a],delete d.value[a];const b={},E={};for(const[z,y]of Object.entries(o.value)){const C=parseInt(z);C>a?b[C-1]=y:b[C]=y}for(const[z,y]of Object.entries(d.value)){const C=parseInt(z);C>a?E[C-1]=y:E[C]=y}return o.value=b,d.value=E,u},duplicateRow:a=>{if(a<0||a>=l.value.length)return-1;const u=l.value[a],b=JSON.parse(JSON.stringify(u)),E=a+1;return l.value.splice(E,0,b),E},getCellData:Q,getCellDisplayValue:ye,getConnectionsForBar:Z,getFormattedValue:k,getHandlesForBar:P,getHeaderCellStyle:K,getIndent:H,getRowExpandSymbol:ve,insertRowAbove:(a,u)=>{const b=Math.max(0,a);return ke(u,b)},insertRowBelow:(a,u)=>{const b=Math.min(a+1,l.value.length);return ke(u,b)},isRowGantt:ie,isRowVisible:be,moveRow:(a,u)=>{if(a<0||a>=l.value.length||u<0||u>=l.value.length||a===u)return!1;const[b]=l.value.splice(a,1);l.value.splice(u,0,b);const E={},z={};for(const[y,C]of Object.entries(o.value)){const N=parseInt(y);let U=N;N===a?U=u:a<u?N>a&&N<=u&&(U=N-1):N>=u&&N<a&&(U=N+1),E[U]=C}for(const[y,C]of Object.entries(d.value)){const N=parseInt(y);let U=N;N===a?U=u:a<u?N>a&&N<=u&&(U=N-1):N>=u&&N<a&&(U=N+1),z[U]=C}return o.value=E,d.value=z,!0},registerConnectionHandle:le,registerGanttBar:O,resizeColumn:me,setCellData:F,setCellText:ee,setFilter:J,sortByColumn:j,toggleRowExpand:xe,unregisterConnectionHandle:se,unregisterGanttBar:q,updateGanttBar:G,updateRows:X}})()},Gn={class:"atable-container",style:{position:"relative"}},mt=re(e.defineComponent({__name:"ATable",props:e.mergeModels({id:{default:""},config:{default:()=>new Object}},{rows:{required:!0},rowsModifiers:{},columns:{required:!0},columnsModifiers:{}}),emits:e.mergeModels(["cellUpdate","gantt:drag","connection:event","columns:update","row:add","row:delete","row:duplicate","row:insert-above","row:insert-below","row:move"],["update:rows","update:columns"]),setup(t,{expose:n,emit:i}){const s=e.useModel(t,"rows"),f=e.useModel(t,"columns"),l=i,r=e.useTemplateRef("table"),o=ut({columns:f.value,rows:s.value,id:t.id,config:t.config});o.$onAction(({name:x,store:v,args:h,after:g})=>{if(x==="setCellData"||x==="setCellText"){const[w,B,R]=h,I=v.getCellData(w,B);g(()=>{s.value=[...v.rows],l("cellUpdate",{colIndex:w,rowIndex:B,newValue:R,oldValue:I})})}else if(x==="updateGanttBar"){const[w]=h;let B=!1;w.type==="resize"?B=w.oldColspan!==w.newColspan:w.type==="bar"&&(B=w.oldStart!==w.newStart||w.oldEnd!==w.newEnd),B&&g(()=>{l("gantt:drag",w)})}else x==="resizeColumn"&&g(()=>{f.value=[...v.columns],l("columns:update",[...v.columns])})}),e.watch(()=>s.value,x=>{JSON.stringify(x)!==JSON.stringify(o.rows)&&(o.rows=[...x])},{deep:!0}),e.watch(f,x=>{JSON.stringify(x)!==JSON.stringify(o.columns)&&(o.columns=[...x],l("columns:update",[...x]))},{deep:!0}),e.onMounted(()=>{f.value.some(x=>x.pinned)&&(c(),o.isTreeView&&tt(r,c,{childList:!0,subtree:!0}))});const d=e.computed(()=>o.columns.filter(x=>x.pinned).length),c=()=>{const x=r.value,v=x?.rows[0],h=x?.rows[1],g=v?Array.from(v.cells):[];for(const[w,B]of g.entries()){const R=h?.cells[w];R&&(B.style.width=`${R.offsetWidth}px`)}for(const w of x?.rows||[]){let B=0;const R=[];for(const I of w.cells)(I.classList.contains("sticky-column")||I.classList.contains("sticky-index"))&&(I.style.left=`${B}px`,B+=I.offsetWidth,R.push(I));R.length>0&&R[R.length-1].classList.add("sticky-column-edge")}};window.addEventListener("keydown",x=>{if(x.key==="Escape"&&o.modal.visible){o.modal.visible=!1;const v=o.modal.parent;v&&e.nextTick().then(()=>{v.focus()})}});const m=x=>{if(!x.gantt||d.value===0)return o.columns;const v=[];for(let h=0;h<d.value;h++){const g={...o.columns[h]};g.originalIndex=h,v.push(g)}return v.push({...o.columns[d.value],isGantt:!0,colspan:x.gantt?.colspan||o.columns.length-d.value,originalIndex:d.value,width:"auto"}),v},p=x=>{l("connection:event",{type:"create",connection:x})},M=x=>{l("connection:event",{type:"delete",connection:x})},A=(x,v)=>{switch(x){case"add":{const h=o.addRow({},v+1),g=o.rows[h];s.value=[...o.rows],l("row:add",{rowIndex:h,row:g});break}case"delete":{const h=o.deleteRow(v);h&&(s.value=[...o.rows],l("row:delete",{rowIndex:v,row:h}));break}case"duplicate":{const h=o.duplicateRow(v);if(h>=0){const g=o.rows[h];s.value=[...o.rows],l("row:duplicate",{sourceIndex:v,newIndex:h,row:g})}break}case"insertAbove":{const h=o.insertRowAbove(v),g=o.rows[h];s.value=[...o.rows],l("row:insert-above",{targetIndex:v,newIndex:h,row:g});break}case"insertBelow":{const h=o.insertRowBelow(v),g=o.rows[h];s.value=[...o.rows],l("row:insert-below",{targetIndex:v,newIndex:h,row:g});break}case"move":{l("row:move",{fromIndex:v,toIndex:-1});break}}};return n({store:o,createConnection:o.createConnection,deleteConnection:o.deleteConnection,getConnectionsForBar:o.getConnectionsForBar,getHandlesForBar:o.getHandlesForBar,addRow:o.addRow,deleteRow:o.deleteRow,duplicateRow:o.duplicateRow,insertRowAbove:o.insertRowAbove,insertRowBelow:o.insertRowBelow,moveRow:o.moveRow}),(x,v)=>(e.openBlock(),e.createElementBlock("div",Gn,[e.withDirectives((e.openBlock(),e.createElementBlock("table",{ref:"table",class:"atable",style:e.normalizeStyle({width:e.unref(o).config.fullWidth?"100%":"auto"})},[e.renderSlot(x.$slots,"header",{data:e.unref(o)},()=>[e.createVNode(Fe,{columns:e.unref(o).columns,store:e.unref(o)},null,8,["columns","store"])],!0),e.createElementVNode("tbody",null,[e.renderSlot(x.$slots,"body",{data:e.unref(o)},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).filteredRows,(h,g)=>(e.openBlock(),e.createBlock(Pe,{key:`${h.originalIndex}-${g}`,row:h,rowIndex:h.originalIndex,store:e.unref(o),"onRow:action":A},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m(h),(w,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:w.name},[w.isGantt?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.ganttComponent||"AGanttCell"),{key:0,store:e.unref(o),"columns-count":e.unref(o).columns.length-d.value,color:h.gantt?.color,start:h.gantt?.startIndex,end:h.gantt?.endIndex,colspan:w.colspan,pinned:w.pinned,rowIndex:h.originalIndex,colIndex:w.originalIndex??B,style:e.normalizeStyle({textAlign:w?.align||"center",minWidth:w?.width||"40ch",width:e.unref(o).config.fullWidth?"auto":null}),"onConnection:create":p},null,40,["store","columns-count","color","start","end","colspan","pinned","rowIndex","colIndex","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.cellComponent||"ACell"),{key:1,store:e.unref(o),pinned:w.pinned,rowIndex:h.originalIndex,colIndex:B,style:e.normalizeStyle({textAlign:w?.align||"center",width:e.unref(o).config.fullWidth?"auto":null}),spellcheck:"false"},null,8,["store","pinned","rowIndex","colIndex","style"]))],64))),128))]),_:2},1032,["row","rowIndex","store"]))),128))],!0)]),e.renderSlot(x.$slots,"footer",{data:e.unref(o)},void 0,!0),e.renderSlot(x.$slots,"modal",{data:e.unref(o)},()=>[e.withDirectives(e.createVNode(We,{store:e.unref(o)},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o).modal.component),e.mergeProps({key:`${e.unref(o).modal.rowIndex}:${e.unref(o).modal.colIndex}`,"col-index":e.unref(o).modal.colIndex,"row-index":e.unref(o).modal.rowIndex,store:e.unref(o)},e.unref(o).modal.componentProps),null,16,["col-index","row-index","store"]))]),_:1},8,["store"]),[[e.vShow,e.unref(o).modal.visible]])],!0)],4)),[[e.unref(Cn),e.unref(o).closeModal]]),e.unref(o).isGanttView&&e.unref(o).isDependencyGraphEnabled?(e.openBlock(),e.createBlock($n,{key:0,store:e.unref(o),"onConnection:delete":M},null,8,["store"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3d00d51b"]]),jn={},Yn={class:"aloading"},Un={class:"aloading-header"};function qn(t,n){return e.openBlock(),e.createElementBlock("div",Yn,[e.createElementVNode("h2",Un,[e.renderSlot(t.$slots,"default",{},void 0,!0)]),n[0]||(n[0]=e.createElementVNode("div",{class:"aloading-bar"},null,-1))])}const ht=re(jn,[["render",qn],["__scopeId","data-v-a930a25b"]]),Jn={},Qn={class:"aloading"},Kn={class:"aloading-header"};function _n(t,n){return e.openBlock(),e.createElementBlock("div",Qn,[e.createElementVNode("h2",Kn,[e.renderSlot(t.$slots,"default",{},void 0,!0)]),n[0]||(n[0]=e.createElementVNode("div",{class:"aloading-bar"},null,-1))])}const gt=re(Jn,[["render",_n],["__scopeId","data-v-e1165876"]]);function eo(t){t.component("ACell",nt),t.component("AExpansionRow",ot),t.component("AGanttCell",lt),t.component("ARow",Pe),t.component("ARowActions",we),t.component("ATable",mt),t.component("ATableHeader",Fe),t.component("ATableLoading",ht),t.component("ATableLoadingBar",gt),t.component("ATableModal",We)}W.ACell=nt,W.AExpansionRow=ot,W.AGanttCell=lt,W.ARow=Pe,W.ARowActions=we,W.ATable=mt,W.ATableHeader=Fe,W.ATableLoading=ht,W.ATableLoadingBar=gt,W.ATableModal=We,W.AddIcon=at,W.DeleteIcon=rt,W.DuplicateIcon=it,W.InsertAboveIcon=st,W.InsertBelowIcon=ct,W.MoveIcon=dt,W.actionIcons=ft,W.createTableStore=ut,W.install=eo,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
47
51
  //# sourceMappingURL=atable.umd.cjs.map