Dashboard
PHP:
8.4.22
OS:
Linux
User:
provencez
/
/
home
/
provencez
/
www
/
wp-content
/
plugins
/
flexa-block
/
build
/
admin
📤 Upload
📝 New File
📁 New Folder
Close
Editing: index.js
(()=>{"use strict";const e={n:r=>{const o=r&&r.__esModule?()=>r.default:()=>r;return e.d(o,{a:o}),o},d:(r,o)=>{if(Array.isArray(o))for(var s=0;s<o.length;){var t=o[s++],l=o[s++];e.o(r,t)?0===l&&s++:0===l?Object.defineProperty(r,t,{enumerable:!0,value:o[s++]}):Object.defineProperty(r,t,{enumerable:!0,get:l})}else for(var t in o)e.o(o,t)&&!e.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:o[t]})},o:(e,r)=>Object.hasOwn(e,r)},r=window.wp.element,o=window.wp.i18n,s=window.wp.apiFetch;var t=e.n(s);const l=window.wp.components,n={container:"layout",grid:"layout",slides:"layout",heading:"content",text:"content",separator:"content",button:"content","table-of-content":"content",breadcrumb:"content","post-grid":"content",image:"media","before-after":"media","images-gallery":"media","video-popup":"media","google-map":"media",faq:"interactive",tabs:"interactive",steps:"interactive",countdown:"interactive",counter:"interactive","process-bar":"interactive",timeline:"interactive",banner:"marketing",cta:"marketing","info-box":"marketing",testimonial:"marketing","comparison-table":"marketing","pricing-table":"marketing","team-member":"marketing","social-icon":"social","social-share":"social","subscribe-form":"forms","product-name":"woocommerce","product-price":"woocommerce","product-rating":"woocommerce","product-detail":"woocommerce","product-image":"woocommerce"},i={layout:{key:"layout",label:(0,o.__)("Layout","flexa-block"),from:"#6366f1",to:"#8b5cf6",accent:"#4f46e5"},content:{key:"content",label:(0,o.__)("Content","flexa-block"),from:"#3b82f6",to:"#06b6d4",accent:"#2563eb"},media:{key:"media",label:(0,o.__)("Media","flexa-block"),from:"#8b5cf6",to:"#d946ef",accent:"#7c3aed"},interactive:{key:"interactive",label:(0,o.__)("Interactive","flexa-block"),from:"#14b8a6",to:"#10b981",accent:"#0d9488"},marketing:{key:"marketing",label:(0,o.__)("Marketing","flexa-block"),from:"#f59e0b",to:"#f97316",accent:"#d97706"},social:{key:"social",label:(0,o.__)("Social","flexa-block"),from:"#ec4899",to:"#f43f5e",accent:"#db2777"},forms:{key:"forms",label:(0,o.__)("Forms","flexa-block"),from:"#06b6d4",to:"#3b82f6",accent:"#0891b2"},woocommerce:{key:"woocommerce",label:(0,o.__)("WooCommerce","flexa-block"),from:"#7f54b3",to:"#a46bce",accent:"#7f54b3"},other:{key:"other",label:(0,o.__)("Other","flexa-block"),from:"#64748b",to:"#94a3b8",accent:"#475569"}},c=["layout","content","media","interactive","marketing","social","forms","woocommerce","other"];function a(e){return n[e.slug]||("woocommerce"===e.category?"woocommerce":"layout"===e.category?"layout":"other")}function d(e){return i[e]||i.other}const x=window.ReactJSXRuntime,h="#2563eb",k={container:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:h},grid:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"12",y1:"4",x2:"12",y2:"20",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:h},slides:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M3.5 9v6M20.5 9v6",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},slide:{src:(0,x.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("rect",{x:"4",y:"6",width:"16",height:"12",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})}),foreground:h},button:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"7",width:"18",height:"10",rx:"5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},heading:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M5 5v14M13 5v14M5 12h8",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,x.jsx)("path",{d:"M17 10h3v9",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:h},image:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"8.5",cy:"9",r:"1.6",fill:"currentColor"}),(0,x.jsx)("path",{d:"M4 17l4.5-4.5 3.5 3.5 3-3L20 16.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:h},"before-after":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M12 3v18",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"12",cy:"12",r:"2.4",fill:"currentColor"}),(0,x.jsx)("path",{d:"M8 12H6M18 12h-2",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]}),foreground:h},countdown:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"13",r:"8",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M12 9v4l2.5 2.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("line",{x1:"9",y1:"2.5",x2:"15",y2:"2.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},faq:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"18",height:"4.5",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"3",y:"11.5",width:"18",height:"4.5",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M17.5 6.25h.01M17.5 13.75h.01",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),foreground:h},"social-icon":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"6",cy:"12",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"16.5",cy:"5.5",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"16.5",cy:"18.5",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M8.3 10.7l5.9-3.7M8.3 13.3l5.9 3.7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"social-share":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"18",cy:"5.5",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"6",cy:"12",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"18",cy:"18.5",r:"2.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M8.3 10.7l7.4-4.2M8.3 13.3l7.4 4.2",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},text:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"4",y1:"10",x2:"20",y2:"10",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"4",y1:"14",x2:"14",y2:"14",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"4",y1:"18",x2:"17",y2:"18",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},separator:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,x.jsx)("circle",{cx:"6",cy:"12",r:"0.6",fill:"currentColor"}),(0,x.jsx)("circle",{cx:"18",cy:"12",r:"0.6",fill:"currentColor"})]}),foreground:h},testimonial:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M4 4h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9l-4 4v-4H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"m12 7 1.1 2.3 2.4.3-1.8 1.7.5 2.4-2.2-1.2-2.2 1.2.5-2.4L8.5 9.6l2.4-.3L12 7Z",fill:"currentColor"})]}),foreground:h},counter:{src:(0,x.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M4 20V10M12 20V4M20 20v-7",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})}),foreground:h},"info-box":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"8",cy:"9",r:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"12",y1:"8",x2:"18",y2:"8",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"6",y1:"14",x2:"18",y2:"14",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"6",y1:"17",x2:"15",y2:"17",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:h},"table-of-content":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("line",{x1:"4",y1:"6",x2:"6",y2:"6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"9",y1:"6",x2:"20",y2:"6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"4",y1:"12",x2:"6",y2:"12",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"9",y1:"12",x2:"20",y2:"12",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"4",y1:"18",x2:"6",y2:"18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"9",y1:"18",x2:"20",y2:"18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),foreground:h},"comparison-table":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"9",y1:"9",x2:"9",y2:"20",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"15",y1:"9",x2:"15",y2:"20",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:h},breadcrumb:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M3 6h6M3 12h6M3 18h6",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("path",{d:"M13 7l3 5-3 5M18 7l3 5-3 5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:h},"video-popup":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M10 9.2v5.6l5-2.8z",fill:"currentColor"})]}),foreground:h},tabs:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M3 9h18",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"4.5",y:"6.2",width:"4.5",height:"1.6",rx:"0.8",fill:"currentColor"})]}),foreground:h},steps:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"6",cy:"6",r:"2.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"6",cy:"18",r:"2.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"6",y1:"8.5",x2:"6",y2:"15.5",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"11",y1:"6",x2:"20",y2:"6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"11",y1:"18",x2:"20",y2:"18",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"google-map":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M12 21s6-5.2 6-10a6 6 0 1 0-12 0c0 4.8 6 10 6 10Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,x.jsx)("circle",{cx:"12",cy:"11",r:"2.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:h},"images-gallery":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"8",height:"8",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"13",y:"4",width:"8",height:"8",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"3",y:"14",width:"8",height:"6",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"13",y:"14",width:"8",height:"6",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:h},banner:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"7",y1:"10",x2:"17",y2:"10",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"9",y1:"13",x2:"15",y2:"13",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,x.jsx)("rect",{x:"9.5",y:"15.2",width:"5",height:"2.2",rx:"1.1",fill:"currentColor"})]}),foreground:h},cta:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("line",{x1:"6",y1:"7",x2:"18",y2:"7",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"8",y1:"10.5",x2:"16",y2:"10.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,x.jsx)("rect",{x:"7",y:"13.5",width:"10",height:"4.5",rx:"2.25",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"10",y1:"15.75",x2:"14",y2:"15.75",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"subscribe-form":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"7",y1:"9",x2:"17",y2:"9",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"7",y1:"12",x2:"14",y2:"12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("rect",{x:"7",y:"15",width:"6",height:"2.6",rx:"1.3",fill:"currentColor"})]}),foreground:h},"subscribe-form-email":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M4 8l8 5 8-5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:h},"subscribe-form-name":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"8",width:"18",height:"8",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"6",y1:"12",x2:"7",y2:"12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"subscribe-form-phone":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"7",y:"3",width:"10",height:"18",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"10.5",y1:"18",x2:"13.5",y2:"18",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"subscribe-form-textarea":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"6",y1:"9",x2:"18",y2:"9",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"6",y1:"12",x2:"18",y2:"12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"6",y1:"15",x2:"13",y2:"15",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"subscribe-form-select":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"7",width:"18",height:"10",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M14 11l2 2 2-2",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:h},"subscribe-form-radio":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"7",cy:"8",r:"2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"7",cy:"8",r:"0.9",fill:"currentColor"}),(0,x.jsx)("circle",{cx:"7",cy:"16",r:"2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"12",y1:"8",x2:"19",y2:"8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"12",y1:"16",x2:"19",y2:"16",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"subscribe-form-checkbox":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"4",y:"5.5",width:"6.5",height:"6.5",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M5.5 8.8l1.4 1.4 2.2-2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("line",{x1:"13",y1:"8.5",x2:"20",y2:"8.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"4",y1:"16.5",x2:"20",y2:"16.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"subscribe-form-date":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"5",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"8",y1:"3",x2:"8",y2:"6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"16",y1:"3",x2:"16",y2:"6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("rect",{x:"7",y:"12",width:"3",height:"3",rx:"0.6",fill:"currentColor"})]}),foreground:h},"subscribe-form-url":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M10 14a3.5 3.5 0 0 0 5 0l2.5-2.5a3.5 3.5 0 0 0-5-5L11 8",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M14 10a3.5 3.5 0 0 0-5 0l-2.5 2.5a3.5 3.5 0 0 0 5 5L13 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:h},"subscribe-form-toggle":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"2",y:"7",width:"20",height:"10",rx:"5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"16",cy:"12",r:"3",fill:"currentColor"})]}),foreground:h},"subscribe-form-upload":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M12 15V5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("path",{d:"M8.5 8.5L12 5l3.5 3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("path",{d:"M5 15v3a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]}),foreground:h},"subscribe-form-hidden":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M3 12s3.5-6 9-6 9 6 9 6-3.5 6-9 6-9-6-9-6Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,x.jsx)("circle",{cx:"12",cy:"12",r:"2.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"4",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"pricing-table":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"5.5",height:"16",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"9.25",y:"4",width:"5.5",height:"16",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"15.5",y:"4",width:"5.5",height:"16",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"10.5",y1:"8",x2:"13.5",y2:"8",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"team-member":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"8",r:"3.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M5.5 19a6.5 6.5 0 0 1 13 0",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"post-grid":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"8",height:"7",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"13",y:"4",width:"8",height:"7",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"3",y:"13",width:"8",height:"7",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"13",y:"13",width:"8",height:"7",rx:"1.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"})]}),foreground:h},"process-bar":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"9",width:"18",height:"6",rx:"3",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"5",y:"11",width:"9",height:"2",rx:"1",fill:"currentColor"})]}),foreground:h},timeline:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"21",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("circle",{cx:"12",cy:"7",r:"2.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"12",cy:"16",r:"2.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"14.5",y1:"7",x2:"20",y2:"7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"4",y1:"16",x2:"9.5",y2:"16",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},icon:{src:(0,x.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"m12 3 2.6 5.6 6.1.7-4.5 4.1 1.2 6-5.4-3-5.4 3 1.2-6L3.3 9.3l6.1-.7L12 3Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})}),foreground:h},"icon-list":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"5",cy:"6",r:"1.8",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"5",cy:"12",r:"1.8",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"5",cy:"18",r:"1.8",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"10",y1:"6",x2:"20",y2:"6",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"10",y1:"18",x2:"16",y2:"18",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"star-rating":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"m6 8 .9 2 2.1.2-1.6 1.4.5 2.1L6 12.6 4.1 13.7l.5-2.1L3 10.2l2.1-.2L6 8Z",fill:"currentColor"}),(0,x.jsx)("path",{d:"m12 8 .9 2 2.1.2-1.6 1.4.5 2.1-1.9-1.1-1.9 1.1.5-2.1L9 10.2l2.1-.2L12 8Z",fill:"currentColor"}),(0,x.jsx)("path",{d:"m18 8 .9 2 2.1.2-1.6 1.4.5 2.1-1.9-1.1-1.9 1.1.5-2.1L15 10.2l2.1-.2L18 8Z",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round"})]}),foreground:h},modal:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.4",opacity:"0.4"}),(0,x.jsx)("rect",{x:"6",y:"7",width:"12",height:"10",rx:"1.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"8.5",y1:"10.5",x2:"15.5",y2:"10.5",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"8.5",y1:"13.5",x2:"13",y2:"13.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]}),foreground:h},lottie:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M10 8.5v7l6-3.5-6-3.5Z",fill:"currentColor"})]}),foreground:h},notice:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"8.01",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"12",y1:"11",x2:"12",y2:"16",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"facebook-feed":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"3",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M14 8h-1.5c-.8 0-1.5.7-1.5 1.5V11H9.5v2H11v5h2v-5h1.6l.4-2H13V9.8c0-.4.2-.8.7-.8H14V8Z",fill:"currentColor"})]}),foreground:h},"instagram-feed":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3.5",y:"3.5",width:"17",height:"17",rx:"4.5",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"12",cy:"12",r:"3.6",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("circle",{cx:"16.6",cy:"7.4",r:"1.1",fill:"currentColor"})]}),foreground:h},taxonomy:{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M4 5.5A1.5 1.5 0 0 1 5.5 4h6.7c.4 0 .8.16 1.06.44l6.3 6.3a1.5 1.5 0 0 1 0 2.12l-6.7 6.7a1.5 1.5 0 0 1-2.12 0l-6.3-6.3A1.5 1.5 0 0 1 4 12.2V5.5Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),(0,x.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.3",fill:"currentColor"})]}),foreground:h},"data-table":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"9",y1:"9",x2:"9",y2:"20",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"3",y1:"14.5",x2:"21",y2:"14.5",stroke:"currentColor",strokeWidth:"1.4"})]}),foreground:h},"product-name":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("path",{d:"M4 7h16",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("path",{d:"M4 12h11",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),(0,x.jsx)("path",{d:"M4 17h7",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"})]}),foreground:h},"product-price":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"8.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M14.5 9.2c-.6-.8-1.6-1.2-2.6-1.2-1.5 0-2.6.9-2.6 2.1 0 2.9 5.4 1.6 5.4 4.4 0 1.3-1.2 2.2-2.8 2.2-1.1 0-2.2-.5-2.8-1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),(0,x.jsx)("path",{d:"M12 6.2v11.6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),foreground:h},"product-rating":{src:(0,x.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M12 3.5l2.6 5.27 5.82.85-4.21 4.1.99 5.8L12 16.77 6.79 19.5l.99-5.8-4.21-4.1 5.82-.85L12 3.5z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})}),foreground:h},"product-detail":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("line",{x1:"3",y1:"9",x2:"21",y2:"9",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("rect",{x:"3",y:"4",width:"7",height:"5",rx:"2",fill:"currentColor",opacity:"0.18",stroke:"none"}),(0,x.jsx)("line",{x1:"6",y1:"13",x2:"18",y2:"13",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,x.jsx)("line",{x1:"6",y1:"16.5",x2:"14",y2:"16.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]}),foreground:h},"product-image":{src:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,x.jsx)("rect",{x:"3",y:"3.5",width:"18",height:"13",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.6"}),(0,x.jsx)("path",{d:"M6 13.5l3.2-3.6 2.6 2.7 2.4-2.1 3.8 3.9",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,x.jsx)("circle",{cx:"9",cy:"7.5",r:"1.3",fill:"currentColor"}),(0,x.jsx)("rect",{x:"4",y:"19",width:"4.5",height:"2.5",rx:"0.8",fill:"currentColor",opacity:"0.5",stroke:"none"}),(0,x.jsx)("rect",{x:"9.8",y:"19",width:"4.5",height:"2.5",rx:"0.8",fill:"currentColor",opacity:"0.25",stroke:"none"}),(0,x.jsx)("rect",{x:"15.6",y:"19",width:"4.5",height:"2.5",rx:"0.8",fill:"currentColor",opacity:"0.25",stroke:"none"})]}),foreground:h}};function u({block:e}){const r=d(a(e)),o=k[e.slug];return(0,x.jsxs)("div",{className:"flexa-thumb",style:{background:`linear-gradient(135deg, ${r.from} 0%, ${r.to} 100%)`},"aria-hidden":"true",children:[(0,x.jsx)("span",{className:"flexa-thumb__glow"}),(0,x.jsx)("span",{className:"flexa-thumb__bar flexa-thumb__bar--a"}),(0,x.jsx)("span",{className:"flexa-thumb__bar flexa-thumb__bar--b"}),(0,x.jsx)("span",{className:"flexa-thumb__chip",style:{color:r.accent},children:o?o.src:(0,x.jsx)("span",{className:"dashicons dashicons-screenoptions"})})]})}function g({blocks:e,disabled:s,onToggle:t,onToggleMany:l}){const[n,i]=(0,r.useState)(""),[h,k]=(0,r.useState)("all"),u=(0,r.useMemo)(()=>e.filter(e=>!e.is_child),[e]),g=(0,r.useMemo)(()=>{const e={};return u.forEach(r=>{const o=a(r);e[o]=(e[o]||0)+1}),e},[u]),j=(0,r.useMemo)(()=>c.filter(e=>g[e]>0),[g]),m=(0,r.useMemo)(()=>{const e=n.trim().toLowerCase();return u.filter(r=>("all"===h||a(r)===h)&&(!e||`${r.title||""} ${r.slug} ${r.description||""}`.toLowerCase().includes(e)))},[u,n,h]),b=u.filter(e=>!s.includes(e.slug)).length,p=m.map(e=>e.slug),v=m.filter(e=>!e.is_core),y=v.length>0&&v.every(e=>!s.includes(e.slug)),_=v.length>0&&v.every(e=>s.includes(e.slug));return(0,x.jsxs)("div",{className:"flexa-admin-card flexa-blocks",children:[(0,x.jsxs)("div",{className:"flexa-blocks__head",children:[(0,x.jsxs)("div",{children:[(0,x.jsx)("h2",{className:"flexa-admin-card__title",children:(0,o.__)("Blocks","flexa-block")}),(0,x.jsx)("p",{className:"flexa-blocks__count",children:(0,o.sprintf)(/* translators: 1: enabled block count, 2: total block count. */ /* translators: 1: enabled block count, 2: total block count. */ (0,o.__)("%1$d of %2$d blocks enabled","flexa-block"),b,u.length)})]}),(0,x.jsxs)("div",{className:"flexa-blocks__search",children:[(0,x.jsx)("span",{className:"dashicons dashicons-search","aria-hidden":"true"}),(0,x.jsx)("input",{type:"search",value:n,onChange:e=>i(e.target.value),placeholder:(0,o.__)("Search blocks…","flexa-block"),"aria-label":(0,o.__)("Search blocks","flexa-block")})]})]}),(0,x.jsxs)("div",{className:"flexa-blocks__toolbar",children:[(0,x.jsxs)("div",{className:"flexa-blocks__filters",role:"tablist",children:[(0,x.jsx)(f,{label:(0,o.__)("All","flexa-block"),count:u.length,active:"all"===h,onClick:()=>k("all")}),j.map(e=>(0,x.jsx)(f,{label:d(e).label,count:g[e],accent:d(e).accent,active:h===e,onClick:()=>k(e)},e))]}),(0,x.jsxs)("div",{className:"flexa-blocks__actions",children:[(0,x.jsxs)("button",{type:"button",className:"flexa-bulk-btn",disabled:y,onClick:()=>l(p,!0),children:[(0,x.jsx)("span",{className:"dashicons dashicons-yes","aria-hidden":"true"}),(0,o.__)("Enable all","flexa-block")]}),(0,x.jsxs)("button",{type:"button",className:"flexa-bulk-btn",disabled:_,onClick:()=>l(p,!1),children:[(0,x.jsx)("span",{className:"dashicons dashicons-hidden","aria-hidden":"true"}),(0,o.__)("Disable all","flexa-block")]})]})]}),0===m.length?(0,x.jsx)("p",{className:"flexa-blocks__empty",children:(0,o.__)("No blocks match your search.","flexa-block")}):(0,x.jsx)("div",{className:"flexa-blocks__grid",children:m.map(e=>(0,x.jsx)(w,{block:e,enabled:!s.includes(e.slug),onToggle:t},e.slug))})]})}function f({label:e,count:r,active:o,onClick:s,accent:t}){return(0,x.jsxs)("button",{type:"button",role:"tab","aria-selected":o,className:"flexa-pill"+(o?" is-active":""),style:o&&t?{background:t,borderColor:t}:void 0,onClick:s,children:[e,(0,x.jsx)("span",{className:"flexa-pill__count",children:r})]})}function w({block:e,enabled:r,onToggle:s}){const t=!!e.is_core,l=e.title||e.slug;return(0,x.jsxs)("div",{className:"flexa-block-card"+(r?"":" is-off"),children:[(0,x.jsx)(u,{block:e}),(0,x.jsxs)("div",{className:"flexa-block-card__body",children:[(0,x.jsxs)("div",{className:"flexa-block-card__head",children:[(0,x.jsxs)("h3",{className:"flexa-block-card__title",children:[l,t&&(0,x.jsx)("span",{className:"flexa-block-card__badge",children:(0,o.__)("Core","flexa-block")})]}),(0,x.jsx)("button",{type:"button",role:"switch","aria-checked":r,"aria-label":(0,o.sprintf)(/* translators: %s: block title. */ /* translators: %s: block title. */ (0,o.__)("Enable %s block","flexa-block"),l),className:"flexa-switch"+(r?" is-on":""),disabled:t,onClick:()=>s(e.slug,!r),children:(0,x.jsx)("span",{className:"flexa-switch__knob"})})]}),(0,x.jsx)("p",{className:"flexa-block-card__desc",children:t?(0,o.__)("Core block — always enabled.","flexa-block"):e.description||""})]})]})}function j({settings:e,onDark:r,onPerf:s}){const t=e.dark_mode||{},l=e.performance||{},n=!1!==t.enabled;return(0,x.jsxs)("div",{className:"flexa-admin__grid-two",children:[(0,x.jsxs)("section",{className:"flexa-admin-card flexa-setting-card",children:[(0,x.jsx)(b,{icon:"admin-appearance",tint:"#6366f1",title:(0,o.__)("Dark Mode","flexa-block"),subtitle:(0,o.__)("Choose how dark colours are emitted and triggered.","flexa-block")}),(0,x.jsx)("div",{className:"flexa-setting-card__body",children:(0,x.jsxs)("div",{className:"flexa-rows",children:[(0,x.jsx)(m,{label:(0,o.__)("Output dark mode CSS","flexa-block"),help:(0,o.__)("Master switch. Off = hide dark color pickers and skip dark CSS.","flexa-block"),checked:n,onChange:e=>r("enabled",e)}),n&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(m,{label:(0,o.__)("System preference (prefers-color-scheme)","flexa-block"),help:(0,o.__)("Follow the visitor’s OS light/dark setting.","flexa-block"),checked:!1!==t.colorScheme,onChange:e=>r("colorScheme",e)}),(0,x.jsx)(m,{label:(0,o.__)('Data attribute ([data-theme="dark"])',"flexa-block"),help:(0,o.__)('Also switch when the page sets [data-theme="dark"].',"flexa-block"),checked:!0===t.dataTheme,onChange:e=>r("dataTheme",e)})]})]})})]}),(0,x.jsxs)("section",{className:"flexa-admin-card flexa-setting-card",children:[(0,x.jsx)(b,{icon:"performance",tint:"#0d9488",title:(0,o.__)("Performance","flexa-block"),subtitle:(0,o.__)("Fine-tune the generated stylesheet output.","flexa-block")}),(0,x.jsx)("div",{className:"flexa-setting-card__body",children:(0,x.jsx)("div",{className:"flexa-rows",children:(0,x.jsx)(m,{label:(0,o.__)("CSS specificity boost","flexa-block"),help:(0,o.__)('Prepend "body" to generated selectors so they reliably override theme styles.',"flexa-block"),checked:!0===l.specificityBoost,onChange:e=>s("specificityBoost",e)})})})]})]})}function m({label:e,help:r,checked:o,onChange:s}){return(0,x.jsxs)("div",{className:"flexa-setting-row"+(o?" is-on":""),children:[(0,x.jsxs)("span",{className:"flexa-setting-row__text",children:[(0,x.jsx)("span",{className:"flexa-setting-row__label",children:e}),r&&(0,x.jsx)("span",{className:"flexa-setting-row__help",children:r})]}),(0,x.jsx)("button",{type:"button",role:"switch","aria-checked":o,"aria-label":e,className:"flexa-switch"+(o?" is-on":""),onClick:()=>s(!o),children:(0,x.jsx)("span",{className:"flexa-switch__knob"})})]})}function b({icon:e,tint:r,title:o,subtitle:s}){return(0,x.jsxs)("div",{className:"flexa-setting-card__header",children:[(0,x.jsx)("span",{className:"flexa-setting-card__icon",style:{color:r,background:`${r}1a`},"aria-hidden":"true",children:(0,x.jsx)("span",{className:`dashicons dashicons-${e}`})}),(0,x.jsxs)("div",{children:[(0,x.jsx)("h2",{className:"flexa-admin-card__title",children:o}),(0,x.jsx)("p",{className:"flexa-setting-card__sub",children:s})]})]})}function p({settings:e,editableBlocks:s,blocks:t,roles:n,onSetEnabled:i,onToggleRole:h,onToggleBlock:k}){const u=e.inline_editor||{},g=!1!==u.enabled,w=u.disabled_blocks||[],j=u.roles||[],[m,p]=(0,r.useState)("all"),[_,C]=(0,r.useState)(""),W=(0,r.useMemo)(()=>s.map(e=>t.find(r=>r.slug===e)).filter(Boolean),[s,t]),L=(0,r.useMemo)(()=>{const e={};return W.forEach(r=>{const o=a(r);e[o]=(e[o]||0)+1}),e},[W]),N=(0,r.useMemo)(()=>c.filter(e=>L[e]>0),[L]),B=(0,r.useMemo)(()=>{const e=_.trim().toLowerCase();return W.filter(r=>("all"===m||a(r)===m)&&(!e||`${r.title||""} ${r.slug} ${r.description||""}`.toLowerCase().includes(e)))},[W,m,_]);return(0,x.jsxs)("div",{className:"flexa-editing",children:[(0,x.jsxs)("section",{className:"flexa-admin-card flexa-setting-card",children:[(0,x.jsx)(b,{icon:"edit-page",tint:"#2563eb",title:(0,o.__)("Front-End Editing","flexa-block"),subtitle:(0,o.__)("Let permitted users edit block text directly on the live site.","flexa-block")}),(0,x.jsx)("div",{className:"flexa-setting-card__body",children:(0,x.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,o.__)("Enable front-end editing","flexa-block"),help:(0,o.__)("Master switch. Off = no inline editing UI is loaded on the site.","flexa-block"),checked:g,onChange:i})})]}),g&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("section",{className:"flexa-admin-card flexa-setting-card",children:[(0,x.jsx)(b,{icon:"groups",tint:"#0d9488",title:(0,o.__)("Allowed roles","flexa-block"),subtitle:(0,o.__)("Administrators always have access. Choose which other roles may edit inline (they still need permission to edit the post).","flexa-block")}),(0,x.jsx)("div",{className:"flexa-setting-card__body",children:0===n.length?(0,x.jsx)("p",{className:"flexa-editing__empty",children:(0,o.__)("No other roles found.","flexa-block")}):(0,x.jsxs)("div",{className:"flexa-roles",children:[(0,x.jsx)(v,{role:{slug:"administrator",name:(0,o.__)("Administrator","flexa-block")},allowed:!0,locked:!0,onToggle:()=>{}}),n.map(e=>(0,x.jsx)(v,{role:e,allowed:j.includes(e.slug),onToggle:h},e.slug))]})})]}),(0,x.jsxs)("section",{className:"flexa-admin-card flexa-setting-card",children:[(0,x.jsx)(b,{icon:"screenoptions",tint:"#7c3aed",title:(0,o.__)("Editable blocks","flexa-block"),subtitle:(0,o.__)("Which block types can be edited from the front end.","flexa-block")}),(0,x.jsxs)("div",{className:"flexa-setting-card__body",children:[(0,x.jsx)("p",{className:"flexa-editing__note",children:(0,o.__)("Only blocks with editable text are listed. Media, layout and auto-generated blocks (Image, Gallery, Container, Post Grid…) aren’t shown — they have no text to edit.","flexa-block")}),(0,x.jsxs)("div",{children:[(0,x.jsxs)("div",{className:"flexa-blocks__toolbar",children:[(0,x.jsxs)("div",{className:"flexa-blocks__filters",role:"tablist",children:[(0,x.jsx)(f,{label:(0,o.__)("All","flexa-block"),count:W.length,active:"all"===m,onClick:()=>p("all")}),N.map(e=>(0,x.jsx)(f,{label:d(e).label,count:L[e],accent:d(e).accent,active:m===e,onClick:()=>p(e)},e))]}),(0,x.jsxs)("div",{className:"flexa-blocks__search",children:[(0,x.jsx)("span",{className:"dashicons dashicons-search","aria-hidden":"true"}),(0,x.jsx)("input",{type:"search",value:_,onChange:e=>C(e.target.value),placeholder:(0,o.__)("Search blocks…","flexa-block"),"aria-label":(0,o.__)("Search editable blocks","flexa-block")})]})]}),0===B.length?(0,x.jsx)("p",{className:"flexa-blocks__empty",children:(0,o.__)("No blocks match your search.","flexa-block")}):(0,x.jsx)("div",{className:"flexa-blocks__grid",children:B.map(e=>(0,x.jsx)(y,{block:e,enabled:!w.includes(e.slug),onToggle:k},e.slug))})]})]})]})]})]})}function v({role:e,allowed:r,locked:s,onToggle:t}){return(0,x.jsxs)("div",{className:`flexa-role-row${r?" is-on":""}${s?" is-locked":""}`,children:[(0,x.jsx)("span",{className:"flexa-role-row__icon dashicons dashicons-admin-users","aria-hidden":"true"}),(0,x.jsx)("span",{className:"flexa-role-row__name",children:e.name}),s?(0,x.jsx)("span",{className:"flexa-role-row__badge",children:(0,o.__)("Always","flexa-block")}):(0,x.jsx)("button",{type:"button",role:"switch","aria-checked":r,"aria-label":(0,o.sprintf)(/* translators: %s: role name. */ /* translators: %s: role name. */ (0,o.__)("Allow %s to edit on the front end","flexa-block"),e.name),className:"flexa-switch"+(r?" is-on":""),onClick:()=>t(e.slug,!r),children:(0,x.jsx)("span",{className:"flexa-switch__knob"})})]})}function y({block:e,enabled:r,onToggle:s}){const t=e.title||e.slug;return(0,x.jsxs)("div",{className:"flexa-block-card"+(r?"":" is-off"),children:[(0,x.jsx)(u,{block:e}),(0,x.jsxs)("div",{className:"flexa-block-card__body",children:[(0,x.jsxs)("div",{className:"flexa-block-card__head",children:[(0,x.jsx)("h3",{className:"flexa-block-card__title",children:t}),(0,x.jsx)("button",{type:"button",role:"switch","aria-checked":r,"aria-label":(0,o.sprintf)(/* translators: %s: block title. */ /* translators: %s: block title. */ (0,o.__)("Allow editing %s","flexa-block"),t),className:"flexa-switch"+(r?" is-on":""),onClick:()=>s(e.slug,!r),children:(0,x.jsx)("span",{className:"flexa-switch__knob"})})]}),(0,x.jsx)("p",{className:"flexa-block-card__desc",children:e.description||""})]})]})}const _=window.flexaBlockAdmin||{};function C(){const[e,s]=(0,r.useState)(_.settings||{}),[l,n]=(0,r.useState)("idle"),[i,c]=(0,r.useState)("general"),a=(0,r.useRef)(!0),d=(0,r.useRef)(0),h=(0,r.useRef)(0),k=e=>{n("saving"),window.clearTimeout(h.current),t()({url:_.restUrl,method:"POST",data:e}).then(()=>{n("saved"),h.current=window.setTimeout(()=>n("idle"),2500)}).catch(()=>n("error"))};(0,r.useEffect)(()=>{if(!a.current)return n("saving"),window.clearTimeout(d.current),d.current=window.setTimeout(()=>k(e),700),()=>window.clearTimeout(d.current);a.current=!1},[e]);const u=_.blocks||[],f=e.disabled_blocks||[],w=(0,r.useMemo)(()=>new Set(u.filter(e=>e.is_core).map(e=>e.slug)),[u]);return(0,x.jsxs)("div",{className:"flexa-app",children:[(0,x.jsxs)("aside",{className:"flexa-sidebar",children:[(0,x.jsxs)("div",{className:"flexa-sidebar__brand",children:[(0,x.jsx)("span",{className:"flexa-sidebar__logo dashicons dashicons-layout","aria-hidden":"true"}),(0,x.jsxs)("div",{children:[(0,x.jsx)("h1",{className:"flexa-sidebar__title",children:(0,o.__)("Flexa Block","flexa-block")}),_.version&&(0,x.jsxs)("span",{className:"flexa-sidebar__version",children:["v",_.version]})]})]}),(0,x.jsxs)("nav",{className:"flexa-sidebar__nav","aria-label":(0,o.__)("Settings sections","flexa-block"),children:[(0,x.jsx)(W,{icon:"admin-settings",label:(0,o.__)("General","flexa-block"),desc:(0,o.__)("Dark mode & performance","flexa-block"),active:"general"===i,onClick:()=>c("general")}),(0,x.jsx)(W,{icon:"screenoptions",label:(0,o.__)("Blocks","flexa-block"),desc:(0,o.__)("Enable or disable blocks","flexa-block"),active:"blocks"===i,onClick:()=>c("blocks")}),(0,x.jsx)(W,{icon:"edit-page",label:(0,o.__)("Editing","flexa-block"),desc:(0,o.__)("Front-end inline editing","flexa-block"),active:"editing"===i,onClick:()=>c("editing")})]})]}),(0,x.jsxs)("main",{className:"flexa-content",children:["general"===i&&(0,x.jsx)(j,{settings:e,onDark:(e,r)=>s(o=>({...o,dark_mode:{...o.dark_mode,[e]:r}})),onPerf:(e,r)=>s(o=>({...o,performance:{...o.performance,[e]:r}}))}),"blocks"===i&&(0,x.jsx)(g,{blocks:u,disabled:f,onToggle:(e,r)=>s(o=>{const s=new Set(o.disabled_blocks||[]);return r?s.delete(e):s.add(e),{...o,disabled_blocks:Array.from(s)}}),onToggleMany:(e,r)=>s(o=>{const s=new Set(o.disabled_blocks||[]);return e.forEach(e=>{r?s.delete(e):w.has(e)||s.add(e)}),{...o,disabled_blocks:Array.from(s)}})}),"editing"===i&&(0,x.jsx)(p,{settings:e,editableBlocks:_.editableBlocks||[],blocks:u,roles:_.roles||[],onSetEnabled:e=>{return r="enabled",o=e,s(e=>({...e,inline_editor:{...e.inline_editor,[r]:o}}));var r,o},onToggleRole:(e,r)=>s(o=>{const s=new Set(o.inline_editor?.roles||[]);return r?s.add(e):s.delete(e),{...o,inline_editor:{...o.inline_editor,roles:Array.from(s)}}}),onToggleBlock:(e,r)=>s(o=>{const s=new Set(o.inline_editor?.disabled_blocks||[]);return r?s.delete(e):s.add(e),{...o,inline_editor:{...o.inline_editor,disabled_blocks:Array.from(s)}}})})]}),(0,x.jsx)("div",{className:"flexa-toast","aria-live":"polite",children:(0,x.jsx)(L,{status:l,onRetry:()=>k(e)})})]})}function W({icon:e,label:r,desc:o,active:s,onClick:t}){return(0,x.jsxs)("button",{type:"button",className:"flexa-nav-item"+(s?" is-active":""),"aria-current":s?"page":void 0,onClick:t,children:[(0,x.jsx)("span",{className:`flexa-nav-item__icon dashicons dashicons-${e}`,"aria-hidden":"true"}),(0,x.jsxs)("span",{className:"flexa-nav-item__text",children:[(0,x.jsx)("span",{className:"flexa-nav-item__label",children:r}),(0,x.jsx)("span",{className:"flexa-nav-item__desc",children:o})]})]})}function L({status:e,onRetry:r}){return"idle"===e?null:"saving"===e?(0,x.jsxs)("span",{className:"flexa-save flexa-save--saving",children:[(0,x.jsx)(l.Spinner,{}),(0,o.__)("Saving…","flexa-block")]}):"saved"===e?(0,x.jsxs)("span",{className:"flexa-save flexa-save--saved",children:[(0,x.jsx)("span",{className:"dashicons dashicons-yes-alt","aria-hidden":"true"}),(0,o.__)("All changes saved","flexa-block")]}):(0,x.jsxs)("span",{className:"flexa-save flexa-save--error",children:[(0,x.jsx)("span",{className:"dashicons dashicons-warning","aria-hidden":"true"}),(0,o.__)("Could not save.","flexa-block"),(0,x.jsx)("button",{type:"button",className:"flexa-save__retry",onClick:r,children:(0,o.__)("Retry","flexa-block")})]})}_.nonce&&t().use(t().createNonceMiddleware(_.nonce));const N=document.getElementById("flexa-block-admin");N&&(0,r.createRoot)(N).render((0,x.jsx)(C,{}))})();
Save
Cancel