nih-gov/ncbiinsights.ncbi.nlm.nih.gov/_static/index.html??-eJwrL9BNzs8rSc0r0S%2FIKU3PzCvWLy%2FQLUlMyknVTSrNzElJLdLPzEvWTysCq0rRz8JUoAuT1Msq1inHNDAxO7M4N7VEPx5kEJSDrMc+19bQ3NjS0sDc0tQMAMvfNaI=

379 lines
77 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 _wrapRegExp(){_wrapRegExp=function(e,t){return new o(e,void 0,t)};var n=RegExp.prototype,l=new WeakMap;function o(e,t,r){t=RegExp(e,t);return l.set(t,r||l.get(e)),_setPrototypeOf(t,o.prototype)}function a(n,e){var a=l.get(e);return Object.keys(a).reduce(function(e,t){var r=a[t];if("number"==typeof r)e[t]=n[r];else{for(var o=0;void 0===n[r[o]]&&o+1<r.length;)o++;e[t]=n[r[o]]}return e},Object.create(null))}return _inherits(o,RegExp),o.prototype.exec=function(e){var t,e=n.exec.call(this,e);return e&&(e.groups=a(e,this),t=e.indices)&&(t.groups=a(t,this)),e},o.prototype[Symbol.replace]=function(e,t){var r,o;return"string"==typeof t?(r=l.get(this),n[Symbol.replace].call(this,e,t.replace(/\$<([^>]+)>/g,function(e,t){t=r[t];return"$"+(Array.isArray(t)?t.join("$"):t)}))):"function"==typeof t?(o=this,n[Symbol.replace].call(this,e,function(){var e=arguments;return"object"!=_typeof(e[e.length-1])&&(e=[].slice.call(e)).push(a(e,o)),t.apply(this,e)})):n[Symbol.replace].call(this,e,t)},_wrapRegExp.apply(this,arguments)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,a,l,i=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(o=a.call(r)).done)&&(i.push(o.value),i.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw n}}return i}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}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 _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 _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){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])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,o=Array(t);r<t;r++)o[r]=e[r];return o}document.addEventListener("DOMContentLoaded",function(){var e;e=function(){function r(e){var t=this,r=(this.parentContainer=null,this.matrixContainer=null,this.mainTable=null,this.id=null,function(e){var e=e.getAttribute("id");return e?(e=(null==(e=e.match(_wrapRegExp(/^wptb\x2Dtable\x2Did\x2D(\d+)$/,{id:1})))?void 0:e.groups).id,parseInt(e,10)):null});if(!e.classList.contains("wptb-table-container"))throw new Error("invalid table top level container");e=(t.parentContainer=e).querySelector(".wptb-table-container-matrix");if(!e)throw new Error("invalid matrix container");if(t.matrixContainer=e,!(e=t.matrixContainer.querySelector("table.wptb-preview-table")))throw new Error("invalid table element");t.mainTable=e,t.mainTable&&(t.id=r(t.matrixContainer))}var e=new function(){var t=[];this.getTableObjects=function(){return t},this.init=function(){Array.from(document.querySelectorAll(".wptb-table-container")).map(function(e){t.push(new r(e))})}};return e.init(),e},(self||global)["WptbFrontendBase"]=e()}),function(e,t,r){"undefined"!=typeof module&&"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=r():t[e]=r()}("WPTB_ExtraStyles",self||global,function(){return new function(){function o(e){var t,r,o,n,a=e.dataset.wptbExtraStyles;a&&(a=atob(a),t=e.getAttribute("class").match(/wptb-element-main-table_setting-(?:startedid-)?(\d+)/),n="wptb-extra-styles-"+(t=_slicedToArray(t,2)[1]),(o=null==(r=l.baseDocument.querySelector("head"))?void 0:r.querySelector("#".concat(n)))||((o=document.createElement("style")).type="text/css",o.id=n,e.dataset.disableThemeStyles&&l.currentMode===l.modes.frontEnd||l.currentMode===l.modes.block?(e.insertAdjacentElement("beforebegin",o),l.currentMode===l.modes.frontEnd&&l.generalStyles&&s(l.generalStyles,e)):r.appendChild(o)),n=".wptb-element-main-table_setting-".concat(t),e=i(n,a),o.innerHTML="",o.appendChild(document.createTextNode(e)))}var l=this,n=(this.modes={builder:"builder",frontEnd:"frontEnd",block:"block"},this.baseDocument=document,this.currentMode=this.modes.builder,this.generalStyles="",_defineProperty(_defineProperty(_defineProperty({},this.modes.builder,".wptb-table-setup .wptb-preview-table"),this.modes.block,".wptb-block-table-setup .wptb-preview-table"),this.modes.frontEnd,".wptb-table-container .wptb-preview-table")),t=function(e){return e.replaceAll(/(\r?\n)|(\/\*.+?\*\/)|(\s*!important)/g,"").replaceAll(";"," !important;")},i=function(r,e){var e=t(e).split("}"),o=[];return e.map(function(e){var t=new RegExp(/(.+?)\{/g).exec(e);t&&(r===t[1].trim()?o.push(e):o.push(e.replace(t[1],"".concat(r," ").concat(t[1]))))}),"".concat(o.join("}"),"}")},s=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,r=document.createElement("style"),t=(r.type="text/css",r.id="wptb-general-styles",t?t.insertAdjacentElement("beforebegin",r):(l.currentMode===l.modes.block?l.baseDocument:l.baseDocument.querySelector("head")).appendChild(r),i(e.parentPrefix,e.styles));r.appendChild(document.createTextNode(t))};this.applyStyles=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:l.modes.frontEnd,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:document,r=(l.baseDocument=r,l.currentMode=e,l.generalStyles=t,Array.from(l.baseDocument.querySelectorAll(n[e])));r&&r.map(o),e!==l.modes.frontEnd&&e!==l.modes.block||!t||s(t)}}}),function(e,t,r){"undefined"!=typeof module&&"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=r():t[e]=r()}("WPTB_Logger",self||global,function(){var t={normal:"#48BB78"};return{prepareMessage:function(e){return"%c WP Table Builder %c {message} ".replace("{message}",e)},prepareMessageStyle:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"normal",e=t[e]?e:"normal";return"background-color: {bgColor} ; padding: 3px; color: #FFF; border-radius: 0 5px 5px 0;".replace("{bgColor}",t[e])},log:function(e){console.log(this.prepareMessage(e),"border-radius:5px 0 0 5px; background-color: #3299D1; padding: 3px; color: #FFF; font-weight: bold;",this.prepareMessageStyle("normal"))}}});var WPTB_CutGlueTable={cutTableHorizontally:function(e,t){if(t&&t.rows[e])for(var r=0;r<e;r++)for(var o=t.rows[r].children,n=0;n<o.length;n++)if(1<o[n].rowSpan&&o[n].rowSpan>e-r){for(var a=o[n].rowSpan-e+r,l=(o[n].rowSpan=e-r,o[n].dataset.sameCellBeforeDivision||(o[n].dataset.sameCellBeforeDivision="r"+r+"c"+n),void 0),l=t.hasOwnProperty("wptbCell")?(l=new t.wptbCell(t.mark)).getDOMElement():document.createElement("td"),i=o[n].getAttribute("style"),i=(l.setAttribute("style",i),l.colSpan=o[n].colSpan,l.rowSpan=a,l.dataset.sameCellBeforeDivision=o[n].dataset.sameCellBeforeDivision,o[n].dataset.xIndex),s=parseInt(i)+parseInt(o[n].colSpan),c=void 0;!c&&s<t.maxCols;)c=t.rows[e].querySelector('[data-x-index="'+s+'"]'),s++;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 o=t[r].dataset.sameCellBeforeDivision,n=e.querySelectorAll('[data-same-cell-before-division="'+o+'"]'),a=0;a<n.length;a++)if(n[a]&&n[a+1]&&n[a].parentNode&&n[a+1].parentNode&&!n[a].parentNode.classList.contains("wptb-row-moving")&&!n[a+1].parentNode.classList.contains("wptb-row-moving")&&n[a+1].dataset.yIndex==parseInt(n[a].dataset.yIndex)+parseInt(n[a].rowSpan)){n[a].rowSpan+=n[a+1].rowSpan;for(var l=_toConsumableArray(n[a+1].children),i=0;i<l.length;i++)n[a].appendChild(l[i]);n[a+1].parentNode.removeChild(n[a+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 o,n,a=t.rows[r].children,l=void 0,i=a.length,s=void 0,c=0;c<i;c++)if(1<a[c].colSpan&&parseInt(a[c].dataset.xIndex)<e&&parseInt(a[c].dataset.xIndex)+parseInt(a[c].colSpan)>e){l=t.hasOwnProperty("wptbCell")?(l=new t.wptbCell(t.mark)).getDOMElement():document.createElement("td"),o=a[c].rowSpan,n=a[c].colSpan,a[c].colSpan=e-a[c].dataset.xIndex,n=n-a[c].colSpan,a[c].dataset.sameCellBeforeDivision||(a[c].dataset.sameCellBeforeDivision="r"+r+"c"+c);var d=a[c].getAttribute("style"),d=(l.setAttribute("style",d),t.querySelector('[data-x-index="'+e+'"]')),d=(d&&(l.style.width=d.style.width),t.querySelector('[data-y-index="'+r+'"]'));d&&(l.style.height=d.style.height),s=a[c+1]||null,t.rows[r].insertBefore(l,s),l.colSpan=n,l.rowSpan=o,l.dataset.sameCellBeforeDivision=a[c].dataset.sameCellBeforeDivision,r+=o-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 o=t[r].dataset.sameCellBeforeDivision,n=_toConsumableArray(e.querySelectorAll('[data-same-cell-before-division="'+o+'"]')),a=null,l=0;l<n.length;l++)if(n[l]&&n[l+1]&&!n[l].classList.contains("wptb-column-moving")&&!n[l+1].classList.contains("wptb-column-moving")&&n[l+1].dataset.xIndex==parseInt(n[l].dataset.xIndex)+parseInt(n[l].colSpan)){n[a=null==a?l:a].colSpan+=n[l+1].colSpan;for(var i=_toConsumableArray(n[l+1].children),s=0;s<i.length;s++)n[a].appendChild(i[s]);n[l+1].parentNode.removeChild(n[l+1])}WPTB_RecalculateIndexes(e)}}},WPTB_GetDirectionAfterReconstruction=function(o,n,a,r,l){var i=0,s=o.maxCols,e={},c=[];return l&&l.getDirective(o)?e.switch=function(e){var t=l.getDirective(o),r="desktop";return e&&e.detail&&(r=e.detail.sizeRangeId),c=[n,1],"desktop"!==r?t.hasOwnProperty("modeOptions")&&(e=t.responsiveMode,(t=t.modeOptions[e]).hasOwnProperty("topRowAsHeader")&&t.topRowAsHeader.hasOwnProperty(r)&&t.topRowAsHeader[r]?t.hasOwnProperty("cellStackDirection")&&t.cellStackDirection.hasOwnProperty(r)&&("row"===t.cellStackDirection[r]?(c=[a,2],i=s-1):"column"===t.cellStackDirection[r]&&t.hasOwnProperty("cellsPerRow")&&(i=t.cellsPerRow[r])):i=0):i=0,{type:c,itemsPerHeader:i}}:e.switch=function(e){var t;return c=[n,1],o.classList.contains("wptb-mobile-view-active")?(o.classList.contains("wptb-table-preview-head")&&(c=[a,2])===r&&(i=s-1),t=o.parentNode.parentNode.querySelector(".wptb-preview-table-mobile"),{type:c,itemsPerHeader:i,newTable:t}):{type:c,itemsPerHeader:i}},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){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])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,o=Array(t);r<t;r++)o[r]=e[r];return o}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 U=this.table=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).table,a=(WPTB_RecalculateIndexes(U),this);function t(e,t,r){var o,n,a;"TD"===e.target.tagName&&(o=null==e.offsetX?e.layerX:e.offsetX,n=null==e.offsetY?e.layerY:e.offsetY,a=!1,a="vertical"===t&&e.target.clientWidth-o<=35||"horizontal"===t&&o<=35||a)&&(e.target.clientHeight-35)/2<n&&(e.target.clientHeight+35)/2>n?r.classList.add("sortable-hover"):r.classList.remove("sortable-hover")}function c(e){t(e,"vertical",this)}function d(e){t(e,"horizontal",this)}function u(){this.classList.remove("sortable-hover")}function r(e,t){if(e.target&&"TD"===e.target.tagName&&!U.parentNode.classList.contains("wptb-preview-table-manage-cells")){var r=e.currentTarget,o=!1;if("vertical"===t&&e.target.dataset.hasOwnProperty("sortedVertical")){var n=[],a=[];if(this.itemsPerHeader&&this.itemsPerHeader<r.rows.length){WPTB_RecalculateIndexes(r);for(var l=_toConsumableArray(r.rows),i=r.querySelector("tbody")?r.querySelector("tbody"):r,s=0;s<l.length;s++)s<e.target.dataset.yIndex?(n.push(l[s]),i.removeChild(l[s])):s>parseInt(e.target.dataset.yIndex,10)+this.itemsPerHeader&&(a.push(l[s]),i.removeChild(l[s]));WPTB_RecalculateIndexes(r)}var c,d,u=r.querySelectorAll('[data-x-index="'.concat(e.target.dataset.xIndex,'"]'));(u=_toConsumableArray(u)).map(function(e){c=(c=parseInt(e.rowSpan,10))||1,d=e.dataset.yIndex,WPTB_CutGlueTable.cutTableHorizontally(d,r),d+=c,WPTB_CutGlueTable.cutTableHorizontally(d,r)});for(var M,p=[],W=0,z=[],b=0;b<u.length;b++){var f=Q(e,r,u,b,W,"vertical");if(f&&f.hasOwnProperty("i"))u=f.tds,b=f.i;else{for(var y=(u=f?f.tds:u)[b],m=(m=parseInt(y.rowSpan,10))||1,W=parseInt(y.dataset.yIndex,10)+m,f=Z(y),h=[],g=0;g<m;g++)h.push(r.rows[parseInt(y.dataset.yIndex,10)+g]),z.push(parseInt(y.dataset.yIndex,10)+g);0<y.dataset.yIndex?p.push({rowsTd:h,value:f}):M=h}}var D=X(e,"sortedVertical");if(!D)return;if(p.length&&p.sort(function(e,t){return J(D,e,t)}),p.unshift({rowsTd:M}),p.length<r.rows.length)for(var N,w=0;w<r.rows.length;w++)-1<z.indexOf(w)||((N=[]).push(r.rows[w]),p.push({rowsTd:N}));var v,H,q,S=r.querySelector("tbody");S.innerHTML="",p.map(function(e){e.rowsTd.map(function(e){S.appendChild(e)})}),n.length&&(v=r.querySelector("tbody")?r.querySelector("tbody"):r)&&(H=v.querySelector("tr"),n.map(function(e){v.insertBefore(e,H)})),a.length&&(q=r.querySelector("tbody")?r.querySelector("tbody"):r,S)&&a.map(function(e){q.appendChild(e)}),WPTB_RecalculateIndexes(r),WPTB_CutGlueTable.glueTableHorizontally(r),o=!0}else if("horizontal"===t&&"0"===e.target.dataset.xIndex){var C,T,A=r.querySelectorAll('[data-y-index="'.concat(e.target.dataset.yIndex,'"]'));(A=_toConsumableArray(A)).map(function(e){C=(C=parseInt(e.colSpan,10))||1,T=e.dataset.xIndex,WPTB_CutGlueTable.cutTableVertically(T,r),T+=C,WPTB_CutGlueTable.cutTableVertically(T,r)});for(var F,x=[],V=0,_=0;_<A.length;_++){var E=Q(e,r,A,_,V,"horizontal");if(E&&E.hasOwnProperty("i"))A=E.tds,_=E.i;else{for(var k=(A=E?E.tds:A)[_],R=(R=parseInt(k.colSpan,10))||1,V=parseInt(k.dataset.xIndex,10)+R,E=Z(k),P=[],O=0;O<R;O++){var K=_toConsumableArray(r.querySelectorAll('[data-x-index="'.concat(parseInt(k.dataset.xIndex,10)+O,'"]')));P.push(K)}0<k.dataset.xIndex?x.push({columnsTd:P,value:E}):F=P}}var $=X(e,"sortedHorizontal");if(!$)return;if(x.length&&x.sort(function(e,t){return J($,e,t)}),x.unshift({columnsTd:F}),x.length<r.maxCols)for(var G=r.maxCols-x.length,I=0;I<G;I++){var Y=_toConsumableArray(r.querySelectorAll('[data-x-index="'.concat(parseInt(r.maxCols,10)-parseInt(G,10)+I,'"]')));x.push({columnsTd:[Y]})}for(var j=0;j<r.rows.length;j++)r.rows[j].innerHTML="";x.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),o=!0}if(o){for(var L=_toConsumableArray(r.getElementsByTagName("td")),B=0;B<L.length;B++)L[B].hasAttribute("data-same-cell-before-division")&&L[B].removeAttribute("data-same-cell-before-division");r.hasOwnProperty("tableSM")&&(new(r.tableSM())).tableStateSet(),this.reassignElementsStyles("td"),this.reassignElementsStyles("tr")}}}function X(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 J(e,t,r){var o=0<arguments.length&&void 0!==e?e:"ask",n=(1<arguments.length?t:void 0).value,a=(2<arguments.length?r:void 0).value;return parseInt(n)&&parseInt(a)&&(n=parseInt(n),a=parseInt(a)),"ask"===o?n<a?-1:n===a?0:1:n<a?1:n===a?0:-1}function Z(e){for(var t=e.querySelectorAll(".wptb-text-container"),t=_toConsumableArray(t),r="",o=0;o<t.length;o++)r+=t[o].innerText,o!==t.length-1&&(r+=" ");return r}function Q(e,t,r,o,n,a){var l,i,s,c,d,u,p,b=r[o],f=!1;if("vertical"===a?(i="colSpan",s="data-y-index",c="yIndex",d="xIndex",u="rowSpan",p=t.rows.length):"horizontal"===a&&(i="rowSpan",s="data-x-index",c="xIndex",d="yIndex",u="colSpan",p=t.maxCols),0<b.dataset[c]-n)for(var y=t.querySelectorAll("[".concat(s,'="').concat(n,'"]')),m=0;m<y.length;m++)if(l=(l=y[m][i])||1,y[m].dataset[d]<e.target.dataset[d]&&parseInt(y[m].dataset[d],10)+parseInt(l,10)>e.target.dataset[d]){r.splice(o,0,y[m]),f=!0,o--;break}if(f)return{tds:r,i:o};a=(a=parseInt(b[u],10))||1;if(o==r.length-1&&parseInt(b.dataset[c],10)+a<p){y=t.querySelectorAll("[".concat(s,'="').concat(parseInt(b.dataset[c],10)+a,'"]'));for(var h=0;h<y.length;h++)if(l=(l=y[h][i])||1,y[h].dataset[d]<e.target.dataset[d]&&parseInt(y[h].dataset[d],10)+parseInt(l,10)>e.target.dataset[d]){r.push(y[h]),f=!0;break}}return!!f&&{tds:r}}return this.itemsPerHeader=0,this.tableMaxCols=U.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=U.parentNode.parentNode.querySelector(".wptb-preview-table-mobile"):this.table.classList.contains("wptb-preview-table-mobile")&&!e&&(this.table=U.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 o=t[r],n=window.getComputedStyle(o,null).getPropertyValue("background-color"),a="";"td"===e?(a=o.dataset.xIndex+"-"+o.dataset.yIndex,this.cellsStylesScheme[a]={backgroundColor:n}):"tr"===e&&(a=String(r),this.rowsStylesScheme[a]={backgroundColor:n})}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 o=0;o<r.length;o++){var n=r[o],a="";if("td"===e?a=n.dataset.xIndex+"-"+n.dataset.yIndex:"tr"===e&&(a=o),t.hasOwnProperty(a)){var l,i=t[a];for(l in i)n.style[l]=i[l]}}this.tableObjectChange(!1)},this.sortableTableInitialization=function(e){var t,r,o,n;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&&(o=WPTB_GetDirectionAfterReconstruction(this.table,t,r,"vertical",e),"object"===_typeof(o))&&o.hasOwnProperty("switch")&&((n=function(e){var t,e=o.switch(e);"object"===_typeof(e)&&(this.itemsPerHeader=e.itemsPerHeader,e.hasOwnProperty("newTable")?(t=this.table,this.table=e.newTable,this.sortModeSwitcher(e.type[0],!0),this.table=t):this.sortModeSwitcher(e.type[0],!0))}).call(a),this.table.addEventListener("table:rebuilt",function(e){n.call(a,e)},!1))},this.sortingCellMouseMoveSwitcher=function(e,t){var r=this;function o(e,t,r){e.removeEventListener("mousemove",t,!1),e.removeEventListener("mouseleave",u,!1),r&&(e.addEventListener("mousemove",t,!1),e.addEventListener("mouseleave",u,!1))}function n(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 a=this.table.querySelectorAll("td");if(a.length&&(a=_toConsumableArray(a)).map(function(e){o(e,c,!1),n(e,"sortedVertical",!1),o(e,d,!1),n(e,"sortedHorizontal",!1)}),t)if("vertical"===e)for(var l=this.table.rows.length,i=0;0<l;){var s=this.table.querySelectorAll('[data-y-index="'.concat(i,'"]'));(s=_toConsumableArray(s)).map(function(e){o(e,c,t),n(e,"sortedVertical",t)}),this.itemsPerHeader?(l-=this.itemsPerHeader+1,i+=this.itemsPerHeader+1):l=0}else"horizontal"===e&&(a=this.table.querySelectorAll('[data-x-index="0"]'),(a=_toConsumableArray(a)).map(function(e){2<r.table.querySelectorAll('[data-y-index="'.concat(e.dataset.yIndex,'"]')).length&&(o(e,d,t),n(e,"sortedHorizontal",t))}))},this.sortableTableVerticalStart=function(e){r.call(a,e,"vertical")},this.sortableTableHorizontalStart=function(e){r.call(a,e,"horizontal")},this}});var WPTB_RecalculateIndexes=function(e){for(var t,r=e.getElementsByTagName("tr"),o=0,n=0,a=[],l=0;l<r.length;l++){t=r[l].getElementsByTagName("td"),null==a[l]&&(a[l]=[]);for(var i=0,s=0;s<t.length;s++){if(null!=a[l][s])for(var c=0;c<100;c++){if(null==a[l][i]){a[l][i]=t[s],t[s].dataset.xIndex=i;break}i++}else a[l][s]=t[s],t[s].dataset.xIndex=i;if(t[s].dataset.yIndex=l,1<t[s].colSpan)for(var d=1;d<t[s].colSpan;d++)a[l][++i]="tdDummy";if(1<t[s].rowSpan)for(var u=1;u<t[s].rowSpan;u++){null==a[l+u]&&(a[l+u]=[]);for(var p=0;p<t[s].colSpan;p++)a[l+u][i-t[s].colSpan+1+p]="tdDummy"}i++}t.length>o&&(o=t.length),0==l&&(n=i)}e.columns=o,e.maxCols=n};function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,a,l,i=[],s=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(o=a.call(r)).done)&&(i.push(o.value),i.length!==t);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw n}}return i}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function ownKeys(t,e){var r,o=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,r)),o}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=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}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 _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,o=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,r)),o}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=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}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){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])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,o=Array(t);r<t;r++)o[r]=e[r];return o}function ownKeys(t,e){var r,o=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,r)),o}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=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}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_ResponsiveFrontend",self||global,function(){function s(e,t){var r=1<arguments.length&&void 0!==t?t:"log";if("undefined"!=typeof process&&"development"===process.env.NODE_ENV){if(!console[r])throw new Error("no logging type found with given type value of [".concat(r,"]"));console[r]("[WPTB]: ".concat(e))}}function R(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){var t;Object.prototype.hasOwnProperty.call(c.spans,e)&&(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],o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:",",n=c.getElement()[e],a=("function"!=typeof n&&"object"!==_typeof(n)||(n=c.getElement().getAttribute(e)),n=c.modifications[e]?c.modifications[e].default:n);r?a+="".concat(a).concat(o).concat(t):a=t,c.modifications[e]={value:a,default:n},c.getElement()[e]=a},this.setSpan=function(e,t){if(c.isReference()){if(!c.getMergedRenderStatus())return!1;var r=c.referenceObject.getRemainingSpans(e);if(0===r)return!1;var o=r-t<0?r:t,n=r-o;if(c.referenceObject.setRemainingSpans(e,n),c.setAttribute("".concat(e,"Span"),o),0!=n)for(var n=c.referenceObject.mergedCells[e].length-r+1,a=n+o-1,l=n;l<a;l+=1)c.mergedCells[e][l].setMergedRenderStatus(!1)}else{var i=c.getSpan(e)-t<0?c.getSpan(e):t;c.setAttribute("".concat(e,"Span"),i),c.setRemainingSpans(e,c.getSpan(e)-i);for(var s=0;s<i-1;s+=1)c.mergedCells[e]&&c.mergedCells[e][s]&&c.mergedCells[e][s].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.filter(function(e){return"true"!==e.dataset.wptbResponsiveIgnore}).map(function(e,c){u.originals.rows.push(e);var e=Array.from(e.querySelectorAll("td")),d=0;e.map(function(e,t){var r=new R(e),o=(u.addToParsed(c,d,r),d+=1,r.getSpan(R.spanTypes.row)),n=r.getSpan(R.spanTypes.column);if(1<o)for(var a=1;a<o;a+=1){var l=new R(e,r);r.addToMergedCells("row",l),u.addToParsed(c+a,t,l)}if(1<n)for(var i=1;i<n;i+=1){var s=new R(e,r);r.addToMergedCells("column",s),u.addToParsed(c,d,s),d+=1}})}),u.parseRowColors(e)},this.parseRowColors=function(e){(!e||e.length<=0)&&s("no rows are found to parse their colors","error");for(var t=u.tableElement.dataset.wptbHeaderBackgroundColor,r=u.tableElement.dataset.wptbEvenRowBackgroundColor,o=u.tableElement.dataset.wptbOddRowBackgroundColor,n=(u.rowColors.header=void 0!==t?t:""===e[0].style.backgroundColor?null:e[0].style.backgroundColor,1<=e.length/3?0:1===e.length?2:(e.length-1)%2),a=0;a<n;a+=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?o:getComputedStyle(e[2]).backgroundColor;for(var i=0;i<n;i+=1)e[e.length-(i+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,o=(Array.isArray(e)||(e=[e]),u.tableElement.querySelector("tbody")),r=t?u.originals.rows[r]:((t=document.createRange()).setStart(o,0),t.createContextualFragment('<tr class="'.concat(e.join(" "),'"></tr>')).childNodes[0]);return o.appendChild(r),u.rowCache.push(r),{el:r,id:u.rowCache.length-1}},this.clearTable=function(){u.rowCache=[],u.tableElement.querySelector("tbody").innerHTML=""},this.getRow=function(e){return u.rowCache[e]||(s("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 e=t.length>e?t.length:e},0)},this.getCell=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2];try{if(u.parsedTable[e][t])return r?u.parsedTable[e][t]:u.parsedTable[e][t].el}catch(e){}return s("no cell found at the given address of [".concat(e,"-").concat(t,"]"),"warn"),null},this.getCellsAtRow=function(e){for(var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=[],o=0;o<u.maxColumns();o+=1){var n=u.getCell(e,o,t);n&&r.push(n)}return r},this.appendToRow=function(e,t,r){r=u.getRow(r),e=u.getCell(e,t,!0);return e&&r&&r.appendChild(e.getElement()),e},this.appendElementToRow=function(e,t){t=u.getRow(t);e&&t&&t.appendChild(e)},this.appendObjectToRow=function(e,t){t=u.getRow(t);e&&t&&t.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:!(R.spanTypes={row:"row",column:"col"})};return function(){function O(e){var t,r=!1;return e.style.backgroundColor&&(t=new RegExp(/^rgba\(\s?0\s?,\s?0\s?,\s?0\s?,\s?0\s?\)$/g),r=null!==e.style.backgroundColor.match(t)),r}function s(e,t){var r;e.dataset.wptbHorizontalScrollStatus&&(r=e.parentNode,t?(t=e.dataset.wptbTableContainerMaxWidth,r.style.width="".concat(t,"px")):r.style.width="")}function c(e){return!!e&&e.responsiveEnabled}function d(e,t){var r;return"desktop"!==(t=I.calculateRangeId(t,e.breakpoints))&&(r=e.responsiveMode,(e=e.modeOptions[r]).disabled)&&!e.disabled[t]}function o(e){var t=document.body.clientWidth,r=I.getDirective(e);if(r&&r.relativeWidth)switch(r.relativeWidth){case"window":t=document.body.clientWidth;break;case"container":t=e.parentNode.parentNode.parentNode.clientWidth;break;default:t=document.body.clientWidth}return t}var I=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.options=_objectSpread(_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(){I.rebuildTables()})},this.getDirective=function(e){e=e.dataset.wptbResponsiveDirectives;return e?JSON.parse(atob(e)):null},this.addDefaultClasses=function(e){e.classList.add(I.options.defaultClasses)},this.removeDefaultClasses=function(e){e.classList.remove(I.options.defaultClasses)},this.autoBuild=function(e,t,r,o){var n=r.cellStackDirection[t],a=r.topRowAsHeader[t],l=r.cellsPerRow[t],i=!!r.staticTopRow&&r.staticTopRow[t],r=(void 0===r.repeatMergedHeader||!0===r.repeatMergedHeader[t])&&!!a&&(!r.repeatMergedHeader||r.repeatMergedHeader[t]);o.clearTable(),"desktop"===t?(s(e,!0),I.buildDefault(o),I.removeDefaultClasses(e)):(s(e,!1),I.autoDirectionBuild(o,n,a,i,l,r),I.addDefaultClasses(e))},this.autoDirectionBuild=function(o,e){var t=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=3<arguments.length&&void 0!==arguments[3]&&arguments[3],n=4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,a=!(5<arguments.length&&void 0!==arguments[5])||arguments[5],l=o.maxRows(),i=o.maxColumns(),s="row"===e;if(t)I.headerBuild(o,e,n,a);else if(s){var c=[],d=0;r&&(0<(t=o.getCellsAtRow(0,!0).filter(function(e){return!e.isReference()})).length&&(d+=1),t.map(function(e){var t,r=o.addRow("wptb-row");o.appendObjectToRow(e,r.id),e.el.style.backgroundColor&&!O(e.el)||(t=o.rowColors.header||getComputedStyle(r.el).backgroundColor,e.setAttribute("style","background-color: ".concat(t),!0,";")),r.el.style.backgroundColor="#ffffff00",e.setAttribute("colSpan",n)}));for(var u=d;u<l;u+=1)o.getCellsAtRow(u,!0).forEach(function(e){e.isReference()||c.push(e)});for(var p=c.length,b=0,f=0;b<p;b+=n,f+=1){for(var y=o.addRow("wptb-row"),m=0;m<n;m+=1){var h,g=c[b+m];g&&(o.appendElementToRow(g.getElement(),y.id),g.resetAllAttributes(),g.setAttribute("style","width: 100% !important",!0,";"),g.setAttribute("colSpan",1),g.setAttribute("rowSpan",1),g.el.style.backgroundColor&&!O(g.el)||(h=o.rowColors[(d+f)%2==0?"odd":"even"],g.el.style.backgroundColor=h||getComputedStyle(y.el).backgroundColor))}y.el.style.backgroundColor="#ffffff00"}}else{var w=[],v=0;r&&(0<(a=o.getCellsAtRow(0,!0).filter(function(e){return!e.isReference()})).length&&(v+=1),a.map(function(e){var t=o.addRow("wptb-row");o.appendObjectToRow(e,t.id),e.el.style.backgroundColor&&!O(e.el)||(e.el.style.backgroundColor=o.rowColors.header||getComputedStyle(t.el).backgroundColor),t.el.style.backgroundColor="#ffffff00",e.setAttribute("colSpan",n)}));for(var S=0;S<i;S+=1)for(var C=v;C<l;C+=1){var T=o.getCell(C,S,!0);T&&!T.isReference()&&w.push(T)}for(var A=w.length,x=0,_=0;x<A;x+=n,_+=1){for(var E=o.addRow("wptb-row"),k=0;k<n;k+=1){var R,P=w[x+k];P&&(o.appendElementToRow(P.getElement(),E.id),P.resetAllAttributes(),P.setAttribute("style","width: 100% !important",!0,";"),P.setAttribute("colSpan",1),P.setAttribute("rowSpan",1),P.el.style.backgroundColor&&!O(P.el)||(R=o.rowColors[(v+_)%2==0?"odd":"even"],P.el.style.backgroundColor=R||getComputedStyle(E.el).backgroundColor))}E.el.style.backgroundColor="#ffffff00"}}},this.headerBuild=function(r,e){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,o=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],n=r.getCellsAtRow(0,!0).map(function(e){return e.resetAllAttributes(),e.el.style.backgroundColor&&!O(e.el)||e.setAttribute("style","background-color: ".concat(r.rowColors.header),!0,";"),e}),a="column"===e,l=r.maxRows(),i=r.maxColumns(),s="3px solid gray";if(a)for(var c=0===(c=Math.ceil((l-1)/t))?1:c,d=1,u=0;u<c;u+=1){!function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=r.addRow("wptb-row");e&&(t.el.style.borderTop=s),n.map(function(e){e=e.el.cloneNode(!0);r.appendElementToRow(e,t.id),e.style.backgroundColor&&!O(e)||(e.style.backgroundColor="".concat(getComputedStyle(t.el).backgroundColor),e.style.backgroundColor&&(e.style.backgroundColor+=" !important"))}),t.el.style.backgroundColor="#ffffff00"}(0<u);for(var p=0;p<t&&!(l<=d);p+=1){var b=r.addRow("wptb-row");b.el.style.backgroundColor="#ffffff00";for(var f=0;f<i;f+=1){var y,m,h=r.getCell(d,f,!0);h&&(h.resetAllAttributes(),m=!0,y=h.getSpan(R.spanTypes.row),h.getSpan(R.spanTypes.column),1<y&&(y=Math.min(y,t-p),m=h.setSpan(R.spanTypes.row,y),h.setMergedRenderStatus(!0)),m)&&(h.el.style.backgroundColor&&!O(h.el)||h.setAttribute("style","background-color: ".concat(r.rowColors[p%2==0?"even":"odd"]),!0,";"),r.appendObjectToRow(h,b.id))}d+=1}}else for(var g=0===(g=Math.ceil((l-1)/t))?1:g,w=1,v=0;v<g;v+=1){for(var S=0;S<i;S+=1){var C,T=r.addRow("wptb-row");0<v&&0===S&&(T.el.style.borderTop=s),!o&&0!==v||(C=r.getCell(0,S,!0)).isReference()||((C=C.el.cloneNode(!0)).style.backgroundColor="".concat(r.rowColors.header," !important"),r.appendElementToRow(C,T.id),C.style.backgroundColor&&!O(C)||(C.style.backgroundColor="".concat(getComputedStyle(T.el).backgroundColor),C.style.backgroundColor&&(C.style.backgroundColor+=" !important")),o?C.setAttribute("rowSpan",C.getAttribute("colSpan")):C.setAttribute("rowSpan",i*g),C.setAttribute("colSpan",1)),T.el.style.backgroundColor="#ffffff00";for(var A=0;A<t&&!(l<=w+A);A+=1){var x,_,E,k=r.getCell(w+A,S,!0);k&&(k.resetAllAttributes(),x=!0,_=k.getSpan(R.spanTypes.row),E=k.getSpan(R.spanTypes.column),(1<_||1<E)&&(E=Math.min(_,t-A),x=k.setSpan(R.spanTypes.row,E),_=k.el.getAttribute("rowSpan"),E=k.el.getAttribute("colSpan"),k.setAttribute("rowSpan",E),k.setAttribute("colSpan",_),k.setMergedRenderStatus(!0)),x)&&(E=1===t?w%2==0?"even":"odd":(w+A+v)%2==0?"even":"odd",k.el.style.backgroundColor&&!O(k.el)||k.setAttribute("style","background-color: ".concat(r.rowColors[E]),!0,";"),r.appendObjectToRow(k,T.id))}}w+=t}},this.buildDefault=function(e){for(var t=e.maxRows(),r=e.maxColumns(),o=0;o<t;o+=1)for(var n=e.addRow("",!0,o).id,a=0;a<r;a+=1){var l=e.getCell(o,a,!0);l&&!l.isReference()&&(l.resetAllAttributes(),e.appendElementToRow(l.getElement(),n))}},this.calculateRangeId=function(t,r){var e=Object.keys(r).sort(function(e,t){return r[e].width-r[t].width}),o=e[0];return e.map(function(e){t>=r[e].width&&(o=e)}),o},this.rebuildTable=function(e,t,r){var o=I.getDirective(e);if(o&&c(o)){var n=o.responsiveMode,a=I["".concat(n,"Build")],l=(t=t||e.getBoundingClientRect().width,I.calculateRangeId(t,o.breakpoints));if(!a)throw new Error("No build mode named as [".concat(n,"] found."));var i=o.modeOptions[n],t=(d(o,t)?a.call(I,e,l,i,r):(r.clearTable(),I.buildDefault(r),I.removeDefaultClasses(e)),WPTB_RecalculateIndexes(e),new CustomEvent("table:rebuilt",{detail:{sizeRangeId:l,topRowAsHeader:o.modeOptions[n].topRowAsHeader}}));e.dispatchEvent(t),a=l,(i=e)&&a&&(i.dataset.wptbBreakpoint=a)}},this.rebuildTables=function(r){I.elementObjects.map(function(e){var t=r;r||(t=o(e.el)),I.rebuildTable(e.el,t,e.tableObject)})},this.calculateRangeIdFromTable=function(e){var t=I.getDirective(e),e=o(e);return I.calculateRangeId(e,t.breakpoints)},this.isResponsiveEnabledForCurrentBreakpoint=function(e){var t=I.getDirective(e);return t&&c(t)&&d(t,o(e))},this.options.bindToResize&&this.bindRebuildToResize(),this.getTableElementObject=function(t){var e=I.elementObjects.filter(function(e){e=e.el.parentNode,e=new RegExp(/^wptb-table-id-(\d+)$/).exec(e.getAttribute("id"));return e&&e[1]&&Number.parseInt(e[1],10)===t});return _slicedToArray(e,1)[0]},this.markRowForResponsive=function(e,t){e.dataset.wptbResponsiveIgnore=JSON.stringify(t)},{rebuildTables:this.rebuildTables,rebuildTable:this.rebuildTable,getDirective:this.getDirective,calculateRangeId:this.calculateRangeId,calculateRangeIdFromTable:this.calculateRangeIdFromTable,isResponsiveEnabledForCurrentBreakpoint:this.isResponsiveEnabledForCurrentBreakpoint,getTableElementObject:this.getTableElementObject,markRowForResponsive:this.markRowForResponsive,calculateInnerSize:o,TableObject:t}}}),function(e,t,r){t[e]=r()}("WPTB_StylePass",self||global,function(){return new function(){var l=this;this.options={stylesheets:{}},this.insertShadowRoot=function(e,t){var r=t.parentNode,o=Array.from(r.children),n=o.indexOf(t),a=0<n-1?null:o[n-1],o=n+1>=o.length?null:o[n+1];l.prepareAllStylesheets(l.options.stylesheets,e.shadowRoot),l.borrowFromTheme(t),e.shadowRoot.appendChild(t),a?a.insertAdjacentElement("afterend",e):o?o.insertAdjacentElement("beforebegin",e):r.appendChild(e)},this.borrowFromTheme=function(e){var e=e.querySelector("table"),t=getComputedStyle(e).fontFamily;e.style.fontFamily=t},this.init=function(e){l.options=_objectSpread(_objectSpread({},l.options),e);e=Array.from(document.querySelectorAll("div .wptb-table-container"));0<e.length&&e.map(l.setupStylePass)},this.checkTableEligibility=function(e){e=e.querySelector("table");return!!e&&(l.options.settings.disableThemeStylesForAll||e.dataset.disableThemeStyles)},this.setupStylePass=function(e){var t,r,o;l.checkTableEligibility(e)&&((t=document.createElement("div")).classList.add("wptb-shadow-root-container"),r=(o=e.querySelector("table")).dataset.wptbTableContainerMaxWidth,o=o.dataset.wptbHorizontalScrollStatus,r&&!o&&(t.style.maxWidth="".concat(r,"px")),t.attachShadow({mode:"open"}),l.insertShadowRoot(t,e))},this.prepareAllStylesheets=function(r,o){Object.keys(r).map(function(t){if(Object.prototype.hasOwnProperty.call(r,t))switch(t){case"create":Object.keys(r[t]).map(function(e){Object.prototype.hasOwnProperty.call(r[t],e)&&l.prepareStylesheet(e,r[t][e],o)});break;case"copy":r[t].map(function(e){l.copyStylesheet(e,o)})}})},this.copyStylesheet=function(e,t){e=document.querySelector(e);e&&t.appendChild(e.cloneNode(!0))},this.prepareStylesheet=function(e,t,r){var o=document.createElement("link");o.setAttribute("id",e),o.setAttribute("href",t),o.setAttribute("rel","stylesheet"),o.setAttribute("media","all"),r.appendChild(o)}}}),function(e,t,r){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=r():t[e]=r()}("WPTB_LazyLoad",self||global,function(){function o(e){function t(e){var t=l(e);if(t){for(var r=arguments.length,o=new Array(1<r?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];t.apply(a,o)}}var a=this,r=_objectSpread(_objectSpread({},{name:"",speed:8,step:10,hooks:{},direction:"left",perspective:1e3,flashColor:"#FFFFFF"}),e),o="wptb-lazy-load-styles",l=(this.getOptions=function(){return _objectSpread({},r)},this.calculateDuration=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:.1,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return Math.max(e,t)-Math.abs(t-e)/r.step*r.speed},this.calculateAnimationDirection=function(){var e=["X","Y"],t=0<arguments.length&&void 0!==arguments[0]&&arguments[0]?1:0;return["left","right"].includes(r.direction)?e[(0+t)%2]:e[(1+t)%2]},this.calculateDirectionConstant=function(){return(0<arguments.length&&void 0!==arguments[0]&&arguments[0]?-1:1)*(["left","up"].includes(a.getOptions().direction)?1:-1)},function(e){if(Object.prototype.hasOwnProperty.call(r.hooks,e)){e=r.hooks[e];if("function"==typeof e)return e}return null});this.getBufferElement=function(e){return e.parentNode.querySelector(".".concat("wptb-lazy-load-buffer-element"))},this.removeBufferElement=function(e){var t,e=a.getBufferElement(e);e&&((t=e.parentNode).removeChild(e),t.classList.remove("wptb-lazy-load-buffer-element-container"))},this.addStylesheet=function(e,t){var r=t.querySelector('style[id="'.concat(o,'"]')),t=(r||((r=t.createElement("style")).id=o,r.type="text/css",t.head.appendChild(r)),document.createTextNode(e));r.innerHTML="",r.appendChild(t)},this.beforeAnimation=function(e){t("beforeAnimation",e)},this.animate=function(e){t("animate",e)},this.afterAnimation=function(e){t("afterAnimation",e),delete a}}function e(r){this.getAnimation=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return r[e]?new o(_objectSpread(_objectSpread({},r[e]),t)):new o({})}}var s={none:{hooks:{animate:function(e){this.removeBufferElement(e)}}},slideIn:{hooks:{beforeAnimation:function(e){e.parentNode.style.overflow="hidden",e.style.transform="translate".concat(this.calculateAnimationDirection(),"(").concat(100*this.calculateDirectionConstant(),"%)")},animate:function(e){this.removeBufferElement(e),e.style.transition="transform ".concat(this.calculateDuration(),"s ease-out"),e.style.transform="translate".concat(this.calculateAnimationDirection(),"(0)")}}},growSling:{hooks:{beforeAnimation:function(e){e.style.transform="scale(0.1)"},animate:function(e){this.removeBufferElement(e),e.style.transition="transform ".concat(this.calculateDuration(),"s cubic-bezier(0.68, -0.55, 0.27, 1.55)"),e.style.transform="scale(1)"}}},flash:{hooks:{beforeAnimation:function(e){var t=document.createElement("div"),t=(t.classList.add("wptb-flash-element"),e.parentNode.classList.add("wptb-lazy-load-buffer-element-container"),e.insertAdjacentElement("afterend",t),"@keyframes wptb-flash {0% {opacity:1;}100% {opacity: 0;}} .wptb-flash-element {position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; background-color: ".concat(this.getOptions().flashColor,"}.wptb-flash-animation {animation: wptb-flash ").concat(this.calculateDuration(),"s forwards ease-out}"));this.addStylesheet(t,e.ownerDocument)},animate:function(t){this.removeBufferElement(t);var r=t.parentNode.querySelector(".wptb-flash-element");r&&(t.parentNode.classList.add("wptb-lazy-load-buffer-element-container"),r.addEventListener("animationend",function(e){"wptb-flash"===e.animationName&&(t.parentNode.classList.remove("wptb-lazy-load-buffer-element-container"),r.remove())}),r.classList.add("wptb-flash-animation"))}}},flip:{hooks:{beforeAnimation:function(e){var t=e.parentNode,t=(t.classList.add("wptb-lazy-load-card-container"),null!=(t=t.parentNode)&&t.classList.add("wptb-lazy-load-perspective-base"),e.classList.add("wptb-lazy-load-card-back","wptb-lazy-load-hidden-backface"),this.getBufferElement(e).classList.add("wptb-lazy-load-hidden-backface","wptb-lazy-load-card-front"),this.calculateAnimationDirection(!0)),r="".concat(180*this.calculateDirectionConstant(!0),"deg"),t=".wptb-lazy-load-perspective-base{perspective: ".concat(this.getOptions().perspective,"px;} .wptb-lazy-load-card-container{ transform-style: preserve-3d; transition: transform ").concat(this.calculateDuration(),"s ease-out; } .wptb-lazy-load-card-container[data-wptb-card-flip='true']{transform: rotate").concat(t,"(").concat(r,")} [data-wptb-card-flip='true'] .wptb-lazy-load-card-front svg{ animation: none !important; opacity: 0.2;} .wptb-lazy-load-card-back { transform: rotate").concat(t,"(").concat(r,")} .wptb-lazy-load-hidden-backface{backface-visibility: hidden;}");this.addStylesheet(t,e.ownerDocument)},animate:function(t){var r=this,o=t.parentNode;o.addEventListener("transitionend",function(e){"transform"===e.propertyName&&r.removeBufferElement(t),o.classList.remove("wptb-lazy-load-card-container","wptb-lazy-load-flip"),o.parentNode.classList.remove("wptb-lazy-load-perspective-base"),t.classList.remove("wptb-lazy-load-card-back","wptb-lazy-load-hidden-backface")}),o.dataset.wptbCardFlip="true"}}}};return new function(){function r(e,l){var t,i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],s=3<arguments.length&&void 0!==arguments[3]&&arguments[3];e.filter(function(e){return"false"===e.dataset.wptbLazyLoadStatus}).map(function(e){var t,r,o,n,a;i&&(t=e,(o=document.createElement("div")).classList.add(d),o.style.backgroundColor=c.backgroundColor,c.iconSvg&&(o.innerHTML='<div class="wptb-lazy-load-buffer-icon-wrapper wptb-plugin-filter-box-shadow-md">'.concat(c.iconSvg,"</div>"),r=o.querySelector("svg"),(a=o.querySelector(".wptb-lazy-load-buffer-icon-wrapper")).style.width="".concat(c.iconSize,"px"),a.style.height="".concat(c.iconSize,"px"),a.dataset.wptbLazyLoadIconAnimation=c.iconAnimation,r)&&(r.style.fill=c.iconColor),t.insertAdjacentElement("afterend",o),t.parentNode.classList.add(u),p.beforeAnimation(t)),(!c.forceMode||s)&&(n=e,a=l,c.forceMode||b(n,a))&&(n.dataset.wptbLazyLoadStatus="true",n.addEventListener("load",c.delay?function(){setTimeout(function(){f({target:n})},1e3*c.delay)}:f),n.src=n.dataset.wptbLazyLoadTarget)}),t=window.scrollY,a.lastYPosition=t}function o(){return window.innerHeight}function t(){var e=Array.from(document.querySelectorAll(".wptb-preview-table")),t=Array.from(document.querySelectorAll(".wptb-shadow-root-container")).reduce(function(e,t){t=t.shadowRoot.querySelector(".wptb-preview-table");return t&&e.push(t),e},[]),e=[].concat(e,_toConsumableArray(t));l.push.apply(l,_toConsumableArray(e.reduce(function(e,t){t=Array.from(t.querySelectorAll(".wptb-lazy-load-img"));return e.push.apply(e,t),e},[]))),r(l,o(),!0),c.forceMode||window.addEventListener("scroll",function(){r(l,o())},{passive:!0})}var n={forceMode:!1},c={},a={lastYPosition:0},l=[],d="wptb-lazy-load-buffer-element",u="wptb-lazy-load-buffer-element-container",i=new e(s),p=null,b=function(e,t){var e=e.parentNode.getBoundingClientRect(),r=e.top,o=e.height,e=e.bottom,n=c.visibilityPercentage,r=0<=window.scrollY-a.lastYPosition?r+o*(n/100):e-o*(n/100);return 0<=r&&r<=t},f=function(e){e=e.target;p.animate(e),e.removeEventListener("load",f),p.afterAnimation(e)};this.forceLoadImages=function(){r(l,null,!1,!0)},this.init=function(e){e&&"object"===_typeof(e)&&(c=_objectSpread(_objectSpread({},n),e)).enabled&&(p=i.getAnimation(c.imageLoadAnimation,_objectSpread({speed:c.imageLoadAnimationSpeed,direction:c.imageLoadAnimationDirection,perspective:c.imageLoadAnimationPerspective},c)),t())}}}),function(e,t,r){t[e]=r()}("WPTB_ScrollManager",self||global,function(){return function(e){function t(e){var t=e.parentNode.parentNode,e=e.parentNode,r=(t.dataset.wptbHorizontalScrollStatus="true",t.style.maxWidth);t.style.maxWidth="",e.style.width=r}var r=e.frontendCalculationStatus;this.init=function(){var e=Array.from(document.querySelectorAll("table[data-wptb-horizontal-scroll-status=true]"));r&&e.map(t)}}}),document.addEventListener("DOMContentLoaded",function(){var F=document.getElementsByClassName("wptb-table-container");function e(){for(var e=0;e<F.length;e++){var t=F[e],r=!0,o=t.getElementsByClassName("wptb-preview-table"),n=t.getElementsByClassName("wptb-table-container-matrix");if(0<o.length&&0<n.length){o=o[0],n=n[0];if(o.style.display="table",o.dataset.wptbTableAlignment&&(a=o.dataset.wptbTableAlignment,t.offsetWidth<o.offsetWidth?o.style.float=null:o.style.float="center"==a?null:a,t.style.float="center"==a?null:a),1==o.dataset.reconstraction&&1==o.dataset.wptbAdaptiveTable){var a=t.offsetWidth,l=o.offsetWidth,i=void 0,s=o.rows;0<s.length&&(i=s[0].querySelectorAll("td").length);var s=!1,c=void 0;if((!o.classList.contains("wptb-table-preview-head")||2<i)&&1<i)if(a<l){if(t.style.overflow="unset",n&&!n.classList.contains("wptb-matrix-hide")&&(n.classList.add("wptb-matrix-hide"),s=!0),o.classList.add("wptb-mobile-view-active"),o.rows&&i){var d=Math.floor(a/(l/i));if(d<1&&(d=1),0<t.getElementsByClassName("wptb-preview-table-mobile").length&&((c=t.getElementsByClassName("wptb-preview-table-mobile")[0]).classList.remove("wptb-mobile-hide"),(l=c.dataset.wholeColumnsInContainer)==d&&o.classList.contains("wptb-table-preview-head")||l==d&&!o.classList.contains("wptb-table-preview-head")&&(480<a||1==c.column)?r=!1:c.parentNode.removeChild(c)),r){var l=document.createElement("table"),u=document.createElement("tbody"),r=(l.appendChild(u),l.classList.add("wptb-preview-table-mobile"),o.className.match(/wptb-element-main(.+)-(\d+)/i)),p=(r&&Array.isArray(r)&&l.classList.add(r[0]),o.rows.length),b=void 0,f=!1;if(o.classList.contains("wptb-table-preview-head")){var y=p-1,m=void 0;if(d<p)for(var h=0;h<y;h++){if(0==(b=y%(m=(m=d-1-h)<=0?1:m))){f=!0;break}if(0<m&&m<=6&&m-2*b<0&&b<m){f=!0;break}if(6<m&&m<=12&&m-1.8*b<0&&b<m){f=!0;break}if(12<m&&m<=18&&m-1.6*b<0&&b<m){f=!0;break}}else m=y,f=!(b=0);if(f)for(var M=void 0,M=0<m?i*Math.ceil(y/m):i,g=(Math.floor((M-1)/i),void 0),w=0;w<M;w++){var v=Math.floor(w/i),S=document.createElement("tr"),C=o.rows[0].children[w-v*i].cloneNode(!0),T=void 0,W=window.getComputedStyle(o.rows[0]);C.style.backgroundColor||(C.style.backgroundColor=W.backgroundColor),C.style.width=null,C.style.height=null,C.removeAttribute("data-wptb-css-td-auto-width"),(g=window.getComputedStyle(o.querySelector("td"))).borderTopColor?C.style.borderColor=g.borderTopColor:C.style.borderColor=g.borderBottomColor,0<v&&w%i==0&&(C.style.borderTopWidth="5px"),S.appendChild(C);for(var z,A=m*v+1;A<m*(v+1)+1;A++)A<o.rows.length?(T=o.rows[A].children[w-v*i].cloneNode(!0),z=window.getComputedStyle(o.rows[A]),T.style.backgroundColor||(T.style.backgroundColor=z.backgroundColor),T.style.width=null,T.style.height=null,T.removeAttribute("data-wptb-css-td-auto-width")):((T=document.createElement("td")).style.borderWidth="0px",T.style.background="#fff"),(g=window.getComputedStyle(o.querySelector("td"))).borderTopColor?T.style.borderColor=g.borderTopColor:T.style.borderColor=g.borderBottomColor,0<v&&w%i==0&&(T.style.borderTopWidth="5px"),S.appendChild(T);u.appendChild(S)}}else{var x=void 0;if(480<a)for(var _=0;_<i;_++){if(0==(b=i%(x=0==(x=d-_)?1:x))){f=!0;break}if(0<x&&x<=6&&x-2*b<=0&&b<x){f=!0;break}if(6<x&&x<=12&&x-1.8*b<=0&&b<x){f=!0;break}if(12<x&&x<=18&&x-1.6*b<=0&&b<x){f=!0;break}}else f=!(b=0),l.column=x=1;var D=Math.ceil(i/x),N=D*p;if(f)for(var E=0;E<N;E++){var k=Math.floor(E/p),R=document.createElement("tr"),H=void 0,P=void 0,H=k!=D-1||0==b?(P=k*x,x*(1+k)):(P=i-b,i),O=o.rows[E-k*p];R.classList=O.classList,R.style.backgroundColor=O.style.backgroundColor;for(var I=P;I<H;I++){var q,j=O.children[I].cloneNode(!0);j.style.backgroundColor||(q=window.getComputedStyle(O),j.style.backgroundColor=q.backgroundColor),j.style.width=null,j.style.height=null,j.removeAttribute("data-wptb-css-td-auto-width"),R.appendChild(j)}u.appendChild(R)}}l.dataset.wholeColumnsInContainer=d;var L=l.querySelectorAll("[srcset]");if(0<L.length)for(var B=0;B<L.length;B++)L[B].removeAttribute("srcset");t.appendChild(c=l),s=!0}}}else n&&n.classList.contains("wptb-matrix-hide")&&(n.classList.remove("wptb-matrix-hide"),s=!0,o.classList.remove("wptb-mobile-view-active"),(c=t.querySelector(".wptb-preview-table-mobile"))&&t.getElementsByClassName("wptb-preview-table-mobile")[0].classList.add("wptb-mobile-hide"),t.style.overflow="auto");else o.style.minWidth="auto";WPTB_RecalculateIndexes(o),s&&(WPTB_RecalculateIndexes(c),r=new CustomEvent("table:rebuilt",{detail:!0,bubbles:!0}),o.dispatchEvent(r))}}}}function t(){function e(){var t=v[S],r=(t.classList.add("wptb-table-container-".concat(S)),t.getElementsByClassName("wptb-preview-table"));if(0<r.length){!(r=r[0]).dataset.wptbTableContainerMaxWidth||r.dataset.wptbTableHorizontalScrollStatus||t.dataset.wptbHorizontalScrollStatus||(t.style.maxWidth="".concat(r.dataset.wptbTableContainerMaxWidth,"px")),r.classList.remove("wptb-table-preview-static-indic"),r.mergingСellsHorizontally=!1;for(var e=r.querySelectorAll("td"),o=0;o<e.length;o++)1<e[o].colSpan&&(r.mergingСellsHorizontally=!0);function n(){var e=t.offsetWidth;m<e?g?(r.style.minWidth="100%",r.mergingСellsHorizontally?(r.style.width="auto",a=(a=(e-h)/g)-f-y,w=!0):r.style.width="100%"):(r.style.width="auto",r.style.minWidth=null,r.style.maxWidth="".concat(m,"px")):(r.style.maxWidth=null,r.style.minWidth="".concat(r.dataset.wptbTableTdsSumMaxWidth,"px"),r.style.width="auto",a=r.dataset.wptbTdWidthAuto||"100",w=!0)}var a,l,i,s,c=t.offsetWidth,d=r.querySelector("td"),d=window.getComputedStyle(d,null),u=d.getPropertyValue("border-left-width"),p=d.getPropertyValue("border-right-width"),b=d.getPropertyValue("padding-left"),d=d.getPropertyValue("padding-left"),f=parseFloat(b,10)+parseFloat(d,10),y=parseFloat(u,10)+parseFloat(p,10),m=r.dataset.wptbTableTdsSumMaxWidth,h=r.dataset.wptbFixedWidthSize,g=r.dataset.wptbCellsWidthAutoCount,w=!1;c<=0?(l=function(e){var e=getComputedStyle(e),t=e.display,e=e.visibility;return"none"!==t||"visible"===e},(b=(i=function(e){var e=e.parentNode,t=l(e),r=e.nodeName.toLowerCase();return t||"body"===r?"body"===r?null:e:i(e)})(t))&&(s=new MutationObserver(function(e){try{e.map(function(e){var t=l(e.target),e=e.target.getBoundingClientRect().width;if(t&&0<e)throw n(),s.disconnect(),new Error("get out of iteration")})}catch(e){}})).observe(b,{attributes:!0,childList:!1,subtree:!1})):n();d=document.head;d&&(u=d.querySelector("style[data-wptb-td-auto-width-".concat(S,'="true"]')))&&d.removeChild(u),w&&((p=document.createElement("style")).setAttribute("data-wptb-td-auto-width-".concat(S),!0),p.innerHTML=".wptb-table-container-".concat(S," table td[data-wptb-css-td-auto-width=true]{width:").concat(a,"px}"),d)&&d.appendChild(p)}}for(var v=document.getElementsByClassName("wptb-table-container"),S=0;S<v.length;S++)e()}d=".wptb-preview-table .wptb-button",Array.from(document.querySelectorAll(d)).map(function(t){t.addEventListener("mouseenter",function(e){e=e.target;e.dataset.wptbElementHoverBgColor&&(e.style.backgroundColor=e.dataset.wptbElementHoverBgColor),e.dataset.wptbElementHoverTextColor&&(e.style.color=e.dataset.wptbElementHoverTextColor),e.dataset.wptbElementHoverScale&&(e.style.transform="scale(".concat(t.dataset.wptbElementHoverScale,")"))}),t.addEventListener("mouseleave",function(e){e=e.target;e.dataset.wptbElementHoverBgColor&&(e.style.backgroundColor=e.dataset.wptbElementBgColor),e.dataset.wptbElementHoverTextColor&&(e.style.color=e.dataset.wptbElementColor),e.dataset.wptbElementHoverScale&&(e.style.transform="scale(1)")})}),t(),e(),window.addEventListener("resize",function(){t(),e()});for(var r=document.getElementsByClassName("wptb-ph-element"),o=0;o<r.length;o++){var n,a,l=r[o];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")&&(a=l.className.match(/wptb-size-([A-Z]+)/i))&&Array.isArray(a)&&(n=(a=a[0]).toLowerCase(),l.classList.remove(a),a=l.querySelector(".wptb-button-wrapper"))&&a.classList.add(n)}var i=new WPTB_ResponsiveFrontend({query:".wptb-preview-table",bindToResize:!0});(self||global).wptbResponsiveFrontendInstance=i;for(var s=document.querySelectorAll(".wptb-preview-table"),c=0;c<s.length;c+=1)new WPTB_SortableTable({table:s[c]}).sortableTableInitialization(i);var d=new CustomEvent("responsive:front",{detail:{responsiveFront:i}});document.dispatchEvent(d),new WPTB_ScrollManager(WptbFrontendData.scrollManager).init(),WPTB_ExtraStyles.applyStyles(WPTB_ExtraStyles.modes.frontEnd,WptbFrontendData.generalStyles),i.rebuildTables(),WPTB_LazyLoad.init(WptbFrontendData.lazyLoad),WptbFrontendBase.getTableObjects().map(function(e){e=e.mainTable;Array.from(e.querySelectorAll(".wptb-text_icon_element-container")).map(function(e){e.setAttribute("contenteditable",!1)})}),WptbFrontendBase.getTableObjects().map(function(e){e=e.mainTable;Array.from(e.querySelectorAll(".wptb-badge-container")).map(function(e){e.setAttribute("contenteditable",!1)})}),WPTB_StylePass.init(WptbFrontendData.stylePass)});
//# sourceMappingURL=wp-table-builder-frontend.js.map
;
/**
* Observe how the user enters content into the comment form in order to determine whether it's a bot or not.
*
* Note that no actual input is being saved here, only counts and timings between events.
*/
( function() {
// Passive event listeners are guaranteed to never call e.preventDefault(),
// but they're not supported in all browsers. Use this feature detection
// to determine whether they're available for use.
var supportsPassive = false;
try {
var opts = Object.defineProperty( {}, 'passive', {
get : function() {
supportsPassive = true;
}
} );
window.addEventListener( 'testPassive', null, opts );
window.removeEventListener( 'testPassive', null, opts );
} catch ( e ) {}
function init() {
var input_begin = '';
var keydowns = {};
var lastKeyup = null;
var lastKeydown = null;
var keypresses = [];
var modifierKeys = [];
var correctionKeys = [];
var lastMouseup = null;
var lastMousedown = null;
var mouseclicks = [];
var mousemoveTimer = null;
var lastMousemoveX = null;
var lastMousemoveY = null;
var mousemoveStart = null;
var mousemoves = [];
var touchmoveCountTimer = null;
var touchmoveCount = 0;
var lastTouchEnd = null;
var lastTouchStart = null;
var touchEvents = [];
var scrollCountTimer = null;
var scrollCount = 0;
var correctionKeyCodes = [ 'Backspace', 'Delete', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageUp', 'PageDown' ];
var modifierKeyCodes = [ 'Shift', 'CapsLock' ];
var forms = document.querySelectorAll( 'form[method=post]' );
for ( var i = 0; i < forms.length; i++ ) {
var form = forms[i];
var formAction = form.getAttribute( 'action' );
// Ignore forms that POST directly to other domains; these could be things like payment forms.
if ( formAction ) {
// Check that the form is posting to an external URL, not a path.
if ( formAction.indexOf( 'http://' ) == 0 || formAction.indexOf( 'https://' ) == 0 ) {
if ( formAction.indexOf( 'http://' + window.location.hostname + '/' ) != 0 && formAction.indexOf( 'https://' + window.location.hostname + '/' ) != 0 ) {
continue;
}
}
}
form.addEventListener( 'submit', function () {
var ak_bkp = prepare_timestamp_array_for_request( keypresses );
var ak_bmc = prepare_timestamp_array_for_request( mouseclicks );
var ak_bte = prepare_timestamp_array_for_request( touchEvents );
var ak_bmm = prepare_timestamp_array_for_request( mousemoves );
var input_fields = {
// When did the user begin entering any input?
'bib': input_begin,
// When was the form submitted?
'bfs': Date.now(),
// How many keypresses did they make?
'bkpc': keypresses.length,
// How quickly did they press a sample of keys, and how long between them?
'bkp': ak_bkp,
// How quickly did they click the mouse, and how long between clicks?
'bmc': ak_bmc,
// How many mouseclicks did they make?
'bmcc': mouseclicks.length,
// When did they press modifier keys (like Shift or Capslock)?
'bmk': modifierKeys.join( ';' ),
// When did they correct themselves? e.g., press Backspace, or use the arrow keys to move the cursor back
'bck': correctionKeys.join( ';' ),
// How many times did they move the mouse?
'bmmc': mousemoves.length,
// How many times did they move around using a touchscreen?
'btmc': touchmoveCount,
// How many times did they scroll?
'bsc': scrollCount,
// How quickly did they perform touch events, and how long between them?
'bte': ak_bte,
// How many touch events were there?
'btec' : touchEvents.length,
// How quickly did they move the mouse, and how long between moves?
'bmm' : ak_bmm
};
var akismet_field_prefix = 'ak_';
if ( this.getElementsByClassName ) {
// Check to see if we've used an alternate field name prefix. We store this as an attribute of the container around some of the Akismet fields.
var possible_akismet_containers = this.getElementsByClassName( 'akismet-fields-container' );
for ( var containerIndex = 0; containerIndex < possible_akismet_containers.length; containerIndex++ ) {
var container = possible_akismet_containers.item( containerIndex );
if ( container.getAttribute( 'data-prefix' ) ) {
akismet_field_prefix = container.getAttribute( 'data-prefix' );
break;
}
}
}
for ( var field_name in input_fields ) {
var field = document.createElement( 'input' );
field.setAttribute( 'type', 'hidden' );
field.setAttribute( 'name', akismet_field_prefix + field_name );
field.setAttribute( 'value', input_fields[ field_name ] );
this.appendChild( field );
}
}, supportsPassive ? { passive: true } : false );
form.addEventListener( 'keydown', function ( e ) {
// If you hold a key down, some browsers send multiple keydown events in a row.
// Ignore any keydown events for a key that hasn't come back up yet.
if ( e.key in keydowns ) {
return;
}
var keydownTime = ( new Date() ).getTime();
keydowns[ e.key ] = [ keydownTime ];
if ( ! input_begin ) {
input_begin = keydownTime;
}
// In some situations, we don't want to record an interval since the last keypress -- for example,
// on the first keypress, or on a keypress after focus has changed to another element. Normally,
// we want to record the time between the last keyup and this keydown. But if they press a
// key while already pressing a key, we want to record the time between the two keydowns.
var lastKeyEvent = Math.max( lastKeydown, lastKeyup );
if ( lastKeyEvent ) {
keydowns[ e.key ].push( keydownTime - lastKeyEvent );
}
lastKeydown = keydownTime;
}, supportsPassive ? { passive: true } : false );
form.addEventListener( 'keyup', function ( e ) {
if ( ! ( e.key in keydowns ) ) {
// This key was pressed before this script was loaded, or a mouseclick happened during the keypress, or...
return;
}
var keyupTime = ( new Date() ).getTime();
if ( 'TEXTAREA' === e.target.nodeName || 'INPUT' === e.target.nodeName ) {
if ( -1 !== modifierKeyCodes.indexOf( e.key ) ) {
modifierKeys.push( keypresses.length - 1 );
} else if ( -1 !== correctionKeyCodes.indexOf( e.key ) ) {
correctionKeys.push( keypresses.length - 1 );
} else {
// ^ Don't record timings for keys like Shift or backspace, since they
// typically get held down for longer than regular typing.
var keydownTime = keydowns[ e.key ][0];
var keypress = [];
// Keypress duration.
keypress.push( keyupTime - keydownTime );
// Amount of time between this keypress and the previous keypress.
if ( keydowns[ e.key ].length > 1 ) {
keypress.push( keydowns[ e.key ][1] );
}
keypresses.push( keypress );
}
}
delete keydowns[ e.key ];
lastKeyup = keyupTime;
}, supportsPassive ? { passive: true } : false );
form.addEventListener( "focusin", function ( e ) {
lastKeydown = null;
lastKeyup = null;
keydowns = {};
}, supportsPassive ? { passive: true } : false );
form.addEventListener( "focusout", function ( e ) {
lastKeydown = null;
lastKeyup = null;
keydowns = {};
}, supportsPassive ? { passive: true } : false );
}
document.addEventListener( 'mousedown', function ( e ) {
lastMousedown = ( new Date() ).getTime();
}, supportsPassive ? { passive: true } : false );
document.addEventListener( 'mouseup', function ( e ) {
if ( ! lastMousedown ) {
// If the mousedown happened before this script was loaded, but the mouseup happened after...
return;
}
var now = ( new Date() ).getTime();
var mouseclick = [];
mouseclick.push( now - lastMousedown );
if ( lastMouseup ) {
mouseclick.push( lastMousedown - lastMouseup );
}
mouseclicks.push( mouseclick );
lastMouseup = now;
// If the mouse has been clicked, don't record this time as an interval between keypresses.
lastKeydown = null;
lastKeyup = null;
keydowns = {};
}, supportsPassive ? { passive: true } : false );
document.addEventListener( 'mousemove', function ( e ) {
if ( mousemoveTimer ) {
clearTimeout( mousemoveTimer );
mousemoveTimer = null;
}
else {
mousemoveStart = ( new Date() ).getTime();
lastMousemoveX = e.offsetX;
lastMousemoveY = e.offsetY;
}
mousemoveTimer = setTimeout( function ( theEvent, originalMousemoveStart ) {
var now = ( new Date() ).getTime() - 500; // To account for the timer delay.
var mousemove = [];
mousemove.push( now - originalMousemoveStart );
mousemove.push(
Math.round(
Math.sqrt(
Math.pow( theEvent.offsetX - lastMousemoveX, 2 ) +
Math.pow( theEvent.offsetY - lastMousemoveY, 2 )
)
)
);
if ( mousemove[1] > 0 ) {
// If there was no measurable distance, then it wasn't really a move.
mousemoves.push( mousemove );
}
mousemoveStart = null;
mousemoveTimer = null;
}, 500, e, mousemoveStart );
}, supportsPassive ? { passive: true } : false );
document.addEventListener( 'touchmove', function ( e ) {
if ( touchmoveCountTimer ) {
clearTimeout( touchmoveCountTimer );
}
touchmoveCountTimer = setTimeout( function () {
touchmoveCount++;
}, 500 );
}, supportsPassive ? { passive: true } : false );
document.addEventListener( 'touchstart', function ( e ) {
lastTouchStart = ( new Date() ).getTime();
}, supportsPassive ? { passive: true } : false );
document.addEventListener( 'touchend', function ( e ) {
if ( ! lastTouchStart ) {
// If the touchstart happened before this script was loaded, but the touchend happened after...
return;
}
var now = ( new Date() ).getTime();
var touchEvent = [];
touchEvent.push( now - lastTouchStart );
if ( lastTouchEnd ) {
touchEvent.push( lastTouchStart - lastTouchEnd );
}
touchEvents.push( touchEvent );
lastTouchEnd = now;
// Don't record this time as an interval between keypresses.
lastKeydown = null;
lastKeyup = null;
keydowns = {};
}, supportsPassive ? { passive: true } : false );
document.addEventListener( 'scroll', function ( e ) {
if ( scrollCountTimer ) {
clearTimeout( scrollCountTimer );
}
scrollCountTimer = setTimeout( function () {
scrollCount++;
}, 500 );
}, supportsPassive ? { passive: true } : false );
}
/**
* For the timestamp data that is collected, don't send more than `limit` data points in the request.
* Choose a random slice and send those.
*/
function prepare_timestamp_array_for_request( a, limit ) {
if ( ! limit ) {
limit = 100;
}
var rv = '';
if ( a.length > 0 ) {
var random_starting_point = Math.max( 0, Math.floor( Math.random() * a.length - limit ) );
for ( var i = 0; i < limit && i < a.length; i++ ) {
rv += a[ random_starting_point + i ][0];
if ( a[ random_starting_point + i ].length >= 2 ) {
rv += "," + a[ random_starting_point + i ][1];
}
rv += ";";
}
}
return rv;
}
if ( document.readyState !== 'loading' ) {
init();
} else {
document.addEventListener( 'DOMContentLoaded', init );
}
})();;