@stonecrop/atable 0.4.32 → 0.4.33
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.
- package/dist/atable.js +749 -701
- package/dist/atable.js.map +1 -1
- package/dist/atable.umd.cjs +2 -2
- package/dist/atable.umd.cjs.map +1 -1
- package/package.json +3 -3
- package/src/components/ACell.vue +100 -2
package/dist/atable.umd.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","pinia"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A["@stonecrop/atable"]={},A.Vue,A.pinia))})(this,function(A,t,lt){"use strict";var ze=document.createElement("style");ze.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;margin:0;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)}.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-5ad4bb41]: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-52febd32]{background-color:#f9f9f9;width:100%;padding:0;height:100%}.gantt-container[data-v-52febd32]{position:relative;height:100%;background-color:#f0f0f0;border-radius:4px;overflow:visible}.gantt-bar[data-v-52febd32]{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-52febd32]:active{cursor:grabbing}.gantt-bar.is-dragging[data-v-52febd32]{z-index:10}.gantt-label[data-v-52febd32]{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-52febd32]{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-52febd32]{border-right:1px solid rgba(0,0,0,.5)}.right-resize-handle[data-v-52febd32]{border-left:1px solid rgba(0,0,0,.5)}.handle-grip[data-v-52febd32]{width:4px;height:12px;border-radius:2px;background:#000c}.resize-handle[data-v-52febd32]:hover{background-color:#ffffff80}.vertical-indicator[data-v-52febd32]{position:absolute;width:2px;opacity:0;pointer-events:none;transition:opacity .2s ease;top:-100vh;height:100vh;z-index:5;background-color:var(--17bc2643)}.left-indicator[data-v-52febd32]{left:50%;transform:translate(-50%)}.right-indicator[data-v-52febd32]{right:50%;transform:translate(50%)}.resize-handle.is-dragging .vertical-indicator[data-v-52febd32]{opacity:.7}.gantt-container[data-v-52febd32]:after{content:"";position:absolute;inset:0;background-size:calc(100% / var(--0a8a9192)) 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-52febd32]{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-52febd32]{opacity:1}.left-connection-handle[data-v-52febd32]{left:-16px}.right-connection-handle[data-v-52febd32]{right:-16px}.connection-dot[data-v-52febd32]{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-52febd32]{background-color:#1976d2;transform:scale(1.2)}.connection-handle.is-dragging[data-v-52febd32]{opacity:1!important}.connection-handle.is-dragging .connection-dot[data-v-52febd32]{background-color:#1976d2;transform:scale(1.3);box-shadow:0 2px 8px #2196f366}.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;width:7ch;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-c554ee0f]: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-955111b6]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1}.connection-path[data-v-955111b6]{transition:stroke-width .2s ease;pointer-events:auto;cursor:pointer;stroke-dasharray:5px;stroke:var(--sc-cell-text-color)}#arrowhead-marker polygon[data-v-955111b6]{fill:var(--sc-cell-text-color)}.animated-path[data-v-955111b6]{animation:animated-dash-955111b6 infinite 1.5s linear}.connection-path[data-v-955111b6]:hover{stroke-width:3px}.connection-hitbox[data-v-955111b6]{pointer-events:auto;cursor:pointer}@keyframes animated-dash-955111b6{0%{stroke-dashoffset:0px}to{stroke-dashoffset:-10px}}.atable-header-row th{padding-left:.5ch!important;font-weight:700;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}.tree-index{padding-right:0}th{order:1}.list-expansion-index{width:2ch;margin-left:5px}: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-51a03d16]: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-51a03d16]{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-51a03d16]{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-51a03d16]:focus{outline:none}.atable[data-v-51a03d16]:tbody{overflow:hidden;position:relative}.atable[data-v-51a03d16]: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(ze);function ce(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}const rt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const it=e=>e!=null,st=Object.prototype.toString,ct=e=>st.call(e)==="[object Object]",dt=()=>{};function ee(e){return Array.isArray(e)?e:[e]}function ft(e,n,a){return t.watch(e,n,{...a,immediate:!0})}const j=rt?window:void 0;function U(e){var n;const a=t.toValue(e);return(n=a?.$el)!=null?n:a}function Z(...e){const n=[],a=()=>{n.forEach(o=>o()),n.length=0},i=(o,l,u,m)=>(o.addEventListener(l,u,m),()=>o.removeEventListener(l,u,m)),c=t.computed(()=>{const o=ee(t.toValue(e[0])).filter(l=>l!=null);return o.every(l=>typeof l!="string")?o:void 0}),d=ft(()=>{var o,l;return[(l=(o=c.value)==null?void 0:o.map(u=>U(u)))!=null?l:[j].filter(u=>u!=null),ee(t.toValue(c.value?e[1]:e[0])),ee(t.unref(c.value?e[2]:e[1])),t.toValue(c.value?e[3]:e[2])]},([o,l,u,m])=>{if(a(),!o?.length||!l?.length||!u?.length)return;const x=ct(m)?{...m}:m;n.push(...o.flatMap(v=>l.flatMap(p=>u.map(C=>i(v,p,C,x)))))},{flush:"post"}),s=()=>{d(),a()};return ce(a),s}function ut(){const e=t.shallowRef(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function mt(e){const n=ut();return t.computed(()=>(n.value,!!e()))}function gt(e,n,a={}){const{window:i=j,...c}=a;let d;const s=mt(()=>i&&"MutationObserver"in i),o=()=>{d&&(d.disconnect(),d=void 0)},l=t.computed(()=>{const v=t.toValue(e),p=ee(v).map(U).filter(it);return new Set(p)}),u=t.watch(()=>l.value,v=>{o(),s.value&&v.size&&(d=new MutationObserver(n),v.forEach(p=>d.observe(p,c)))},{immediate:!0,flush:"post"}),m=()=>d?.takeRecords(),x=()=>{u(),o()};return ce(x),{isSupported:s,stop:x,takeRecords:m}}function pt(e,n,a={}){const{window:i=j,document:c=i?.document,flush:d="sync"}=a;if(!i||!c)return dt;let s;const o=m=>{s?.(),s=m},l=t.watchEffect(()=>{const m=U(e);if(m){const{stop:x}=gt(c,v=>{v.map(p=>[...p.removedNodes]).flat().some(p=>p===m||p.contains(m))&&n(v)},{window:i,childList:!0,subtree:!0});o(x)}},{flush:d}),u=()=>{l(),o()};return ce(u),u}function ht(e={}){var n;const{window:a=j,deep:i=!0,triggerOnRemoval:c=!1}=e,d=(n=e.document)!=null?n:a?.document,s=()=>{var u;let m=d?.activeElement;if(i)for(;m?.shadowRoot;)m=(u=m?.shadowRoot)==null?void 0:u.activeElement;return m},o=t.shallowRef(),l=()=>{o.value=s()};if(a){const u={capture:!0,passive:!0};Z(a,"blur",m=>{m.relatedTarget===null&&l()},u),Z(a,"focus",l,u)}return c&&pt(o,l,{document:d}),l(),o}const bt="focusin",wt="focusout",xt=":focus-within";function vt(e,n={}){const{window:a=j}=n,i=t.computed(()=>U(e)),c=t.shallowRef(!1),d=t.computed(()=>c.value);if(!a||!ht(n).value)return{focused:d};const s={passive:!0};return Z(i,bt,()=>c.value=!0,s),Z(i,wt,()=>{var o,l,u;return c.value=(u=(l=(o=i.value)==null?void 0:o.matches)==null?void 0:l.call(o,xt))!=null?u:!1},s),{focused:d}}function yt(e,{window:n=j,scrollTarget:a}={}){const i=t.ref(!1),c=()=>{if(!n)return;const d=n.document,s=U(e);if(!s)i.value=!1;else{const o=s.getBoundingClientRect();i.value=o.top<=(n.innerHeight||d.documentElement.clientHeight)&&o.left<=(n.innerWidth||d.documentElement.clientWidth)&&o.bottom>=0&&o.right>=0}};return t.watch(()=>U(e),()=>c(),{immediate:!0,flush:"post"}),n&&Z(a||n,"scroll",c,{capture:!1,passive:!0}),i}const L=e=>{let n=yt(e).value;return n=n&&e.offsetHeight>0,n},P=e=>e.tabIndex>=0,Me=e=>{const n=e.target;return de(n)},de=e=>{let n;if(e instanceof HTMLTableCellElement){const a=e.parentElement?.previousElementSibling;if(a){const i=Array.from(a.children)[e.cellIndex];i&&(n=i)}}else if(e instanceof HTMLTableRowElement){const a=e.previousElementSibling;a&&(n=a)}return n&&(!P(n)||!L(n))?de(n):n},kt=e=>{const n=e.target;let a;if(n instanceof HTMLTableCellElement){const i=n.parentElement?.parentElement;if(i){const c=i.firstElementChild?.children[n.cellIndex];c&&(a=c)}}else if(n instanceof HTMLTableRowElement){const i=n.parentElement;if(i){const c=i.firstElementChild;c&&(a=c)}}return a&&(!P(a)||!L(a))?fe(a):a},Ve=e=>{const n=e.target;return fe(n)},fe=e=>{let n;if(e instanceof HTMLTableCellElement){const a=e.parentElement?.nextElementSibling;if(a){const i=Array.from(a.children)[e.cellIndex];i&&(n=i)}}else if(e instanceof HTMLTableRowElement){const a=e.nextElementSibling;a&&(n=a)}return n&&(!P(n)||!L(n))?fe(n):n},Ct=e=>{const n=e.target;let a;if(n instanceof HTMLTableCellElement){const i=n.parentElement?.parentElement;if(i){const c=i.lastElementChild?.children[n.cellIndex];c&&(a=c)}}else if(n instanceof HTMLTableRowElement){const i=n.parentElement;if(i){const c=i.lastElementChild;c&&(a=c)}}return a&&(!P(a)||!L(a))?de(a):a},Ae=e=>{const n=e.target;return ue(n)},ue=e=>{let n;return e.previousElementSibling?n=e.previousElementSibling:n=e.parentElement?.previousElementSibling?.lastElementChild,n&&(!P(n)||!L(n))?ue(n):n},Te=e=>{const n=e.target;return me(n)},me=e=>{let n;return e.nextElementSibling?n=e.nextElementSibling:n=e.parentElement?.nextElementSibling?.firstElementChild,n&&(!P(n)||!L(n))?me(n):n},De=e=>{const n=e.target.parentElement?.firstElementChild;return n&&(!P(n)||!L(n))?me(n):n},Oe=e=>{const n=e.target.parentElement?.lastElementChild;return n&&(!P(n)||!L(n))?ue(n):n},te=["alt","control","shift","meta"],Et={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},ge={"keydown.up":e=>{const n=Me(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.down":e=>{const n=Ve(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.left":e=>{const n=Ae(e);e.preventDefault(),e.stopPropagation(),n&&n.focus()},"keydown.right":e=>{const n=Te(e);e.preventDefault(),e.stopPropagation(),n&&n.focus()},"keydown.control.up":e=>{const n=kt(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.down":e=>{const n=Ct(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.left":e=>{const n=De(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.right":e=>{const n=Oe(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.end":e=>{const n=Oe(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const n=Ve(e);n&&n.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const n=Me(e);n&&n.focus()}},"keydown.home":e=>{const n=De(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.tab":e=>{const n=Te(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.shift.tab":e=>{const n=Ae(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())}};function pe(e){const n=s=>{let o=null;return s.parent&&(typeof s.parent=="string"?o=document.querySelector(s.parent):s.parent instanceof HTMLElement?o=s.parent:o=s.parent.value),o},a=s=>{const o=n(s);let l=[];if(typeof s.selectors=="string")l=o?Array.from(o.querySelectorAll(s.selectors)):Array.from(document.querySelectorAll(s.selectors));else if(Array.isArray(s.selectors))for(const u of s.selectors)u instanceof HTMLElement?l.push(u):l.push(u.$el);else if(s.selectors instanceof HTMLElement)l.push(s.selectors);else if(s.selectors?.value)if(Array.isArray(s.selectors.value))for(const u of s.selectors.value)u instanceof HTMLElement?l.push(u):l.push(u.$el);else l.push(s.selectors.value);return l},i=s=>{const o=n(s);let l=[];return s.selectors?l=a(s):o&&(l=Array.from(o.children).filter(u=>P(u)&&L(u))),l},c=s=>o=>{const l=Et[o.key]||o.key.toLowerCase();if(te.includes(l))return;const u=s.handlers||ge;for(const m of Object.keys(u)){const[x,...v]=m.split(".");if(x==="keydown"&&v.includes(l)){const p=u[m],C=v.filter(g=>te.includes(g)),y=te.some(g=>{const h=g.charAt(0).toUpperCase()+g.slice(1);return o.getModifierState(h)});if(C.length>0){if(y){for(const g of te)if(v.includes(g)){const h=g.charAt(0).toUpperCase()+g.slice(1);o.getModifierState(h)&&p(o)}}}else y||p(o)}}},d=[];t.onMounted(()=>{for(const s of e){const o=n(s),l=i(s),u=c(s),m=o?[o]:l;for(const x of m){const{focused:v}=vt(t.ref(x)),p=t.watch(v,C=>{C?x.addEventListener("keydown",u):x.removeEventListener("keydown",u)});d.push(p)}}}),t.onBeforeUnmount(()=>{for(const s of d)s()})}function q(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}const ne=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const It=e=>e!=null,St=Object.prototype.toString,He=e=>St.call(e)==="[object Object]",N=()=>{},he=Bt();function Bt(){var e,n;return ne&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((n=window?.navigator)==null?void 0:n.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function $t(...e){if(e.length!==1)return t.toRef(...e);const n=e[0];return typeof n=="function"?t.readonly(t.customRef(()=>({get:n,set:N}))):t.ref(n)}function Rt(e,n){function a(...i){return new Promise((c,d)=>{Promise.resolve(e(()=>n.apply(this,i),{fn:n,thisArg:this,args:i})).then(c).catch(d)})}return a}function zt(e,n={}){let a,i,c=N;const d=l=>{clearTimeout(l),c(),c=N};let s;return l=>{const u=t.toValue(e),m=t.toValue(n.maxWait);return a&&d(a),u<=0||m!==void 0&&m<=0?(i&&(d(i),i=void 0),Promise.resolve(l())):new Promise((x,v)=>{c=n.rejectOnCancel?v:x,s=l,m&&!i&&(i=setTimeout(()=>{a&&d(a),i=void 0,x(s())},m)),a=setTimeout(()=>{i&&d(i),i=void 0,x(l())},u)})}}function X(e){return Array.isArray(e)?e:[e]}function Mt(e){return t.getCurrentInstance()}function Vt(e,n=200,a={}){return Rt(zt(n,a),e)}function At(e,n={}){if(!t.isRef(e))return t.toRefs(e);const a=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const i in e.value)a[i]=t.customRef(()=>({get(){return e.value[i]},set(c){var d;if((d=t.toValue(n.replaceRef))!=null?d:!0)if(Array.isArray(e.value)){const o=[...e.value];o[i]=c,e.value=o}else{const o={...e.value,[i]:c};Object.setPrototypeOf(o,Object.getPrototypeOf(e.value)),e.value=o}else e.value[i]=c}}));return a}function Tt(e,n=!0,a){Mt()?t.onMounted(e,a):n?e():t.nextTick(e)}function Le(e,n,a){return t.watch(e,n,{...a,immediate:!0})}const oe=ne?window:void 0;function J(e){var n;const a=t.toValue(e);return(n=a?.$el)!=null?n:a}function Q(...e){const n=[],a=()=>{n.forEach(o=>o()),n.length=0},i=(o,l,u,m)=>(o.addEventListener(l,u,m),()=>o.removeEventListener(l,u,m)),c=t.computed(()=>{const o=X(t.toValue(e[0])).filter(l=>l!=null);return o.every(l=>typeof l!="string")?o:void 0}),d=Le(()=>{var o,l;return[(l=(o=c.value)==null?void 0:o.map(u=>J(u)))!=null?l:[oe].filter(u=>u!=null),X(t.toValue(c.value?e[1]:e[0])),X(t.unref(c.value?e[2]:e[1])),t.toValue(c.value?e[3]:e[2])]},([o,l,u,m])=>{if(a(),!o?.length||!l?.length||!u?.length)return;const x=He(m)?{...m}:m;n.push(...o.flatMap(v=>l.flatMap(p=>u.map(C=>i(v,p,C,x)))))},{flush:"post"}),s=()=>{d(),a()};return q(a),s}function Dt(){const e=t.shallowRef(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function Pe(e){const n=Dt();return t.computed(()=>(n.value,!!e()))}function Ne(e,n,a={}){const{window:i=oe,...c}=a;let d;const s=Pe(()=>i&&"MutationObserver"in i),o=()=>{d&&(d.disconnect(),d=void 0)},l=t.computed(()=>{const v=t.toValue(e),p=X(v).map(J).filter(It);return new Set(p)}),u=t.watch(()=>l.value,v=>{o(),s.value&&v.size&&(d=new MutationObserver(n),v.forEach(p=>d.observe(p,c)))},{immediate:!0,flush:"post"}),m=()=>d?.takeRecords(),x=()=>{u(),o()};return q(x),{isSupported:s,stop:x,takeRecords:m}}function be(e,n={}){var a;const{pointerTypes:i,preventDefault:c,stopPropagation:d,exact:s,onMove:o,onEnd:l,onStart:u,initialValue:m,axis:x="both",draggingElement:v=oe,containerElement:p,handle:C=e,buttons:y=[0]}=n,g=t.ref((a=t.toValue(m))!=null?a:{x:0,y:0}),h=t.ref(),w=S=>i?i.includes(S.pointerType):!0,I=S=>{t.toValue(c)&&S.preventDefault(),t.toValue(d)&&S.stopPropagation()},$=S=>{var M;if(!t.toValue(y).includes(S.button)||t.toValue(n.disabled)||!w(S)||t.toValue(s)&&S.target!==t.toValue(e))return;const D=t.toValue(p),H=(M=D?.getBoundingClientRect)==null?void 0:M.call(D),V=t.toValue(e).getBoundingClientRect(),W={x:S.clientX-(D?V.left-H.left+D.scrollLeft:V.left),y:S.clientY-(D?V.top-H.top+D.scrollTop:V.top)};u?.(W,S)!==!1&&(h.value=W,I(S))},O=S=>{if(t.toValue(n.disabled)||!w(S)||!h.value)return;const M=t.toValue(p),D=t.toValue(e).getBoundingClientRect();let{x:H,y:V}=g.value;(x==="x"||x==="both")&&(H=S.clientX-h.value.x,M&&(H=Math.min(Math.max(0,H),M.scrollWidth-D.width))),(x==="y"||x==="both")&&(V=S.clientY-h.value.y,M&&(V=Math.min(Math.max(0,V),M.scrollHeight-D.height))),g.value={x:H,y:V},o?.(g.value,S),I(S)},R=S=>{t.toValue(n.disabled)||!w(S)||h.value&&(h.value=void 0,l?.(g.value,S),I(S))};if(ne){const S=()=>{var M;return{capture:(M=n.capture)!=null?M:!0,passive:!t.toValue(c)}};Q(C,"pointerdown",$,S),Q(v,"pointermove",O,S),Q(v,"pointerup",R,S)}return{...At(g),position:g,isDragging:t.computed(()=>!!h.value),style:t.computed(()=>`left:${g.value.x}px;top:${g.value.y}px;`)}}function Ot(e,n,a={}){const{window:i=oe,...c}=a;let d;const s=Pe(()=>i&&"ResizeObserver"in i),o=()=>{d&&(d.disconnect(),d=void 0)},l=t.computed(()=>{const x=t.toValue(e);return Array.isArray(x)?x.map(v=>J(v)):[J(x)]}),u=t.watch(l,x=>{if(o(),s.value&&i){d=new ResizeObserver(n);for(const v of x)v&&d.observe(v,c)}},{immediate:!0,flush:"post"}),m=()=>{o(),u()};return q(m),{isSupported:s,stop:m}}function G(e,n={}){const{reset:a=!0,windowResize:i=!0,windowScroll:c=!0,immediate:d=!0,updateTiming:s="sync"}=n,o=t.shallowRef(0),l=t.shallowRef(0),u=t.shallowRef(0),m=t.shallowRef(0),x=t.shallowRef(0),v=t.shallowRef(0),p=t.shallowRef(0),C=t.shallowRef(0);function y(){const h=J(e);if(!h){a&&(o.value=0,l.value=0,u.value=0,m.value=0,x.value=0,v.value=0,p.value=0,C.value=0);return}const w=h.getBoundingClientRect();o.value=w.height,l.value=w.bottom,u.value=w.left,m.value=w.right,x.value=w.top,v.value=w.width,p.value=w.x,C.value=w.y}function g(){s==="sync"?y():s==="next-frame"&&requestAnimationFrame(()=>y())}return Ot(e,g),t.watch(()=>J(e),h=>!h&&g()),Ne(e,g,{attributeFilter:["style","class"]}),c&&Q("scroll",g,{capture:!0,passive:!0}),i&&Q("resize",g,{passive:!0}),Tt(()=>{d&&g()}),{height:o,bottom:l,left:u,right:m,top:x,width:v,x:p,y:C,update:g}}const Ht=e=>{const n=new DOMParser().parseFromString(e,"text/html");return Array.from(n.body.childNodes).some(a=>a.nodeType===1)},Lt=(e=8)=>Array.from({length:e},()=>Math.floor(Math.random()*16).toString(16)).join(""),Pt=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],Nt=["innerHTML"],Wt={key:2},We=t.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(e,{expose:n}){const a=t.useTemplateRef("cell"),i=e.store.getCellData(e.colIndex,e.rowIndex),c=t.ref(""),d=t.ref(!1),s=e.store.columns[e.colIndex],o=e.store.rows[e.rowIndex],l=s.align||"center",u=s.width||"40ch",m=t.computed(()=>e.store.getCellDisplayValue(e.colIndex,e.rowIndex)),x=t.computed(()=>typeof m.value=="string"?Ht(m.value):!1),v=t.computed(()=>({textAlign:l,width:u,fontWeight:d.value?"bold":"inherit",paddingLeft:e.store.getIndent(e.colIndex,e.store.display[e.rowIndex]?.indent)})),p=t.computed(()=>({"sticky-column":e.pinned,"cell-modified":d.value})),C=()=>{const{left:w,bottom:I,width:$,height:O}=G(a);s.mask,s.modalComponent&&e.store.$patch(R=>{R.modal.visible=!0,R.modal.colIndex=e.colIndex,R.modal.rowIndex=e.rowIndex,R.modal.left=w,R.modal.bottom=I,R.modal.width=$,R.modal.height=O,R.modal.cell=a.value,typeof s.modalComponent=="function"?R.modal.component=s.modalComponent({table:R.table,row:o,column:s}):R.modal.component=s.modalComponent,R.modal.componentProps=s.modalComponentExtraProps})};if(e.addNavigation){let w={...ge,"keydown.f2":C,"keydown.alt.up":C,"keydown.alt.down":C,"keydown.alt.left":C,"keydown.alt.right":C};typeof e.addNavigation=="object"&&(w={...w,...e.addNavigation}),pe([{selectors:a,handlers:w}])}const y=()=>{a.value&&(c.value=a.value.textContent)},g=w=>{const I=w.target;I.textContent!==c.value&&(c.value=I.textContent,s.format?(d.value=I.textContent!==e.store.getFormattedValue(e.colIndex,e.rowIndex,i),e.store.setCellText(e.colIndex,e.rowIndex,I.textContent)):(d.value=I.textContent!==i,e.store.setCellData(e.colIndex,e.rowIndex,I.textContent)))},h=Vt(g,e.debounce);return n({currentData:c}),(w,I)=>(t.openBlock(),t.createElementBlock("td",{ref:"cell","data-colindex":w.colIndex,"data-rowindex":w.rowIndex,"data-editable":t.unref(s).edit,contenteditable:t.unref(s).edit,tabindex:w.tabIndex,spellcheck:!1,style:t.normalizeStyle(v.value),onFocus:y,onPaste:g,onInput:I[0]||(I[0]=(...$)=>t.unref(h)&&t.unref(h)(...$)),onClick:C,class:t.normalizeClass(["atable-cell",p.value])},[t.unref(s).cellComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(s).cellComponent),t.mergeProps({key:0,value:m.value},t.unref(s).cellComponentProps),null,16,["value"])):x.value?(t.openBlock(),t.createElementBlock("span",{key:1,innerHTML:m.value},null,8,Nt)):(t.openBlock(),t.createElementBlock("span",Wt,t.toDisplayString(m.value),1))],46,Pt))}}),Xt=["tabindex"],Gt=["tabindex"],Ft=["colspan"],Yt=t.defineComponent({__name:"AExpansionRow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object]}},setup(e){const n=t.useTemplateRef("rowEl"),a=t.computed(()=>e.store.display[e.rowIndex].expanded?"▼":"►");if(e.addNavigation){const i={"keydown.control.g":c=>{c.stopPropagation(),c.preventDefault(),e.store.toggleRowExpand(e.rowIndex)}};typeof e.addNavigation=="object"&&Object.assign(i,e.addNavigation),pe([{selectors:n,handlers:i}])}return(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("tr",t.mergeProps(i.$attrs,{ref:"rowEl",tabindex:i.tabIndex,class:"expandable-row"}),[t.createElementVNode("td",{tabIndex:-1,onClick:c[0]||(c[0]=d=>i.store.toggleRowExpand(i.rowIndex)),class:"row-index"},t.toDisplayString(a.value),1),t.renderSlot(i.$slots,"row",{},void 0,!0)],16,Xt),i.store.display[i.rowIndex].expanded?(t.openBlock(),t.createElementBlock("tr",{key:0,ref:"rowExpanded",tabindex:i.tabIndex,class:"expanded-row"},[t.createElementVNode("td",{tabIndex:-1,colspan:i.store.columns.length+1,class:"expanded-row-content"},[t.renderSlot(i.$slots,"content",{},void 0,!0)],8,Ft)],8,Gt)):t.createCommentVNode("",!0)],64))}}),F=(e,n)=>{const a=e.__vccOpts||e;for(const[i,c]of n)a[i]=c;return a},Xe=F(Yt,[["__scopeId","data-v-5ad4bb41"]]),jt=["colspan"],Ut={ref:"container",class:"gantt-container"},qt=["data-rowindex","data-colindex"],Jt={key:2,class:"gantt-label"},Zt=["x1","y1","x2","y2"],Ge=F(t.defineComponent({__name:"AGanttCell",props:{store:{},columnsCount:{},rowIndex:{},colIndex:{},start:{default:0},end:{},colspan:{default:1},label:{},color:{default:"#cccccc"}},emits:["connection:create"],setup(e,{expose:n,emit:a}){t.useCssVars(E=>({"17bc2643":c.value,"0a8a9192":E.colspan}));const i=a,c=t.ref(e.color.length>=6?e.color:"#cccccc"),d=`gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`,s=t.useTemplateRef("container"),o=t.useTemplateRef("bar"),l=t.useTemplateRef("leftResizeHandle"),u=t.useTemplateRef("rightResizeHandle"),m=t.useTemplateRef("leftConnectionHandle"),x=t.useTemplateRef("rightConnectionHandle"),{width:v}=G(s),{left:p,right:C}=G(o),y=t.ref(e.start),g=t.ref(e.end||y.value+e.colspan),h=t.ref(!1),w=t.ref(!1),I=t.ref(!1),$=t.ref(!1),O=t.ref(!1),R=t.ref({startX:0,startY:0,endX:0,endY:0}),S=t.computed(()=>re.value||W.value||K.value),M=t.computed(()=>e.colspan>0?v.value/e.colspan:0),D=t.computed(()=>{const E=y.value/e.colspan*100,r=g.value/e.colspan*100;return{left:`${E}%`,width:`${r-E}%`,backgroundColor:c.value}}),H=t.computed(()=>({position:"fixed",top:0,left:0,width:"100vw",height:"100vh",pointerEvents:"none",zIndex:1e3})),V=t.ref({startX:0,startPos:0}),{isDragging:W}=be(l,{axis:"x",onStart:()=>_(p.value,y.value),onMove:({x:E})=>ie(E),onEnd:({x:E})=>Ie(E)}),{isDragging:K}=be(u,{axis:"x",onStart:()=>_(C.value,g.value),onMove:({x:E})=>se(E),onEnd:({x:E})=>Ke(E)}),{isDragging:re}=be(o,{exact:!0,axis:"x",onStart:()=>_(p.value,y.value),onMove:({x:E})=>_e(E),onEnd:({x:E})=>et(E)});t.onMounted(()=>{tt()}),t.onUnmounted(()=>{nt()});function _(E,r){o.value&&(o.value.style.transition="none"),V.value={startX:E,startPos:r}}function ie(E){if(!W.value||!o.value)return;const f=(E-V.value.startX)/M.value,b=Math.max(0,Math.min(g.value-1,V.value.startPos+f));o.value.style.left=`${b/e.colspan*100}%`,o.value.style.width=`${(g.value-b)/e.colspan*100}%`}function Ie(E){if(!o.value)return;const r=E-V.value.startX,f=Math.round(r/M.value),b=y.value,k=Math.max(0,Math.min(g.value-1,V.value.startPos+f));y.value=k,e.store.updateGanttBar({rowIndex:e.rowIndex,colIndex:e.colIndex,type:"resize",edge:"start",oldStart:b,newStart:k,end:g.value,delta:f,oldColspan:g.value-b,newColspan:g.value-k})}function se(E){if(!K.value||!o.value)return;const f=(E-V.value.startX)/M.value,b=Math.max(y.value+1,Math.min(e.columnsCount,V.value.startPos+f));o.value.style.width=`${(b-y.value)/e.colspan*100}%`}function Ke(E){if(!o.value)return;const r=E-V.value.startX,f=Math.round(r/M.value),b=g.value,k=Math.max(y.value+1,Math.min(e.columnsCount,V.value.startPos+f));g.value=k,e.store.updateGanttBar({rowIndex:e.rowIndex,colIndex:e.colIndex,type:"resize",edge:"end",oldEnd:b,newEnd:k,start:y.value,delta:f,oldColspan:b-y.value,newColspan:k-y.value})}function _e(E){if(!re.value||!o.value)return;const f=(E-V.value.startX)/M.value,b=g.value-y.value,k=Math.max(0,Math.min(V.value.startPos+f,e.columnsCount-b));o.value.style.left=`${k/e.colspan*100}%`}function et(E){if(!o.value)return;const r=E-V.value.startX,f=Math.round(r/M.value),b=g.value-y.value,k=y.value,B=g.value;let z=V.value.startPos+f,T=z+b;z<0?(z=0,T=b):T>e.columnsCount&&(T=e.columnsCount,z=T-b),y.value=z,g.value=T,e.store.updateGanttBar({rowIndex:e.rowIndex,colIndex:e.colIndex,type:"bar",oldStart:k,oldEnd:B,newStart:z,newEnd:T,delta:f,colspan:T-z})}function tt(){const{x:E,y:r}=G(o),{x:f,y:b}=G(m),{x:k,y:B}=G(x);e.store.registerGanttBar({id:d,rowIndex:e.rowIndex,colIndex:e.colIndex,startIndex:y,endIndex:g,color:c,label:e.label,position:{x:E,y:r}}),e.store.isDependencyGraphEnabled&&(e.store.registerConnectionHandle({id:`${d}-connection-left`,rowIndex:e.rowIndex,colIndex:e.colIndex,side:"left",position:{x:f,y:b},visible:h,barId:d}),e.store.registerConnectionHandle({id:`${d}-connection-right`,rowIndex:e.rowIndex,colIndex:e.colIndex,side:"right",position:{x:k,y:B},visible:w,barId:d}))}function nt(){e.store.unregisterGanttBar(d),e.store.isDependencyGraphEnabled&&(e.store.unregisterConnectionHandle(`${d}-connection-left`),e.store.unregisterConnectionHandle(`${d}-connection-right`))}function ot(){e.store.isDependencyGraphEnabled&&(h.value=!0,w.value=!0)}function Se(){!I.value&&!$.value&&(h.value=!1,w.value=!1)}function Be(E,r){r.preventDefault(),r.stopPropagation(),O.value=!0,E==="left"?I.value=!0:$.value=!0;const f=E==="left"?m.value:x.value;if(f){const B=f.getBoundingClientRect(),z=B.left+B.width/2,T=B.top+B.height/2;R.value={startX:z,startY:T,endX:z,endY:T}}const b=B=>{R.value.endX=B.clientX,R.value.endY=B.clientY},k=B=>{$e(B,E),Re(b,k)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",k)}function $e(E,r){const b=document.elementFromPoint(E.clientX,E.clientY)?.closest(".connection-handle");if(b&&b!==(r==="left"?m.value:x.value)){const k=b.closest(".gantt-bar");if(k){const B=parseInt(k.getAttribute("data-rowindex")||"0"),z=parseInt(k.getAttribute("data-colindex")||"0"),T=b.classList.contains("left-connection-handle")?"left":"right",In=`gantt-bar-row-${B}-col-${z}`,at=e.store.createConnection(`${d}-connection-${r}`,`${In}-connection-${T}`);at&&i("connection:create",at)}}}function Re(E,r){O.value=!1,I.value=!1,$.value=!1,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",r),o.value?.matches(":hover")||Se()}return n({barStyle:D,cleanupConnectionDrag:Re,currentEnd:g,handleConnectionDrop:$e,isLeftConnectionDragging:I,isLeftConnectionVisible:h,isRightConnectionDragging:$,isRightConnectionVisible:w,showDragPreview:O}),(E,r)=>(t.openBlock(),t.createElementBlock("td",{class:"aganttcell",colspan:E.colspan},[t.createElementVNode("div",Ut,[t.createElementVNode("div",{ref:"bar","data-rowindex":E.rowIndex,"data-colindex":E.colIndex,class:t.normalizeClass(["gantt-bar",{"is-dragging":S.value}]),style:t.normalizeStyle(D.value),onMouseenter:ot,onMouseleave:Se},[E.store.isDependencyGraphEnabled?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"leftConnectionHandle",class:t.normalizeClass(["connection-handle left-connection-handle",{visible:h.value,"is-dragging":I.value}]),onMousedown:r[0]||(r[0]=t.withModifiers(f=>Be("left",f),["stop"]))},r[2]||(r[2]=[t.createElementVNode("div",{class:"connection-dot"},null,-1)]),34)):t.createCommentVNode("",!0),E.store.isDependencyGraphEnabled?(t.openBlock(),t.createElementBlock("div",{key:1,ref:"rightConnectionHandle",class:t.normalizeClass(["connection-handle right-connection-handle",{visible:w.value,"is-dragging":$.value}]),onMousedown:r[1]||(r[1]=t.withModifiers(f=>Be("right",f),["stop"]))},r[3]||(r[3]=[t.createElementVNode("div",{class:"connection-dot"},null,-1)]),34)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref:"leftResizeHandle",class:t.normalizeClass(["resize-handle left-resize-handle",{"is-dragging":t.unref(W)}])},r[4]||(r[4]=[t.createElementVNode("div",{class:"handle-grip"},null,-1),t.createElementVNode("div",{class:"vertical-indicator left-indicator"},null,-1)]),2),E.label?(t.openBlock(),t.createElementBlock("label",Jt,t.toDisplayString(E.label),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref:"rightResizeHandle",class:t.normalizeClass(["resize-handle right-resize-handle",{"is-dragging":t.unref(K)}])},r[5]||(r[5]=[t.createElementVNode("div",{class:"handle-grip"},null,-1),t.createElementVNode("div",{class:"vertical-indicator right-indicator"},null,-1)]),2)],46,qt)],512),E.store.isDependencyGraphEnabled&&O.value?(t.openBlock(),t.createElementBlock("svg",{key:0,style:t.normalizeStyle(H.value)},[t.createElementVNode("line",{x1:R.value.startX,y1:R.value.startY,x2:R.value.endX,y2:R.value.endY,stroke:"#2196f3","stroke-width":"2","stroke-dasharray":"5,5"},null,8,Zt)],4)):t.createCommentVNode("",!0)],8,jt))}}),[["__scopeId","data-v-52febd32"]]),Qt=["tabindex"],we=F(t.defineComponent({__name:"ARow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(e){const n=t.useTemplateRef("rowEl"),a=t.computed(()=>e.store.isRowVisible(e.rowIndex)),i=t.computed(()=>e.store.getRowExpandSymbol(e.rowIndex));if(e.addNavigation){let c=ge;typeof e.addNavigation=="object"&&(c={...c,...e.addNavigation}),pe([{selectors:n,handlers:c}])}return(c,d)=>t.withDirectives((t.openBlock(),t.createElementBlock("tr",{ref:"rowEl",tabindex:c.tabIndex,class:"atable-row"},[c.store.config.view!=="uncounted"?t.renderSlot(c.$slots,"index",{key:0},()=>[c.store.config.view==="list"?(t.openBlock(),t.createElementBlock("td",{key:0,tabIndex:-1,class:t.normalizeClass(["list-index",c.store.hasPinnedColumns?"sticky-index":""])},t.toDisplayString(c.rowIndex+1),3)):c.store.isTreeView?(t.openBlock(),t.createElementBlock("td",{key:1,tabIndex:-1,class:t.normalizeClass(["tree-index",c.store.hasPinnedColumns?"sticky-index":""]),onClick:d[0]||(d[0]=s=>c.store.toggleRowExpand(c.rowIndex))},t.toDisplayString(i.value),3)):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),t.renderSlot(c.$slots,"default",{},void 0,!0)],8,Qt)),[[t.vShow,a.value]])}}),[["__scopeId","data-v-c554ee0f"]]),xe=ne?window:void 0;function Y(e){var n;const a=t.toValue(e);return(n=a?.$el)!=null?n:a}function ae(...e){const n=[],a=()=>{n.forEach(o=>o()),n.length=0},i=(o,l,u,m)=>(o.addEventListener(l,u,m),()=>o.removeEventListener(l,u,m)),c=t.computed(()=>{const o=X(t.toValue(e[0])).filter(l=>l!=null);return o.every(l=>typeof l!="string")?o:void 0}),d=Le(()=>{var o,l;return[(l=(o=c.value)==null?void 0:o.map(u=>Y(u)))!=null?l:[xe].filter(u=>u!=null),X(t.toValue(c.value?e[1]:e[0])),X(t.unref(c.value?e[2]:e[1])),t.toValue(c.value?e[3]:e[2])]},([o,l,u,m])=>{if(a(),!o?.length||!l?.length||!u?.length)return;const x=He(m)?{...m}:m;n.push(...o.flatMap(v=>l.flatMap(p=>u.map(C=>i(v,p,C,x)))))},{flush:"post"}),s=()=>{d(),a()};return q(a),s}let Fe=!1;function Ye(e,n,a={}){const{window:i=xe,ignore:c=[],capture:d=!0,detectIframe:s=!1,controls:o=!1}=a;if(!i)return o?{stop:N,cancel:N,trigger:N}:N;if(he&&!Fe){Fe=!0;const g={passive:!0};Array.from(i.document.body.children).forEach(h=>h.addEventListener("click",N,g)),i.document.documentElement.addEventListener("click",N,g)}let l=!0;const u=g=>t.toValue(c).some(h=>{if(typeof h=="string")return Array.from(i.document.querySelectorAll(h)).some(w=>w===g.target||g.composedPath().includes(w));{const w=Y(h);return w&&(g.target===w||g.composedPath().includes(w))}});function m(g){const h=t.toValue(g);return h&&h.$.subTree.shapeFlag===16}function x(g,h){const w=t.toValue(g),I=w.$.subTree&&w.$.subTree.children;return I==null||!Array.isArray(I)?!1:I.some($=>$.el===h.target||h.composedPath().includes($.el))}const v=g=>{const h=Y(e);if(g.target!=null&&!(!(h instanceof Element)&&m(e)&&x(e,g))&&!(!h||h===g.target||g.composedPath().includes(h))){if("detail"in g&&g.detail===0&&(l=!u(g)),!l){l=!0;return}n(g)}};let p=!1;const C=[ae(i,"click",g=>{p||(p=!0,setTimeout(()=>{p=!1},0),v(g))},{passive:!0,capture:d}),ae(i,"pointerdown",g=>{const h=Y(e);l=!u(g)&&!!(h&&!g.composedPath().includes(h))},{passive:!0}),s&&ae(i,"blur",g=>{setTimeout(()=>{var h;const w=Y(e);((h=i.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!w?.contains(i.document.activeElement)&&n(g)},0)},{passive:!0})].filter(Boolean),y=()=>C.forEach(g=>g());return o?{stop:y,cancel:()=>{l=!1},trigger:g=>{l=!0,v(g),l=!1}}:y}const ve=new WeakMap,Kt={mounted(e,n){const a=!n.modifiers.bubble;let i;if(typeof n.value=="function")i=Ye(e,n.value,{capture:a});else{const[c,d]=n.value;i=Ye(e,c,Object.assign({capture:a},d))}ve.set(e,i)},unmounted(e){const n=ve.get(e);n&&typeof n=="function"?n():n?.stop(),ve.delete(e)}};function _t(){const e=t.shallowRef(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function en(e){const n=_t();return t.computed(()=>(n.value,!!e()))}function je(e,n,a={}){const{window:i=xe,...c}=a;let d;const s=en(()=>i&&"ResizeObserver"in i),o=()=>{d&&(d.disconnect(),d=void 0)},l=t.computed(()=>{const x=t.toValue(e);return Array.isArray(x)?x.map(v=>Y(v)):[Y(x)]}),u=t.watch(l,x=>{if(o(),s.value&&i){d=new ResizeObserver(n);for(const v of x)v&&d.observe(v,c)}},{immediate:!0,flush:"post"}),m=()=>{o(),u()};return q(m),{isSupported:s,stop:m}}function ye(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const tn={mounted(e,n){typeof n.value=="function"?je(e,n.value):je(e,...n.value)}};function Ue(e){const n=window.getComputedStyle(e);if(n.overflowX==="scroll"||n.overflowY==="scroll"||n.overflowX==="auto"&&e.clientWidth<e.scrollWidth||n.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const a=e.parentNode;return!a||a.tagName==="BODY"?!1:Ue(a)}}function nn(e){const n=e||window.event,a=n.target;return Ue(a)?!1:n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)}const ke=new WeakMap;function on(e,n=!1){const a=t.shallowRef(n);let i=null,c="";t.watch($t(e),o=>{const l=ye(t.toValue(o));if(l){const u=l;if(ke.get(u)||ke.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(c=u.style.overflow),u.style.overflow==="hidden")return a.value=!0;if(a.value)return u.style.overflow="hidden"}},{immediate:!0});const d=()=>{const o=ye(t.toValue(e));!o||a.value||(he&&(i=ae(o,"touchmove",l=>{nn(l)},{passive:!1})),o.style.overflow="hidden",a.value=!0)},s=()=>{const o=ye(t.toValue(e));!o||!a.value||(he&&i?.(),o.style.overflow=c,ke.delete(o),a.value=!1)};return q(s),t.computed({get(){return a.value},set(o){o?d():s()}})}function an(){let e=!1;const n=t.shallowRef(!1);return(a,i)=>{if(n.value=i.value,e)return;e=!0;const c=on(a,i.value);t.watch(n,d=>c.value=d)}}an();const ln={class:"gantt-connection-overlay"},rn={class:"connection-svg",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1}},sn=["d","stroke-width","onDblclick"],cn=["d","stroke","stroke-width","id","onDblclick"],dn=.25,le=16,fn=F(t.defineComponent({__name:"AGanttConnection",props:{store:{}},emits:["connection:delete"],setup(e,{emit:n}){const a=n,i=t.computed(()=>e.store.connectionPaths.filter(s=>{const o=e.store.ganttBars.find(u=>u.id===s.from.barId),l=e.store.ganttBars.find(u=>u.id===s.to.barId);return o&&l})),c=(s,o=!1)=>{const l=e.store.connectionHandles.find(M=>M.barId===s.from.barId&&M.side===s.from.side),u=e.store.connectionHandles.find(M=>M.barId===s.to.barId&&M.side===s.to.side);if(!l||!u)return"";const m=l.position.x+le/2,x=l.position.y+le/2,v=u.position.x+le/2,p=u.position.y+le/2,C=Math.abs(v-m),y=Math.max(C*dn,50),g=m+(s.from.side==="left"?-y:y),h=v+(s.to.side==="left"?-y:y),w={x:.5*m+.5*g,y:.5*x+.5*x},I={x:.5*g+.5*h,y:.5*x+.5*p},$={x:.5*h+.5*v,y:.5*p+.5*p},O={x:.5*w.x+.5*I.x,y:.5*w.y+.5*I.y},R={x:.5*I.x+.5*$.x,y:.5*I.y+.5*$.y},S={x:.5*O.x+.5*R.x,y:.5*O.y+.5*R.y};return`M ${m} ${x} Q ${g} ${x}, ${S.x} ${S.y} Q ${h} ${p}, ${v} ${p}`},d=s=>{e.store.deleteConnection(s.id)&&a("connection:delete",s)};return(s,o)=>(t.openBlock(),t.createElementBlock("div",ln,[(t.openBlock(),t.createElementBlock("svg",rn,[o[0]||(o[0]=t.createElementVNode("defs",null,[t.createElementVNode("path",{id:"arrowhead",d:"M 0 -7 L 20 0 L 0 7Z",stroke:"black","stroke-width":"1",fill:"currentColor"}),t.createElementVNode("marker",{id:"arrowhead-marker",markerWidth:"10",markerHeight:"7",refX:"5",refY:"3.5",orient:"auto",markerUnits:"strokeWidth"},[t.createElementVNode("polygon",{points:"0 0, 10 3.5, 0 7",fill:"currentColor"})])],-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,l=>(t.openBlock(),t.createElementBlock("path",{key:`${l.id}-hitbox`,d:c(l),stroke:"transparent","stroke-width":(l.style?.width||2)+10,fill:"none",class:"connection-hitbox",onDblclick:u=>d(l)},null,40,sn))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,l=>(t.openBlock(),t.createElementBlock("path",{key:l.id,d:c(l),stroke:l.style?.color||"#666","stroke-width":l.style?.width||2,fill:"none","marker-mid":"url(#arrowhead-marker)",id:l.id,class:"connection-path animated-path",onDblclick:u=>d(l)},null,40,cn))),128))]))]))}}),[["__scopeId","data-v-955111b6"]]),un={key:0},mn={class:"atable-header-row",tabindex:"-1"},gn=["data-colindex"],Ce=t.defineComponent({__name:"ATableHeader",props:{columns:{},store:{}},setup(e){const n=a=>{for(const i of a){if(i.borderBoxSize.length===0)continue;const d=i.borderBoxSize[0].inlineSize,s=Number(i.target.dataset.colindex),o=e.store.columns[s]?.width;typeof o=="number"&&o!==d&&e.store.resizeColumn(s,d)}};return(a,i)=>a.columns.length?(t.openBlock(),t.createElementBlock("thead",un,[t.createElementVNode("tr",mn,[a.store.zeroColumn?(t.openBlock(),t.createElementBlock("th",{key:0,id:"header-index",class:t.normalizeClass([[a.store.hasPinnedColumns?"sticky-index":"",a.store.isTreeView?"tree-index":"",a.store.config.view==="list-expansion"?"list-expansion-index":""],"list-index"])},null,2)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.columns,(c,d)=>t.withDirectives((t.openBlock(),t.createElementBlock("th",{key:c.name,"data-colindex":d,tabindex:"-1",style:t.normalizeStyle(a.store.getHeaderCellStyle(c)),class:t.normalizeClass(c.pinned?"sticky-column":"")},[t.renderSlot(a.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(c.label||String.fromCharCode(d+97).toUpperCase()),1)])],14,gn)),[[t.unref(tn),n]])),128))])])):t.createCommentVNode("",!0)}}),Ee=t.defineComponent({__name:"ATableModal",props:{store:{}},setup(e){const n=t.useTemplateRef("amodal"),{width:a,height:i}=G(n),c=t.computed(()=>{if(!(e.store.modal.height&&e.store.modal.width&&e.store.modal.left&&e.store.modal.bottom))return;const d=e.store.modal.cell?.closest("table"),s=d.offsetHeight||0,o=d.offsetWidth||0;let l=e.store.modal.cell?.offsetTop||0;const u=d.querySelector("thead")?.offsetHeight||0;l+=u,l=l+i.value<s?l:l-(i.value+e.store.modal.height);let m=e.store.modal.cell?.offsetLeft||0;return m=m+a.value<=o?m:m-(a.value-e.store.modal.width),{left:`${m}px`,top:`${l}px`}});return(d,s)=>(t.openBlock(),t.createElementBlock("div",{class:"amodal",ref:"amodal",tabindex:"-1",onClick:s[0]||(s[0]=t.withModifiers(()=>{},["stop"])),onInput:s[1]||(s[1]=t.withModifiers(()=>{},["stop"])),style:t.normalizeStyle(c.value)},[t.renderSlot(d.$slots,"default")],36))}}),qe=e=>{const n=e.id||Lt();return lt.defineStore(`table-${n}`,()=>{const i=()=>{const r=[Object.assign({},{rowModified:!1})],f=new Set;for(let b=0;b<d.value.length;b++){const k=d.value[b];k.parent!==null&&k.parent!==void 0&&f.add(k.parent)}for(let b=0;b<d.value.length;b++){const k=d.value[b];r[b]={childrenOpen:!1,expanded:!1,indent:k.indent||0,isParent:f.has(b),isRoot:k.parent===null||k.parent===void 0,rowModified:!1,open:k.parent===null||k.parent===void 0,parent:k.parent}}return r},c=t.ref(e.columns),d=t.ref(e.rows),s=t.ref(e.config||{}),o=t.ref({}),l=t.ref({}),u=t.computed(()=>{const r={};for(const[f,b]of c.value.entries())for(const[k,B]of d.value.entries())r[`${f}:${k}`]=B[b.name];return r}),m=t.computed({get:()=>{const r=i();for(let f=0;f<r.length;f++)o.value[f]&&(r[f].rowModified=o.value[f]),l.value[f]&&(l.value[f].childrenOpen!==void 0&&(r[f].childrenOpen=l.value[f].childrenOpen),l.value[f].expanded!==void 0&&(r[f].expanded=l.value[f].expanded));if(w.value){const f=(b,k)=>{const B=k[b];if(B.isRoot||B.parent===null||B.parent===void 0)return!0;const z=B.parent;return z<0||z>=k.length?!1:(k[z].childrenOpen||!1)&&f(z,k)};for(let b=0;b<r.length;b++)r[b].isRoot||(r[b].open=f(b,r))}return r},set:r=>{JSON.stringify(r)!==JSON.stringify(m.value)&&(m.value=r)}}),x=t.ref(e.modal||{visible:!1}),v=t.ref({}),p=t.ref([]),C=t.ref([]),y=t.ref([]),g=t.computed(()=>c.value.some(r=>r.pinned)),h=t.computed(()=>s.value.view==="gantt"||s.value.view==="tree-gantt"),w=t.computed(()=>s.value.view==="tree"||s.value.view==="tree-gantt"),I=t.computed(()=>s.value.dependencyGraph!==!1),$=t.computed(()=>`${Math.ceil(d.value.length/100+1)}ch`),O=t.computed(()=>s.value.view?["list","tree","tree-gantt","list-expansion"].includes(s.value.view):!1),R=(r,f)=>u.value[`${r}:${f}`],S=(r,f,b)=>{const k=`${r}:${f}`,B=c.value[r];u.value[k]!==b&&(o.value[f]=!0),u.value[k]=b,d.value[f]={...d.value[f],[B.name]:b}},M=r=>{d.value=r},D=(r,f,b)=>{const k=`${r}:${f}`;u.value[k]!==b&&(o.value[f]=!0,v.value[k]=b)},H=r=>{const f=c.value.indexOf(r)===c.value.length-1,b=s.value.fullWidth?r.resizable&&!f:r.resizable;return{width:r.width||"40ch",textAlign:r.align||"center",...b&&{resize:"horizontal",overflow:"hidden",whiteSpace:"nowrap"}}},V=(r,f)=>{if(r<0||r>=c.value.length)return;const k=Math.max(f,40);c.value[r]={...c.value[r],width:`${k}px`}},W=r=>{const f=d.value[r];return h.value&&f.gantt!==void 0},K=r=>!w.value||m.value[r].isRoot||m.value[r].open,re=r=>!w.value&&s.value.view!=="list-expansion"?"":w.value&&(m.value[r].isRoot||m.value[r].isParent)?m.value[r].childrenOpen?"▼":"►":s.value.view==="list-expansion"?m.value[r].expanded?"▼":"►":"",_=r=>{if(w.value){const f=l.value[r]||{},k=!(f.childrenOpen??m.value[r].childrenOpen);l.value[r]={...f,childrenOpen:k},k||ie(r)}else if(s.value.view==="list-expansion"){const f=l.value[r]||{},b=f.expanded??m.value[r].expanded;l.value[r]={...f,expanded:!b}}},ie=r=>{for(let f=0;f<d.value.length;f++)if(m.value[f].parent===r){const b=l.value[f]||{};l.value[f]={...b,childrenOpen:!1},ie(f)}},Ie=(r,f)=>{const b=R(r,f);return se(r,f,b)},se=(r,f,b)=>{const k=c.value[r],B=d.value[f],z=k.format;return z?typeof z=="function"?z(b,{table:u.value,row:B,column:k}):typeof z=="string"?Function(`"use strict";return (${z})`)()(b,{table:u.value,row:B,column:k}):b:b};return{columns:c,config:s,connectionHandles:C,connectionPaths:y,display:m,ganttBars:p,modal:x,rows:d,table:u,updates:v,hasPinnedColumns:g,isGanttView:h,isTreeView:w,isDependencyGraphEnabled:I,numberedRowWidth:$,zeroColumn:O,closeModal:r=>{r.target instanceof Node&&x.value.parent?.contains(r.target)||x.value.visible&&(x.value.visible=!1)},createConnection:(r,f,b)=>{const k=C.value.find(T=>T.id===r),B=C.value.find(T=>T.id===f);if(!k||!B)return console.warn("Cannot create connection: handle not found"),null;const z={id:`connection-${r}-${f}`,from:{barId:k.barId,side:k.side},to:{barId:B.barId,side:B.side},style:b?.style,label:b?.label};return y.value.push(z),z},deleteConnection:r=>{const f=y.value.findIndex(b=>b.id===r);return f>=0?(y.value.splice(f,1),!0):!1},getCellData:R,getCellDisplayValue:Ie,getConnectionsForBar:r=>y.value.filter(f=>f.from.barId===r||f.to.barId===r),getFormattedValue:se,getHandlesForBar:r=>C.value.filter(f=>f.barId===r),getHeaderCellStyle:H,getIndent:(r,f)=>f&&r===0&&f>0?`${f}ch`:"inherit",getRowExpandSymbol:re,isRowGantt:W,isRowVisible:K,registerConnectionHandle:r=>{const f=C.value.findIndex(b=>b.id===r.id);f>=0?C.value[f]=r:C.value.push(r)},registerGanttBar:r=>{const f=p.value.findIndex(b=>b.id===r.id);f>=0?p.value[f]=r:p.value.push(r)},resizeColumn:V,setCellData:S,setCellText:D,toggleRowExpand:_,unregisterConnectionHandle:r=>{const f=C.value.findIndex(b=>b.id===r);f>=0&&C.value.splice(f,1)},unregisterGanttBar:r=>{const f=p.value.findIndex(b=>b.id===r);f>=0&&p.value.splice(f,1)},updateGanttBar:r=>{const f=d.value[r.rowIndex]?.gantt;f&&(r.type==="resize"?r.edge==="start"?(f.startIndex=r.newStart,f.endIndex=r.end,f.colspan=f.endIndex-f.startIndex):r.edge==="end"&&(f.startIndex=r.start,f.endIndex=r.newEnd,f.colspan=f.endIndex-f.startIndex):r.type==="bar"&&(f.startIndex=r.newStart,f.endIndex=r.newEnd,f.colspan=f.endIndex-f.startIndex))},updateRows:M}})()},pn={class:"atable-container",style:{position:"relative"}},Je=F(t.defineComponent({__name:"ATable",props:t.mergeModels({id:{},config:{default:()=>new Object}},{rows:{required:!0},rowsModifiers:{},columns:{required:!0},columnsModifiers:{}}),emits:t.mergeModels(["cellUpdate","gantt:drag","connection:event","columns:update"],["update:rows","update:columns"]),setup(e,{expose:n,emit:a}){const i=t.useModel(e,"rows"),c=t.useModel(e,"columns"),d=a,s=t.useTemplateRef("table"),o=qe({columns:c.value,rows:i.value,id:e.id,config:e.config});o.$onAction(({name:p,store:C,args:y,after:g})=>{if(p==="setCellData"||p==="setCellText"){const[h,w,I]=y,$=C.getCellData(h,w);g(()=>{i.value=[...C.rows],d("cellUpdate",{colIndex:h,rowIndex:w,newValue:I,oldValue:$})})}else if(p==="updateGanttBar"){const[h]=y;let w=!1;h.type==="resize"?w=h.oldColspan!==h.newColspan:h.type==="bar"&&(w=h.oldStart!==h.newStart||h.oldEnd!==h.newEnd),w&&g(()=>{d("gantt:drag",h)})}else p==="resizeColumn"&&g(()=>{c.value=[...C.columns],d("columns:update",[...C.columns])})}),t.watch(()=>i.value,p=>{JSON.stringify(p)!==JSON.stringify(o.rows)&&(o.rows=[...p])},{deep:!0}),t.watch(c,p=>{JSON.stringify(p)!==JSON.stringify(o.columns)&&(o.columns=[...p],d("columns:update",[...p]))},{deep:!0}),t.onMounted(()=>{c.value.some(p=>p.pinned)&&(u(),o.isTreeView&&Ne(s,u,{childList:!0,subtree:!0}))});const l=t.computed(()=>o.columns.filter(p=>p.pinned).length),u=()=>{const p=s.value,C=p?.rows[0],y=p?.rows[1],g=C?Array.from(C.cells):[];for(const[h,w]of g.entries()){const I=y?.cells[h];I&&(w.style.width=`${I.offsetWidth}px`)}for(const h of p?.rows||[]){let w=0;const I=[];for(const $ of h.cells)($.classList.contains("sticky-column")||$.classList.contains("sticky-index"))&&($.style.left=`${w}px`,w+=$.offsetWidth,I.push($));I.length>0&&I[I.length-1].classList.add("sticky-column-edge")}};window.addEventListener("keydown",p=>{if(p.key==="Escape"&&o.modal.visible){o.modal.visible=!1;const C=o.modal.parent;C&&t.nextTick().then(()=>{C.focus()})}});const m=p=>{if(!p.gantt||l.value===0)return o.columns;const C=[];for(let y=0;y<l.value;y++){const g={...o.columns[y]};g.originalIndex=y,C.push(g)}return C.push({...o.columns[l.value],isGantt:!0,colspan:p.gantt?.colspan||o.columns.length-l.value,originalIndex:l.value,width:"auto"}),C},x=p=>{d("connection:event",{type:"create",connection:p})},v=p=>{d("connection:event",{type:"delete",connection:p})};return n({store:o,createConnection:o.createConnection,deleteConnection:o.deleteConnection,getConnectionsForBar:o.getConnectionsForBar,getHandlesForBar:o.getHandlesForBar}),(p,C)=>(t.openBlock(),t.createElementBlock("div",pn,[t.withDirectives((t.openBlock(),t.createElementBlock("table",{ref:"table",class:"atable",style:t.normalizeStyle({width:t.unref(o).config.fullWidth?"100%":"auto"})},[t.renderSlot(p.$slots,"header",{data:t.unref(o)},()=>[t.createVNode(Ce,{columns:t.unref(o).columns,store:t.unref(o)},null,8,["columns","store"])],!0),t.createElementVNode("tbody",null,[t.renderSlot(p.$slots,"body",{data:t.unref(o)},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o).rows,(y,g)=>(t.openBlock(),t.createBlock(we,{key:y.id,row:y,rowIndex:g,store:t.unref(o)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m(y),(h,w)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:h.name},[h.isGantt?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(h.ganttComponent||"AGanttCell"),{key:0,store:t.unref(o),columnsCount:t.unref(o).columns.length-l.value,color:y.gantt?.color,start:y.gantt?.startIndex,end:y.gantt?.endIndex,colspan:h.colspan,pinned:h.pinned,rowIndex:g,colIndex:h.originalIndex??w,style:t.normalizeStyle({textAlign:h?.align||"center",minWidth:h?.width||"40ch",width:t.unref(o).config.fullWidth?"auto":null}),"onConnection:create":x},null,40,["store","columnsCount","color","start","end","colspan","pinned","rowIndex","colIndex","style"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(h.cellComponent||"ACell"),{key:1,store:t.unref(o),pinned:h.pinned,rowIndex:g,colIndex:w,style:t.normalizeStyle({textAlign:h?.align||"center",width:t.unref(o).config.fullWidth?"auto":null}),spellcheck:"false"},null,8,["store","pinned","rowIndex","colIndex","style"]))],64))),128))]),_:2},1032,["row","rowIndex","store"]))),128))],!0)]),t.renderSlot(p.$slots,"footer",{data:t.unref(o)},void 0,!0),t.renderSlot(p.$slots,"modal",{data:t.unref(o)},()=>[t.withDirectives(t.createVNode(Ee,{store:t.unref(o)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(o).modal.component),t.mergeProps({key:`${t.unref(o).modal.rowIndex}:${t.unref(o).modal.colIndex}`,colIndex:t.unref(o).modal.colIndex,rowIndex:t.unref(o).modal.rowIndex,store:t.unref(o)},t.unref(o).modal.componentProps),null,16,["colIndex","rowIndex","store"]))]),_:1},8,["store"]),[[t.vShow,t.unref(o).modal.visible]])],!0)],4)),[[t.unref(Kt),t.unref(o).closeModal]]),t.unref(o).isGanttView&&t.unref(o).isDependencyGraphEnabled?(t.openBlock(),t.createBlock(fn,{key:0,store:t.unref(o),"onConnection:delete":v},null,8,["store"])):t.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-51a03d16"]]),hn={},bn={class:"aloading"},wn={class:"aloading-header"};function xn(e,n){return t.openBlock(),t.createElementBlock("div",bn,[t.createElementVNode("h2",wn,[t.renderSlot(e.$slots,"default",{},void 0,!0)]),n[0]||(n[0]=t.createElementVNode("div",{class:"aloading-bar"},null,-1))])}const Ze=F(hn,[["render",xn],["__scopeId","data-v-a930a25b"]]),vn={},yn={class:"aloading"},kn={class:"aloading-header"};function Cn(e,n){return t.openBlock(),t.createElementBlock("div",yn,[t.createElementVNode("h2",kn,[t.renderSlot(e.$slots,"default",{},void 0,!0)]),n[0]||(n[0]=t.createElementVNode("div",{class:"aloading-bar"},null,-1))])}const Qe=F(vn,[["render",Cn],["__scopeId","data-v-e1165876"]]);function En(e){e.component("ACell",We),e.component("AExpansionRow",Xe),e.component("AGanttCell",Ge),e.component("ARow",we),e.component("ATable",Je),e.component("ATableHeader",Ce),e.component("ATableLoading",Ze),e.component("ATableLoadingBar",Qe),e.component("ATableModal",Ee)}A.ACell=We,A.AExpansionRow=Xe,A.AGanttCell=Ge,A.ARow=we,A.ATable=Je,A.ATableHeader=Ce,A.ATableLoading=Ze,A.ATableLoadingBar=Qe,A.ATableModal=Ee,A.createTableStore=qe,A.install=En,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(D,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","pinia"],t):(D=typeof globalThis<"u"?globalThis:D||self,t(D["@stonecrop/atable"]={},D.Vue,D.pinia))})(this,function(D,t,lt){"use strict";var ze=document.createElement("style");ze.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;margin:0;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)}.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-5ad4bb41]: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-52febd32]{background-color:#f9f9f9;width:100%;padding:0;height:100%}.gantt-container[data-v-52febd32]{position:relative;height:100%;background-color:#f0f0f0;border-radius:4px;overflow:visible}.gantt-bar[data-v-52febd32]{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-52febd32]:active{cursor:grabbing}.gantt-bar.is-dragging[data-v-52febd32]{z-index:10}.gantt-label[data-v-52febd32]{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-52febd32]{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-52febd32]{border-right:1px solid rgba(0,0,0,.5)}.right-resize-handle[data-v-52febd32]{border-left:1px solid rgba(0,0,0,.5)}.handle-grip[data-v-52febd32]{width:4px;height:12px;border-radius:2px;background:#000c}.resize-handle[data-v-52febd32]:hover{background-color:#ffffff80}.vertical-indicator[data-v-52febd32]{position:absolute;width:2px;opacity:0;pointer-events:none;transition:opacity .2s ease;top:-100vh;height:100vh;z-index:5;background-color:var(--17bc2643)}.left-indicator[data-v-52febd32]{left:50%;transform:translate(-50%)}.right-indicator[data-v-52febd32]{right:50%;transform:translate(50%)}.resize-handle.is-dragging .vertical-indicator[data-v-52febd32]{opacity:.7}.gantt-container[data-v-52febd32]:after{content:"";position:absolute;inset:0;background-size:calc(100% / var(--0a8a9192)) 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-52febd32]{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-52febd32]{opacity:1}.left-connection-handle[data-v-52febd32]{left:-16px}.right-connection-handle[data-v-52febd32]{right:-16px}.connection-dot[data-v-52febd32]{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-52febd32]{background-color:#1976d2;transform:scale(1.2)}.connection-handle.is-dragging[data-v-52febd32]{opacity:1!important}.connection-handle.is-dragging .connection-dot[data-v-52febd32]{background-color:#1976d2;transform:scale(1.3);box-shadow:0 2px 8px #2196f366}.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;width:7ch;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-c554ee0f]: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-955111b6]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:1}.connection-path[data-v-955111b6]{transition:stroke-width .2s ease;pointer-events:auto;cursor:pointer;stroke-dasharray:5px;stroke:var(--sc-cell-text-color)}#arrowhead-marker polygon[data-v-955111b6]{fill:var(--sc-cell-text-color)}.animated-path[data-v-955111b6]{animation:animated-dash-955111b6 infinite 1.5s linear}.connection-path[data-v-955111b6]:hover{stroke-width:3px}.connection-hitbox[data-v-955111b6]{pointer-events:auto;cursor:pointer}@keyframes animated-dash-955111b6{0%{stroke-dashoffset:0px}to{stroke-dashoffset:-10px}}.atable-header-row th{padding-left:.5ch!important;font-weight:700;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}.tree-index{padding-right:0}th{order:1}.list-expansion-index{width:2ch;margin-left:5px}: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-51a03d16]: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-51a03d16]{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-51a03d16]{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-51a03d16]:focus{outline:none}.atable[data-v-51a03d16]:tbody{overflow:hidden;position:relative}.atable[data-v-51a03d16]: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(ze);function ce(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}const rt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const it=e=>e!=null,st=Object.prototype.toString,ct=e=>st.call(e)==="[object Object]",dt=()=>{};function ee(e){return Array.isArray(e)?e:[e]}function ft(e,n,a){return t.watch(e,n,{...a,immediate:!0})}const U=rt?window:void 0;function q(e){var n;const a=t.toValue(e);return(n=a?.$el)!=null?n:a}function Q(...e){const n=[],a=()=>{n.forEach(o=>o()),n.length=0},i=(o,l,u,m)=>(o.addEventListener(l,u,m),()=>o.removeEventListener(l,u,m)),c=t.computed(()=>{const o=ee(t.toValue(e[0])).filter(l=>l!=null);return o.every(l=>typeof l!="string")?o:void 0}),d=ft(()=>{var o,l;return[(l=(o=c.value)==null?void 0:o.map(u=>q(u)))!=null?l:[U].filter(u=>u!=null),ee(t.toValue(c.value?e[1]:e[0])),ee(t.unref(c.value?e[2]:e[1])),t.toValue(c.value?e[3]:e[2])]},([o,l,u,m])=>{if(a(),!o?.length||!l?.length||!u?.length)return;const w=ct(m)?{...m}:m;n.push(...o.flatMap(y=>l.flatMap(p=>u.map(I=>i(y,p,I,w)))))},{flush:"post"}),s=()=>{d(),a()};return ce(a),s}function ut(){const e=t.shallowRef(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function mt(e){const n=ut();return t.computed(()=>(n.value,!!e()))}function gt(e,n,a={}){const{window:i=U,...c}=a;let d;const s=mt(()=>i&&"MutationObserver"in i),o=()=>{d&&(d.disconnect(),d=void 0)},l=t.computed(()=>{const y=t.toValue(e),p=ee(y).map(q).filter(it);return new Set(p)}),u=t.watch(()=>l.value,y=>{o(),s.value&&y.size&&(d=new MutationObserver(n),y.forEach(p=>d.observe(p,c)))},{immediate:!0,flush:"post"}),m=()=>d?.takeRecords(),w=()=>{u(),o()};return ce(w),{isSupported:s,stop:w,takeRecords:m}}function pt(e,n,a={}){const{window:i=U,document:c=i?.document,flush:d="sync"}=a;if(!i||!c)return dt;let s;const o=m=>{s?.(),s=m},l=t.watchEffect(()=>{const m=q(e);if(m){const{stop:w}=gt(c,y=>{y.map(p=>[...p.removedNodes]).flat().some(p=>p===m||p.contains(m))&&n(y)},{window:i,childList:!0,subtree:!0});o(w)}},{flush:d}),u=()=>{l(),o()};return ce(u),u}function ht(e={}){var n;const{window:a=U,deep:i=!0,triggerOnRemoval:c=!1}=e,d=(n=e.document)!=null?n:a?.document,s=()=>{var u;let m=d?.activeElement;if(i)for(;m?.shadowRoot;)m=(u=m?.shadowRoot)==null?void 0:u.activeElement;return m},o=t.shallowRef(),l=()=>{o.value=s()};if(a){const u={capture:!0,passive:!0};Q(a,"blur",m=>{m.relatedTarget===null&&l()},u),Q(a,"focus",l,u)}return c&&pt(o,l,{document:d}),l(),o}const bt="focusin",wt="focusout",xt=":focus-within";function vt(e,n={}){const{window:a=U}=n,i=t.computed(()=>q(e)),c=t.shallowRef(!1),d=t.computed(()=>c.value);if(!a||!ht(n).value)return{focused:d};const s={passive:!0};return Q(i,bt,()=>c.value=!0,s),Q(i,wt,()=>{var o,l,u;return c.value=(u=(l=(o=i.value)==null?void 0:o.matches)==null?void 0:l.call(o,xt))!=null?u:!1},s),{focused:d}}function yt(e,{window:n=U,scrollTarget:a}={}){const i=t.ref(!1),c=()=>{if(!n)return;const d=n.document,s=q(e);if(!s)i.value=!1;else{const o=s.getBoundingClientRect();i.value=o.top<=(n.innerHeight||d.documentElement.clientHeight)&&o.left<=(n.innerWidth||d.documentElement.clientWidth)&&o.bottom>=0&&o.right>=0}};return t.watch(()=>q(e),()=>c(),{immediate:!0,flush:"post"}),n&&Q(a||n,"scroll",c,{capture:!1,passive:!0}),i}const H=e=>{let n=yt(e).value;return n=n&&e.offsetHeight>0,n},L=e=>e.tabIndex>=0,Me=e=>{const n=e.target;return de(n)},de=e=>{let n;if(e instanceof HTMLTableCellElement){const a=e.parentElement?.previousElementSibling;if(a){const i=Array.from(a.children)[e.cellIndex];i&&(n=i)}}else if(e instanceof HTMLTableRowElement){const a=e.previousElementSibling;a&&(n=a)}return n&&(!L(n)||!H(n))?de(n):n},kt=e=>{const n=e.target;let a;if(n instanceof HTMLTableCellElement){const i=n.parentElement?.parentElement;if(i){const c=i.firstElementChild?.children[n.cellIndex];c&&(a=c)}}else if(n instanceof HTMLTableRowElement){const i=n.parentElement;if(i){const c=i.firstElementChild;c&&(a=c)}}return a&&(!L(a)||!H(a))?fe(a):a},Ae=e=>{const n=e.target;return fe(n)},fe=e=>{let n;if(e instanceof HTMLTableCellElement){const a=e.parentElement?.nextElementSibling;if(a){const i=Array.from(a.children)[e.cellIndex];i&&(n=i)}}else if(e instanceof HTMLTableRowElement){const a=e.nextElementSibling;a&&(n=a)}return n&&(!L(n)||!H(n))?fe(n):n},Ct=e=>{const n=e.target;let a;if(n instanceof HTMLTableCellElement){const i=n.parentElement?.parentElement;if(i){const c=i.lastElementChild?.children[n.cellIndex];c&&(a=c)}}else if(n instanceof HTMLTableRowElement){const i=n.parentElement;if(i){const c=i.lastElementChild;c&&(a=c)}}return a&&(!L(a)||!H(a))?de(a):a},Te=e=>{const n=e.target;return ue(n)},ue=e=>{let n;return e.previousElementSibling?n=e.previousElementSibling:n=e.parentElement?.previousElementSibling?.lastElementChild,n&&(!L(n)||!H(n))?ue(n):n},Ve=e=>{const n=e.target;return me(n)},me=e=>{let n;return e.nextElementSibling?n=e.nextElementSibling:n=e.parentElement?.nextElementSibling?.firstElementChild,n&&(!L(n)||!H(n))?me(n):n},De=e=>{const n=e.target.parentElement?.firstElementChild;return n&&(!L(n)||!H(n))?me(n):n},Oe=e=>{const n=e.target.parentElement?.lastElementChild;return n&&(!L(n)||!H(n))?ue(n):n},te=["alt","control","shift","meta"],Et={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},ge={"keydown.up":e=>{const n=Me(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.down":e=>{const n=Ae(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.left":e=>{const n=Te(e);e.preventDefault(),e.stopPropagation(),n&&n.focus()},"keydown.right":e=>{const n=Ve(e);e.preventDefault(),e.stopPropagation(),n&&n.focus()},"keydown.control.up":e=>{const n=kt(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.down":e=>{const n=Ct(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.left":e=>{const n=De(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.right":e=>{const n=Oe(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.end":e=>{const n=Oe(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const n=Ae(e);n&&n.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const n=Me(e);n&&n.focus()}},"keydown.home":e=>{const n=De(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.tab":e=>{const n=Ve(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.shift.tab":e=>{const n=Te(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())}};function pe(e){const n=s=>{let o=null;return s.parent&&(typeof s.parent=="string"?o=document.querySelector(s.parent):s.parent instanceof HTMLElement?o=s.parent:o=s.parent.value),o},a=s=>{const o=n(s);let l=[];if(typeof s.selectors=="string")l=o?Array.from(o.querySelectorAll(s.selectors)):Array.from(document.querySelectorAll(s.selectors));else if(Array.isArray(s.selectors))for(const u of s.selectors)u instanceof HTMLElement?l.push(u):l.push(u.$el);else if(s.selectors instanceof HTMLElement)l.push(s.selectors);else if(s.selectors?.value)if(Array.isArray(s.selectors.value))for(const u of s.selectors.value)u instanceof HTMLElement?l.push(u):l.push(u.$el);else l.push(s.selectors.value);return l},i=s=>{const o=n(s);let l=[];return s.selectors?l=a(s):o&&(l=Array.from(o.children).filter(u=>L(u)&&H(u))),l},c=s=>o=>{const l=Et[o.key]||o.key.toLowerCase();if(te.includes(l))return;const u=s.handlers||ge;for(const m of Object.keys(u)){const[w,...y]=m.split(".");if(w==="keydown"&&y.includes(l)){const p=u[m],I=y.filter(g=>te.includes(g)),x=te.some(g=>{const h=g.charAt(0).toUpperCase()+g.slice(1);return o.getModifierState(h)});if(I.length>0){if(x){for(const g of te)if(y.includes(g)){const h=g.charAt(0).toUpperCase()+g.slice(1);o.getModifierState(h)&&p(o)}}}else x||p(o)}}},d=[];t.onMounted(()=>{for(const s of e){const o=n(s),l=i(s),u=c(s),m=o?[o]:l;for(const w of m){const{focused:y}=vt(t.ref(w)),p=t.watch(y,I=>{I?w.addEventListener("keydown",u):w.removeEventListener("keydown",u)});d.push(p)}}}),t.onBeforeUnmount(()=>{for(const s of d)s()})}function J(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}const ne=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const It=e=>e!=null,St=Object.prototype.toString,Ne=e=>St.call(e)==="[object Object]",W=()=>{},he=Rt();function Rt(){var e,n;return ne&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((n=window?.navigator)==null?void 0:n.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Bt(...e){if(e.length!==1)return t.toRef(...e);const n=e[0];return typeof n=="function"?t.readonly(t.customRef(()=>({get:n,set:W}))):t.ref(n)}function $t(e,n){function a(...i){return new Promise((c,d)=>{Promise.resolve(e(()=>n.apply(this,i),{fn:n,thisArg:this,args:i})).then(c).catch(d)})}return a}function zt(e,n={}){let a,i,c=W;const d=l=>{clearTimeout(l),c(),c=W};let s;return l=>{const u=t.toValue(e),m=t.toValue(n.maxWait);return a&&d(a),u<=0||m!==void 0&&m<=0?(i&&(d(i),i=void 0),Promise.resolve(l())):new Promise((w,y)=>{c=n.rejectOnCancel?y:w,s=l,m&&!i&&(i=setTimeout(()=>{a&&d(a),i=void 0,w(s())},m)),a=setTimeout(()=>{i&&d(i),i=void 0,w(l())},u)})}}function G(e){return Array.isArray(e)?e:[e]}function Mt(e){return t.getCurrentInstance()}function At(e,n=200,a={}){return $t(zt(n,a),e)}function Tt(e,n={}){if(!t.isRef(e))return t.toRefs(e);const a=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const i in e.value)a[i]=t.customRef(()=>({get(){return e.value[i]},set(c){var d;if((d=t.toValue(n.replaceRef))!=null?d:!0)if(Array.isArray(e.value)){const o=[...e.value];o[i]=c,e.value=o}else{const o={...e.value,[i]:c};Object.setPrototypeOf(o,Object.getPrototypeOf(e.value)),e.value=o}else e.value[i]=c}}));return a}function Vt(e,n=!0,a){Mt()?t.onMounted(e,a):n?e():t.nextTick(e)}function Pe(e,n,a){return t.watch(e,n,{...a,immediate:!0})}const oe=ne?window:void 0;function Z(e){var n;const a=t.toValue(e);return(n=a?.$el)!=null?n:a}function K(...e){const n=[],a=()=>{n.forEach(o=>o()),n.length=0},i=(o,l,u,m)=>(o.addEventListener(l,u,m),()=>o.removeEventListener(l,u,m)),c=t.computed(()=>{const o=G(t.toValue(e[0])).filter(l=>l!=null);return o.every(l=>typeof l!="string")?o:void 0}),d=Pe(()=>{var o,l;return[(l=(o=c.value)==null?void 0:o.map(u=>Z(u)))!=null?l:[oe].filter(u=>u!=null),G(t.toValue(c.value?e[1]:e[0])),G(t.unref(c.value?e[2]:e[1])),t.toValue(c.value?e[3]:e[2])]},([o,l,u,m])=>{if(a(),!o?.length||!l?.length||!u?.length)return;const w=Ne(m)?{...m}:m;n.push(...o.flatMap(y=>l.flatMap(p=>u.map(I=>i(y,p,I,w)))))},{flush:"post"}),s=()=>{d(),a()};return J(a),s}function Dt(){const e=t.shallowRef(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function He(e){const n=Dt();return t.computed(()=>(n.value,!!e()))}function Le(e,n,a={}){const{window:i=oe,...c}=a;let d;const s=He(()=>i&&"MutationObserver"in i),o=()=>{d&&(d.disconnect(),d=void 0)},l=t.computed(()=>{const y=t.toValue(e),p=G(y).map(Z).filter(It);return new Set(p)}),u=t.watch(()=>l.value,y=>{o(),s.value&&y.size&&(d=new MutationObserver(n),y.forEach(p=>d.observe(p,c)))},{immediate:!0,flush:"post"}),m=()=>d?.takeRecords(),w=()=>{u(),o()};return J(w),{isSupported:s,stop:w,takeRecords:m}}function be(e,n={}){var a;const{pointerTypes:i,preventDefault:c,stopPropagation:d,exact:s,onMove:o,onEnd:l,onStart:u,initialValue:m,axis:w="both",draggingElement:y=oe,containerElement:p,handle:I=e,buttons:x=[0]}=n,g=t.ref((a=t.toValue(m))!=null?a:{x:0,y:0}),h=t.ref(),k=v=>i?i.includes(v.pointerType):!0,$=v=>{t.toValue(c)&&v.preventDefault(),t.toValue(d)&&v.stopPropagation()},M=v=>{var S;if(!t.toValue(x).includes(v.button)||t.toValue(n.disabled)||!k(v)||t.toValue(s)&&v.target!==t.toValue(e))return;const V=t.toValue(p),A=(S=V?.getBoundingClientRect)==null?void 0:S.call(V),B=t.toValue(e).getBoundingClientRect(),P={x:v.clientX-(V?B.left-A.left+V.scrollLeft:B.left),y:v.clientY-(V?B.top-A.top+V.scrollTop:B.top)};u?.(P,v)!==!1&&(h.value=P,$(v))},N=v=>{if(t.toValue(n.disabled)||!k(v)||!h.value)return;const S=t.toValue(p),V=t.toValue(e).getBoundingClientRect();let{x:A,y:B}=g.value;(w==="x"||w==="both")&&(A=v.clientX-h.value.x,S&&(A=Math.min(Math.max(0,A),S.scrollWidth-V.width))),(w==="y"||w==="both")&&(B=v.clientY-h.value.y,S&&(B=Math.min(Math.max(0,B),S.scrollHeight-V.height))),g.value={x:A,y:B},o?.(g.value,v),$(v)},R=v=>{t.toValue(n.disabled)||!k(v)||h.value&&(h.value=void 0,l?.(g.value,v),$(v))};if(ne){const v=()=>{var S;return{capture:(S=n.capture)!=null?S:!0,passive:!t.toValue(c)}};K(I,"pointerdown",M,v),K(y,"pointermove",N,v),K(y,"pointerup",R,v)}return{...Tt(g),position:g,isDragging:t.computed(()=>!!h.value),style:t.computed(()=>`left:${g.value.x}px;top:${g.value.y}px;`)}}function Ot(e,n,a={}){const{window:i=oe,...c}=a;let d;const s=He(()=>i&&"ResizeObserver"in i),o=()=>{d&&(d.disconnect(),d=void 0)},l=t.computed(()=>{const w=t.toValue(e);return Array.isArray(w)?w.map(y=>Z(y)):[Z(w)]}),u=t.watch(l,w=>{if(o(),s.value&&i){d=new ResizeObserver(n);for(const y of w)y&&d.observe(y,c)}},{immediate:!0,flush:"post"}),m=()=>{o(),u()};return J(m),{isSupported:s,stop:m}}function F(e,n={}){const{reset:a=!0,windowResize:i=!0,windowScroll:c=!0,immediate:d=!0,updateTiming:s="sync"}=n,o=t.shallowRef(0),l=t.shallowRef(0),u=t.shallowRef(0),m=t.shallowRef(0),w=t.shallowRef(0),y=t.shallowRef(0),p=t.shallowRef(0),I=t.shallowRef(0);function x(){const h=Z(e);if(!h){a&&(o.value=0,l.value=0,u.value=0,m.value=0,w.value=0,y.value=0,p.value=0,I.value=0);return}const k=h.getBoundingClientRect();o.value=k.height,l.value=k.bottom,u.value=k.left,m.value=k.right,w.value=k.top,y.value=k.width,p.value=k.x,I.value=k.y}function g(){s==="sync"?x():s==="next-frame"&&requestAnimationFrame(()=>x())}return Ot(e,g),t.watch(()=>Z(e),h=>!h&&g()),Le(e,g,{attributeFilter:["style","class"]}),c&&K("scroll",g,{capture:!0,passive:!0}),i&&K("resize",g,{passive:!0}),Vt(()=>{d&&g()}),{height:o,bottom:l,left:u,right:m,top:w,width:y,x:p,y:I,update:g}}const Nt=e=>{const n=new DOMParser().parseFromString(e,"text/html");return Array.from(n.body.childNodes).some(a=>a.nodeType===1)},Pt=(e=8)=>Array.from({length:e},()=>Math.floor(Math.random()*16).toString(16)).join(""),Ht=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],Lt=["innerHTML"],Wt={key:2},We=t.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(e,{expose:n}){const a=t.useTemplateRef("cell"),i=e.store.getCellData(e.colIndex,e.rowIndex),c=t.ref(""),d=t.ref(!1),s=e.store.columns[e.colIndex],o=e.store.rows[e.rowIndex],l=s.align||"center",u=s.width||"40ch",m=t.computed(()=>e.store.getCellDisplayValue(e.colIndex,e.rowIndex)),w=t.computed(()=>typeof m.value=="string"?Nt(m.value):!1),y=t.computed(()=>({textAlign:l,width:u,fontWeight:d.value?"bold":"inherit",paddingLeft:e.store.getIndent(e.colIndex,e.store.display[e.rowIndex]?.indent)})),p=t.computed(()=>({"sticky-column":e.pinned,"cell-modified":d.value})),I=()=>{g(),x()},x=()=>{const{left:R,bottom:v,width:S,height:V}=F(a);s.mask,s.modalComponent&&e.store.$patch(A=>{A.modal.visible=!0,A.modal.colIndex=e.colIndex,A.modal.rowIndex=e.rowIndex,A.modal.left=R,A.modal.bottom=v,A.modal.width=S,A.modal.height=V,A.modal.cell=a.value,typeof s.modalComponent=="function"?A.modal.component=s.modalComponent({table:A.table,row:o,column:s}):A.modal.component=s.modalComponent,A.modal.componentProps=s.modalComponentExtraProps})};if(e.addNavigation){let R={...ge,"keydown.f2":x,"keydown.alt.up":x,"keydown.alt.down":x,"keydown.alt.left":x,"keydown.alt.right":x};typeof e.addNavigation=="object"&&(R={...R,...e.addNavigation}),pe([{selectors:a,handlers:R}])}const g=()=>{if(a.value&&s.edit){const R=window.getSelection();if(R)try{const v=document.createRange();v.selectNodeContents&&(v.selectNodeContents(a.value),R.removeAllRanges(),R.addRange(v))}catch{}}},h=()=>{a.value&&(c.value=a.value.textContent,g())},k=()=>{try{const R=window.getSelection();if(R&&R.rangeCount>0&&a.value){const v=R.getRangeAt(0),S=v.cloneRange();if(S.selectNodeContents&&S.setEnd)return S.selectNodeContents(a.value),S.setEnd(v.endContainer,v.endOffset),S.toString().length}}catch{}return 0},$=R=>{if(a.value)try{const v=window.getSelection();if(!v)return;let S=0;const V=document.createTreeWalker?document.createTreeWalker(a.value,NodeFilter.SHOW_TEXT,null):null;if(!V)return;let A,B=null;for(;A=V.nextNode();){const P=A,X=S+P.textContent.length;if(R<=X&&(B=document.createRange(),B.setStart&&B.setEnd)){B.setStart(P,R-S),B.setEnd(P,R-S);break}S=X}B&&v.removeAllRanges&&v.addRange&&(v.removeAllRanges(),v.addRange(B))}catch{}},M=R=>{const v=R.target;if(v.textContent===c.value)return;const S=k();c.value=v.textContent,s.format?(d.value=v.textContent!==e.store.getFormattedValue(e.colIndex,e.rowIndex,i),e.store.setCellText(e.colIndex,e.rowIndex,v.textContent)):(d.value=v.textContent!==i,e.store.setCellData(e.colIndex,e.rowIndex,v.textContent)),t.nextTick().then(()=>{$(S)})},N=At(M,e.debounce);return n({currentData:c}),(R,v)=>(t.openBlock(),t.createElementBlock("td",{ref:"cell","data-colindex":R.colIndex,"data-rowindex":R.rowIndex,"data-editable":t.unref(s).edit,contenteditable:t.unref(s).edit,tabindex:R.tabIndex,spellcheck:!1,style:t.normalizeStyle(y.value),onFocus:h,onPaste:M,onInput:v[0]||(v[0]=(...S)=>t.unref(N)&&t.unref(N)(...S)),onClick:I,class:t.normalizeClass(["atable-cell",p.value])},[t.unref(s).cellComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(s).cellComponent),t.mergeProps({key:0,value:m.value},t.unref(s).cellComponentProps),null,16,["value"])):w.value?(t.openBlock(),t.createElementBlock("span",{key:1,innerHTML:m.value},null,8,Lt)):(t.openBlock(),t.createElementBlock("span",Wt,t.toDisplayString(m.value),1))],46,Ht))}}),Xt=["tabindex"],Gt=["tabindex"],Ft=["colspan"],Yt=t.defineComponent({__name:"AExpansionRow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object]}},setup(e){const n=t.useTemplateRef("rowEl"),a=t.computed(()=>e.store.display[e.rowIndex].expanded?"▼":"►");if(e.addNavigation){const i={"keydown.control.g":c=>{c.stopPropagation(),c.preventDefault(),e.store.toggleRowExpand(e.rowIndex)}};typeof e.addNavigation=="object"&&Object.assign(i,e.addNavigation),pe([{selectors:n,handlers:i}])}return(i,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("tr",t.mergeProps(i.$attrs,{ref:"rowEl",tabindex:i.tabIndex,class:"expandable-row"}),[t.createElementVNode("td",{tabIndex:-1,onClick:c[0]||(c[0]=d=>i.store.toggleRowExpand(i.rowIndex)),class:"row-index"},t.toDisplayString(a.value),1),t.renderSlot(i.$slots,"row",{},void 0,!0)],16,Xt),i.store.display[i.rowIndex].expanded?(t.openBlock(),t.createElementBlock("tr",{key:0,ref:"rowExpanded",tabindex:i.tabIndex,class:"expanded-row"},[t.createElementVNode("td",{tabIndex:-1,colspan:i.store.columns.length+1,class:"expanded-row-content"},[t.renderSlot(i.$slots,"content",{},void 0,!0)],8,Ft)],8,Gt)):t.createCommentVNode("",!0)],64))}}),Y=(e,n)=>{const a=e.__vccOpts||e;for(const[i,c]of n)a[i]=c;return a},Xe=Y(Yt,[["__scopeId","data-v-5ad4bb41"]]),jt=["colspan"],Ut={ref:"container",class:"gantt-container"},qt=["data-rowindex","data-colindex"],Jt={key:2,class:"gantt-label"},Zt=["x1","y1","x2","y2"],Ge=Y(t.defineComponent({__name:"AGanttCell",props:{store:{},columnsCount:{},rowIndex:{},colIndex:{},start:{default:0},end:{},colspan:{default:1},label:{},color:{default:"#cccccc"}},emits:["connection:create"],setup(e,{expose:n,emit:a}){t.useCssVars(E=>({"17bc2643":c.value,"0a8a9192":E.colspan}));const i=a,c=t.ref(e.color.length>=6?e.color:"#cccccc"),d=`gantt-bar-row-${e.rowIndex}-col-${e.colIndex}`,s=t.useTemplateRef("container"),o=t.useTemplateRef("bar"),l=t.useTemplateRef("leftResizeHandle"),u=t.useTemplateRef("rightResizeHandle"),m=t.useTemplateRef("leftConnectionHandle"),w=t.useTemplateRef("rightConnectionHandle"),{width:y}=F(s),{left:p,right:I}=F(o),x=t.ref(e.start),g=t.ref(e.end||x.value+e.colspan),h=t.ref(!1),k=t.ref(!1),$=t.ref(!1),M=t.ref(!1),N=t.ref(!1),R=t.ref({startX:0,startY:0,endX:0,endY:0}),v=t.computed(()=>re.value||P.value||X.value),S=t.computed(()=>e.colspan>0?y.value/e.colspan:0),V=t.computed(()=>{const E=x.value/e.colspan*100,r=g.value/e.colspan*100;return{left:`${E}%`,width:`${r-E}%`,backgroundColor:c.value}}),A=t.computed(()=>({position:"fixed",top:0,left:0,width:"100vw",height:"100vh",pointerEvents:"none",zIndex:1e3})),B=t.ref({startX:0,startPos:0}),{isDragging:P}=be(l,{axis:"x",onStart:()=>_(p.value,x.value),onMove:({x:E})=>ie(E),onEnd:({x:E})=>Ie(E)}),{isDragging:X}=be(u,{axis:"x",onStart:()=>_(I.value,g.value),onMove:({x:E})=>se(E),onEnd:({x:E})=>Ke(E)}),{isDragging:re}=be(o,{exact:!0,axis:"x",onStart:()=>_(p.value,x.value),onMove:({x:E})=>_e(E),onEnd:({x:E})=>et(E)});t.onMounted(()=>{tt()}),t.onUnmounted(()=>{nt()});function _(E,r){o.value&&(o.value.style.transition="none"),B.value={startX:E,startPos:r}}function ie(E){if(!P.value||!o.value)return;const f=(E-B.value.startX)/S.value,b=Math.max(0,Math.min(g.value-1,B.value.startPos+f));o.value.style.left=`${b/e.colspan*100}%`,o.value.style.width=`${(g.value-b)/e.colspan*100}%`}function Ie(E){if(!o.value)return;const r=E-B.value.startX,f=Math.round(r/S.value),b=x.value,C=Math.max(0,Math.min(g.value-1,B.value.startPos+f));x.value=C,e.store.updateGanttBar({rowIndex:e.rowIndex,colIndex:e.colIndex,type:"resize",edge:"start",oldStart:b,newStart:C,end:g.value,delta:f,oldColspan:g.value-b,newColspan:g.value-C})}function se(E){if(!X.value||!o.value)return;const f=(E-B.value.startX)/S.value,b=Math.max(x.value+1,Math.min(e.columnsCount,B.value.startPos+f));o.value.style.width=`${(b-x.value)/e.colspan*100}%`}function Ke(E){if(!o.value)return;const r=E-B.value.startX,f=Math.round(r/S.value),b=g.value,C=Math.max(x.value+1,Math.min(e.columnsCount,B.value.startPos+f));g.value=C,e.store.updateGanttBar({rowIndex:e.rowIndex,colIndex:e.colIndex,type:"resize",edge:"end",oldEnd:b,newEnd:C,start:x.value,delta:f,oldColspan:b-x.value,newColspan:C-x.value})}function _e(E){if(!re.value||!o.value)return;const f=(E-B.value.startX)/S.value,b=g.value-x.value,C=Math.max(0,Math.min(B.value.startPos+f,e.columnsCount-b));o.value.style.left=`${C/e.colspan*100}%`}function et(E){if(!o.value)return;const r=E-B.value.startX,f=Math.round(r/S.value),b=g.value-x.value,C=x.value,z=g.value;let T=B.value.startPos+f,O=T+b;T<0?(T=0,O=b):O>e.columnsCount&&(O=e.columnsCount,T=O-b),x.value=T,g.value=O,e.store.updateGanttBar({rowIndex:e.rowIndex,colIndex:e.colIndex,type:"bar",oldStart:C,oldEnd:z,newStart:T,newEnd:O,delta:f,colspan:O-T})}function tt(){const{x:E,y:r}=F(o),{x:f,y:b}=F(m),{x:C,y:z}=F(w);e.store.registerGanttBar({id:d,rowIndex:e.rowIndex,colIndex:e.colIndex,startIndex:x,endIndex:g,color:c,label:e.label,position:{x:E,y:r}}),e.store.isDependencyGraphEnabled&&(e.store.registerConnectionHandle({id:`${d}-connection-left`,rowIndex:e.rowIndex,colIndex:e.colIndex,side:"left",position:{x:f,y:b},visible:h,barId:d}),e.store.registerConnectionHandle({id:`${d}-connection-right`,rowIndex:e.rowIndex,colIndex:e.colIndex,side:"right",position:{x:C,y:z},visible:k,barId:d}))}function nt(){e.store.unregisterGanttBar(d),e.store.isDependencyGraphEnabled&&(e.store.unregisterConnectionHandle(`${d}-connection-left`),e.store.unregisterConnectionHandle(`${d}-connection-right`))}function ot(){e.store.isDependencyGraphEnabled&&(h.value=!0,k.value=!0)}function Se(){!$.value&&!M.value&&(h.value=!1,k.value=!1)}function Re(E,r){r.preventDefault(),r.stopPropagation(),N.value=!0,E==="left"?$.value=!0:M.value=!0;const f=E==="left"?m.value:w.value;if(f){const z=f.getBoundingClientRect(),T=z.left+z.width/2,O=z.top+z.height/2;R.value={startX:T,startY:O,endX:T,endY:O}}const b=z=>{R.value.endX=z.clientX,R.value.endY=z.clientY},C=z=>{Be(z,E),$e(b,C)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",C)}function Be(E,r){const b=document.elementFromPoint(E.clientX,E.clientY)?.closest(".connection-handle");if(b&&b!==(r==="left"?m.value:w.value)){const C=b.closest(".gantt-bar");if(C){const z=parseInt(C.getAttribute("data-rowindex")||"0"),T=parseInt(C.getAttribute("data-colindex")||"0"),O=b.classList.contains("left-connection-handle")?"left":"right",In=`gantt-bar-row-${z}-col-${T}`,at=e.store.createConnection(`${d}-connection-${r}`,`${In}-connection-${O}`);at&&i("connection:create",at)}}}function $e(E,r){N.value=!1,$.value=!1,M.value=!1,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",r),o.value?.matches(":hover")||Se()}return n({barStyle:V,cleanupConnectionDrag:$e,currentEnd:g,handleConnectionDrop:Be,isLeftConnectionDragging:$,isLeftConnectionVisible:h,isRightConnectionDragging:M,isRightConnectionVisible:k,showDragPreview:N}),(E,r)=>(t.openBlock(),t.createElementBlock("td",{class:"aganttcell",colspan:E.colspan},[t.createElementVNode("div",Ut,[t.createElementVNode("div",{ref:"bar","data-rowindex":E.rowIndex,"data-colindex":E.colIndex,class:t.normalizeClass(["gantt-bar",{"is-dragging":v.value}]),style:t.normalizeStyle(V.value),onMouseenter:ot,onMouseleave:Se},[E.store.isDependencyGraphEnabled?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"leftConnectionHandle",class:t.normalizeClass(["connection-handle left-connection-handle",{visible:h.value,"is-dragging":$.value}]),onMousedown:r[0]||(r[0]=t.withModifiers(f=>Re("left",f),["stop"]))},r[2]||(r[2]=[t.createElementVNode("div",{class:"connection-dot"},null,-1)]),34)):t.createCommentVNode("",!0),E.store.isDependencyGraphEnabled?(t.openBlock(),t.createElementBlock("div",{key:1,ref:"rightConnectionHandle",class:t.normalizeClass(["connection-handle right-connection-handle",{visible:k.value,"is-dragging":M.value}]),onMousedown:r[1]||(r[1]=t.withModifiers(f=>Re("right",f),["stop"]))},r[3]||(r[3]=[t.createElementVNode("div",{class:"connection-dot"},null,-1)]),34)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref:"leftResizeHandle",class:t.normalizeClass(["resize-handle left-resize-handle",{"is-dragging":t.unref(P)}])},r[4]||(r[4]=[t.createElementVNode("div",{class:"handle-grip"},null,-1),t.createElementVNode("div",{class:"vertical-indicator left-indicator"},null,-1)]),2),E.label?(t.openBlock(),t.createElementBlock("label",Jt,t.toDisplayString(E.label),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref:"rightResizeHandle",class:t.normalizeClass(["resize-handle right-resize-handle",{"is-dragging":t.unref(X)}])},r[5]||(r[5]=[t.createElementVNode("div",{class:"handle-grip"},null,-1),t.createElementVNode("div",{class:"vertical-indicator right-indicator"},null,-1)]),2)],46,qt)],512),E.store.isDependencyGraphEnabled&&N.value?(t.openBlock(),t.createElementBlock("svg",{key:0,style:t.normalizeStyle(A.value)},[t.createElementVNode("line",{x1:R.value.startX,y1:R.value.startY,x2:R.value.endX,y2:R.value.endY,stroke:"#2196f3","stroke-width":"2","stroke-dasharray":"5,5"},null,8,Zt)],4)):t.createCommentVNode("",!0)],8,jt))}}),[["__scopeId","data-v-52febd32"]]),Qt=["tabindex"],we=Y(t.defineComponent({__name:"ARow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(e){const n=t.useTemplateRef("rowEl"),a=t.computed(()=>e.store.isRowVisible(e.rowIndex)),i=t.computed(()=>e.store.getRowExpandSymbol(e.rowIndex));if(e.addNavigation){let c=ge;typeof e.addNavigation=="object"&&(c={...c,...e.addNavigation}),pe([{selectors:n,handlers:c}])}return(c,d)=>t.withDirectives((t.openBlock(),t.createElementBlock("tr",{ref:"rowEl",tabindex:c.tabIndex,class:"atable-row"},[c.store.config.view!=="uncounted"?t.renderSlot(c.$slots,"index",{key:0},()=>[c.store.config.view==="list"?(t.openBlock(),t.createElementBlock("td",{key:0,tabIndex:-1,class:t.normalizeClass(["list-index",c.store.hasPinnedColumns?"sticky-index":""])},t.toDisplayString(c.rowIndex+1),3)):c.store.isTreeView?(t.openBlock(),t.createElementBlock("td",{key:1,tabIndex:-1,class:t.normalizeClass(["tree-index",c.store.hasPinnedColumns?"sticky-index":""]),onClick:d[0]||(d[0]=s=>c.store.toggleRowExpand(c.rowIndex))},t.toDisplayString(i.value),3)):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),t.renderSlot(c.$slots,"default",{},void 0,!0)],8,Qt)),[[t.vShow,a.value]])}}),[["__scopeId","data-v-c554ee0f"]]),xe=ne?window:void 0;function j(e){var n;const a=t.toValue(e);return(n=a?.$el)!=null?n:a}function ae(...e){const n=[],a=()=>{n.forEach(o=>o()),n.length=0},i=(o,l,u,m)=>(o.addEventListener(l,u,m),()=>o.removeEventListener(l,u,m)),c=t.computed(()=>{const o=G(t.toValue(e[0])).filter(l=>l!=null);return o.every(l=>typeof l!="string")?o:void 0}),d=Pe(()=>{var o,l;return[(l=(o=c.value)==null?void 0:o.map(u=>j(u)))!=null?l:[xe].filter(u=>u!=null),G(t.toValue(c.value?e[1]:e[0])),G(t.unref(c.value?e[2]:e[1])),t.toValue(c.value?e[3]:e[2])]},([o,l,u,m])=>{if(a(),!o?.length||!l?.length||!u?.length)return;const w=Ne(m)?{...m}:m;n.push(...o.flatMap(y=>l.flatMap(p=>u.map(I=>i(y,p,I,w)))))},{flush:"post"}),s=()=>{d(),a()};return J(a),s}let Fe=!1;function Ye(e,n,a={}){const{window:i=xe,ignore:c=[],capture:d=!0,detectIframe:s=!1,controls:o=!1}=a;if(!i)return o?{stop:W,cancel:W,trigger:W}:W;if(he&&!Fe){Fe=!0;const g={passive:!0};Array.from(i.document.body.children).forEach(h=>h.addEventListener("click",W,g)),i.document.documentElement.addEventListener("click",W,g)}let l=!0;const u=g=>t.toValue(c).some(h=>{if(typeof h=="string")return Array.from(i.document.querySelectorAll(h)).some(k=>k===g.target||g.composedPath().includes(k));{const k=j(h);return k&&(g.target===k||g.composedPath().includes(k))}});function m(g){const h=t.toValue(g);return h&&h.$.subTree.shapeFlag===16}function w(g,h){const k=t.toValue(g),$=k.$.subTree&&k.$.subTree.children;return $==null||!Array.isArray($)?!1:$.some(M=>M.el===h.target||h.composedPath().includes(M.el))}const y=g=>{const h=j(e);if(g.target!=null&&!(!(h instanceof Element)&&m(e)&&w(e,g))&&!(!h||h===g.target||g.composedPath().includes(h))){if("detail"in g&&g.detail===0&&(l=!u(g)),!l){l=!0;return}n(g)}};let p=!1;const I=[ae(i,"click",g=>{p||(p=!0,setTimeout(()=>{p=!1},0),y(g))},{passive:!0,capture:d}),ae(i,"pointerdown",g=>{const h=j(e);l=!u(g)&&!!(h&&!g.composedPath().includes(h))},{passive:!0}),s&&ae(i,"blur",g=>{setTimeout(()=>{var h;const k=j(e);((h=i.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!k?.contains(i.document.activeElement)&&n(g)},0)},{passive:!0})].filter(Boolean),x=()=>I.forEach(g=>g());return o?{stop:x,cancel:()=>{l=!1},trigger:g=>{l=!0,y(g),l=!1}}:x}const ve=new WeakMap,Kt={mounted(e,n){const a=!n.modifiers.bubble;let i;if(typeof n.value=="function")i=Ye(e,n.value,{capture:a});else{const[c,d]=n.value;i=Ye(e,c,Object.assign({capture:a},d))}ve.set(e,i)},unmounted(e){const n=ve.get(e);n&&typeof n=="function"?n():n?.stop(),ve.delete(e)}};function _t(){const e=t.shallowRef(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function en(e){const n=_t();return t.computed(()=>(n.value,!!e()))}function je(e,n,a={}){const{window:i=xe,...c}=a;let d;const s=en(()=>i&&"ResizeObserver"in i),o=()=>{d&&(d.disconnect(),d=void 0)},l=t.computed(()=>{const w=t.toValue(e);return Array.isArray(w)?w.map(y=>j(y)):[j(w)]}),u=t.watch(l,w=>{if(o(),s.value&&i){d=new ResizeObserver(n);for(const y of w)y&&d.observe(y,c)}},{immediate:!0,flush:"post"}),m=()=>{o(),u()};return J(m),{isSupported:s,stop:m}}function ye(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const tn={mounted(e,n){typeof n.value=="function"?je(e,n.value):je(e,...n.value)}};function Ue(e){const n=window.getComputedStyle(e);if(n.overflowX==="scroll"||n.overflowY==="scroll"||n.overflowX==="auto"&&e.clientWidth<e.scrollWidth||n.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const a=e.parentNode;return!a||a.tagName==="BODY"?!1:Ue(a)}}function nn(e){const n=e||window.event,a=n.target;return Ue(a)?!1:n.touches.length>1?!0:(n.preventDefault&&n.preventDefault(),!1)}const ke=new WeakMap;function on(e,n=!1){const a=t.shallowRef(n);let i=null,c="";t.watch(Bt(e),o=>{const l=ye(t.toValue(o));if(l){const u=l;if(ke.get(u)||ke.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(c=u.style.overflow),u.style.overflow==="hidden")return a.value=!0;if(a.value)return u.style.overflow="hidden"}},{immediate:!0});const d=()=>{const o=ye(t.toValue(e));!o||a.value||(he&&(i=ae(o,"touchmove",l=>{nn(l)},{passive:!1})),o.style.overflow="hidden",a.value=!0)},s=()=>{const o=ye(t.toValue(e));!o||!a.value||(he&&i?.(),o.style.overflow=c,ke.delete(o),a.value=!1)};return J(s),t.computed({get(){return a.value},set(o){o?d():s()}})}function an(){let e=!1;const n=t.shallowRef(!1);return(a,i)=>{if(n.value=i.value,e)return;e=!0;const c=on(a,i.value);t.watch(n,d=>c.value=d)}}an();const ln={class:"gantt-connection-overlay"},rn={class:"connection-svg",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1}},sn=["d","stroke-width","onDblclick"],cn=["d","stroke","stroke-width","id","onDblclick"],dn=.25,le=16,fn=Y(t.defineComponent({__name:"AGanttConnection",props:{store:{}},emits:["connection:delete"],setup(e,{emit:n}){const a=n,i=t.computed(()=>e.store.connectionPaths.filter(s=>{const o=e.store.ganttBars.find(u=>u.id===s.from.barId),l=e.store.ganttBars.find(u=>u.id===s.to.barId);return o&&l})),c=(s,o=!1)=>{const l=e.store.connectionHandles.find(S=>S.barId===s.from.barId&&S.side===s.from.side),u=e.store.connectionHandles.find(S=>S.barId===s.to.barId&&S.side===s.to.side);if(!l||!u)return"";const m=l.position.x+le/2,w=l.position.y+le/2,y=u.position.x+le/2,p=u.position.y+le/2,I=Math.abs(y-m),x=Math.max(I*dn,50),g=m+(s.from.side==="left"?-x:x),h=y+(s.to.side==="left"?-x:x),k={x:.5*m+.5*g,y:.5*w+.5*w},$={x:.5*g+.5*h,y:.5*w+.5*p},M={x:.5*h+.5*y,y:.5*p+.5*p},N={x:.5*k.x+.5*$.x,y:.5*k.y+.5*$.y},R={x:.5*$.x+.5*M.x,y:.5*$.y+.5*M.y},v={x:.5*N.x+.5*R.x,y:.5*N.y+.5*R.y};return`M ${m} ${w} Q ${g} ${w}, ${v.x} ${v.y} Q ${h} ${p}, ${y} ${p}`},d=s=>{e.store.deleteConnection(s.id)&&a("connection:delete",s)};return(s,o)=>(t.openBlock(),t.createElementBlock("div",ln,[(t.openBlock(),t.createElementBlock("svg",rn,[o[0]||(o[0]=t.createElementVNode("defs",null,[t.createElementVNode("path",{id:"arrowhead",d:"M 0 -7 L 20 0 L 0 7Z",stroke:"black","stroke-width":"1",fill:"currentColor"}),t.createElementVNode("marker",{id:"arrowhead-marker",markerWidth:"10",markerHeight:"7",refX:"5",refY:"3.5",orient:"auto",markerUnits:"strokeWidth"},[t.createElementVNode("polygon",{points:"0 0, 10 3.5, 0 7",fill:"currentColor"})])],-1)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,l=>(t.openBlock(),t.createElementBlock("path",{key:`${l.id}-hitbox`,d:c(l),stroke:"transparent","stroke-width":(l.style?.width||2)+10,fill:"none",class:"connection-hitbox",onDblclick:u=>d(l)},null,40,sn))),128)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,l=>(t.openBlock(),t.createElementBlock("path",{key:l.id,d:c(l),stroke:l.style?.color||"#666","stroke-width":l.style?.width||2,fill:"none","marker-mid":"url(#arrowhead-marker)",id:l.id,class:"connection-path animated-path",onDblclick:u=>d(l)},null,40,cn))),128))]))]))}}),[["__scopeId","data-v-955111b6"]]),un={key:0},mn={class:"atable-header-row",tabindex:"-1"},gn=["data-colindex"],Ce=t.defineComponent({__name:"ATableHeader",props:{columns:{},store:{}},setup(e){const n=a=>{for(const i of a){if(i.borderBoxSize.length===0)continue;const d=i.borderBoxSize[0].inlineSize,s=Number(i.target.dataset.colindex),o=e.store.columns[s]?.width;typeof o=="number"&&o!==d&&e.store.resizeColumn(s,d)}};return(a,i)=>a.columns.length?(t.openBlock(),t.createElementBlock("thead",un,[t.createElementVNode("tr",mn,[a.store.zeroColumn?(t.openBlock(),t.createElementBlock("th",{key:0,id:"header-index",class:t.normalizeClass([[a.store.hasPinnedColumns?"sticky-index":"",a.store.isTreeView?"tree-index":"",a.store.config.view==="list-expansion"?"list-expansion-index":""],"list-index"])},null,2)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.columns,(c,d)=>t.withDirectives((t.openBlock(),t.createElementBlock("th",{key:c.name,"data-colindex":d,tabindex:"-1",style:t.normalizeStyle(a.store.getHeaderCellStyle(c)),class:t.normalizeClass(c.pinned?"sticky-column":"")},[t.renderSlot(a.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(c.label||String.fromCharCode(d+97).toUpperCase()),1)])],14,gn)),[[t.unref(tn),n]])),128))])])):t.createCommentVNode("",!0)}}),Ee=t.defineComponent({__name:"ATableModal",props:{store:{}},setup(e){const n=t.useTemplateRef("amodal"),{width:a,height:i}=F(n),c=t.computed(()=>{if(!(e.store.modal.height&&e.store.modal.width&&e.store.modal.left&&e.store.modal.bottom))return;const d=e.store.modal.cell?.closest("table"),s=d.offsetHeight||0,o=d.offsetWidth||0;let l=e.store.modal.cell?.offsetTop||0;const u=d.querySelector("thead")?.offsetHeight||0;l+=u,l=l+i.value<s?l:l-(i.value+e.store.modal.height);let m=e.store.modal.cell?.offsetLeft||0;return m=m+a.value<=o?m:m-(a.value-e.store.modal.width),{left:`${m}px`,top:`${l}px`}});return(d,s)=>(t.openBlock(),t.createElementBlock("div",{class:"amodal",ref:"amodal",tabindex:"-1",onClick:s[0]||(s[0]=t.withModifiers(()=>{},["stop"])),onInput:s[1]||(s[1]=t.withModifiers(()=>{},["stop"])),style:t.normalizeStyle(c.value)},[t.renderSlot(d.$slots,"default")],36))}}),qe=e=>{const n=e.id||Pt();return lt.defineStore(`table-${n}`,()=>{const i=()=>{const r=[Object.assign({},{rowModified:!1})],f=new Set;for(let b=0;b<d.value.length;b++){const C=d.value[b];C.parent!==null&&C.parent!==void 0&&f.add(C.parent)}for(let b=0;b<d.value.length;b++){const C=d.value[b];r[b]={childrenOpen:!1,expanded:!1,indent:C.indent||0,isParent:f.has(b),isRoot:C.parent===null||C.parent===void 0,rowModified:!1,open:C.parent===null||C.parent===void 0,parent:C.parent}}return r},c=t.ref(e.columns),d=t.ref(e.rows),s=t.ref(e.config||{}),o=t.ref({}),l=t.ref({}),u=t.computed(()=>{const r={};for(const[f,b]of c.value.entries())for(const[C,z]of d.value.entries())r[`${f}:${C}`]=z[b.name];return r}),m=t.computed({get:()=>{const r=i();for(let f=0;f<r.length;f++)o.value[f]&&(r[f].rowModified=o.value[f]),l.value[f]&&(l.value[f].childrenOpen!==void 0&&(r[f].childrenOpen=l.value[f].childrenOpen),l.value[f].expanded!==void 0&&(r[f].expanded=l.value[f].expanded));if(k.value){const f=(b,C)=>{const z=C[b];if(z.isRoot||z.parent===null||z.parent===void 0)return!0;const T=z.parent;return T<0||T>=C.length?!1:(C[T].childrenOpen||!1)&&f(T,C)};for(let b=0;b<r.length;b++)r[b].isRoot||(r[b].open=f(b,r))}return r},set:r=>{JSON.stringify(r)!==JSON.stringify(m.value)&&(m.value=r)}}),w=t.ref(e.modal||{visible:!1}),y=t.ref({}),p=t.ref([]),I=t.ref([]),x=t.ref([]),g=t.computed(()=>c.value.some(r=>r.pinned)),h=t.computed(()=>s.value.view==="gantt"||s.value.view==="tree-gantt"),k=t.computed(()=>s.value.view==="tree"||s.value.view==="tree-gantt"),$=t.computed(()=>s.value.dependencyGraph!==!1),M=t.computed(()=>`${Math.ceil(d.value.length/100+1)}ch`),N=t.computed(()=>s.value.view?["list","tree","tree-gantt","list-expansion"].includes(s.value.view):!1),R=(r,f)=>u.value[`${r}:${f}`],v=(r,f,b)=>{const C=`${r}:${f}`,z=c.value[r];u.value[C]!==b&&(o.value[f]=!0),u.value[C]=b,d.value[f]={...d.value[f],[z.name]:b}},S=r=>{d.value=r},V=(r,f,b)=>{const C=`${r}:${f}`;u.value[C]!==b&&(o.value[f]=!0,y.value[C]=b)},A=r=>{const f=c.value.indexOf(r)===c.value.length-1,b=s.value.fullWidth?r.resizable&&!f:r.resizable;return{width:r.width||"40ch",textAlign:r.align||"center",...b&&{resize:"horizontal",overflow:"hidden",whiteSpace:"nowrap"}}},B=(r,f)=>{if(r<0||r>=c.value.length)return;const C=Math.max(f,40);c.value[r]={...c.value[r],width:`${C}px`}},P=r=>{const f=d.value[r];return h.value&&f.gantt!==void 0},X=r=>!k.value||m.value[r].isRoot||m.value[r].open,re=r=>!k.value&&s.value.view!=="list-expansion"?"":k.value&&(m.value[r].isRoot||m.value[r].isParent)?m.value[r].childrenOpen?"▼":"►":s.value.view==="list-expansion"?m.value[r].expanded?"▼":"►":"",_=r=>{if(k.value){const f=l.value[r]||{},C=!(f.childrenOpen??m.value[r].childrenOpen);l.value[r]={...f,childrenOpen:C},C||ie(r)}else if(s.value.view==="list-expansion"){const f=l.value[r]||{},b=f.expanded??m.value[r].expanded;l.value[r]={...f,expanded:!b}}},ie=r=>{for(let f=0;f<d.value.length;f++)if(m.value[f].parent===r){const b=l.value[f]||{};l.value[f]={...b,childrenOpen:!1},ie(f)}},Ie=(r,f)=>{const b=R(r,f);return se(r,f,b)},se=(r,f,b)=>{const C=c.value[r],z=d.value[f],T=C.format;return T?typeof T=="function"?T(b,{table:u.value,row:z,column:C}):typeof T=="string"?Function(`"use strict";return (${T})`)()(b,{table:u.value,row:z,column:C}):b:b};return{columns:c,config:s,connectionHandles:I,connectionPaths:x,display:m,ganttBars:p,modal:w,rows:d,table:u,updates:y,hasPinnedColumns:g,isGanttView:h,isTreeView:k,isDependencyGraphEnabled:$,numberedRowWidth:M,zeroColumn:N,closeModal:r=>{r.target instanceof Node&&w.value.parent?.contains(r.target)||w.value.visible&&(w.value.visible=!1)},createConnection:(r,f,b)=>{const C=I.value.find(O=>O.id===r),z=I.value.find(O=>O.id===f);if(!C||!z)return console.warn("Cannot create connection: handle not found"),null;const T={id:`connection-${r}-${f}`,from:{barId:C.barId,side:C.side},to:{barId:z.barId,side:z.side},style:b?.style,label:b?.label};return x.value.push(T),T},deleteConnection:r=>{const f=x.value.findIndex(b=>b.id===r);return f>=0?(x.value.splice(f,1),!0):!1},getCellData:R,getCellDisplayValue:Ie,getConnectionsForBar:r=>x.value.filter(f=>f.from.barId===r||f.to.barId===r),getFormattedValue:se,getHandlesForBar:r=>I.value.filter(f=>f.barId===r),getHeaderCellStyle:A,getIndent:(r,f)=>f&&r===0&&f>0?`${f}ch`:"inherit",getRowExpandSymbol:re,isRowGantt:P,isRowVisible:X,registerConnectionHandle:r=>{const f=I.value.findIndex(b=>b.id===r.id);f>=0?I.value[f]=r:I.value.push(r)},registerGanttBar:r=>{const f=p.value.findIndex(b=>b.id===r.id);f>=0?p.value[f]=r:p.value.push(r)},resizeColumn:B,setCellData:v,setCellText:V,toggleRowExpand:_,unregisterConnectionHandle:r=>{const f=I.value.findIndex(b=>b.id===r);f>=0&&I.value.splice(f,1)},unregisterGanttBar:r=>{const f=p.value.findIndex(b=>b.id===r);f>=0&&p.value.splice(f,1)},updateGanttBar:r=>{const f=d.value[r.rowIndex]?.gantt;f&&(r.type==="resize"?r.edge==="start"?(f.startIndex=r.newStart,f.endIndex=r.end,f.colspan=f.endIndex-f.startIndex):r.edge==="end"&&(f.startIndex=r.start,f.endIndex=r.newEnd,f.colspan=f.endIndex-f.startIndex):r.type==="bar"&&(f.startIndex=r.newStart,f.endIndex=r.newEnd,f.colspan=f.endIndex-f.startIndex))},updateRows:S}})()},pn={class:"atable-container",style:{position:"relative"}},Je=Y(t.defineComponent({__name:"ATable",props:t.mergeModels({id:{},config:{default:()=>new Object}},{rows:{required:!0},rowsModifiers:{},columns:{required:!0},columnsModifiers:{}}),emits:t.mergeModels(["cellUpdate","gantt:drag","connection:event","columns:update"],["update:rows","update:columns"]),setup(e,{expose:n,emit:a}){const i=t.useModel(e,"rows"),c=t.useModel(e,"columns"),d=a,s=t.useTemplateRef("table"),o=qe({columns:c.value,rows:i.value,id:e.id,config:e.config});o.$onAction(({name:p,store:I,args:x,after:g})=>{if(p==="setCellData"||p==="setCellText"){const[h,k,$]=x,M=I.getCellData(h,k);g(()=>{i.value=[...I.rows],d("cellUpdate",{colIndex:h,rowIndex:k,newValue:$,oldValue:M})})}else if(p==="updateGanttBar"){const[h]=x;let k=!1;h.type==="resize"?k=h.oldColspan!==h.newColspan:h.type==="bar"&&(k=h.oldStart!==h.newStart||h.oldEnd!==h.newEnd),k&&g(()=>{d("gantt:drag",h)})}else p==="resizeColumn"&&g(()=>{c.value=[...I.columns],d("columns:update",[...I.columns])})}),t.watch(()=>i.value,p=>{JSON.stringify(p)!==JSON.stringify(o.rows)&&(o.rows=[...p])},{deep:!0}),t.watch(c,p=>{JSON.stringify(p)!==JSON.stringify(o.columns)&&(o.columns=[...p],d("columns:update",[...p]))},{deep:!0}),t.onMounted(()=>{c.value.some(p=>p.pinned)&&(u(),o.isTreeView&&Le(s,u,{childList:!0,subtree:!0}))});const l=t.computed(()=>o.columns.filter(p=>p.pinned).length),u=()=>{const p=s.value,I=p?.rows[0],x=p?.rows[1],g=I?Array.from(I.cells):[];for(const[h,k]of g.entries()){const $=x?.cells[h];$&&(k.style.width=`${$.offsetWidth}px`)}for(const h of p?.rows||[]){let k=0;const $=[];for(const M of h.cells)(M.classList.contains("sticky-column")||M.classList.contains("sticky-index"))&&(M.style.left=`${k}px`,k+=M.offsetWidth,$.push(M));$.length>0&&$[$.length-1].classList.add("sticky-column-edge")}};window.addEventListener("keydown",p=>{if(p.key==="Escape"&&o.modal.visible){o.modal.visible=!1;const I=o.modal.parent;I&&t.nextTick().then(()=>{I.focus()})}});const m=p=>{if(!p.gantt||l.value===0)return o.columns;const I=[];for(let x=0;x<l.value;x++){const g={...o.columns[x]};g.originalIndex=x,I.push(g)}return I.push({...o.columns[l.value],isGantt:!0,colspan:p.gantt?.colspan||o.columns.length-l.value,originalIndex:l.value,width:"auto"}),I},w=p=>{d("connection:event",{type:"create",connection:p})},y=p=>{d("connection:event",{type:"delete",connection:p})};return n({store:o,createConnection:o.createConnection,deleteConnection:o.deleteConnection,getConnectionsForBar:o.getConnectionsForBar,getHandlesForBar:o.getHandlesForBar}),(p,I)=>(t.openBlock(),t.createElementBlock("div",pn,[t.withDirectives((t.openBlock(),t.createElementBlock("table",{ref:"table",class:"atable",style:t.normalizeStyle({width:t.unref(o).config.fullWidth?"100%":"auto"})},[t.renderSlot(p.$slots,"header",{data:t.unref(o)},()=>[t.createVNode(Ce,{columns:t.unref(o).columns,store:t.unref(o)},null,8,["columns","store"])],!0),t.createElementVNode("tbody",null,[t.renderSlot(p.$slots,"body",{data:t.unref(o)},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o).rows,(x,g)=>(t.openBlock(),t.createBlock(we,{key:x.id,row:x,rowIndex:g,store:t.unref(o)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m(x),(h,k)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:h.name},[h.isGantt?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(h.ganttComponent||"AGanttCell"),{key:0,store:t.unref(o),columnsCount:t.unref(o).columns.length-l.value,color:x.gantt?.color,start:x.gantt?.startIndex,end:x.gantt?.endIndex,colspan:h.colspan,pinned:h.pinned,rowIndex:g,colIndex:h.originalIndex??k,style:t.normalizeStyle({textAlign:h?.align||"center",minWidth:h?.width||"40ch",width:t.unref(o).config.fullWidth?"auto":null}),"onConnection:create":w},null,40,["store","columnsCount","color","start","end","colspan","pinned","rowIndex","colIndex","style"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(h.cellComponent||"ACell"),{key:1,store:t.unref(o),pinned:h.pinned,rowIndex:g,colIndex:k,style:t.normalizeStyle({textAlign:h?.align||"center",width:t.unref(o).config.fullWidth?"auto":null}),spellcheck:"false"},null,8,["store","pinned","rowIndex","colIndex","style"]))],64))),128))]),_:2},1032,["row","rowIndex","store"]))),128))],!0)]),t.renderSlot(p.$slots,"footer",{data:t.unref(o)},void 0,!0),t.renderSlot(p.$slots,"modal",{data:t.unref(o)},()=>[t.withDirectives(t.createVNode(Ee,{store:t.unref(o)},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(o).modal.component),t.mergeProps({key:`${t.unref(o).modal.rowIndex}:${t.unref(o).modal.colIndex}`,colIndex:t.unref(o).modal.colIndex,rowIndex:t.unref(o).modal.rowIndex,store:t.unref(o)},t.unref(o).modal.componentProps),null,16,["colIndex","rowIndex","store"]))]),_:1},8,["store"]),[[t.vShow,t.unref(o).modal.visible]])],!0)],4)),[[t.unref(Kt),t.unref(o).closeModal]]),t.unref(o).isGanttView&&t.unref(o).isDependencyGraphEnabled?(t.openBlock(),t.createBlock(fn,{key:0,store:t.unref(o),"onConnection:delete":y},null,8,["store"])):t.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-51a03d16"]]),hn={},bn={class:"aloading"},wn={class:"aloading-header"};function xn(e,n){return t.openBlock(),t.createElementBlock("div",bn,[t.createElementVNode("h2",wn,[t.renderSlot(e.$slots,"default",{},void 0,!0)]),n[0]||(n[0]=t.createElementVNode("div",{class:"aloading-bar"},null,-1))])}const Ze=Y(hn,[["render",xn],["__scopeId","data-v-a930a25b"]]),vn={},yn={class:"aloading"},kn={class:"aloading-header"};function Cn(e,n){return t.openBlock(),t.createElementBlock("div",yn,[t.createElementVNode("h2",kn,[t.renderSlot(e.$slots,"default",{},void 0,!0)]),n[0]||(n[0]=t.createElementVNode("div",{class:"aloading-bar"},null,-1))])}const Qe=Y(vn,[["render",Cn],["__scopeId","data-v-e1165876"]]);function En(e){e.component("ACell",We),e.component("AExpansionRow",Xe),e.component("AGanttCell",Ge),e.component("ARow",we),e.component("ATable",Je),e.component("ATableHeader",Ce),e.component("ATableLoading",Ze),e.component("ATableLoadingBar",Qe),e.component("ATableModal",Ee)}D.ACell=We,D.AExpansionRow=Xe,D.AGanttCell=Ge,D.ARow=we,D.ATable=Je,D.ATableHeader=Ce,D.ATableLoading=Ze,D.ATableLoadingBar=Qe,D.ATableModal=Ee,D.createTableStore=qe,D.install=En,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
|
3
3
|
//# sourceMappingURL=atable.umd.cjs.map
|