1// source --> https://topbestestore.com/wp-content/plugins/wp-table-builder/inc/frontend/js/wp-table-builder-frontend.js?ver=1.3.3 2function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var WPTB_CutGlueTable={cutTableHorizontally:function(e,t){if(t&&t.rows[e])for(var r=0;r<e;r++)for(var a=t.rows[r].children,o=0;o<a.length;o++)if(1<a[o].rowSpan&&a[o].rowSpan>e-r){var n=a[o].rowSpan-e+r;a[o].rowSpan=e-r,a[o].dataset.sameCellBeforeDivision||(a[o].dataset.sameCellBeforeDivision="r"+r+"c"+o);var l=void 0;l=t.hasOwnProperty("wptbCell")?(l=new t.wptbCell(t.mark)).getDOMElement():document.createElement("td");var s=a[o].getAttribute("style");l.setAttribute("style",s),l.colSpan=a[o].colSpan,l.rowSpan=n,l.dataset.sameCellBeforeDivision=a[o].dataset.sameCellBeforeDivision;for(var i=a[o].dataset.xIndex,d=parseInt(i)+parseInt(a[o].colSpan),c=void 0;!c&&d<t.maxCols;)c=t.rows[e].querySelector('[data-x-index="'+d+'"]'),d++;t.rows[e].insertBefore(l,c),WPTB_RecalculateIndexes(t)}},glueTableHorizontally:function(e){if(e){for(var t=_toConsumableArray(e.getElementsByTagName("td")),r=0;r<t.length;r++)if(t[r].hasAttribute("data-same-cell-before-division"))for(var a=t[r].dataset.sameCellBeforeDivision,o=e.querySelectorAll('[data-same-cell-before-division="'+a+'"]'),n=0;n<o.length;n++)if(o[n]&&o[n+1]&&o[n].parentNode&&o[n+1].parentNode&&!o[n].parentNode.classList.contains("wptb-row-moving")&&!o[n+1].parentNode.classList.contains("wptb-row-moving")&&o[n+1].dataset.yIndex==parseInt(o[n].dataset.yIndex)+parseInt(o[n].rowSpan)){o[n].rowSpan+=o[n+1].rowSpan;for(var l=_toConsumableArray(o[n+1].children),s=0;s<l.length;s++)o[n].appendChild(l[s]);o[n+1].parentNode.removeChild(o[n+1])}WPTB_RecalculateIndexes(e)}},cutTableVertically:function(e,t){for(var r=0;r<t.rows.length;r++){if(e<t.maxCols&&0!=e&&!t.rows[r].querySelector('[data-x-index="'+e+'"]'))for(var a=t.rows[r].children,o=void 0,n=a.length,l=void 0,s=void 0,i=void 0,d=void 0,c=0;c<n;c++)if(1<a[c].colSpan&&parseInt(a[c].dataset.xIndex)<e&&parseInt(a[c].dataset.xIndex)+parseInt(a[c].colSpan)>e){o=t.hasOwnProperty("wptbCell")?(o=new t.wptbCell(t.mark)).getDOMElement():document.createElement("td"),s=a[c].rowSpan,i=a[c].colSpan,a[c].colSpan=e-a[c].dataset.xIndex,d=i-a[c].colSpan,a[c].dataset.sameCellBeforeDivision||(a[c].dataset.sameCellBeforeDivision="r"+r+"c"+c);var u=a[c].getAttribute("style");o.setAttribute("style",u);var p=t.querySelector('[data-x-index="'+e+'"]');p&&(o.style.width=p.style.width);var b=t.querySelector('[data-y-index="'+r+'"]');b&&(o.style.height=b.style.height),l=a[c+1]?a[c+1]:null,t.rows[r].insertBefore(o,l),o.colSpan=d,o.rowSpan=s,o.dataset.sameCellBeforeDivision=a[c].dataset.sameCellBeforeDivision,r+=s-1;break}WPTB_RecalculateIndexes(t)}},glueTableVertically:function(e){if(e){for(var t=_toConsumableArray(e.getElementsByTagName("td")),r=0;r<t.length;r++)if(t[r].hasAttribute("data-same-cell-before-division"))for(var a=t[r].dataset.sameCellBeforeDivision,o=_toConsumableArray(e.querySelectorAll('[data-same-cell-before-division="'+a+'"]')),n=null,l=0;l<o.length;l++)if(o[l]&&o[l+1]&&!o[l].classList.contains("wptb-column-moving")&&!o[l+1].classList.contains("wptb-column-moving")&&o[l+1].dataset.xIndex==parseInt(o[l].dataset.xIndex)+parseInt(o[l].colSpan)){null==n&&(n=l),o[n].colSpan+=o[l+1].colSpan;for(var s=_toConsumableArray(o[l+1].children),i=0;i<s.length;i++)o[n].appendChild(s[i]);o[l+1].parentNode.removeChild(o[l+1])}WPTB_RecalculateIndexes(e)}}},WPTB_GetDirectionAfterReconstruction=function(n,l,s,r,i){var d=0,c=n.maxCols,e={},u=[];return i&&i.getDirective(n)?e.switch=function(e){var t=i.getDirective(n),r="desktop";if(e&&e.detail&&(r=e.detail.sizeRangeId),u=[l,1],"desktop"!==r){if(t.hasOwnProperty("modeOptions")){var a=t.responsiveMode,o=t.modeOptions[a];o.hasOwnProperty("topRowAsHeader")&&o.topRowAsHeader.hasOwnProperty(r)&&o.topRowAsHeader[r]?o.hasOwnProperty("cellStackDirection")&&o.cellStackDirection.hasOwnProperty(r)&&("row"===o.cellStackDirection[r]?(u=[s,2],d=c-1):"column"===o.cellStackDirection[r]&&o.hasOwnProperty("cellsPerRow")&&(d=o.cellsPerRow[r])):d=0}}else d=0;return{type:u,itemsPerHeader:d}}:e.switch=function(e){if(u=[l,1],n.classList.contains("wptb-mobile-view-active")){n.classList.contains("wptb-table-preview-head")&&(u=[s,2])===r&&(d=c-1);var t=n.parentNode.parentNode.querySelector(".wptb-preview-table-mobile");return{type:u,itemsPerHeader:d,newTable:t}}return{type:u,itemsPerHeader:d}},e};function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e,t,r){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=r():t[e]=r()}("WPTB_SortableTable",self||global,function(){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},Q=this.table=e.table;WPTB_RecalculateIndexes(Q);var n=this;function t(e,t,r){if("TD"===e.target.tagName){var a=null==e.offsetX?e.layerX:e.offsetX,o=null==e.offsetY?e.layerY:e.offsetY,n=!1;("vertical"===t&&e.target.clientWidth-a<=35||"horizontal"===t&&a<=35)&&(n=!0),n&&(e.target.clientHeight-35)/2<o&&(e.target.clientHeight+35)/2>o?r.classList.add("sortable-hover"):r.classList.remove("sortable-hover")}else r.classList.remove("sortable-hover")}function c(e){t(e,"vertical",this)}function u(e){t(e,"horizontal",this)}function p(){this.classList.remove("sortable-hover")}function r(e,t){if(e.target&&"TD"===e.target.tagName&&!Q.parentNode.classList.contains("wptb-preview-table-manage-cells")){var r=e.currentTarget,a=!1;if("vertical"===t&&e.target.dataset.hasOwnProperty("sortedVertical")){var o=[],n=[];if(this.itemsPerHeader&&this.itemsPerHeader<r.rows.length){WPTB_RecalculateIndexes(r);for(var l=_toConsumableArray(r.rows),s=r.querySelector("tbody")?r.querySelector("tbody"):r,i=0;i<l.length;i++)i<e.target.dataset.yIndex?(o.push(l[i]),s.removeChild(l[i])):i>parseInt(e.target.dataset.yIndex,10)+this.itemsPerHeader&&(n.push(l[i]),s.removeChild(l[i]));WPTB_RecalculateIndexes(r)}var d,c,u=r.querySelectorAll('[data-x-index="'.concat(e.target.dataset.xIndex,'"]'));(u=_toConsumableArray(u)).map(function(e){(d=parseInt(e.rowSpan,10))||(d=1),c=e.dataset.yIndex,WPTB_CutGlueTable.cutTableHorizontally(c,r),c+=d,WPTB_CutGlueTable.cutTableHorizontally(c,r)});for(var p,b=[],f=0,h=[],m=0;m<u.length;m++){var y=Z(e,r,u,m,f,"vertical");if(y&&y.hasOwnProperty("i"))u=y.tds,m=y.i;else{y&&(u=y.tds);var v=u[m],w=parseInt(v.rowSpan,10);w||(w=1),f=parseInt(v.dataset.yIndex,10)+w;for(var g=J(v),S=[],C=0;C<w;C++)S.push(r.rows[parseInt(v.dataset.yIndex,10)+C]),h.push(parseInt(v.dataset.yIndex,10)+C);0<v.dataset.yIndex?b.push({rowsTd:S,value:g}):p=S}}var T=U(e,"sortedVertical");if(!T)return;if(b.length&&b.sort(function(e,t){return $(T,e,t)}),b.unshift({rowsTd:p}),b.length<r.rows.length)for(var A=0;A<r.rows.length;A++)if(!(-1<h.indexOf(A))){var x=[];x.push(r.rows[A]),b.push({rowsTd:x})}var R=r.querySelector("tbody");if(R.innerHTML="",b.map(function(e){e.rowsTd.map(function(e){R.appendChild(e)})}),o.length){var k=r.querySelector("tbody")?r.querySelector("tbody"):r;if(k){var E=k.querySelector("tr");o.map(function(e){k.insertBefore(e,E)})}}if(n.length){var I=r.querySelector("tbody")?r.querySelector("tbody"):r;R&&n.map(function(e){I.appendChild(e)})}WPTB_RecalculateIndexes(r),WPTB_CutGlueTable.glueTableHorizontally(r),a=!0}else if("horizontal"===t&&"0"===e.target.dataset.xIndex){var P,O,_=r.querySelectorAll('[data-y-index="'.concat(e.target.dataset.yIndex,'"]'));(_=_toConsumableArray(_)).map(function(e){(P=parseInt(e.colSpan,10))||(P=1),O=e.dataset.xIndex,WPTB_CutGlueTable.cutTableVertically(O,r),O+=P,WPTB_CutGlueTable.cutTableVertically(O,r)});for(var j,B=[],L=0,W=0;W<_.length;W++){var M=Z(e,r,_,W,L,"horizontal");if(M&&M.hasOwnProperty("i"))_=M.tds,W=M.i;else{M&&(_=M.tds);var H=_[W],q=parseInt(H.colSpan,10);q||(q=1),L=parseInt(H.dataset.xIndex,10)+q;for(var D=J(H),N=[],z=0;z<q;z++){var V=_toConsumableArray(r.querySelectorAll('[data-x-index="'.concat(parseInt(H.dataset.xIndex,10)+z,'"]')));N.push(V)}0<H.dataset.xIndex?B.push({columnsTd:N,value:D}):j=N}}var F=U(e,"sortedHorizontal");if(!F)return;if(B.length&&B.sort(function(e,t){return $(F,e,t)}),B.unshift({columnsTd:j}),B.length<r.maxCols)for(var G=r.maxCols-B.length,K=0;K<G;K++){var X=_toConsumableArray(r.querySelectorAll('[data-x-index="'.concat(parseInt(r.maxCols,10)-parseInt(G,10)+K,'"]')));B.push({columnsTd:[X]})}for(var Y=0;Y<r.rows.length;Y++)r.rows[Y].innerHTML="";B.map(function(e){e.columnsTd.map(function(e){e.map(function(e){r.rows[e.dataset.yIndex].appendChild(e)})})}),WPTB_RecalculateIndexes(r),WPTB_CutGlueTable.glueTableVertically(r),a=!0}
2a&&(function(e){for(var t=_toConsumableArray(e.getElementsByTagName("td")),r=0;r<t.length;r++)t[r].hasAttribute("data-same-cell-before-division")&&t[r].removeAttribute("data-same-cell-before-division")}(r),r.hasOwnProperty("tableSM")&&(new(r.tableSM())).tableStateSet(),this.reassignElementsStyles("td"),this.reassignElementsStyles("tr"))}}function U(e,t){return!(!e.currentTarget||!e.currentTarget.classList.contains("wptb-preview-table")&&!e.currentTarget.classList.contains("wptb-preview-table-mobile"))&&(e.target.dataset[t]&&"ask"!==e.target.dataset[t]?e.target.dataset[t]="ask":e.target.dataset[t]="desk",e.target.dataset[t])}function $(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"ask",t=1<arguments.length?arguments[1]:void 0,r=2<arguments.length?arguments[2]:void 0,a=t.value,o=r.value;return parseInt(a)&&parseInt(o)&&(a=parseInt(a),o=parseInt(o)),"ask"===e?a<o?-1:a===o?0:1:a<o?1:a===o?0:-1}function J(e){var t=e.querySelectorAll(".wptb-text-container");t=_toConsumableArray(t);for(var r="",a=0;a<t.length;a++)r+=t[a].querySelector("p").innerText,a!==t.length-1&&(r+=" ");return r}function Z(e,t,r,a,o,n){var l,s,i,d,c,u,p,b,f=r[a],h=!1;if("vertical"===n?(i="colSpan",d="data-y-index",c="yIndex",u="xIndex",p="rowSpan",b=t.rows.length):"horizontal"===n&&(i="rowSpan",d="data-x-index",c="xIndex",u="yIndex",p="colSpan",b=t.maxCols),0<f.dataset[c]-o){l=t.querySelectorAll("[".concat(d,'="').concat(o,'"]'));for(var m=0;m<l.length;m++)if((s=l[m][i])||(s=1),l[m].dataset[u]<e.target.dataset[u]&&parseInt(l[m].dataset[u],10)+parseInt(s,10)>e.target.dataset[u]){r.splice(a,0,l[m]),h=!0,a--;break}}if(h)return{tds:r,i:a};var y=parseInt(f[p],10);if(y||(y=1),a==r.length-1&&parseInt(f.dataset[c],10)+y<b){l=t.querySelectorAll("[".concat(d,'="').concat(parseInt(f.dataset[c],10)+y,'"]'));for(var v=0;v<l.length;v++)if((s=l[v][i])||(s=1),l[v].dataset[u]<e.target.dataset[u]&&parseInt(l[v].dataset[u],10)+parseInt(s,10)>e.target.dataset[u]){r.push(l[v]),h=!0;break}}return!!h&&{tds:r}}return this.itemsPerHeader=0,this.tableMaxCols=Q.maxCols,this.cellsStylesScheme={},this.rowsStylesScheme={},this.sortModeSwitcher=function(e,t){t&&(this.sortModeSwitcher("horizontal",!1),this.sortModeSwitcher("vertical",!1)),"vertical"===e?(this.table.removeEventListener("click",this.sortableTableVerticalStart,!1),t?(this.sortingCellMouseMoveSwitcher("vertical",!0),this.table.addEventListener("click",this.sortableTableVerticalStart,!1),this.table.dataset.wptbSortableTableVertical="1",this.createTableElementsStylesScheme("td"),this.createTableElementsStylesScheme("tr")):(this.sortingCellMouseMoveSwitcher("vertical",!1),delete this.table.dataset.wptbSortableTableVertical)):"horizontal"===e&&(this.table.removeEventListener("click",this.sortableTableHorizontalStart,!1),t?(this.sortingCellMouseMoveSwitcher("horizontal",!0),this.table.addEventListener("click",this.sortableTableHorizontalStart,!1),this.table.dataset.wptbSortableTableHorizontal="1",this.createTableElementsStylesScheme("td"),this.createTableElementsStylesScheme("tr")):(this.sortingCellMouseMoveSwitcher("horizontal",!1),delete this.table.dataset.wptbSortableTableHorizontal))},this.tableObjectChange=function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return this.table.classList.contains("wptb-mobile-view-active")&&e?this.table=Q.parentNode.parentNode.querySelector(".wptb-preview-table-mobile"):this.table.classList.contains("wptb-preview-table-mobile")&&!e&&(this.table=Q.parentNode.querySelector(".wptb-preview-table")),this.table},this.createTableElementsStylesScheme=function(e){this.tableObjectChange();var t=this.table.querySelectorAll(e);if(t.length)for(var r=0;r<t.length;r++){var a=t[r],o=window.getComputedStyle(a,null).getPropertyValue("background-color"),n="";"td"===e?(n=a.dataset.xIndex+"-"+a.dataset.yIndex,this.cellsStylesScheme[n]={backgroundColor:o}):"tr"===e&&(n=String(r),this.rowsStylesScheme[n]={backgroundColor:o})}this.tableObjectChange(!1)},this.reassignElementsStyles=function(e){this.tableObjectChange();var t,r=this.table.querySelectorAll(e);if("td"===e?t=this.cellsStylesScheme:"tr"===e&&(t=this.rowsStylesScheme),r.length)for(var a=0;a<r.length;a++){var o=r[a],n="";if("td"===e?n=o.dataset.xIndex+"-"+o.dataset.yIndex:"tr"===e&&(n=a),t.hasOwnProperty(n)){var l=t[n];for(var s in l)o.style[s]=l[s]}}this.tableObjectChange(!1)},this.sortableTableInitialization=function(e){var t,r;if(this.table.dataset.wptbSortableTableVertical&&"1"===this.table.dataset.wptbSortableTableVertical?(t="vertical",r="horizontal"):this.table.dataset.wptbSortableTableHorizontal&&"1"===this.table.dataset.wptbSortableTableHorizontal&&(t="horizontal",r="vertical"),t&&"string"==typeof t&&r&&"string"==typeof r){var a=WPTB_GetDirectionAfterReconstruction(this.table,t,r,"vertical",e);if("object"===_typeof(a)&&a.hasOwnProperty("switch")){var o=function(e){var t=a.switch(e);if("object"===_typeof(t))if(this.itemsPerHeader=t.itemsPerHeader,t.hasOwnProperty("newTable")){var r=this.table;this.table=t.newTable,this.sortModeSwitcher(t.type[0],!0),this.table=r}else this.sortModeSwitcher(t.type[0],!0)};o.call(n),this.table.addEventListener("table:rebuilt",function(e){o.call(n,e)},!1)}}},this.sortingCellMouseMoveSwitcher=function(e,t){var r=this;function a(e,t,r){e.removeEventListener("mousemove",t,!1),e.removeEventListener("mouseleave",p,!1),r&&(e.addEventListener("mousemove",t,!1),e.addEventListener("mouseleave",p,!1))}function o(e,t,r){r?e.dataset[t]&&"desk-disabled"===e.dataset[t]?e.dataset[t]="desk":e.dataset[t]="ask":"ask"===e.dataset[t]?e.dataset[t]="ask-disabled":"desk"===e.dataset[t]&&(e.dataset[t]="desk-disabled")}var n=this.table.querySelectorAll("td");if(n.length&&(n=_toConsumableArray(n)).map(function(e){a(e,c,!1),o(e,"sortedVertical",!1),a(e,u,!1),o(e,"sortedHorizontal",!1)}),t)if("vertical"===e)for(var l=this.table.rows.length,s=0;0<l;){var i=this.table.querySelectorAll('[data-y-index="'.concat(s,'"]'));(i=_toConsumableArray(i)).map(function(e){a(e,c,t),o(e,"sortedVertical",t)}),this.itemsPerHeader?(l-=this.itemsPerHeader+1,s+=this.itemsPerHeader+1):l=0}else if("horizontal"===e){var d=this.table.querySelectorAll('[data-x-index="0"]');(d=_toConsumableArray(d)).map(function(e){2<r.table.querySelectorAll('[data-y-index="'.concat(e.dataset.yIndex,'"]')).length&&(a(e,u,t),o(e,"sortedHorizontal",t))})}},this.sortableTableVerticalStart=function(e){r.call(n,e,"vertical")},this.sortableTableHorizontalStart=function(e){r.call(n,e,"horizontal")},this}});var WPTB_RecalculateIndexes=function(e){for(var t,r=e.getElementsByTagName("tr"),a=0,o=0,n=[],l=0;l<r.length;l++){t=r[l].getElementsByTagName("td"),null==n[l]&&(n[l]=[]);for(var s=0,i=0;i<t.length;i++){if(null!=n[l][i])for(var d=0;d<100;d++){if(null==n[l][s]){n[l][s]=t[i],t[i].dataset.xIndex=s;break}s++}else n[l][i]=t[i],t[i].dataset.xIndex=s;if(t[i].dataset.yIndex=l,1<t[i].colSpan)for(var c=1;c<t[i].colSpan;c++)s++,n[l][s]="tdDummy";if(1<t[i].rowSpan)for(var u=1;u<t[i].rowSpan;u++){null==n[l+u]&&(n[l+u]=[]);for(var p=0;p<t[i].colSpan;p++)n[l+u][s-t[i].colSpan+1+p]="tdDummy"}s++}t.length>a&&(a=t.length),0==l&&(o=s)}e.columns=a,e.maxCols=o};function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,a)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};
2e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,a)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}!function(e,t,r){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=r():t[e]=r()}("WPTB_ResponsiveFrontend",self||global,function(){function i(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"log";if("undefined"!=typeof process&&"development"===process.env.NODE_ENV){if(!console[t])throw new Error("no logging type found with given type value of [".concat(t,"]"));console[t]("[WPTB]: ".concat(e))}}function M(e){var c=this,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return this.element=e,this.referenceObject=t,this.mergedRenderStatus=!0,this.mergedCells={row:[],column:[]},this.getMergedRenderStatus=function(){return c.mergedRenderStatus},this.setMergedRenderStatus=function(e){c.mergedRenderStatus=e},this.addToMergedCells=function(e,t){c.mergedCells[e].push(t)},this.isReference=function(){return null!==c.referenceObject},this.isReference()&&(this.element=e.cloneNode(!0)),this.modifications={},this.spans={row:1,col:1},this.remainingSpans={row:0,col:0},this.cacheSpanValues=function(){Object.keys(c.spans).map(function(e){if(Object.prototype.hasOwnProperty.call(c.spans,e)){var t=c.spans[e];c.spans[e]=c.element.getAttribute("".concat(e,"Span"))||t}})},this.cacheSpanValues(),this.getSpan=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1]?c.getElement().getAttribute("".concat(e,"Span")):c.spans[e];if(t)return t;throw new Error("no span value found with the given type of [".concat(e,"]"))},this.getRemainingSpans=function(e){return c.remainingSpans[e]},this.setRemainingSpans=function(e,t){c.remainingSpans[e]=t},this.getElement=function(){return c.element},this.createCellElement=function(){return document.createElement("td")},e||(this.element=this.createCellElement()),this.setAttribute=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:",",o=c.getElement()[e];"function"!=typeof o&&"object"!==_typeof(o)||(o=c.getElement().getAttribute(e)),c.modifications[e]&&(o=c.modifications[e].default);var n=o;r?n+="".concat(n).concat(a).concat(t):n=t,c.modifications[e]={value:n,default:o},c.getElement()[e]=n},this.setSpan=function(e,t){if(!c.isReference()){var r=c.getSpan(e)-t<0?c.getSpan(e):t;c.setAttribute("".concat(e,"Span"),r),c.setRemainingSpans(e,c.getSpan(e)-r);for(var a=0;a<r-1;a+=1)c.mergedCells[e]&&c.mergedCells[e][a]&&c.mergedCells[e][a].setMergedRenderStatus(!1);return!0}if(!c.getMergedRenderStatus())return!1;var o=c.referenceObject.getRemainingSpans(e);if(0===o)return!1;var n=o-t<0?o:t,l=o-n;if(c.referenceObject.setRemainingSpans(e,l),c.setAttribute("".concat(e,"Span"),n),0!==l)for(var s=c.referenceObject.mergedCells[e].length-o+1,i=s+n-1,d=s;d<i;d+=1)c.mergedCells[e][d].setMergedRenderStatus(!1);return!0},this.resetAttribute=function(e){c.modifications[e]&&(c.getElement()[e]=c.modifications[e].default,c.modifications[e]=void 0)},this.resetAllAttributes=function(){Object.keys(c.modifications).map(function(e){Object.prototype.hasOwnProperty.call(c.modifications,e)&&c.resetAttribute(e)})},{getElement:this.getElement,el:this.element,setAttribute:this.setAttribute,resetAllAttributes:this.resetAllAttributes,getSpan:this.getSpan,setSpan:this.setSpan,getRemainingSpans:this.getRemainingSpans,setRemainingSpans:this.setRemainingSpans,isReference:this.isReference,addToMergedCells:this.addToMergedCells,mergedCells:this.mergedCells,setMergedRenderStatus:this.setMergedRenderStatus,getMergedRenderStatus:this.getMergedRenderStatus}}function t(e){var u=this;return this.tableElement=e,this.parsedTable=[],this.rowCache=[],this.originals={rows:[]},this.rowColors={header:null,even:null,odd:null},this.addToParsed=function(e,t,r){u.parsedTable[e]||(u.parsedTable[e]=[]),u.parsedTable[e][t]=r},this.parseTable=function(){var e=Array.from(u.tableElement.querySelectorAll("tr"));e.map(function(e,d){u.originals.rows.push(e);var t=Array.from(e.querySelectorAll("td")),c=0;t.map(function(e,t){var r=new M(e);u.addToParsed(d,c,r),c+=1;var a=r.getSpan(M.spanTypes.row),o=r.getSpan(M.spanTypes.column);if(1<a)for(var n=1;n<a;n+=1){var l=new M(e,r);r.addToMergedCells("row",l),u.addToParsed(d+n,t,l)}if(1<o)for(var s=1;s<o;s+=1){var i=new M(e,r);r.addToMergedCells("column",i),u.addToParsed(d,c,i),c+=1}})}),u.parseRowColors(e)},this.parseRowColors=function(e){(!e||e.length<=0)&&i("no rows are found to parse their colors","error");
2var t=u.tableElement.dataset.wptbHeaderBackgroundColor,r=u.tableElement.dataset.wptbEvenRowBackgroundColor,a=u.tableElement.dataset.wptbOddRowBackgroundColor;u.rowColors.header=void 0!==t?t:""===e[0].style.backgroundColor?null:e[0].style.backgroundColor;for(var o=1<=e.length/3?0:1===e.length?2:(e.length-1)%2,n=0;n<o;n+=1){var l=document.createElement("tr");u.tableElement.querySelector("tbody").appendChild(l),e.push(l)}u.rowColors.even=r||getComputedStyle(e[1]).backgroundColor,u.rowColors.odd=r?a:getComputedStyle(e[2]).backgroundColor;for(var s=0;s<o;s+=1)e[e.length-(s+1)].remove()},this.addRow=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;Array.isArray(e)||(e=[e]);var a,o=u.tableElement.querySelector("tbody");if(t)a=u.originals.rows[r];else{var n=document.createRange();n.setStart(o,0),a=n.createContextualFragment('<tr class="'.concat(e.join(" "),'"></tr>')).childNodes[0]}return o.appendChild(a),u.rowCache.push(a),{el:a,id:u.rowCache.length-1}},this.clearTable=function(){u.rowCache=[],u.tableElement.querySelector("tbody").innerHTML=""},this.getRow=function(e){return u.rowCache[e]?u.rowCache[e]:(i("no row with id [".concat(e,"] found in the cache."),"warn"),null)},this.maxRows=function(){return u.parsedTable.length},this.maxColumns=function(e){return e?u.parsedTable[0].length:u.parsedTable.reduce(function(e,t){return t.length>e&&(e=t.length),e},0)},this.getCell=function(t,r){var e=2<arguments.length&&void 0!==arguments[2]&&arguments[2];try{if(u.parsedTable[t][r])return e?u.parsedTable[t][r]:u.parsedTable[t][r].el}catch(e){return i("no cell found at the given address of [".concat(t,"-").concat(r,"]"),"warn"),null}return i("no cell found at the given address of [".concat(t,"-").concat(r,"]"),"warn"),null},this.getCellsAtRow=function(e){for(var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=[],a=0;a<u.maxColumns();a+=1){var o=u.getCell(e,a,t);o&&r.push(o)}return r},this.appendToRow=function(e,t,r){var a=u.getRow(r),o=u.getCell(e,t,!0);return o&&a&&a.appendChild(o.getElement()),o},this.appendElementToRow=function(e,t){var r=u.getRow(t);e&&r&&r.appendChild(e)},this.appendObjectToRow=function(e,t){var r=u.getRow(t);e&&r&&r.appendChild(e.getElement())},this.getParsedTable=function(){return u.parsedTable},this.parseTable(),{maxRows:this.maxRows,maxColumns:this.maxColumns,addRow:this.addRow,clearTable:this.clearTable,getCell:this.getCell,appendToRow:this.appendToRow,appendElementToRow:this.appendElementToRow,appendObjectToRow:this.appendObjectToRow,getCellsAtRow:this.getCellsAtRow,el:this.tableElement,rowColors:this.rowColors,getParsedTable:this.getParsedTable}}var r={query:".wptb-preview-table",defaultClasses:["wptb-plugin-responsive-base"],bindToResize:!(M.spanTypes={row:"row",column:"col"})};return function(){var S=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.options=_objectSpread({},r,{},e),this.elements=Array.from(document.querySelectorAll(this.options.query)),this.elementObjects=this.elements.map(function(e){return{el:e,tableObject:new t(e)}}),this.bindRebuildToResize=function(){window.addEventListener("resize",function(){S.rebuildTables()})},this.getDirective=function(e){var t=e.dataset.wptbResponsiveDirectives;return t?JSON.parse(atob(t)):null},this.addDefaultClasses=function(e){e.classList.add(S.options.defaultClasses)},this.removeDefaultClasses=function(e){e.classList.remove(S.options.defaultClasses)},this.autoBuild=function(e,t,r,a){var o=r.cellStackDirection[t],n=r.topRowAsHeader[t],l=r.cellsPerRow[t],s=!!r.staticTopRow&&r.staticTopRow[t],i=(void 0===r.repeatMergedHeader||!0===r.repeatMergedHeader[t])&&!!n&&(!r.repeatMergedHeader||r.repeatMergedHeader[t]);a.clearTable(),"desktop"===t?(S.buildDefault(a),S.removeDefaultClasses(e)):(S.autoDirectionBuild(a,o,n,s,l,i),S.addDefaultClasses(e))},this.autoDirectionBuild=function(c,e){var t=2<arguments.length&&void 0!==arguments[2]&&arguments[2],u=3<arguments.length&&void 0!==arguments[3]&&arguments[3],p=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,r=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],b=c.maxRows(),a=c.maxColumns(),o="row"===e;if(t)S.headerBuild(c,e,p,r);else if(o)!function(){var t=[],a=0;u&&c.getCellsAtRow(0,!0).filter(function(e){return!e.isReference()}).map(function(e){a+=1;var t=c.addRow("wptb-row");if(c.appendObjectToRow(e,t.id),!e.el.style.backgroundColor){var r=c.rowColors.header?c.rowColors.header:getComputedStyle(t.el).backgroundColor;e.setAttribute("style","background-color: ".concat(r),!0,";")}t.el.style.backgroundColor="#ffffff00",e.setAttribute("colSpan",p)});for(var e=a;e<b;
2e+=1)c.getCellsAtRow(e,!0).forEach(function(e){e.isReference()||t.push(e)});for(var r=t.length,o=0,n=0;o<r;o+=p,n+=1){for(var l=c.addRow("wptb-row"),s=0;s<p;s+=1){var i=t[o+s];if(i&&(c.appendElementToRow(i.getElement(),l.id),i.resetAllAttributes(),i.setAttribute("style","width: 100% !important",!0,";"),i.setAttribute("colSpan",1),i.setAttribute("rowSpan",1),!i.el.style.backgroundColor)){var d=0===n?c.rowColors.header?c.rowColors.header:getComputedStyle(l.el).backgroundColor:c.rowColors[n%2==0?"odd":"even"];i.el.style.backgroundColor=d}}l.el.style.backgroundColor="#ffffff00"}}();else{var n=[],l=0;u&&c.getCellsAtRow(0,!0).filter(function(e){return!e.isReference()}).map(function(e){l+=1;var t=c.addRow("wptb-row");if(c.appendObjectToRow(e,t.id),!e.el.style.backgroundColor){var r=c.rowColors.header?c.rowColors.header:getComputedStyle(t.el).backgroundColor;e.el.style.backgroundColor=r}t.el.style.backgroundColor="#ffffff00",e.setAttribute("colSpan",p)});for(var s=0;s<a;s+=1)for(var i=l;i<b;i+=1){var d=c.getCell(i,s,!0);d&&!d.isReference()&&n.push(d)}for(var f=n.length,h=0,m=0;h<f;h+=p,m+=1){for(var y=c.addRow("wptb-row"),v=0;v<p;v+=1){var w=n[h+v];if(w&&(c.appendElementToRow(w.getElement(),y.id),w.resetAllAttributes(),w.setAttribute("style","width: 100% !important",!0,";"),w.setAttribute("colSpan",1),w.setAttribute("rowSpan",1),!w.el.style.backgroundColor)){var g=0===m?c.rowColors.header?c.rowColors.header:getComputedStyle(y.el).backgroundColor:c.rowColors[m%2==0?"odd":"even"];w.el.style.backgroundColor=g}}y.el.style.backgroundColor="#ffffff00"}}},this.headerBuild=function(a,e){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,r=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],o=a.getCellsAtRow(0,!0).map(function(e){return e.resetAllAttributes(),e.el.style.backgroundColor||e.setAttribute("style","background-color: ".concat(a.rowColors.header),!0,";"),e}),n="column"===e,l=a.maxRows(),s=a.maxColumns(),i="3px solid gray";if(n)for(var d=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],r=a.addRow("wptb-row");e&&(r.el.style.borderTop=i),o.map(function(e){var t=e.el.cloneNode(!0);a.appendElementToRow(t,r.id),t.style.backgroundColor||(t.style.backgroundColor="".concat(getComputedStyle(r.el).backgroundColor),t.style.backgroundColor&&(t.style.backgroundColor+=" !important"))}),r.el.style.backgroundColor="#ffffff00"},c=Math.ceil((l-1)/t),u=1,p=0;p<c;p+=1){d(0<p);for(var b=0;b<t&&!(l<=u);b+=1){var f=a.addRow("wptb-row");f.el.style.backgroundColor="#ffffff00";for(var h=0;h<s;h+=1){var m=a.getCell(u,h,!0);if(m){m.resetAllAttributes();var y=!0,v=m.getSpan(M.spanTypes.row);if(m.getSpan(M.spanTypes.column),1<v){var w=t-b,g=Math.min(v,w);y=m.setSpan(M.spanTypes.row,g),m.setMergedRenderStatus(!0)}y&&(m.el.style.backgroundColor||m.setAttribute("style","background-color: ".concat(a.rowColors[b%2==0?"even":"odd"]),!0,";"),a.appendObjectToRow(m,f.id))}}u+=1}}else for(var S=Math.ceil((l-1)/t),C=1,T=0;T<S;T+=1){for(var A=0;A<s;A+=1){var x=a.addRow("wptb-row");if(0<T&&0===A&&(x.el.style.borderTop=i),r||0===T){var R=a.getCell(0,A,!0);if(!R.isReference()){var k=R.el.cloneNode(!0);k.style.backgroundColor="".concat(a.rowColors.header," !important"),a.appendElementToRow(k,x.id),k.style.backgroundColor||(k.style.backgroundColor="".concat(getComputedStyle(x.el).backgroundColor),k.style.backgroundColor&&(k.style.backgroundColor+=" !important")),r?k.setAttribute("rowSpan",k.getAttribute("colSpan")):k.setAttribute("rowSpan",s*S),k.setAttribute("colSpan",1)}}x.el.style.backgroundColor="#ffffff00";for(var E=0;E<t&&!(l<=C+E);E+=1){var I=a.getCell(C+E,A,!0);if(I){I.resetAllAttributes();var P=!0,O=I.getSpan(M.spanTypes.row);if(I.getSpan(M.spanTypes.column),1<O){var _=t-E,j=Math.min(O,_);P=I.setSpan(M.spanTypes.row,j);var B=I.el.getAttribute("rowSpan"),L=I.el.getAttribute("colSpan");I.setAttribute("rowSpan",L),I.setAttribute("colSpan",B),I.setMergedRenderStatus(!0)}if(P){var W=(C+E+T)%2==0?"even":"odd";1===t&&(W=C%2==0?"even":"odd"),I.el.style.backgroundColor||I.setAttribute("style","background-color: ".concat(a.rowColors[W]),!0,";"),a.appendObjectToRow(I,x.id)}}}}C+=t}},this.buildDefault=function(e){for(var t=e.maxRows(),r=e.maxColumns(),a=0;a<t;a+=1)for(var o=e.addRow("",!0,a).id,n=0;n<r;n+=1){var l=e.getCell(a,n,!0);l&&!l.isReference()&&(l.resetAllAttributes(),e.appendElementToRow(l.getElement(),o))}},this.calculateRangeId=function(t,r){var e=Object.keys(r).sort(function(e,t){return r[e].width-r[t].width}),a=e[0];return e.map(function(e){t>=r[e].width&&(a=e)}),a},this.rebuildTable=function(e,t,r){var a=S.getDirective(e);
2if(a){if(!a.responsiveEnabled)return;var o=a.responsiveMode,n=S["".concat(o,"Build")];t||(t=e.getBoundingClientRect().width);var l=S.calculateRangeId(t,a.breakpoints);if(!n)throw new Error("No build mode named as [".concat(o,"] found."));var s=a.modeOptions[o];n.call(S,e,l,s,r),WPTB_RecalculateIndexes(e);var i=new CustomEvent("table:rebuilt",{detail:{sizeRangeId:l,topRowAsHeader:a.modeOptions[o].topRowAsHeader}});e.dispatchEvent(i)}},this.rebuildTables=function(a){S.elementObjects.map(function(e){var t=a;if(!a){t=window.innerWidth;var r=S.getDirective(e.el);if(r&&r.relativeWidth)switch(r.relativeWidth){case"window":t=window.innerWidth;break;case"container":t=e.el.parentNode.parentNode.parentNode.clientWidth;break;default:t=window.innerWidth}}S.rebuildTable(e.el,t,e.tableObject)})},this.options.bindToResize&&this.bindRebuildToResize(),{rebuildTables:this.rebuildTables,getDirective:this.getDirective,calculateRangeId:this.calculateRangeId}}}),function(e,t,r){t[e]=r()}("WPTB_StylePass",self||global,function(){return new function(){var s=this;this.options={stylesheets:{}},this.insertShadowRoot=function(e,t){var r=t.parentNode,a=Array.from(r.children),o=a.indexOf(t),n=0<o-1?null:a[o-1],l=o+1>=a.length?null:a[o+1];s.prepareAllStylesheets(s.options.stylesheets,e.shadowRoot),s.borrowFromTheme(t),e.shadowRoot.appendChild(t),n?n.insertAdjacentElement("afterend",e):l?l.insertAdjacentElement("beforebegin",e):r.appendChild(e)},this.borrowFromTheme=function(e){var t=e.querySelector("table"),r=getComputedStyle(t).fontFamily;t.style.fontFamily=r},this.init=function(e){s.options=_objectSpread({},s.options,{},e);var t=Array.from(document.querySelectorAll("div .wptb-table-container"));0<t.length&&t.map(s.setupStylePass)},this.checkTableEligibility=function(e){return e.querySelector("table").dataset.disableThemeStyles},this.setupStylePass=function(e){if(s.checkTableEligibility(e)){var t=document.createElement("div"),r=e.querySelector("table").dataset.wptbTableContainerMaxWidth;r&&(t.style.maxWidth="".concat(r,"px")),t.attachShadow({mode:"open"}),s.insertShadowRoot(t,e)}},this.prepareAllStylesheets=function(t,r){Object.keys(t).map(function(e){Object.prototype.hasOwnProperty.call(t,e)&&s.prepareStylesheet(e,t[e],r)})},this.prepareStylesheet=function(e,t,r){var a=document.createElement("link");a.setAttribute("id",e),a.setAttribute("href",t),a.setAttribute("rel","stylesheet"),a.setAttribute("media","all"),r.appendChild(a)}}}),jQuery,jQuery(document).ready(function(e){var t,U=document.getElementsByClassName("wptb-table-container");function r(){for(var e=0;e<U.length;e++){var t=U[e],r=!0,a=t.getElementsByClassName("wptb-preview-table"),o=t.getElementsByClassName("wptb-table-container-matrix");if(0<a.length&&0<o.length){if(a=a[0],o=o[0],a.style.display="table",a.dataset.wptbTableAlignment){var n=a.dataset.wptbTableAlignment;t.offsetWidth<a.offsetWidth?a.style.float=null:a.style.float="center"==n?null:n,t.style.float="center"==n?null:n}if(1==a.dataset.reconstraction&&1==a.dataset.wptbAdaptiveTable){var l=t.offsetWidth,s=a.offsetWidth,i=void 0,d=a.rows;0<d.length&&(i=d[0].querySelectorAll("td").length);var c=!1,u=void 0;if((!a.classList.contains("wptb-table-preview-head")||2<i)&&1<i)if(l<s){if(t.style.overflow="unset",o&&!o.classList.contains("wptb-matrix-hide")&&(o.classList.add("wptb-matrix-hide"),c=!0),a.classList.add("wptb-mobile-view-active"),a.rows&&i){var p=s/i,b=Math.floor(l/p);if(b<1&&(b=1),0<t.getElementsByClassName("wptb-preview-table-mobile").length){(u=t.getElementsByClassName("wptb-preview-table-mobile")[0]).classList.remove("wptb-mobile-hide");var f=u.dataset.wholeColumnsInContainer;f==b&&a.classList.contains("wptb-table-preview-head")?r=!1:f==b&&!a.classList.contains("wptb-table-preview-head")&&(480<l||1==u.column)?r=!1:u.parentNode.removeChild(u)}if(r){var h=document.createElement("table"),m=document.createElement("tbody");h.appendChild(m),h.classList.add("wptb-preview-table-mobile");var y=a.className.match(/wptb-element-main(.+)-(\d+)/i);y&&Array.isArray(y)&&h.classList.add(y[0]);var v=a.rows.length,w=void 0,g=!1;if(a.classList.contains("wptb-table-preview-head")){var S=v-1,C=void 0;if(b<v)for(var T=0;T<S;T++){if((C=b-1-T)<=0&&(C=1),0==(w=S%C)){g=!0;break}if(0<C&&C<=6&&C-2*w<0&&w<C){g=!0;break}if(6<C&&C<=12&&C-1.8*w<0&&w<C){g=!0;break}if(12<C&&C<=18&&C-1.6*w<0&&w<C){g=!0;break}}else C=S,g=!(w=0);if(g){var A=void 0;A=0<C?i*Math.ceil(S/C):i,Math.floor((A-1)/i);for(var x=void 0,R=0;R<A;R++){var k=Math.floor(R/i),E=document.createElement("tr"),I=a.rows[0].children[R-k*i].cloneNode(!0),P=void 0,O=window.getComputedStyle(a.rows[0]);I.style.backgroundColor||(I.style.backgroundColor=O.backgroundColor),I.style.width=null,I.style.height=null,I.removeAttribute("data-wptb-css-td-auto-width"),(x=window.getComputedStyle(a.querySelector("td"))).borderTopColor?I.style.borderColor=x.borderTopColor:I.style.borderColor=x.borderBottomColor,0<k&&R%i==0&&(I.style.borderTopWidth="5px"),E.appendChild(I);for(var _=C*k+1;_<C*(k+1)+1;_++){if(_<a.rows.length){P=a.rows[_].children[R-k*i].cloneNode(!0);var j=window.getComputedStyle(a.rows[_]);P.style.backgroundColor||(P.style.backgroundColor=j.backgroundColor),P.style.width=null,P.style.height=null,P.removeAttribute("data-wptb-css-td-auto-width")}else(P=document.createElement("td")).style.borderWidth="0px",P.style.background="#fff";(x=window.getComputedStyle(a.querySelector("td"))).borderTopColor?P.style.borderColor=x.borderTopColor:P.style.borderColor=x.borderBottomColor,0<k&&R%i==0&&(P.style.borderTopWidth="5px"),E.appendChild(P)}m.appendChild(E)}}}else{var B=void 0;if(480<l)for(var L=0;L<i;
2L++){if(0==(B=b-L)&&(B=1),0==(w=i%B)){g=!0;break}if(0<B&&B<=6&&B-2*w<=0&&w<B){g=!0;break}if(6<B&&B<=12&&B-1.8*w<=0&&w<B){g=!0;break}if(12<B&&B<=18&&B-1.6*w<=0&&w<B){g=!0;break}}else B=1,g=!(w=0),h.column=1;var W=Math.ceil(i/B),M=W*v;if(g)for(var H=0;H<M;H++){var q=Math.floor(H/v),D=document.createElement("tr"),N=void 0,z=void 0;N=q!=W-1||0==w?(z=q*B,B*(1+q)):(z=i-w,i);var V=a.rows[H-q*v];D.classList=V.classList,D.style.backgroundColor=V.style.backgroundColor;for(var F=z;F<N;F++){var G=V.children[F].cloneNode(!0);if(!G.style.backgroundColor){var K=window.getComputedStyle(V);G.style.backgroundColor=K.backgroundColor}G.style.width=null,G.style.height=null,G.removeAttribute("data-wptb-css-td-auto-width"),D.appendChild(G)}m.appendChild(D)}}h.dataset.wholeColumnsInContainer=b;var X=h.querySelectorAll("[srcset]");if(0<X.length)for(var Y=0;Y<X.length;Y++)X[Y].removeAttribute("srcset");u=h,t.appendChild(h),c=!0}}}else o&&o.classList.contains("wptb-matrix-hide")&&(o.classList.remove("wptb-matrix-hide"),c=!0,a.classList.remove("wptb-mobile-view-active"),(u=t.querySelector(".wptb-preview-table-mobile"))&&t.getElementsByClassName("wptb-preview-table-mobile")[0].classList.add("wptb-mobile-hide"),t.style.overflow="auto");else a.style.minWidth="auto";if(WPTB_RecalculateIndexes(a),c){WPTB_RecalculateIndexes(u);var Q=new CustomEvent("table:rebuilt",{detail:!0,bubbles:!0});a.dispatchEvent(Q)}}}}}function a(){for(var e=document.getElementsByClassName("wptb-table-container"),t=0;t<e.length;t++){var r=e[t];r.classList.add("wptb-table-container-".concat(t));var a=r.getElementsByClassName("wptb-preview-table");if(0<a.length){(a=a[0]).dataset.wptbTableContainerMaxWidth&&(r.style.maxWidth="".concat(a.dataset.wptbTableContainerMaxWidth,"px")),a.classList.remove("wptb-table-preview-static-indic"),a.mergingСellsHorizontally=!1;for(var o=a.querySelectorAll("td"),n=0;n<o.length;n++)1<o[n].colSpan&&(a.mergingСellsHorizontally=!0);var l=r.offsetWidth,s=a.querySelector("td"),i=window.getComputedStyle(s,null),d=i.getPropertyValue("border-left-width"),c=i.getPropertyValue("border-right-width"),u=i.getPropertyValue("padding-left"),p=i.getPropertyValue("padding-left"),b=parseFloat(u,10)+parseFloat(p,10),f=parseFloat(d,10)+parseFloat(c,10),h=a.dataset.wptbTableTdsSumMaxWidth,m=a.dataset.wptbFixedWidthSize,y=a.dataset.wptbCellsWidthAutoCount,v=!1,w=void 0;h<l?y?(a.style.minWidth="100%",a.mergingСellsHorizontally?(a.style.width="auto",w=(w=(l-m)/y)-b-f,v=!0):a.style.width="100%"):(a.style.width="auto",a.style.minWidth=null,a.style.maxWidth="".concat(h,"px")):(a.style.maxWidth=null,a.style.minWidth="".concat(a.dataset.wptbTableTdsSumMaxWidth,"px"),a.style.width="auto",w=a.dataset.wptbTdWidthAuto?a.dataset.wptbTdWidthAuto:"100",v=!0);var g=document.head;if(g){var S=g.querySelector("style[data-wptb-td-auto-width-".concat(t,'="true"]'));S&&g.removeChild(S)}if(v){var C=document.createElement("style");C.setAttribute("data-wptb-td-auto-width-".concat(t),!0),C.innerHTML=".wptb-table-container-".concat(t," table td[data-wptb-css-td-auto-width=true]{width:").concat(w,"px}"),g&&g.appendChild(C)}}}}t=".wptb-preview-table .wptb-button",Array.from(document.querySelectorAll(t)).map(function(r){r.addEventListener("mouseenter",function(e){var t=e.target;t.dataset.wptbElementHoverBgColor&&(t.style.backgroundColor=t.dataset.wptbElementHoverBgColor),t.dataset.wptbElementHoverTextColor&&(t.style.color=t.dataset.wptbElementHoverTextColor),t.dataset.wptbElementHoverScale&&(t.style.transform="scale(".concat(r.dataset.wptbElementHoverScale,")"))}),r.addEventListener("mouseleave",function(e){var t=e.target;t.dataset.wptbElementHoverBgColor&&(t.style.backgroundColor=t.dataset.wptbElementBgColor),t.dataset.wptbElementHoverTextColor&&(t.style.color=t.dataset.wptbElementColor),t.dataset.wptbElementHoverScale&&(t.style.transform="scale(1)")})}),a(),r(),e(window).resize(function(){a(),r()});for(var o=document.getElementsByClassName("wptb-ph-element"),n=0;n<o.length;n++){var l=o[n];if(l.classList.contains("wptb-list-item-container")&&(l.classList.remove("wptb-list-item-container"),l.classList.add("wptb-list-container")),l.classList.contains("wptb-button-container")){var s=l.className.match(/wptb-size-([A-Z]+)/i);if(s&&Array.isArray(s)){var i=s[0],d=i.toLowerCase();l.classList.remove(i);var c=l.querySelector(".wptb-button-wrapper");c&&c.classList.add(d)}}}var u=new WPTB_ResponsiveFrontend({query:".wptb-preview-table",bindToResize:!0});!function(){for(var e=document.querySelectorAll(".wptb-preview-table"),t=0;t<e.length;t++)new WPTB_SortableTable({table:e[t]}).sortableTableInitialization(u)}();var p=new CustomEvent("responsive:front",{detail:{responsiveFront:u}});document.dispatchEvent(p),u.rebuildTables(),WPTB_StylePass.init(WptbFrontendData.stylePass)});
3//# sourceMappingURL=wp-table-builder-frontend.js.map;
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.