@ninebone/table 0.0.407 → 0.0.408

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(m,p){typeof exports=="object"&&typeof module<"u"?p(require("@ninebone/util")):typeof define=="function"&&define.amd?define(["@ninebone/util"],p):(m=typeof globalThis<"u"?globalThis:m||self,p(m.NineboneUtil))})(this,function(m){"use strict";var pe=Object.defineProperty;var me=m=>{throw TypeError(m)};var we=(m,p,v)=>p in m?pe(m,p,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[p]=v;var a=(m,p)=>pe(m,"name",{value:p,configurable:!0});var S=(m,p,v)=>we(m,typeof p!="symbol"?p+"":p,v),xe=(m,p,v)=>p.has(m)||me("Cannot "+v);var t=(m,p,v)=>(xe(m,p,"read from private field"),v?v.call(m):p.get(m)),c=(m,p,v)=>p.has(m)?me("Cannot add the same private member more than once"):p instanceof WeakSet?p.add(m):p.set(m,v),g=(m,p,v,z)=>(xe(m,p,"write to private field"),z?z.call(m,v):p.set(m,v),v);var ve=(m,p,v,z)=>({set _(ht){g(m,p,ht,v)},get _(){return t(m,p,z)}});var _,D,x,U,X,j,At,F,Tt,B,tt,N,R,dt,ft,qt,kt,et,W,E,O,k,P,K,V,it,Lt,Ht,Ct,ut,gt,Mt,_t,bt,$t,st,yt,It,nt,Z,Wt,Ot,zt,Dt,Bt,Nt,mt,L,Pt,xt,Vt,vt,ot,H,A,C,rt,Yt,Y,Ut,G,wt,Xt,jt,lt,J,at,T,St,Ft,Q,Kt,Zt;const re=class re extends m.trace.constructor{constructor(){super(),this.init("nine-table","green")}};a(re,"Trace");let p=re;const v=new p,le=class le extends HTMLElement{constructor(){super();c(this,_);c(this,D,!1);c(this,x);c(this,U);c(this,X);c(this,j);c(this,At,a(()=>{if(!t(this,_))return;const e=t(this,_).querySelector(".ng-container-body");e&&(g(this,j,new ResizeObserver(()=>{this.refresh()})),t(this,j).observe(e))},"#observeResize"));S(this,"refresh",a(()=>{if(!t(this,_)||!t(this,x)||t(this,D))return;const e=t(this,x).container,s=e.querySelector("table");if(!s)return;const o=t(this,x).track,r=t(this,x).thumb,n=t(this,_).querySelector(".ng-container-bottom"),l=e.clientWidth,d=s.scrollWidth;if(l!==0&&d>l)n&&(n.style.display="flex");else{n&&(n.style.display="none");return}const h=o.clientWidth;if(h<=0)return;const f=Math.max(Math.min(h*(l/d),h),20);r.style.width=`${f}px`;const u=e.scrollLeft,b=d-l;let y=0;b>0&&(y=parseInt(u/b*(h-f),10)),y<0&&(y=0);const w=h-f;y>w&&(y=w),r.style.left=`${y}px`,v.log(y),t(this,x).left.disabled=y===0,t(this,x).right.disabled=y>=w-1},"refresh"));c(this,F,a(e=>{if(!t(this,x))return!1;const s=t(this,x).container,o=s.querySelector("table");if(!o)return!1;const r=t(this,x).track.getBoundingClientRect(),n=t(this,x).thumb.clientWidth;let l=e;l<0&&(l=0);const d=r.width-n;l>d&&(l=d),l=parseInt(l,10),t(this,x).thumb.style.left=`${l}px`,t(this,x).left.disabled=l===0,t(this,x).right.disabled=l>=d-1;const h=s.clientWidth,u=o.scrollWidth-h;return d>0&&u>0&&(s.scrollLeft=l/d*u),l>0&&l<d-1},"#thumbMoveTo"));c(this,Tt,a(()=>{const e=a(o=>{clearInterval(t(this,U)),clearInterval(t(this,X));const r=parseInt(t(this,x).thumb.style.left||0,10);t(this,F).call(this,r+o),g(this,U,setInterval(()=>{clearInterval(t(this,U)),g(this,X,setInterval(()=>{const n=parseInt(t(this,x).thumb.style.left||0,10);t(this,F).call(this,n+o)||clearInterval(t(this,X))},50))},500))},"delayScroll"),s=a(()=>{clearInterval(t(this,U)),clearInterval(t(this,X))},"clearTimer");["mouseup","mouseleave","touchend"].forEach(o=>{t(this,x).left.addEventListener(o,s),t(this,x).right.addEventListener(o,s),t(this,x).track.addEventListener(o,s)}),t(this,x).left.addEventListener("mousedown",o=>{o.button===0&&e(-20)}),t(this,x).right.addEventListener("mousedown",o=>{o.button===0&&e(20)}),t(this,x).left.addEventListener("touchstart",()=>e(-20)),t(this,x).right.addEventListener("touchstart",()=>e(20)),t(this,x).track.addEventListener("mousedown",o=>{if(o.button!==0)return;o.preventDefault();const r=t(this,x).track.getBoundingClientRect(),n=t(this,x).thumb.clientWidth;t(this,F).call(this,o.clientX-r.left-n/2)}),t(this,x).thumb.addEventListener("mousedown",o=>{if(o.button!==0)return;o.stopPropagation(),o.preventDefault(),g(this,D,!0),this.shiftX=o.clientX-t(this,x).thumb.getBoundingClientRect().left;const r=a(l=>{if(!t(this,D))return;const d=t(this,x).track.getBoundingClientRect();t(this,F).call(this,l.clientX-d.left-this.shiftX)},"onMouseMove"),n=a(()=>{g(this,D,!1),s(),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),this.refresh()},"onMouseUp");document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)})},"#init"))}connectedCallback(){if(g(this,_,this.closest("nine-table-sheet")||this.getRootNode().host),!t(this,_))return;this.innerHTML=`
1
+ (function(m,p){typeof exports=="object"&&typeof module<"u"?p(require("@ninebone/util")):typeof define=="function"&&define.amd?define(["@ninebone/util"],p):(m=typeof globalThis<"u"?globalThis:m||self,p(m.NineboneUtil))})(this,function(m){"use strict";var pe=Object.defineProperty;var me=m=>{throw TypeError(m)};var we=(m,p,v)=>p in m?pe(m,p,{enumerable:!0,configurable:!0,writable:!0,value:v}):m[p]=v;var a=(m,p)=>pe(m,"name",{value:p,configurable:!0});var S=(m,p,v)=>we(m,typeof p!="symbol"?p+"":p,v),xe=(m,p,v)=>p.has(m)||me("Cannot "+v);var t=(m,p,v)=>(xe(m,p,"read from private field"),v?v.call(m):p.get(m)),c=(m,p,v)=>p.has(m)?me("Cannot add the same private member more than once"):p instanceof WeakSet?p.add(m):p.set(m,v),g=(m,p,v,D)=>(xe(m,p,"write to private field"),D?D.call(m,v):p.set(m,v),v);var ve=(m,p,v,D)=>({set _(ht){g(m,p,ht,v)},get _(){return t(m,p,D)}});var _,B,x,U,X,j,At,F,Tt,N,tt,z,R,dt,ft,qt,kt,et,W,E,O,k,P,K,V,it,Lt,Ht,Ct,ut,gt,Mt,_t,bt,$t,st,yt,It,nt,Z,Wt,Ot,zt,Dt,Bt,Nt,mt,L,Pt,xt,Vt,vt,ot,H,A,C,rt,Yt,Y,Ut,G,wt,Xt,jt,lt,J,at,T,St,Ft,Q,Kt,Zt;const re=class re extends m.trace.constructor{constructor(){super(),this.init("nine-table","green")}};a(re,"Trace");let p=re;const v=new p,le=class le extends HTMLElement{constructor(){super();c(this,_);c(this,B,!1);c(this,x);c(this,U);c(this,X);c(this,j);c(this,At,a(()=>{if(!t(this,_))return;const e=t(this,_).querySelector(".ng-container-body");e&&(g(this,j,new ResizeObserver(()=>{this.refresh()})),t(this,j).observe(e))},"#observeResize"));S(this,"refresh",a(()=>{if(!t(this,_)||!t(this,x)||t(this,B))return;const e=t(this,x).container,s=e.querySelector("table");if(!s)return;const o=t(this,x).track,r=t(this,x).thumb,n=t(this,_).querySelector(".ng-container-bottom"),l=e.clientWidth,d=s.scrollWidth;if(l!==0&&d>l)n&&(n.style.display="flex");else{n&&(n.style.display="none");return}const h=o.clientWidth;if(h<=0)return;const f=Math.max(Math.min(h*(l/d),h),20);r.style.width=`${f}px`;const u=e.scrollLeft,b=d-l;let y=0;b>0&&(y=parseInt(u/b*(h-f),10)),y<0&&(y=0);const w=h-f;y>w&&(y=w),r.style.left=`${y}px`,v.log(y),t(this,x).left.disabled=y===0,t(this,x).right.disabled=y>=w-1},"refresh"));c(this,F,a(e=>{if(!t(this,x))return!1;const s=t(this,x).container,o=s.querySelector("table");if(!o)return!1;const r=t(this,x).track.getBoundingClientRect(),n=t(this,x).thumb.clientWidth;let l=e;l<0&&(l=0);const d=r.width-n;l>d&&(l=d),l=parseInt(l,10),t(this,x).thumb.style.left=`${l}px`,t(this,x).left.disabled=l===0,t(this,x).right.disabled=l>=d-1;const h=s.clientWidth,u=o.scrollWidth-h;return d>0&&u>0&&(s.scrollLeft=l/d*u),l>0&&l<d-1},"#thumbMoveTo"));c(this,Tt,a(()=>{const e=a(o=>{clearInterval(t(this,U)),clearInterval(t(this,X));const r=parseInt(t(this,x).thumb.style.left||0,10);t(this,F).call(this,r+o),g(this,U,setInterval(()=>{clearInterval(t(this,U)),g(this,X,setInterval(()=>{const n=parseInt(t(this,x).thumb.style.left||0,10);t(this,F).call(this,n+o)||clearInterval(t(this,X))},50))},500))},"delayScroll"),s=a(()=>{clearInterval(t(this,U)),clearInterval(t(this,X))},"clearTimer");["mouseup","mouseleave","touchend"].forEach(o=>{t(this,x).left.addEventListener(o,s),t(this,x).right.addEventListener(o,s),t(this,x).track.addEventListener(o,s)}),t(this,x).left.addEventListener("mousedown",o=>{o.button===0&&e(-20)}),t(this,x).right.addEventListener("mousedown",o=>{o.button===0&&e(20)}),t(this,x).left.addEventListener("touchstart",()=>e(-20)),t(this,x).right.addEventListener("touchstart",()=>e(20)),t(this,x).track.addEventListener("mousedown",o=>{if(o.button!==0)return;o.preventDefault();const r=t(this,x).track.getBoundingClientRect(),n=t(this,x).thumb.clientWidth;t(this,F).call(this,o.clientX-r.left-n/2)}),t(this,x).thumb.addEventListener("mousedown",o=>{if(o.button!==0)return;o.stopPropagation(),o.preventDefault(),g(this,B,!0),this.shiftX=o.clientX-t(this,x).thumb.getBoundingClientRect().left;const r=a(l=>{if(!t(this,B))return;const d=t(this,x).track.getBoundingClientRect();t(this,F).call(this,l.clientX-d.left-this.shiftX)},"onMouseMove"),n=a(()=>{g(this,B,!1),s(),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),this.refresh()},"onMouseUp");document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)})},"#init"))}connectedCallback(){if(g(this,_,this.closest("nine-table-sheet")||this.getRootNode().host),!t(this,_))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=a(()=>{const s=t(this,_).querySelector(".ng-container-body");if(!s){setTimeout(e,10);return}g(this,x,{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,D)||this.refresh()}),t(this,Tt).call(this),t(this,At).call(this),this.refresh()},"initWhenReady");e()}disconnectedCallback(){t(this,j)&&t(this,j).disconnect()}};_=new WeakMap,D=new WeakMap,x=new WeakMap,U=new WeakMap,X=new WeakMap,j=new WeakMap,At=new WeakMap,F=new WeakMap,Tt=new WeakMap,a(le,"NineTableHScrollBar");let z=le;customElements.get("nine-table-hscrollbar")||customElements.define("nine-table-hscrollbar",z);const ae=class ae extends HTMLElement{constructor(){super();c(this,B);c(this,tt);c(this,N,!1);c(this,R);c(this,dt,0);c(this,ft,0);S(this,"refresh",a(()=>{if(v.log("refresh"),!t(this,B)||!t(this,R)||t(this,N))return;v.log("refresh2");const e=t(this,R).container,s=t(this,R).track,o=t(this,R).thumb,r=e.clientHeight,l=(t(this,B).data.get()||[]).length,d=t(this,tt).getRowHeight(),h=l*d;if(h<=r){o.style.display="none",t(this,R).top.disabled=!0,t(this,R).bottom.disabled=!0;return}else o.style.display="block";const f=s.clientHeight;if(v.log(s,f,this,this.clientHeight),f<=0)return;const u=Math.max(Math.min(f*(r/h),f),20);o.style.height=`${u}px`;const b=e.scrollTop,y=Math.max(h-r,1);let w=0;y>0&&(w=b/y*(f-u));const q=f-u;w<0&&(w=0),w>q&&(w=q),o.style.top=`${w}px`,v.log(w),t(this,R).top.disabled=b<=0,t(this,R).bottom.disabled=b>=y-1},"refresh"));c(this,qt,a(()=>{const e=t(this,R).container,s=a(()=>{const r=(t(this,B).data.get()||[]).length,n=t(this,tt).getRowHeight();return r*n},"getContentHeight");e.addEventListener("scroll",()=>{t(this,N)||this.refresh()}),t(this,R).thumb.addEventListener("mousedown",o=>{if(o.button!==0)return;o.stopPropagation(),o.preventDefault(),g(this,N,!0),g(this,dt,o.clientY),g(this,ft,e.scrollTop);const r=a(l=>{if(!t(this,N))return;const d=t(this,R).track.getBoundingClientRect(),h=t(this,R).thumb.clientHeight,u=d.height-h,b=l.clientY-t(this,dt),y=e.clientHeight,w=s(),q=Math.max(w-y,1);if(u>0&&q>0){const ct=b/u*q;let Et=t(this,ft)+ct;const ye=Math.max(0,w-y);Et<0&&(Et=0),Et>ye&&(Et=ye),e.scrollTop=Et}this.refresh()},"onMouseMove"),n=a(()=>{g(this,N,!1),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),this.refresh()},"onMouseUp");document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)}),t(this,R).track.addEventListener("mousedown",o=>{if(o.button!==0||o.target===t(this,R).thumb)return;const r=t(this,R).track.getBoundingClientRect(),n=t(this,R).thumb.clientHeight,l=o.clientY-r.top-n/2,h=r.height-n,f=e.clientHeight,u=s(),b=Math.max(u-f,1);if(h>0&&b>0){const y=Math.max(0,Math.min(1,l/h));e.scrollTop=y*b}this.refresh()}),t(this,R).top.addEventListener("click",()=>{e.scrollTop-=40}),t(this,R).bottom.addEventListener("click",()=>{e.scrollTop+=40})},"#init"))}connectedCallback(){g(this,B,this.getRootNode().host),g(this,tt,this.closest("nine-table-sheet")),this.innerHTML=`
63
+ `;const e=a(()=>{const s=t(this,_).querySelector(".ng-container-body");if(!s){setTimeout(e,10);return}g(this,x,{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,B)||this.refresh()}),t(this,Tt).call(this),t(this,At).call(this),this.refresh()},"initWhenReady");e()}disconnectedCallback(){t(this,j)&&t(this,j).disconnect()}};_=new WeakMap,B=new WeakMap,x=new WeakMap,U=new WeakMap,X=new WeakMap,j=new WeakMap,At=new WeakMap,F=new WeakMap,Tt=new WeakMap,a(le,"NineTableHScrollBar");let D=le;customElements.get("nine-table-hscrollbar")||customElements.define("nine-table-hscrollbar",D);const ae=class ae extends HTMLElement{constructor(){super();c(this,N);c(this,tt);c(this,z,!1);c(this,R);c(this,dt,0);c(this,ft,0);S(this,"refresh",a(()=>{if(v.log("refresh",t(this,z)),!t(this,N)||!t(this,R)||t(this,z))return;v.log("refresh2");const e=t(this,R).container,s=t(this,R).track,o=t(this,R).thumb,r=e.clientHeight,l=(t(this,N).data.get()||[]).length,d=t(this,tt).getRowHeight(),h=l*d;if(h<=r){o.style.display="none",t(this,R).top.disabled=!0,t(this,R).bottom.disabled=!0;return}else o.style.display="block";const f=s.clientHeight;if(v.log(s,f,this,this.clientHeight),f<=0)return;const u=Math.max(Math.min(f*(r/h),f),20);o.style.height=`${u}px`;const b=e.scrollTop,y=Math.max(h-r,1);let w=0;y>0&&(w=b/y*(f-u));const q=f-u;w<0&&(w=0),w>q&&(w=q),o.style.top=`${w}px`,v.log(w),t(this,R).top.disabled=b<=0,t(this,R).bottom.disabled=b>=y-1},"refresh"));c(this,qt,a(()=>{const e=t(this,R).container,s=a(()=>{const r=(t(this,N).data.get()||[]).length,n=t(this,tt).getRowHeight();return r*n},"getContentHeight");e.addEventListener("scroll",()=>{t(this,z)||this.refresh()}),t(this,R).thumb.addEventListener("mousedown",o=>{if(o.button!==0)return;o.stopPropagation(),o.preventDefault(),g(this,z,!0),g(this,dt,o.clientY),g(this,ft,e.scrollTop);const r=a(l=>{if(!t(this,z))return;const d=t(this,R).track.getBoundingClientRect(),h=t(this,R).thumb.clientHeight,u=d.height-h,b=l.clientY-t(this,dt),y=e.clientHeight,w=s(),q=Math.max(w-y,1);if(u>0&&q>0){const ct=b/u*q;let Et=t(this,ft)+ct;const ye=Math.max(0,w-y);Et<0&&(Et=0),Et>ye&&(Et=ye),e.scrollTop=Et}this.refresh()},"onMouseMove"),n=a(()=>{g(this,z,!1),document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),this.refresh()},"onMouseUp");document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)}),t(this,R).track.addEventListener("mousedown",o=>{if(o.button!==0||o.target===t(this,R).thumb)return;const r=t(this,R).track.getBoundingClientRect(),n=t(this,R).thumb.clientHeight,l=o.clientY-r.top-n/2,h=r.height-n,f=e.clientHeight,u=s(),b=Math.max(u-f,1);if(h>0&&b>0){const y=Math.max(0,Math.min(1,l/h));e.scrollTop=y*b}this.refresh()}),t(this,R).top.addEventListener("click",()=>{e.scrollTop-=40}),t(this,R).bottom.addEventListener("click",()=>{e.scrollTop+=40})},"#init"))}connectedCallback(){g(this,N,this.getRootNode().host),g(this,tt,this.closest("nine-table-sheet")),this.innerHTML=`
64
64
  <style>
65
65
  nine-table-vscrollbar {
66
66
  display: flex;
@@ -124,7 +124,7 @@
124
124
  <button class='ng-scroll-top' disabled><div class='ng-scroll-icon'></div></button>
125
125
  <div class='ng-scroll-track'><div class='ng-scroll-thumb'></div></div>
126
126
  <button class='ng-scroll-bottom' disabled><div class='ng-scroll-icon'></div></button>
127
- `;const e=a(()=>{const s=t(this,B).shadowRoot.querySelector(".ng-container-body");if(!s){setTimeout(e,10);return}g(this,R,{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,qt).call(this),this.refresh()},"initWhenReady");e()}};B=new WeakMap,tt=new WeakMap,N=new WeakMap,R=new WeakMap,dt=new WeakMap,ft=new WeakMap,qt=new WeakMap,a(ae,"NineTableVScrollBar");let ht=ae;customElements.get("nine-table-vscrollbar")||customElements.define("nine-table-vscrollbar",ht);const I=class I{static compileAll(i){return Array.isArray(i)?i.map(e=>I.compile(e)):[]}static compile(i){var o,r,n,l;if(!i)return null;const e=i.cloneNode(!0);return t(o=I,kt).call(o,e),t(r=I,et).call(r,e,"thead"),t(n=I,et).call(n,e,"tbody"),t(l=I,et).call(l,e,"tfoot"),Array.from(e.querySelectorAll("colgroup col")).forEach((d,h)=>{const f=d.getAttribute("fixed");f&&e.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach(u=>{u.setAttribute("fixed",f)})}),e}};kt=new WeakMap,et=new WeakMap,a(I,"TableCompiler"),c(I,kt,a(i=>{if(!i.querySelector("colgroup")){const e=i.querySelector("tbody tr")||i.querySelector("tr"),s=e?e.querySelectorAll("th, td").length:1,o=document.createElement("colgroup"),r=Math.max(Math.floor(i.clientWidth/s),100);for(let n=0;n<s;n++){const l=document.createElement("col");l.setAttribute("width",r),o.appendChild(l)}i.prepend(o)}if(!i.querySelector("thead")){const e=document.createElement("thead"),s=i.querySelector("colgroup");s?s.after(e):i.prepend(e)}i.classList.add("nine-table-element"),i.style.display="table"},"#ensureTableStructure")),c(I,et,a((i,e)=>{const s=Array.from(i.querySelectorAll(e+" tr")),o=Array.from(i.querySelectorAll(e+" th,"+e+" td")),r=s.length;if(r===0||o.length===0)return;let n=0;o.forEach(d=>{n+=d.colSpan||1});const l=Array.from(Array(r),()=>Array(n).fill(null));s.forEach(d=>{const h=d.sectionRowIndex;let f=0;Array.from(d.querySelectorAll("th,td")).forEach(u=>{for(let w=0;w<l[h].length;w++)if(l[h][w]===null){f=w;break}const b=u.rowSpan||1,y=u.colSpan||1;for(let w=0;w<b;w++)for(let q=0;q<y;q++)h+w<r&&f+q<n&&(l[h+w][f+q]=w===0&&q===0?"1":"0")})}),s.forEach(d=>{const h=d.sectionRowIndex;Array.from(d.querySelectorAll("th,td")).forEach(f=>{for(let u=0;u<l[h].length;u++)if(l[h][u]==="1"){f.dataset.col=u,l[h][u]="0";break}})})},"#resetColIndex"));let Gt=I;const ce=class ce{constructor(i){c(this,W);c(this,E);c(this,O,new Map);c(this,k,null);c(this,P,null);c(this,K,0);c(this,V,40);c(this,it,!1);c(this,Lt,3);S(this,"refresh",a(()=>{var e;const i=t(this,E).querySelector(".ng-container-body");i&&(t(this,ut).call(this),t(this,st).call(this,i.scrollTop),(e=t(this,E).querySelector("nine-table-vscrollbar"))==null||e.refresh())},"refresh"));S(this,"initialize",a(()=>{g(this,k,null),t(this,O).clear(),[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(o=>{const r=t(this,E).querySelector(o);if(!r)return;const n=r.querySelector("table");if(!n)return;const l=n.querySelector("tbody.bindable-tbody");if(!l)return;const h=Array.from(l.querySelectorAll("tr")).map(f=>f.cloneNode(!0));t(this,O).set(o,h)});const i=t(this,E).querySelector(".ng-container-body"),e=t(this,E).querySelector(".ng-container-left"),s=t(this,E).querySelector(".ng-container-right");if(i){t(this,Ct).call(this,i),t(this,bt).call(this),t(this,ut).call(this),t(this,st).call(this,i.scrollTop);let o=i.scrollTop;const r=a(n=>{var l;e&&e.scrollTop!==n&&(e.scrollTop=n),s&&s.scrollTop!==n&&(s.scrollTop=n),t(this,st).call(this,n),(l=t(this,E).querySelector("nine-table-vscrollbar"))==null||l.refresh()},"syncScroll");i.addEventListener("scroll",()=>{const n=i.scrollTop;o!==n&&(o=n,r(n))})}},"initialize"));c(this,Ht,a((i,e)=>{const s=t(this,O).get(e);if(!s||s.length===0)return;const o=i.querySelector("tbody.bindable-tbody");if(!o)return;o.querySelectorAll("tr:not(.nodata)").forEach(l=>l.remove());const r=o.querySelector("tr.nodata"),n=document.createDocumentFragment();for(let l=0;l<t(this,V);l++)s.forEach(d=>{n.appendChild(d.cloneNode(!0))});r?r.before(n):o.appendChild(n)},"#renderRows"));c(this,Ct,a(i=>{if(t(this,k)!==null&&t(this,k)>0)return t(this,k);const e=t(this,O).get(".ng-container-body");if(!e||e.length===0)return 24;const s=i.querySelector("tbody.bindable-tbody")||i.querySelector("tbody.bindable-tbody:last-of-type");if(!s)return 24;s.querySelectorAll("tr:not(.nodata)").forEach(b=>b.remove());const o=s.querySelector("tr.nodata"),r=document.createDocumentFragment();e.forEach(b=>{r.appendChild(b.cloneNode(!0))}),o?o.before(r):s.appendChild(r);const n=t(this,E),l=n.style.display,d=n.style.visibility,h=n.style.position;(l==="none"||window.getComputedStyle(n).display==="none")&&(n.style.display="block",n.style.visibility="hidden",n.style.position="absolute");let f=0;const u=s.querySelectorAll("tr:not(.nodata)");return u.forEach(b=>{f+=b.offsetHeight||b.getBoundingClientRect().height}),u.forEach(b=>b.remove()),n.style.display=l,n.style.visibility=d,n.style.position=h,g(this,k,f>0?f:24),t(this,gt).call(this),t(this,k)},"#measureAndCacheHeight"));c(this,ut,a(()=>{if(!t(this,E).querySelector(".ng-container-body"))return;const s=(t(this,W).data.get()||[]).length,o=t(this,k)||24,r=s*o;v.log(`[VirtualHeight] totalCount: ${s}, rowHeight: ${o}, totalVirtualHeight: ${r}`),[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(n=>{const l=t(this,E).querySelector(n),d=l==null?void 0:l.querySelector("table");d&&(d.style.height=`${r}px`)})},"#updateVirtualScrollHeight"));c(this,gt,a(()=>{if((t(this,W).data.get()||[]).length,t(this,K)>0&&t(this,k)>0){const e=Math.ceil(t(this,K)/t(this,k));g(this,V,e+t(this,Lt)),v.log("visibleRows:",e,"cachedRowCount:",t(this,V))}},"#updateRowCount"));c(this,Mt,a(()=>{var d,h,f;const i=t(this,E).querySelector(".ng-container-left table"),e=t(this,E).querySelector(".ng-container-body table"),s=t(this,E).querySelector(".ng-container-right table");if(!e)return;const o=i?Array.from(i.querySelectorAll("tr")):[],r=Array.from(e.querySelectorAll("tr")),n=s?Array.from(s.querySelectorAll("tr")):[],l=Math.max(o.length,r.length,n.length);for(let u=0;u<l;u++){const b=[((d=o[u])==null?void 0:d.getBoundingClientRect().height)||0,((h=r[u])==null?void 0:h.getBoundingClientRect().height)||0,((f=n[u])==null?void 0:f.getBoundingClientRect().height)||0],y=Math.max(...b);y>0&&(o[u]&&(o[u].style.height=`${y}px`),r[u]&&(r[u].style.height=`${y}px`),n[u]&&(n[u].style.height=`${y}px`))}},"#syncRowHeights"));c(this,_t,a(()=>{!t(this,E)||!(t(this,E)instanceof HTMLElement)||(g(this,P,new ResizeObserver(i=>{for(const e of i){const s=e.target;if(!s.classList.contains("active"))continue;const o=e.contentRect.height;if(o>0){let r=0;const n=s.querySelector("thead");n&&(r+=n.offsetHeight||n.getBoundingClientRect().height);const l=Math.max(o-r,100);t(this,K)!==l&&(g(this,K,l),t(this,gt).call(this),t(this,k)!==null&&t(this,bt).call(this))}}})),t(this,P).observe(t(this,E)))},"#initResizeObserver"));c(this,bt,a(()=>{[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(i=>{const e=t(this,E).querySelector(i);e&&e.querySelector("tbody.bindable-tbody")&&t(this,Ht).call(this,e,i)}),t(this,Mt).call(this)},"#renderAllContainers"));c(this,$t,a(i=>{[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(e=>{var h;const s=t(this,E).querySelector(e);if(!s)return;const o=s.querySelector("tbody.bindable-tbody");if(!o)return;const r=Array.from(o.querySelectorAll("tr:not(.nodata)")),n=((h=t(this,O).get(e))==null?void 0:h.length)||1,d=(t(this,W).data.get()||[]).length;r.forEach((f,u)=>{const b=i+Math.floor(u/n);if(b>=d){f.style.display="none";return}const y=t(this,W).data.get(b);f.style.display="",t(this,yt).call(this,f,y,b)})})},"#adjustBufferRows"));c(this,st,a(i=>{var d;const e=t(this,k);if(!e||e<=0)return;const o=(t(this,W).data.get()||[]).length,r=Math.max(0,Math.floor(i/e)),n=((d=t(this,O).get(".ng-container-body"))==null?void 0:d.length)||1,l=r+t(this,V);v.log(`[Scroll] scrollTop: ${i}, startIndex: ${r}, cachedRowCount: ${t(this,V)}, targetDataIndex range: ${r} ~ ${l} (Total: ${o})`),[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(h=>{const f=t(this,E).querySelector(h);if(!f)return;const u=f.querySelector("tbody.bindable-tbody");if(!u)return;Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((y,w)=>{const q=r+Math.floor(w/n);if(q>=o){y.style.display="none";return}const ct=t(this,W).data.get(q);y.style.display="",t(this,yt).call(this,y,ct,q)})}),t(this,it)||(g(this,it,!0),setTimeout(()=>{t(this,$t).call(this,r),g(this,it,!1)},0))},"#handleScroll"));c(this,yt,a((i,e,s)=>{i.dataset.row=s,Array.from(i.cells).forEach((o,r)=>{const n=o.dataset.bind;n&&e&&e[n]!==void 0?o.textContent=e[n]:o.textContent=e?e[Object.keys(e)[r]]??`R${s}C${r}`:`행 ${s+1}`,o.dataset.row=s})},"#bindRowData"));S(this,"destroy",a(()=>{t(this,P)&&(t(this,P).disconnect(),g(this,P,null))},"destroy"));g(this,W,i.getRootNode().host),g(this,E,i),t(this,_t).call(this)}getRowHeight(){return t(this,k)}templateLength(i=".ng-container-body"){var e;return((e=t(this,O).get(i))==null?void 0:e.length)||1}};W=new WeakMap,E=new WeakMap,O=new WeakMap,k=new WeakMap,P=new WeakMap,K=new WeakMap,V=new WeakMap,it=new WeakMap,Lt=new WeakMap,Ht=new WeakMap,Ct=new WeakMap,ut=new WeakMap,gt=new WeakMap,Mt=new WeakMap,_t=new WeakMap,bt=new WeakMap,$t=new WeakMap,st=new WeakMap,yt=new WeakMap,a(ce,"RowManager");let Jt=ce;const pt=class pt extends HTMLElement{constructor(){super();c(this,It);c(this,nt,null);c(this,Z);S(this,"invalidate",a(()=>{t(this,Z).refresh()},"invalidate"));c(this,Wt,a(()=>{[{selector:".ng-container-body",type:null},{selector:".ng-container-left",type:"left"},{selector:".ng-container-right",type:"right"}].forEach(({selector:s,type:o})=>{const r=this.querySelector(s);if(!r)return;const n=t(this,zt).call(this,t(this,nt),o);r.innerHTML="",r.appendChild(n)})},"#renderSplitContainers"));c(this,Ot,a(()=>{["left","right"].forEach(e=>{const s=this.querySelector(`.ng-container-${e}`),o=s==null?void 0:s.querySelector("table");if(!s||!o)return;let r=0;o.querySelectorAll("col").forEach(n=>{const l=parseInt(n.getAttribute("width"),10);isNaN(r)||(r+=l)}),s.style.flex=`0 0 ${r}px`,s.style.width=`${r}px`})},"#updateContainerWidths"));S(this,"generate",a(e=>{e&&(g(this,nt,Gt.compile(e)),t(this,nt).style.display="table",t(this,Wt).call(this),t(this,Ot).call(this),requestAnimationFrame(()=>{var o;const s=(o=this.querySelector("thead"))==null?void 0:o.getBoundingClientRect().height;this.querySelectorAll("tbody.fixed-tbody").forEach(r=>{r.style.top=`${s}px`})}),t(this,Z).initialize(),setTimeout(()=>{var s;(s=this.querySelector("nine-table-hscrollbar"))==null||s.refresh()},0))},"generate"));c(this,zt,a((e,s)=>{const o=e.cloneNode(!0),r=o.querySelector("tbody");if(r){const n=document.createElement("tbody");n.className="fixed-tbody",r.className="bindable-tbody",r.before(n)}return s==="left"?o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach(n=>{n.getAttribute("fixed")!=="left"&&n.remove()}):s==="right"?o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach(n=>{n.getAttribute("fixed")!=="right"&&n.remove()}):o.querySelectorAll("[fixed=left], [fixed=right]").forEach(n=>{n.remove()}),o},"#createSplitTable"));S(this,"getRowHeight",a(()=>t(this,Z).getRowHeight(),"getRowHeight"));S(this,"scrollToX",a(e=>{const s=this.querySelector(".ng-container-body");s&&(s.scrollLeft=e)},"scrollToX"));S(this,"scrollToY",a(e=>{const s=this.querySelector(".ng-container-body");s&&(s.scrollTop=e)},"scrollToY"));c(this,Dt,a(()=>{t(this,Bt).call(this)},"#init"));c(this,Bt,a(()=>{const e=pt.SCROLLBAR_SIZE;this.innerHTML=`
127
+ `;const e=a(()=>{const s=t(this,N).shadowRoot.querySelector(".ng-container-body");if(!s){setTimeout(e,10);return}g(this,R,{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,qt).call(this),this.refresh()},"initWhenReady");e()}};N=new WeakMap,tt=new WeakMap,z=new WeakMap,R=new WeakMap,dt=new WeakMap,ft=new WeakMap,qt=new WeakMap,a(ae,"NineTableVScrollBar");let ht=ae;customElements.get("nine-table-vscrollbar")||customElements.define("nine-table-vscrollbar",ht);const I=class I{static compileAll(i){return Array.isArray(i)?i.map(e=>I.compile(e)):[]}static compile(i){var o,r,n,l;if(!i)return null;const e=i.cloneNode(!0);return t(o=I,kt).call(o,e),t(r=I,et).call(r,e,"thead"),t(n=I,et).call(n,e,"tbody"),t(l=I,et).call(l,e,"tfoot"),Array.from(e.querySelectorAll("colgroup col")).forEach((d,h)=>{const f=d.getAttribute("fixed");f&&e.querySelectorAll(`thead [data-col="${h}"], tbody [data-col="${h}"], tfoot [data-col="${h}"]`).forEach(u=>{u.setAttribute("fixed",f)})}),e}};kt=new WeakMap,et=new WeakMap,a(I,"TableCompiler"),c(I,kt,a(i=>{if(!i.querySelector("colgroup")){const e=i.querySelector("tbody tr")||i.querySelector("tr"),s=e?e.querySelectorAll("th, td").length:1,o=document.createElement("colgroup"),r=Math.max(Math.floor(i.clientWidth/s),100);for(let n=0;n<s;n++){const l=document.createElement("col");l.setAttribute("width",r),o.appendChild(l)}i.prepend(o)}if(!i.querySelector("thead")){const e=document.createElement("thead"),s=i.querySelector("colgroup");s?s.after(e):i.prepend(e)}i.classList.add("nine-table-element"),i.style.display="table"},"#ensureTableStructure")),c(I,et,a((i,e)=>{const s=Array.from(i.querySelectorAll(e+" tr")),o=Array.from(i.querySelectorAll(e+" th,"+e+" td")),r=s.length;if(r===0||o.length===0)return;let n=0;o.forEach(d=>{n+=d.colSpan||1});const l=Array.from(Array(r),()=>Array(n).fill(null));s.forEach(d=>{const h=d.sectionRowIndex;let f=0;Array.from(d.querySelectorAll("th,td")).forEach(u=>{for(let w=0;w<l[h].length;w++)if(l[h][w]===null){f=w;break}const b=u.rowSpan||1,y=u.colSpan||1;for(let w=0;w<b;w++)for(let q=0;q<y;q++)h+w<r&&f+q<n&&(l[h+w][f+q]=w===0&&q===0?"1":"0")})}),s.forEach(d=>{const h=d.sectionRowIndex;Array.from(d.querySelectorAll("th,td")).forEach(f=>{for(let u=0;u<l[h].length;u++)if(l[h][u]==="1"){f.dataset.col=u,l[h][u]="0";break}})})},"#resetColIndex"));let Gt=I;const ce=class ce{constructor(i){c(this,W);c(this,E);c(this,O,new Map);c(this,k,null);c(this,P,null);c(this,K,0);c(this,V,40);c(this,it,!1);c(this,Lt,3);S(this,"refresh",a(()=>{var e;const i=t(this,E).querySelector(".ng-container-body");i&&(t(this,ut).call(this),t(this,st).call(this,i.scrollTop),(e=t(this,E).querySelector("nine-table-vscrollbar"))==null||e.refresh())},"refresh"));S(this,"initialize",a(()=>{g(this,k,null),t(this,O).clear(),[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(o=>{const r=t(this,E).querySelector(o);if(!r)return;const n=r.querySelector("table");if(!n)return;const l=n.querySelector("tbody.bindable-tbody");if(!l)return;const h=Array.from(l.querySelectorAll("tr")).map(f=>f.cloneNode(!0));t(this,O).set(o,h)});const i=t(this,E).querySelector(".ng-container-body"),e=t(this,E).querySelector(".ng-container-left"),s=t(this,E).querySelector(".ng-container-right");if(i){t(this,Ct).call(this,i),t(this,bt).call(this),t(this,ut).call(this),t(this,st).call(this,i.scrollTop);let o=i.scrollTop;const r=a(n=>{var l;e&&e.scrollTop!==n&&(e.scrollTop=n),s&&s.scrollTop!==n&&(s.scrollTop=n),t(this,st).call(this,n),(l=t(this,E).querySelector("nine-table-vscrollbar"))==null||l.refresh()},"syncScroll");i.addEventListener("scroll",()=>{const n=i.scrollTop;o!==n&&(o=n,r(n))})}},"initialize"));c(this,Ht,a((i,e)=>{const s=t(this,O).get(e);if(!s||s.length===0)return;const o=i.querySelector("tbody.bindable-tbody");if(!o)return;o.querySelectorAll("tr:not(.nodata)").forEach(l=>l.remove());const r=o.querySelector("tr.nodata"),n=document.createDocumentFragment();for(let l=0;l<t(this,V);l++)s.forEach(d=>{n.appendChild(d.cloneNode(!0))});r?r.before(n):o.appendChild(n)},"#renderRows"));c(this,Ct,a(i=>{if(t(this,k)!==null&&t(this,k)>0)return t(this,k);const e=t(this,O).get(".ng-container-body");if(!e||e.length===0)return 24;const s=i.querySelector("tbody.bindable-tbody")||i.querySelector("tbody.bindable-tbody:last-of-type");if(!s)return 24;s.querySelectorAll("tr:not(.nodata)").forEach(b=>b.remove());const o=s.querySelector("tr.nodata"),r=document.createDocumentFragment();e.forEach(b=>{r.appendChild(b.cloneNode(!0))}),o?o.before(r):s.appendChild(r);const n=t(this,E),l=n.style.display,d=n.style.visibility,h=n.style.position;(l==="none"||window.getComputedStyle(n).display==="none")&&(n.style.display="block",n.style.visibility="hidden",n.style.position="absolute");let f=0;const u=s.querySelectorAll("tr:not(.nodata)");return u.forEach(b=>{f+=b.offsetHeight||b.getBoundingClientRect().height}),u.forEach(b=>b.remove()),n.style.display=l,n.style.visibility=d,n.style.position=h,g(this,k,f>0?f:24),t(this,gt).call(this),t(this,k)},"#measureAndCacheHeight"));c(this,ut,a(()=>{if(!t(this,E).querySelector(".ng-container-body"))return;const s=(t(this,W).data.get()||[]).length,o=t(this,k)||24,r=s*o;v.log(`[VirtualHeight] totalCount: ${s}, rowHeight: ${o}, totalVirtualHeight: ${r}`),[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(n=>{const l=t(this,E).querySelector(n),d=l==null?void 0:l.querySelector("table");d&&(d.style.height=`${r}px`)})},"#updateVirtualScrollHeight"));c(this,gt,a(()=>{if((t(this,W).data.get()||[]).length,t(this,K)>0&&t(this,k)>0){const e=Math.ceil(t(this,K)/t(this,k));g(this,V,e+t(this,Lt)),v.log("visibleRows:",e,"cachedRowCount:",t(this,V))}},"#updateRowCount"));c(this,Mt,a(()=>{var d,h,f;const i=t(this,E).querySelector(".ng-container-left table"),e=t(this,E).querySelector(".ng-container-body table"),s=t(this,E).querySelector(".ng-container-right table");if(!e)return;const o=i?Array.from(i.querySelectorAll("tr")):[],r=Array.from(e.querySelectorAll("tr")),n=s?Array.from(s.querySelectorAll("tr")):[],l=Math.max(o.length,r.length,n.length);for(let u=0;u<l;u++){const b=[((d=o[u])==null?void 0:d.getBoundingClientRect().height)||0,((h=r[u])==null?void 0:h.getBoundingClientRect().height)||0,((f=n[u])==null?void 0:f.getBoundingClientRect().height)||0],y=Math.max(...b);y>0&&(o[u]&&(o[u].style.height=`${y}px`),r[u]&&(r[u].style.height=`${y}px`),n[u]&&(n[u].style.height=`${y}px`))}},"#syncRowHeights"));c(this,_t,a(()=>{!t(this,E)||!(t(this,E)instanceof HTMLElement)||(g(this,P,new ResizeObserver(i=>{for(const e of i){const s=e.target;if(!s.classList.contains("active"))continue;const o=e.contentRect.height;if(o>0){let r=0;const n=s.querySelector("thead");n&&(r+=n.offsetHeight||n.getBoundingClientRect().height);const l=Math.max(o-r,100);t(this,K)!==l&&(g(this,K,l),t(this,gt).call(this),t(this,k)!==null&&t(this,bt).call(this))}}})),t(this,P).observe(t(this,E)))},"#initResizeObserver"));c(this,bt,a(()=>{[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(i=>{const e=t(this,E).querySelector(i);e&&e.querySelector("tbody.bindable-tbody")&&t(this,Ht).call(this,e,i)}),t(this,Mt).call(this)},"#renderAllContainers"));c(this,$t,a(i=>{[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(e=>{var h;const s=t(this,E).querySelector(e);if(!s)return;const o=s.querySelector("tbody.bindable-tbody");if(!o)return;const r=Array.from(o.querySelectorAll("tr:not(.nodata)")),n=((h=t(this,O).get(e))==null?void 0:h.length)||1,d=(t(this,W).data.get()||[]).length;r.forEach((f,u)=>{const b=i+Math.floor(u/n);if(b>=d){f.style.display="none";return}const y=t(this,W).data.get(b);f.style.display="",t(this,yt).call(this,f,y,b)})})},"#adjustBufferRows"));c(this,st,a(i=>{var d;const e=t(this,k);if(!e||e<=0)return;const o=(t(this,W).data.get()||[]).length,r=Math.max(0,Math.floor(i/e)),n=((d=t(this,O).get(".ng-container-body"))==null?void 0:d.length)||1,l=r+t(this,V);v.log(`[Scroll] scrollTop: ${i}, startIndex: ${r}, cachedRowCount: ${t(this,V)}, targetDataIndex range: ${r} ~ ${l} (Total: ${o})`),[".ng-container-body",".ng-container-left",".ng-container-right"].forEach(h=>{const f=t(this,E).querySelector(h);if(!f)return;const u=f.querySelector("tbody.bindable-tbody");if(!u)return;Array.from(u.querySelectorAll("tr:not(.nodata)")).forEach((y,w)=>{const q=r+Math.floor(w/n);if(q>=o){y.style.display="none";return}const ct=t(this,W).data.get(q);y.style.display="",t(this,yt).call(this,y,ct,q)})}),t(this,it)||(g(this,it,!0),setTimeout(()=>{t(this,$t).call(this,r),g(this,it,!1)},0))},"#handleScroll"));c(this,yt,a((i,e,s)=>{i.dataset.row=s,Array.from(i.cells).forEach((o,r)=>{const n=o.dataset.bind;n&&e&&e[n]!==void 0?o.textContent=e[n]:o.textContent=e?e[Object.keys(e)[r]]??`R${s}C${r}`:`행 ${s+1}`,o.dataset.row=s})},"#bindRowData"));S(this,"destroy",a(()=>{t(this,P)&&(t(this,P).disconnect(),g(this,P,null))},"destroy"));g(this,W,i.getRootNode().host),g(this,E,i),t(this,_t).call(this)}getRowHeight(){return t(this,k)}templateLength(i=".ng-container-body"){var e;return((e=t(this,O).get(i))==null?void 0:e.length)||1}};W=new WeakMap,E=new WeakMap,O=new WeakMap,k=new WeakMap,P=new WeakMap,K=new WeakMap,V=new WeakMap,it=new WeakMap,Lt=new WeakMap,Ht=new WeakMap,Ct=new WeakMap,ut=new WeakMap,gt=new WeakMap,Mt=new WeakMap,_t=new WeakMap,bt=new WeakMap,$t=new WeakMap,st=new WeakMap,yt=new WeakMap,a(ce,"RowManager");let Jt=ce;const pt=class pt extends HTMLElement{constructor(){super();c(this,It);c(this,nt,null);c(this,Z);S(this,"invalidate",a(()=>{t(this,Z).refresh()},"invalidate"));c(this,Wt,a(()=>{[{selector:".ng-container-body",type:null},{selector:".ng-container-left",type:"left"},{selector:".ng-container-right",type:"right"}].forEach(({selector:s,type:o})=>{const r=this.querySelector(s);if(!r)return;const n=t(this,zt).call(this,t(this,nt),o);r.innerHTML="",r.appendChild(n)})},"#renderSplitContainers"));c(this,Ot,a(()=>{["left","right"].forEach(e=>{const s=this.querySelector(`.ng-container-${e}`),o=s==null?void 0:s.querySelector("table");if(!s||!o)return;let r=0;o.querySelectorAll("col").forEach(n=>{const l=parseInt(n.getAttribute("width"),10);isNaN(r)||(r+=l)}),s.style.flex=`0 0 ${r}px`,s.style.width=`${r}px`})},"#updateContainerWidths"));S(this,"generate",a(e=>{e&&(g(this,nt,Gt.compile(e)),t(this,nt).style.display="table",t(this,Wt).call(this),t(this,Ot).call(this),requestAnimationFrame(()=>{var o;const s=(o=this.querySelector("thead"))==null?void 0:o.getBoundingClientRect().height;this.querySelectorAll("tbody.fixed-tbody").forEach(r=>{r.style.top=`${s}px`})}),t(this,Z).initialize(),setTimeout(()=>{var s;(s=this.querySelector("nine-table-hscrollbar"))==null||s.refresh()},0))},"generate"));c(this,zt,a((e,s)=>{const o=e.cloneNode(!0),r=o.querySelector("tbody");if(r){const n=document.createElement("tbody");n.className="fixed-tbody",r.className="bindable-tbody",r.before(n)}return s==="left"?o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach(n=>{n.getAttribute("fixed")!=="left"&&n.remove()}):s==="right"?o.querySelectorAll("col, th, td, tfoot td, tfoot th").forEach(n=>{n.getAttribute("fixed")!=="right"&&n.remove()}):o.querySelectorAll("[fixed=left], [fixed=right]").forEach(n=>{n.remove()}),o},"#createSplitTable"));S(this,"getRowHeight",a(()=>t(this,Z).getRowHeight(),"getRowHeight"));S(this,"scrollToX",a(e=>{const s=this.querySelector(".ng-container-body");s&&(s.scrollLeft=e)},"scrollToX"));S(this,"scrollToY",a(e=>{const s=this.querySelector(".ng-container-body");s&&(s.scrollTop=e)},"scrollToY"));c(this,Dt,a(()=>{t(this,Bt).call(this)},"#init"));c(this,Bt,a(()=>{const e=pt.SCROLLBAR_SIZE;this.innerHTML=`
128
128
  <style>
129
129
  nine-table-sheet {
130
130
  display: none;