@ninebone/table 0.0.846 → 0.0.848
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/nine-table.js +599 -585
- package/dist/nine-table.js.map +1 -1
- package/dist/nine-table.umd.js +6 -6
- package/dist/nine-table.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/nine-table.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(A,R){typeof exports=="object"&&typeof module<"u"?R(require("@ninebone/util")):typeof define=="function"&&define.amd?define(["@ninebone/util"],R):(A=typeof globalThis<"u"?globalThis:A||self,R(A.NineboneUtil))})(this,function(A){"use strict";var
|
|
1
|
+
(function(A,R){typeof exports=="object"&&typeof module<"u"?R(require("@ninebone/util")):typeof define=="function"&&define.amd?define(["@ninebone/util"],R):(A=typeof globalThis<"u"?globalThis:A||self,R(A.NineboneUtil))})(this,function(A){"use strict";var xs=Object.defineProperty;var ws=A=>{throw TypeError(A)};var Es=(A,R,x)=>R in A?xs(A,R,{enumerable:!0,configurable:!0,writable:!0,value:x}):A[R]=x;var d=(A,R)=>xs(A,"name",{value:R,configurable:!0});var T=(A,R,x)=>Es(A,typeof R!="symbol"?R+"":R,x),gs=(A,R,x)=>R.has(A)||ws("Cannot "+x);var t=(A,R,x)=>(gs(A,R,"read from private field"),x?x.call(A):R.get(A)),h=(A,R,x)=>R.has(A)?ws("Cannot add the same private member more than once"):R instanceof WeakSet?R.add(A):R.set(A,x),y=(A,R,x,X)=>(gs(A,R,"write to private field"),X?X.call(A,x):R.set(A,x),x),Q=(A,R,x)=>(gs(A,R,"access private method"),x);var vs=(A,R,x,X)=>({set _(Tt){y(A,R,Tt,x)},get _(){return t(A,R,X)}});var F,K,q,tt,et,st,Jt,nt,Qt,rt,ot,pt,k,Ct,kt,te,it,E,at,U,D,Z,lt,Lt,Ve,Ye,ee,Xe,se,ne,It,Mt,Ht,re,oe,$t,yt,ie,ae,N,V,Y,Zt,Ss,B,ct,Nt,ce,he,mt,Rs,_t,Dt,Ot,ht,Ge,de,As,fe,dt,Wt,zt,j,ue,ge,xt,be,pe,ye,Pt,_,me,Ft,xe,jt,wt,O,L,z,vt,we,G,ve,ft,Ut,Se,Re,St,ut,Rt,H,Vt,Ae,gt,Ee,qe,I,Xt,v,os,is,as,ls,cs,Kt,bt,At,Et,Te,J,fs;const Fe=class Fe extends A.trace.constructor{constructor(){super(),this.init("nine-table","green")}};d(Fe,"Trace");let R=Fe;const x=new R,je=class je extends HTMLElement{constructor(){super();h(this,F);h(this,K,!1);h(this,q);h(this,tt);h(this,et);h(this,st);h(this,Jt,d(()=>{if(!t(this,F))return;const e=t(this,F).querySelector(".ng-container-body .ng-part-body");e&&(y(this,st,new ResizeObserver(()=>{this.refresh()})),t(this,st).observe(e))},"#observeResize"));T(this,"refresh",d(()=>{if(!t(this,F)||!t(this,q)||t(this,K))return;const e=t(this,q).container,s=e.querySelector("table");if(!s)return;const o=t(this,q).track,a=t(this,q).thumb,r=t(this,F).querySelector(".ng-container-bottom"),i=e.clientWidth,c=s.scrollWidth;if(i!==0&&c>i)r&&(r.style.display="flex");else{r&&(r.style.display="none");return}const l=o.clientWidth;if(l<=0)return;const f=Math.max(Math.min(l*(i/c),l),20);a.style.width=`${f}px`;const g=e.scrollLeft,b=c-i;let u=0;b>0&&(u=parseInt(g/b*(l-f),10)),u<0&&(u=0);const p=l-f;u>p&&(u=p),a.style.left=`${u}px`,t(this,q).left.disabled=u===0,t(this,q).right.disabled=u>=p-1},"refresh"));h(this,nt,d(e=>{if(!t(this,q))return!1;const s=t(this,q).container,o=s.querySelector("table");if(!o)return!1;const a=t(this,q).track.getBoundingClientRect(),r=t(this,q).thumb.clientWidth;let i=e;i<0&&(i=0);const c=a.width-r;i>c&&(i=c),i=parseInt(i,10),t(this,q).thumb.style.left=`${i}px`,x.log("1111=========="),t(this,q).left.disabled=i===0,t(this,q).right.disabled=i>=c-1;const l=s.clientWidth,g=o.scrollWidth-l;return c>0&&g>0&&(s.scrollLeft=i/c*g),i>0&&i<c-1},"#thumbMoveTo"));h(this,Qt,d(()=>{const e=d(o=>{clearInterval(t(this,tt)),clearInterval(t(this,et));const a=parseInt(t(this,q).thumb.style.left||0,10);t(this,nt).call(this,a+o),y(this,tt,setInterval(()=>{clearInterval(t(this,tt)),y(this,et,setInterval(()=>{const r=parseInt(t(this,q).thumb.style.left||0,10);t(this,nt).call(this,r+o)||clearInterval(t(this,et))},50))},500))},"delayScroll"),s=d(()=>{clearInterval(t(this,tt)),clearInterval(t(this,et))},"clearTimer");["mouseup","mouseleave","touchend"].forEach(o=>{t(this,q).left.addEventListener(o,s),t(this,q).right.addEventListener(o,s),t(this,q).track.addEventListener(o,s)}),t(this,q).left.addEventListener("mousedown",o=>{o.button===0&&e(-20)}),t(this,q).right.addEventListener("mousedown",o=>{o.button===0&&e(20)}),t(this,q).left.addEventListener("touchstart",()=>e(-20)),t(this,q).right.addEventListener("touchstart",()=>e(20)),t(this,q).track.addEventListener("mousedown",o=>{if(o.button!==0)return;o.preventDefault();const a=t(this,q).track.getBoundingClientRect(),r=t(this,q).thumb.clientWidth;t(this,nt).call(this,o.clientX-a.left-r/2)}),t(this,q).thumb.addEventListener("mousedown",o=>{if(o.button!==0)return;o.stopPropagation(),o.preventDefault(),y(this,K,!0),this.shiftX=o.clientX-t(this,q).thumb.getBoundingClientRect().left;const a=d(i=>{if(!t(this,K))return;const c=t(this,q).track.getBoundingClientRect();t(this,nt).call(this,i.clientX-c.left-this.shiftX)},"onMouseMove"),r=d(()=>{y(this,K,!1),s(),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",r),this.refresh()},"onMouseUp");document.addEventListener("mousemove",a),document.addEventListener("mouseup",r)})},"#init"))}connectedCallback(){if(y(this,F,this.closest("nine-table-sheet")||this.getRootNode().host),!t(this,F))return;this.innerHTML=`
|
|
2
2
|
<style>
|
|
3
3
|
nine-table-hscrollbar {
|
|
4
4
|
display: flex;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
<button class='ng-scroll-left' disabled><div class='ng-scroll-icon'></div></button>
|
|
61
61
|
<div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
|
|
62
62
|
<button class='ng-scroll-right' disabled><div class='ng-scroll-icon'></div></button>
|
|
63
|
-
`;const e=d(()=>{const s=t(this,
|
|
63
|
+
`;const e=d(()=>{const s=t(this,F).querySelector(".ng-container-body .ng-part-body");if(!s){setTimeout(e,10);return}y(this,q,{container:s,track:this.querySelector(".ng-scroll-track"),thumb:this.querySelector(".ng-scroll-thumb"),left:this.querySelector(".ng-scroll-left"),right:this.querySelector(".ng-scroll-right")}),s.addEventListener("scroll",()=>{t(this,K)||this.refresh()}),t(this,Qt).call(this),t(this,Jt).call(this),this.refresh()},"initWhenReady");e()}disconnectedCallback(){t(this,st)&&t(this,st).disconnect()}};F=new WeakMap,K=new WeakMap,q=new WeakMap,tt=new WeakMap,et=new WeakMap,st=new WeakMap,Jt=new WeakMap,nt=new WeakMap,Qt=new WeakMap,d(je,"NineTableHScrollBar");let X=je;customElements.get("nine-table-hscrollbar")||customElements.define("nine-table-hscrollbar",X);const Ue=class Ue extends HTMLElement{constructor(){super();h(this,rt);h(this,ot);h(this,pt,!1);h(this,k);h(this,Ct,0);h(this,kt,0);T(this,"refresh",d(()=>{if(!t(this,rt)||!t(this,k))return;const e=t(this,k).container,s=t(this,k).track,o=t(this,k).thumb,a=e.clientHeight,r=t(this,rt).data.length,i=t(this,ot).getRowHeight(),c=r*i;if(c<=a||r===0){this.style.display="none";return}else this.style.display="flex";const l=s.clientHeight;if(l<=0)return;const f=Math.max(Math.min(l*(a/c),l),20);o.style.height=`${f}px`;const g=e.scrollTop,b=Math.max(c-a,1);let u=0;b>0&&(u=g/b*(l-f));const p=l-f;u<0&&(u=0),u>p&&(u=p),o.style.top=`${u}px`,t(this,k).top.disabled=g<=0,t(this,k).bottom.disabled=g>=b-1},"refresh"));h(this,te,d(()=>{x.log("nine-table-vscrollbar.#init");const e=t(this,k).container,s=d(()=>{const a=(t(this,rt).data.get()||[]).length,r=t(this,ot).getRowHeight();return a*r},"getContentHeight");t(this,k).thumb.addEventListener("mousedown",o=>{if(o.button!==0)return;o.stopPropagation(),o.preventDefault(),y(this,pt,!0),y(this,Ct,o.clientY),y(this,kt,e.scrollTop);const a=d(i=>{if(!t(this,pt))return;const c=t(this,k).track.getBoundingClientRect(),l=t(this,k).thumb.clientHeight,g=c.height-l,b=i.clientY-t(this,Ct),u=e.clientHeight,p=s(),m=Math.max(p-u,1);if(g>0&&m>0){const S=b/g*m;let w=t(this,kt)+S;const M=Math.max(0,p-u);w<0&&(w=0),w>M&&(w=M),e.scrollTop=w}this.refresh()},"onMouseMove"),r=d(()=>{y(this,pt,!1),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",r),this.refresh()},"onMouseUp");document.addEventListener("mousemove",a),document.addEventListener("mouseup",r)}),t(this,k).track.addEventListener("mousedown",o=>{if(o.button!==0||o.target===t(this,k).thumb)return;const a=t(this,k).track.getBoundingClientRect(),r=t(this,k).thumb.clientHeight,i=o.clientY-a.top-r/2,l=a.height-r,f=e.clientHeight,g=s(),b=Math.max(g-f,1);if(l>0&&b>0){const u=Math.max(0,Math.min(1,i/l));e.scrollTop=u*b}this.refresh()}),t(this,k).top.addEventListener("click",()=>{e.scrollTop-=40}),t(this,k).bottom.addEventListener("click",()=>{e.scrollTop+=40})},"#init"))}connectedCallback(){y(this,rt,this.getRootNode().host),y(this,ot,this.closest("nine-table-sheet")),this.innerHTML=`
|
|
64
64
|
<style>
|
|
65
65
|
nine-table-vscrollbar {
|
|
66
66
|
display: flex;
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
<button class='ng-scroll-top' disabled><div class='ng-scroll-icon'></div></button>
|
|
124
124
|
<div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
|
|
125
125
|
<button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
|
|
126
|
-
`;const e=d(()=>{const s=t(this,ot).querySelector(".ng-container-body .ng-part-body");if(!s){setTimeout(e,10);return}y(this,k,{container:s,track:this.querySelector(".ng-scroll-track"),thumb:this.querySelector(".ng-scroll-thumb"),top:this.querySelector(".ng-scroll-top"),bottom:this.querySelector(".ng-scroll-bottom")}),t(this,te).call(this),this.refresh()},"initWhenReady");e()}};rt=new WeakMap,ot=new WeakMap,pt=new WeakMap,k=new WeakMap,Ct=new WeakMap,kt=new WeakMap,te=new WeakMap,d(Ue,"NineTableVScrollBar");let Tt=Ue;customElements.get("nine-table-vscrollbar")||customElements.define("nine-table-vscrollbar",Tt);const Ke=class Ke{constructor(n){h(this,it);h(this,E);h(this,at);h(this,j,new Map);h(this,O,null);h(this,G,null);h(this,lt,0);h(this,Lt,40);h(this,Ve,!1);h(this,Ye,!1);h(this,ee,3);h(this,Xe,3);h(this,se,0);C(this,"refresh",d(()=>{var e;w.log("rowManager.refresh");const n=t(this,E).querySelector(".ng-container-body .ng-part-body");n&&(t(this,It).call(this),t(this,Mt).call(this),t(this,yt).call(this,n.scrollTop),(e=t(this,E).querySelector("nine-table-vscrollbar"))==null||e.refresh())},"refresh"));C(this,"initialize",d(()=>{w.log("rowManager.initialize"),y(this,at,{scrollTables:t(this,E).querySelectorAll(".ng-part-body table"),firstTr:t(this,E).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")}),y(this,O,null),t(this,j).clear(),[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(r=>{const i=t(this,E).querySelector(r);if(!i)return;const c=i.querySelector(".ng-part-body table");if(!c)return;const l=c.querySelector("tbody.bindable-tbody");if(!l)return;const u=Array.from(l.querySelectorAll("tr")).map(b=>b.cloneNode(!0));t(this,j).set(r,u)});const n=t(this,E).querySelector(".ng-container-body .ng-part-body"),e=t(this,E).querySelector(".ng-container-left .ng-part-body"),s=t(this,E).querySelector(".ng-container-right .ng-part-body"),o=t(this,E).querySelector(".ng-container-body .ng-part-header"),a=t(this,E).querySelector(".ng-container-body .ng-part-footer");if(n){t(this,It).call(this),t(this,$t).call(this),t(this,Mt).call(this),t(this,yt).call(this,n.scrollTop);let r=!1;y(this,se,n.scrollLeft);const i=d(c=>{var u;if(r)return;r=!0;const l=c.scrollTop,f=c.scrollLeft;n&&n.scrollTop!==l&&(n.scrollTop=l),e&&e.scrollTop!==l&&(e.scrollTop=l),s&&s.scrollTop!==l&&(s.scrollTop=l),o&&o.scrollLeft!==f&&(o.scrollLeft=f),a&&a.scrollLeft!==f&&(a.scrollLeft=f),t(this,yt).call(this,l),(u=t(this,E).querySelector("nine-table-vscrollbar"))==null||u.refresh(),r=!1},"handleContainerScroll");n==null||n.addEventListener("scroll",c=>{i(n)}),[e,s].forEach(c=>{c==null||c.addEventListener("scroll",l=>{if(r)return;r=!0;const f=c.scrollTop;n&&n.scrollTop!==f&&(n.scrollTop=f),r=!1})})}},"initialize"));h(this,ne,d((n,e)=>{w.log("rowManager.#renderRows");const s=t(this,j).get(e);if(!s||s.length===0)return;const o=n.querySelector(".ng-part-body tbody.bindable-tbody");if(!o)return;o.querySelectorAll("tr:not(.nodata)").forEach(i=>i.remove());const a=o.querySelector("tr.nodata"),r=document.createDocumentFragment();for(let i=0;i<t(this,Lt);i++)s.forEach(c=>{r.appendChild(c.cloneNode(!0))});a?a.before(r):o.appendChild(r),e===".ng-container-body"&&(t(this,at).firstTr=o.querySelector("tr:not(.nodata)"))},"#renderRows"));h(this,It,d(()=>{if(t(this,O)!==null&&t(this,O)>0)return t(this,O);const n=t(this,E).querySelector(".ng-container-body .ng-part-body");w.log("rowManager.#measureAndCacheHeight");const e=t(this,j).get(".ng-container-body");if(!e||e.length===0)throw new Error("invalid dom");const s=n.querySelector("tbody.bindable-tbody");if(!s)throw new Error("invalid dom");s.querySelectorAll("tr:not(.nodata)").forEach(b=>b.remove());const o=s.querySelector("tr.nodata"),a=document.createDocumentFragment();e.forEach(b=>{a.appendChild(b.cloneNode(!0))}),o?o.before(a):s.appendChild(a);const r=t(this,E),i=r.style.display,c=r.style.visibility,l=r.style.position;(i==="none"||window.getComputedStyle(r).display==="none")&&(r.style.display="block",r.style.visibility="hidden",r.style.position="absolute");let f=0;const u=s.querySelectorAll("tr");return u.forEach(b=>{let g=b.offsetHeight||b.getBoundingClientRect().height;if(g===0){const p=window.getComputedStyle(b);g=parseFloat(p.height)||parseFloat(p.minHeight)||0}f+=g}),u.forEach(b=>b.remove()),r.style.display=i,r.style.visibility=c,r.style.position=l,f<=0?-1:(y(this,O,f),t(this,Ht).call(this),t(this,O))},"#measureAndCacheHeight"));h(this,Mt,d(()=>{w.log("rowManager.#updateVirtualScrollHeight");const e=(t(this,it).data.get()||[]).length,s=t(this,O),o=e*s;[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(a=>{const r=t(this,E).querySelector(a);if(!r)return;const i=r.querySelector(".ng-part-body .ng-virtual-spacer");i&&(i.style.height=`${o}px`)})},"#updateVirtualScrollHeight"));h(this,Ht,d(()=>{if(t(this,lt)>0&&t(this,O)>0){const n=Math.ceil(t(this,lt)/t(this,O));y(this,Lt,n+t(this,ee))}},"#updateRowCount"));h(this,re,d(()=>{var i,c,l,f,u,b;const n=t(this,E).querySelector(".ng-container-left .ng-part-body table"),e=t(this,E).querySelector(".ng-container-body .ng-part-body table"),s=t(this,E).querySelector(".ng-container-right .ng-part-body table");if(e){const g=n?Array.from(n.querySelectorAll("tbody tr")):[],p=Array.from(e.querySelectorAll("tbody tr")),m=s?Array.from(s.querySelectorAll("tbody tr")):[],S=Math.max(g.length,p.length,m.length);for(let x=0;x<S;x++){const M=[((i=g[x])==null?void 0:i.getBoundingClientRect().height)||0,((c=p[x])==null?void 0:c.getBoundingClientRect().height)||0,((l=m[x])==null?void 0:l.getBoundingClientRect().height)||0],T=Math.max(...M);T>0&&(g[x]&&(g[x].style.height=`${T}px`),p[x]&&(p[x].style.height=`${T}px`),m[x]&&(m[x].style.height=`${T}px`))}}const o=t(this,E).querySelector(".ng-container-left .ng-part-footer table"),a=t(this,E).querySelector(".ng-container-body .ng-part-footer table"),r=t(this,E).querySelector(".ng-container-right .ng-part-footer table");if(a){const g=o?Array.from(o.querySelectorAll("tfoot tr")):[],p=Array.from(a.querySelectorAll("tfoot tr")),m=r?Array.from(r.querySelectorAll("tfoot tr")):[],S=Math.max(g.length,p.length,m.length);for(let x=0;x<S;x++){const M=[((f=g[x])==null?void 0:f.getBoundingClientRect().height)||0,((u=p[x])==null?void 0:u.getBoundingClientRect().height)||0,((b=m[x])==null?void 0:b.getBoundingClientRect().height)||0],T=Math.max(...M);T>0&&(g[x]&&(g[x].style.height=`${T}px`),p[x]&&(p[x].style.height=`${T}px`),m[x]&&(m[x].style.height=`${T}px`))}}},"#syncRowHeights"));h(this,oe,d(()=>{!t(this,E)||!(t(this,E)instanceof HTMLElement)||(y(this,G,new ResizeObserver(n=>{for(const e of n){const s=e.target;if(!s.classList.contains("active"))continue;const o=e.contentRect.height;if(o>0){let a=0;const r=s.querySelector(".ng-part-header"),i=s.querySelector(".ng-part-footer");r&&(a+=r.offsetHeight),i&&(a+=i.offsetHeight);const c=Math.max(o-a,100);t(this,lt)!==c&&(y(this,lt,c),t(this,Ht).call(this),t(this,O)!==null&&(t(this,$t).call(this),this.refresh()))}}})),t(this,G).observe(t(this,E)))},"#initResizeObserver"));h(this,$t,d(()=>{w.log("rowManager.#renderAllContainers"),[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(n=>{const e=t(this,E).querySelector(n);e&&e.querySelector(".ng-part-body tbody.bindable-tbody")&&t(this,ne).call(this,e,n)}),t(this,ae).call(this),t(this,re).call(this)},"#renderAllContainers"));h(this,yt,d(n=>{var u,b;const e=t(this,O);if(!e||e<=0)return;const s=t(this,it).data.length;if(s===0)return;const o=((u=t(this,j).get(".ng-container-body"))==null?void 0:u.length)||1,a=t(this,E).querySelector(".ng-container-body .ng-part-body"),r=Math.max(0,s-Math.floor(a.clientHeight/e)),i=Math.min(r,Math.max(0,Math.floor(n/e)));let c=Math.floor(i*e);const l=t(this,at).firstTr,f=l&&l.dataset.row!==void 0?parseInt(l.dataset.row,10):-1;(b=t(this,at))==null||b.scrollTables.forEach(g=>{g.style.transform=`translate3d(0, ${c}px, 0)`}),f!==i&&[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(g=>{const p=t(this,E).querySelector(g);if(!p)return;const m=p.querySelector(".ng-part-body tbody.bindable-tbody");if(!m)return;Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((x,M)=>{const T=i+Math.floor(M/o);if(T>=s){x.style.display="none";return}const W=t(this,it).data.get(T);x.style.display="",t(this,ie).call(this,x,W,T)})})},"#handleScroll"));h(this,ie,d((n,e,s)=>{n.dataset.row=s,n.data=e,Array.from(n.cells).forEach((o,a)=>{o.dataset.row=s;const r=Array.from(o.children).find(i=>i.tagName.toLowerCase().startsWith("cell-")||typeof i.refresh=="function");r&&typeof r.refresh=="function"&&r.refresh()})},"#bindRowData"));h(this,ae,d(()=>{var c,l,f;w.log("rowManager.#syncHeaderHeights");const n=t(this,E).querySelector(".ng-container-left .ng-part-header table"),e=t(this,E).querySelector(".ng-container-body .ng-part-header table"),s=t(this,E).querySelector(".ng-container-right .ng-part-header table");if(!e)return;const o=n?Array.from(n.querySelectorAll("tr")):[],a=Array.from(e.querySelectorAll("tr")),r=s?Array.from(s.querySelectorAll("tr")):[],i=Math.max(o.length,a.length,r.length);for(let u=0;u<i;u++){const b=[((c=o[u])==null?void 0:c.getBoundingClientRect().height)||0,((l=a[u])==null?void 0:l.getBoundingClientRect().height)||0,((f=r[u])==null?void 0:f.getBoundingClientRect().height)||0],g=Math.max(...b);g>0&&(o[u]&&(o[u].style.height=`${g}px`),a[u]&&(a[u].style.height=`${g}px`),r[u]&&(r[u].style.height=`${g}px`))}},"#syncHeaderHeights"));C(this,"destroy",d(()=>{t(this,G)&&(t(this,G).disconnect(),y(this,G,null))},"destroy"));y(this,it,n.getRootNode().host),y(this,E,n),t(this,oe).call(this)}getRowHeight(){return t(this,O)}templateLength(n=".ng-container-body"){var e;return((e=t(this,j).get(n))==null?void 0:e.length)||1}};it=new WeakMap,E=new WeakMap,at=new WeakMap,j=new WeakMap,O=new WeakMap,G=new WeakMap,lt=new WeakMap,Lt=new WeakMap,Ve=new WeakMap,Ye=new WeakMap,ee=new WeakMap,Xe=new WeakMap,se=new WeakMap,ne=new WeakMap,It=new WeakMap,Mt=new WeakMap,Ht=new WeakMap,re=new WeakMap,oe=new WeakMap,$t=new WeakMap,yt=new WeakMap,ie=new WeakMap,ae=new WeakMap,d(Ke,"RowManager");let Ce=Ke;const le=class le{static compileAll(n){return Array.isArray(n)?n.map(e=>le.compile(e)):[]}static compile(n){if(!n)return null;const e=d(i=>{i.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach(l=>{const f=l.getAttribute("cell-type")||"renderer";if(l.children.length>0&&l.firstElementChild.tagName.includes("-"))return;let u=`cell-${f}`;const b=l.getAttribute("data-bind"),g=l.getAttribute("data-expr"),p=l.getAttribute("maxbyte"),m=l.getAttribute("type");let S=[];b&&S.push(`data-bind="${b}"`),g&&S.push(`data-expr="${g}"`),p&&S.push(`maxbyte="${p}"`),m&&S.push(`type="${m}"`),l.innerHTML=`<${u} ${S.join(" ")}></${u}>`}),i.querySelectorAll("tbody td, tfoot td").forEach(l=>{l.setAttribute("tabindex","0")})},"processCellTypes"),s=d(i=>{if(!i.querySelector("colgroup")){const c=i.querySelector("tbody tr")||i.querySelector("tr"),l=c?c.querySelectorAll("th, td").length:1,f=document.createElement("colgroup"),u=Math.max(Math.floor(i.clientWidth/l),100);for(let b=0;b<l;b++){const g=document.createElement("col");g.setAttribute("width",u),f.appendChild(g)}i.prepend(f)}if(!i.querySelector("thead")){const c=document.createElement("thead"),l=i.querySelector("colgroup");l?l.after(c):i.prepend(c)}i.classList.add("nine-table-element")},"ensureTableStructure"),o=d((i,c)=>{const l=Array.from(i.querySelectorAll(c+" tr")),f=Array.from(i.querySelectorAll(c+" th,"+c+" td")),u=l.length;if(u===0||f.length===0)return;let b=0;f.forEach(p=>{b+=p.colSpan||1});const g=Array.from(Array(u),()=>Array(b).fill(null));l.forEach(p=>{const m=p.sectionRowIndex;let S=0;p.dataset.subrow=m,Array.from(p.querySelectorAll("th,td")).forEach(x=>{for(let W=0;W<g[m].length;W++)if(g[m][W]===null){S=W;break}const M=x.rowSpan||1,T=x.colSpan||1;for(let W=0;W<M;W++)for(let qt=0;qt<T;qt++)m+W<u&&S+qt<b&&(g[m+W][S+qt]=W===0&&qt===0?"1":"0")})}),l.forEach(p=>{const m=p.sectionRowIndex;Array.from(p.querySelectorAll("th,td")).forEach(S=>{for(let x=0;x<g[m].length;x++)if(g[m][x]==="1"){S.dataset.col=x,g[m][x]="0";break}})})},"resetColIndex"),a=n.cloneNode(!0);return s(a),e(a),o(a,"thead"),o(a,"tbody"),o(a,"tfoot"),Array.from(a.querySelectorAll("colgroup col")).forEach((i,c)=>{const l=i.getAttribute("fixed");l&&a.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach(f=>{f.setAttribute("fixed",l)})}),a}};d(le,"TableCompiler");let ke=le;const Ge=class Ge{constructor(n){h(this,V);h(this,N);h(this,U,{startRow:-1,startCol:-1,endRow:-1,endCol:-1});C(this,"render",d(()=>{const{startRow:n,startCol:e,endRow:s,endCol:o}=t(this,U);w.log("🎨 [CellSelection.render] Rendering range ->",t(this,U));const a=t(this,N).querySelectorAll(".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body");if(a.forEach(i=>{i.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach(c=>{c.classList.remove("selected","selected-top","selected-bottom","selected-left","selected-right")})}),n<0||e<0){w.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");return}let r=0;a.forEach(i=>{i.querySelectorAll("tbody tr").forEach(c=>{const{matrixRow:l}=Q(this,V,Gt).call(this,c);l<0||c.querySelectorAll("td, th").forEach(f=>{const u=parseInt(f.dataset.col,10);if(isNaN(u))return;const b=parseInt(f.rowSpan||1,10),g=parseInt(f.colSpan||1,10),p=l+b-1,m=u+g-1;p>=n&&l<=s&&m>=e&&u<=o&&(r++,f.classList.add("selected"),w.log(f,n,e,s,o),l<=n&&f.classList.add("selected-top"),p>=s&&f.classList.add("selected-bottom"),u<=e&&f.classList.add("selected-left"),m>=o&&f.classList.add("selected-right"))})})}),w.log(`✨ [CellSelection.render] Total rendered cells marked: ${r}`)},"render"));y(this,N,n),Q(this,V,vs).call(this),t(this,N).querySelectorAll(".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body").forEach(s=>{s.addEventListener("scroll",()=>{t(this,U).startRow>=0&&t(this,U).startCol>=0&&this.render()})}),w.log("🎯 [CellSelection] Initialized")}setRange(n,e,s,o){w.log(`🔍 [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${o}`);let a=Math.min(n,s),r=Math.max(n,s),i=Math.min(e,o),c=Math.max(e,o);const l=t(this,N).querySelectorAll(".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body");let f=!0,u=0;for(;f&&u<5;)f=!1,u++,l.forEach(b=>{b.querySelectorAll("tbody tr").forEach(g=>{if(g.classList.contains("nodata"))return;const{matrixRow:p}=Q(this,V,Gt).call(this,g);p<0||g.querySelectorAll("td, th").forEach(m=>{const S=parseInt(m.dataset.col,10);if(isNaN(S))return;const x=parseInt(m.rowSpan||1,10),M=parseInt(m.colSpan||1,10),T=p+x-1,W=S+M-1;if(T>=a&&p<=r&&W>=i&&S<=c){const gs=Math.min(a,p),bs=Math.max(r,T),ps=Math.min(i,S),ys=Math.max(c,W);(gs!==a||bs!==r||ps!==i||ys!==c)&&(a=gs,r=bs,i=ps,c=ys,f=!0)}})})});y(this,U,{startRow:a,startCol:i,endRow:r,endCol:c}),w.log("📦 [CellSelection.setRange] Final Range ->",t(this,U)),this.render()}};N=new WeakMap,U=new WeakMap,V=new WeakSet,Gt=d(function(n){if(!n||n.classList.contains("nodata"))return{dataRow:-1,subRowIndex:-1,matrixRow:-1};const e=parseInt(n.dataset.row,10);if(isNaN(e))return{dataRow:-1,subRowIndex:-1,matrixRow:-1};const s=n.closest("tbody"),a=Array.from(s.querySelectorAll("tr:not(.nodata)")).filter(l=>parseInt(l.dataset.row,10)===e),r=a.indexOf(n),i=a.length>0?a.length:1,c=e*i+(r>=0?r:n.sectionRowIndex%i);return{dataRow:e,subRowIndex:r,matrixRow:c}},"#getMatrixRow"),vs=d(function(){const n=t(this,N).querySelector(".ng-container-top");if(!n){w.log("❌ [CellSelection] .ng-container-top not found!");return}n.addEventListener("mousedown",e=>{if(e.button!==0)return;const s=e.target.closest("td, th");if(!s||s.dataset.row===void 0||s.dataset.col===void 0||s.closest("tr").classList.contains("nodata"))return;t(this,N).style.userSelect="none",t(this,N).style.webkitUserSelect="none";const o=s.closest("tr"),{matrixRow:a}=Q(this,V,Gt).call(this,o),r=parseInt(s.dataset.col,10);if(a<0){t(this,N).style.userSelect="",t(this,N).style.webkitUserSelect="";return}w.log(`🖱️ [MouseDown Success] startRow: ${a}, startCol: ${r}`),t(this,N).navigation.currentCell=s;let i=a,c=r;const l=d(u=>{const b=document.elementFromPoint(u.clientX,u.clientY);let g=b==null?void 0:b.closest("td, th");if(!g||!t(this,N).contains(g)){const x=t(this,N).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");for(const M of x){const T=M.getBoundingClientRect();if(u.clientX>=T.left&&u.clientX<=T.right&&u.clientY>=T.top&&u.clientY<=T.bottom){g=M;break}}}if(!g||g.dataset.row===void 0||g.dataset.col===void 0||g.closest("tr").classList.contains("nodata"))return;const p=g.closest("tr"),{matrixRow:m}=Q(this,V,Gt).call(this,p),S=parseInt(g.dataset.col,10);m<0||i===m&&c===S||(i=m,c=S,this.setRange(a,r,m,S))},"onMouseMove"),f=d(()=>{w.log("🖱️ [MouseUp] Drag ended."),t(this,N).style.userSelect="",t(this,N).style.webkitUserSelect="",document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",f)},"onMouseUp");document.addEventListener("mousemove",l),document.addEventListener("mouseup",f)})},"#initEvents"),d(Ge,"CellSelection");let Le=Ge;const Ze=class Ze{constructor(n){h(this,mt);h(this,Y);h(this,ct,null);h(this,Nt,null);h(this,ce,-1);h(this,he,-1);h(this,_t,d(n=>{const e=[];return n.forEach(s=>e.push(...Array.from(s.querySelectorAll("td")))),e.length===0?null:(e.sort((s,o)=>parseInt(s.dataset.col,10)-parseInt(o.dataset.col,10)),e[e.length-1])},"#getMaxColCell"));h(this,Ot,d((n,e)=>{const s=t(this,ht).call(this,n);if(s.length===0)return e+1;let o=e+1;const a=[];s.forEach(r=>a.push(...Array.from(r.querySelectorAll("td")))),a.sort((r,i)=>parseInt(r.dataset.col,10)-parseInt(i.dataset.col,10));for(const r of a){const i=parseInt(r.dataset.col,10),c=parseInt(r.colSpan||1,10);if(e>=i&&e<i+c){o=i+c;break}}return o},"#getNextCol"));h(this,Dt,d((n,e)=>{const s=t(this,ht).call(this,n);if(s.length===0)return Math.max(0,e-1);let o=-1;const a=[];s.forEach(r=>a.push(...Array.from(r.querySelectorAll("td")))),a.sort((r,i)=>parseInt(r.dataset.col,10)-parseInt(i.dataset.col,10));for(const r of a){const i=parseInt(r.dataset.col,10);if(i<e)o=i;else break}return o},"#getPreviousCol"));h(this,ht,d(n=>{const e=t(this,Y).querySelectorAll(".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"),s=[];return e.forEach(o=>{const a=Array.from(o.querySelectorAll("tbody tr:not(.nodata)"));for(const r of a){const i=parseInt(r.dataset.row,10),c=a.filter(p=>parseInt(p.dataset.row,10)===i),l=c.length>0?c.length:1,f=c.indexOf(r),u=i*l+(f>=0?f:0);if(u===n){s.push(r);break}const b=Array.from(r.querySelectorAll("td"));let g=!1;for(const p of b){const m=parseInt(p.rowSpan||1,10);if(m>1&&n>=u&&n<u+m){s.push(r),g=!0;break}}if(g)break}}),s},"#findTargetTrsByMatrix"));h(this,de,d((n,e,s,o)=>{const a=t(this,Y).querySelectorAll(".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"),r=o!==void 0?o:n*1+e;for(const i of a){const c=Array.from(i.querySelectorAll("tbody tr"));for(const l of c){const f=parseInt(l.dataset.row,10),u=c.filter(S=>parseInt(S.dataset.row,10)===f),b=u.length>0?u.length:1,g=u.indexOf(l),p=f*b+(g>=0?g:0),m=Array.from(l.querySelectorAll("td"));for(const S of m){const x=parseInt(S.dataset.col,10),M=parseInt(S.colSpan||1,10),T=parseInt(S.rowSpan||1,10);if(!isNaN(x)&&s>=x&&s<x+M&&r>=p&&r<p+T&&window.getComputedStyle(S).display!=="none")return S}}}return null},"#getNearElement"));y(this,Y,n),Q(this,mt,Rs).call(this),w.log("🎯 [CellNavigation] Initialized")}get currentCell(){return t(this,ct)}set currentCell(n){if(!n)return;y(this,ct,n),n.focus({preventScroll:!0}),y(this,Nt,n.closest("tr"));const e=parseInt(n.dataset.row,10),s=parseInt(n.dataset.col,10);if(!isNaN(e)&&!isNaN(s)){y(this,ce,e),y(this,he,s);const o=n.closest("tr"),a=o==null?void 0:o.closest("tbody");if(a){const i=Array.from(a.querySelectorAll("tr:not(.nodata)")).filter(u=>parseInt(u.dataset.row,10)===e),c=i.length>0?i.length:1,l=i.indexOf(o),f=e*c+(l>=0?l:0);t(this,Y).selection.setRange(f,s,f,s)}}}moveCell(n){if(!t(this,ct))return;const e=t(this,ct),s=parseInt(e.dataset.row,10),o=parseInt(e.dataset.col,10),a=t(this,Y).templateLength,r=parseInt(t(this,Nt).dataset.subrow,10),i=s*a+(r>=0?r:0);let c=i,l=o;switch(n.code){case"Tab":if(n.preventDefault(),n.shiftKey){if(l=t(this,Dt).call(this,i,o),l<0&&i>0){c=i-1;const g=t(this,ht).call(this,c),p=t(this,_t).call(this,g);l=p?parseInt(p.dataset.col,10):0}}else{l=t(this,Ot).call(this,i,o);const g=t(this,ht).call(this,i),p=t(this,_t).call(this,g),m=p?parseInt(p.dataset.col,10)+parseInt(p.colSpan||1,10):0;l>=m&&(c=i+1,l=0)}break;case"ArrowRight":l=t(this,Ot).call(this,i,o);break;case"ArrowLeft":l=t(this,Dt).call(this,i,o);break;case"ArrowDown":n.preventDefault(),c=i+(e.rowSpan||1);break;case"ArrowUp":n.preventDefault(),c=Math.max(0,i-(e.rowSpan||1));break}const f=Math.floor(c/a),u=c%a;w.log("templateLength",a,"matrixRow:",i,"nextMatrixRow",c);let b=t(this,de).call(this,f,u,l,c);w.log(b,f,u,l,c),b&&(this.currentCell=b,Q(this,mt,Ss).call(this,b))}};Y=new WeakMap,ct=new WeakMap,Nt=new WeakMap,ce=new WeakMap,he=new WeakMap,mt=new WeakSet,Ss=d(function(n){},"#ensureCellVisible"),_t=new WeakMap,Ot=new WeakMap,Dt=new WeakMap,ht=new WeakMap,de=new WeakMap,Rs=d(function(){t(this,Y).addEventListener("keydown",n=>{["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(n.code)&&this.moveCell(n)})},"#initEvents"),d(Ze,"CellNavigation");let Ie=Ze;const Bt=class Bt extends HTMLElement{constructor(){super();h(this,fe);h(this,dt);h(this,Wt);h(this,zt);h(this,F,{table:null});C(this,"invalidate",d(()=>{w.log("sheet.invalidate()"),t(this,dt).refresh()},"invalidate"));C(this,"generate",d(e=>{if(w.log("sheet.generate()"),!e)return;t(this,F).table=ke.compile(e),t(this,F).tbody={tr:t(this,F).table.querySelectorAll("tbody tr")},t(this,ue).call(this),t(this,ge).call(this);const s=this.querySelector(".ng-container-body .ng-part-header"),o=this.querySelector(".ng-container-body .ng-part-footer"),a=this.querySelector(".ng-nodata-overlay");s&&a&&(a.style.top=`${s.offsetHeight}px`),o&&a&&(a.style.bottom=`${o.offsetHeight}px`),t(this,dt).initialize(),setTimeout(()=>{var r;(r=this.querySelector("nine-table-hscrollbar"))==null||r.refresh()},0)},"generate"));h(this,ue,d(()=>{[{selector:".ng-container-body",type:null},{selector:".ng-container-left",type:"left"},{selector:".ng-container-right",type:"right"}].forEach(({selector:s,type:o})=>{var a,r,i;(a=this.querySelector(`${s} .ng-part-header`))==null||a.appendChild(t(this,xt).call(this,t(this,F).table,o,"header")),(r=this.querySelector(`${s} .ng-virtual-spacer`))==null||r.before(t(this,xt).call(this,t(this,F).table,o,"body")),(i=this.querySelector(`${s} .ng-part-footer`))==null||i.appendChild(t(this,xt).call(this,t(this,F).table,o,"footer"))})},"#renderSplitContainers"));h(this,ge,d(()=>{["left","right","body"].forEach(e=>{const s=this.querySelector(`.ng-container-${e}`),o=s==null?void 0:s.querySelectorAll("table");if(!s||!o||o.length===0)return;let a=0;o[0].querySelectorAll("col").forEach(r=>{const i=parseInt(r.getAttribute("width"),10);isNaN(i)||(a+=i)}),e==="body"?(s.style.flex="1",o.forEach(r=>{r.style.width=`${a}px`,r.style.minWidth=`${a}px`})):(s.style.flex=`0 0 ${a}px`,s.style.width=`${a}px`,o.forEach(r=>{r.style.width=`${a}px`,r.style.minWidth=`${a}px`}))})},"#updateContainerWidths"));h(this,xt,d((e,s,o)=>{const a=e.cloneNode(!0),r=a.querySelector("thead"),i=a.querySelector("tbody"),c=a.querySelector("tfoot");if(o==="header"){if(i&&i.remove(),c&&c.remove(),e.querySelector("tbody")){const f=document.createElement("tbody");f.className="fixed-tbody",a.appendChild(f)}}else o==="body"?(r&&r.remove(),c&&c.remove(),i&&(i.className="bindable-tbody")):o==="footer"&&(r&&r.remove(),i&&i.remove());return s==="left"?a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach(l=>{l.getAttribute("fixed")!=="left"&&l.remove()}):s==="right"?a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach(l=>{l.getAttribute("fixed")!=="right"&&l.remove()}):a.querySelectorAll("[fixed=left], [fixed=right]").forEach(l=>{l.remove()}),a},"#createSplitTable"));C(this,"getRowHeight",d(()=>t(this,dt).getRowHeight(),"getRowHeight"));C(this,"scrollToX",d(e=>{const s=this.querySelector(".ng-container-body .ng-part-body");s&&(s.scrollLeft=e)},"scrollToX"));C(this,"scrollToY",d(e=>{const s=this.querySelector(".ng-container-body .ng-part-body");s&&(s.scrollTop=e)},"scrollToY"));h(this,be,d(()=>{t(this,pe).call(this),y(this,Wt,new Le(this)),y(this,zt,new Ie(this))},"#init"));h(this,pe,d(()=>{const e=Bt.SCROLLBAR_SIZE;this.innerHTML=`
|
|
126
|
+
`;const e=d(()=>{const s=t(this,ot).querySelector(".ng-container-body .ng-part-body");if(!s){setTimeout(e,10);return}y(this,k,{container:s,track:this.querySelector(".ng-scroll-track"),thumb:this.querySelector(".ng-scroll-thumb"),top:this.querySelector(".ng-scroll-top"),bottom:this.querySelector(".ng-scroll-bottom")}),t(this,te).call(this),this.refresh()},"initWhenReady");e()}};rt=new WeakMap,ot=new WeakMap,pt=new WeakMap,k=new WeakMap,Ct=new WeakMap,kt=new WeakMap,te=new WeakMap,d(Ue,"NineTableVScrollBar");let Tt=Ue;customElements.get("nine-table-vscrollbar")||customElements.define("nine-table-vscrollbar",Tt);const Ke=class Ke{constructor(n){h(this,it);h(this,E);h(this,at);h(this,U,new Map);h(this,D,null);h(this,Z,null);h(this,lt,0);h(this,Lt,40);h(this,Ve,!1);h(this,Ye,!1);h(this,ee,3);h(this,Xe,3);h(this,se,0);T(this,"refresh",d(()=>{var e;x.log("rowManager.refresh");const n=t(this,E).querySelector(".ng-container-body .ng-part-body");n&&(t(this,It).call(this),t(this,Mt).call(this),t(this,yt).call(this,n.scrollTop),(e=t(this,E).querySelector("nine-table-vscrollbar"))==null||e.refresh())},"refresh"));T(this,"initialize",d(()=>{x.log("rowManager.initialize"),y(this,at,{scrollTables:t(this,E).querySelectorAll(".ng-part-body table"),firstTr:t(this,E).querySelector(".ng-container-body .ng-part-body tbody.bindable-tbody tr:not(.nodata)")}),y(this,D,null),t(this,U).clear(),[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(r=>{const i=t(this,E).querySelector(r);if(!i)return;const c=i.querySelector(".ng-part-body table");if(!c)return;const l=c.querySelector("tbody.bindable-tbody");if(!l)return;const g=Array.from(l.querySelectorAll("tr")).map(b=>b.cloneNode(!0));t(this,U).set(r,g)});const n=t(this,E).querySelector(".ng-container-body .ng-part-body"),e=t(this,E).querySelector(".ng-container-left .ng-part-body"),s=t(this,E).querySelector(".ng-container-right .ng-part-body"),o=t(this,E).querySelector(".ng-container-body .ng-part-header"),a=t(this,E).querySelector(".ng-container-body .ng-part-footer");if(n){t(this,It).call(this),t(this,$t).call(this),t(this,Mt).call(this),t(this,yt).call(this,n.scrollTop);let r=!1;y(this,se,n.scrollLeft);const i=d(c=>{var g;if(r)return;r=!0;const l=c.scrollTop,f=c.scrollLeft;n&&n.scrollTop!==l&&(n.scrollTop=l),e&&e.scrollTop!==l&&(e.scrollTop=l),s&&s.scrollTop!==l&&(s.scrollTop=l),o&&o.scrollLeft!==f&&(o.scrollLeft=f),a&&a.scrollLeft!==f&&(a.scrollLeft=f),t(this,yt).call(this,l),(g=t(this,E).querySelector("nine-table-vscrollbar"))==null||g.refresh(),r=!1},"handleContainerScroll");n==null||n.addEventListener("scroll",c=>{i(n)}),[e,s].forEach(c=>{c==null||c.addEventListener("scroll",l=>{if(r)return;r=!0;const f=c.scrollTop;n&&n.scrollTop!==f&&(n.scrollTop=f),r=!1})})}},"initialize"));h(this,ne,d((n,e)=>{x.log("rowManager.#renderRows");const s=t(this,U).get(e);if(!s||s.length===0)return;const o=n.querySelector(".ng-part-body tbody.bindable-tbody");if(!o)return;o.querySelectorAll("tr:not(.nodata)").forEach(i=>i.remove());const a=o.querySelector("tr.nodata"),r=document.createDocumentFragment();for(let i=0;i<t(this,Lt);i++)s.forEach(c=>{r.appendChild(c.cloneNode(!0))});a?a.before(r):o.appendChild(r),e===".ng-container-body"&&(t(this,at).firstTr=o.querySelector("tr:not(.nodata)"))},"#renderRows"));h(this,It,d(()=>{if(t(this,D)!==null&&t(this,D)>0)return t(this,D);const n=t(this,E).querySelector(".ng-container-body .ng-part-body");x.log("rowManager.#measureAndCacheHeight");const e=t(this,U).get(".ng-container-body");if(!e||e.length===0)throw new Error("invalid dom");const s=n.querySelector("tbody.bindable-tbody");if(!s)throw new Error("invalid dom");s.querySelectorAll("tr:not(.nodata)").forEach(b=>b.remove());const o=s.querySelector("tr.nodata"),a=document.createDocumentFragment();e.forEach(b=>{a.appendChild(b.cloneNode(!0))}),o?o.before(a):s.appendChild(a);const r=t(this,E),i=r.style.display,c=r.style.visibility,l=r.style.position;(i==="none"||window.getComputedStyle(r).display==="none")&&(r.style.display="block",r.style.visibility="hidden",r.style.position="absolute");let f=0;const g=s.querySelectorAll("tr");return g.forEach(b=>{let u=b.offsetHeight||b.getBoundingClientRect().height;if(u===0){const p=window.getComputedStyle(b);u=parseFloat(p.height)||parseFloat(p.minHeight)||0}f+=u}),g.forEach(b=>b.remove()),r.style.display=i,r.style.visibility=c,r.style.position=l,f<=0?-1:(y(this,D,f),t(this,Ht).call(this),t(this,D))},"#measureAndCacheHeight"));h(this,Mt,d(()=>{x.log("rowManager.#updateVirtualScrollHeight");const e=(t(this,it).data.get()||[]).length,s=t(this,D),o=e*s;[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(a=>{const r=t(this,E).querySelector(a);if(!r)return;const i=r.querySelector(".ng-part-body .ng-virtual-spacer");i&&(i.style.height=`${o}px`)})},"#updateVirtualScrollHeight"));h(this,Ht,d(()=>{if(t(this,lt)>0&&t(this,D)>0){const n=Math.ceil(t(this,lt)/t(this,D));y(this,Lt,n+t(this,ee))}},"#updateRowCount"));h(this,re,d(()=>{var i,c,l,f,g,b;const n=t(this,E).querySelector(".ng-container-left .ng-part-body table"),e=t(this,E).querySelector(".ng-container-body .ng-part-body table"),s=t(this,E).querySelector(".ng-container-right .ng-part-body table");if(e){const u=n?Array.from(n.querySelectorAll("tbody tr")):[],p=Array.from(e.querySelectorAll("tbody tr")),m=s?Array.from(s.querySelectorAll("tbody tr")):[],S=Math.max(u.length,p.length,m.length);for(let w=0;w<S;w++){const M=[((i=u[w])==null?void 0:i.getBoundingClientRect().height)||0,((c=p[w])==null?void 0:c.getBoundingClientRect().height)||0,((l=m[w])==null?void 0:l.getBoundingClientRect().height)||0],C=Math.max(...M);C>0&&(u[w]&&(u[w].style.height=`${C}px`),p[w]&&(p[w].style.height=`${C}px`),m[w]&&(m[w].style.height=`${C}px`))}}const o=t(this,E).querySelector(".ng-container-left .ng-part-footer table"),a=t(this,E).querySelector(".ng-container-body .ng-part-footer table"),r=t(this,E).querySelector(".ng-container-right .ng-part-footer table");if(a){const u=o?Array.from(o.querySelectorAll("tfoot tr")):[],p=Array.from(a.querySelectorAll("tfoot tr")),m=r?Array.from(r.querySelectorAll("tfoot tr")):[],S=Math.max(u.length,p.length,m.length);for(let w=0;w<S;w++){const M=[((f=u[w])==null?void 0:f.getBoundingClientRect().height)||0,((g=p[w])==null?void 0:g.getBoundingClientRect().height)||0,((b=m[w])==null?void 0:b.getBoundingClientRect().height)||0],C=Math.max(...M);C>0&&(u[w]&&(u[w].style.height=`${C}px`),p[w]&&(p[w].style.height=`${C}px`),m[w]&&(m[w].style.height=`${C}px`))}}},"#syncRowHeights"));h(this,oe,d(()=>{!t(this,E)||!(t(this,E)instanceof HTMLElement)||(y(this,Z,new ResizeObserver(n=>{for(const e of n){const s=e.target;if(!s.classList.contains("active"))continue;const o=e.contentRect.height;if(o>0){let a=0;const r=s.querySelector(".ng-part-header"),i=s.querySelector(".ng-part-footer");r&&(a+=r.offsetHeight),i&&(a+=i.offsetHeight);const c=Math.max(o-a,100);t(this,lt)!==c&&(y(this,lt,c),t(this,Ht).call(this),t(this,D)!==null&&(t(this,$t).call(this),this.refresh()))}}})),t(this,Z).observe(t(this,E)))},"#initResizeObserver"));h(this,$t,d(()=>{x.log("rowManager.#renderAllContainers"),[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(n=>{const e=t(this,E).querySelector(n);e&&e.querySelector(".ng-part-body tbody.bindable-tbody")&&t(this,ne).call(this,e,n)}),t(this,ae).call(this),t(this,re).call(this)},"#renderAllContainers"));h(this,yt,d(n=>{var g,b;const e=t(this,D);if(!e||e<=0)return;const s=t(this,it).data.length;if(s===0)return;const o=((g=t(this,U).get(".ng-container-body"))==null?void 0:g.length)||1,a=t(this,E).querySelector(".ng-container-body .ng-part-body"),r=Math.max(0,s-Math.floor(a.clientHeight/e)),i=Math.min(r,Math.max(0,Math.floor(n/e)));let c=Math.floor(i*e);const l=t(this,at).firstTr,f=l&&l.dataset.row!==void 0?parseInt(l.dataset.row,10):-1;(b=t(this,at))==null||b.scrollTables.forEach(u=>{u.style.transform=`translate3d(0, ${c}px, 0)`}),f!==i&&[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(u=>{const p=t(this,E).querySelector(u);if(!p)return;const m=p.querySelector(".ng-part-body tbody.bindable-tbody");if(!m)return;Array.from(m.querySelectorAll("tr:not(.nodata)")).forEach((w,M)=>{const C=i+Math.floor(M/o);if(C>=s){w.style.display="none";return}const W=t(this,it).data.get(C);w.style.display="",t(this,ie).call(this,w,W,C)})})},"#handleScroll"));h(this,ie,d((n,e,s)=>{n.dataset.row=s,n.data=e,Array.from(n.cells).forEach((o,a)=>{o.dataset.row=s;const r=Array.from(o.children).find(i=>i.tagName.toLowerCase().startsWith("cell-")||typeof i.refresh=="function");r&&typeof r.refresh=="function"&&r.refresh()})},"#bindRowData"));h(this,ae,d(()=>{var c,l,f;x.log("rowManager.#syncHeaderHeights");const n=t(this,E).querySelector(".ng-container-left .ng-part-header table"),e=t(this,E).querySelector(".ng-container-body .ng-part-header table"),s=t(this,E).querySelector(".ng-container-right .ng-part-header table");if(!e)return;const o=n?Array.from(n.querySelectorAll("tr")):[],a=Array.from(e.querySelectorAll("tr")),r=s?Array.from(s.querySelectorAll("tr")):[],i=Math.max(o.length,a.length,r.length);for(let g=0;g<i;g++){const b=[((c=o[g])==null?void 0:c.getBoundingClientRect().height)||0,((l=a[g])==null?void 0:l.getBoundingClientRect().height)||0,((f=r[g])==null?void 0:f.getBoundingClientRect().height)||0],u=Math.max(...b);u>0&&(o[g]&&(o[g].style.height=`${u}px`),a[g]&&(a[g].style.height=`${u}px`),r[g]&&(r[g].style.height=`${u}px`))}},"#syncHeaderHeights"));T(this,"destroy",d(()=>{t(this,Z)&&(t(this,Z).disconnect(),y(this,Z,null))},"destroy"));y(this,it,n.getRootNode().host),y(this,E,n),t(this,oe).call(this)}getRowHeight(){return t(this,D)}templateLength(n=".ng-container-body"){var e;return((e=t(this,U).get(n))==null?void 0:e.length)||1}};it=new WeakMap,E=new WeakMap,at=new WeakMap,U=new WeakMap,D=new WeakMap,Z=new WeakMap,lt=new WeakMap,Lt=new WeakMap,Ve=new WeakMap,Ye=new WeakMap,ee=new WeakMap,Xe=new WeakMap,se=new WeakMap,ne=new WeakMap,It=new WeakMap,Mt=new WeakMap,Ht=new WeakMap,re=new WeakMap,oe=new WeakMap,$t=new WeakMap,yt=new WeakMap,ie=new WeakMap,ae=new WeakMap,d(Ke,"RowManager");let Ce=Ke;const le=class le{static compileAll(n){return Array.isArray(n)?n.map(e=>le.compile(e)):[]}static compile(n){if(!n)return null;const e=d(i=>{i.querySelectorAll("tbody td, tbody th, tfoot td, tfoot th").forEach(l=>{const f=l.getAttribute("cell-type")||"renderer";if(l.children.length>0&&l.firstElementChild.tagName.includes("-"))return;let g=`cell-${f}`;const b=l.getAttribute("data-bind"),u=l.getAttribute("data-expr"),p=l.getAttribute("maxbyte"),m=l.getAttribute("type");let S=[];b&&S.push(`data-bind="${b}"`),u&&S.push(`data-expr="${u}"`),p&&S.push(`maxbyte="${p}"`),m&&S.push(`type="${m}"`),l.innerHTML=`<${g} ${S.join(" ")}></${g}>`}),i.querySelectorAll("tbody td, tfoot td").forEach(l=>{l.setAttribute("tabindex","0")})},"processCellTypes"),s=d(i=>{if(!i.querySelector("colgroup")){const c=i.querySelector("tbody tr")||i.querySelector("tr"),l=c?c.querySelectorAll("th, td").length:1,f=document.createElement("colgroup"),g=Math.max(Math.floor(i.clientWidth/l),100);for(let b=0;b<l;b++){const u=document.createElement("col");u.setAttribute("width",g),f.appendChild(u)}i.prepend(f)}if(!i.querySelector("thead")){const c=document.createElement("thead"),l=i.querySelector("colgroup");l?l.after(c):i.prepend(c)}i.classList.add("nine-table-element")},"ensureTableStructure"),o=d((i,c)=>{const l=Array.from(i.querySelectorAll(c+" tr")),f=Array.from(i.querySelectorAll(c+" th,"+c+" td")),g=l.length;if(g===0||f.length===0)return;let b=0;f.forEach(p=>{b+=p.colSpan||1});const u=Array.from(Array(g),()=>Array(b).fill(null));l.forEach(p=>{const m=p.sectionRowIndex;let S=0;p.dataset.subrow=m,Array.from(p.querySelectorAll("th,td")).forEach(w=>{for(let W=0;W<u[m].length;W++)if(u[m][W]===null){S=W;break}const M=w.rowSpan||1,C=w.colSpan||1;for(let W=0;W<M;W++)for(let qt=0;qt<C;qt++)m+W<g&&S+qt<b&&(u[m+W][S+qt]=W===0&&qt===0?"1":"0")})}),l.forEach(p=>{const m=p.sectionRowIndex;Array.from(p.querySelectorAll("th,td")).forEach(S=>{for(let w=0;w<u[m].length;w++)if(u[m][w]==="1"){S.dataset.col=w,u[m][w]="0";break}})})},"resetColIndex"),a=n.cloneNode(!0);return s(a),e(a),o(a,"thead"),o(a,"tbody"),o(a,"tfoot"),Array.from(a.querySelectorAll("colgroup col")).forEach((i,c)=>{const l=i.getAttribute("fixed");l&&a.querySelectorAll(`thead [data-col="${c}"], tbody [data-col="${c}"], tfoot [data-col="${c}"]`).forEach(f=>{f.setAttribute("fixed",l)})}),a}};d(le,"TableCompiler");let ke=le;const Ze=class Ze{constructor(n){h(this,Y);h(this,N);h(this,V,{startRow:-1,startCol:-1,endRow:-1,endCol:-1});T(this,"render",d(()=>{const{startRow:n,startCol:e,endRow:s,endCol:o}=t(this,V);x.log("🎨 [CellSelection.render] Rendering range ->",t(this,V));const a=t(this,N).querySelectorAll(".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body");if(a.forEach(i=>{i.querySelectorAll(".selected, .selected-top, .selected-bottom, .selected-left, .selected-right").forEach(c=>{c.classList.remove("selected","selected-top","selected-bottom","selected-left","selected-right")})}),n<0||e<0){x.log("⚠️ [CellSelection.render] Range is invalid (< 0), skipping render.");return}let r=0;a.forEach(i=>{i.querySelectorAll("tbody tr").forEach(c=>{const{matrixRow:l}=Q(this,Y,Zt).call(this,c);l<0||c.querySelectorAll("td, th").forEach(f=>{const g=parseInt(f.dataset.col,10);if(isNaN(g))return;const b=parseInt(f.rowSpan||1,10),u=parseInt(f.colSpan||1,10),p=l+b-1,m=g+u-1;p>=n&&l<=s&&m>=e&&g<=o&&(r++,f.classList.add("selected"),x.log(f,n,e,s,o),l<=n&&f.classList.add("selected-top"),p>=s&&f.classList.add("selected-bottom"),g<=e&&f.classList.add("selected-left"),m>=o&&f.classList.add("selected-right"))})})}),x.log(`✨ [CellSelection.render] Total rendered cells marked: ${r}`)},"render"));y(this,N,n),Q(this,Y,Ss).call(this),t(this,N).querySelectorAll(".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body").forEach(s=>{s.addEventListener("scroll",()=>{t(this,V).startRow>=0&&t(this,V).startCol>=0&&this.render()})}),x.log("🎯 [CellSelection] Initialized")}setRange(n,e,s,o){x.log(`🔍 [CellSelection.setRange] Input -> startRow: ${n}, startCol: ${e}, endRow: ${s}, endCol: ${o}`);let a=Math.min(n,s),r=Math.max(n,s),i=Math.min(e,o),c=Math.max(e,o);const l=t(this,N).querySelectorAll(".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body");let f=!0,g=0;for(;f&&g<5;)f=!1,g++,l.forEach(b=>{b.querySelectorAll("tbody tr").forEach(u=>{if(u.classList.contains("nodata"))return;const{matrixRow:p}=Q(this,Y,Zt).call(this,u);p<0||u.querySelectorAll("td, th").forEach(m=>{const S=parseInt(m.dataset.col,10);if(isNaN(S))return;const w=parseInt(m.rowSpan||1,10),M=parseInt(m.colSpan||1,10),C=p+w-1,W=S+M-1;if(C>=a&&p<=r&&W>=i&&S<=c){const bs=Math.min(a,p),ps=Math.max(r,C),ys=Math.min(i,S),ms=Math.max(c,W);(bs!==a||ps!==r||ys!==i||ms!==c)&&(a=bs,r=ps,i=ys,c=ms,f=!0)}})})});y(this,V,{startRow:a,startCol:i,endRow:r,endCol:c}),x.log("📦 [CellSelection.setRange] Final Range ->",t(this,V)),this.render()}};N=new WeakMap,V=new WeakMap,Y=new WeakSet,Zt=d(function(n){if(!n||n.classList.contains("nodata"))return{dataRow:-1,subRowIndex:-1,matrixRow:-1};const e=parseInt(n.dataset.row,10);if(isNaN(e))return{dataRow:-1,subRowIndex:-1,matrixRow:-1};const s=n.closest("tbody"),a=Array.from(s.querySelectorAll("tr:not(.nodata)")).filter(l=>parseInt(l.dataset.row,10)===e),r=a.indexOf(n),i=a.length>0?a.length:1,c=e*i+(r>=0?r:n.sectionRowIndex%i);return{dataRow:e,subRowIndex:r,matrixRow:c}},"#getMatrixRow"),Ss=d(function(){const n=t(this,N).querySelector(".ng-container-top");if(!n){x.log("❌ [CellSelection] .ng-container-top not found!");return}n.addEventListener("mousedown",e=>{if(e.button!==0)return;const s=e.target.closest("td, th");if(!s||s.dataset.row===void 0||s.dataset.col===void 0||s.closest("tr").classList.contains("nodata"))return;t(this,N).style.userSelect="none",t(this,N).style.webkitUserSelect="none";const o=s.closest("tr"),{matrixRow:a}=Q(this,Y,Zt).call(this,o),r=parseInt(s.dataset.col,10);if(a<0){t(this,N).style.userSelect="",t(this,N).style.webkitUserSelect="";return}x.log(`🖱️ [MouseDown Success] startRow: ${a}, startCol: ${r}`),t(this,N).navigation.currentCell=s;let i=a,c=r;const l=d(g=>{const b=document.elementFromPoint(g.clientX,g.clientY);let u=b==null?void 0:b.closest("td, th");if(!u||!t(this,N).contains(u)){const w=t(this,N).querySelectorAll(".ng-part-body tbody tr:not(.nodata) td, .ng-part-body tbody tr:not(.nodata) th");for(const M of w){const C=M.getBoundingClientRect();if(g.clientX>=C.left&&g.clientX<=C.right&&g.clientY>=C.top&&g.clientY<=C.bottom){u=M;break}}}if(!u||u.dataset.row===void 0||u.dataset.col===void 0||u.closest("tr").classList.contains("nodata"))return;const p=u.closest("tr"),{matrixRow:m}=Q(this,Y,Zt).call(this,p),S=parseInt(u.dataset.col,10);m<0||i===m&&c===S||(i=m,c=S,this.setRange(a,r,m,S))},"onMouseMove"),f=d(()=>{x.log("🖱️ [MouseUp] Drag ended."),t(this,N).style.userSelect="",t(this,N).style.webkitUserSelect="",document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",f)},"onMouseUp");document.addEventListener("mousemove",l),document.addEventListener("mouseup",f)})},"#initEvents"),d(Ze,"CellSelection");let Le=Ze;const Je=class Je{constructor(n){h(this,mt);h(this,B);h(this,ct,null);h(this,Nt,null);h(this,ce,-1);h(this,he,-1);h(this,_t,d(n=>{const e=[];return n.forEach(s=>e.push(...Array.from(s.querySelectorAll("td")))),e.length===0?null:(e.sort((s,o)=>parseInt(s.dataset.col,10)-parseInt(o.dataset.col,10)),e[e.length-1])},"#getMaxColCell"));h(this,Dt,d((n,e)=>{const s=t(this,ht).call(this,n);if(s.length===0)return e+1;let o=e+1;const a=[];s.forEach(r=>a.push(...Array.from(r.querySelectorAll("td")))),a.sort((r,i)=>parseInt(r.dataset.col,10)-parseInt(i.dataset.col,10));for(const r of a){const i=parseInt(r.dataset.col,10),c=parseInt(r.colSpan||1,10);if(e>=i&&e<i+c){o=i+c;break}}return o},"#getNextCol"));h(this,Ot,d((n,e)=>{const s=t(this,ht).call(this,n);if(s.length===0)return Math.max(0,e-1);let o=-1;const a=[];s.forEach(r=>a.push(...Array.from(r.querySelectorAll("td")))),a.sort((r,i)=>parseInt(r.dataset.col,10)-parseInt(i.dataset.col,10));for(const r of a){const i=parseInt(r.dataset.col,10);if(i<e)o=i;else break}return o},"#getPreviousCol"));h(this,ht,d(n=>{const e=t(this,B).querySelectorAll(".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"),s=[];return e.forEach(o=>{const a=Array.from(o.querySelectorAll("tbody tr:not(.nodata)"));for(const r of a){const i=parseInt(r.dataset.row,10),c=a.filter(p=>parseInt(p.dataset.row,10)===i),l=c.length>0?c.length:1,f=c.indexOf(r),g=i*l+(f>=0?f:0);if(g===n){s.push(r);break}const b=Array.from(r.querySelectorAll("td"));let u=!1;for(const p of b){const m=parseInt(p.rowSpan||1,10);if(m>1&&n>=g&&n<g+m){s.push(r),u=!0;break}}if(u)break}}),s},"#findTargetTrsByMatrix"));h(this,Ge,d((n,e,s,o)=>{const a=t(this,B).querySelectorAll(".ng-container-left .ng-part-body, .ng-container-body .ng-part-body, .ng-container-right .ng-part-body"),r=o!==void 0?o:n*1+e;for(const i of a){const c=Array.from(i.querySelectorAll("tbody tr"));for(const l of c){const f=parseInt(l.dataset.row,10),g=t(this,B).templateLength,b=parseInt(l.dataset.subrow,10),u=f*g+(b>=0?b:0),p=Array.from(l.querySelectorAll("td"));for(const m of p){const S=parseInt(m.dataset.col,10),w=parseInt(m.colSpan||1,10),M=parseInt(m.rowSpan||1,10);if(!isNaN(S)&&s>=S&&s<S+w&&r>=u&&r<u+M&&window.getComputedStyle(m).display!=="none")return m}}}return null},"#getNearElement_BAK"));h(this,de,d((n,e,s,o)=>{const a=o!==void 0?o:n*1+e,r=Array.from(t(this,B).querySelectorAll(".ng-container-left .ng-part-body tbody tr, .ng-container-body .ng-part-body tbody tr, .ng-container-right .ng-part-body tbody tr"));for(const i of r){const c=parseInt(i.dataset.row,10)||0,l=t(this,B).templateLength||1,f=parseInt(i.dataset.subrowIndex,10)||0,g=c*l+f,b=Array.from(i.querySelectorAll("td"));for(const u of b){const p=parseInt(u.dataset.col,10),m=parseInt(u.colSpan||1,10),S=parseInt(u.rowSpan||1,10);if(!isNaN(p)&&s>=p&&s<p+m&&a>=g&&a<g+S&&window.getComputedStyle(u).display!=="none")return u}}return null},"#getNearElement"));y(this,B,n),Q(this,mt,As).call(this),x.log("🎯 [CellNavigation] Initialized")}get currentCell(){return t(this,ct)}set currentCell(n){if(!n)return;y(this,ct,n),n.focus({preventScroll:!0}),y(this,Nt,n.closest("tr"));const e=parseInt(n.dataset.row,10),s=parseInt(n.dataset.col,10);if(!isNaN(e)&&!isNaN(s)){y(this,ce,e),y(this,he,s);const o=n.closest("tr"),a=o==null?void 0:o.closest("tbody");if(a){const i=Array.from(a.querySelectorAll("tr:not(.nodata)")).filter(g=>parseInt(g.dataset.row,10)===e),c=i.length>0?i.length:1,l=i.indexOf(o),f=e*c+(l>=0?l:0);t(this,B).selection.setRange(f,s,f,s)}}}moveCell(n){if(!t(this,ct))return;const e=t(this,ct),s=parseInt(e.dataset.row,10),o=parseInt(e.dataset.col,10),a=t(this,B).templateLength,r=parseInt(t(this,Nt).dataset.subrow,10),i=s*a+(r>=0?r:0);let c=i,l=o;switch(n.code){case"Tab":if(n.preventDefault(),n.shiftKey){if(l=t(this,Ot).call(this,i,o),l<0&&i>0){c=i-1;const u=t(this,ht).call(this,c),p=t(this,_t).call(this,u);l=p?parseInt(p.dataset.col,10):0}}else{l=t(this,Dt).call(this,i,o);const u=t(this,ht).call(this,i),p=t(this,_t).call(this,u),m=p?parseInt(p.dataset.col,10)+parseInt(p.colSpan||1,10):0;l>=m&&(c=i+1,l=0)}break;case"ArrowRight":l=t(this,Dt).call(this,i,o);break;case"ArrowLeft":l=t(this,Ot).call(this,i,o);break;case"ArrowDown":n.preventDefault(),c=i+(e.rowSpan||1);break;case"ArrowUp":n.preventDefault(),c=Math.max(0,i-(e.rowSpan||1));break}const f=Math.floor(c/a),g=c%a;x.log("templateLength",a,"matrixRow:",i,"nextMatrixRow",c);let b=t(this,de).call(this,f,g,l,c);x.log(b,f,g,l,c),b&&(this.currentCell=b,Q(this,mt,Rs).call(this,b))}};B=new WeakMap,ct=new WeakMap,Nt=new WeakMap,ce=new WeakMap,he=new WeakMap,mt=new WeakSet,Rs=d(function(n){},"#ensureCellVisible"),_t=new WeakMap,Dt=new WeakMap,Ot=new WeakMap,ht=new WeakMap,Ge=new WeakMap,de=new WeakMap,As=d(function(){t(this,B).addEventListener("keydown",n=>{["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(n.code)&&this.moveCell(n)})},"#initEvents"),d(Je,"CellNavigation");let Ie=Je;const Bt=class Bt extends HTMLElement{constructor(){super();h(this,fe);h(this,dt);h(this,Wt);h(this,zt);h(this,j,{table:null});T(this,"invalidate",d(()=>{x.log("sheet.invalidate()"),t(this,dt).refresh()},"invalidate"));T(this,"generate",d(e=>{if(x.log("sheet.generate()"),!e)return;t(this,j).table=ke.compile(e),t(this,j).tbody={tr:t(this,j).table.querySelectorAll("tbody tr")},t(this,ue).call(this),t(this,ge).call(this);const s=this.querySelector(".ng-container-body .ng-part-header"),o=this.querySelector(".ng-container-body .ng-part-footer"),a=this.querySelector(".ng-nodata-overlay");s&&a&&(a.style.top=`${s.offsetHeight}px`),o&&a&&(a.style.bottom=`${o.offsetHeight}px`),t(this,dt).initialize(),setTimeout(()=>{var r;(r=this.querySelector("nine-table-hscrollbar"))==null||r.refresh()},0)},"generate"));h(this,ue,d(()=>{[{selector:".ng-container-body",type:null},{selector:".ng-container-left",type:"left"},{selector:".ng-container-right",type:"right"}].forEach(({selector:s,type:o})=>{var a,r,i;(a=this.querySelector(`${s} .ng-part-header`))==null||a.appendChild(t(this,xt).call(this,t(this,j).table,o,"header")),(r=this.querySelector(`${s} .ng-virtual-spacer`))==null||r.before(t(this,xt).call(this,t(this,j).table,o,"body")),(i=this.querySelector(`${s} .ng-part-footer`))==null||i.appendChild(t(this,xt).call(this,t(this,j).table,o,"footer"))})},"#renderSplitContainers"));h(this,ge,d(()=>{["left","right","body"].forEach(e=>{const s=this.querySelector(`.ng-container-${e}`),o=s==null?void 0:s.querySelectorAll("table");if(!s||!o||o.length===0)return;let a=0;o[0].querySelectorAll("col").forEach(r=>{const i=parseInt(r.getAttribute("width"),10);isNaN(i)||(a+=i)}),e==="body"?(s.style.flex="1",o.forEach(r=>{r.style.width=`${a}px`,r.style.minWidth=`${a}px`})):(s.style.flex=`0 0 ${a}px`,s.style.width=`${a}px`,o.forEach(r=>{r.style.width=`${a}px`,r.style.minWidth=`${a}px`}))})},"#updateContainerWidths"));h(this,xt,d((e,s,o)=>{const a=e.cloneNode(!0),r=a.querySelector("thead"),i=a.querySelector("tbody"),c=a.querySelector("tfoot");if(o==="header"){if(i&&i.remove(),c&&c.remove(),e.querySelector("tbody")){const f=document.createElement("tbody");f.className="fixed-tbody",a.appendChild(f)}}else o==="body"?(r&&r.remove(),c&&c.remove(),i&&(i.className="bindable-tbody")):o==="footer"&&(r&&r.remove(),i&&i.remove());return s==="left"?a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach(l=>{l.getAttribute("fixed")!=="left"&&l.remove()}):s==="right"?a.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach(l=>{l.getAttribute("fixed")!=="right"&&l.remove()}):a.querySelectorAll("[fixed=left], [fixed=right]").forEach(l=>{l.remove()}),a},"#createSplitTable"));T(this,"getRowHeight",d(()=>t(this,dt).getRowHeight(),"getRowHeight"));T(this,"scrollToX",d(e=>{const s=this.querySelector(".ng-container-body .ng-part-body");s&&(s.scrollLeft=e)},"scrollToX"));T(this,"scrollToY",d(e=>{const s=this.querySelector(".ng-container-body .ng-part-body");s&&(s.scrollTop=e)},"scrollToY"));h(this,be,d(()=>{t(this,pe).call(this),y(this,Wt,new Le(this)),y(this,zt,new Ie(this))},"#init"));h(this,pe,d(()=>{const e=Bt.SCROLLBAR_SIZE;this.innerHTML=`
|
|
127
127
|
<style>
|
|
128
128
|
nine-table-sheet {
|
|
129
129
|
display: none;
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
<nine-table-hscrollbar></nine-table-hscrollbar>
|
|
322
322
|
<div class='ng-scroll-edge'></div>
|
|
323
323
|
</div>
|
|
324
|
-
`},"#render"));y(this,dt,new Ce(this)),y(this,fe,this.getRootNode().host)}connectedCallback(){t(this,be).call(this)}get selection(){return t(this,Wt)}get templateLength(){return t(this,
|
|
324
|
+
`},"#render"));y(this,dt,new Ce(this)),y(this,fe,this.getRootNode().host)}connectedCallback(){t(this,be).call(this)}get selection(){return t(this,Wt)}get templateLength(){return t(this,j).tbody.tr.length}get navigation(){return t(this,zt)}disconnectedCallback(){this.innerHTML="",x.log("NineTableSheet destroyed.")}};fe=new WeakMap,dt=new WeakMap,Wt=new WeakMap,zt=new WeakMap,j=new WeakMap,ue=new WeakMap,ge=new WeakMap,xt=new WeakMap,be=new WeakMap,pe=new WeakMap,d(Bt,"NineTableSheet"),T(Bt,"SCROLLBAR_SIZE",16);let Gt=Bt;customElements.get("nine-table-sheet")||customElements.define("nine-table-sheet",Gt);const Qe=class Qe extends HTMLElement{constructor(){super();h(this,ye,d(()=>{var e;(e=this.querySelector(".nine-tab-bar"))==null||e.addEventListener("click",s=>{var r;const o=s.ctrlKey||s.metaKey||s.shiftKey,a=parseInt((r=s.target.closest(".nine-tab-item"))==null?void 0:r.dataset.index,10);t(this,Pt).call(this,a,o)}),t(this,Pt).call(this,0,!1)},"#init"));h(this,Pt,d((e,s=!1)=>{const o=d(()=>{const f=Array.from(this.querySelectorAll("nine-table-sheet"));Array.from(this.querySelectorAll("nine-splitter")).forEach(u=>u.style.setProperty("display","none"));const b=f.filter(u=>u.classList.contains("active"));b.length<2||b.forEach(u=>{const p=parseInt(u.getAttribute("data-index"),10),m=this.querySelector(`nine-splitter[data-split-index="${p}"]`),S=f[p+1];m&&S&&S.classList.contains("active")&&m.style.setProperty("display","flex")})},"updateSplitters"),a=this.querySelector(".nine-tab-bar"),r=this.querySelector("nine-table-sheets-body"),i=a.querySelectorAll(".nine-tab-item"),c=r.querySelectorAll("nine-table-sheet");if(!i[e])return;if(!s)i.forEach((f,g)=>{f.classList.toggle("active",g===e)}),c.forEach((f,g)=>{const b=g===e;f.classList.toggle("active",b),f.style.flex=b?"1 1 100%":""});else{const f=i[e],g=a.querySelectorAll(".nine-tab-item.active");if(f.classList.contains("active")&&g.length<=1)return;f.classList.toggle("active");const b=r.querySelector(`nine-table-sheet[data-index="${e}"]`);b&&(b.classList.toggle("active"),b.classList.contains("active")||(b.style.flex=""))}const l=r.querySelectorAll("nine-table-sheet.active");l==null||l.forEach(f=>{f.style.flex=l.length>1?"1 1 0%":"1 1 100%"}),o()},"#switchSheet"))}connectedCallback(){t(this,ye).call(this)}};ye=new WeakMap,Pt=new WeakMap,d(Qe,"NineTableSheets");let Me=Qe;customElements.get("nine-table-sheets")||customElements.define("nine-table-sheets",Me);const ts=class ts{constructor(n){h(this,_);h(this,me,d(()=>{t(this,xe).call(this),new ResizeObserver(n=>{for(let e of n)t(this,_).getAttribute("auto-height")==="true"&&t(this,Ft).call(this)}).observe(t(this,_))},"#init"));h(this,Ft,d(()=>{var c,l;const n=Array.from(t(this,_).shadowRoot.querySelectorAll("nine-table-sheet.active"));if(n.length===0)return;const e=parseInt(t(this,_).getAttribute("max-display-row"),10)||10,s=Math.max(...n.map(f=>f.getRowHeight())),o=(c=t(this,_).shadowRoot.querySelector("nine-table-header"))==null?void 0:c.getBoundingClientRect().height,a=(l=t(this,_).shadowRoot.querySelector("nine-table-sheets-footer"))==null?void 0:l.getBoundingClientRect().height,r=Gt.SCROLLBAR_SIZE,i=e*s+o+a+r;t(this,_).style.height=`${i}px`},"#applyAutoHeight"));h(this,xe,d(()=>{const e=Array.from(t(this,_).children).filter(c=>c.tagName==="TABLE"),s=t(this,_).getAttribute("auto-height")==="true",o=e.length,a=e.map((c,l)=>{const g=`<nine-table-sheet class="${l===0?"active":""}" data-index="${l}"></nine-table-sheet>`,b=l<o-1?`<nine-splitter class="h" data-split-index="${l}"></nine-splitter>`:"";return g+b}).join(""),r=e.map((c,l)=>`<div class="nine-tab-item ${l===0?"active":""}" data-index="${l}">Sheet ${l+1}</div>`).join("");t(this,_).shadowRoot.innerHTML=`
|
|
325
325
|
<style>
|
|
326
326
|
:host {
|
|
327
327
|
display: flex;
|
|
@@ -441,10 +441,10 @@
|
|
|
441
441
|
<nine-table-analysis></nine-table-analysis>
|
|
442
442
|
</nine-table-body>
|
|
443
443
|
<nine-table-footer></nine-table-footer>
|
|
444
|
-
`,t(this,_).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");const i=t(this,_).shadowRoot.querySelectorAll("nine-table-sheet");i==null||i.forEach((c,l)=>{e[l]&&setTimeout(()=>{c.generate(e[l]),s&&t(this,Ft).call(this)})})},"#render"));y(this,_,n),t(this,me).call(this)}};_=new WeakMap,me=new WeakMap,Ft=new WeakMap,xe=new WeakMap,d(Qe,"LayoutManager");let He=Qe;const ts=class ts{constructor(n){h(this,jt);h(this,wt,-1);C(this,"count",d(()=>t(this,jt).rawRecords.length,"count"));y(this,jt,n)}get at(){return t(this,wt)}set at(n){y(this,wt,parseInt(n,10)),body&&!body.querySelector(`tbody.bindable tr[data-row="${t(this,wt)}"]`)&&setTimeout(()=>{})}};jt=new WeakMap,wt=new WeakMap,d(ts,"ngRow");let $e=ts;const B=class B{constructor(n,e){h(this,D);h(this,L);h(this,z,[]);h(this,vt,[]);h(this,we,0);h(this,Z,[]);h(this,ve,d(()=>{y(this,Z,[]);const n=t(this,D).template||[];Array.from(n).forEach(e=>{var s;t(this,Z).push(((s=e.getBoundingClientRect)==null?void 0:s.call(e).height)||24)}),(t(this,L).rawRecords||[]).forEach(e=>{e.__ng||(e.__ng=t(this,Ut).call(this)),e.__ng.height=t(this,Z).slice()})},"#initialize"));h(this,ft,d(()=>{const n=t(this,D).shadowRoot.querySelector("nine-table-sheets");n==null||n.classList.toggle("nodata",this.length===0),t(this,D).shadowRoot.querySelectorAll("nine-table-sheet").forEach(e=>{e.invalidate()})},"#invalidate"));C(this,"get",d((n,e)=>{var a;const s=this.getValidData();if(!s||s.length<=0)return;if(n==null)return t(this,St).call(this,s);if(n<0||n>=s.length)return null;const o=typeof((a=t(this,D).fields)==null?void 0:a.get)=="function"?t(this,D).fields.get():[];if(e!=null){const r=o.indexOf(e);return r>=0?s[n].v[r]:null}return t(this,St).call(this,s[n])},"get"));C(this,"set",d(n=>{this.clear(),this.add(n,!1),t(this,ft).call(this)},"set"));h(this,Ut,d(()=>({rowState:B.ROW_STATE.EMPTY,deleted:!1,filtered:!1,height:t(this,Z).slice(),o:{},c:{},_:[0,0,0,0,B.ROW_STATE.EMPTY,!1,!1,!0,!1,!0,!0,!1,t(this,Z).slice(),-1,{},{}]}),"#getDefaultMeta"));C(this,"reset",d(()=>{y(this,z,[]),y(this,vt,[]),t(this,ft).call(this)},"reset"));C(this,"clear",d(()=>{var n;t(this,L).rawRecords=[],y(this,z,[]),y(this,vt,[]),(n=t(this,L).viewRecords)!=null&&n.reset&&t(this,L).viewRecords.reset()},"clear"));h(this,Se,d(n=>{var o;Array.isArray(n)||(n=[n]);const e=typeof((o=t(this,D).fields)==null?void 0:o.get)=="function"?t(this,D).fields.get():Object.keys(n[0]||{}),s=[];return n.forEach(a=>{const r={v:[]};e.forEach(i=>{r.v.push(a[i]!==void 0&&a[i]!==null?a[i]:"")}),s.push(r)}),s},"#json2Array"));h(this,Re,d(n=>(Array.isArray(n)||(n=[n]),n.forEach(e=>{e.__ng=t(this,Ut).call(this),e.__ng.rowid=this.nextId,e.__ng.rowState=B.ROW_STATE.INSERT,e.__ng._[0]=e.__ng.rowid}),n),"#defaultInsert"));C(this,"add",d((n,e=!0)=>{n===void 0&&(n={});const s=t(this,Se).call(this,n);t(this,L).rawRecords=t(this,L).rawRecords.concat(t(this,Re).call(this,s)),this.resetRecords();const o=this.count()-1;return e||s.forEach((a,r)=>{const i=t(this,L).rawRecords[o-r];i&&(i.__ng.rowState=B.ROW_STATE.EMPTY)}),t(this,ft).call(this),o},"add"));C(this,"delete",d(n=>{let e=[];Array.isArray(n)?e=n:typeof n>"u"?e=[t(this,L).host.row.at]:e=[parseInt(n,10)],e.sort((s,o)=>o-s).forEach(s=>{if(t(this,z)[s]){const o=t(this,z)[s].__ng.rowid;t(this,z)[s].__ng.rowState===B.ROW_STATE.INSERT?t(this,L).rawRecords=t(this,L).rawRecords.filter(a=>a.__ng.rowid!==o):t(this,L).rawRecords.forEach(a=>{a.__ng.rowid===o&&(a.__ng.deleted=!0,a.__ng.rowState=B.ROW_STATE.DELETE)})}}),this.resetRecords(),t(this,ft).call(this)},"delete"));C(this,"setValue",d((n,e,s)=>{var c;n=parseInt(n,10);const a=(typeof((c=t(this,D).fields)==null?void 0:c.get)=="function"?t(this,D).fields.get():[]).indexOf(e);if(a<0)return;const r=this.getValidData()[n];if(!r)return;const i=r.v[a];i!==s&&r.__ng.rowState!==B.ROW_STATE.INSERT&&(r.__ng.o.hasOwnProperty(e)||(r.__ng.o[e]=i),r.__ng.rowState=B.ROW_STATE.UPDATE),r.v[a]=s},"setValue"));C(this,"resetRecords",d(()=>{y(this,vt,t(this,L).rawRecords.filter(n=>!n.__ng.deleted)),y(this,z,t(this,L).rawRecords.filter(n=>!n.__ng.deleted&&!n.__ng.filtered)),t(this,L).rawRecords.forEach((n,e)=>{n.__ng.rowidx=e}),t(this,z).forEach((n,e)=>{n.__ng.i=e})},"resetRecords"));C(this,"getValidData",d(()=>(t(this,z).length===0&&t(this,L).rawRecords.length>0&&this.resetRecords(),t(this,z)),"getValidData"));h(this,St,d(n=>{var r;if(!n)return n;const e=!Array.isArray(n),s=e?[n]:n,o=typeof((r=t(this,D).fields)==null?void 0:r.get)=="function"?t(this,D).fields.get():[],a=s.filter(i=>!i.__ng.deleted).map(i=>{const c={};return o.forEach((l,f)=>{c[l]=i.v?i.v[f]:i[l]}),c.__ng=i.__ng,c});return e?a[0]:a},"#conv"));C(this,"count",d(()=>this.getValidData().length,"count"));y(this,D,n),y(this,L,e),t(this,ve).call(this)}get source(){return t(this,St).call(this,t(this,L).rawRecords)}set source(n){this.clear(),this.add(n,!1)}get nextId(){return++ws(this,we)._}get count(){return t(this,z).length}get length(){return t(this,z).length}getRowCount(){return this.length}};D=new WeakMap,L=new WeakMap,z=new WeakMap,vt=new WeakMap,we=new WeakMap,Z=new WeakMap,ve=new WeakMap,ft=new WeakMap,Ut=new WeakMap,Se=new WeakMap,Re=new WeakMap,St=new WeakMap,d(B,"ngData"),C(B,"ROW_STATE",{EMPTY:"EMPTY",NORMAL:"NORMAL",INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE"});let Ne=B;const es=class es{constructor(n){h(this,ut);y(this,ut,n),this.row=new $e(this),this.data=new Ne(t(this,ut),this),this.rawRecords=[],this.viewRecords=[],this.delRecords=[],this.pageCnt=25,this.viewRecords.reset=()=>{var e;(e=t(this,ut).view)!=null&&e.redraw&&t(this,ut).view.redraw()},this.setDataSource=e=>{this.data&&this.data.reset(),this.rawRecords=[],this.viewRecords=[],this.delRecords=[],this.data.set(e||[])},this.getRowState=e=>{var o,a;const s=parseInt(e,10);if(!(s>=this.data.count()))return(a=(o=this.data.getValidData()[s])==null?void 0:o.__ng)==null?void 0:a.rowState},this.getRowPosition=()=>this.row.at,this.setRowPosition=e=>{this.row.at=e},this.scrollTo_V1=e=>(e<0&&(e=0),e>=this.rawRecords.length&&(e=this.rawRecords.length-1),this.viewRecords.rawIndex=e,this.viewRecords.reset&&this.viewRecords.reset(),!(e<=0||e>=this.rawRecords.length-1)),this.getColumn=(e,s)=>this.data.get(e,s),this.setColumn=(e,s,o)=>{e=parseInt(e,10),this.data.setValue(e,s,o)},this.setDataSource([])}};ut=new WeakMap,d(es,"ngDataManager");let _e=es;const ss=class ss{constructor(n){h(this,Rt);h(this,H,[]);C(this,"add",d((n,e="string")=>{n.forEach(s=>{t(this,H).some(o=>o.name===s)||t(this,H).push({name:s,type:e})}),t(this,Vt).call(this)},"add"));h(this,Vt,d(()=>{const n=new Map;t(this,H).forEach(e=>{n.set(e.name,e.type)}),y(this,H,Array.from(n,([e,s])=>({name:e,type:s}))),y(this,H,t(this,H).filter(e=>e.name!==""&&e.name!=="__ng")),t(this,H).sort((e,s)=>e.name.length<s.name.length?1:-1)},"#adjust"));h(this,Ae,d(()=>{y(this,H,[]),w.log(t(this,Rt).querySelectorAll("table"));const n=Array.from(t(this,Rt).querySelectorAll("table"));if(!(!n||n.length===0)){for(const e of n)w.log(e),$("[data-bind]",e).each((s,o)=>{const a=o.dataset.bind,r=o.getAttribute("data-type")||"string";a&&t(this,H).push({name:a,type:r})}),["data-expr","background-color","color","tooltip","visible","readonly","enable-button","enable-check","class-expr","icon-color","icon-src"].forEach(s=>{$(`[${s}]`,e).each((o,a)=>{var r=a.getAttribute(s);if(r.indexOf("data.")<0){const i=r.search(/[(]/g);if(i>0)try{r=String(window[r.substring(0,i).trim()])}catch{r=""}}r.split("data.").forEach(i=>{if(i.trim()!=""){const c=i.search(/[^_A-Za-z0-9]/g);let l="";c>=0?l=i.substring(0,c):r.startsWith("data.")&&(l=i.replace("data.","")),l&&t(this,H).push({name:l,type:"string"})}})})});t(this,Vt).call(this)}},"#init"));y(this,Rt,n),t(this,Ae).call(this)}get(){return t(this,H).map(n=>n.name)}getFields(){return t(this,H)}getType(n){const e=t(this,H).find(s=>s.name===n);return e?e.type:"string"}indexOf(n){return t(this,H).findIndex(e=>e.name===n)}includes(n){return t(this,H).some(e=>e.name===n)}};Rt=new WeakMap,H=new WeakMap,Vt=new WeakMap,Ae=new WeakMap,d(ss,"ngFields");let Oe=ss;const ns=class ns extends HTMLElement{constructor(){super();h(this,gt);h(this,Ee);h(this,qe,d(()=>{this.fields=new Oe(this),y(this,Ee,new He(this)),w.log("NineTable connected."),this.dispatchEvent(new CustomEvent("load",{bubbles:!0,detail:{target:this}}))},"#init"));this.attachShadow({mode:"open"}),y(this,gt,new _e(this))}connectedCallback(){t(this,qe).call(this)}disconnectedCallback(){w.log("NineTable disconnected.")}get data(){return t(this,gt).data}get row(){return t(this,gt).row}get dataManager(){return t(this,gt)}};gt=new WeakMap,Ee=new WeakMap,qe=new WeakMap,d(ns,"NineTable");let De=ns;customElements.get("nine-table")||customElements.define("nine-table",De);const Yt=class Yt extends HTMLElement{constructor(){super()}applyBaseStyle(){this.constructor.name}connectedCallback(){}};d(Yt,"BasicCellElement"),C(Yt,"_styleCache",new Map),C(Yt,"_customStyleCache",new Map);let We=Yt;const cs=class cs extends We{constructor(){super();h(this,I);h(this,Xt);h(this,v);h(this,rs);h(this,os);h(this,is);h(this,as);C(this,"getDisplayText",d(e=>{if(t(this,v))if(t(this,v).closest("tbody")){const s=t(this,v).closest("tr").data,o=parseInt(t(this,v).dataset.row);if(!s)return"";if(ninegrid.isNull(t(this,v).dataset.expr)){if(!ninegrid.isNull(t(this,v).dataset.bind))return s[t(this,v).dataset.bind]||ninegrid.nvl(e,"")}else try{return this.getExprValue(t(this,v).dataset.expr,s,o,t(this,v))}catch{console.error(t(this,v).dataset.expr,s,t(this,v).dataset.row)}return ninegrid.nvl(e,"")}else try{return t(this,I).exprFunction(t(this,v).dataset.expr).call(this,null,-1,t(this,I).data)}catch{}},"getDisplayText"));h(this,ls,d(()=>{if(!(!t(this,I)||!t(this,I).template||!t(this,v).closest("tbody.bindable"))){var e=ninegrid.j.querySelectorAll(t(this,v)).attr("suppress");if(e&&(e=parseInt(e)),e&&!isNaN(e)){var s=t(this,v).closest("tr"),o=[];$("th,td",s).each((x,M)=>{var T=ninegrid.j.querySelectorAll(M).attr("suppress");T&&M.dataset.row&&(T=parseInt(T),!isNaN(T)&&T<=e&&o.push(T))}),o.sort();var a=!1;if(parseInt(s.sectionRowIndex/t(this,I).template.length)>0)for(var r of o){if(r>e)break;var i=parseInt(t(this,v).dataset.row),c=i-1,l=t(this,v).closest("tr").data,f=t(this,I).data.get(c);t(this,v).dataset.matrixRow;var u=t(this,I).body.querySelector(`tbody.bindable [suppress="${r}"][data-matrix-row="${t(this,v).dataset.matrixRow}"]`),b=u.dataset.expr?this.getExprValue(u.dataset.expr,l,i):l[u.dataset.bind],g=u.dataset.expr?this.getExprValue(u.dataset.expr,f,c):f[u.dataset.bind];if(b!=g){a=!0;break}}else a=!0;a?ninegrid.j.querySelectorAll(t(this,v)).removeClass("suppress"):ninegrid.j.querySelectorAll(t(this,v)).addClass("suppress"),ninegrid.j.querySelectorAll(t(this,v)).hasClass("hidden")||(a?ninegrid.j.querySelectorAll(t(this,v)).removeClass("hidden"):ninegrid.j.querySelectorAll(t(this,v)).addClass("hidden"));var p=parseInt(t(this,v).dataset.matrixRow),m=p-1,S=t(this,I).body.querySelector(`tbody.bindable [data-col="${t(this,v).dataset.col}"][data-matrix-row="${m}"]`);$(S).hasClass("suppress")&&!ninegrid.j.querySelectorAll(t(this,v)).hasClass("suppress")?ninegrid.j.querySelectorAll(S).removeClass("last-none-suppress").addClass("last-suppress"):!$(S).hasClass("suppress")&&ninegrid.j.querySelectorAll(t(this,v)).hasClass("suppress")?ninegrid.j.querySelectorAll(S).removeClass("last-suppress").addClass("last-none-suppress"):ninegrid.j.querySelectorAll(S).removeClass("last-none-suppress").removeClass("last-suppress")}}},"#resetSuppress"));C(this,"getExprValue",d((e,s,o,a)=>{if(typeof e<"u")try{o=parseInt(o);const r=e.replace("()","");return t(this,I)[r]?t(this,I)[r].call(this,s,o,t(this,v)):t(this,I).exprFunction(e).call(this,s,o,t(this,I).data)}catch{return["NG-COMBO"].includes(this.tagName)?"":e}else return e},"getExprValue"))}connectedCallback(){super.connectedCallback(),y(this,I,this.getRootNode().host),y(this,v,this.closest("th,td")),y(this,Xt,t(this,v).closest("tr"))}get value(){var e=!t(this,I)||!t(this,I).dataManager||!t(this,v)||!t(this,v).dataset||!t(this,v).dataset.row||!t(this,v).dataset.bind?"":t(this,v).closest("tr").data[t(this,v).dataset.bind];return e??""}set value(e){var s=parseInt(t(this,v).dataset.row);const o=this.getAttribute("update-row-state")!="false";s<0?t(this,I).data.setValueNF(parseInt(t(this,v).dataset.index),t(this,v).dataset.bind,e,o):t(this,I).data.setValue(s,t(this,v).dataset.bind,e,o)}get row(){return parseInt(t(this,v).dataset.row)}get data(){return t(this,v).closest("tr").data}refresh(){const e=t(this,v).dataset.bind;return parseInt(t(this,v).dataset.row),t(this,Xt).data[e]}};I=new WeakMap,Xt=new WeakMap,v=new WeakMap,rs=new WeakMap,os=new WeakMap,is=new WeakMap,as=new WeakMap,ls=new WeakMap,d(cs,"CellElement");let ze=cs;const hs=class hs extends ze{constructor(){super()}connectedCallback(){super.connectedCallback()}refresh(){return super.refresh()}};d(hs,"EditableCellElement");let Be=hs;const fs=class fs extends Be{constructor(){super();h(this,Kt);h(this,bt);h(this,At);h(this,Et);h(this,Te);h(this,J);C(this,"refresh",d(()=>{const e=super.refresh();t(this,Kt).value=e},"refresh"));h(this,ds,d(e=>{if(!["Escape","Enter","Tab","Home","End","ArrowLeft","ArrowRight","PageUp","PageDown","Backspace","Delete"].includes(e.code)){if(t(this,bt)=="number"){let a=[];if(t(this,J)&&Number(t(this,J))>0&&a.push("."),t(this,Et)&&Number(t(this,Et))>=0&&a.push("-"),!(e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105)&&!a.includes(e.key)&&e.preventDefault(),t(this,J)&&(e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105)&&e.target.selectionStart==e.target.selectionEnd){var s=e.target.value,o=s.indexOf(".");if(o>=0){var s=s.substr(o+1,s.length);s.length>=Number(t(this,J))&&e.preventDefault()}}}t(this,At)&&ninegrid.getByteLength(e.target.value)>=Number(t(this,At))&&e.target.selectionStart==e.target.selectionEnd&&e.preventDefault()}},"#onKeyDown"));if(this.applyBaseStyle(),y(this,bt,this.getAttribute("type")||"text"),y(this,At,this.getAttribute("maxbyte")),y(this,Et,this.getAttribute("min")),y(this,Te,this.getAttribute("max")),y(this,J,this.getAttribute("scale")),!["text","number"].includes(t(this,bt)))throw`invalid type : ${t(this,bt)}`}connectedCallback(){for(var e=[],s=0;s<this.attributes.length;s++)["type","maxlength","maxbyte","min","max","step","scale","text-align"].includes(this.attributes[s].name)&&e.push(`${this.attributes[s].name}="${this.attributes[s].value}"`);this.innerHTML=`
|
|
444
|
+
`,t(this,_).shadowRoot.querySelector("nine-table-sheets").classList.add("nodata");const i=t(this,_).shadowRoot.querySelectorAll("nine-table-sheet");i==null||i.forEach((c,l)=>{e[l]&&setTimeout(()=>{c.generate(e[l]),s&&t(this,Ft).call(this)})})},"#render"));y(this,_,n),t(this,me).call(this)}};_=new WeakMap,me=new WeakMap,Ft=new WeakMap,xe=new WeakMap,d(ts,"LayoutManager");let He=ts;const es=class es{constructor(n){h(this,jt);h(this,wt,-1);T(this,"count",d(()=>t(this,jt).rawRecords.length,"count"));y(this,jt,n)}get at(){return t(this,wt)}set at(n){y(this,wt,parseInt(n,10)),body&&!body.querySelector(`tbody.bindable tr[data-row="${t(this,wt)}"]`)&&setTimeout(()=>{})}};jt=new WeakMap,wt=new WeakMap,d(es,"ngRow");let $e=es;const P=class P{constructor(n,e){h(this,O);h(this,L);h(this,z,[]);h(this,vt,[]);h(this,we,0);h(this,G,[]);h(this,ve,d(()=>{y(this,G,[]);const n=t(this,O).template||[];Array.from(n).forEach(e=>{var s;t(this,G).push(((s=e.getBoundingClientRect)==null?void 0:s.call(e).height)||24)}),(t(this,L).rawRecords||[]).forEach(e=>{e.__ng||(e.__ng=t(this,Ut).call(this)),e.__ng.height=t(this,G).slice()})},"#initialize"));h(this,ft,d(()=>{const n=t(this,O).shadowRoot.querySelector("nine-table-sheets");n==null||n.classList.toggle("nodata",this.length===0),t(this,O).shadowRoot.querySelectorAll("nine-table-sheet").forEach(e=>{e.invalidate()})},"#invalidate"));T(this,"get",d((n,e)=>{var a;const s=this.getValidData();if(!s||s.length<=0)return;if(n==null)return t(this,St).call(this,s);if(n<0||n>=s.length)return null;const o=typeof((a=t(this,O).fields)==null?void 0:a.get)=="function"?t(this,O).fields.get():[];if(e!=null){const r=o.indexOf(e);return r>=0?s[n].v[r]:null}return t(this,St).call(this,s[n])},"get"));T(this,"set",d(n=>{this.clear(),this.add(n,!1),t(this,ft).call(this)},"set"));h(this,Ut,d(()=>({rowState:P.ROW_STATE.EMPTY,deleted:!1,filtered:!1,height:t(this,G).slice(),o:{},c:{},_:[0,0,0,0,P.ROW_STATE.EMPTY,!1,!1,!0,!1,!0,!0,!1,t(this,G).slice(),-1,{},{}]}),"#getDefaultMeta"));T(this,"reset",d(()=>{y(this,z,[]),y(this,vt,[]),t(this,ft).call(this)},"reset"));T(this,"clear",d(()=>{var n;t(this,L).rawRecords=[],y(this,z,[]),y(this,vt,[]),(n=t(this,L).viewRecords)!=null&&n.reset&&t(this,L).viewRecords.reset()},"clear"));h(this,Se,d(n=>{var o;Array.isArray(n)||(n=[n]);const e=typeof((o=t(this,O).fields)==null?void 0:o.get)=="function"?t(this,O).fields.get():Object.keys(n[0]||{}),s=[];return n.forEach(a=>{const r={v:[]};e.forEach(i=>{r.v.push(a[i]!==void 0&&a[i]!==null?a[i]:"")}),s.push(r)}),s},"#json2Array"));h(this,Re,d(n=>(Array.isArray(n)||(n=[n]),n.forEach(e=>{e.__ng=t(this,Ut).call(this),e.__ng.rowid=this.nextId,e.__ng.rowState=P.ROW_STATE.INSERT,e.__ng._[0]=e.__ng.rowid}),n),"#defaultInsert"));T(this,"add",d((n,e=!0)=>{n===void 0&&(n={});const s=t(this,Se).call(this,n);t(this,L).rawRecords=t(this,L).rawRecords.concat(t(this,Re).call(this,s)),this.resetRecords();const o=this.count()-1;return e||s.forEach((a,r)=>{const i=t(this,L).rawRecords[o-r];i&&(i.__ng.rowState=P.ROW_STATE.EMPTY)}),t(this,ft).call(this),o},"add"));T(this,"delete",d(n=>{let e=[];Array.isArray(n)?e=n:typeof n>"u"?e=[t(this,L).host.row.at]:e=[parseInt(n,10)],e.sort((s,o)=>o-s).forEach(s=>{if(t(this,z)[s]){const o=t(this,z)[s].__ng.rowid;t(this,z)[s].__ng.rowState===P.ROW_STATE.INSERT?t(this,L).rawRecords=t(this,L).rawRecords.filter(a=>a.__ng.rowid!==o):t(this,L).rawRecords.forEach(a=>{a.__ng.rowid===o&&(a.__ng.deleted=!0,a.__ng.rowState=P.ROW_STATE.DELETE)})}}),this.resetRecords(),t(this,ft).call(this)},"delete"));T(this,"setValue",d((n,e,s)=>{var c;n=parseInt(n,10);const a=(typeof((c=t(this,O).fields)==null?void 0:c.get)=="function"?t(this,O).fields.get():[]).indexOf(e);if(a<0)return;const r=this.getValidData()[n];if(!r)return;const i=r.v[a];i!==s&&r.__ng.rowState!==P.ROW_STATE.INSERT&&(r.__ng.o.hasOwnProperty(e)||(r.__ng.o[e]=i),r.__ng.rowState=P.ROW_STATE.UPDATE),r.v[a]=s},"setValue"));T(this,"resetRecords",d(()=>{y(this,vt,t(this,L).rawRecords.filter(n=>!n.__ng.deleted)),y(this,z,t(this,L).rawRecords.filter(n=>!n.__ng.deleted&&!n.__ng.filtered)),t(this,L).rawRecords.forEach((n,e)=>{n.__ng.rowidx=e}),t(this,z).forEach((n,e)=>{n.__ng.i=e})},"resetRecords"));T(this,"getValidData",d(()=>(t(this,z).length===0&&t(this,L).rawRecords.length>0&&this.resetRecords(),t(this,z)),"getValidData"));h(this,St,d(n=>{var r;if(!n)return n;const e=!Array.isArray(n),s=e?[n]:n,o=typeof((r=t(this,O).fields)==null?void 0:r.get)=="function"?t(this,O).fields.get():[],a=s.filter(i=>!i.__ng.deleted).map(i=>{const c={};return o.forEach((l,f)=>{c[l]=i.v?i.v[f]:i[l]}),c.__ng=i.__ng,c});return e?a[0]:a},"#conv"));T(this,"count",d(()=>this.getValidData().length,"count"));y(this,O,n),y(this,L,e),t(this,ve).call(this)}get source(){return t(this,St).call(this,t(this,L).rawRecords)}set source(n){this.clear(),this.add(n,!1)}get nextId(){return++vs(this,we)._}get count(){return t(this,z).length}get length(){return t(this,z).length}getRowCount(){return this.length}};O=new WeakMap,L=new WeakMap,z=new WeakMap,vt=new WeakMap,we=new WeakMap,G=new WeakMap,ve=new WeakMap,ft=new WeakMap,Ut=new WeakMap,Se=new WeakMap,Re=new WeakMap,St=new WeakMap,d(P,"ngData"),T(P,"ROW_STATE",{EMPTY:"EMPTY",NORMAL:"NORMAL",INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE"});let Ne=P;const ss=class ss{constructor(n){h(this,ut);y(this,ut,n),this.row=new $e(this),this.data=new Ne(t(this,ut),this),this.rawRecords=[],this.viewRecords=[],this.delRecords=[],this.pageCnt=25,this.viewRecords.reset=()=>{var e;(e=t(this,ut).view)!=null&&e.redraw&&t(this,ut).view.redraw()},this.setDataSource=e=>{this.data&&this.data.reset(),this.rawRecords=[],this.viewRecords=[],this.delRecords=[],this.data.set(e||[])},this.getRowState=e=>{var o,a;const s=parseInt(e,10);if(!(s>=this.data.count()))return(a=(o=this.data.getValidData()[s])==null?void 0:o.__ng)==null?void 0:a.rowState},this.getRowPosition=()=>this.row.at,this.setRowPosition=e=>{this.row.at=e},this.scrollTo_V1=e=>(e<0&&(e=0),e>=this.rawRecords.length&&(e=this.rawRecords.length-1),this.viewRecords.rawIndex=e,this.viewRecords.reset&&this.viewRecords.reset(),!(e<=0||e>=this.rawRecords.length-1)),this.getColumn=(e,s)=>this.data.get(e,s),this.setColumn=(e,s,o)=>{e=parseInt(e,10),this.data.setValue(e,s,o)},this.setDataSource([])}};ut=new WeakMap,d(ss,"ngDataManager");let _e=ss;const ns=class ns{constructor(n){h(this,Rt);h(this,H,[]);T(this,"add",d((n,e="string")=>{n.forEach(s=>{t(this,H).some(o=>o.name===s)||t(this,H).push({name:s,type:e})}),t(this,Vt).call(this)},"add"));h(this,Vt,d(()=>{const n=new Map;t(this,H).forEach(e=>{n.set(e.name,e.type)}),y(this,H,Array.from(n,([e,s])=>({name:e,type:s}))),y(this,H,t(this,H).filter(e=>e.name!==""&&e.name!=="__ng")),t(this,H).sort((e,s)=>e.name.length<s.name.length?1:-1)},"#adjust"));h(this,Ae,d(()=>{y(this,H,[]),x.log(t(this,Rt).querySelectorAll("table"));const n=Array.from(t(this,Rt).querySelectorAll("table"));if(!(!n||n.length===0)){for(const e of n)x.log(e),$("[data-bind]",e).each((s,o)=>{const a=o.dataset.bind,r=o.getAttribute("data-type")||"string";a&&t(this,H).push({name:a,type:r})}),["data-expr","background-color","color","tooltip","visible","readonly","enable-button","enable-check","class-expr","icon-color","icon-src"].forEach(s=>{$(`[${s}]`,e).each((o,a)=>{var r=a.getAttribute(s);if(r.indexOf("data.")<0){const i=r.search(/[(]/g);if(i>0)try{r=String(window[r.substring(0,i).trim()])}catch{r=""}}r.split("data.").forEach(i=>{if(i.trim()!=""){const c=i.search(/[^_A-Za-z0-9]/g);let l="";c>=0?l=i.substring(0,c):r.startsWith("data.")&&(l=i.replace("data.","")),l&&t(this,H).push({name:l,type:"string"})}})})});t(this,Vt).call(this)}},"#init"));y(this,Rt,n),t(this,Ae).call(this)}get(){return t(this,H).map(n=>n.name)}getFields(){return t(this,H)}getType(n){const e=t(this,H).find(s=>s.name===n);return e?e.type:"string"}indexOf(n){return t(this,H).findIndex(e=>e.name===n)}includes(n){return t(this,H).some(e=>e.name===n)}};Rt=new WeakMap,H=new WeakMap,Vt=new WeakMap,Ae=new WeakMap,d(ns,"ngFields");let De=ns;const rs=class rs extends HTMLElement{constructor(){super();h(this,gt);h(this,Ee);h(this,qe,d(()=>{this.fields=new De(this),y(this,Ee,new He(this)),x.log("NineTable connected."),this.dispatchEvent(new CustomEvent("load",{bubbles:!0,detail:{target:this}}))},"#init"));this.attachShadow({mode:"open"}),y(this,gt,new _e(this))}connectedCallback(){t(this,qe).call(this)}disconnectedCallback(){x.log("NineTable disconnected.")}get data(){return t(this,gt).data}get row(){return t(this,gt).row}get dataManager(){return t(this,gt)}};gt=new WeakMap,Ee=new WeakMap,qe=new WeakMap,d(rs,"NineTable");let Oe=rs;customElements.get("nine-table")||customElements.define("nine-table",Oe);const Yt=class Yt extends HTMLElement{constructor(){super()}applyBaseStyle(){this.constructor.name}connectedCallback(){}};d(Yt,"BasicCellElement"),T(Yt,"_styleCache",new Map),T(Yt,"_customStyleCache",new Map);let We=Yt;const hs=class hs extends We{constructor(){super();h(this,I);h(this,Xt);h(this,v);h(this,os);h(this,is);h(this,as);h(this,ls);T(this,"getDisplayText",d(e=>{if(t(this,v))if(t(this,v).closest("tbody")){const s=t(this,v).closest("tr").data,o=parseInt(t(this,v).dataset.row);if(!s)return"";if(ninegrid.isNull(t(this,v).dataset.expr)){if(!ninegrid.isNull(t(this,v).dataset.bind))return s[t(this,v).dataset.bind]||ninegrid.nvl(e,"")}else try{return this.getExprValue(t(this,v).dataset.expr,s,o,t(this,v))}catch{console.error(t(this,v).dataset.expr,s,t(this,v).dataset.row)}return ninegrid.nvl(e,"")}else try{return t(this,I).exprFunction(t(this,v).dataset.expr).call(this,null,-1,t(this,I).data)}catch{}},"getDisplayText"));h(this,cs,d(()=>{if(!(!t(this,I)||!t(this,I).template||!t(this,v).closest("tbody.bindable"))){var e=ninegrid.j.querySelectorAll(t(this,v)).attr("suppress");if(e&&(e=parseInt(e)),e&&!isNaN(e)){var s=t(this,v).closest("tr"),o=[];$("th,td",s).each((w,M)=>{var C=ninegrid.j.querySelectorAll(M).attr("suppress");C&&M.dataset.row&&(C=parseInt(C),!isNaN(C)&&C<=e&&o.push(C))}),o.sort();var a=!1;if(parseInt(s.sectionRowIndex/t(this,I).template.length)>0)for(var r of o){if(r>e)break;var i=parseInt(t(this,v).dataset.row),c=i-1,l=t(this,v).closest("tr").data,f=t(this,I).data.get(c);t(this,v).dataset.matrixRow;var g=t(this,I).body.querySelector(`tbody.bindable [suppress="${r}"][data-matrix-row="${t(this,v).dataset.matrixRow}"]`),b=g.dataset.expr?this.getExprValue(g.dataset.expr,l,i):l[g.dataset.bind],u=g.dataset.expr?this.getExprValue(g.dataset.expr,f,c):f[g.dataset.bind];if(b!=u){a=!0;break}}else a=!0;a?ninegrid.j.querySelectorAll(t(this,v)).removeClass("suppress"):ninegrid.j.querySelectorAll(t(this,v)).addClass("suppress"),ninegrid.j.querySelectorAll(t(this,v)).hasClass("hidden")||(a?ninegrid.j.querySelectorAll(t(this,v)).removeClass("hidden"):ninegrid.j.querySelectorAll(t(this,v)).addClass("hidden"));var p=parseInt(t(this,v).dataset.matrixRow),m=p-1,S=t(this,I).body.querySelector(`tbody.bindable [data-col="${t(this,v).dataset.col}"][data-matrix-row="${m}"]`);$(S).hasClass("suppress")&&!ninegrid.j.querySelectorAll(t(this,v)).hasClass("suppress")?ninegrid.j.querySelectorAll(S).removeClass("last-none-suppress").addClass("last-suppress"):!$(S).hasClass("suppress")&&ninegrid.j.querySelectorAll(t(this,v)).hasClass("suppress")?ninegrid.j.querySelectorAll(S).removeClass("last-suppress").addClass("last-none-suppress"):ninegrid.j.querySelectorAll(S).removeClass("last-none-suppress").removeClass("last-suppress")}}},"#resetSuppress"));T(this,"getExprValue",d((e,s,o,a)=>{if(typeof e<"u")try{o=parseInt(o);const r=e.replace("()","");return t(this,I)[r]?t(this,I)[r].call(this,s,o,t(this,v)):t(this,I).exprFunction(e).call(this,s,o,t(this,I).data)}catch{return["NG-COMBO"].includes(this.tagName)?"":e}else return e},"getExprValue"))}connectedCallback(){super.connectedCallback(),y(this,I,this.getRootNode().host),y(this,v,this.closest("th,td")),y(this,Xt,t(this,v).closest("tr"))}get value(){var e=!t(this,I)||!t(this,I).dataManager||!t(this,v)||!t(this,v).dataset||!t(this,v).dataset.row||!t(this,v).dataset.bind?"":t(this,v).closest("tr").data[t(this,v).dataset.bind];return e??""}set value(e){var s=parseInt(t(this,v).dataset.row);const o=this.getAttribute("update-row-state")!="false";s<0?t(this,I).data.setValueNF(parseInt(t(this,v).dataset.index),t(this,v).dataset.bind,e,o):t(this,I).data.setValue(s,t(this,v).dataset.bind,e,o)}get row(){return parseInt(t(this,v).dataset.row)}get data(){return t(this,v).closest("tr").data}refresh(){const e=t(this,v).dataset.bind;return parseInt(t(this,v).dataset.row),t(this,Xt).data[e]}};I=new WeakMap,Xt=new WeakMap,v=new WeakMap,os=new WeakMap,is=new WeakMap,as=new WeakMap,ls=new WeakMap,cs=new WeakMap,d(hs,"CellElement");let ze=hs;const ds=class ds extends ze{constructor(){super()}connectedCallback(){super.connectedCallback()}refresh(){return super.refresh()}};d(ds,"EditableCellElement");let Be=ds;const us=class us extends Be{constructor(){super();h(this,Kt);h(this,bt);h(this,At);h(this,Et);h(this,Te);h(this,J);T(this,"refresh",d(()=>{const e=super.refresh();t(this,Kt).value=e},"refresh"));h(this,fs,d(e=>{if(!["Escape","Enter","Tab","Home","End","ArrowLeft","ArrowRight","PageUp","PageDown","Backspace","Delete"].includes(e.code)){if(t(this,bt)=="number"){let a=[];if(t(this,J)&&Number(t(this,J))>0&&a.push("."),t(this,Et)&&Number(t(this,Et))>=0&&a.push("-"),!(e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105)&&!a.includes(e.key)&&e.preventDefault(),t(this,J)&&(e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105)&&e.target.selectionStart==e.target.selectionEnd){var s=e.target.value,o=s.indexOf(".");if(o>=0){var s=s.substr(o+1,s.length);s.length>=Number(t(this,J))&&e.preventDefault()}}}t(this,At)&&ninegrid.getByteLength(e.target.value)>=Number(t(this,At))&&e.target.selectionStart==e.target.selectionEnd&&e.preventDefault()}},"#onKeyDown"));if(this.applyBaseStyle(),y(this,bt,this.getAttribute("type")||"text"),y(this,At,this.getAttribute("maxbyte")),y(this,Et,this.getAttribute("min")),y(this,Te,this.getAttribute("max")),y(this,J,this.getAttribute("scale")),!["text","number"].includes(t(this,bt)))throw`invalid type : ${t(this,bt)}`}connectedCallback(){for(var e=[],s=0;s<this.attributes.length;s++)["type","maxlength","maxbyte","min","max","step","scale","text-align"].includes(this.attributes[s].name)&&e.push(`${this.attributes[s].name}="${this.attributes[s].value}"`);this.innerHTML=`
|
|
445
445
|
<input type="text"
|
|
446
446
|
${e.join(" ")}
|
|
447
447
|
ondragstart="return false;"
|
|
448
448
|
>
|
|
449
|
-
`,super.connectedCallback(),y(this,Kt,this.querySelector("input"))}};Kt=new WeakMap,bt=new WeakMap,At=new WeakMap,Et=new WeakMap,Te=new WeakMap,J=new WeakMap,
|
|
449
|
+
`,super.connectedCallback(),y(this,Kt,this.querySelector("input"))}};Kt=new WeakMap,bt=new WeakMap,At=new WeakMap,Et=new WeakMap,Te=new WeakMap,J=new WeakMap,fs=new WeakMap,d(us,"CellInputText");let Pe=us;customElements.get("cell-input-text"),customElements.get("cell-input")||customElements.define("cell-input",Pe)});
|
|
450
450
|
//# sourceMappingURL=nine-table.umd.js.map
|