1import{g as N,b as I,c as V,p as x,d as _,e as P,f as L,h as M}from"./css-values-CUgfcrP5.js";const H={rowCount:4,colCount:4,alignment:"center",cellMinWidth:"120px",enableMaxWidth:!1,cellPadding:"10px",tableBorder:{width:"1px",style:"solid",color:"rgb(0, 0, 0)"},enableInnerBorder:!0,headerInnerBorder:!0,innerBorder:{width:"1px",style:"solid",color:"rgb(0, 0, 0)"},separateRowCol:!1,oddRowBg:"#f0f0f0",evenRowBg:"#ffffff",responsive:{widthTarget:"window",enable:!1,mobile:{disable:!1,maxWidth:"375px",enableHead:!0,staticHead:!1,stackDirection:"row",itemsPerHead:1},tablet:{disable:!1,maxWidth:"700px",enableHead:!0,staticHead:!1,stackDirection:"row",itemsPerHead:2}},columnsProps:{},rowsProps:{},useThForFirstRow:!1,showPoweredByBadge:!1},K={rowspan:1,colspan:1},$=120,E=e=>!!(e&&e.left&&e.right),U=e=>{const o=parseInt(e.cellMinWidth||`${$}px`);let t=e.colCount*o;if(e.columnsProps)for(const n in e.columnsProps){const l=e.columnsProps[n].width;l&&(t+=parseInt(l)-o)}if(e.cellPadding&&typeof e.cellPadding=="string"){const n=parseInt(e.cellPadding);t+=n*2*e.colCount}if(e.innerBorder){const n=e.innerBorder;n.width?t+=parseInt(n.width)*(e.colCount+1):E(n)&&(t+=parseInt(n.left.width)*e.colCount,t+=parseInt(n.right.width)*e.colCount)}if(e.tableBorder){const n=e.tableBorder;n.width?t+=parseInt(n.width)*2:E(n)&&(t+=parseInt(n.left.width),t+=parseInt(n.right.width))}return{total:t,cellMinWidth:o}},X=(e,o)=>{if(e.borderRadius)return{...I(e.tableBorder),...V(e.borderRadius),...o?{}:{overflow:"hidden"}}},G=(e,o)=>({minWidth:o,...e.borderRadius?{}:I(e.tableBorder),borderCollapse:e.separateRowCol?"separate":"collapse",borderSpacing:`${e.colSpacing||0} ${e.rowSpacing||0}`,"--wptb-link-color":e.linkColor,"--wptb-inner-border":e.enableInnerBorder?N(e.innerBorder):void 0,"--wptb-inner-radius":e.innerBorderRadius,"--wptb-content-distribution-y-display":e.contentDistribution?"flex":void 0,"--wptb-content-distribution-y":e.contentDistribution}),Q=e=>({"wptb-row-borders-only":!!e.rowBorderOnly,"wptb-column-borders-only":!!e.columnBorderOnly,"wptb-no-header-border":!e.headerInnerBorder,"wptb-has-link-color":!!e.linkColor,"wptb-has-content-distribution-y":!!e.contentDistribution,"wptb-has-table-radius":!!e.borderRadius}),Y=(e,o)=>{let t;return e===0&&(t=o.hoverHeaderBg||t),e%2===0?t||(t=o.hoverOddRowBg):t=o.hoverEvenRowBg,t},Z=e=>e!=null&&e.highlight?`scale(${(e.highlightScale||100)/100})`:void 0,F=e=>e?!e.top:!1,ee=(e,o)=>{const t=e.dataset,n=x(e);let l;return(!F(n)||!F(o)||n.color!==o.color||n.width!==o.width)&&(l=n),{background:e.style.backgroundColor,border:l,vAlign:t.wptbCellVerticalAlignment,isEmpty:e.classList.contains("wptb-empty"),sortedVertical:t.sortedVertical=="true",sortedHorizontal:t.sortedHorizontal==="true",colspan:e.colSpan||1,rowspan:e.rowSpan||1,contentDistribution:t.wptbCellDistribution}},te=(e,o,t)=>{var w;const n=(w=e.className.match(/wptb-row-highlighted-([0-9]+)/))==null?void 0:w[1];let l=P(e.style.backgroundColor||e.style.background);return l&&(o===0&&t.headerBg===l||o%2===0&&t.oddRowBg===l||o%2===1&&t.evenRowBg===l)&&(l=void 0),{highlight:!!n,highlightScale:parseInt(n||"100"),background:l}},j=e=>{var y,p,h,d,a,r,s,i,u,g,c,f,m,S,C;let o=null;try{o=JSON.parse(atob(e.dataset.wptbResponsiveDirectives||"null"))}catch{}const t=(y=o==null?void 0:o.modeOptions)==null?void 0:y.auto,n=parseInt(H.responsive.mobile.maxWidth),l=parseInt(H.responsive.tablet.maxWidth);return{widthTarget:(o==null?void 0:o.relativeWidth)||"window",enable:(o==null?void 0:o.responsiveEnabled)??!1,mobile:{disable:!!((p=t==null?void 0:t.disabled)!=null&&p.mobile),maxWidth:`${Math.max(((d=(h=o==null?void 0:o.breakpoints)==null?void 0:h.mobile)==null?void 0:d.width)||0,n)}px`,enableHead:((a=t==null?void 0:t.topRowAsHeader)==null?void 0:a.mobile)??!0,staticHead:((r=t==null?void 0:t.staticTopRow)==null?void 0:r.mobile)??!1,stackDirection:((s=t==null?void 0:t.cellStackDirection)==null?void 0:s.mobile)||"row",itemsPerHead:((i=t==null?void 0:t.cellsPerRow)==null?void 0:i.mobile)??2},tablet:{disable:!!((u=t==null?void 0:t.disabled)!=null&&u.tablet),maxWidth:`${((c=(g=o==null?void 0:o.breakpoints)==null?void 0:g.tablet)==null?void 0:c.width)||l}px`,enableHead:((f=t==null?void 0:t.topRowAsHeader)==null?void 0:f.tablet)??!0,staticHead:((m=t==null?void 0:t.staticTopRow)==null?void 0:m.tablet)??!1,stackDirection:((S=t==null?void 0:t.cellStackDirection)==null?void 0:S.tablet)||"row",itemsPerHead:((C=t==null?void 0:t.cellsPerRow)==null?void 0:C.tablet)??2}}},O=e=>{if(!e)return{};const o={};for(const t of Object.keys(e)){const n=parseInt(t,10);Number.isNaN(n)||(o[n]=e[t])}return o},oe=e=>{var v,k,W,A,D;const o=e.dataset,t=((v=e.querySelector("tbody"))==null?void 0:v.dataset)||{},n=e.style,l=e.rows[0].cells[0],w=e.rows.length>1?e.rows[1].cells.length>1?e.rows[1].cells[1]:e.rows[1].cells[0]||l:l,y=x(e);let p={};try{p=JSON.parse(atob(o.wptbTableDirectives||"{}"))}catch{}const h=e.rows.length;let d=0;for(let B=0;B<h;B++)d=Math.max(d,e.rows[B].cells.length);const a=_(e,y,p),r=x(l);let s=!1,i=!1,u,g,c,f,m;try{const B=e.getAttribute("data-v2-props");if(B){const b=JSON.parse(atob(B));s=!!(b!=null&&b.useThForFirstRow),"showPoweredByBadge"in b&&(i=!!b.showPoweredByBadge),"columnsProps"in b&&(u=O(b.columnsProps)),"rowsProps"in b&&(g=O(b.rowsProps)),"contentDistribution"in b&&(c=b.contentDistribution),"sticky"in b&&b.sticky&&typeof b.sticky=="object"&&(f=b.sticky),"borderRadius"in b&&b.borderRadius&&(m=b.borderRadius)}}catch{}const S=["true","1"].includes(o.wptbFirstColumnSticky),C=["true","1"].includes((W=(k=e.querySelector("tr"))==null?void 0:k.dataset)==null?void 0:W.wptbStickyRow),R=f??(C||S?{row:C?1:void 0,column:S?1:void 0}:void 0);return{colCount:d,rowCount:h,alignment:o.wptbTableAlignment||H.alignment,enableMaxWidth:!!o.wptbApplyTableContainerMaxWidth,maxWidth:o.wptbTableContainerMaxWidth?o.wptbTableContainerMaxWidth+"px":"700px",sortHorizontal:{enable:o.wptbSortableTableHorizontal=="1"},sortVertical:{enable:o.wptbSortableTableVertical=="1"},colSpacing:(o.borderSpacingColumns||"3")+"px",rowSpacing:(o.borderSpacingRows||"3")+"px",cellMinWidth:(o.wptbTdWidthAuto||"120")+"px",cellPadding:(w==null?void 0:w.style.padding)||H.cellPadding,padding:M("padding",e.style),fontColor:P(t.globalFontColor),linkColor:P(t.globalLinkColor),fontSize:parseInt(t.globalFontSize||"15")+"px",tableBorder:y,enableInnerBorder:!!a,innerBorder:a,headerInnerBorder:r?r.style!="none":!1,borderRadius:m,innerBorderRadius:L(p),separateRowCol:n.borderCollapse=="separate",rowBorderOnly:((A=p.innerBorders)==null?void 0:A.active)=="row",columnBorderOnly:((D=p.innerBorders)==null?void 0:D.active)=="column",scrollX:!!o.wptbHorizontalScrollStatus,disableThemeStyles:o.disableThemeStyles==="1",extraStyles:atob(o.wptbExtraStyles||""),sticky:R,paginationEnable:o.wptbPaginationEnable==="true",paginationTopRowAsHeader:o.wptbProPaginationTopRowHeader==="true",rowsPerPage:parseInt(o.wptbRowsPerPage||"10"),dyanamicPageSize:o.wptbRowsChangeable==="true",searchEnable:o.wptbSearchEnable==="true",searchKeepHeader:o.wptbProSearchTopRowHeader==="true",searchPosition:o.wptbSearchbarPosition||"left",showPoweredByBadge:i,role:e.getAttribute("role")||"table",useThForFirstRow:s,headerBg:P(o.wptbHeaderBackgroun
1dColor),evenRowBg:P(o.wptbEvenRowBackgroundColor),oddRowBg:P(o.wptbOddRowBackgroundColor),hoverHeaderBg:o.wptbHeaderHoverBackgroundColor,hoverEvenRowBg:o.wptbEvenRowHoverBackgroundColor,hoverOddRowBg:o.wptbOddRowHoverBackgroundColor,responsive:j(e),columnsProps:u||{},rowsProps:g||{},contentDistribution:c}};function z(e){const o=Array.from(e.rows),t=o.length;if(t===0)return{isCorrupted:!1,expectedCols:0,expectedRows:0,rowIssues:[],missingCells:[],overflowingSpans:[]};const n=[];o.forEach(a=>{let r=0;Array.from(a.cells).forEach(s=>{r+=s.colSpan||1}),n.push(r)});const l=Math.max(...n),w=Array.from({length:t},()=>Array.from({length:l},()=>null)),y=[],p=[];o.forEach((a,r)=>{let s=0;const i=Array.from(a.cells);for(const c of i){for(;s<l&&w[r][s]!==null;)s++;if(s>=l)break;const f=c.colSpan||1,m=c.rowSpan||1;s+f>l&&p.push({row:r,col:s,type:"colspan",excess:s+f-l}),r+m>t&&p.push({row:r,col:s,type:"rowspan",excess:r+m-t});const S=Math.min(f,l-s),C=Math.min(m,t-r);for(let R=0;R<C;R++)for(let T=0;T<S;T++){const v=r+R,k=s+T;v<t&&k<l&&(w[v][k]={row:v,col:k,sourceRow:r,sourceCol:s,element:c})}s+=f}let u=0;for(let c=0;c<l;c++)if(w[r][c]!==null&&w[r][c].sourceRow===r){const f=w[r][c].element;f&&(u+=f.colSpan||1)}const g=w[r].filter(c=>c!==null).length;g<l&&y.push({row:r,actualWidth:g,expectedWidth:l})});const h=[];for(let a=0;a<t;a++)for(let r=0;r<l;r++)w[a][r]===null&&h.push({row:a,col:r});return{isCorrupted:y.length>0||h.length>0||p.length>0,expectedCols:l,expectedRows:t,rowIssues:y,missingCells:h,overflowingSpans:p}}function q(e,o){if(!o.isCorrupted)return;const{expectedCols:t,expectedRows:n,overflowingSpans:l}=o,w=Array.from(e.rows);for(const d of l){const a=w[d.row];if(!a)continue;const r=Array.from(a.cells);let s=0;for(const i of r){if(s===d.col){d.type==="colspan"?i.colSpan=Math.max(1,i.colSpan-d.excess):i.rowSpan=Math.max(1,i.rowSpan-d.excess);break}s+=i.colSpan||1}}const y=z(e),p=Array.from({length:n},()=>Array.from({length:t},()=>null));w.forEach((d,a)=>{let r=0;const s=Array.from(d.cells);for(const i of s){for(;r<t&&p[a][r]!==null;)r++;if(r>=t)break;const u=Math.min(i.colSpan||1,t-r),g=Math.min(i.rowSpan||1,n-a);for(let c=0;c<g;c++)for(let f=0;f<u;f++){const m=a+c,S=r+f;m<n&&S<t&&(p[m][S]=i)}r+=u}});const h=new Map;for(const{row:d,col:a}of y.missingCells)h.has(d)||h.set(d,[]),h.get(d).push(a);h.forEach((d,a)=>{const r=w[a];if(r){d.sort((s,i)=>i-s);for(const s of d){const i=document.createElement("td");i.colSpan=1,i.rowSpan=1;let u=null,g=0;for(const c of Array.from(r.cells)){if(g>=s){u=c;break}g+=c.colSpan||1}u?r.insertBefore(i,u):r.appendChild(i)}}})}function re(e){const o=document.createElement("div");o.innerHTML=e;const t=o.querySelector("table");if(!t)return e;const n=z(t);return n.isCorrupted?(q(t,n),o.innerHTML):e}export{z as a,te as b,ee as c,K as d,G as e,Q as f,X as g,U as h,Y as i,Z as j,H as k,re as l,oe as p,q as r};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.