From de3794b75be5866c1ebcac9f627aa5f7fa356c35 Mon Sep 17 00:00:00 2001 From: SEO Themes Date: Fri, 24 Nov 2023 23:39:22 +0800 Subject: [PATCH] Search input background --- assets/js/editor.asset.php | 2 +- assets/js/editor.js | 2 +- includes/blocks/search.php | 5 + includes/common/styles.php | 5 +- src/api/icon-store.tsx | 29 ++--- src/block-extensions/search-input.tsx | 162 ++++++++++++++++++++++++++ src/index.tsx | 1 + src/utility/color.tsx | 19 +++ styles/dark.json | 4 +- 9 files changed, 211 insertions(+), 18 deletions(-) create mode 100644 src/block-extensions/search-input.tsx create mode 100644 src/utility/color.tsx diff --git a/assets/js/editor.asset.php b/assets/js/editor.asset.php index 2e48ee5..1993fa3 100644 --- a/assets/js/editor.asset.php +++ b/assets/js/editor.asset.php @@ -1 +1 @@ - array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives', 'wp-rich-text'), 'version' => 'ef9b4ff8d9255b2758a3'); + array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-primitives', 'wp-rich-text'), 'version' => '26721c6dc7cf48bb87ba'); diff --git a/assets/js/editor.js b/assets/js/editor.js index bdd2556..810f857 100644 --- a/assets/js/editor.js +++ b/assets/js/editor.js @@ -1 +1 @@ -(()=>{var e={960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},915:function(e,t,n){"use strict";var l=this&&this.__createBinding||(Object.create?function(e,t,n,l){void 0===l&&(l=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,l,r)}:function(e,t,n,l){void 0===l&&(l=n),e[l]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||l(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var o=n(960),a=n(790);r(n(790),t);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=i),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:i,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?o.ElementType.Tag:void 0,l=new a.Element(e,t,void 0,n);this.addNode(l),this.tagStack.push(l)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===o.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},790:function(e,t,n){"use strict";var l,r=this&&this.__extends||(l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},l(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,l=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(i);t.NodeWithChildren=d;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var y=function(e){function t(t,n,l,r){void 0===l&&(l=[]),void 0===r&&(r="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var o=e.call(this,l)||this;return o.name=t,o.attribs=n,o.type=r,o}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,l;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(l=e["x-attribsPrefix"])||void 0===l?void 0:l[t]}}))},enumerable:!1,configurable:!0}),t}(d);function h(e){return(0,a.isTag)(e)}function g(e){return e.type===a.ElementType.CDATA}function b(e){return e.type===a.ElementType.Text}function v(e){return e.type===a.ElementType.Comment}function k(e){return e.type===a.ElementType.Directive}function E(e){return e.type===a.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),b(e))n=new c(e.data);else if(v(e))n=new u(e.data);else if(h(e)){var l=t?x(e.children):[],r=new y(e.name,o({},e.attribs),l);l.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=r}else if(g(e)){l=t?x(e.children):[];var a=new p(l);l.forEach((function(e){return e.parent=a})),n=a}else if(E(e)){l=t?x(e.children):[];var i=new f(l);l.forEach((function(e){return e.parent=i})),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),n=i}else{if(!k(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new m(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n{t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]},276:e=>{var t="html",n="head",l="body",r=/<([a-zA-Z]+[0-9]?)/,o=//i,a=//i,i=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},s=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},c="object"==typeof window&&window.DOMParser;if("function"==typeof c){var u=new c;i=s=function(e,t){return t&&(e="<"+t+">"+e+""),u.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var m=document.implementation.createHTMLDocument();i=function(e,t){return t?(m.documentElement.querySelector(t).innerHTML=e,m):(m.documentElement.innerHTML=e,m)}}var d,p="object"==typeof document?document.createElement("template"):{};p.content&&(d=function(e){return p.innerHTML=e,p.content.childNodes}),e.exports=function(e){var c,u,m,p,f=e.match(r);switch(f&&f[1]&&(c=f[1].toLowerCase()),c){case t:return u=s(e),o.test(e)||(m=u.querySelector(n))&&m.parentNode.removeChild(m),a.test(e)||(m=u.querySelector(l))&&m.parentNode.removeChild(m),u.querySelectorAll(t);case n:case l:return p=(u=i(e)).querySelectorAll(c),a.test(e)&&o.test(e)?p[0].parentNode.childNodes:p;default:return d?d(e):(m=i(e,l).querySelector(l)).childNodes}}},152:(e,t,n)=>{var l=n(276),r=n(507).formatDOM,o=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(o);return n&&n[1]&&(t=n[1]),r(l(e),null,t)}},507:(e,t,n)=>{for(var l,r=n(915),o=n(885).CASE_SENSITIVE_TAG_NAMES,a=r.Comment,i=r.Element,s=r.ProcessingInstruction,c=r.Text,u={},m=0,d=o.length;m{var l=n(915),r=n(152),o=n(484),a=n(670);r="function"==typeof r.default?r.default:r;var i={lowerCaseAttributeNames:!1};function s(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:a(r(e,(t=t||{}).htmlparser2||i),t)}s.domToReact=a,s.htmlToDOM=r,s.attributesToProps=o,s.Comment=l.Comment,s.Element=l.Element,s.ProcessingInstruction=l.ProcessingInstruction,s.Text=l.Text,e.exports=s,s.default=s},484:(e,t,n)=>{var l=n(726),r=n(606),o=["checked","value"],a=["input","select","textarea"],i={reset:!0,submit:!0};function s(e){return l.possibleStandardNames[e]}e.exports=function(e,t){var n,c,u,m,d,p={},f=(e=e||{}).type&&i[e.type];for(n in e)if(u=e[n],l.isCustomAttribute(n))p[n]=u;else if(m=s(c=n.toLowerCase()))switch(d=l.getPropertyInfo(m),-1===o.indexOf(m)||-1===a.indexOf(t)||f||(m=s("default"+c)),p[m]=u,d&&d.type){case l.BOOLEAN:p[m]=!0;break;case l.OVERLOADED_BOOLEAN:""===u&&(p[m]=!0)}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(p[n]=u);return r.setStyleProp(e.style,p),p}},670:(e,t,n)=>{var l=n(196),r=n(484),o=n(606),a=o.setStyleProp,i=o.canTextBeChildOfNode;function s(e){return o.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&o.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var o,c,u,m,d,p=(n=n||{}).library||l,f=p.cloneElement,y=p.createElement,h=p.isValidElement,g=[],b="function"==typeof n.replace,v=n.trim,k=0,E=t.length;k1&&(u=f(u,{key:u.key||k})),g.push(u);else if("text"!==o.type){switch(m=o.attribs,s(o)?a(m.style,m):m&&(m=r(m,o.name)),d=null,o.type){case"script":case"style":o.children[0]&&(m.dangerouslySetInnerHTML={__html:o.children[0].data});break;case"tag":"textarea"===o.name&&o.children[0]?m.defaultValue=o.children[0].data:o.children&&o.children.length&&(d=e(o.children,n));break;default:continue}E>1&&(m.key=k),g.push(y(o.name,m,d))}else{if((c=!o.data.trim().length)&&o.parent&&!i(o.parent))continue;if(v&&c)continue;g.push(o.data)}return 1===g.length?g[0]:g}},606:(e,t,n)=>{var l=n(196),r=n(476).default,o={reactCompat:!0},a=l.version.split(".")[0]>=16,i=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var n,l,r="function"==typeof t,o={},a={};for(n in e)l=e[n],r&&(o=t(n,l))&&2===o.length?a[o[0]]=o[1]:"string"==typeof l&&(a[l]=n);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!=e)try{t.style=r(e,o)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!i.has(e.name)},elementsWithNoTextChildren:i}},139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,l=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var m=1,d=1;function p(e){var t=e.match(n);t&&(m+=t.length);var l=e.lastIndexOf("\n");d=~l?e.length-l:d+e.length}function f(){var e={line:m,column:d};return function(t){return t.position=new y(e),v(),t}}function y(e){this.start=e,this.end={line:m,column:d},this.source=s.source}y.prototype.content=e;var h=[];function g(t){var n=new Error(s.source+":"+m+":"+d+": "+t);if(n.reason=t,n.filename=s.source,n.line=m,n.column=d,n.source=e,!s.silent)throw n;h.push(n)}function b(t){var n=t.exec(e);if(n){var l=n[0];return p(l),e=e.slice(l.length),n}}function v(){b(l)}function k(e){var t;for(e=e||[];t=E();)!1!==t&&e.push(t);return e}function E(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var l=e.slice(2,n-2);return d+=2,p(l),e=e.slice(n),d+=2,t({type:"comment",comment:l})}}function w(){var e=f(),n=b(r);if(n){if(E(),!b(o))return g("property missing ':'");var l=b(a),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:l?u(l[0].replace(t,c)):c});return b(i),s}}return v(),function(){var e,t=[];for(k(t);e=w();)!1!==e&&(t.push(e),k(t));return t}()}},433:()=>{Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},325:(e,t,n)=>{var l=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,l={},r={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=m.reach);x+=w.value.length,w=w.next){var _=w.value;if(t.length>e.length)return;if(!(_ instanceof o)){var C,S=1;if(b){if(!(C=a(E,x,e,g))||C.index>=e.length)break;var F=C.index,P=C.index+C[0].length,N=x;for(N+=w.value.length;F>=N;)N+=(w=w.next).value.length;if(x=N-=w.value.length,w.value instanceof o)continue;for(var O=w;O!==t.tail&&(Nm.reach&&(m.reach=A);var j=w.prev;if(I&&(j=c(t,j,I),x+=I.length),u(t,j,S),w=c(t,j,new o(d,h?r.tokenize(T,h):T,v,T)),B&&c(t,w,B),S>1){var z={cause:d+","+f,reach:A};i(e,t,n,w.prev,x,z),m&&z.reach>m.reach&&(m.reach=z.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var l=t.next,r={value:n,prev:t,next:l};return t.next=r,l.prev=r,e.length++,r}function u(e,t,n){for(var l=t.next,r=0;r"+o.content+""},!e.document)return e.addEventListener?(r.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),l=n.language,o=n.code,a=n.immediateClose;e.postMessage(r.highlight(o,r.languages[l],l)),a&&e.close()}),!1),r):r;var m=r.util.currentScript();function d(){r.manual||r.highlightAll()}if(m&&(r.filename=m.src,m.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var p=document.readyState;"loading"===p||"interactive"===p&&m&&m.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return r}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=l),void 0!==n.g&&(n.g.Prism=l)},980:()=>{Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript},726:(e,t,n)=>{"use strict";function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},460:function(e,t,n){"use strict";var l,r=this&&this.__extends||(l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},l(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,l=arguments.length;n-1){t._history.stack=s.slice(0,c+1);var u=t._history.stack.length;if(u>100){var m=u-100;t._history.stack=s.slice(m,u),t._history.offset=Math.max(t._history.offset-m,0)}}var d=Date.now();if(n){var p=t._history.stack[t._history.offset];if(p&&d-p.timestamp<3e3){var f=/[^a-z0-9]([a-z0-9]+)$/i,y=null===(l=t._getLines(p.value,p.selectionStart).pop())||void 0===l?void 0:l.match(f),h=null===(r=t._getLines(e.value,e.selectionStart).pop())||void 0===r?void 0:r.match(f);if((null==y?void 0:y[1])&&(null===(a=null==h?void 0:h[1])||void 0===a?void 0:a.startsWith(y[1])))return void(t._history.stack[t._history.offset]=o(o({},e),{timestamp:d}))}}t._history.stack.push(o(o({},e),{timestamp:d})),t._history.offset++},t._updateInput=function(e){var n=t._input;n&&(n.value=e.value,n.selectionStart=e.selectionStart,n.selectionEnd=e.selectionEnd,t.props.onValueChange(e.value))},t._applyEdits=function(e){var n=t._input,l=t._history.stack[t._history.offset];l&&n&&(t._history.stack[t._history.offset]=o(o({},l),{selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})),t._recordChange(e),t._updateInput(e)},t._undoEdit=function(){var e=t._history,n=e.stack,l=e.offset,r=n[l-1];r&&(t._updateInput(r),t._history.offset=Math.max(l-1,0))},t._redoEdit=function(){var e=t._history,n=e.stack,l=e.offset,r=n[l+1];r&&(t._updateInput(r),t._history.offset=Math.min(l+1,n.length-1))},t._handleKeyDown=function(e){var n=t.props,l=n.tabSize,r=n.insertSpaces,o=n.ignoreTabKey,a=n.onKeyDown;if(!a||(a(e),!e.defaultPrevented)){27===e.keyCode&&e.currentTarget.blur();var i=e.currentTarget,s=i.value,c=i.selectionStart,u=i.selectionEnd,p=(r?" ":"\t").repeat(l);if(9===e.keyCode&&!o&&t.state.capture)if(e.preventDefault(),e.shiftKey){var f=(b=t._getLines(s,c)).length-1,y=t._getLines(s,u).length-1,h=s.split("\n").map((function(e,t){return t>=f&&t<=y&&e.startsWith(p)?e.substring(p.length):e})).join("\n");if(s!==h){var g=b[f];t._applyEdits({value:h,selectionStart:(null==g?void 0:g.startsWith(p))?c-p.length:c,selectionEnd:u-(s.length-h.length)})}}else if(c!==u){var b,v=(b=t._getLines(s,c)).length-1,k=t._getLines(s,u).length-1;g=b[v],t._applyEdits({value:s.split("\n").map((function(e,t){return t>=v&&t<=k?p+e:e})).join("\n"),selectionStart:g&&/\S/.test(g)?c+p.length:c,selectionEnd:u+p.length*(k-v+1)})}else{var E=c+p.length;t._applyEdits({value:s.substring(0,c)+p+s.substring(u),selectionStart:E,selectionEnd:E})}else if(8===e.keyCode){var w=c!==u;s.substring(0,c).endsWith(p)&&!w&&(e.preventDefault(),E=c-p.length,t._applyEdits({value:s.substring(0,c-p.length)+s.substring(u),selectionStart:E,selectionEnd:E}))}else if(13===e.keyCode){if(c===u){var x=t._getLines(s,c).pop(),_=null==x?void 0:x.match(/^\s+/);if(null==_?void 0:_[0]){e.preventDefault();var C="\n"+_[0];E=c+C.length,t._applyEdits({value:s.substring(0,c)+C+s.substring(u),selectionStart:E,selectionEnd:E})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var S=void 0;57===e.keyCode&&e.shiftKey?S=["(",")"]:219===e.keyCode?S=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?S=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(S=["`","`"]),c!==u&&S&&(e.preventDefault(),t._applyEdits({value:s.substring(0,c)+S[0]+s.substring(c,u)+S[1]+s.substring(u),selectionStart:c,selectionEnd:u+2}))}else!(d?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(d?e.metaKey&&90===e.keyCode&&e.shiftKey:m?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),t._redoEdit()):77!==e.keyCode||!e.ctrlKey||d&&!e.shiftKey||(e.preventDefault(),t.setState((function(e){return{capture:!e.capture}}))):(e.preventDefault(),t._undoEdit())}},t._handleChange=function(e){var n=e.currentTarget,l=n.value,r=n.selectionStart,o=n.selectionEnd;t._recordChange({value:l,selectionStart:r,selectionEnd:o},!0),t.props.onValueChange(l)},t._history={stack:[],offset:-1},t._input=null,t}return r(t,e),t.prototype.componentDidMount=function(){this._recordCurrentState()},Object.defineProperty(t.prototype,"session",{get:function(){return{history:this._history}},set:function(e){this._history=e.history},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.value,l=t.style,r=t.padding,a=t.highlight,i=t.textareaId,s=t.textareaClassName,m=t.autoFocus,d=t.disabled,y=t.form,g=t.maxLength,b=t.minLength,v=t.name,k=t.placeholder,E=t.readOnly,w=t.required,x=t.onClick,_=t.onFocus,C=t.onBlur,S=t.onKeyUp,F=(t.onKeyDown,t.onValueChange,t.tabSize,t.insertSpaces,t.ignoreTabKey,t.preClassName),P=c(t,["value","style","padding","highlight","textareaId","textareaClassName","autoFocus","disabled","form","maxLength","minLength","name","placeholder","readOnly","required","onClick","onFocus","onBlur","onKeyUp","onKeyDown","onValueChange","tabSize","insertSpaces","ignoreTabKey","preClassName"]),N={paddingTop:"object"==typeof r?r.top:r,paddingRight:"object"==typeof r?r.right:r,paddingBottom:"object"==typeof r?r.bottom:r,paddingLeft:"object"==typeof r?r.left:r},O=a(n);return u.createElement("div",o({},P,{style:o(o({},h.container),l)}),u.createElement("pre",o({className:F,"aria-hidden":"true",style:o(o(o({},h.editor),h.highlight),N)},"string"==typeof O?{dangerouslySetInnerHTML:{__html:O+"
"}}:{children:O})),u.createElement("textarea",{ref:function(t){return e._input=t},style:o(o(o({},h.editor),h.textarea),N),className:p+(s?" ".concat(s):""),id:i,value:n,onChange:this._handleChange,onKeyDown:this._handleKeyDown,onClick:x,onKeyUp:S,onFocus:_,onBlur:C,disabled:d,form:y,maxLength:g,minLength:b,name:v,placeholder:k,readOnly:E,required:w,autoFocus:m,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),u.createElement("style",{dangerouslySetInnerHTML:{__html:f}}))},t.defaultProps={tabSize:2,insertSpaces:!0,ignoreTabKey:!1,padding:0},t}(u.Component);t.default=y;var h={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}}},476:function(e,t,n){"use strict";var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=l(n(848)),o=n(678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,l){e&&l&&(n[(0,o.camelCase)(e,t)]=l)})),n):n}},678:(e,t)=>{"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,l=/-([a-z])/g,r=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,s):e.replace(o,s)).replace(l,i))}},848:(e,t,n)=>{var l=n(139);function r(e,t){var n,r=null;if(!e||"string"!=typeof e)return r;for(var o,a,i=l(e),s="function"==typeof t,c=0,u=i.length;c{"use strict";e.exports=window.React}},t={};function n(l){var r=t[l];if(void 0!==r)return r.exports;var o=t[l]={exports:{}};return e[l].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var l in t)n.o(t,l)&&!n.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},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),(()=>{"use strict";var e=n(196);const t=window.wp.hooks,l=window.wp.compose,r=e=>e?e?.toLowerCase()?.replace(/(?<= )[^\s]|^./g,(e=>e?.toUpperCase())):"",o=e=>{var t;return e&&null!==(t=e?.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)?.join("-")?.toLowerCase())&&void 0!==t?t:""},a=(e="",t,n)=>e?.split(t)?.join(n);var i,s;const c=null!==(i=window?.blockify?.blockSupports)&&void 0!==i?i:{},u=e=>{var t;return null!==(t=c?.[e]?.blockifyPosition)&&void 0!==t&&t},m=null!==(s=window?.blockify?.extensionOptions)&&void 0!==s?s:{};(0,t.addFilter)("blocks.registerBlockType","blockify/add-position-attributes",((e,t)=>{if(u(t)){var n;const t={};Object.keys(m).forEach((e=>{t[e]={type:"object"}})),e.attributes={...e.attributes,style:{...t,...null!==(n=e?.attributes?.style)&&void 0!==n?n:{}}}}return e}),0);const d=e=>{var t;const n=[],l=null!==(t=e?.style)&&void 0!==t?t:{};return Object.keys(m).forEach((e=>{const t=o(e);var r,a,i;m?.[e]?.options?(null!==(r=l?.[e]?.all)&&void 0!==r&&r&&n.push(`has-${t}-${o(l?.[e]?.all)}`),null!==(a=l?.[e]?.mobile)&&void 0!==a&&a&&n.push(`has-${t}-${o(l?.[e]?.mobile)}-mobile`),null!==(i=l?.[e]?.desktop)&&void 0!==i&&i&&n.push(`has-${t}-${o(l?.[e]?.desktop)}-desktop`)):l?.[e]&&n.push(`has-${t}`)})),n},p=e=>{var t;const n={},l=null!==(t=e?.style)&&void 0!==t?t:{};return Object.keys(m).forEach((e=>{var t,r,a;if(m?.[e]?.options)return;const i=o(e);null!==(t=l?.[e]?.all)&&void 0!==t&&t&&(n[`--${i}`]=l?.[e]?.all),null!==(r=l?.[e]?.mobile)&&void 0!==r&&r&&(n[`--${i}-mobile`]=l?.[e]?.mobile),null!==(a=l?.[e]?.desktop)&&void 0!==a&&a&&(n[`--${i}-desktop`]=l?.[e]?.desktop)})),n};(0,t.addFilter)("editor.BlockListBlock","blockify/with-position-style",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{name:r,attributes:o}=n;if(!u(r))return(0,e.createElement)(t,{...n});const a=d(o),i=p(o),s=null!==(l=n?.wrapperProps)&&void 0!==l?l:{};return n={...n,style:{...n?.style,...i}},s&&(s.style={...s?.style,...i}),a.forEach((e=>{n?.className?.includes(e)||(n.className=n?.className+" "+e)})),n.wrapperProps=s,(0,e.createElement)(t,{...n})}),"withPositionStyle")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/save-position-style",(e=>{const{name:t,attributes:n}=e;if(!c?.[t]?.blockifyPosition)return e;const l=d(n),r=p(n);return l.forEach((t=>{e?.className?.includes(t)||(e.className=e?.className+" "+t)})),e={...e,style:{...e?.style,...r}}}),11);const f=window.wp.domReady;var y=n.n(f);const h=window.wp.blocks;y()((()=>{var e,t,n;const l=null!==(e=window?.blockify?.blockStyles)&&void 0!==e?e:{unregister:{},register:{}},o=null!==(t=l?.unregister)&&void 0!==t?t:{},i=null!==(n=l?.register)&&void 0!==n?n:{};Object.keys(o).forEach((e=>{o[e].forEach((t=>{(0,h.unregisterBlockStyle)(e,t)}))})),Object.keys(i).forEach((e=>{i[e].forEach((t=>{(0,h.registerBlockStyle)(e,{name:t,label:r(a(t,"-"," "))})}))}))}));const g=e=>Object.keys(e).map((t=>`${t?.includes("-")?t:o(t)}:${e[t]};`)).join(" "),b=e=>{const t={};return e.split(";").map((e=>{const[n,l]=e.split(":");return n&&(t[n]=l),null})),t},v=e=>e.includes("var:")?(e=e.replace("var:","var(--wp--"),(e=a(e,"|","--"))+")"):e,k=(e="",t="")=>{if(!t)return e;const n=e.split(" ");return t.split(" ").forEach((e=>{n.includes(e)||n.push(e)})),n.join(" ")},E=[{value:"px",label:"px"},{value:"%",label:"%"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"vw",label:"vw"},{value:"vh",label:"vh"},{value:"auto",label:"auto"}];var w;(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2000 2000"},(0,e.createElement)("path",{fill:"currentColor",d:"m1729.66 534.39-691.26-399.1a76.814 76.814 0 0 0-76.81 0l-691.26 399.1a76.818 76.818 0 0 0-38.4 66.52v798.19c0 27.44 14.64 52.8 38.4 66.52l691.26 399.1c11.88 6.86 25.14 10.29 38.4 10.29s26.52-3.43 38.4-10.29l691.26-399.1a76.818 76.818 0 0 0 38.4-66.52V600.9c.01-27.44-14.63-52.79-38.39-66.51zm-115.21 820.36-539.18 311.3V998.46c0-27.45-14.65-52.81-38.43-66.53l-574.18-331.2L1000 290.49l614.45 354.75v709.51z"}));const x=null!==(w=window?.blockify?.blockSupports)&&void 0!==w?w:{};(0,t.addFilter)("blocks.registerBlockType","blockify/block-supports",((e,t)=>(Object.keys(x).includes(t)&&(e.supports={...e.supports,...x[t]}),e)),0),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/alignment-class",((e,t,n)=>(Object.keys(x).includes(t.name)&&n?.align&&!e.className.includes(" align")&&(e.className+=" align"+n.align),e))),(0,t.addFilter)("editor.BlockListBlock","blockify/with-block-gap-css",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const o=(0,e.createElement)(t,{...n});if("core/page-list"!==n.name&&"core/button"!==n.name)return o;const a=null!==(l=n?.attributes?.style?.spacing?.blockGap)&&void 0!==l?l:"";if(!a)return o;const i={...(n={...n,style:{...null!==(r=n.style)&&void 0!==r?r:{},"--wp--style--block-gap":v(a)}}).wrapperProps,style:{...n.wrapperProps?.style,"--wp--style--block-gap":v(a)}};return(0,e.createElement)(t,{...n,wrapperProps:i})}),"withBlockGapCss"));const _=window.wp.apiFetch;var C=n.n(_);const S=window.wp.data,F={icons:{social:{},wordpress:{}}},P={setIcons:e=>({type:"SET_ICONS",icons:e}),getIcons:e=>({type:"GET_ICONS",path:e})},N={getIcons(e){const{icons:t}=e;return t}},O={GET_ICONS:e=>C()({path:e.path})},T={*getIcons(){const e=yield P.getIcons("/blockify/v1/icons/");return P.setIcons(e)}},I="blockify/icons";(0,S.register)((0,S.createReduxStore)(I,{reducer:(e=F,t)=>"SET_ICONS"===t.type?{...e,icons:t.icons}:e,actions:P,selectors:N,controls:O,resolvers:T}));const B=window.wp.components,A=window.wp.i18n,j=window.wp.primitives,z=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z"})),R=({children:t,style:n})=>(0,e.createElement)("p",{className:"blockify-control-label",style:{margin:"8px 0",...n}},t),M=({children:t,style:n})=>(0,e.createElement)("p",{style:{fontSize:"12px",color:"rgb(117, 117, 117)",...n}},t);var D=n(460),L=n.n(D),H=n(325);n(433),n(980);const V=window.wp.element,$=({code:t,onChange:n,rows:l=32,language:o="html"})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(L(),{highlight:e=>{var t;return(0,H.highlight)(e,null!==(t=H.languages?.[o])&&void 0!==t?t:"html")},placeholder:(0,A.__)("Please enter ","blockify")+r(o)+(0,A.__)(" code here…","blockify"),value:a(t,'"',"'"),onValueChange:e=>{n(a(e,'"',"'"))},padding:10,style:{fontSize:12,fontFamily:"ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace",height:l.toString()+"em",maxHeight:"100%",borderRadius:"2px",color:"#c3cee3",background:"#263238"}})),G=t=>{const[n,l]=(0,V.useState)(!1),{title:r,description:o}=t;return(0,e.createElement)("div",{className:"blockify-code-editor-modal",style:{width:"100%",display:"flex",flexWrap:"wrap",flexDirection:"column",alignItems:"flex-start"}},(0,e.createElement)(R,null,null!=r?r:""),(0,e.createElement)(M,null,null!=o?o:""),(0,e.createElement)(B.Button,{isSecondary:!0,onClick:()=>l(!0)},r),n&&(0,e.createElement)(B.Modal,{title:null!=r?r:"",onRequestClose:()=>l(!1),style:{width:"80%"}},(0,e.createElement)($,{...t})))},W=()=>(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 120 120",xmlSpace:"preserve"},(0,e.createElement)(j.Path,{d:"M15 0h35v120H15zm55 0h35v120H70z"})),U=window.wp.blockEditor,q=(t,n)=>{var l,o;const{attributes:a,setAttributes:i}=t,{style:s}=a,c=null!==(l=s?.boxShadow)&&void 0!==l?l:{},u=null!==(o=(0,S.select)("core/block-editor").getSettings().colors)&&void 0!==o?o:[],m=e=>{let t;t="default"===n?{...e}:{hover:{...c?.hover,...e}},i({...a,style:{...s,boxShadow:{...c,...t}}})},d=e=>{for(const t of u)t.color===e&&(e="var(--wp--preset--color--"+t.slug+")");m({color:e})},p=(0,S.select)("core/block-editor")?.getSettings()?.__experimentalFeatures?.shadow?.presets?.theme;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)((()=>{const t="hover"===n?"-hover":"";return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ButtonGroup,{className:"blockify-shadow-presets"},p.map((l=>{const r="default"===n&&a.shadowPreset===l.slug||"hover"===n&&a.shadowPresetHover===l.slug;return(0,e.createElement)(B.Button,{key:l.slug+t,className:`has-${l.slug}-shadow`+t,isSmall:!0,variant:r?"primary":"secondary",onClick:()=>{i("hover"===n?{shadowPresetHover:l.slug}:{shadowPreset:l.slug})}},l.name)})))),(0,e.createElement)("br",null),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Custom box shadow","blockify"),checked:a?.useCustomBoxShadow,onChange:e=>{i({useCustomBoxShadow:e})}})))}),null),a?.useCustomBoxShadow&&(0,e.createElement)((()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,null,["x","y","blur","spread"].map((t=>(0,e.createElement)(B.FlexItem,{key:t},(0,e.createElement)(B.__experimentalNumberControl,{label:r(t),value:"default"===n?c[t]:c?.hover?.[t],onChange:e=>{e&&m({[t]:e})}})))))),(0,e.createElement)("br",null),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,{style:{flex:1.5}},(0,e.createElement)(U.__experimentalPanelColorGradientSettings,{title:(0,A.__)("Color","blockify"),showTitle:!1,enableAlpha:!0,settings:[{enableAlpha:!0,colorValue:"default"===n?c?.color:c?.[n]?.color,label:(0,A.__)("Color ","blockify")+("hover"===n?(0,A.__)(" Hover","blockify"):""),onColorChange:d}]})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Inset","blockify"),checked:"default"===n?c?.inset:c?.[n]?.inset,onChange:e=>{m({inset:e?"inset":""})}})))))),null))},K=t=>{const{attributes:n,setAttributes:l}=t,[r,o]=(0,V.useState)("default");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Shadow","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{l({shadowPreset:"",shadowPresetHover:"",style:{...n?.style,boxShadow:""}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Clear Shadow","blockify")}))),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:"default"===r?"primary":"secondary",onClick:()=>o("default")},(0,A.__)("Default","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"hover"===r?"primary":"secondary",onClick:()=>o("hover")},(0,A.__)("Hover","blockify")))),"default"===r&&q(t,r),"hover"===r&&q(t,r))},Z=[{value:"ease",label:(0,A.__)("Ease","blockify")},{value:"ease-in",label:(0,A.__)("Ease In","blockify")},{value:"ease-out",label:(0,A.__)("Ease Out","blockify"),isDefault:!0},{value:"ease-in-out",label:(0,A.__)("Ease In Out","blockify")},{value:"linear",label:(0,A.__)("Linear","blockify")}],X=[{value:"",label:""}];window?.blockify?.animations?.forEach((e=>{X.push({value:e,label:r(e?.replace(/-/g," "))})}));const Y=[{value:"enter",label:(0,A.__)("Enter","blockify"),isDefault:!0},{value:"exit",label:(0,A.__)("Exit","blockify")},{value:"infinite",label:(0,A.__)("Infinite","blockify")},{value:"scroll",label:(0,A.__)("Scroll","blockify")}],J=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyAnimation)&&void 0!==t&&t};(0,t.addFilter)("blocks.registerBlockType","blockify/add-animation-attributes",((e,t)=>(J(t)&&(e.attributes={...e.attributes,animation:{type:"object"}}),e)),0);const Q=e=>{const t={};var n,l,r,o,a,i,s;return e?.event&&(t["--animation-event"]=null!==(n=e.event)&&void 0!==n?n:"enter","infinite"===e.event&&(t.animationIterationCount="infinite")),e?.name&&(t.animationName=null!==(l=e.name)&&void 0!==l?l:""),e?.duration&&(t.animationDuration=(null!==(r=e.duration)&&void 0!==r?r:"1")+"s"),e?.delay&&(t.animationDelay=(null!==(o=e.delay)&&void 0!==o?o:"0")+"s"),e?.timingFunction&&(t.animationTimingFunction=null!==(a=e?.timingFunction)&&void 0!==a?a:"ease-in-out"),t?.animationIterationCount||(t.animationIterationCount=null!==(i=e?.iterationCount)&&void 0!==i?i:"1"),e?.playState&&(t.animationPlayState=null!==(s=e?.playState)&&void 0!==s?s:"running"),t};(0,t.addFilter)("editor.BlockListBlock","blockify/with-animation-props",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r}=n,o=null!==(l=r?.animation)&&void 0!==l?l:{};if(!o||!Object?.keys(o)?.length)return(0,e.createElement)(t,{...n});const a=Q(o),i=n?.className?.trim()+" has-animation";n={...n,className:i};const s={...n?.wrapperProps,className:i,style:{...n?.wrapperProps?.style,...a}};return(0,e.createElement)(t,{...n,wrapperProps:s})}),"withAnimation")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-animation-styles",((e,t,n)=>{var l;const r=null!==(l=n?.animation)&&void 0!==l?l:{};if(!r||!Object?.keys(r)?.length)return e;e.className=e?.className?.trim()+" has-animation";const o=Q(r);return{...e,style:{...e?.style,...o}}}));const ee=({attributes:t,setAttributes:n})=>{var l,r,o,a,i,s,c,u;const m=null!==(l=t?.animation)&&void 0!==l?l:{};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,(0,A.__)("Animation","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>n({animation:{}}),icon:z,iconSize:16,"aria-label":(0,A.__)("Clear Animation","blockify")}))),(0,e.createElement)(B.Flex,{justify:"flex-end"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.Button,{isSecondary:!0,isSmall:!0,icon:"running"===m?.playState?W:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",fill:"currentColor"},(0,e.createElement)("polygon",{points:"10,5 0,10 0,0"})),iconSize:10,onClick:()=>{n({animation:{...m,playState:"running"===m?.playState?"paused":"running"}})}},"running"===m?.playState?(0,A.__)("Pause","blockify"):(0,A.__)("Run","blockify"))))),(0,e.createElement)(B.PanelRow,{className:"blockify-animate-controls"},(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Effect","blockify"),value:null!==(r=m?.name)&&void 0!==r?r:"",options:X,onChange:e=>{var t;n({animation:{...m,name:e,duration:null!==(t=m?.duration)&&void 0!==t?t:1}})}}))),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Easing","blockify"),value:null!==(o=m?.timingFunction)&&void 0!==o?o:"",options:Z,onChange:e=>{n({animation:{...m,timingFunction:e}})}}))),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Event","blockify"),value:null!==(a=m?.event)&&void 0!==a?a:"enter",options:Y,onChange:e=>{n({animation:{...m,event:e,iterationCount:"-1"===("infinite"===e?"-1":m?.iterationCount)?"1":m?.iterationCount}})}})))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Duration","blockify"),value:null!==(i=m?.duration)&&void 0!==i?i:1,onChange:e=>{n({animation:{...m,duration:e}})},min:0,max:100,step:.1,shifStep:10,allowReset:!0})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Delay","blockify"),value:null!==(s=m?.delay)&&void 0!==s?s:0,onChange:e=>{n({animation:{...m,delay:e}})},min:0,max:100,step:.1,shifStep:10,allowReset:!0})),"infinite"!==m?.event&&(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Repeat","blockify"),value:"infinite"===m?.event?-1:null!==(c=m?.iterationCount)&&void 0!==c?c:1,onChange:e=>{n({animation:{...m,iterationCount:e}})},min:-1,max:100,step:1,allowReset:!0})),"scroll"===m?.event&&(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Offset","blockify"),value:parseInt(null!==(u=m?.offset)&&void 0!==u?u:"50"),onChange:e=>{n({animation:{...m,offset:e.toString()}})},min:-1,max:200,step:1,allowReset:!0})))))};(0,t.addFilter)("editor.BlockEdit","blockify/animation-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,isSelected:o,name:a}=n;return J(a)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),o&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=r?.animation)&&void 0!==l&&l,title:(0,A.__)("Animation","blockify")},(0,e.createElement)(ee,{...n})))):(0,e.createElement)(t,{...n})}),"withAnimation"));const te=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})),ne=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})),le={name:"group-grid",icon:(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})),title:(0,A.__)("Grid","blockify"),isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"design",scope:["inserter","transform","block"],description:(0,A.__)("Arrange blocks in a grid.","blockify"),attributes:{layout:{type:"flex",orientation:"grid"},style:{display:{all:"grid"},gridTemplateColumns:{all:"repeat(3,1fr)"},gridTemplateRows:{all:"repeat(3,1fr)"}}},isActive:e=>"grid"===e?.layout?.orientation};(0,h.registerBlockVariation)("core/group",le);const re=["grid","inline-grid"],oe=(t,n,l,r)=>{var o,a,i,s;const{attributes:c,setAttributes:u}=t,{style:m}=c,d=m?.gridTemplateColumns?.[n],p=m?.gridTemplateRows?.[n],f=d?d?.replace(/repeat\((\d+),1fr\)/,"$1"):"",y=p?p?.replace(/repeat\((\d+),1fr\)/,"$1"):"";return(0,e.createElement)(e.Fragment,null,l&&(0,e.createElement)(B.PanelRow,{className:"blockify-grid-controls"},(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Columns","blockify"),value:f,onChange:e=>{u({style:{...m,gridTemplateColumns:{...m?.gridTemplateColumns,[n]:e?"repeat("+e+",1fr)":""}}})},min:1,max:12,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Rows","blockify"),value:y,onChange:e=>{u({style:{...m,gridTemplateRows:{...m?.gridTemplateRows,[n]:e?"repeat("+e+",1fr)":""}}})},min:1,max:12,step:1})))),r&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,{className:"blockify-grid-controls"},(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Column Start","blockify"),value:null!==(o=m?.gridColumnStart?.[n])&&void 0!==o?o:"",onChange:e=>{u({style:{...m,gridColumnStart:{...m?.gridColumnStart,[n]:e}}})},min:1,max:12,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Column End","blockify"),value:null!==(a=m?.gridColumnEnd?.[n])&&void 0!==a?a:"",onChange:e=>{u({style:{...m,gridColumnEnd:{...m?.gridColumnEnd,[n]:e}}})},min:1,max:12,step:1})))),(0,e.createElement)(B.PanelRow,{className:"blockify-grid-controls"},(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Row Start","blockify"),value:null!==(i=m?.gridRowStart?.[n])&&void 0!==i?i:"",onChange:e=>{u({style:{...m,gridRowStart:{...m?.gridRowStart,[n]:e}}})},min:1,max:12,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Row End","blockify"),value:null!==(s=m?.gridRowEnd?.[n])&&void 0!==s?s:"",onChange:e=>{u({style:{...m,gridRowEnd:{...m?.gridRowEnd,[n]:e}}})},min:1,max:12,step:1}))))))},ae=t=>{var n,l;const{attributes:r,setAttributes:o,name:a,clientId:i}=t,[s,c]=(0,V.useState)("all"),{style:u}=r,m="core/group"===a&&(re.includes(u?.display?.all)||re.includes(u?.display?.mobile)||re.includes(u?.display?.desktop)),d=null!==(n=(0,S.select)("core/block-editor")?.getBlockParents(i))&&void 0!==n?n:[],p=d[d.length-1],f=null!==(l=(0,S.select)("core/block-editor")?.getBlockAttributes(p))&&void 0!==l?l:null,y=re.includes(f?.style?.display?.all)||re.includes(f?.style?.display?.mobile)||re.includes(f?.style?.display?.desktop);return m||y?(0,e.createElement)(B.PanelBody,{initialOpen:"grid"===r?.display?.all||"grid"===r?.display?.mobile||"grid"===r?.display?.desktop,title:(0,A.__)("Grid","blockify")},(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Grid","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{o({style:{...r?.style,gridTemplateColumns:"",gridTemplateRows:"",gridColumnStart:"",gridColumnEnd:"",gridRowStart:"",gridRowEnd:""}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Reset Grid","blockify")}))),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:"all"===s?"primary":"secondary",onClick:()=>c("all")},(0,A.__)("All","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"mobile"===s?"primary":"secondary",onClick:()=>c("mobile"),icon:te}),(0,e.createElement)(B.Button,{isSmall:!0,variant:"desktop"===s?"primary":"secondary",onClick:()=>c("desktop"),icon:ne}))),"all"===s&&oe(t,s,m,y),"mobile"===s&&oe(t,s,m,y),"desktop"===s&&oe(t,s,m,y)):(0,e.createElement)(e.Fragment,null)};var ie;(0,t.addFilter)("editor.BlockEdit","blockify/grid-controls",(0,l.createHigherOrderComponent)((t=>n=>{const{isSelected:l,attributes:r,name:o}=n;if(!ce(o))return(0,e.createElement)(t,{...n});const a="grid"===r?.layout?.orientation&&!r?.layout?.verticalAlignment;return(0,e.createElement)(e.Fragment,null,a&&(0,e.createElement)((()=>(0,e.createElement)("style",null,".has-display-grid{align-items:normal !important}")),null),(0,e.createElement)(t,{...n}),l&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(ae,{...n})))}),"withDisplay"));const se=null!==(ie=window?.blockify?.blockSupports)&&void 0!==ie?ie:{},ce=e=>{var t;return null!==(t=se?.[e]?.blockifyPosition)&&void 0!==t&&t},ue=t=>{var n,l,r;const{attributes:o,setAttributes:a,screen:i}=t,{style:s}=o;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,{className:"blockify-display-controls"},(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Display","blockify"),value:null!==(n=s?.display?.[i])&&void 0!==n?n:"",options:null!==(l=window?.blockify?.extensionOptions?.display?.options)&&void 0!==l?l:[],onChange:e=>{a({style:{...s,display:{...s?.display,[i]:e}}}),re.includes(e)?a({layout:{...o?.layout,type:"flex",flexWrap:"nowrap",orientation:"grid"}}):a({layout:{...o?.layout,orientation:"horizontal"}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Order","blockify"),value:null!==(r=s?.order?.[i])&&void 0!==r?r:"",onChange:e=>{a({style:{...s,order:{...s?.order,[i]:e}}})},min:-10,max:10,step:1,allowReset:!0}))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Width","blockify"),value:s?.width?.[i]?.includes("auto")?"":s?.width?.[i],units:E,onChange:e=>{a({style:{...s,width:{...s?.width,[i]:e?.includes("auto")?"auto":e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Min Width","blockify"),value:s?.minWidth?.[i],onChange:e=>{a({style:{...s,minWidth:{...s?.minWidth,[i]:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Max Width","blockify"),value:s?.maxWidth?.[i],onChange:e=>{a({style:{...s,maxWidth:{...s?.maxWidth,[i]:e}}})}})))))},me=t=>{const{attributes:n,setAttributes:l}=t,[r,o]=(0,V.useState)("all");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Display","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{l({style:{...n?.style,display:{},order:{},width:{},maxWidth:{}}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Reset Display","blockify")}))),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:"all"===r?"primary":"secondary",onClick:()=>o("all")},(0,A.__)("All","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"mobile"===r?"primary":"secondary",onClick:()=>o("mobile"),icon:te}),(0,e.createElement)(B.Button,{isSmall:!0,variant:"desktop"===r?"primary":"secondary",onClick:()=>o("desktop"),icon:ne}))),"all"===r&&(0,e.createElement)(ue,{...t,screen:r}),"mobile"===r&&(0,e.createElement)(ue,{...t,screen:r}),"desktop"===r&&(0,e.createElement)(ue,{...t,screen:r}))};var de;(0,t.addFilter)("editor.BlockEdit","blockify/display-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const{attributes:o,isSelected:a,name:i}=n;return ce(i)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),a&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=(null!==(r=o?.style?.display?.all?.length)&&void 0!==r?r:{})>0)&&void 0!==l&&l,title:(0,A.__)("Display","blockify")},(0,e.createElement)(me,{...n})))):(0,e.createElement)(t,{...n})}),"withDisplay")),(0,t.addFilter)("blocks.registerBlockType","blockify/content-limit-attributes",((e,t)=>("core/post-excerpt"===t&&(e={...e,attributes:{...e.attributes,defaultExcerpt:{type:"string"},hideReadMore:{type:"boolean"}}}),"core/post-content"===t&&(e={...e,attributes:{...e.attributes,contentLimit:{type:"number"}}}),e))),(0,t.addFilter)("editor.BlockEdit","blockify/with-content-limit-controls",(0,l.createHigherOrderComponent)((t=>n=>{const{attributes:l,setAttributes:r,name:o}=n;return"core/post-excerpt"!==o&&"core/post-content"!==o?(0,e.createElement)(t,{...n}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{title:(0,A.__)("Content","blockify")},"core/post-excerpt"===o&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.TextareaControl,{label:(0,A.__)("Default Content","blockify"),value:l.defaultExcerpt,onChange:e=>{r({defaultExcerpt:e})}})),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Hide Read More Link","blockify"),checked:l.hideReadMore,onChange:e=>{r({hideReadMore:e})}}))),"core/post-content"===o&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Content Limit","blockify"),help:(0,A.__)("Limit content to specific number of words.","blockify"),value:l?.contentLimit,onChange:e=>{r({contentLimit:e})}}))))),(0,e.createElement)(t,{...n}))}),"withContentLimitControls")),(0,t.addFilter)("editor.BlockListBlock","blockify/with-content-limit",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const{name:o,attributes:a}=n;if("core/post-excerpt"!==o)return(0,e.createElement)(t,{...n});if(!a?.hideReadMore)return(0,e.createElement)(t,{...n});const i=null!==(l=n.wrapperProps)&&void 0!==l?l:{},s="hide-read-more";return i.className=k(i?.className,s),(0,e.createElement)(t,{...n,className:(null!==(r=n?.className)&&void 0!==r?r:"")+" "+s,wrapperProps:i})}),"withContentLimit")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/content-limit-save",(e=>{const{name:t,attributes:n}=e;if("core/post-excerpt"===t&&n?.hideReadMore){const t="hide-read-more";e.className=a(e?.className,t,"")+" "+t}return e}));const pe=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyFilter)&&void 0!==t&&t},fe=null!==(de=window?.blockify?.filterOptions)&&void 0!==de?de:{};(0,t.addFilter)("blocks.registerBlockType","blockify/add-css-transform-attributes",((e,t)=>{var n;return pe(t)?(e.attributes={...e.attributes,style:{...null!==(n=e?.attributes?.style)&&void 0!==n?n:{},filter:{type:"string"}}},e):e}));const ye=e=>{let t="";return fe?.blur?(Object.keys(fe).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(t+=" "+o(n)+"("+e[n]+fe?.[n]?.unit+")")})),t?{[e?.backdrop?"backdropFilter":"filter"]:t.trim()}:{}):{}};(0,t.addFilter)("editor.BlockListBlock","blockify/with-css-filter",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const o=null!==(l=n?.attributes?.style?.filter)&&void 0!==l?l:{},a=(0,e.createElement)(t,{...n});if(0===Object.getOwnPropertyNames(o).length)return a;const i=ye(o);if(!Object.keys(i).length)return a;const s={...(n={...n,style:{...null!==(r=n?.style)&&void 0!==r?r:{},...i}}).wrapperProps,style:{...n.wrapperProps?.style,...i}};return(0,e.createElement)(t,{...n,wrapperProps:s})}),"withCssFilter")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-filter-styles",((e,t,n)=>{var l;const r=null!==(l=n?.style?.filter)&&void 0!==l?l:{};if(0===Object.getOwnPropertyNames(r).length)return e;const o=ye(r);return Object.keys(o).length?{...e,style:{...e?.style,...o}}:e}));const he=t=>{const{attributes:n,setAttributes:l}=t,{style:o}=n;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Filter","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{l({style:{...n?.style,filter:{}}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Clear Filters","blockify")}))),(0,e.createElement)(B.PanelRow,{className:"blockify-filter-settings"},Object.keys(fe).map((t=>{var n,a;return(0,e.createElement)(B.__experimentalNumberControl,{key:t,label:"hueRotate"===t?(0,A.__)("Hue Rotate","blockify"):r(t),value:o?.filter?.[t],onChange:e=>{var n;l({style:{...o,filter:{...null!==(n=o?.filter)&&void 0!==n?n:{},[t]:e}}})},min:null!==(n=fe?.[t]?.min)&&void 0!==n?n:0,max:fe?.[t]?.max,step:null!==(a=fe?.[t]?.step)&&void 0!==a?a:1,allowReset:!0})}))),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Use as backdrop filter","blockify"),checked:o?.filter?.backdrop,onChange:e=>{l({style:{...o,filter:{...o?.filter,backdrop:e}}})}})))};(0,t.addFilter)("editor.BlockEdit","blockify/filter-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,isSelected:o,name:a}=n;return pe(a)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),o&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=r?.filter)&&void 0!==l&&l,title:(0,A.__)("Filter","blockify")},(0,e.createElement)(he,{...n})))):(0,e.createElement)(t,{...n})}),"withFilter"));const ge=e=>["core/image","core/post-featured-image",["blockify/image-compare"]].includes(e);(0,t.addFilter)("blocks.registerBlockType","blockify/image-attributes",((e,t)=>ge(t)?(e.attributes={...e.attributes,usePlaceholder:{type:"string"}},e?.attributes?.style||(e.attributes.style={type:"object"}),e):e));const be=(t,n)=>{var l;const{attributes:r,setAttributes:o}=t,{style:a}=r,[i,s]=(0,V.useState)(null!==(l=a?.height?.[n])&&void 0!==l?l:"");return(0,e.createElement)(B.PanelRow,{className:"blockify-image-controls blockify-display-controls"},(c=t?.name,["core/image","blockify/image-compare"].includes(c)&&(0,e.createElement)((()=>{var t,l,r,c,u,m;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Aspect Ratio","blockify"),value:null!==(t=a?.aspectRatio?.[n])&&void 0!==t?t:"",options:null!==(l=window?.blockify?.imageOptions?.aspectRatio?.options)&&void 0!==l?l:[],onChange:e=>{o({style:{...a,aspectRatio:{...a?.aspectRatio,[n]:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Height","blockify"),value:i?.[n]?.includes("auto")?"":i[n],onChange:e=>{s({...i,[n]:e?.includes("auto")?"":e}),o({style:{...a,height:{...a?.height,[n]:e?.includes("auto")?"auto":e}}})},min:0,step:1,units:E,allowReset:!0}))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Object Fit","blockify"),value:null!==(r=a?.objectFit?.[n])&&void 0!==r?r:"",placeholder:(0,A.__)("","blockify"),options:null!==(c=window?.blockify?.imageOptions?.objectFit?.options)&&void 0!==c?c:[],onChange:e=>{o({style:{...a,objectFit:{...a?.objectFit,[n]:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Object Position","blockify"),value:null!==(u=a?.objectPosition?.[n])&&void 0!==u?u:"",placeholder:(0,A.__)("","blockify"),options:null!==(m=window?.blockify?.imageOptions?.objectPosition?.options)&&void 0!==m?m:[],onChange:e=>{o({style:{...a,objectPosition:{...a?.objectPosition,[n]:e}}})}}))))}),null)),(0,e.createElement)(R,{style:{marginTop:"0"}},(0,A.__)("Placeholder Image","blockify")),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:r?.usePlaceholder&&"default"!==r?.usePlaceholder?"secondary":"primary",onClick:()=>{o({usePlaceholder:"default"})}},(0,A.__)("Default","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"none"===r?.usePlaceholder?"primary":"secondary",onClick:()=>{o({usePlaceholder:"none"})}},(0,A.__)("None","blockify")))));var c},ve=t=>{const{attributes:n,setAttributes:l,name:r}=t;if(!ge(r))return(0,e.createElement)(e.Fragment,null);const[o,a]=(0,V.useState)("all");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Image","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{l({style:{...n?.style,objectFit:null,objectPosition:null,aspectRatio:null,height:null}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Reset Image","blockify")}))),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:"all"===o?"primary":"secondary",onClick:()=>a("all")},(0,A.__)("All","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"mobile"===o?"primary":"secondary",onClick:()=>a("mobile"),icon:te}),(0,e.createElement)(B.Button,{isSmall:!0,variant:"desktop"===o?"primary":"secondary",onClick:()=>a("desktop"),icon:ne}))),"all"===o&&be(t,o),"mobile"===o&&be(t,o),"desktop"===o&&be(t,o))};(0,t.addFilter)("editor.BlockEdit","blockify/image-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,isSelected:o,name:a}=n;return ge(a)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),o&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=r?.image)&&void 0!==l&&l,title:(0,A.__)("Image","blockify")},(0,e.createElement)(ve,{...n})))):(0,e.createElement)(t,{...n})}),"withImage")),(0,t.addFilter)("editor.BlockListBlock","blockify/image-attribute",(0,l.createHigherOrderComponent)((t=>n=>{var l,r,o,a,i,s,c,u,m,d,p,f,y,h,g,b,v;const{attributes:k,name:E}=n;if(!ge(E))return(0,e.createElement)(t,{...n});const w=null!==(l=n?.className?.split(" "))&&void 0!==l?l:[];w.push("is-placeholder"),w.push("has-placeholder-icon");const x=null!==(r=k?.style?.aspectRatio)&&void 0!==r?r:{},_=null!==(o=null!==(a=null!==(i=x?.all)&&void 0!==i?i:x?.desktop)&&void 0!==a?a:x?.mobile)&&void 0!==o?o:"";var C;_&&(w.forEach((e=>{e.includes("has-aspect-ratio-")&&w.splice(w.indexOf(e),1)})),w.push(`has-aspect-ratio-${_}`),n={...n,className:null!==(C=w?.join(" "))&&void 0!==C?C:""});const S=null!==(s=k?.style?.objectFit)&&void 0!==s?s:{},F=null!==(c=null!==(u=null!==(m=S?.all)&&void 0!==m?m:S?.desktop)&&void 0!==u?u:S?.mobile)&&void 0!==c?c:"";var P;F&&(w.forEach((e=>{e.includes("has-object-fit-")&&w.splice(w.indexOf(e),1)})),w.push(`has-object-fit-${F}`),n={...n,className:null!==(P=w?.join(" "))&&void 0!==P?P:""});const N=null!==(d=k?.style?.objectPosition)&&void 0!==d?d:{},O=null!==(p=null!==(f=null!==(y=N?.all)&&void 0!==y?y:N?.desktop)&&void 0!==f?f:N?.mobile)&&void 0!==p?p:"";var T;O&&(w.forEach((e=>{e.includes("has-object-position-")&&w.splice(w.indexOf(e),1)})),w.push(`has-object-position-${O}`),n={...n,className:null!==(T=w?.join(" "))&&void 0!==T?T:""});const I=null!==(h=k?.style?.height)&&void 0!==h?h:{},B=null!==(g=null!==(b=null!==(v=I?.all)&&void 0!==v?v:I?.desktop)&&void 0!==b?b:I?.mobile)&&void 0!==g?g:"";if(B){var A;const e=null!==(A=n?.style)&&void 0!==A?A:{};e.height=B,n={...n,style:e}}return(0,e.createElement)(t,{...n})}),"withImageAttribute"));const ke=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyInlineCss)&&void 0!==t&&t};var Ee;(0,t.addFilter)("blocks.registerBlockType","blockify/add-inline-css-attribute",((e,t)=>ke(t)?(e.attributes={...e.attributes,inlineCss:{type:"string"}},e):e),0),(0,t.addFilter)("editor.BlockEdit","blockify/with-inline-css-attribute",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,setAttributes:o,name:a}=n;if(!ke(a))return(0,e.createElement)(t,{...n});const i=(0,S.useSelect)((e=>{const t=e("core")?.getCurrentUser(),n=e("core")?.getUser(t?.id);return n?.roles}),[]);return i?.includes("administrator")?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorAdvancedControls,null,(0,e.createElement)(G,{code:null!==(l=r?.inlineCss)&&void 0!==l?l:"",language:"css",onChange:e=>{o({inlineCss:e})},title:(0,A.__)("Edit Inline CSS","blockify"),description:(0,A.__)("Add custom CSS to this block.","blockify")}))):(0,e.createElement)(t,{...n})}),"inlineCssAttribute"),99);const we=null!==(Ee=window?.blockify?.blockSupports)&&void 0!==Ee?Ee:{};(0,t.addFilter)("editor.BlockEdit","blockify/with-negative-margin",(0,l.createHigherOrderComponent)((t=>n=>{if(l=n?.name,null!==(r=we?.[l]?.blockifyNegativeMargin)&&void 0!==r&&r){const e=document.querySelector('.components-input-control__input[min="0"]');e&&e.setAttribute("min","-999")}var l,r;return(0,e.createElement)(t,{...n})}),"withMinHeightSettings"));const xe=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyOnclick)&&void 0!==t&&t};var _e;(0,t.addFilter)("blocks.registerBlockType","blockify/add-onclick-attribute",((e,t)=>xe(t)?(e.attributes={...e.attributes,onclick:{type:"string"}},e):e),0),(0,t.addFilter)("editor.BlockEdit","blockify/with-onclick-attribute",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,setAttributes:o,name:a}=n;if(!xe(a))return(0,e.createElement)(t,{...n});const i=(0,S.useSelect)((e=>{const t=e("core")?.getCurrentUser(),n=e("core")?.getUser(t?.id);return n?.roles}),[]);return i?.includes("administrator")?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorAdvancedControls,null,(0,e.createElement)(G,{code:null!==(l=r?.onclick)&&void 0!==l?l:"",language:"js",onChange:e=>{o({onclick:e})},title:(0,A.__)("Edit On-Click Event","blockify"),description:(0,A.__)("Add custom JavaScript to the onclick event for this block.","blockify")}))):(0,e.createElement)(t,{...n})}),"onclickAttribute"),99);const Ce=null!==(_e=window?.blockify?.blockSupports)&&void 0!==_e?_e:{},Se=(t,n)=>{var l,r,o,a,i,s,c,u;const{attributes:m,setAttributes:d}=t,p=null!==(l=m?.style)&&void 0!==l?l:{},f=e=>{const t={};Object.keys(e).forEach((l=>{t[l]={...p?.[l],[n]:e[l]}})),d({style:{...p,...t}})};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Position","blockify"),value:null!==(r=p?.position?.[n])&&void 0!==r?r:"",options:window?.blockify?.extensionOptions?.position?.options,onChange:e=>{f({position:e})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:window?.blockify?.extensionOptions?.zIndex?.label,value:p?.zIndex?.[n],onChange:e=>{f({zIndex:e})},min:-100,max:100,step:1,allowReset:!0})))),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Overflow","blockify"),value:null!==(o=p?.overflow?.[n])&&void 0!==o?o:"",options:window?.blockify?.extensionOptions?.overflow?.options,onChange:e=>{f({overflow:e})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Pointer Events","blockify"),value:null!==(a=p?.pointerEvents?.[n])&&void 0!==a?a:"",options:window?.blockify?.extensionOptions?.pointerEvents?.options,onChange:e=>{f({pointerEvents:e})}})))),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.__experimentalBoxControl,{className:"blockify-box-control",label:(0,A.__)("Inset","blockify"),values:{top:null!==(i=p?.top?.[n])&&void 0!==i?i:"",right:null!==(s=p?.right?.[n])&&void 0!==s?s:"",bottom:null!==(c=p?.bottom?.[n])&&void 0!==c?c:"",left:null!==(u=p?.left?.[n])&&void 0!==u?u:""},onChange:e=>{var t,n,l,r;f({top:null!==(t=e?.top)&&void 0!==t?t:"",right:null!==(n=e?.right)&&void 0!==n?n:"",bottom:null!==(l=e?.bottom)&&void 0!==l?l:"",left:null!==(r=e?.left)&&void 0!==r?r:""})},inputProps:{min:-999}})))},Fe=t=>{const{attributes:n,setAttributes:l}=t,[r,o]=(0,V.useState)("all");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,(0,A.__)("Position","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{l({style:{...n?.style,position:"",zIndex:"",top:"",right:"",bottom:"",left:""}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Reset Position","blockify")}))),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:"all"===r?"primary":"tertiary",onClick:()=>o("all")},(0,A.__)("All","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"mobile"===r?"primary":"tertiary",onClick:()=>o("mobile"),icon:te}),(0,e.createElement)(B.Button,{isSmall:!0,variant:"desktop"===r?"primary":"tertiary",onClick:()=>o("desktop"),icon:ne}))),"all"===r&&Se(t,r),"mobile"===r&&Se(t,r),"desktop"===r&&Se(t,r))};(0,t.addFilter)("editor.BlockEdit","blockify/position-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,isSelected:o,name:a}=n;return(e=>{var t;return null!==(t=Ce?.[e]?.blockifyPosition)&&void 0!==t&&t})(a)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),o&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=r?.position)&&void 0!==l&&l,title:(0,A.__)("Position","blockify")},(0,e.createElement)(Fe,{...n})))):(0,e.createElement)(t,{...n})}),"withPosition")),(0,t.addFilter)("editor.BlockListBlock","blockify/with-block-gap",(0,l.createHigherOrderComponent)((t=>n=>{var l;if("core/post-template"!==n?.name)return(0,e.createElement)(t,{...n});if(!n?.attributes?.style?.spacing?.blockGap)return(0,e.createElement)(t,{...n});const r=null!==(l=n.wrapperProps)&&void 0!==l?l:{};return r.style={...r.style,"--wp--style--block-gap":v(n.attributes.style.spacing.blockGap)},(0,e.createElement)(t,{...n,wrapperProps:r})}),"withBlockGap")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-block-gap",((e,t,n)=>("core/post-template"===t&&n?.style?.spacing?.blockGap&&(e={...e,style:{...e.style,"--wp--style--block-gap":v(n.style.spacing.blockGap)}}),e)));const Pe=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyBoxShadow)&&void 0!==t&&t};(0,t.addFilter)("blocks.registerBlockType","blockify/add-box-shadow-attributes",((e,t)=>{var n;return Pe(t)&&(e.attributes={...e.attributes,shadowPreset:{type:"string"},shadowPresetHover:{type:"string"},useCustomBoxShadow:{type:"boolean"},style:{...null!==(n=e?.attributes?.style)&&void 0!==n?n:{},boxShadow:{type:"object"}}}),e}),0);const Ne=e=>{var t;const n=null!==(t=e?.style?.boxShadow)&&void 0!==t?t:{},l={},r=((0,S.select)("core/block-editor").getSettings().colors,{inset:"",x:"px",y:"px",blur:"px",spread:"px",color:""});return Object.keys(r).map((e=>((n?.[e]||"0"===n?.[e]?.toString())&&(l["--wp--custom--box-shadow--"+e]=n?.[e]+r?.[e]),(n?.hover?.[e]||"0"===n?.hover?.[e]?.toString())&&(l["--wp--custom--box-shadow--hover--"+e]=n?.hover?.[e]+r?.[e]),!0))),l};(0,t.addFilter)("editor.BlockListBlock","blockify/edit-box-shadow-styles",(0,l.createHigherOrderComponent)((t=>n=>{const{attributes:l,name:r}=n;if(!Pe(r))return(0,e.createElement)(t,{...n});const o=Ne(l),a=l?.shadowPreset||l?.shadowPresetHover;if(!a&&!Object.keys(o).length)return(0,e.createElement)(t,{...n});const i={...n.wrapperProps};let s=n.className;return s=k(s,i.className),s=k(s,"has-box-shadow"),a&&(s=k(s,"has-shadow").replace("has-box-shadow","")),l?.shadowPreset&&(s=k(s,`has-${l.shadowPreset}-shadow`)),l?.shadowPresetHover&&(s=k(s,`has-${l.shadowPresetHover}-shadow-hover`)),n={...n,className:k(n?.className,s),style:{...n.style,...o}},i.className=s,i.style={...i.style,...o},(0,e.createElement)(t,{...n,wrapperProps:i})}),"withBoxShadow")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/save-box-shadow-styles",((e,t,n)=>{const{name:l}=t;if(!Pe(l))return e;const r=Ne(n),o=n?.shadowPreset||n?.shadowPresetHover;if(!o&&!Object.keys(r).length)return e;let a=k(e?.className,"has-box-shadow");return o&&(a=k(a,"has-shadow").replace("has-box-shadow","")),n?.shadowPreset&&(a=k(a,`has-${n.shadowPreset}-shadow`)),n?.shadowPresetHover&&(a=k(a,`has-${n.shadowPresetHover}-shadow-hover`)),{...e,style:{...e.style,...r},className:a}}));const Oe=t=>{var n;return(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(n=t?.attributes?.shadow)&&void 0!==n&&n,title:(0,A.__)("Shadow","blockify")},(0,e.createElement)(K,{...t})))};var Te;(0,t.addFilter)("editor.BlockEdit","blockify/shadow-controls",(0,l.createHigherOrderComponent)((t=>n=>{const{isSelected:l,name:r}=n;return Pe(r)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),l&&(0,e.createElement)(Oe,{...n})):(0,e.createElement)(t,{...n})}),"withShadow"));const Ie=null!==(Te=window?.blockify?.blockSupports)&&void 0!==Te?Te:{},Be=e=>{var t;return null!==(t=Ie?.[e]?.blockifySize)&&void 0!==t&&t},Ae=t=>{const{attributes:n,setAttributes:l}=t,{size:r}=n,o=[{key:"large",label:(0,A.__)("Large","blockify")},{key:"medium",label:(0,A.__)("Medium","blockify")},{key:"small",label:(0,A.__)("Small","blockify")}];return(0,e.createElement)(U.BlockControls,null,(0,e.createElement)(B.ToolbarGroup,null,(0,e.createElement)(B.DropdownMenu,{icon:(0,e.createElement)("span",null,(0,A.__)("Size","blockify")),label:(0,A.__)("Switch Size","blockify")},(({onClose:t})=>(0,e.createElement)(B.MenuGroup,null,o.map((n=>(0,e.createElement)(B.MenuItem,{key:n.key,icon:r===n.key?"yes":"",onClick:()=>{if(r===n.key)return l({size:""}),void t();l({size:n.key}),t()}},n.label))))))))};(0,t.addFilter)("blocks.registerBlockType","blockify/add-size-attribute",(e=>(e?.attributes&&Be(e?.name)&&(e.attributes={...e.attributes,size:{type:"string",default:"20px"}}),e))),(0,t.addFilter)("editor.BlockEdit","blockify/add-size-block-controls",(0,l.createHigherOrderComponent)((t=>n=>{const{name:l,isSelected:r}=n;return Be(l)?(0,e.createElement)(V.Fragment,null,r&&(0,e.createElement)(Ae,{...n}),(0,e.createElement)(t,{...n})):(0,e.createElement)(t,{...n})}),"addSizeBlockControls")),(0,t.addFilter)("editor.BlockListBlock","blockify/with-size",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const{name:o,attributes:a}=n;if(!Be(o))return(0,e.createElement)(t,{...n});if(!a?.size)return(0,e.createElement)(t,{...n});const i=null!==(l=n.wrapperProps)&&void 0!==l?l:{},s="is-style-"+a.size;return i.className=k(i?.className,s),(0,e.createElement)(t,{...n,className:(null!==(r=n?.className)&&void 0!==r?r:"")+" "+s,wrapperProps:i})}),"withSizeClass")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/size-save",(e=>{const{name:t,attributes:n}=e;if(Be(t)&&n?.size){const t="is-style-"+n.size;e.className=a(e?.className,t,"")+" "+t}return e}));const je=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyTransform)&&void 0!==t&&t},ze={rotate:"deg",rotateX:"deg",rotateY:"deg",scale:"",scaleX:"",scaleY:"",skew:"deg",skewX:"deg",skewY:"deg",translateX:"",translateY:"",translateZ:""};(0,t.addFilter)("blocks.registerBlockType","blockify/add-css-transform-attributes",((e,t)=>{var n;return je(t)?(e.attributes={...e.attributes,style:{...null!==(n=e?.attributes?.style)&&void 0!==n?n:{},transform:{type:"string"}}},e):e}));const Re=e=>{let t="";return Object.keys(ze).forEach((n=>{if(e?.[n]){const l=e[n];t+=` ${n}(${l}${ze[n]})`}})),t?{transform:t.trim()}:{}};(0,t.addFilter)("editor.BlockListBlock","blockify/with-css-transform",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,name:o}=n,a=(0,e.createElement)(t,{...n});if(!je(o))return a;const{style:i}=r,s=null!==(l=i?.transform)&&void 0!==l?l:{};if(!s)return a;const c=Re(s);if(!Object.keys(c).length)return a;const u={...(n={...n,style:{...n?.style,...c}}).wrapperProps,style:{...n.wrapperProps?.style,...c}};return(0,e.createElement)(t,{...n,wrapperProps:u})}),"withCssTransform")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-css-transform-styles",((e,t,n)=>{var l;const{name:r}=t;if(!je(r))return e;const{style:o}=n,a=null!==(l=o?.transform)&&void 0!==l?l:{};if(!a)return e;const i=Re(a);return Object.keys(i).length?{...e,style:{...e?.style,...i}}:e}));const Me=t=>{var n;const{attributes:l,setAttributes:r}=t,{style:o}=l,a=null!==(n=o?.transform)&&void 0!==n?n:{};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Transform","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{r({style:{...l?.style,transform:""}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Clear Transforms","blockify")})))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Rotate","blockify"),value:a?.rotate,onChange:e=>{r({style:{...o,transform:{...a,rotate:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Rotate X","blockify"),value:a?.rotateX,onChange:e=>{r({style:{...o,transform:{...a,rotateX:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Rotate Y","blockify"),value:a?.rotateY,onChange:e=>{r({style:{...o,transform:{...a,rotateY:e}}})},min:-360,max:360,step:1}))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Scale","blockify"),value:a?.scale,onChange:e=>{r({style:{...o,transform:{...a,scale:e}}})},min:0,max:10,step:.1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Scale X","blockify"),value:a?.scaleX,onChange:e=>{r({style:{...o,transform:{...a,scaleX:e}}})},min:0,max:10,step:.1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Scale Y","blockify"),value:a?.scaleY,onChange:e=>{r({style:{...o,transform:{...a,scaleY:e}}})},min:0,max:10,step:.1}))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Skew","blockify"),value:a?.skew,onChange:e=>{r({style:{...o,transform:{...a,skew:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Skew X","blockify"),value:a?.skewX,onChange:e=>{r({style:{...o,transform:{...a,skewX:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Skew Y","blockify"),value:a?.skewY,onChange:e=>{r({style:{...o,transform:{...a,skewY:e}}})},min:-360,max:360,step:1}))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Translate X","blockify"),value:a?.translateX,onChange:e=>{r({style:{...o,transform:{...a,translateX:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Translate Y","blockify"),value:a?.translateY,onChange:e=>{r({style:{...o,transform:{...a,translateY:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Translate Z","blockify"),value:a?.translateZ,onChange:e=>{r({style:{...o,transform:{...a,translateZ:e}}})}}))),(0,e.createElement)("br",null))};(0,t.addFilter)("editor.BlockEdit","blockify/transform-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,isSelected:o,name:a}=n;return je(a)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),o&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=r?.transform)&&void 0!==l&&l,title:(0,A.__)("Transform","blockify")},(0,e.createElement)(Me,{...n})))):(0,e.createElement)(t,{...n})}),"withTransform"));const De=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));(0,h.registerBlockVariation)("core/list",{name:"accordion",title:(0,A.__)("Accordion","blockify"),description:(0,A.__)("Add a collapsible accordion list.","blockify"),category:window?.blockify?.isPlugin?"blockify":"text",scope:[],icon:De,attributes:{className:"is-style-accordion"},isDefault:!1,isActive:(e,t)=>e&&e?.className?.includes(t.className)});const Le=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})),He={content:(0,A.__)("Curved text. Curved text. Curved text.","blockify"),containerSize:"160",pathSize:"120"},Ve={name:"curved-text",title:(0,A.__)("Curved Text","blockify"),icon:Le,isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"text",scope:["inserter","transform","block"],description:(0,A.__)("Insert curved text around circular SVG path.","blockify"),attributes:{className:"is-style-curved-text"},isActive:e=>e?.className?.includes("is-style-curved-text")};y()((()=>{(0,h.registerBlockVariation)("core/paragraph",Ve)})),(0,t.addFilter)("blocks.registerBlockType","blockify/curved-text-attributes",((e,t)=>("core/paragraph"===t&&(e={...e,attributes:{...e?.attributes,curvedText:{type:"object"}}}),e)));const $e=(t={})=>{var n,l,r;const{curvedText:o=He}=t,a=null!==(n=o?.content)&&void 0!==n?n:He.content,i=null!==(l=o?.containerSize)&&void 0!==l?l:He.containerSize,s=null!==(r=o?.pathSize)&&void 0!==r?r:He.pathSize,c=parseInt(i)/2,u=parseInt(s)/2,m={viewBox:`0 0 ${i} ${i}`,xmlns:"http://www.w3.org/2000/svg",enableBackground:`new 0 0 ${i} ${i}`,xmlSpace:"preserve",width:i,height:i,contentEditable:!1,x:0,y:0},d=Date.now()+Math.random(),p={id:"circle-"+d,d:`M ${c}, ${c} m -${u}, 0 a ${u},${u} 0 0,1 ${s},0 a ${u},${u} 0 0,1 -${s},0`,fill:"transparent"};return(0,e.createElement)("svg",{...m},(0,e.createElement)("path",{...p}," "),(0,e.createElement)("text",{fill:"currentColor"},(0,e.createElement)("textPath",{xlinkHref:"#circle-"+d},a)))};(0,t.addFilter)("editor.BlockEdit","blockify/with-curved-text-css",(0,l.createHigherOrderComponent)((t=>n=>{var l,r,o;const{attributes:a,setAttributes:i}=n;if(!(e=>!(!e?.className||"string"!=typeof e?.className)&&e?.className?.includes("is-style-curved-text"))(a))return(0,e.createElement)(t,{...n});const s=document.getElementsByClassName("edit-site-visual-editor__editor-canvas")?.item(0),c=document.getElementsByName("editor-canvas")?.item(0);let u;if(u=s?s.contentDocument:c?c.contentDocument:document,!u)return(0,e.createElement)(t,{...n});const m=u?.getElementById("block-"+n?.clientId);m&&(m.innerHTML=(0,V.renderToString)($e({...a,clientId:n.clientId})));const{curvedText:d=He}=a,p=t=>{var l;const r={...t,svgString:(0,V.renderToString)((0,e.createElement)($e,{...a,...t,clientId:null!==(l=n.clientId)&&void 0!==l?l:"1"}))};i({curvedText:{...d,...r}})};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{className:"blockify-controls",title:(0,A.__)("Curved Text","blockify")},(0,e.createElement)(B.TextareaControl,{label:(0,A.__)("Content","blockify"),value:null!==(l=d?.content)&&void 0!==l?l:He.content,onChange:e=>{p({content:e})}}),(0,e.createElement)("p",null,(0,A.__)("Size","blockify")),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)("br",null),(0,e.createElement)(B.Flex,null,(0,e.createElement)(B.FlexItem,{style:{width:"50%"}},(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Container","blockify"),value:null!==(r=d?.containerSize)&&void 0!==r?r:He.containerSize,onChange:e=>{p({containerSize:e})}})),(0,e.createElement)(B.FlexBlock,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Path","blockify"),value:null!==(o=d?.pathSize)&&void 0!==o?o:He.pathSize,onChange:e=>{p({pathSize:e})}})))))))}),"withCurvedTextSettings"),1);const Ge=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})),We={start:"0",end:"100",duration:"2",delay:"0",prefix:"",suffix:""},Ue={name:"counter",title:(0,A.__)("Counter","blockify"),keywords:["counter","number","count","stats"],icon:Ge,isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"text",scope:["inserter"],description:(0,A.__)("Insert counter animation.","blockify"),attributes:{className:"is-style-counter"},isActive:e=>e&&e?.className?.includes("is-style-counter")};y()((()=>{(0,h.registerBlockVariation)("core/paragraph",Ue)})),(0,t.addFilter)("editor.BlockEdit","blockify/with-counter-controls",(0,l.createHigherOrderComponent)((t=>n=>{const{attributes:l,setAttributes:r}=n,o=(0,e.createElement)(t,{...n});if(!l?.className?.includes("is-style-counter"))return o;const{style:a}=l;let i=We;return a?.counter?i=a.counter:r({style:{...a,counter:We}}),(0,V.useEffect)((()=>{if(!i?.prefix&&!i?.end&&!i?.suffix)return;let e=i?.end;"string"==typeof i?.prefix&&(e=i?.prefix+e),"string"==typeof i?.suffix&&(e+=i?.suffix),r({content:e})}),[i?.prefix,i?.end,i?.suffix,r]),(0,e.createElement)(e.Fragment,null,o,(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{title:(0,A.__)("Counter Settings","blockify"),initialOpen:!0,className:"blockify-counter-settings"},(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Start","blockify"),value:i?.start,onChange:e=>{r({style:{...a,counter:{...i,start:e}}})},step:1,shiftStep:10,isDragEnabled:!0,isShiftStepEnabled:!0})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("End","blockify"),value:i?.end,onChange:e=>{r({style:{...a,counter:{...i,end:e}}})},step:1,shiftStep:10,isDragEnabled:!0,isShiftStepEnabled:!0})))),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Duration (seconds)","blockify"),value:i?.duration,onChange:e=>{r({style:{...a,counter:{...i,duration:e}}})},step:.1,shiftStep:1,isDragEnabled:!0,isShiftStepEnabled:!0})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Delay (seconds)","blockify"),value:i?.delay,onChange:e=>{r({style:{...a,counter:{...i,delay:e}}})},step:.1,shiftStep:1,isDragEnabled:!0,isShiftStepEnabled:!0})))),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.TextControl,{label:(0,A.__)("Prefix","blockify"),value:i?.prefix,onChange:e=>{r({style:{...a,counter:{...i,prefix:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.TextControl,{label:(0,A.__)("Suffix","blockify"),value:i?.suffix,onChange:e=>{r({style:{...a,counter:{...i,suffix:e}}})}})))))))}),"withCounterControls"),9);const qe=(0,e.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(j.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),Ke={name:"image",title:(0,A.__)("Image","blockify"),icon:qe,isDefault:!0,category:"media",scope:["inserter","transform","block"],description:(0,A.__)("Insert an image to make a visual statement.","blockify"),attributes:{className:""},isActive:e=>!e?.className||!e?.className?.includes("is-style-icon")&&!e?.className?.includes("is-style-svg")};(0,h.registerBlockVariation)("core/image",Ke);const Ze=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})),Xe=e=>{var t,n,l;const r={};let o="";const a=e?.className?.includes("is-style-icon");if(!(e?.iconSet&&e?.iconName||a))return r;e?.style?.color?.background&&(o=e.style.color.background),e?.backgroundColor&&(o="var(--wp--preset--color--"+e.backgroundColor+", currentColor)"),"start"===e?.iconPosition&&(r["--wp--custom--icon--order"]="-1");let i="";e?.style?.color?.gradient&&(i=e?.style?.color?.gradient),e?.gradient&&(i="var(--wp--preset--gradient--"+e.gradient+",currentColor)");let s="";if(e?.style?.color?.text&&(s=e?.style?.color?.text),e?.textColor&&(s="var(--wp--preset--color--"+e.textColor+",currentColor)"),""!==o&&(r["--wp--custom--icon--background"]=o),s?(r["--wp--custom--icon--color"]=s,i&&(r["--wp--custom--icon--background"]=i)):i&&(r["--wp--custom--icon--color"]=i),e?.style?.spacing?.padding){var c,u,m,d;const t=e.style.spacing.padding,n={top:null!==(c=t?.top)&&void 0!==c?c:"0",right:null!==(u=t?.right)&&void 0!==u?u:"0",bottom:null!==(m=t?.bottom)&&void 0!==m?m:"0",left:null!==(d=t?.left)&&void 0!==d?d:"0"};Object.keys(n).forEach((e=>{var t;const l=null!==(t=n?.[e])&&void 0!==t?t:"";l&&l?.includes("var:preset")&&(n[e]="var(--wp--preset--spacing--"+l.replace("var:preset|spacing|","")+")")})),r["--wp--custom--icon--padding"]=Object.values(n).join(" ")}if(e?.style?.spacing?.margin){var p,f,y,h;const t=e.style.spacing.margin,n={top:null!==(p=t?.top)&&void 0!==p?p:"",right:null!==(f=t?.right)&&void 0!==f?f:"",bottom:null!==(y=t?.bottom)&&void 0!==y?y:"",left:null!==(h=t?.left)&&void 0!==h?h:""};Object.keys(n).forEach((e=>{var t;const l=null!==(t=n?.[e])&&void 0!==t?t:"";l?.includes("var:preset")&&(n[e]="var(--wp--preset--spacing--"+l?.replace("var:preset|spacing|","")+")")})),r["--wp--custom--icon--margin"]=Object.values(n).join(" ")}let g="";var b,v;e?.borderColor&&(g="var(--wp--preset--color--"+e?.borderColor+")"),e?.style?.border?.width&&(r["--wp--custom--icon--border-width"]=e.style.border.width,r["--wp--custom--icon--border-style"]=null!==(b=e.style.border?.style)&&void 0!==b?b:"solid",r["--wp--custom--icon--border-color"]=null!==(v=e.style.border?.color)&&void 0!==v?v:g);let k=null!==(t=e?.iconSize)&&void 0!==t?t:"";if(""!==k){const e=["px","em","rem","vh","vw","%"].some((e=>k?.includes(e)));k=e?k:k+"px",r["--wp--custom--icon--size"]=k}const E=(null!==(n=e?.iconCustomSVG)&&void 0!==n?n:"")?.replace('"',"'"),w=E&&E?.includes("["core/image","core/button","blockify/tab"].includes(e),tt=null!==(Qe=window?.blockify?.defaultIcon)&&void 0!==Qe?Qe:{set:"wordpress",name:"star-empty",string:' '},nt={iconSet:{type:"string",default:tt.set},iconName:{type:"string",default:tt.name},iconColor:{type:"string"},iconGradient:{type:"string"},iconSize:{type:"string"},iconPosition:{type:"string"},iconCustomSVG:{type:"string"},iconSvgString:{type:"string",default:tt.string}},lt={name:"icon",icon:Ze,title:(0,A.__)("Icon","blockify"),isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"media",scope:["inserter","transform","block"],description:(0,A.__)("Insert a customizable SVG icon.","blockify"),attributes:{className:"is-style-icon",iconSet:tt.set,iconName:tt.name,iconSvgString:tt.string},isActive:e=>e&&e?.className?.includes("is-style-icon")};y()((()=>{(0,h.registerBlockVariation)("core/image",lt)})),(0,t.addFilter)("blocks.registerBlockType","blockify/add-icon-attributes",((e,t)=>{if(et(t)){for(const[t,n]of Object.entries(nt))e.attributes[t]={type:n.type};"core/button"===t&&(delete nt?.iconSet?.default,delete nt?.iconName?.default),e.attributes={...e.attributes,...nt}}return e}),99);const rt=t=>{var n,l;const{attributes:r,setAttributes:o,isButton:a}=t,i=[{label:(0,A.__)("None","blockify"),value:""}],s=null!==(n=(0,S.useSelect)((e=>e(I)?.getIcons()),[]))&&void 0!==n?n:F,c={wordpress:[{name:nt?.iconSvgString?.default,key:nt?.iconName?.default}]};Object.keys(s).forEach((e=>{var t;let n=e.split("-").join(" ");var l;n="wordpress"===n?"WordPress":n,i.push({label:n,value:e}),c[e]=[],Object.keys(s[e]).forEach((t=>{t!==r?.iconName&&c[e].push({name:Je(s?.[e]?.[t]),key:t})})),s?.[e]?.[null!==(t=r?.iconName)&&void 0!==t?t:""]&&c[e].unshift({name:Je(s?.[e]?.[null!==(l=r?.iconName)&&void 0!==l?l:""]),key:r?.iconName})}));const u=()=>{var t;const n=c[null!==(t=r?.iconSet)&&void 0!==t?t:""]?.filter((e=>e?.key===r?.iconName))?.[0]?.name;return(0,e.createElement)("div",{className:"blockify-icon-preview"},n&&(0,e.createElement)(e.Fragment,null,n,(0,e.createElement)("span",null,r?.iconName?.replace("-"," "))))},m=()=>{const t={height:"30px"};return(0,e.createElement)(B.FlexItem,{style:{flexBasis:"100%"}},(0,e.createElement)(R,{style:{margin:"0 0 5px"}},(0,A.__)("Icon Position","blockify")),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{variant:"start"===r?.iconPosition?"primary":"secondary",onClick:()=>{o({iconPosition:"start"})},style:t},(0,A.__)("Start","blockify")),(0,e.createElement)(B.Button,{variant:"end"===r?.iconPosition?"primary":"secondary",onClick:()=>{o({iconPosition:"end"})},style:t},(0,A.__)("End","blockify"))))};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Select Icon Set","blockify"),value:null!==(l=r?.iconSet)&&void 0!==l?l:nt?.iconSet.default,options:i,onChange:e=>o({iconSet:e})}),r?.iconSet&&(0,e.createElement)((()=>{var t,n,l;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u,null),(0,e.createElement)(B.CustomSelectControl,{label:(0,A.__)("Select Icon","blockify"),options:null!==(t=c?.[null!==(n=r?.iconSet)&&void 0!==n?n:""])&&void 0!==t?t:c?.wordpress,value:null!==(l=r?.iconSvgString)&&void 0!==l?l:a?"":nt?.iconSvgString?.default,className:"blockify-icon-setting",onChange:({selectedItem:e})=>{var t,n;const l=null!==(t=e?.key)&&void 0!==t?t:"";o({iconName:l}),o({iconSvgString:s?.[null!==(n=r?.iconSet)&&void 0!==n?n:""]?.[l]?.toString()})}}),(0,e.createElement)("br",null),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{align:"top",justify:"space-between",wrap:!1,style:{alignItems:"top",alignContent:"top"}},(0,e.createElement)(B.FlexItem,{style:{flexBasis:"100%"}},(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Icon Width","blockify"),value:r?.iconSize,onChange:e=>{e&&o({iconSize:e})}})),a&&(0,e.createElement)(m,null))))}),null))};(0,t.addFilter)("editor.BlockEdit","blockify/with-icon",(0,l.createHigherOrderComponent)((t=>n=>{const{name:l,attributes:r,isSelected:o}=n,{className:a}=r,i=["core/button","blockify/tab"].includes(l);return(a?.includes("is-style-icon")||i)&&et(l)?(o&&(()=>{var e;if(null!==(e=window?.blockify?.isPlugin)&&void 0!==e&&e)return;const t=document.getElementsByClassName("block-editor-block-card__description").item(0);t&&(document.getElementsByClassName("blockify-pro-icon-link").item(0)||(t.innerHTML=t.innerHTML+(0,A.__)(" Get more icons with ","blockify")+'Blockify Pro ↗'))})(),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{title:(0,A.__)("Icon Settings","blockify"),initialOpen:!0,className:"blockify-icon-settings"},!window?.blockify?.isPlugin&&(0,e.createElement)("p",null,(0,A.__)("More icons available with Blockify Pro! ","blockify"),(0,e.createElement)("a",{href:"https://blockifywp.com/pro",target:"_blank",rel:"noreferrer"},(0,A.__)("Learn more ↗","blockify"))),(0,e.createElement)(rt,{...n,isButton:i}))))):(0,e.createElement)(t,{...n})}),"iconEdit"),0),(0,t.addFilter)("editor.BlockListBlock","blockify/edit-icon-styles",(0,l.createHigherOrderComponent)((t=>n=>{let{attributes:l,wrapperProps:r,name:o}=n;const a=["core/button"].includes(o);return(l?.className||a)&&(l?.className?.includes("is-style-icon")||a)&&et(o)?(r||(r={style:{}}),r.style={...r?.style,...Xe(l)},(0,e.createElement)(t,{...n,wrapperProps:r})):(0,e.createElement)(t,{...n})}),"withIcon")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/save-icon-styles",((e,t,n)=>{if(!n?.className)return e;const{name:l}=t,r="core/button"===l;return(n?.className?.includes("is-style-icon")||r)&&et(l)?e={...e,style:{...e?.style,...Xe(n)}}:e}));const ot=(0,e.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(j.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})),at={name:"svg",title:(0,A.__)("SVG","blockify"),icon:ot,isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"media",scope:[],description:(0,A.__)("Insert an inline SVG.","blockify"),attributes:{className:"is-style-svg"},isActive:e=>!!e?.className&&e?.className&&e?.className?.includes("is-style-svg")};y()((()=>{(0,h.registerBlockVariation)("core/image",at)}));const it=e=>"url('data:image/svg+xml;utf8,"+encodeURIComponent(e)+"')",st=e=>"data:image/svg+xml;utf8,"+encodeURIComponent(e);(0,t.addFilter)("editor.BlockEdit","blockify/with-svg-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const{attributes:o,setAttributes:a}=n;if(!o?.className?.includes("is-style-svg"))return(0,e.createElement)(t,{...n});const{style:i}=o,s=null!==(l=i?.svgString)&&void 0!==l?l:"",c=null!==(r=i?.maskSvg)&&void 0!==r&&r;o?.url||a({url:c?"#":st(s)}),c&&"#"!==o?.url&&a({url:"#"}),c||o?.url?.includes("data:image/svg+xml;utf8,")||a({url:st(s)});let u="var(--width,1em)",m="";var d;o?.width&&(u=o.width+"px"),o?.height&&(m=(null!==(d=o.height)&&void 0!==d?d:"")+"px"),m=""===m?u:m;const p={width:u,height:m,display:"inline-flex",background:"currentColor",overflow:"hidden","-webkit-mask-repeat":"no-repeat","-mask-repeat":"no-repeat","-webkit-mask-size":"100% 100%","-mask-size":"100% 100%","-webkit-mask-position":"center","-mask-position":"center bottom","-webkit-mask-image":it(s),"-mask-image":it(s)};let f="";return s&&(f=Object.entries(p).map((([e,t])=>`${e}:${t};`)).join("")),(0,e.createElement)(e.Fragment,null,c&&(0,e.createElement)("style",null,"#block-"+n?.clientId+">div:first-of-type{"+f+"}"),(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{title:(0,A.__)("SVG Settings","blockify-pro"),className:(0,A.__)("blockify-svg-controls","blockify-pro")},(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.TextareaControl,{label:(0,A.__)("SVG String","blockify"),help:(0,A.__)("Paste your SVG string in the field above. It is recommended to format your SVG with an optimization tool ","blockify"),value:null!=s?s:"",rows:20,onChange:e=>{const t={style:{...i,svgString:e}};t.url=c?"#":st(e),a(t)},style:{fontFamily:"var(--wp--preset--font-family--monospace, monospace)"}})),(0,e.createElement)(B.ExternalLink,{href:"https://jakearchibald.github.io/svgomg/",target:"_blank"},"https://jakearchibald.github.io/svgomg/"),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Mask with text color","blockify"),help:(0,A.__)("If enabled, the SVG will be masked with the text color. (Renders inline SVG on front end).","blockify"),checked:c,onChange:e=>{const t={style:{...i,maskSvg:e}};t.url=c?"#":st(s),a(t)}})))))}),"withSvgControls"),9);const ct={name:"marquee",icon:(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"})),title:(0,A.__)("Marquee","blockify"),isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"design",scope:["inserter"],description:(0,A.__)("Adds a horizontal infinite scrolling marquee banner.","blockify"),innerBlocks:[["core/group",{layout:{type:"flex",flexWrap:"nowrap",orientation:"horizontal",justifyContent:"center"}},[["core/paragraph"]]]],attributes:{marquee:{},align:"full",speedMobile:60,speedDesktop:90,pauseOnHover:!0,reverse:!1,spacing:{padding:{right:"0",left:"0"}},layout:{type:"flex",flexWrap:"nowrap",orientation:"marquee",justifyContent:"center"}},isActive:(e,t)=>e.layout?.orientation===t.layout?.orientation};(0,h.registerBlockVariation)("core/group",ct);const ut=e=>{var t,n;return{"--marquee-speed-mobile":(null!==(t=e?.speedMobile)&&void 0!==t?t:20)+"s","--marquee-speed-desktop":(null!==(n=e?.speedDesktop)&&void 0!==n?n:30)+"s","--marquee-direction":e?.reverse?"reverse":"forwards","--marquee-pause":e?.pauseOnHover?"paused":"running"}};(0,t.addFilter)("blocks.registerBlockType","blockify/marquee-attributes",((e,t)=>("core/group"===t&&(e={...e,attributes:{...e.attributes,speedMobile:{type:"string"},speedDesktop:{type:"string"},reverse:{type:"boolean"},pauseOnHover:{type:"boolean"},repeatItems:{type:"number"}}}),e)),0),(0,t.addFilter)("editor.BlockEdit","blockify/with-marquee-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,setAttributes:o}=n;return"marquee"!==r?.layout?.orientation?(0,e.createElement)(t,{...n}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{title:(0,A.__)("Marquee Settings","blockify-pro"),className:"blockify-width-control"},(0,e.createElement)("p",null,(0,A.__)("Scroll Speed (seconds)","blockify")),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)("br",null),(0,e.createElement)(B.Flex,null,(0,e.createElement)(B.FlexItem,{style:{width:"50%"}},(0,e.createElement)(B.__experimentalNumberControl,{isShiftStepEnabled:!0,label:(0,A.__)("Mobile","blockify"),onChange:e=>{o({speedMobile:e})},value:r?.speedMobile})),(0,e.createElement)(B.FlexBlock,null,(0,e.createElement)(B.__experimentalNumberControl,{isShiftStepEnabled:!0,label:(0,A.__)("Desktop","blockify-pro"),onChange:e=>{o({speedDesktop:e})},value:r?.speedDesktop})))),(0,e.createElement)("br",null),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.RangeControl,{label:(0,A.__)("Repeat Items","blockify"),help:(0,A.__)("How many times should the items be duplicated and cloned.","blockify"),value:null!==(l=r?.repeatItems)&&void 0!==l?l:2,onChange:e=>{o({repeatItems:e})},min:0,max:10,step:1,allowReset:!0})),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Pause on hover","blockify-pro"),checked:r?.pauseOnHover,onChange:()=>o({pauseOnHover:!r?.pauseOnHover})})),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Reverse direction","blockify-pro"),checked:r?.reverse,onChange:()=>o({reverse:!r?.reverse})})))),(0,e.createElement)(t,{...n}))}),"withInspectorControl"),9),(0,t.addFilter)("editor.BlockListBlock","blockify/with-marquee",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const{attributes:o}=n;if("marquee"!==o?.layout?.orientation)return(0,e.createElement)(t,{...n});n.attributes.style={...null!==(l=o.style)&&void 0!==l?l:{},...ut(o)};const a={...n.wrapperProps,style:{...null!==(r=n.wrapperProps?.style)&&void 0!==r?r:{},...ut(o)}};return(0,e.createElement)(t,{...n,wrapperProps:a})}),"withMarquee")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/save-marquee-styles",((e,t,n)=>"marquee"!==n?.layout?.orientation?e:e={...e,style:{...e?.style,...ut(n)}}));const mt=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})),dt={name:"paragraph",title:(0,A.__)("Paragraph","blockify"),icon:mt,isDefault:!0,category:"text",scope:["inserter","transform","block"],description:(0,A.__)("Insert an image to make a visual statement.","blockify"),attributes:{className:""},isActive:e=>!e?.className?.includes("is-style-curved-text")&&!e?.className?.includes("is-style-counter")};(0,h.registerBlockVariation)("core/paragraph",dt);const pt=(0,e.createElement)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 512 512"},(0,e.createElement)(B.Path,{d:"M126.12 315.1A47.06 47.06 0 1 1 79.06 268h47.06Zm23.72 0a47.06 47.06 0 0 1 94.12 0v117.84a47.06 47.06 0 1 1-94.12 0Zm47.06-188.98A47.06 47.06 0 1 1 244 79.06v47.06Zm0 23.72a47.06 47.06 0 0 1 0 94.12H79.06a47.06 47.06 0 0 1 0-94.12Zm188.98 47.06a47.06 47.06 0 1 1 47.06 47.1h-47.06Zm-23.72 0a47.06 47.06 0 0 1-94.12 0V79.06a47.06 47.06 0 1 1 94.12 0ZM315.1 385.88a47.06 47.06 0 1 1-47.1 47.06v-47.06Zm0-23.72a47.06 47.06 0 0 1 0-94.12h117.84a47.06 47.06 0 1 1 0 94.12Z"})),ft={name:"slack",title:(0,A.__)("Slack","blockify"),icon:pt,attributes:{service:"slack"},isActive:(e,t)=>e.service===t.service};(0,h.registerBlockVariation)("core/social-link",ft);const yt=window.wp.richText;(0,yt.registerFormatType)("blockify/clear-formatting",{title:(0,A.__)("Clear","blockify"),tagName:"span",className:"clear",edit:t=>{const{value:n,isActive:l,onChange:r}=t,{formatTypes:o}=(0,S.useSelect)((e=>({formatTypes:e("core/rich-text").getFormatTypes()})),[]);return(0,e.createElement)(U.RichTextToolbarButton,{icon:"editor-removeformatting",title:(0,A.__)("Clear Formatting","blockify"),onClick:()=>{if(o.length>0){let e=n;o.map((t=>{e=(0,yt.removeFormat)(e,t.name)})),r({...e})}},isActive:l})}});const ht=(0,e.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(j.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"})),gt="blockify/gradient";(0,yt.registerFormatType)(gt,{title:(0,A.__)("Gradient","blockify"),tagName:"span",className:"has-text-gradient",attributes:{style:"style",class:"class"},edit:({isActive:t,value:n,onChange:l})=>{const[r,o]=(0,V.useState)(""),[a,i]=(0,V.useState)(!1),{gradients:s}=(0,S.useSelect)((e=>({gradients:e("core/block-editor").getSettings()?.gradients})),[]);let c="",u="";return n?.formats&&n.formats.forEach((e=>{const t=e?.find((e=>e?.type===gt));t?.type===gt&&(c+=";"+t?.attributes?.style,u+=t?.attributes?.class)})),(0,e.createElement)(U.BlockControls,null,(0,e.createElement)(U.RichTextToolbarButton,{icon:ht,title:(0,A.__)("Gradient","blockify"),isActive:t,shortcutType:"primary",shortcutCharacter:"g",onClick:()=>i(!a)}),a&&(0,e.createElement)(B.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(B.Popover,{position:"bottom center",className:"blockify-gradient-text-control",focusOnMount:"container",onFocusOutside:()=>i(!1)},(0,e.createElement)(B.GradientPicker,{value:null!=r?r:"",gradients:s,onChange:e=>{o(e);let t=c,r=u;s.forEach((t=>{t.gradient===e&&(r+=(r?" ":"")+"has-"+t.slug+"-gradient-background")})),e&&!r.includes("-gradient-background")&&(t+=(t?t+";":"")+"background:"+e),r?.includes("has-text-gradient")&&(r=r?.replace("has-text-gradient","")?.trim()+" has-text-gradient"),l((0,yt.applyFormat)(n,{type:gt,attributes:{style:t,class:r}}))}}))))}});const bt=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"}));B.CustomSelectControl.Option;const vt="blockify/typography",kt=[{key:"Default",name:"Default",style:{}},{key:"Thin",name:"Thin",style:{fontStyle:"normal",fontWeight:100}},{key:"Extra Light",name:"Extra Light",style:{fontStyle:"normal",fontWeight:200}},{key:"Light",name:"Light",style:{fontStyle:"normal",fontWeight:300}},{key:"Regular",name:"Regular",style:{fontStyle:"normal",fontWeight:400}},{key:"Medium",name:"Medium",style:{fontStyle:"normal",fontWeight:500}},{key:"Semi Bold",name:"Semi Bold",style:{fontStyle:"normal",fontWeight:600}},{key:"Bold",name:"Bold",style:{fontStyle:"normal",fontWeight:700}},{key:"Extra Bold",name:"Extra Bold",style:{fontStyle:"normal",fontWeight:800}},{key:"Black",name:"Black",style:{fontStyle:"normal",fontWeight:900}},{key:"Thin Italic",name:"Thin Italic",style:{fontStyle:"italic",fontWeight:100}},{key:"Extra Light Italic",name:"Extra Light Italic",style:{fontStyle:"italic",fontWeight:200}},{key:"Light Italic",name:"Light Italic",style:{fontStyle:"italic",fontWeight:300}},{key:"Regular Italic",name:"Regular Italic",style:{fontStyle:"italic",fontWeight:400}},{key:"Medium Italic",name:"Medium Italic",style:{fontStyle:"italic",fontWeight:500}},{key:"Semi Bold Italic",name:"Semi Bold Italic",style:{fontStyle:"italic",fontWeight:600}},{key:"Bold Italic",name:"Bold Italic",style:{fontStyle:"italic",fontWeight:700}},{key:"Extra Bold Italic",name:"Extra Bold Italic",style:{fontStyle:"italic",fontWeight:800}},{key:"Black Italic",name:"Black Italic",style:{fontStyle:"italic",fontWeight:900}}];(0,yt.registerFormatType)(vt,{title:(0,A.__)("Typography","blockify"),tagName:"span",className:"has-font",edit:t=>{var n;const{isActive:l,value:o,onChange:a}=t,{fontSizes:i}=(0,S.useSelect)((e=>({fontSizes:e("core/block-editor")?.getSettings()?.fontSizes})),[]),s=null!==(n=window?.blockify?.selectedFonts)&&void 0!==n?n:[],c=s?.map((e=>({label:r(e?.replace("-"," ")),value:e})));let u="",m="";o?.formats&&o.formats.forEach((e=>{e&&e.forEach((e=>{var t,n;e?.type===vt&&(u=null!==(t=e?.attributes?.style)&&void 0!==t?t:"",m=null!==(n=e?.attributes?.class)&&void 0!==n?n:"")}))}));const[d,p]=(0,V.useState)({style:b(u),class:m.split(" "),fontFamily:"",fontSize:"",fontAppearance:kt[0],isOpen:!1});return(0,e.createElement)(U.BlockControls,null,(0,e.createElement)(U.RichTextToolbarButton,{icon:bt,title:(0,A.__)("Typography","blockify"),isActive:l,shortcutType:"primary",shortcutCharacter:"f",onClick:()=>p({...d,isOpen:!d.isOpen})}),d?.isOpen&&(0,e.createElement)(B.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(B.Popover,{position:"bottom center",className:"blockify-font-family-control",focusOnMount:"container",onFocusOutside:()=>p({...d,isOpen:!1})},(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Select Font Family","blockify"),value:d?.fontFamily,options:c,onChange:e=>{p({...d,fontFamily:e});const t="has-"+e+"-font-family";d?.class?.includes(t)||d?.class?.push(t),a((0,yt.applyFormat)(o,{type:vt,attributes:{style:g(d?.style),class:d?.class?.join(" ")}}))}}),(0,e.createElement)(B.FontSizePicker,{fontSizes:i,fallbackFontSize:20,value:parseInt(d?.fontSize),withSlider:!0,onChange:e=>{p({...d,fontSize:e.toString()}),e&&(d.style["--wp--custom--font-size"]=e.toString()),d?.class?.includes("has-inline-font-size")||d.class.push("has-inline-font-size"),a((0,yt.applyFormat)(o,{type:vt,attributes:{style:g(d?.style),class:d?.class?.join(" ")}}))}}),(0,e.createElement)(B.CustomSelectControl,{label:(0,A.__)("Appearance","blockify"),value:kt.find((e=>e.key===d?.fontAppearance?.key)),options:null!=kt?kt:[],onChange:({selectedItem:e})=>{e&&p({...d,fontAppearance:e}),e?.style?.fontStyle&&(d.style["font-style"]=e?.style?.fontStyle),e?.style?.fontWeight&&(d.style["font-weight"]=e?.style?.fontWeight?.toString()),a((0,yt.applyFormat)(o,{type:vt,attributes:{style:g(d?.style),class:d?.class?.join(" ")}}))}}))))}});const Et=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),wt="blockify/inline-svg";(0,yt.registerFormatType)(wt,{title:(0,A.__)("Inline SVG","blockify"),object:!0,tagName:"img",className:"has-inline-svg",edit:t=>{const{isActive:n,onChange:l,value:r}=t,[o,a]=(0,V.useState)(!1),[i,s]=(0,V.useState)({string:"",width:"1em",widthDesktop:"1em",alt:"",src:""});return(0,e.createElement)(U.BlockControls,null,(0,e.createElement)(U.RichTextToolbarButton,{icon:Et,title:(0,A.__)("Inline SVG","blockify"),isActive:n,shortcutType:"primary",shortcutCharacter:"v",onClick:()=>a(!o)}),o&&(0,e.createElement)(B.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(B.Popover,{position:"bottom center",className:"blockify-svg-control",focusOnMount:"container",onFocusOutside:()=>a(!1)},(0,e.createElement)(B.TextareaControl,{label:(0,A.__)("SVG String","blockify"),help:(0,A.__)("Paste your SVG string in the field above and then click the button below to insert your image.","blockify"),value:i?.string,placeholder:(0,A.__)("Paste your SVG string here","blockify"),rows:20,onChange:e=>{s({...i,string:e.replace(/'/g,'"')})},style:{fontFamily:"var(--wp--preset--font-family--monospace, monospace)",width:"300px"}}),(0,e.createElement)("br",null),(0,e.createElement)(B.TextareaControl,{label:(0,A.__)("Alt Text","blockify"),placeholder:(0,A.__)("SVG description","blockify"),value:i?.alt,rows:2,onChange:e=>{s({...i,alt:e})},style:{width:"300px"}}),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,null,(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Width Mobile","blockify"),value:i?.width,onChange:e=>{s({...i,width:e})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Width Desktop","blockify"),value:i?.widthDesktop,onChange:e=>{s({...i,widthDesktop:e})}})))),(0,e.createElement)("br",null),(0,e.createElement)(B.Button,{text:(0,A.__)("Insert SVG","blockify"),onClick:()=>(e=>{let t=`-webkit-mask-image:url(${"data:image/svg+xml;utf8,"+encodeURIComponent(e?.string)})`;e?.width&&(t+=`;--width: ${e?.width}`),e?.widthDesktop&&(t+=`;--width-desktop: ${e?.widthDesktop}`),l((0,yt.insertObject)(r,{type:wt,attributes:{style:t,alt:e?.alt,role:"presentation",src:""}})),a(!1)})(i)}))))}});const xt=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),_t="blockify/underline",Ct=["none","solid","wavy","dashed","dotted","double","brush","circle","scribble"];(0,yt.registerFormatType)(_t,{title:(0,A.__)("Underline","blockify"),tagName:"u",className:"has-text-underline",attributes:{style:"style",class:"class"},edit:({isActive:t,value:n,onChange:l})=>{const[r,o]=(0,V.useState)(""),[a,i]=(0,V.useState)(!1);let s=[],c=[];return n?.formats&&n.formats.forEach((e=>{e&&e.forEach((e=>{e.type===_t&&(e.attributes?.style&&(s=e.attributes.style.split(";")),e.attributes?.class&&(c=e.attributes.class.split(" ")))}))})),(0,e.createElement)(U.BlockControls,null,(0,e.createElement)(U.RichTextShortcut,{type:"primary",character:"u",onUse:()=>{l((0,yt.toggleFormat)(n,{type:_t}))}}),(0,e.createElement)(U.RichTextToolbarButton,{icon:xt,title:(0,A.__)("Underline","blockify"),isActive:t,shortcutType:"primary",shortcutCharacter:"u",onClick:()=>i(!a)}),a&&(0,e.createElement)(B.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(B.Popover,{position:"bottom center",className:"blockify-underline-format",focusOnMount:"container",onFocusOutside:()=>i(!1)},(0,e.createElement)(B.__experimentalText,null,(0,A.__)("Underline style","blockify")),(0,e.createElement)("br",null),(0,e.createElement)(B.SelectControl,{onChange:e=>{var t,r;"none"===e&&l((0,yt.removeFormat)(n,_t)),o(e);const a=null!==(t=c)&&void 0!==t?t:[];a.forEach(((e,t)=>{e.includes("is-underline-")&&delete i.classes[t]}));const i={classes:[...a,"is-underline-"+e],styles:[...null!==(r=s)&&void 0!==r?r:[],"--wp--custom--underline--style:"+e]};l((0,yt.applyFormat)(n,{type:_t,attributes:{class:i.classes.join(" "),style:i.styles.join(";")}}))},value:r,options:Ct.map((e=>{return{label:(t=e,t.charAt(0).toUpperCase()+t.slice(1)),value:e};var t}))}))))}})})()})(); \ No newline at end of file +(()=>{var e={960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},915:function(e,t,n){"use strict";var l=this&&this.__createBinding||(Object.create?function(e,t,n,l){void 0===l&&(l=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,l,r)}:function(e,t,n,l){void 0===l&&(l=n),e[l]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||l(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var o=n(960),a=n(790);r(n(790),t);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},s=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=i),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:i,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?o.ElementType.Tag:void 0,l=new a.Element(e,t,void 0,n);this.addNode(l),this.tagStack.push(l)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===o.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=s,t.default=s},790:function(e,t,n){"use strict";var l,r=this&&this.__extends||(l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},l(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,l=arguments.length;n0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(i);t.NodeWithChildren=d;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=p;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var y=function(e){function t(t,n,l,r){void 0===l&&(l=[]),void 0===r&&(r="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var o=e.call(this,l)||this;return o.name=t,o.attribs=n,o.type=r,o}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,l;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(l=e["x-attribsPrefix"])||void 0===l?void 0:l[t]}}))},enumerable:!1,configurable:!0}),t}(d);function h(e){return(0,a.isTag)(e)}function g(e){return e.type===a.ElementType.CDATA}function b(e){return e.type===a.ElementType.Text}function v(e){return e.type===a.ElementType.Comment}function k(e){return e.type===a.ElementType.Directive}function w(e){return e.type===a.ElementType.Root}function E(e,t){var n;if(void 0===t&&(t=!1),b(e))n=new c(e.data);else if(v(e))n=new u(e.data);else if(h(e)){var l=t?x(e.children):[],r=new y(e.name,o({},e.attribs),l);l.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=r}else if(g(e)){l=t?x(e.children):[];var a=new p(l);l.forEach((function(e){return e.parent=a})),n=a}else if(w(e)){l=t?x(e.children):[];var i=new f(l);l.forEach((function(e){return e.parent=i})),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),n=i}else{if(!k(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new m(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return E(e,!0)})),n=1;n{t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]},276:e=>{var t="html",n="head",l="body",r=/<([a-zA-Z]+[0-9]?)/,o=//i,a=//i,i=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},s=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},c="object"==typeof window&&window.DOMParser;if("function"==typeof c){var u=new c;i=s=function(e,t){return t&&(e="<"+t+">"+e+""),u.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var m=document.implementation.createHTMLDocument();i=function(e,t){return t?(m.documentElement.querySelector(t).innerHTML=e,m):(m.documentElement.innerHTML=e,m)}}var d,p="object"==typeof document?document.createElement("template"):{};p.content&&(d=function(e){return p.innerHTML=e,p.content.childNodes}),e.exports=function(e){var c,u,m,p,f=e.match(r);switch(f&&f[1]&&(c=f[1].toLowerCase()),c){case t:return u=s(e),o.test(e)||(m=u.querySelector(n))&&m.parentNode.removeChild(m),a.test(e)||(m=u.querySelector(l))&&m.parentNode.removeChild(m),u.querySelectorAll(t);case n:case l:return p=(u=i(e)).querySelectorAll(c),a.test(e)&&o.test(e)?p[0].parentNode.childNodes:p;default:return d?d(e):(m=i(e,l).querySelector(l)).childNodes}}},152:(e,t,n)=>{var l=n(276),r=n(507).formatDOM,o=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(o);return n&&n[1]&&(t=n[1]),r(l(e),null,t)}},507:(e,t,n)=>{for(var l,r=n(915),o=n(885).CASE_SENSITIVE_TAG_NAMES,a=r.Comment,i=r.Element,s=r.ProcessingInstruction,c=r.Text,u={},m=0,d=o.length;m{var l=n(915),r=n(152),o=n(484),a=n(670);r="function"==typeof r.default?r.default:r;var i={lowerCaseAttributeNames:!1};function s(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:a(r(e,(t=t||{}).htmlparser2||i),t)}s.domToReact=a,s.htmlToDOM=r,s.attributesToProps=o,s.Comment=l.Comment,s.Element=l.Element,s.ProcessingInstruction=l.ProcessingInstruction,s.Text=l.Text,e.exports=s,s.default=s},484:(e,t,n)=>{var l=n(726),r=n(606),o=["checked","value"],a=["input","select","textarea"],i={reset:!0,submit:!0};function s(e){return l.possibleStandardNames[e]}e.exports=function(e,t){var n,c,u,m,d,p={},f=(e=e||{}).type&&i[e.type];for(n in e)if(u=e[n],l.isCustomAttribute(n))p[n]=u;else if(m=s(c=n.toLowerCase()))switch(d=l.getPropertyInfo(m),-1===o.indexOf(m)||-1===a.indexOf(t)||f||(m=s("default"+c)),p[m]=u,d&&d.type){case l.BOOLEAN:p[m]=!0;break;case l.OVERLOADED_BOOLEAN:""===u&&(p[m]=!0)}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(p[n]=u);return r.setStyleProp(e.style,p),p}},670:(e,t,n)=>{var l=n(196),r=n(484),o=n(606),a=o.setStyleProp,i=o.canTextBeChildOfNode;function s(e){return o.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&o.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var o,c,u,m,d,p=(n=n||{}).library||l,f=p.cloneElement,y=p.createElement,h=p.isValidElement,g=[],b="function"==typeof n.replace,v=n.trim,k=0,w=t.length;k1&&(u=f(u,{key:u.key||k})),g.push(u);else if("text"!==o.type){switch(m=o.attribs,s(o)?a(m.style,m):m&&(m=r(m,o.name)),d=null,o.type){case"script":case"style":o.children[0]&&(m.dangerouslySetInnerHTML={__html:o.children[0].data});break;case"tag":"textarea"===o.name&&o.children[0]?m.defaultValue=o.children[0].data:o.children&&o.children.length&&(d=e(o.children,n));break;default:continue}w>1&&(m.key=k),g.push(y(o.name,m,d))}else{if((c=!o.data.trim().length)&&o.parent&&!i(o.parent))continue;if(v&&c)continue;g.push(o.data)}return 1===g.length?g[0]:g}},606:(e,t,n)=>{var l=n(196),r=n(476).default,o={reactCompat:!0},a=l.version.split(".")[0]>=16,i=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var n,l,r="function"==typeof t,o={},a={};for(n in e)l=e[n],r&&(o=t(n,l))&&2===o.length?a[o[0]]=o[1]:"string"==typeof l&&(a[l]=n);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!=e)try{t.style=r(e,o)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!i.has(e.name)},elementsWithNoTextChildren:i}},139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,l=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,s=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(s,c):c}e.exports=function(e,s){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];s=s||{};var m=1,d=1;function p(e){var t=e.match(n);t&&(m+=t.length);var l=e.lastIndexOf("\n");d=~l?e.length-l:d+e.length}function f(){var e={line:m,column:d};return function(t){return t.position=new y(e),v(),t}}function y(e){this.start=e,this.end={line:m,column:d},this.source=s.source}y.prototype.content=e;var h=[];function g(t){var n=new Error(s.source+":"+m+":"+d+": "+t);if(n.reason=t,n.filename=s.source,n.line=m,n.column=d,n.source=e,!s.silent)throw n;h.push(n)}function b(t){var n=t.exec(e);if(n){var l=n[0];return p(l),e=e.slice(l.length),n}}function v(){b(l)}function k(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var l=e.slice(2,n-2);return d+=2,p(l),e=e.slice(n),d+=2,t({type:"comment",comment:l})}}function E(){var e=f(),n=b(r);if(n){if(w(),!b(o))return g("property missing ':'");var l=b(a),s=e({type:"declaration",property:u(n[0].replace(t,c)),value:l?u(l[0].replace(t,c)):c});return b(i),s}}return v(),function(){var e,t=[];for(k(t);e=E();)!1!==e&&(t.push(e),k(t));return t}()}},433:()=>{Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}},325:(e,t,n)=>{var l=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,l={},r={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=m.reach);x+=E.value.length,E=E.next){var _=E.value;if(t.length>e.length)return;if(!(_ instanceof o)){var C,S=1;if(b){if(!(C=a(w,x,e,g))||C.index>=e.length)break;var F=C.index,P=C.index+C[0].length,N=x;for(N+=E.value.length;F>=N;)N+=(E=E.next).value.length;if(x=N-=E.value.length,E.value instanceof o)continue;for(var O=E;O!==t.tail&&(Nm.reach&&(m.reach=A);var j=E.prev;if(T&&(j=c(t,j,T),x+=T.length),u(t,j,S),E=c(t,j,new o(d,h?r.tokenize(I,h):I,v,I)),B&&c(t,E,B),S>1){var z={cause:d+","+f,reach:A};i(e,t,n,E.prev,x,z),m&&z.reach>m.reach&&(m.reach=z.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var l=t.next,r={value:n,prev:t,next:l};return t.next=r,l.prev=r,e.length++,r}function u(e,t,n){for(var l=t.next,r=0;r"+o.content+""},!e.document)return e.addEventListener?(r.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),l=n.language,o=n.code,a=n.immediateClose;e.postMessage(r.highlight(o,r.languages[l],l)),a&&e.close()}),!1),r):r;var m=r.util.currentScript();function d(){r.manual||r.highlightAll()}if(m&&(r.filename=m.src,m.hasAttribute("data-manual")&&(r.manual=!0)),!r.manual){var p=document.readyState;"loading"===p||"interactive"===p&&m&&m.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return r}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=l),void 0!==n.g&&(n.g.Prism=l)},980:()=>{Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript},726:(e,t,n)=>{"use strict";function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},460:function(e,t,n){"use strict";var l,r=this&&this.__extends||(l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},l(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,l=arguments.length;n-1){t._history.stack=s.slice(0,c+1);var u=t._history.stack.length;if(u>100){var m=u-100;t._history.stack=s.slice(m,u),t._history.offset=Math.max(t._history.offset-m,0)}}var d=Date.now();if(n){var p=t._history.stack[t._history.offset];if(p&&d-p.timestamp<3e3){var f=/[^a-z0-9]([a-z0-9]+)$/i,y=null===(l=t._getLines(p.value,p.selectionStart).pop())||void 0===l?void 0:l.match(f),h=null===(r=t._getLines(e.value,e.selectionStart).pop())||void 0===r?void 0:r.match(f);if((null==y?void 0:y[1])&&(null===(a=null==h?void 0:h[1])||void 0===a?void 0:a.startsWith(y[1])))return void(t._history.stack[t._history.offset]=o(o({},e),{timestamp:d}))}}t._history.stack.push(o(o({},e),{timestamp:d})),t._history.offset++},t._updateInput=function(e){var n=t._input;n&&(n.value=e.value,n.selectionStart=e.selectionStart,n.selectionEnd=e.selectionEnd,t.props.onValueChange(e.value))},t._applyEdits=function(e){var n=t._input,l=t._history.stack[t._history.offset];l&&n&&(t._history.stack[t._history.offset]=o(o({},l),{selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})),t._recordChange(e),t._updateInput(e)},t._undoEdit=function(){var e=t._history,n=e.stack,l=e.offset,r=n[l-1];r&&(t._updateInput(r),t._history.offset=Math.max(l-1,0))},t._redoEdit=function(){var e=t._history,n=e.stack,l=e.offset,r=n[l+1];r&&(t._updateInput(r),t._history.offset=Math.min(l+1,n.length-1))},t._handleKeyDown=function(e){var n=t.props,l=n.tabSize,r=n.insertSpaces,o=n.ignoreTabKey,a=n.onKeyDown;if(!a||(a(e),!e.defaultPrevented)){27===e.keyCode&&e.currentTarget.blur();var i=e.currentTarget,s=i.value,c=i.selectionStart,u=i.selectionEnd,p=(r?" ":"\t").repeat(l);if(9===e.keyCode&&!o&&t.state.capture)if(e.preventDefault(),e.shiftKey){var f=(b=t._getLines(s,c)).length-1,y=t._getLines(s,u).length-1,h=s.split("\n").map((function(e,t){return t>=f&&t<=y&&e.startsWith(p)?e.substring(p.length):e})).join("\n");if(s!==h){var g=b[f];t._applyEdits({value:h,selectionStart:(null==g?void 0:g.startsWith(p))?c-p.length:c,selectionEnd:u-(s.length-h.length)})}}else if(c!==u){var b,v=(b=t._getLines(s,c)).length-1,k=t._getLines(s,u).length-1;g=b[v],t._applyEdits({value:s.split("\n").map((function(e,t){return t>=v&&t<=k?p+e:e})).join("\n"),selectionStart:g&&/\S/.test(g)?c+p.length:c,selectionEnd:u+p.length*(k-v+1)})}else{var w=c+p.length;t._applyEdits({value:s.substring(0,c)+p+s.substring(u),selectionStart:w,selectionEnd:w})}else if(8===e.keyCode){var E=c!==u;s.substring(0,c).endsWith(p)&&!E&&(e.preventDefault(),w=c-p.length,t._applyEdits({value:s.substring(0,c-p.length)+s.substring(u),selectionStart:w,selectionEnd:w}))}else if(13===e.keyCode){if(c===u){var x=t._getLines(s,c).pop(),_=null==x?void 0:x.match(/^\s+/);if(null==_?void 0:_[0]){e.preventDefault();var C="\n"+_[0];w=c+C.length,t._applyEdits({value:s.substring(0,c)+C+s.substring(u),selectionStart:w,selectionEnd:w})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var S=void 0;57===e.keyCode&&e.shiftKey?S=["(",")"]:219===e.keyCode?S=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?S=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(S=["`","`"]),c!==u&&S&&(e.preventDefault(),t._applyEdits({value:s.substring(0,c)+S[0]+s.substring(c,u)+S[1]+s.substring(u),selectionStart:c,selectionEnd:u+2}))}else!(d?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(d?e.metaKey&&90===e.keyCode&&e.shiftKey:m?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),t._redoEdit()):77!==e.keyCode||!e.ctrlKey||d&&!e.shiftKey||(e.preventDefault(),t.setState((function(e){return{capture:!e.capture}}))):(e.preventDefault(),t._undoEdit())}},t._handleChange=function(e){var n=e.currentTarget,l=n.value,r=n.selectionStart,o=n.selectionEnd;t._recordChange({value:l,selectionStart:r,selectionEnd:o},!0),t.props.onValueChange(l)},t._history={stack:[],offset:-1},t._input=null,t}return r(t,e),t.prototype.componentDidMount=function(){this._recordCurrentState()},Object.defineProperty(t.prototype,"session",{get:function(){return{history:this._history}},set:function(e){this._history=e.history},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.value,l=t.style,r=t.padding,a=t.highlight,i=t.textareaId,s=t.textareaClassName,m=t.autoFocus,d=t.disabled,y=t.form,g=t.maxLength,b=t.minLength,v=t.name,k=t.placeholder,w=t.readOnly,E=t.required,x=t.onClick,_=t.onFocus,C=t.onBlur,S=t.onKeyUp,F=(t.onKeyDown,t.onValueChange,t.tabSize,t.insertSpaces,t.ignoreTabKey,t.preClassName),P=c(t,["value","style","padding","highlight","textareaId","textareaClassName","autoFocus","disabled","form","maxLength","minLength","name","placeholder","readOnly","required","onClick","onFocus","onBlur","onKeyUp","onKeyDown","onValueChange","tabSize","insertSpaces","ignoreTabKey","preClassName"]),N={paddingTop:"object"==typeof r?r.top:r,paddingRight:"object"==typeof r?r.right:r,paddingBottom:"object"==typeof r?r.bottom:r,paddingLeft:"object"==typeof r?r.left:r},O=a(n);return u.createElement("div",o({},P,{style:o(o({},h.container),l)}),u.createElement("pre",o({className:F,"aria-hidden":"true",style:o(o(o({},h.editor),h.highlight),N)},"string"==typeof O?{dangerouslySetInnerHTML:{__html:O+"
"}}:{children:O})),u.createElement("textarea",{ref:function(t){return e._input=t},style:o(o(o({},h.editor),h.textarea),N),className:p+(s?" ".concat(s):""),id:i,value:n,onChange:this._handleChange,onKeyDown:this._handleKeyDown,onClick:x,onKeyUp:S,onFocus:_,onBlur:C,disabled:d,form:y,maxLength:g,minLength:b,name:v,placeholder:k,readOnly:w,required:E,autoFocus:m,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),u.createElement("style",{dangerouslySetInnerHTML:{__html:f}}))},t.defaultProps={tabSize:2,insertSpaces:!0,ignoreTabKey:!1,padding:0},t}(u.Component);t.default=y;var h={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}}},476:function(e,t,n){"use strict";var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=l(n(848)),o=n(678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,l){e&&l&&(n[(0,o.camelCase)(e,t)]=l)})),n):n}},678:(e,t)=>{"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,l=/-([a-z])/g,r=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,s):e.replace(o,s)).replace(l,i))}},848:(e,t,n)=>{var l=n(139);function r(e,t){var n,r=null;if(!e||"string"!=typeof e)return r;for(var o,a,i=l(e),s="function"==typeof t,c=0,u=i.length;c{"use strict";e.exports=window.React}},t={};function n(l){var r=t[l];if(void 0!==r)return r.exports;var o=t[l]={exports:{}};return e[l].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var l in t)n.o(t,l)&&!n.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},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),(()=>{"use strict";var e=n(196);const t=window.wp.hooks,l=window.wp.compose,r=e=>e?e?.toLowerCase()?.replace(/(?<= )[^\s]|^./g,(e=>e?.toUpperCase())):"",o=e=>{var t;return e&&null!==(t=e?.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)?.join("-")?.toLowerCase())&&void 0!==t?t:""},a=(e="",t,n)=>e?.split(t)?.join(n);var i,s;const c=null!==(i=window?.blockify?.blockSupports)&&void 0!==i?i:{},u=e=>{var t;return null!==(t=c?.[e]?.blockifyPosition)&&void 0!==t&&t},m=null!==(s=window?.blockify?.extensionOptions)&&void 0!==s?s:{};(0,t.addFilter)("blocks.registerBlockType","blockify/add-position-attributes",((e,t)=>{if(u(t)){var n;const t={};Object.keys(m).forEach((e=>{t[e]={type:"object"}})),e.attributes={...e.attributes,style:{...t,...null!==(n=e?.attributes?.style)&&void 0!==n?n:{}}}}return e}),0);const d=e=>{var t;const n=[],l=null!==(t=e?.style)&&void 0!==t?t:{};return Object.keys(m).forEach((e=>{const t=o(e);var r,a,i;m?.[e]?.options?(null!==(r=l?.[e]?.all)&&void 0!==r&&r&&n.push(`has-${t}-${o(l?.[e]?.all)}`),null!==(a=l?.[e]?.mobile)&&void 0!==a&&a&&n.push(`has-${t}-${o(l?.[e]?.mobile)}-mobile`),null!==(i=l?.[e]?.desktop)&&void 0!==i&&i&&n.push(`has-${t}-${o(l?.[e]?.desktop)}-desktop`)):l?.[e]&&n.push(`has-${t}`)})),n},p=e=>{var t;const n={},l=null!==(t=e?.style)&&void 0!==t?t:{};return Object.keys(m).forEach((e=>{var t,r,a;if(m?.[e]?.options)return;const i=o(e);null!==(t=l?.[e]?.all)&&void 0!==t&&t&&(n[`--${i}`]=l?.[e]?.all),null!==(r=l?.[e]?.mobile)&&void 0!==r&&r&&(n[`--${i}-mobile`]=l?.[e]?.mobile),null!==(a=l?.[e]?.desktop)&&void 0!==a&&a&&(n[`--${i}-desktop`]=l?.[e]?.desktop)})),n};(0,t.addFilter)("editor.BlockListBlock","blockify/with-position-style",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{name:r,attributes:o}=n;if(!u(r))return(0,e.createElement)(t,{...n});const a=d(o),i=p(o),s=null!==(l=n?.wrapperProps)&&void 0!==l?l:{};return n={...n,style:{...n?.style,...i}},s&&(s.style={...s?.style,...i}),a.forEach((e=>{n?.className?.includes(e)||(n.className=n?.className+" "+e)})),n.wrapperProps=s,(0,e.createElement)(t,{...n})}),"withPositionStyle")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/save-position-style",(e=>{const{name:t,attributes:n}=e;if(!c?.[t]?.blockifyPosition)return e;const l=d(n),r=p(n);return l.forEach((t=>{e?.className?.includes(t)||(e.className=e?.className+" "+t)})),e={...e,style:{...e?.style,...r}}}),11);const f=window.wp.domReady;var y=n.n(f);const h=window.wp.blocks;y()((()=>{var e,t,n;const l=null!==(e=window?.blockify?.blockStyles)&&void 0!==e?e:{unregister:{},register:{}},o=null!==(t=l?.unregister)&&void 0!==t?t:{},i=null!==(n=l?.register)&&void 0!==n?n:{};Object.keys(o).forEach((e=>{o[e].forEach((t=>{(0,h.unregisterBlockStyle)(e,t)}))})),Object.keys(i).forEach((e=>{i[e].forEach((t=>{(0,h.registerBlockStyle)(e,{name:t,label:r(a(t,"-"," "))})}))}))}));const g=e=>Object.keys(e).map((t=>`${t?.includes("-")?t:o(t)}:${e[t]};`)).join(" "),b=e=>{const t={};return e.split(";").map((e=>{const[n,l]=e.split(":");return n&&(t[n]=l),null})),t},v=e=>e.includes("var:")?(e=e.replace("var:","var(--wp--"),(e=a(e,"|","--"))+")"):e,k=(e="",t="")=>{if(!t)return e;const n=e.split(" ");return t.split(" ").forEach((e=>{n.includes(e)||n.push(e)})),n.join(" ")},w=[{value:"px",label:"px"},{value:"%",label:"%"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"vw",label:"vw"},{value:"vh",label:"vh"},{value:"auto",label:"auto"}];var E;(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2000 2000"},(0,e.createElement)("path",{fill:"currentColor",d:"m1729.66 534.39-691.26-399.1a76.814 76.814 0 0 0-76.81 0l-691.26 399.1a76.818 76.818 0 0 0-38.4 66.52v798.19c0 27.44 14.64 52.8 38.4 66.52l691.26 399.1c11.88 6.86 25.14 10.29 38.4 10.29s26.52-3.43 38.4-10.29l691.26-399.1a76.818 76.818 0 0 0 38.4-66.52V600.9c.01-27.44-14.63-52.79-38.39-66.51zm-115.21 820.36-539.18 311.3V998.46c0-27.45-14.65-52.81-38.43-66.53l-574.18-331.2L1000 290.49l614.45 354.75v709.51z"}));const x=null!==(E=window?.blockify?.blockSupports)&&void 0!==E?E:{};(0,t.addFilter)("blocks.registerBlockType","blockify/block-supports",((e,t)=>(Object.keys(x).includes(t)&&(e.supports={...e.supports,...x[t]}),e)),0),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/alignment-class",((e,t,n)=>(Object.keys(x).includes(t.name)&&n?.align&&!e.className.includes(" align")&&(e.className+=" align"+n.align),e))),(0,t.addFilter)("editor.BlockListBlock","blockify/with-block-gap-css",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const o=(0,e.createElement)(t,{...n});if("core/page-list"!==n.name&&"core/button"!==n.name)return o;const a=null!==(l=n?.attributes?.style?.spacing?.blockGap)&&void 0!==l?l:"";if(!a)return o;const i={...(n={...n,style:{...null!==(r=n.style)&&void 0!==r?r:{},"--wp--style--block-gap":v(a)}}).wrapperProps,style:{...n.wrapperProps?.style,"--wp--style--block-gap":v(a)}};return(0,e.createElement)(t,{...n,wrapperProps:i})}),"withBlockGapCss"));const _=window.wp.apiFetch;var C=n.n(_);const S=window.wp.data,F={icons:{social:{},wordpress:{}}},P={setIcons:e=>({type:"SET_ICONS",icons:e}),getIcons:e=>({type:"GET_ICONS",path:e})},N={getIcons(e){const{icons:t}=e;return t}},O={GET_ICONS:e=>C()({path:e.path})},I={*getIcons(){const e=yield P.getIcons("/blockify/v1/icons/");return P.setIcons(e)}},T="blockify/icons";(0,S.select)("blockify/icons")?.getIcons()||(0,S.register)((0,S.createReduxStore)(T,{reducer:(e=F,t)=>"SET_ICONS"===t.type?{...e,icons:t.icons}:e,actions:P,selectors:N,controls:O,resolvers:I}));const B=window.wp.components,A=window.wp.i18n,j=window.wp.primitives,z=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z"})),R=({children:t,style:n})=>(0,e.createElement)("p",{className:"blockify-control-label",style:{margin:"8px 0",...n}},t),M=({children:t,style:n})=>(0,e.createElement)("p",{style:{fontSize:"12px",color:"rgb(117, 117, 117)",...n}},t);var D=n(460),L=n.n(D),H=n(325);n(433),n(980);const V=window.wp.element,$=({code:t,onChange:n,rows:l=32,language:o="html"})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(L(),{highlight:e=>{var t;return(0,H.highlight)(e,null!==(t=H.languages?.[o])&&void 0!==t?t:"html")},placeholder:(0,A.__)("Please enter ","blockify")+r(o)+(0,A.__)(" code here…","blockify"),value:a(t,'"',"'"),onValueChange:e=>{n(a(e,'"',"'"))},padding:10,style:{fontSize:12,fontFamily:"ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace",height:l.toString()+"em",maxHeight:"100%",borderRadius:"2px",color:"#c3cee3",background:"#263238"}})),G=t=>{const[n,l]=(0,V.useState)(!1),{title:r,description:o}=t;return(0,e.createElement)("div",{className:"blockify-code-editor-modal",style:{width:"100%",display:"flex",flexWrap:"wrap",flexDirection:"column",alignItems:"flex-start"}},(0,e.createElement)(R,null,null!=r?r:""),(0,e.createElement)(M,null,null!=o?o:""),(0,e.createElement)(B.Button,{isSecondary:!0,onClick:()=>l(!0)},r),n&&(0,e.createElement)(B.Modal,{title:null!=r?r:"",onRequestClose:()=>l(!1),style:{width:"80%"}},(0,e.createElement)($,{...t})))},W=()=>(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 120 120",xmlSpace:"preserve"},(0,e.createElement)(j.Path,{d:"M15 0h35v120H15zm55 0h35v120H70z"})),U=window.wp.blockEditor,q=(t,n)=>{var l,o;const{attributes:a,setAttributes:i}=t,{style:s}=a,c=null!==(l=s?.boxShadow)&&void 0!==l?l:{},u=null!==(o=(0,S.select)("core/block-editor").getSettings().colors)&&void 0!==o?o:[],m=e=>{let t;t="default"===n?{...e}:{hover:{...c?.hover,...e}},i({...a,style:{...s,boxShadow:{...c,...t}}})},d=e=>{for(const t of u)t.color===e&&(e="var(--wp--preset--color--"+t.slug+")");m({color:e})},p=(0,S.select)("core/block-editor")?.getSettings()?.__experimentalFeatures?.shadow?.presets?.theme;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)((()=>{const t="hover"===n?"-hover":"";return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ButtonGroup,{className:"blockify-shadow-presets"},p.map((l=>{const r="default"===n&&a.shadowPreset===l.slug||"hover"===n&&a.shadowPresetHover===l.slug;return(0,e.createElement)(B.Button,{key:l.slug+t,className:`has-${l.slug}-shadow`+t,isSmall:!0,variant:r?"primary":"secondary",onClick:()=>{i("hover"===n?{shadowPresetHover:l.slug}:{shadowPreset:l.slug})}},l.name)})))),(0,e.createElement)("br",null),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Custom box shadow","blockify"),checked:a?.useCustomBoxShadow,onChange:e=>{i({useCustomBoxShadow:e})}})))}),null),a?.useCustomBoxShadow&&(0,e.createElement)((()=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,null,["x","y","blur","spread"].map((t=>(0,e.createElement)(B.FlexItem,{key:t},(0,e.createElement)(B.__experimentalNumberControl,{label:r(t),value:"default"===n?c[t]:c?.hover?.[t],onChange:e=>{e&&m({[t]:e})}})))))),(0,e.createElement)("br",null),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,{style:{flex:1.5}},(0,e.createElement)(U.__experimentalPanelColorGradientSettings,{title:(0,A.__)("Color","blockify"),showTitle:!1,enableAlpha:!0,settings:[{enableAlpha:!0,colorValue:"default"===n?c?.color:c?.[n]?.color,label:(0,A.__)("Color ","blockify")+("hover"===n?(0,A.__)(" Hover","blockify"):""),onColorChange:d}]})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Inset","blockify"),checked:"default"===n?c?.inset:c?.[n]?.inset,onChange:e=>{m({inset:e?"inset":""})}})))))),null))},K=t=>{const{attributes:n,setAttributes:l}=t,[r,o]=(0,V.useState)("default");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Shadow","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{l({shadowPreset:"",shadowPresetHover:"",style:{...n?.style,boxShadow:""}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Clear Shadow","blockify")}))),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:"default"===r?"primary":"secondary",onClick:()=>o("default")},(0,A.__)("Default","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"hover"===r?"primary":"secondary",onClick:()=>o("hover")},(0,A.__)("Hover","blockify")))),"default"===r&&q(t,r),"hover"===r&&q(t,r))},Z=[{value:"ease",label:(0,A.__)("Ease","blockify")},{value:"ease-in",label:(0,A.__)("Ease In","blockify")},{value:"ease-out",label:(0,A.__)("Ease Out","blockify"),isDefault:!0},{value:"ease-in-out",label:(0,A.__)("Ease In Out","blockify")},{value:"linear",label:(0,A.__)("Linear","blockify")}],X=[{value:"",label:""}];window?.blockify?.animations?.forEach((e=>{X.push({value:e,label:r(e?.replace(/-/g," "))})}));const Y=[{value:"enter",label:(0,A.__)("Enter","blockify"),isDefault:!0},{value:"exit",label:(0,A.__)("Exit","blockify")},{value:"infinite",label:(0,A.__)("Infinite","blockify")},{value:"scroll",label:(0,A.__)("Scroll","blockify")}],J=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyAnimation)&&void 0!==t&&t};(0,t.addFilter)("blocks.registerBlockType","blockify/add-animation-attributes",((e,t)=>(J(t)&&(e.attributes={...e.attributes,animation:{type:"object"}}),e)),0);const Q=e=>{const t={};var n,l,r,o,a,i,s;return e?.event&&(t["--animation-event"]=null!==(n=e.event)&&void 0!==n?n:"enter","infinite"===e.event&&(t.animationIterationCount="infinite")),e?.name&&(t.animationName=null!==(l=e.name)&&void 0!==l?l:""),e?.duration&&(t.animationDuration=(null!==(r=e.duration)&&void 0!==r?r:"1")+"s"),e?.delay&&(t.animationDelay=(null!==(o=e.delay)&&void 0!==o?o:"0")+"s"),e?.timingFunction&&(t.animationTimingFunction=null!==(a=e?.timingFunction)&&void 0!==a?a:"ease-in-out"),t?.animationIterationCount||(t.animationIterationCount=null!==(i=e?.iterationCount)&&void 0!==i?i:"1"),e?.playState&&(t.animationPlayState=null!==(s=e?.playState)&&void 0!==s?s:"running"),t};(0,t.addFilter)("editor.BlockListBlock","blockify/with-animation-props",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r}=n,o=null!==(l=r?.animation)&&void 0!==l?l:{};if(!o||!Object?.keys(o)?.length)return(0,e.createElement)(t,{...n});const a=Q(o),i=n?.className?.trim()+" has-animation";n={...n,className:i};const s={...n?.wrapperProps,className:i,style:{...n?.wrapperProps?.style,...a}};return(0,e.createElement)(t,{...n,wrapperProps:s})}),"withAnimation")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-animation-styles",((e,t,n)=>{var l;const r=null!==(l=n?.animation)&&void 0!==l?l:{};if(!r||!Object?.keys(r)?.length)return e;e.className=e?.className?.trim()+" has-animation";const o=Q(r);return{...e,style:{...e?.style,...o}}}));const ee=({attributes:t,setAttributes:n})=>{var l,r,o,a,i,s,c,u;const m=null!==(l=t?.animation)&&void 0!==l?l:{};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,(0,A.__)("Animation","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>n({animation:{}}),icon:z,iconSize:16,"aria-label":(0,A.__)("Clear Animation","blockify")}))),(0,e.createElement)(B.Flex,{justify:"flex-end"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.Button,{variant:"secondary",isSmall:!0,icon:"running"===m?.playState?W:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",fill:"currentColor"},(0,e.createElement)("polygon",{points:"10,5 0,10 0,0"})),iconSize:10,onClick:()=>{n({animation:{...m,playState:"running"===m?.playState?"paused":"running"}})}},"running"===m?.playState?(0,A.__)("Pause","blockify"):(0,A.__)("Run","blockify"))))),(0,e.createElement)(B.PanelRow,{className:"blockify-animate-controls"},(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Effect","blockify"),value:null!==(r=m?.name)&&void 0!==r?r:"",options:X,onChange:e=>{var t;n({animation:{...m,name:e,duration:null!==(t=m?.duration)&&void 0!==t?t:1}})}}))),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Easing","blockify"),value:null!==(o=m?.timingFunction)&&void 0!==o?o:"",options:Z,onChange:e=>{n({animation:{...m,timingFunction:e}})}}))),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Event","blockify"),value:null!==(a=m?.event)&&void 0!==a?a:"enter",options:Y,onChange:e=>{n({animation:{...m,event:e,iterationCount:"-1"===("infinite"===e?"-1":m?.iterationCount)?"1":m?.iterationCount}})}})))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Duration","blockify"),value:null!==(i=m?.duration)&&void 0!==i?i:1,onChange:e=>{n({animation:{...m,duration:e}})},min:0,max:100,step:.1,shiftStep:10,allowReset:!0})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Delay","blockify"),value:null!==(s=m?.delay)&&void 0!==s?s:0,onChange:e=>{n({animation:{...m,delay:e}})},min:0,max:100,step:.1,shiftStep:10,allowReset:!0})),"infinite"!==m?.event&&(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Repeat","blockify"),value:"infinite"===m?.event?-1:null!==(c=m?.iterationCount)&&void 0!==c?c:1,onChange:e=>{n({animation:{...m,iterationCount:e}})},min:-1,max:100,step:1,allowReset:!0})),"scroll"===m?.event&&(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Offset","blockify"),value:parseInt(null!==(u=m?.offset)&&void 0!==u?u:"50"),onChange:e=>{n({animation:{...m,offset:e.toString()}})},min:-1,max:200,step:1,allowReset:!0})))))};(0,t.addFilter)("editor.BlockEdit","blockify/animation-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,isSelected:o,name:a}=n;return J(a)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),o&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=r?.animation)&&void 0!==l&&l,title:(0,A.__)("Animation","blockify")},(0,e.createElement)(ee,{...n})))):(0,e.createElement)(t,{...n})}),"withAnimation"));const te=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z"})),ne=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})),le={name:"group-grid",icon:(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})),title:(0,A.__)("Grid","blockify"),isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"design",scope:["inserter","transform","block"],description:(0,A.__)("Arrange blocks in a grid.","blockify"),attributes:{layout:{type:"flex",orientation:"grid"},style:{display:{all:"grid"},gridTemplateColumns:{all:"repeat(3,1fr)"},gridTemplateRows:{all:"repeat(3,1fr)"}}},isActive:e=>"grid"===e?.layout?.orientation};(0,h.registerBlockVariation)("core/group",le);const re=["grid","inline-grid"],oe=(t,n,l,r)=>{var o,a,i,s;const{attributes:c,setAttributes:u}=t,{style:m}=c,d=m?.gridTemplateColumns?.[n],p=m?.gridTemplateRows?.[n],f=d?d?.replace(/repeat\((\d+),1fr\)/,"$1"):"",y=p?p?.replace(/repeat\((\d+),1fr\)/,"$1"):"";return(0,e.createElement)(e.Fragment,null,l&&(0,e.createElement)(B.PanelRow,{className:"blockify-grid-controls"},(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Columns","blockify"),value:f,onChange:e=>{u({style:{...m,gridTemplateColumns:{...m?.gridTemplateColumns,[n]:e?"repeat("+e+",1fr)":""}}})},min:1,max:12,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Rows","blockify"),value:y,onChange:e=>{u({style:{...m,gridTemplateRows:{...m?.gridTemplateRows,[n]:e?"repeat("+e+",1fr)":""}}})},min:1,max:12,step:1})))),r&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,{className:"blockify-grid-controls"},(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Column Start","blockify"),value:null!==(o=m?.gridColumnStart?.[n])&&void 0!==o?o:"",onChange:e=>{u({style:{...m,gridColumnStart:{...m?.gridColumnStart,[n]:e}}})},min:1,max:12,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Column End","blockify"),value:null!==(a=m?.gridColumnEnd?.[n])&&void 0!==a?a:"",onChange:e=>{u({style:{...m,gridColumnEnd:{...m?.gridColumnEnd,[n]:e}}})},min:1,max:12,step:1})))),(0,e.createElement)(B.PanelRow,{className:"blockify-grid-controls"},(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Row Start","blockify"),value:null!==(i=m?.gridRowStart?.[n])&&void 0!==i?i:"",onChange:e=>{u({style:{...m,gridRowStart:{...m?.gridRowStart,[n]:e}}})},min:1,max:12,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Row End","blockify"),value:null!==(s=m?.gridRowEnd?.[n])&&void 0!==s?s:"",onChange:e=>{u({style:{...m,gridRowEnd:{...m?.gridRowEnd,[n]:e}}})},min:1,max:12,step:1}))))))},ae=t=>{var n,l;const{attributes:r,setAttributes:o,name:a,clientId:i}=t,[s,c]=(0,V.useState)("all"),{style:u}=r,m="core/group"===a&&(re.includes(u?.display?.all)||re.includes(u?.display?.mobile)||re.includes(u?.display?.desktop)),d=null!==(n=(0,S.select)("core/block-editor")?.getBlockParents(i))&&void 0!==n?n:[],p=d[d.length-1],f=null!==(l=(0,S.select)("core/block-editor")?.getBlockAttributes(p))&&void 0!==l?l:null,y=re.includes(f?.style?.display?.all)||re.includes(f?.style?.display?.mobile)||re.includes(f?.style?.display?.desktop);return m||y?(0,e.createElement)(B.PanelBody,{initialOpen:"grid"===r?.display?.all||"grid"===r?.display?.mobile||"grid"===r?.display?.desktop,title:(0,A.__)("Grid","blockify")},(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Grid","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{o({style:{...r?.style,gridTemplateColumns:"",gridTemplateRows:"",gridColumnStart:"",gridColumnEnd:"",gridRowStart:"",gridRowEnd:""}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Reset Grid","blockify")}))),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:"all"===s?"primary":"secondary",onClick:()=>c("all")},(0,A.__)("All","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"mobile"===s?"primary":"secondary",onClick:()=>c("mobile"),icon:te}),(0,e.createElement)(B.Button,{isSmall:!0,variant:"desktop"===s?"primary":"secondary",onClick:()=>c("desktop"),icon:ne}))),"all"===s&&oe(t,s,m,y),"mobile"===s&&oe(t,s,m,y),"desktop"===s&&oe(t,s,m,y)):(0,e.createElement)(e.Fragment,null)};var ie;(0,t.addFilter)("editor.BlockEdit","blockify/grid-controls",(0,l.createHigherOrderComponent)((t=>n=>{const{isSelected:l,attributes:r,name:o}=n;if(!ce(o))return(0,e.createElement)(t,{...n});const a="grid"===r?.layout?.orientation&&!r?.layout?.verticalAlignment;return(0,e.createElement)(e.Fragment,null,a&&(0,e.createElement)((()=>(0,e.createElement)("style",null,".has-display-grid{align-items:normal !important}")),null),(0,e.createElement)(t,{...n}),l&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(ae,{...n})))}),"withDisplay"));const se=null!==(ie=window?.blockify?.blockSupports)&&void 0!==ie?ie:{},ce=e=>{var t;return null!==(t=se?.[e]?.blockifyPosition)&&void 0!==t&&t},ue=t=>{var n,l,r;const{attributes:o,setAttributes:a,screen:i}=t,{style:s}=o;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,{className:"blockify-display-controls"},(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Display","blockify"),value:null!==(n=s?.display?.[i])&&void 0!==n?n:"",options:null!==(l=window?.blockify?.extensionOptions?.display?.options)&&void 0!==l?l:[],onChange:e=>{a({style:{...s,display:{...s?.display,[i]:e}}}),re.includes(e)?a({layout:{...o?.layout,type:"flex",flexWrap:"nowrap",orientation:"grid"}}):a({layout:{...o?.layout,orientation:"horizontal"}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Order","blockify"),value:null!==(r=s?.order?.[i])&&void 0!==r?r:"",onChange:e=>{a({style:{...s,order:{...s?.order,[i]:e}}})},min:-10,max:10,step:1,allowReset:!0}))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Width","blockify"),value:s?.width?.[i]?.includes("auto")?"":s?.width?.[i],units:w,onChange:e=>{a({style:{...s,width:{...s?.width,[i]:e?.includes("auto")?"auto":e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Min Width","blockify"),value:s?.minWidth?.[i],onChange:e=>{a({style:{...s,minWidth:{...s?.minWidth,[i]:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Max Width","blockify"),value:s?.maxWidth?.[i],onChange:e=>{a({style:{...s,maxWidth:{...s?.maxWidth,[i]:e}}})}})))))},me=t=>{const{attributes:n,setAttributes:l}=t,[r,o]=(0,V.useState)("all");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Display","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{l({style:{...n?.style,display:{},order:{},width:{},maxWidth:{}}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Reset Display","blockify")}))),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:"all"===r?"primary":"secondary",onClick:()=>o("all")},(0,A.__)("All","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"mobile"===r?"primary":"secondary",onClick:()=>o("mobile"),icon:te}),(0,e.createElement)(B.Button,{isSmall:!0,variant:"desktop"===r?"primary":"secondary",onClick:()=>o("desktop"),icon:ne}))),"all"===r&&(0,e.createElement)(ue,{...t,screen:r}),"mobile"===r&&(0,e.createElement)(ue,{...t,screen:r}),"desktop"===r&&(0,e.createElement)(ue,{...t,screen:r}))};var de;(0,t.addFilter)("editor.BlockEdit","blockify/display-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const{attributes:o,isSelected:a,name:i}=n;return ce(i)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),a&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=(null!==(r=o?.style?.display?.all?.length)&&void 0!==r?r:{})>0)&&void 0!==l&&l,title:(0,A.__)("Display","blockify")},(0,e.createElement)(me,{...n})))):(0,e.createElement)(t,{...n})}),"withDisplay")),(0,t.addFilter)("blocks.registerBlockType","blockify/content-limit-attributes",((e,t)=>("core/post-excerpt"===t&&(e={...e,attributes:{...e.attributes,defaultExcerpt:{type:"string"},hideReadMore:{type:"boolean"}}}),"core/post-content"===t&&(e={...e,attributes:{...e.attributes,contentLimit:{type:"number"}}}),e))),(0,t.addFilter)("editor.BlockEdit","blockify/with-content-limit-controls",(0,l.createHigherOrderComponent)((t=>n=>{const{attributes:l,setAttributes:r,name:o}=n;return"core/post-excerpt"!==o&&"core/post-content"!==o?(0,e.createElement)(t,{...n}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{title:(0,A.__)("Content","blockify")},"core/post-excerpt"===o&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.TextareaControl,{label:(0,A.__)("Default Content","blockify"),value:l.defaultExcerpt,onChange:e=>{r({defaultExcerpt:e})}})),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Hide Read More Link","blockify"),checked:l.hideReadMore,onChange:e=>{r({hideReadMore:e})}}))),"core/post-content"===o&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Content Limit","blockify"),help:(0,A.__)("Limit content to specific number of words.","blockify"),value:l?.contentLimit,onChange:e=>{r({contentLimit:e})}}))))),(0,e.createElement)(t,{...n}))}),"withContentLimitControls")),(0,t.addFilter)("editor.BlockListBlock","blockify/with-content-limit",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const{name:o,attributes:a}=n;if("core/post-excerpt"!==o)return(0,e.createElement)(t,{...n});if(!a?.hideReadMore)return(0,e.createElement)(t,{...n});const i=null!==(l=n.wrapperProps)&&void 0!==l?l:{},s="hide-read-more";return i.className=k(i?.className,s),(0,e.createElement)(t,{...n,className:(null!==(r=n?.className)&&void 0!==r?r:"")+" "+s,wrapperProps:i})}),"withContentLimit")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/content-limit-save",(e=>{const{name:t,attributes:n}=e;if("core/post-excerpt"===t&&n?.hideReadMore){const t="hide-read-more";e.className=a(e?.className,t,"")+" "+t}return e}));const pe=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyFilter)&&void 0!==t&&t},fe=null!==(de=window?.blockify?.filterOptions)&&void 0!==de?de:{};(0,t.addFilter)("blocks.registerBlockType","blockify/add-css-transform-attributes",((e,t)=>{var n;return pe(t)?(e.attributes={...e.attributes,style:{...null!==(n=e?.attributes?.style)&&void 0!==n?n:{},filter:{type:"string"}}},e):e}));const ye=e=>{let t="";return fe?.blur?(Object.keys(fe).forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(t+=" "+o(n)+"("+e[n]+fe?.[n]?.unit+")")})),t?{[e?.backdrop?"backdropFilter":"filter"]:t.trim()}:{}):{}};(0,t.addFilter)("editor.BlockListBlock","blockify/with-css-filter",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const o=null!==(l=n?.attributes?.style?.filter)&&void 0!==l?l:{},a=(0,e.createElement)(t,{...n});if(0===Object.getOwnPropertyNames(o).length)return a;const i=ye(o);if(!Object.keys(i).length)return a;const s={...(n={...n,style:{...null!==(r=n?.style)&&void 0!==r?r:{},...i}}).wrapperProps,style:{...n.wrapperProps?.style,...i}};return(0,e.createElement)(t,{...n,wrapperProps:s})}),"withCssFilter")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-filter-styles",((e,t,n)=>{var l;const r=null!==(l=n?.style?.filter)&&void 0!==l?l:{};if(0===Object.getOwnPropertyNames(r).length)return e;const o=ye(r);return Object.keys(o).length?{...e,style:{...e?.style,...o}}:e}));const he=t=>{const{attributes:n,setAttributes:l}=t,{style:o}=n;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Filter","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{l({style:{...n?.style,filter:{}}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Clear Filters","blockify")}))),(0,e.createElement)(B.PanelRow,{className:"blockify-filter-settings"},Object.keys(fe).map((t=>{var n,a;return(0,e.createElement)(B.__experimentalNumberControl,{key:t,label:"hueRotate"===t?(0,A.__)("Hue Rotate","blockify"):r(t),value:o?.filter?.[t],onChange:e=>{var n;l({style:{...o,filter:{...null!==(n=o?.filter)&&void 0!==n?n:{},[t]:e}}})},min:null!==(n=fe?.[t]?.min)&&void 0!==n?n:0,max:fe?.[t]?.max,step:null!==(a=fe?.[t]?.step)&&void 0!==a?a:1,allowReset:!0})}))),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Use as backdrop filter","blockify"),checked:o?.filter?.backdrop,onChange:e=>{l({style:{...o,filter:{...o?.filter,backdrop:e}}})}})))};(0,t.addFilter)("editor.BlockEdit","blockify/filter-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,isSelected:o,name:a}=n;return pe(a)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),o&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=r?.filter)&&void 0!==l&&l,title:(0,A.__)("Filter","blockify")},(0,e.createElement)(he,{...n})))):(0,e.createElement)(t,{...n})}),"withFilter"));const ge=e=>["core/image","core/post-featured-image",["blockify/image-compare"]].includes(e);(0,t.addFilter)("blocks.registerBlockType","blockify/image-attributes",((e,t)=>ge(t)?(e.attributes={...e.attributes,usePlaceholder:{type:"string"}},e?.attributes?.style||(e.attributes.style={type:"object"}),e):e));const be=(t,n)=>{var l;const{attributes:r,setAttributes:o}=t,{style:a}=r,[i,s]=(0,V.useState)(null!==(l=a?.height?.[n])&&void 0!==l?l:"");return(0,e.createElement)(B.PanelRow,{className:"blockify-image-controls blockify-display-controls"},(c=t?.name,["core/image","blockify/image-compare"].includes(c)&&(0,e.createElement)((()=>{var t,l,r,c,u,m;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Aspect Ratio","blockify"),value:null!==(t=a?.aspectRatio?.[n])&&void 0!==t?t:"",options:null!==(l=window?.blockify?.imageOptions?.aspectRatio?.options)&&void 0!==l?l:[],onChange:e=>{o({style:{...a,aspectRatio:{...a?.aspectRatio,[n]:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Height","blockify"),value:i?.[n]?.includes("auto")?"":i[n],onChange:e=>{s({...i,[n]:e?.includes("auto")?"":e}),o({style:{...a,height:{...a?.height,[n]:e?.includes("auto")?"auto":e}}})},min:0,step:1,units:w,allowReset:!0}))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Object Fit","blockify"),value:null!==(r=a?.objectFit?.[n])&&void 0!==r?r:"",placeholder:(0,A.__)("","blockify"),options:null!==(c=window?.blockify?.imageOptions?.objectFit?.options)&&void 0!==c?c:[],onChange:e=>{o({style:{...a,objectFit:{...a?.objectFit,[n]:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Object Position","blockify"),value:null!==(u=a?.objectPosition?.[n])&&void 0!==u?u:"",placeholder:(0,A.__)("","blockify"),options:null!==(m=window?.blockify?.imageOptions?.objectPosition?.options)&&void 0!==m?m:[],onChange:e=>{o({style:{...a,objectPosition:{...a?.objectPosition,[n]:e}}})}}))))}),null)),(0,e.createElement)(R,{style:{marginTop:"0"}},(0,A.__)("Placeholder Image","blockify")),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:r?.usePlaceholder&&"default"!==r?.usePlaceholder?"secondary":"primary",onClick:()=>{o({usePlaceholder:"default"})}},(0,A.__)("Default","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"none"===r?.usePlaceholder?"primary":"secondary",onClick:()=>{o({usePlaceholder:"none"})}},(0,A.__)("None","blockify")))));var c},ve=t=>{const{attributes:n,setAttributes:l,name:r}=t;if(!ge(r))return(0,e.createElement)(e.Fragment,null);const[o,a]=(0,V.useState)("all");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Image","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{l({style:{...n?.style,objectFit:null,objectPosition:null,aspectRatio:null,height:null}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Reset Image","blockify")}))),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:"all"===o?"primary":"secondary",onClick:()=>a("all")},(0,A.__)("All","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"mobile"===o?"primary":"secondary",onClick:()=>a("mobile"),icon:te}),(0,e.createElement)(B.Button,{isSmall:!0,variant:"desktop"===o?"primary":"secondary",onClick:()=>a("desktop"),icon:ne}))),"all"===o&&be(t,o),"mobile"===o&&be(t,o),"desktop"===o&&be(t,o))};(0,t.addFilter)("editor.BlockEdit","blockify/image-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,isSelected:o,name:a}=n;return ge(a)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),o&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=r?.image)&&void 0!==l&&l,title:(0,A.__)("Image","blockify")},(0,e.createElement)(ve,{...n})))):(0,e.createElement)(t,{...n})}),"withImage")),(0,t.addFilter)("editor.BlockListBlock","blockify/image-attribute",(0,l.createHigherOrderComponent)((t=>n=>{var l,r,o,a,i,s,c,u,m,d,p,f,y,h,g,b,v;const{attributes:k,name:w}=n;if(!ge(w))return(0,e.createElement)(t,{...n});const E=null!==(l=n?.className?.split(" "))&&void 0!==l?l:[];E.push("is-placeholder"),E.push("has-placeholder-icon");const x=null!==(r=k?.style?.aspectRatio)&&void 0!==r?r:{},_=null!==(o=null!==(a=null!==(i=x?.all)&&void 0!==i?i:x?.desktop)&&void 0!==a?a:x?.mobile)&&void 0!==o?o:"";var C;_&&(E.forEach((e=>{e.includes("has-aspect-ratio-")&&E.splice(E.indexOf(e),1)})),E.push(`has-aspect-ratio-${_}`),n={...n,className:null!==(C=E?.join(" "))&&void 0!==C?C:""});const S=null!==(s=k?.style?.objectFit)&&void 0!==s?s:{},F=null!==(c=null!==(u=null!==(m=S?.all)&&void 0!==m?m:S?.desktop)&&void 0!==u?u:S?.mobile)&&void 0!==c?c:"";var P;F&&(E.forEach((e=>{e.includes("has-object-fit-")&&E.splice(E.indexOf(e),1)})),E.push(`has-object-fit-${F}`),n={...n,className:null!==(P=E?.join(" "))&&void 0!==P?P:""});const N=null!==(d=k?.style?.objectPosition)&&void 0!==d?d:{},O=null!==(p=null!==(f=null!==(y=N?.all)&&void 0!==y?y:N?.desktop)&&void 0!==f?f:N?.mobile)&&void 0!==p?p:"";var I;O&&(E.forEach((e=>{e.includes("has-object-position-")&&E.splice(E.indexOf(e),1)})),E.push(`has-object-position-${O}`),n={...n,className:null!==(I=E?.join(" "))&&void 0!==I?I:""});const T=null!==(h=k?.style?.height)&&void 0!==h?h:{},B=null!==(g=null!==(b=null!==(v=T?.all)&&void 0!==v?v:T?.desktop)&&void 0!==b?b:T?.mobile)&&void 0!==g?g:"";if(B){var A;const e=null!==(A=n?.style)&&void 0!==A?A:{};e.height=B,n={...n,style:e}}return(0,e.createElement)(t,{...n})}),"withImageAttribute"));const ke=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyInlineCss)&&void 0!==t&&t};var we;(0,t.addFilter)("blocks.registerBlockType","blockify/add-inline-css-attribute",((e,t)=>ke(t)?(e.attributes={...e.attributes,inlineCss:{type:"string"}},e):e),0),(0,t.addFilter)("editor.BlockEdit","blockify/with-inline-css-attribute",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,setAttributes:o,name:a}=n;if(!ke(a))return(0,e.createElement)(t,{...n});const i=(0,S.useSelect)((e=>{const t=e("core")?.getCurrentUser(),n=e("core")?.getUser(t?.id);return n?.roles}),[]);return i?.includes("administrator")?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorAdvancedControls,null,(0,e.createElement)(G,{code:null!==(l=r?.inlineCss)&&void 0!==l?l:"",language:"css",onChange:e=>{o({inlineCss:e})},title:(0,A.__)("Edit Inline CSS","blockify"),description:(0,A.__)("Add custom CSS to this block.","blockify")}))):(0,e.createElement)(t,{...n})}),"inlineCssAttribute"),99);const Ee=null!==(we=window?.blockify?.blockSupports)&&void 0!==we?we:{};(0,t.addFilter)("editor.BlockEdit","blockify/with-negative-margin",(0,l.createHigherOrderComponent)((t=>n=>{if(l=n?.name,null!==(r=Ee?.[l]?.blockifyNegativeMargin)&&void 0!==r&&r){const e=document.querySelector('.components-input-control__input[min="0"]');e&&e.setAttribute("min","-999")}var l,r;return(0,e.createElement)(t,{...n})}),"withMinHeightSettings"));const xe=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyOnclick)&&void 0!==t&&t};var _e;(0,t.addFilter)("blocks.registerBlockType","blockify/add-onclick-attribute",((e,t)=>xe(t)?(e.attributes={...e.attributes,onclick:{type:"string"}},e):e),0),(0,t.addFilter)("editor.BlockEdit","blockify/with-onclick-attribute",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,setAttributes:o,name:a}=n;if(!xe(a))return(0,e.createElement)(t,{...n});const i=(0,S.useSelect)((e=>{const t=e("core")?.getCurrentUser(),n=e("core")?.getUser(t?.id);return n?.roles}),[]);return i?.includes("administrator")?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorAdvancedControls,null,(0,e.createElement)(G,{code:null!==(l=r?.onclick)&&void 0!==l?l:"",language:"js",onChange:e=>{o({onclick:e})},title:(0,A.__)("Edit On-Click Event","blockify"),description:(0,A.__)("Add custom JavaScript to the onclick event for this block.","blockify")}))):(0,e.createElement)(t,{...n})}),"onclickAttribute"),99);const Ce=null!==(_e=window?.blockify?.blockSupports)&&void 0!==_e?_e:{},Se=(t,n)=>{var l,r,o,a,i,s,c,u;const{attributes:m,setAttributes:d}=t,p=null!==(l=m?.style)&&void 0!==l?l:{},f=e=>{const t={};Object.keys(e).forEach((l=>{t[l]={...p?.[l],[n]:e[l]}})),d({style:{...p,...t}})};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Position","blockify"),value:null!==(r=p?.position?.[n])&&void 0!==r?r:"",options:window?.blockify?.extensionOptions?.position?.options,onChange:e=>{f({position:e})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:window?.blockify?.extensionOptions?.zIndex?.label,value:p?.zIndex?.[n],onChange:e=>{f({zIndex:e})},min:-100,max:100,step:1,allowReset:!0})))),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Overflow","blockify"),value:null!==(o=p?.overflow?.[n])&&void 0!==o?o:"",options:window?.blockify?.extensionOptions?.overflow?.options,onChange:e=>{f({overflow:e})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Pointer Events","blockify"),value:null!==(a=p?.pointerEvents?.[n])&&void 0!==a?a:"",options:window?.blockify?.extensionOptions?.pointerEvents?.options,onChange:e=>{f({pointerEvents:e})}})))),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.__experimentalBoxControl,{className:"blockify-box-control",label:(0,A.__)("Inset","blockify"),values:{top:null!==(i=p?.top?.[n])&&void 0!==i?i:"",right:null!==(s=p?.right?.[n])&&void 0!==s?s:"",bottom:null!==(c=p?.bottom?.[n])&&void 0!==c?c:"",left:null!==(u=p?.left?.[n])&&void 0!==u?u:""},onChange:e=>{var t,n,l,r;f({top:null!==(t=e?.top)&&void 0!==t?t:"",right:null!==(n=e?.right)&&void 0!==n?n:"",bottom:null!==(l=e?.bottom)&&void 0!==l?l:"",left:null!==(r=e?.left)&&void 0!==r?r:""})},inputProps:{min:-999}})))},Fe=t=>{const{attributes:n,setAttributes:l}=t,[r,o]=(0,V.useState)("all");return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,(0,A.__)("Position","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{l({style:{...n?.style,position:"",zIndex:"",top:"",right:"",bottom:"",left:""}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Reset Position","blockify")}))),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{isSmall:!0,variant:"all"===r?"primary":"tertiary",onClick:()=>o("all")},(0,A.__)("All","blockify")),(0,e.createElement)(B.Button,{isSmall:!0,variant:"mobile"===r?"primary":"tertiary",onClick:()=>o("mobile"),icon:te}),(0,e.createElement)(B.Button,{isSmall:!0,variant:"desktop"===r?"primary":"tertiary",onClick:()=>o("desktop"),icon:ne}))),"all"===r&&Se(t,r),"mobile"===r&&Se(t,r),"desktop"===r&&Se(t,r))};(0,t.addFilter)("editor.BlockEdit","blockify/position-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,isSelected:o,name:a}=n;return(e=>{var t;return null!==(t=Ce?.[e]?.blockifyPosition)&&void 0!==t&&t})(a)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),o&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=r?.position)&&void 0!==l&&l,title:(0,A.__)("Position","blockify")},(0,e.createElement)(Fe,{...n})))):(0,e.createElement)(t,{...n})}),"withPosition")),(0,t.addFilter)("editor.BlockListBlock","blockify/with-block-gap",(0,l.createHigherOrderComponent)((t=>n=>{var l;if("core/post-template"!==n?.name)return(0,e.createElement)(t,{...n});if(!n?.attributes?.style?.spacing?.blockGap)return(0,e.createElement)(t,{...n});const r=null!==(l=n.wrapperProps)&&void 0!==l?l:{};return r.style={...r.style,"--wp--style--block-gap":v(n.attributes.style.spacing.blockGap)},(0,e.createElement)(t,{...n,wrapperProps:r})}),"withBlockGap")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-block-gap",((e,t,n)=>("core/post-template"===t&&n?.style?.spacing?.blockGap&&(e={...e,style:{...e.style,"--wp--style--block-gap":v(n.style.spacing.blockGap)}}),e))),B.ColorPalette.Color;const Pe=e=>{var t,n;const l=(null!==(t=(0,S.select)("core/block-editor")?.getSettings().colors)&&void 0!==t?t:[]).find((t=>t.slug===e));return null!==(n=l?.color)&&void 0!==n?n:""};(0,t.addFilter)("blocks.registerBlockType","blockify/search-input-colors",((e,t)=>("core/search"!==t||(e.attributes={...e.attributes,inputBackgroundColor:{type:"string"}}),e))),(0,t.addFilter)("editor.BlockEdit","blockify/search-input-colors",(0,l.createHigherOrderComponent)((t=>n=>{const l=(0,e.createElement)(t,{...n}),r=(0,U.__experimentalUseMultipleOriginColorsAndGradients)();if("core/search"!==n.name)return l;const{attributes:o,setAttributes:a,clientId:i}=n,{inputBackgroundColor:s}=o,c=[{label:(0,A.__)("Input Background","blockify"),colorValue:"string"==typeof s&&s?.includes("-")?Pe(s):s,onColorChange:e=>{const t=(e=>{var t,n;const l=(null!==(t=(0,S.select)("core/block-editor")?.getSettings().colors)&&void 0!==t?t:[]).find((t=>t.color===e));return null!==(n=l?.slug)&&void 0!==n?n:""})(e);a({inputBackgroundColor:t||e})}}];return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorControls,{group:"color"},(0,e.createElement)(U.__experimentalColorGradientSettingsDropdown,{settings:c,panelId:i,hasColorsOrGradients:!0,disableCustomColors:!1,__experimentalIsRenderedInSidebar:!0,...r})))}),"withSearchInputColors")),(0,t.addFilter)("editor.BlockListBlock","blockify/search-input-colors",(0,l.createHigherOrderComponent)((t=>n=>{const l=(0,e.createElement)(t,{...n});if("core/search"!==n.name)return l;const{attributes:r,wrapperProps:o={}}=n,{inputBackgroundColor:a,borderColor:i}=r;if(a){const e=a?.includes("-")?`var(--wp--preset--color--${a})`:a;o.style={...o.style,"--wp--custom--input--background":e}}if(i){const e=i?.includes("-")?`var(--wp--preset--color--${i})`:i;o.style={...o.style,"--wp--custom--input--border":`var(--wp--custom--border--width,1px) var(--wp--custom--border--style,solid) ${e}`}}return(0,e.createElement)(t,{...n,wrapperProps:o})}),"withSearchInputColors")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/search-input-colors",((e,t,n)=>{if("core/search"!==t.name)return e;const{inputBackgroundColor:l}=n;if(l){const t=l?.includes("-")?`var(--wp--preset--color--${l})`:l;e.style={...e.style,"--wp--custom--input--background":t}}return e}));const Ne=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyBoxShadow)&&void 0!==t&&t};(0,t.addFilter)("blocks.registerBlockType","blockify/add-box-shadow-attributes",((e,t)=>{var n;return Ne(t)&&(e.attributes={...e.attributes,shadowPreset:{type:"string"},shadowPresetHover:{type:"string"},useCustomBoxShadow:{type:"boolean"},style:{...null!==(n=e?.attributes?.style)&&void 0!==n?n:{},boxShadow:{type:"object"}}}),e}),0);const Oe=e=>{var t;const n=null!==(t=e?.style?.boxShadow)&&void 0!==t?t:{},l={},r=((0,S.select)("core/block-editor").getSettings().colors,{inset:"",x:"px",y:"px",blur:"px",spread:"px",color:""});return Object.keys(r).map((e=>((n?.[e]||"0"===n?.[e]?.toString())&&(l["--wp--custom--box-shadow--"+e]=n?.[e]+r?.[e]),(n?.hover?.[e]||"0"===n?.hover?.[e]?.toString())&&(l["--wp--custom--box-shadow--hover--"+e]=n?.hover?.[e]+r?.[e]),!0))),l};(0,t.addFilter)("editor.BlockListBlock","blockify/edit-box-shadow-styles",(0,l.createHigherOrderComponent)((t=>n=>{const{attributes:l,name:r}=n;if(!Ne(r))return(0,e.createElement)(t,{...n});const o=Oe(l),a=l?.shadowPreset||l?.shadowPresetHover;if(!a&&!Object.keys(o).length)return(0,e.createElement)(t,{...n});const i={...n.wrapperProps};let s=n.className;return s=k(s,i.className),s=k(s,"has-box-shadow"),a&&(s=k(s,"has-shadow").replace("has-box-shadow","")),l?.shadowPreset&&(s=k(s,`has-${l.shadowPreset}-shadow`)),l?.shadowPresetHover&&(s=k(s,`has-${l.shadowPresetHover}-shadow-hover`)),n={...n,className:k(n?.className,s),style:{...n.style,...o}},i.className=s,i.style={...i.style,...o},(0,e.createElement)(t,{...n,wrapperProps:i})}),"withBoxShadow")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/save-box-shadow-styles",((e,t,n)=>{const{name:l}=t;if(!Ne(l))return e;const r=Oe(n),o=n?.shadowPreset||n?.shadowPresetHover;if(!o&&!Object.keys(r).length)return e;let a=k(e?.className,"has-box-shadow");return o&&(a=k(a,"has-shadow").replace("has-box-shadow","")),n?.shadowPreset&&(a=k(a,`has-${n.shadowPreset}-shadow`)),n?.shadowPresetHover&&(a=k(a,`has-${n.shadowPresetHover}-shadow-hover`)),{...e,style:{...e.style,...r},className:a}}));const Ie=t=>{var n;return(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(n=t?.attributes?.shadow)&&void 0!==n&&n,title:(0,A.__)("Shadow","blockify")},(0,e.createElement)(K,{...t})))};var Te;(0,t.addFilter)("editor.BlockEdit","blockify/shadow-controls",(0,l.createHigherOrderComponent)((t=>n=>{const{isSelected:l,name:r}=n;return Ne(r)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),l&&(0,e.createElement)(Ie,{...n})):(0,e.createElement)(t,{...n})}),"withShadow"));const Be=null!==(Te=window?.blockify?.blockSupports)&&void 0!==Te?Te:{},Ae=e=>{var t;return null!==(t=Be?.[e]?.blockifySize)&&void 0!==t&&t},je=t=>{const{attributes:n,setAttributes:l}=t,{size:r}=n,o=[{key:"large",label:(0,A.__)("Large","blockify")},{key:"medium",label:(0,A.__)("Medium","blockify")},{key:"small",label:(0,A.__)("Small","blockify")}];return(0,e.createElement)(U.BlockControls,null,(0,e.createElement)(B.ToolbarGroup,null,(0,e.createElement)(B.DropdownMenu,{icon:(0,e.createElement)("span",null,(0,A.__)("Size","blockify")),label:(0,A.__)("Switch Size","blockify")},(({onClose:t})=>(0,e.createElement)(B.MenuGroup,null,o.map((n=>(0,e.createElement)(B.MenuItem,{key:n.key,icon:r===n.key?"yes":"",onClick:()=>{if(r===n.key)return l({size:""}),void t();l({size:n.key}),t()}},n.label))))))))};(0,t.addFilter)("blocks.registerBlockType","blockify/add-size-attribute",(e=>(e?.attributes&&Ae(e?.name)&&(e.attributes={...e.attributes,size:{type:"string",default:"20px"}}),e))),(0,t.addFilter)("editor.BlockEdit","blockify/add-size-block-controls",(0,l.createHigherOrderComponent)((t=>n=>{const{name:l,isSelected:r}=n;return Ae(l)?(0,e.createElement)(V.Fragment,null,r&&(0,e.createElement)(je,{...n}),(0,e.createElement)(t,{...n})):(0,e.createElement)(t,{...n})}),"addSizeBlockControls")),(0,t.addFilter)("editor.BlockListBlock","blockify/with-size",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const{name:o,attributes:a}=n;if(!Ae(o))return(0,e.createElement)(t,{...n});if(!a?.size)return(0,e.createElement)(t,{...n});const i=null!==(l=n.wrapperProps)&&void 0!==l?l:{},s="is-style-"+a.size;return i.className=k(i?.className,s),(0,e.createElement)(t,{...n,className:(null!==(r=n?.className)&&void 0!==r?r:"")+" "+s,wrapperProps:i})}),"withSizeClass")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/size-save",(e=>{const{name:t,attributes:n}=e;if(Ae(t)&&n?.size){const t="is-style-"+n.size;e.className=a(e?.className,t,"")+" "+t}return e}));const ze=e=>{var t;return null!==(t=window?.blockify?.blockSupports?.[e]?.blockifyTransform)&&void 0!==t&&t},Re={rotate:"deg",rotateX:"deg",rotateY:"deg",scale:"",scaleX:"",scaleY:"",skew:"deg",skewX:"deg",skewY:"deg",translateX:"",translateY:"",translateZ:""};(0,t.addFilter)("blocks.registerBlockType","blockify/add-css-transform-attributes",((e,t)=>{var n;return ze(t)?(e.attributes={...e.attributes,style:{...null!==(n=e?.attributes?.style)&&void 0!==n?n:{},transform:{type:"string"}}},e):e}));const Me=e=>{let t="";return Object.keys(Re).forEach((n=>{if(e?.[n]){const l=e[n];t+=` ${n}(${l}${Re[n]})`}})),t?{transform:t.trim()}:{}};(0,t.addFilter)("editor.BlockListBlock","blockify/with-css-transform",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,name:o}=n,a=(0,e.createElement)(t,{...n});if(!ze(o))return a;const{style:i}=r,s=null!==(l=i?.transform)&&void 0!==l?l:{};if(!s)return a;const c=Me(s);if(!Object.keys(c).length)return a;const u={...(n={...n,style:{...n?.style,...c}}).wrapperProps,style:{...n.wrapperProps?.style,...c}};return(0,e.createElement)(t,{...n,wrapperProps:u})}),"withCssTransform")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/apply-css-transform-styles",((e,t,n)=>{var l;const{name:r}=t;if(!ze(r))return e;const{style:o}=n,a=null!==(l=o?.transform)&&void 0!==l?l:{};if(!a)return e;const i=Me(a);return Object.keys(i).length?{...e,style:{...e?.style,...i}}:e}));const De=t=>{var n;const{attributes:l,setAttributes:r}=t,{style:o}=l,a=null!==(n=o?.transform)&&void 0!==n?n:{};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(R,null,(0,e.createElement)(e.Fragment,null,(0,A.__)("Transform","blockify"),(0,e.createElement)(B.Button,{isSmall:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{r({style:{...l?.style,transform:""}})},icon:z,iconSize:16,"aria-label":(0,A.__)("Clear Transforms","blockify")})))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Rotate","blockify"),value:a?.rotate,onChange:e=>{r({style:{...o,transform:{...a,rotate:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Rotate X","blockify"),value:a?.rotateX,onChange:e=>{r({style:{...o,transform:{...a,rotateX:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Rotate Y","blockify"),value:a?.rotateY,onChange:e=>{r({style:{...o,transform:{...a,rotateY:e}}})},min:-360,max:360,step:1}))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Scale","blockify"),value:a?.scale,onChange:e=>{r({style:{...o,transform:{...a,scale:e}}})},min:0,max:10,step:.1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Scale X","blockify"),value:a?.scaleX,onChange:e=>{r({style:{...o,transform:{...a,scaleX:e}}})},min:0,max:10,step:.1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Scale Y","blockify"),value:a?.scaleY,onChange:e=>{r({style:{...o,transform:{...a,scaleY:e}}})},min:0,max:10,step:.1}))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Skew","blockify"),value:a?.skew,onChange:e=>{r({style:{...o,transform:{...a,skew:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Skew X","blockify"),value:a?.skewX,onChange:e=>{r({style:{...o,transform:{...a,skewX:e}}})},min:-360,max:360,step:1})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Skew Y","blockify"),value:a?.skewY,onChange:e=>{r({style:{...o,transform:{...a,skewY:e}}})},min:-360,max:360,step:1}))),(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Translate X","blockify"),value:a?.translateX,onChange:e=>{r({style:{...o,transform:{...a,translateX:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Translate Y","blockify"),value:a?.translateY,onChange:e=>{r({style:{...o,transform:{...a,translateY:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Translate Z","blockify"),value:a?.translateZ,onChange:e=>{r({style:{...o,transform:{...a,translateZ:e}}})}}))),(0,e.createElement)("br",null))};(0,t.addFilter)("editor.BlockEdit","blockify/transform-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,isSelected:o,name:a}=n;return ze(a)?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),o&&(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{initialOpen:null!==(l=r?.transform)&&void 0!==l&&l,title:(0,A.__)("Transform","blockify")},(0,e.createElement)(De,{...n})))):(0,e.createElement)(t,{...n})}),"withTransform"));const Le=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));(0,h.registerBlockVariation)("core/list",{name:"accordion",title:(0,A.__)("Accordion","blockify"),description:(0,A.__)("Add a collapsible accordion list.","blockify"),category:window?.blockify?.isPlugin?"blockify":"text",scope:[],icon:Le,attributes:{className:"is-style-accordion"},isDefault:!1,isActive:(e,t)=>e&&e?.className?.includes(t.className)});const He=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z"})),Ve={content:(0,A.__)("Curved text. Curved text. Curved text.","blockify"),containerSize:"160",pathSize:"120"},$e={name:"curved-text",title:(0,A.__)("Curved Text","blockify"),icon:He,isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"text",scope:["inserter","transform","block"],description:(0,A.__)("Insert curved text around circular SVG path.","blockify"),attributes:{className:"is-style-curved-text"},isActive:e=>e?.className?.includes("is-style-curved-text")};y()((()=>{(0,h.registerBlockVariation)("core/paragraph",$e)})),(0,t.addFilter)("blocks.registerBlockType","blockify/curved-text-attributes",((e,t)=>("core/paragraph"===t&&(e={...e,attributes:{...e?.attributes,curvedText:{type:"object"}}}),e)));const Ge=(t={})=>{var n,l,r;const{curvedText:o=Ve}=t,a=null!==(n=o?.content)&&void 0!==n?n:Ve.content,i=null!==(l=o?.containerSize)&&void 0!==l?l:Ve.containerSize,s=null!==(r=o?.pathSize)&&void 0!==r?r:Ve.pathSize,c=parseInt(i)/2,u=parseInt(s)/2,m={viewBox:`0 0 ${i} ${i}`,xmlns:"http://www.w3.org/2000/svg",enableBackground:`new 0 0 ${i} ${i}`,xmlSpace:"preserve",width:i,height:i,contentEditable:!1,x:0,y:0},d=Date.now()+Math.random(),p={id:"circle-"+d,d:`M ${c}, ${c} m -${u}, 0 a ${u},${u} 0 0,1 ${s},0 a ${u},${u} 0 0,1 -${s},0`,fill:"transparent"};return(0,e.createElement)("svg",{...m},(0,e.createElement)("path",{...p}," "),(0,e.createElement)("text",{fill:"currentColor"},(0,e.createElement)("textPath",{xlinkHref:"#circle-"+d},a)))};(0,t.addFilter)("editor.BlockEdit","blockify/with-curved-text-css",(0,l.createHigherOrderComponent)((t=>n=>{var l,r,o;const{attributes:a,setAttributes:i}=n;if(!(e=>!(!e?.className||"string"!=typeof e?.className)&&e?.className?.includes("is-style-curved-text"))(a))return(0,e.createElement)(t,{...n});const s=document.getElementsByClassName("edit-site-visual-editor__editor-canvas")?.item(0),c=document.getElementsByName("editor-canvas")?.item(0);let u;if(u=s?s.contentDocument:c?c.contentDocument:document,!u)return(0,e.createElement)(t,{...n});const m=u?.getElementById("block-"+n?.clientId);m&&(m.innerHTML=(0,V.renderToString)(Ge({...a,clientId:n.clientId})));const{curvedText:d=Ve}=a,p=t=>{var l;const r={...t,svgString:(0,V.renderToString)((0,e.createElement)(Ge,{...a,...t,clientId:null!==(l=n.clientId)&&void 0!==l?l:"1"}))};i({curvedText:{...d,...r}})};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{className:"blockify-controls",title:(0,A.__)("Curved Text","blockify")},(0,e.createElement)(B.TextareaControl,{label:(0,A.__)("Content","blockify"),value:null!==(l=d?.content)&&void 0!==l?l:Ve.content,onChange:e=>{p({content:e})}}),(0,e.createElement)("p",null,(0,A.__)("Size","blockify")),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)("br",null),(0,e.createElement)(B.Flex,null,(0,e.createElement)(B.FlexItem,{style:{width:"50%"}},(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Container","blockify"),value:null!==(r=d?.containerSize)&&void 0!==r?r:Ve.containerSize,onChange:e=>{p({containerSize:e})}})),(0,e.createElement)(B.FlexBlock,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Path","blockify"),value:null!==(o=d?.pathSize)&&void 0!==o?o:Ve.pathSize,onChange:e=>{p({pathSize:e})}})))))))}),"withCurvedTextSettings"),1);const We=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})),Ue={start:"0",end:"100",duration:"2",delay:"0",prefix:"",suffix:""},qe={name:"counter",title:(0,A.__)("Counter","blockify"),keywords:["counter","number","count","stats"],icon:We,isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"text",scope:["inserter"],description:(0,A.__)("Insert counter animation.","blockify"),attributes:{className:"is-style-counter"},isActive:e=>e&&e?.className?.includes("is-style-counter")};y()((()=>{(0,h.registerBlockVariation)("core/paragraph",qe)})),(0,t.addFilter)("editor.BlockEdit","blockify/with-counter-controls",(0,l.createHigherOrderComponent)((t=>n=>{const{attributes:l,setAttributes:r}=n,o=(0,e.createElement)(t,{...n});if(!l?.className?.includes("is-style-counter"))return o;const{style:a}=l;let i=Ue;return a?.counter?i=a.counter:r({style:{...a,counter:Ue}}),(0,V.useEffect)((()=>{if(!i?.prefix&&!i?.end&&!i?.suffix)return;let e=i?.end;"string"==typeof i?.prefix&&(e=i?.prefix+e),"string"==typeof i?.suffix&&(e+=i?.suffix),r({content:e})}),[i?.prefix,i?.end,i?.suffix,r]),(0,e.createElement)(e.Fragment,null,o,(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{title:(0,A.__)("Counter Settings","blockify"),initialOpen:!0,className:"blockify-counter-settings"},(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Start","blockify"),value:i?.start,onChange:e=>{r({style:{...a,counter:{...i,start:e}}})},step:1,shiftStep:10,isDragEnabled:!0,isShiftStepEnabled:!0})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("End","blockify"),value:i?.end,onChange:e=>{r({style:{...a,counter:{...i,end:e}}})},step:1,shiftStep:10,isDragEnabled:!0,isShiftStepEnabled:!0})))),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Duration (seconds)","blockify"),value:i?.duration,onChange:e=>{r({style:{...a,counter:{...i,duration:e}}})},step:.1,shiftStep:1,isDragEnabled:!0,isShiftStepEnabled:!0})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalNumberControl,{label:(0,A.__)("Delay (seconds)","blockify"),value:i?.delay,onChange:e=>{r({style:{...a,counter:{...i,delay:e}}})},step:.1,shiftStep:1,isDragEnabled:!0,isShiftStepEnabled:!0})))),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{className:"blockify-flex-controls"},(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.TextControl,{label:(0,A.__)("Prefix","blockify"),value:i?.prefix,onChange:e=>{r({style:{...a,counter:{...i,prefix:e}}})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.TextControl,{label:(0,A.__)("Suffix","blockify"),value:i?.suffix,onChange:e=>{r({style:{...a,counter:{...i,suffix:e}}})}})))))))}),"withCounterControls"),9);const Ke=(0,e.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(j.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),Ze={name:"image",title:(0,A.__)("Image","blockify"),icon:Ke,isDefault:!0,category:"media",scope:["inserter","transform","block"],description:(0,A.__)("Insert an image to make a visual statement.","blockify"),attributes:{className:""},isActive:e=>!e?.className||!e?.className?.includes("is-style-icon")&&!e?.className?.includes("is-style-svg")};(0,h.registerBlockVariation)("core/image",Ze);const Xe=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})),Ye=e=>{var t,n,l;const r={};let o="";const a=e?.className?.includes("is-style-icon");if(!(e?.iconSet&&e?.iconName||a))return r;e?.style?.color?.background&&(o=e.style.color.background),e?.backgroundColor&&(o="var(--wp--preset--color--"+e.backgroundColor+", currentColor)"),"start"===e?.iconPosition&&(r["--wp--custom--icon--order"]="-1");let i="";e?.style?.color?.gradient&&(i=e?.style?.color?.gradient),e?.gradient&&(i="var(--wp--preset--gradient--"+e.gradient+",currentColor)");let s="";if(e?.style?.color?.text&&(s=e?.style?.color?.text),e?.textColor&&(s="var(--wp--preset--color--"+e.textColor+",currentColor)"),""!==o&&(r["--wp--custom--icon--background"]=o),s?(r["--wp--custom--icon--color"]=s,i&&(r["--wp--custom--icon--background"]=i)):i&&(r["--wp--custom--icon--color"]=i),e?.style?.spacing?.padding){var c,u,m,d;const t=e.style.spacing.padding,n={top:null!==(c=t?.top)&&void 0!==c?c:"0",right:null!==(u=t?.right)&&void 0!==u?u:"0",bottom:null!==(m=t?.bottom)&&void 0!==m?m:"0",left:null!==(d=t?.left)&&void 0!==d?d:"0"};Object.keys(n).forEach((e=>{var t;const l=null!==(t=n?.[e])&&void 0!==t?t:"";l&&l?.includes("var:preset")&&(n[e]="var(--wp--preset--spacing--"+l.replace("var:preset|spacing|","")+")")})),r["--wp--custom--icon--padding"]=Object.values(n).join(" ")}if(e?.style?.spacing?.margin){var p,f,y,h;const t=e.style.spacing.margin,n={top:null!==(p=t?.top)&&void 0!==p?p:"",right:null!==(f=t?.right)&&void 0!==f?f:"",bottom:null!==(y=t?.bottom)&&void 0!==y?y:"",left:null!==(h=t?.left)&&void 0!==h?h:""};Object.keys(n).forEach((e=>{var t;const l=null!==(t=n?.[e])&&void 0!==t?t:"";l?.includes("var:preset")&&(n[e]="var(--wp--preset--spacing--"+l?.replace("var:preset|spacing|","")+")")})),r["--wp--custom--icon--margin"]=Object.values(n).join(" ")}let g="";var b,v;e?.borderColor&&(g="var(--wp--preset--color--"+e?.borderColor+")"),e?.style?.border?.width&&(r["--wp--custom--icon--border-width"]=e.style.border.width,r["--wp--custom--icon--border-style"]=null!==(b=e.style.border?.style)&&void 0!==b?b:"solid",r["--wp--custom--icon--border-color"]=null!==(v=e.style.border?.color)&&void 0!==v?v:g);let k=null!==(t=e?.iconSize)&&void 0!==t?t:"";if(""!==k){const e=["px","em","rem","vh","vw","%"].some((e=>k?.includes(e)));k=e?k:k+"px",r["--wp--custom--icon--size"]=k}const w=(null!==(n=e?.iconCustomSVG)&&void 0!==n?n:"")?.replace('"',"'"),E=w&&w?.includes("["core/image","core/button","blockify/tab"].includes(e),nt=null!==(et=window?.blockify?.defaultIcon)&&void 0!==et?et:{set:"wordpress",name:"star-empty",string:' '},lt={iconSet:{type:"string",default:nt.set},iconName:{type:"string",default:nt.name},iconColor:{type:"string"},iconGradient:{type:"string"},iconSize:{type:"string"},iconPosition:{type:"string"},iconCustomSVG:{type:"string"},iconSvgString:{type:"string",default:nt.string}},rt={name:"icon",icon:Xe,title:(0,A.__)("Icon","blockify"),isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"media",scope:["inserter","transform","block"],description:(0,A.__)("Insert a customizable SVG icon.","blockify"),attributes:{className:"is-style-icon",iconSet:nt.set,iconName:nt.name,iconSvgString:nt.string},isActive:e=>e&&e?.className?.includes("is-style-icon")};y()((()=>{(0,h.registerBlockVariation)("core/image",rt)})),(0,t.addFilter)("blocks.registerBlockType","blockify/add-icon-attributes",((e,t)=>{if(tt(t)){for(const[t,n]of Object.entries(lt))e.attributes[t]={type:n.type};"core/button"===t&&(delete lt?.iconSet?.default,delete lt?.iconName?.default),e.attributes={...e.attributes,...lt}}return e}),99);const ot=t=>{var n,l;const{attributes:r,setAttributes:o,isButton:a}=t,i=[{label:(0,A.__)("None","blockify"),value:""}],s=null!==(n=(0,S.useSelect)((e=>e(T)?.getIcons()),[]))&&void 0!==n?n:F,c={wordpress:[{name:lt?.iconSvgString?.default,key:lt?.iconName?.default}]};Object.keys(s).forEach((e=>{var t;let n=e.split("-").join(" ");var l;n="wordpress"===n?"WordPress":n,i.push({label:n,value:e}),c[e]=[],Object.keys(s[e]).forEach((t=>{t!==r?.iconName&&c[e].push({name:Qe(s?.[e]?.[t]),key:t})})),s?.[e]?.[null!==(t=r?.iconName)&&void 0!==t?t:""]&&c[e].unshift({name:Qe(s?.[e]?.[null!==(l=r?.iconName)&&void 0!==l?l:""]),key:r?.iconName})}));const u=()=>{var t;const n=c[null!==(t=r?.iconSet)&&void 0!==t?t:""]?.filter((e=>e?.key===r?.iconName))?.[0]?.name;return(0,e.createElement)("div",{className:"blockify-icon-preview"},n&&(0,e.createElement)(e.Fragment,null,n,(0,e.createElement)("span",null,r?.iconName?.replace("-"," "))))},m=()=>{const t={height:"30px"};return(0,e.createElement)(B.FlexItem,{style:{flexBasis:"100%"}},(0,e.createElement)(R,{style:{margin:"0 0 5px"}},(0,A.__)("Icon Position","blockify")),(0,e.createElement)(B.ButtonGroup,null,(0,e.createElement)(B.Button,{variant:"start"===r?.iconPosition?"primary":"secondary",onClick:()=>{o({iconPosition:"start"})},style:t},(0,A.__)("Start","blockify")),(0,e.createElement)(B.Button,{variant:"end"===r?.iconPosition?"primary":"secondary",onClick:()=>{o({iconPosition:"end"})},style:t},(0,A.__)("End","blockify"))))};return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Select Icon Set","blockify"),value:null!==(l=r?.iconSet)&&void 0!==l?l:lt?.iconSet.default,options:i,onChange:e=>o({iconSet:e})}),r?.iconSet&&(0,e.createElement)((()=>{var t,n,l;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(u,null),(0,e.createElement)(B.CustomSelectControl,{label:(0,A.__)("Select Icon","blockify"),options:null!==(t=c?.[null!==(n=r?.iconSet)&&void 0!==n?n:""])&&void 0!==t?t:c?.wordpress,value:null!==(l=r?.iconSvgString)&&void 0!==l?l:a?"":lt?.iconSvgString?.default,className:"blockify-icon-setting",onChange:({selectedItem:e})=>{var t,n;const l=null!==(t=e?.key)&&void 0!==t?t:"";o({iconName:l}),o({iconSvgString:s?.[null!==(n=r?.iconSet)&&void 0!==n?n:""]?.[l]?.toString()})}}),(0,e.createElement)("br",null),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,{align:"top",justify:"space-between",wrap:!1,style:{alignItems:"top",alignContent:"top"}},(0,e.createElement)(B.FlexItem,{style:{flexBasis:"100%"}},(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Icon Width","blockify"),value:r?.iconSize,onChange:e=>{e&&o({iconSize:e})}})),a&&(0,e.createElement)(m,null))))}),null))};(0,t.addFilter)("editor.BlockEdit","blockify/with-icon",(0,l.createHigherOrderComponent)((t=>n=>{const{name:l,attributes:r,isSelected:o}=n,{className:a}=r,i=["core/button","blockify/tab"].includes(l);return(a?.includes("is-style-icon")||i)&&tt(l)?(o&&(()=>{var e;if(null!==(e=window?.blockify?.isPlugin)&&void 0!==e&&e)return;const t=document.getElementsByClassName("block-editor-block-card__description").item(0);t&&(document.getElementsByClassName("blockify-pro-icon-link").item(0)||(t.innerHTML=t.innerHTML+(0,A.__)(" Get more icons with ","blockify")+'Blockify Pro ↗'))})(),(0,e.createElement)(e.Fragment,null,(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{title:(0,A.__)("Icon Settings","blockify"),initialOpen:!0,className:"blockify-icon-settings"},!window?.blockify?.isPlugin&&(0,e.createElement)("p",null,(0,A.__)("More icons available with Blockify Pro! ","blockify"),(0,e.createElement)("a",{href:"https://blockifywp.com/pro",target:"_blank",rel:"noreferrer"},(0,A.__)("Learn more ↗","blockify"))),(0,e.createElement)(ot,{...n,isButton:i}))))):(0,e.createElement)(t,{...n})}),"iconEdit"),0),(0,t.addFilter)("editor.BlockListBlock","blockify/edit-icon-styles",(0,l.createHigherOrderComponent)((t=>n=>{let{attributes:l,wrapperProps:r,name:o}=n;const a=["core/button"].includes(o);return(l?.className||a)&&(l?.className?.includes("is-style-icon")||a)&&tt(o)?(r||(r={style:{}}),r.style={...r?.style,...Ye(l)},(0,e.createElement)(t,{...n,wrapperProps:r})):(0,e.createElement)(t,{...n})}),"withIcon")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/save-icon-styles",((e,t,n)=>{if(!n?.className)return e;const{name:l}=t,r="core/button"===l;return(n?.className?.includes("is-style-icon")||r)&&tt(l)?e={...e,style:{...e?.style,...Ye(n)}}:e}));const at=(0,e.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(j.Path,{d:"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z"})),it={name:"svg",title:(0,A.__)("SVG","blockify"),icon:at,isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"media",scope:[],description:(0,A.__)("Insert an inline SVG.","blockify"),attributes:{className:"is-style-svg"},isActive:e=>!!e?.className&&e?.className&&e?.className?.includes("is-style-svg")};y()((()=>{(0,h.registerBlockVariation)("core/image",it)}));const st=e=>"url('data:image/svg+xml;utf8,"+encodeURIComponent(e)+"')",ct=e=>"data:image/svg+xml;utf8,"+encodeURIComponent(e);(0,t.addFilter)("editor.BlockEdit","blockify/with-svg-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const{attributes:o,setAttributes:a}=n;if(!o?.className?.includes("is-style-svg"))return(0,e.createElement)(t,{...n});const{style:i}=o,s=null!==(l=i?.svgString)&&void 0!==l?l:"",c=null!==(r=i?.maskSvg)&&void 0!==r&&r;o?.url||a({url:c?"#":ct(s)}),c&&"#"!==o?.url&&a({url:"#"}),c||o?.url?.includes("data:image/svg+xml;utf8,")||a({url:ct(s)});let u="var(--width,1em)",m="";var d;o?.width&&(u=o.width+"px"),o?.height&&(m=(null!==(d=o.height)&&void 0!==d?d:"")+"px"),m=""===m?u:m;const p={width:u,height:m,display:"inline-flex",background:"currentColor",overflow:"hidden","-webkit-mask-repeat":"no-repeat","-mask-repeat":"no-repeat","-webkit-mask-size":"100% 100%","-mask-size":"100% 100%","-webkit-mask-position":"center","-mask-position":"center bottom","-webkit-mask-image":st(s),"-mask-image":st(s)};let f="";return s&&(f=Object.entries(p).map((([e,t])=>`${e}:${t};`)).join("")),(0,e.createElement)(e.Fragment,null,c&&(0,e.createElement)("style",null,"#block-"+n?.clientId+">div:first-of-type{"+f+"}"),(0,e.createElement)(t,{...n}),(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{title:(0,A.__)("SVG Settings","blockify-pro"),className:(0,A.__)("blockify-svg-controls","blockify-pro")},(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.TextareaControl,{label:(0,A.__)("SVG String","blockify"),help:(0,A.__)("Paste your SVG string in the field above. It is recommended to format your SVG with an optimization tool ","blockify"),value:null!=s?s:"",rows:20,onChange:e=>{const t={style:{...i,svgString:e}};t.url=c?"#":ct(e),a(t)},style:{fontFamily:"var(--wp--preset--font-family--monospace, monospace)"}})),(0,e.createElement)(B.ExternalLink,{href:"https://jakearchibald.github.io/svgomg/",target:"_blank"},"https://jakearchibald.github.io/svgomg/"),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Mask with text color","blockify"),help:(0,A.__)("If enabled, the SVG will be masked with the text color. (Renders inline SVG on front end).","blockify"),checked:c,onChange:e=>{const t={style:{...i,maskSvg:e}};t.url=c?"#":ct(s),a(t)}})))))}),"withSvgControls"),9);const ut={name:"marquee",icon:(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"})),title:(0,A.__)("Marquee","blockify"),isDefault:!1,category:window?.blockify?.isPlugin?"blockify":"design",scope:["inserter"],description:(0,A.__)("Adds a horizontal infinite scrolling marquee banner.","blockify"),innerBlocks:[["core/group",{layout:{type:"flex",flexWrap:"nowrap",orientation:"horizontal",justifyContent:"center"}},[["core/paragraph"]]]],attributes:{marquee:{},align:"full",speedMobile:60,speedDesktop:90,pauseOnHover:!0,reverse:!1,spacing:{padding:{right:"0",left:"0"}},layout:{type:"flex",flexWrap:"nowrap",orientation:"marquee",justifyContent:"center"}},isActive:(e,t)=>e.layout?.orientation===t.layout?.orientation};(0,h.registerBlockVariation)("core/group",ut);const mt=e=>{var t,n;return{"--marquee-speed-mobile":(null!==(t=e?.speedMobile)&&void 0!==t?t:20)+"s","--marquee-speed-desktop":(null!==(n=e?.speedDesktop)&&void 0!==n?n:30)+"s","--marquee-direction":e?.reverse?"reverse":"forwards","--marquee-pause":e?.pauseOnHover?"paused":"running"}};(0,t.addFilter)("blocks.registerBlockType","blockify/marquee-attributes",((e,t)=>("core/group"===t&&(e={...e,attributes:{...e.attributes,speedMobile:{type:"string"},speedDesktop:{type:"string"},reverse:{type:"boolean"},pauseOnHover:{type:"boolean"},repeatItems:{type:"number"}}}),e)),0),(0,t.addFilter)("editor.BlockEdit","blockify/with-marquee-controls",(0,l.createHigherOrderComponent)((t=>n=>{var l;const{attributes:r,setAttributes:o}=n;return"marquee"!==r?.layout?.orientation?(0,e.createElement)(t,{...n}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(U.InspectorControls,null,(0,e.createElement)(B.PanelBody,{title:(0,A.__)("Marquee Settings","blockify-pro"),className:"blockify-width-control"},(0,e.createElement)("p",null,(0,A.__)("Scroll Speed (seconds)","blockify")),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)("br",null),(0,e.createElement)(B.Flex,null,(0,e.createElement)(B.FlexItem,{style:{width:"50%"}},(0,e.createElement)(B.__experimentalNumberControl,{isShiftStepEnabled:!0,label:(0,A.__)("Mobile","blockify"),onChange:e=>{o({speedMobile:e})},value:r?.speedMobile})),(0,e.createElement)(B.FlexBlock,null,(0,e.createElement)(B.__experimentalNumberControl,{isShiftStepEnabled:!0,label:(0,A.__)("Desktop","blockify-pro"),onChange:e=>{o({speedDesktop:e})},value:r?.speedDesktop})))),(0,e.createElement)("br",null),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.RangeControl,{label:(0,A.__)("Repeat Items","blockify"),help:(0,A.__)("How many times should the items be duplicated and cloned.","blockify"),value:null!==(l=r?.repeatItems)&&void 0!==l?l:2,onChange:e=>{o({repeatItems:e})},min:0,max:10,step:1,allowReset:!0})),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Pause on hover","blockify-pro"),checked:r?.pauseOnHover,onChange:()=>o({pauseOnHover:!r?.pauseOnHover})})),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.ToggleControl,{label:(0,A.__)("Reverse direction","blockify-pro"),checked:r?.reverse,onChange:()=>o({reverse:!r?.reverse})})))),(0,e.createElement)(t,{...n}))}),"withInspectorControl"),9),(0,t.addFilter)("editor.BlockListBlock","blockify/with-marquee",(0,l.createHigherOrderComponent)((t=>n=>{var l,r;const{attributes:o}=n;if("marquee"!==o?.layout?.orientation)return(0,e.createElement)(t,{...n});n.attributes.style={...null!==(l=o.style)&&void 0!==l?l:{},...mt(o)};const a={...n.wrapperProps,style:{...null!==(r=n.wrapperProps?.style)&&void 0!==r?r:{},...mt(o)}};return(0,e.createElement)(t,{...n,wrapperProps:a})}),"withMarquee")),(0,t.addFilter)("blocks.getSaveContent.extraProps","blockify/save-marquee-styles",((e,t,n)=>"marquee"!==n?.layout?.orientation?e:e={...e,style:{...e?.style,...mt(n)}}));const dt=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})),pt={name:"paragraph",title:(0,A.__)("Paragraph","blockify"),icon:dt,isDefault:!0,category:"text",scope:["inserter","transform","block"],description:(0,A.__)("Insert an image to make a visual statement.","blockify"),attributes:{className:""},isActive:e=>!e?.className?.includes("is-style-curved-text")&&!e?.className?.includes("is-style-counter")};(0,h.registerBlockVariation)("core/paragraph",pt);const ft=(0,e.createElement)(B.SVG,{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 512 512"},(0,e.createElement)(B.Path,{d:"M126.12 315.1A47.06 47.06 0 1 1 79.06 268h47.06Zm23.72 0a47.06 47.06 0 0 1 94.12 0v117.84a47.06 47.06 0 1 1-94.12 0Zm47.06-188.98A47.06 47.06 0 1 1 244 79.06v47.06Zm0 23.72a47.06 47.06 0 0 1 0 94.12H79.06a47.06 47.06 0 0 1 0-94.12Zm188.98 47.06a47.06 47.06 0 1 1 47.06 47.1h-47.06Zm-23.72 0a47.06 47.06 0 0 1-94.12 0V79.06a47.06 47.06 0 1 1 94.12 0ZM315.1 385.88a47.06 47.06 0 1 1-47.1 47.06v-47.06Zm0-23.72a47.06 47.06 0 0 1 0-94.12h117.84a47.06 47.06 0 1 1 0 94.12Z"})),yt={name:"slack",title:(0,A.__)("Slack","blockify"),icon:ft,attributes:{service:"slack"},isActive:(e,t)=>e.service===t.service};(0,h.registerBlockVariation)("core/social-link",yt);const ht=window.wp.richText;(0,ht.registerFormatType)("blockify/clear-formatting",{title:(0,A.__)("Clear","blockify"),tagName:"span",className:"clear",edit:t=>{const{value:n,isActive:l,onChange:r}=t,{formatTypes:o}=(0,S.useSelect)((e=>({formatTypes:e("core/rich-text").getFormatTypes()})),[]);return(0,e.createElement)(U.RichTextToolbarButton,{icon:"editor-removeformatting",title:(0,A.__)("Clear Formatting","blockify"),onClick:()=>{if(o.length>0){let e=n;o.map((t=>{e=(0,ht.removeFormat)(e,t.name)})),r({...e})}},isActive:l})}});const gt=(0,e.createElement)(j.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(j.Path,{d:"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z"})),bt="blockify/gradient";(0,ht.registerFormatType)(bt,{title:(0,A.__)("Gradient","blockify"),tagName:"span",className:"has-text-gradient",attributes:{style:"style",class:"class"},edit:({isActive:t,value:n,onChange:l})=>{const[r,o]=(0,V.useState)(""),[a,i]=(0,V.useState)(!1),{gradients:s}=(0,S.useSelect)((e=>({gradients:e("core/block-editor").getSettings()?.gradients})),[]);let c="",u="";return n?.formats&&n.formats.forEach((e=>{const t=e?.find((e=>e?.type===bt));t?.type===bt&&(c+=";"+t?.attributes?.style,u+=t?.attributes?.class)})),(0,e.createElement)(U.BlockControls,null,(0,e.createElement)(U.RichTextToolbarButton,{icon:gt,title:(0,A.__)("Gradient","blockify"),isActive:t,shortcutType:"primary",shortcutCharacter:"g",onClick:()=>i(!a)}),a&&(0,e.createElement)(B.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(B.Popover,{position:"bottom center",className:"blockify-gradient-text-control",focusOnMount:"container",onFocusOutside:()=>i(!1)},(0,e.createElement)(B.GradientPicker,{value:null!=r?r:"",gradients:s,onChange:e=>{o(e);let t=c,r=u;s.forEach((t=>{t.gradient===e&&(r+=(r?" ":"")+"has-"+t.slug+"-gradient-background")})),e&&!r.includes("-gradient-background")&&(t+=(t?t+";":"")+"background:"+e),r?.includes("has-text-gradient")&&(r=r?.replace("has-text-gradient","")?.trim()+" has-text-gradient"),l((0,ht.applyFormat)(n,{type:bt,attributes:{style:t,class:r}}))}}))))}});const vt=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z"}));B.CustomSelectControl.Option;const kt="blockify/typography",wt=[{key:"Default",name:"Default",style:{}},{key:"Thin",name:"Thin",style:{fontStyle:"normal",fontWeight:100}},{key:"Extra Light",name:"Extra Light",style:{fontStyle:"normal",fontWeight:200}},{key:"Light",name:"Light",style:{fontStyle:"normal",fontWeight:300}},{key:"Regular",name:"Regular",style:{fontStyle:"normal",fontWeight:400}},{key:"Medium",name:"Medium",style:{fontStyle:"normal",fontWeight:500}},{key:"Semi Bold",name:"Semi Bold",style:{fontStyle:"normal",fontWeight:600}},{key:"Bold",name:"Bold",style:{fontStyle:"normal",fontWeight:700}},{key:"Extra Bold",name:"Extra Bold",style:{fontStyle:"normal",fontWeight:800}},{key:"Black",name:"Black",style:{fontStyle:"normal",fontWeight:900}},{key:"Thin Italic",name:"Thin Italic",style:{fontStyle:"italic",fontWeight:100}},{key:"Extra Light Italic",name:"Extra Light Italic",style:{fontStyle:"italic",fontWeight:200}},{key:"Light Italic",name:"Light Italic",style:{fontStyle:"italic",fontWeight:300}},{key:"Regular Italic",name:"Regular Italic",style:{fontStyle:"italic",fontWeight:400}},{key:"Medium Italic",name:"Medium Italic",style:{fontStyle:"italic",fontWeight:500}},{key:"Semi Bold Italic",name:"Semi Bold Italic",style:{fontStyle:"italic",fontWeight:600}},{key:"Bold Italic",name:"Bold Italic",style:{fontStyle:"italic",fontWeight:700}},{key:"Extra Bold Italic",name:"Extra Bold Italic",style:{fontStyle:"italic",fontWeight:800}},{key:"Black Italic",name:"Black Italic",style:{fontStyle:"italic",fontWeight:900}}];(0,ht.registerFormatType)(kt,{title:(0,A.__)("Typography","blockify"),tagName:"span",className:"has-font",edit:t=>{var n;const{isActive:l,value:o,onChange:a}=t,{fontSizes:i}=(0,S.useSelect)((e=>({fontSizes:e("core/block-editor")?.getSettings()?.fontSizes})),[]),s=null!==(n=window?.blockify?.selectedFonts)&&void 0!==n?n:[],c=s?.map((e=>({label:r(e?.replace("-"," ")),value:e})));let u="",m="";o?.formats&&o.formats.forEach((e=>{e&&e.forEach((e=>{var t,n;e?.type===kt&&(u=null!==(t=e?.attributes?.style)&&void 0!==t?t:"",m=null!==(n=e?.attributes?.class)&&void 0!==n?n:"")}))}));const[d,p]=(0,V.useState)({style:b(u),class:m.split(" "),fontFamily:"",fontSize:"",fontAppearance:wt[0],isOpen:!1});return(0,e.createElement)(U.BlockControls,null,(0,e.createElement)(U.RichTextToolbarButton,{icon:vt,title:(0,A.__)("Typography","blockify"),isActive:l,shortcutType:"primary",shortcutCharacter:"f",onClick:()=>p({...d,isOpen:!d.isOpen})}),d?.isOpen&&(0,e.createElement)(B.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(B.Popover,{position:"bottom center",className:"blockify-font-family-control",focusOnMount:"container",onFocusOutside:()=>p({...d,isOpen:!1})},(0,e.createElement)(B.SelectControl,{label:(0,A.__)("Select Font Family","blockify"),value:d?.fontFamily,options:c,onChange:e=>{p({...d,fontFamily:e});const t="has-"+e+"-font-family";d?.class?.includes(t)||d?.class?.push(t),a((0,ht.applyFormat)(o,{type:kt,attributes:{style:g(d?.style),class:d?.class?.join(" ")}}))}}),(0,e.createElement)(B.FontSizePicker,{fontSizes:i,fallbackFontSize:20,value:parseInt(d?.fontSize),withSlider:!0,onChange:e=>{p({...d,fontSize:e.toString()}),e&&(d.style["--wp--custom--font-size"]=e.toString()),d?.class?.includes("has-inline-font-size")||d.class.push("has-inline-font-size"),a((0,ht.applyFormat)(o,{type:kt,attributes:{style:g(d?.style),class:d?.class?.join(" ")}}))}}),(0,e.createElement)(B.CustomSelectControl,{label:(0,A.__)("Appearance","blockify"),value:wt.find((e=>e.key===d?.fontAppearance?.key)),options:null!=wt?wt:[],onChange:({selectedItem:e})=>{e&&p({...d,fontAppearance:e}),e?.style?.fontStyle&&(d.style["font-style"]=e?.style?.fontStyle),e?.style?.fontWeight&&(d.style["font-weight"]=e?.style?.fontWeight?.toString()),a((0,ht.applyFormat)(o,{type:kt,attributes:{style:g(d?.style),class:d?.class?.join(" ")}}))}}))))}});const Et=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})),xt="blockify/inline-svg";(0,ht.registerFormatType)(xt,{title:(0,A.__)("Inline SVG","blockify"),object:!0,tagName:"img",className:"has-inline-svg",edit:t=>{const{isActive:n,onChange:l,value:r}=t,[o,a]=(0,V.useState)(!1),[i,s]=(0,V.useState)({string:"",width:"1em",widthDesktop:"1em",alt:"",src:""});return(0,e.createElement)(U.BlockControls,null,(0,e.createElement)(U.RichTextToolbarButton,{icon:Et,title:(0,A.__)("Inline SVG","blockify"),isActive:n,shortcutType:"primary",shortcutCharacter:"v",onClick:()=>a(!o)}),o&&(0,e.createElement)(B.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(B.Popover,{position:"bottom center",className:"blockify-svg-control",focusOnMount:"container",onFocusOutside:()=>a(!1)},(0,e.createElement)(B.TextareaControl,{label:(0,A.__)("SVG String","blockify"),help:(0,A.__)("Paste your SVG string in the field above and then click the button below to insert your image.","blockify"),value:i?.string,placeholder:(0,A.__)("Paste your SVG string here","blockify"),rows:20,onChange:e=>{s({...i,string:e.replace(/'/g,'"')})},style:{fontFamily:"var(--wp--preset--font-family--monospace, monospace)",width:"300px"}}),(0,e.createElement)("br",null),(0,e.createElement)(B.TextareaControl,{label:(0,A.__)("Alt Text","blockify"),placeholder:(0,A.__)("SVG description","blockify"),value:i?.alt,rows:2,onChange:e=>{s({...i,alt:e})},style:{width:"300px"}}),(0,e.createElement)(B.PanelRow,null,(0,e.createElement)(B.Flex,null,(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Width Mobile","blockify"),value:i?.width,onChange:e=>{s({...i,width:e})}})),(0,e.createElement)(B.FlexItem,null,(0,e.createElement)(B.__experimentalUnitControl,{label:(0,A.__)("Width Desktop","blockify"),value:i?.widthDesktop,onChange:e=>{s({...i,widthDesktop:e})}})))),(0,e.createElement)("br",null),(0,e.createElement)(B.Button,{text:(0,A.__)("Insert SVG","blockify"),onClick:()=>(e=>{let t=`-webkit-mask-image:url(${"data:image/svg+xml;utf8,"+encodeURIComponent(e?.string)})`;e?.width&&(t+=`;--width: ${e?.width}`),e?.widthDesktop&&(t+=`;--width-desktop: ${e?.widthDesktop}`),l((0,ht.insertObject)(r,{type:xt,attributes:{style:t,alt:e?.alt,role:"presentation",src:""}})),a(!1)})(i)}))))}});const _t=(0,e.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(j.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})),Ct="blockify/underline",St=["none","solid","wavy","dashed","dotted","double","brush","circle","scribble"];(0,ht.registerFormatType)(Ct,{title:(0,A.__)("Underline","blockify"),tagName:"u",className:"has-text-underline",attributes:{style:"style",class:"class"},edit:({isActive:t,value:n,onChange:l})=>{const[r,o]=(0,V.useState)(""),[a,i]=(0,V.useState)(!1);let s=[],c=[];return n?.formats&&n.formats.forEach((e=>{e&&e.forEach((e=>{e.type===Ct&&(e.attributes?.style&&(s=e.attributes.style.split(";")),e.attributes?.class&&(c=e.attributes.class.split(" ")))}))})),(0,e.createElement)(U.BlockControls,null,(0,e.createElement)(U.RichTextShortcut,{type:"primary",character:"u",onUse:()=>{l((0,ht.toggleFormat)(n,{type:Ct}))}}),(0,e.createElement)(U.RichTextToolbarButton,{icon:_t,title:(0,A.__)("Underline","blockify"),isActive:t,shortcutType:"primary",shortcutCharacter:"u",onClick:()=>i(!a)}),a&&(0,e.createElement)(B.Toolbar,{className:"blockify-components-toolbar"},(0,e.createElement)(B.Popover,{position:"bottom center",className:"blockify-underline-format",focusOnMount:"container",onFocusOutside:()=>i(!1)},(0,e.createElement)(B.__experimentalText,null,(0,A.__)("Underline style","blockify")),(0,e.createElement)("br",null),(0,e.createElement)(B.SelectControl,{onChange:e=>{var t,r;"none"===e&&l((0,ht.removeFormat)(n,Ct)),o(e);const a=null!==(t=c)&&void 0!==t?t:[];a.forEach(((e,t)=>{e.includes("is-underline-")&&delete i.classes[t]}));const i={classes:[...a,"is-underline-"+e],styles:[...null!==(r=s)&&void 0!==r?r:[],"--wp--custom--underline--style:"+e]};l((0,ht.applyFormat)(n,{type:Ct,attributes:{class:i.classes.join(" "),style:i.styles.join(";")}}))},value:r,options:St.map((e=>{return{label:(t=e,t.charAt(0).toUpperCase()+t.slice(1)),value:e};var t}))}))))}})})()})(); \ No newline at end of file diff --git a/includes/blocks/search.php b/includes/blocks/search.php index 1bfee97..86f9b5c 100644 --- a/includes/blocks/search.php +++ b/includes/blocks/search.php @@ -37,6 +37,7 @@ function render_search_block( string $html, array $block ): string { $margin = $block['attrs']['style']['spacing']['margin'] ?? []; $background_color = $block['attrs']['backgroundColor'] ?? ''; $background_custom = $block['attrs']['style']['color']['background'] ?? ''; + $input_background = $block['attrs']['inputBackgroundColor'] ?? ''; $border = $block['attrs']['style']['border'] ?? []; $border_color = $block['attrs']['style']['border']['color'] ?? $block['attrs']['borderColor'] ?? ''; $box_shadow = $block['attrs']['style']['boxShadow'] ?? []; @@ -114,6 +115,10 @@ function render_search_block( string $html, array $block ): string { $input_styles['border-radius'] = format_custom_property( $border['radius'] ?? '' ); } + if ( $input_background ) { + $input_styles['background-color'] = format_custom_property( $input_background ); + } + if ( $input_styles ) { $input_styles['height'] = 'auto'; diff --git a/includes/common/styles.php b/includes/common/styles.php index 72753ba..dbbcbf4 100644 --- a/includes/common/styles.php +++ b/includes/common/styles.php @@ -157,7 +157,10 @@ function get_dynamic_custom_properties( string $css = '' ): string { $styles = [ '--scroll' => '0', '--breakpoint' => '782px', // Only used by JS. - '--wp--custom--border' => "$border_width $border_style $border_color", + '--wp--custom--border--width' => $border_width, + '--wp--custom--border--style' => $border_style, + '--wp--custom--border--color' => $border_color, + '--wp--custom--border' => "var(--wp--custom--border--width,1px) var(--wp--custom--border--style,solid) var(--wp--custom--border--color,#ddd)", '--wp--custom--transition' => "$transition_property $transition_duration $transition_timing", '--wp--custom--body--background' => $body_background, '--wp--custom--body--color' => $body_color, diff --git a/src/api/icon-store.tsx b/src/api/icon-store.tsx index f9c490d..8dc410e 100644 --- a/src/api/icon-store.tsx +++ b/src/api/icon-store.tsx @@ -1,6 +1,6 @@ import { Reducer } from 'redux'; import apiFetch from '@wordpress/api-fetch'; -import { createReduxStore, register } from '@wordpress/data'; +import { createReduxStore, register, select } from '@wordpress/data'; export interface Icons { [set: string]: { @@ -80,15 +80,18 @@ const resolvers = { export const iconStoreName = 'blockify/icons'; -register( - createReduxStore( - iconStoreName, - { - reducer, - actions, - selectors, - controls, - resolvers, - } - ) -); +if ( ! select( 'blockify/icons' )?.getIcons() ) { + register( + createReduxStore( + iconStoreName, + { + reducer, + actions, + selectors, + controls, + resolvers, + } + ) + ); +} + diff --git a/src/block-extensions/search-input.tsx b/src/block-extensions/search-input.tsx new file mode 100644 index 0000000..0489648 --- /dev/null +++ b/src/block-extensions/search-input.tsx @@ -0,0 +1,162 @@ +import { addFilter } from '@wordpress/hooks'; +import { createHigherOrderComponent } from '@wordpress/compose'; +import { + __experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown, + __experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients, + InspectorControls, +} from '@wordpress/block-editor'; +import { __ } from '@wordpress/i18n'; +import { + getColorSlugFromValue, + getColorValueFromSlug, +} from '../utility/color.tsx'; + +addFilter( + 'blocks.registerBlockType', + 'blockify/search-input-colors', + ( settings, name ) => { + if ( name !== 'core/search' ) { + return settings; + } + + settings.attributes = { + ...settings.attributes, + inputBackgroundColor: { + type: 'string', + }, + }; + + return settings; + } +); + +addFilter( + 'editor.BlockEdit', + 'blockify/search-input-colors', + createHigherOrderComponent( + ( BlockEdit ) => { + return ( props: any ) => { + const defaultReturn = ; + + const colorGradientSettings = useMultipleOriginColorsAndGradients(); + + if ( props.name !== 'core/search' ) { + return defaultReturn; + } + + const { + attributes, + setAttributes, + clientId, + } = props; + + const { + inputBackgroundColor, + } = attributes; + + const settings = [ { + label: __( 'Input Background', 'blockify' ), + colorValue: ( typeof inputBackgroundColor === 'string' && inputBackgroundColor?.includes( '-' ) ) ? getColorValueFromSlug( inputBackgroundColor ) : inputBackgroundColor, + onColorChange: ( value: string ) => { + const slug = getColorSlugFromValue( value ); + + setAttributes( { + inputBackgroundColor: slug ? slug : value, + } ); + }, + } ]; + + return ( + <> + + + + + + ); + }; + }, + 'withSearchInputColors' + ) +); + +addFilter( + 'editor.BlockListBlock', + 'blockify/search-input-colors', + createHigherOrderComponent( + ( BlockListBlock ) => { + return ( props: any ) => { + const defaultReturn = ; + + if ( props.name !== 'core/search' ) { + return defaultReturn; + } + + const { + attributes, + wrapperProps = {}, + } = props; + + const { + inputBackgroundColor, + borderColor, + } = attributes; + + if ( inputBackgroundColor ) { + const colorValue = inputBackgroundColor?.includes( '-' ) ? `var(--wp--preset--color--${ inputBackgroundColor })` : inputBackgroundColor; + + wrapperProps.style = { + ...wrapperProps.style, + '--wp--custom--input--background': colorValue, + }; + } + + if ( borderColor ) { + const colorValue = borderColor?.includes( '-' ) ? `var(--wp--preset--color--${ borderColor })` : borderColor; + + wrapperProps.style = { + ...wrapperProps.style, + '--wp--custom--input--border': `var(--wp--custom--border--width,1px) var(--wp--custom--border--style,solid) ${ colorValue }`, + }; + } + + return ; + }; + }, + 'withSearchInputColors' + ) +); + +addFilter( + 'blocks.getSaveContent.extraProps', + 'blockify/search-input-colors', + ( extraProps, blockType, attributes ) => { + if ( blockType.name !== 'core/search' ) { + return extraProps; + } + + const { + inputBackgroundColor, + } = attributes; + + if ( inputBackgroundColor ) { + const colorValue = inputBackgroundColor?.includes( '-' ) ? `var(--wp--preset--color--${ inputBackgroundColor })` : inputBackgroundColor; + + extraProps.style = { + ...extraProps.style, + '--wp--custom--input--background': colorValue, + }; + } + + return extraProps; + } +); diff --git a/src/index.tsx b/src/index.tsx index 02e08f7..5e650d1 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -13,6 +13,7 @@ import './block-extensions/negative-margin.tsx'; import './block-extensions/onclick.tsx'; import './block-extensions/position.tsx'; import './block-extensions/query-spacing.tsx'; +import './block-extensions/search-input.tsx'; import './block-extensions/shadow.tsx'; import './block-extensions/size.tsx'; import './block-extensions/transform.tsx'; diff --git a/src/utility/color.tsx b/src/utility/color.tsx new file mode 100644 index 0000000..1b08922 --- /dev/null +++ b/src/utility/color.tsx @@ -0,0 +1,19 @@ +import { select } from '@wordpress/data'; +import { ColorPalette } from '@wordpress/components'; +import Color = ColorPalette.Color; + +export const getColorSlugFromValue = ( value: string ): string => { + const colors: Color[] = select( 'core/block-editor' )?.getSettings().colors ?? []; + + const color = colors.find( ( color ) => color.color === value ); + + return color?.slug ?? ''; +}; + +export const getColorValueFromSlug = ( slug: string ): string => { + const colors: Color[] = select( 'core/block-editor' )?.getSettings().colors ?? []; + + const color = colors.find( ( color ) => color.slug === slug ); + + return color?.color ?? ''; +}; diff --git a/styles/dark.json b/styles/dark.json index 60482b8..8bac170 100644 --- a/styles/dark.json +++ b/styles/dark.json @@ -88,12 +88,12 @@ { "name": "Neutral 50", "slug": "neutral-50", - "color": "#141f2f" + "color": "#111827" }, { "name": "Neutral 0", "slug": "neutral-0", - "color": "#111827" + "color": "#030712" }, { "name": "Success 600",