(()=>{"use strict";var e,t={4465:(e,t,r)=>{const n=window.wp.element;var a=r(1609),o=r.n(a),l=r(3757);const i=window.wp.components,c=window.wp.i18n;function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var s=function(e){var t=e.filterText,r=e.onFilter;return o().createElement(o().Fragment,null,o().createElement(i.TextControl,{className:"eb-data-table-search",type:"text",placeholder:(0,c.__)("Search here...","essential-blocks-pro"),"aria-label":(0,c.__)("Search input","essential-blocks-pro"),value:t,onChange:r}))};const f=function(e){var t,r,n=e.columns,i=e.data,c=e.hideHeader,f=e.fixedHeader,p=e.fixedHeaderScrollHeight,b=e.showPagination,h=e.showSearch,v=(t=(0,a.useState)(""),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,l,i=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw a}}return i}}(t,r)||function(e,t){if(e){if("string"==typeof e)return d(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(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),w=v[0],g=v[1],m=i.filter((function(e){return Object.values(e).some((function(e){return null!=e?String(e).toLowerCase().includes(w.toLowerCase()):""}))})),y=(0,a.useMemo)((function(){return o().createElement(s,{onFilter:function(e){return g(e)},filterText:w})}),[w]);return o().createElement(l.Ay,u({columns:n,data:m,pagination:"true"==b,subHeader:"true"==h,subHeaderComponent:y,persistTableHead:!0,noTableHead:"false"!=c,fixedHeader:"false"!=f},f?{fixedHeaderScrollHeight:"".concat(p,"px")}:{}))},p=window.wp.blockEditor;document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelectorAll(".eb-data-table-wrapper > .eb-data-table-wrapper-inner");if(e)for(var t=function(t){var r=e[t],a=r.getAttribute("data-post-id"),o=r.getAttribute("data-block-id"),l=r.getAttribute("data-hide-header"),i=r.getAttribute("data-fixed-header"),c=r.getAttribute("data-show-pagination"),u=r.getAttribute("data-show-search"),d=r.getAttribute("data-fixed-header-scroll-height"),s=new window.FormData;s.append("action","eb_data_table_post_meta"),s.append("data_table_nonce",EssentialBlocksProLocalize.data_table_nonce),s.append("post_id",a),s.append("block_id",o),fetch(EssentialBlocksProLocalize.ajax_url,{method:"POST",body:s}).then((function(e){return e.text()})).then((function(r){var a=JSON.parse(r);if(a.success){for(var s,b=a.data[o]?a.data[o]:"",h=null==b||null===(s=b.columns)||void 0===s?void 0:s.col.map((function(e,t){var r,n;return{name:e,width:""!=(null==b||null===(r=b.columns)||void 0===r?void 0:r.width[t])?(null==b||null===(n=b.columns)||void 0===n?void 0:n.width[t])+"px":"",selector:function(e){return e[t]},sortable:!0,cell:function(e){return React.createElement(p.RichText.Content,{value:e[t]})}}})),v=[],w=0;w<b.rows.length;w++){for(var g={},m=0;m<(null==b||null===(y=b.columns)||void 0===y?void 0:y.col.length);m++){var y;g[m]=b.rows[w][m]}g.id=w+1,v.push(g)}(0,n.render)(React.createElement(f,{columns:h,data:v,hideHeader:l,fixedHeader:i,showPagination:c,showSearch:u,fixedHeaderScrollHeight:d}),e[t])}}))},r=0;r<e.length;r++)t(r)}))},1609:e=>{e.exports=window.React}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var o=r[e]={exports:{}};return t[e].call(o.exports,o,o.exports,n),o.exports}n.m=t,e=[],n.O=(t,r,a,o)=>{if(!r){var l=1/0;for(d=0;d<e.length;d++){for(var[r,a,o]=e[d],i=!0,c=0;c<r.length;c++)(!1&o||l>=o)&&Object.keys(n.O).every((e=>n.O[e](r[c])))?r.splice(c--,1):(i=!1,o<l&&(l=o));if(i){e.splice(d--,1);var u=a();void 0!==u&&(t=u)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[r,a,o]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=762,(()=>{var e={762:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,[l,i,c]=r,u=0;if(l.some((t=>0!==e[t]))){for(a in i)n.o(i,a)&&(n.m[a]=i[a]);if(c)var d=c(n)}for(t&&t(r);u<l.length;u++)o=l[u],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(d)},r=globalThis.webpackChunkessential_blocks_pro=globalThis.webpackChunkessential_blocks_pro||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),n.nc=void 0;var a=n.O(void 0,[774],(()=>n(4465)));a=n.O(a)})();