(()=>{"use strict";const e=wp.blocks,t=wp.blockEditor,r=wp.components,o=wp.i18n,n=wp.element,s=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"tablesome/shortcode","version":"1.0.0","title":"Tablesome","category":"widgets","icon":"editor-table","description":"Insert a Tablesome table with customizable display options.","keywords":["tablesome","table","data","grid","spreadsheet"],"textdomain":"tablesome","editorScript":"tablesome-block","attributes":{"shortcode":{"type":"string","default":""}},"supports":{"html":false,"className":false,"customClassName":false}}');function a(e){return a="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},a(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){l(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t,r){return(t=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(0,e.registerBlockType)(s.name,i(i({},s),{},{edit:function(e){var n=e.attributes,s=e.setAttributes,a=(0,t.useBlockProps)({className:"csf-shortcode-block"});return React.createElement("div",a,React.createElement(r.Button,{variant:"secondary",className:"csf-shortcode-button","data-modal-id":"tablesome-shortcode","data-gutenberg-id":"tablesome/shortcode",onClick:function(){window.csf_gutenberg_props={attributes:n,setAttributes:s}}},(0,o.__)("Add Tablesome Shortcode","tablesome")),React.createElement(r.TextareaControl,{placeholder:(0,o.__)("Write shortcode here...","tablesome"),value:n.shortcode||"",onChange:function(e){return s({shortcode:e})},className:"blocks-shortcode__textarea"}))},save:function(e){var t=e.attributes;return React.createElement(n.RawHTML,null,t.shortcode)}}))})();