🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-19 14:29:53 | PHP 8.1.34
📂
/ (Root)
/
home
/
therahul
/
thedasstores.com
/
wp-content
/
plugins
/
blocksy-companion
/
static
/
bundle
/
blocks
📍 /home/therahul/thedasstores.com/wp-content/plugins/blocksy-companion/static/bundle/blocks
🔄 Refresh
✏️
Editing: blocks.js
Writable
!function(){var e={649:function(e){e.exports=function(e,t){var o,n,r=0;function l(){var l,a,i=o,c=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(a=0;a<c;a++)if(i.args[a]!==arguments[a]){i=i.next;continue e}return i!==o&&(i===n&&(n=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=o,i.prev=null,o.prev=i,o=i),i.val}i=i.next}for(l=new Array(c),a=0;a<c;a++)l[a]=arguments[a];return i={args:l,val:e.apply(null,l)},o?(o.prev=i,i.next=o):n=i,r===t.maxSize?(n=n.prev).next=null:r++,o=i,i.val}return t=t||{},l.clear=function(){o=null,n=null,r=0},l}},487:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],o=0;o<e.length;o++)t.push(255&e.charCodeAt(o));return t},bytesToString:function(e){for(var t=[],o=0;o<e.length;o++)t.push(String.fromCharCode(e[o]));return t.join("")}}};e.exports=t},184:function(e,t){var o; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var l=typeof o;if("string"===l||"number"===l)e.push(o);else if(Array.isArray(o)&&o.length){var a=r.apply(null,o);a&&e.push(a)}else if("object"===l)for(var i in o)n.call(o,i)&&o[i]&&e.push(i)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},12:function(e){var t,o;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&o.rotl(e,8)|4278255360&o.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=o.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],o=0,n=0;o<e.length;o++,n+=8)t[n>>>5]|=e[o]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],o=0;o<32*e.length;o+=8)t.push(e[o>>>5]>>>24-o%32&255);return t},bytesToHex:function(e){for(var t=[],o=0;o<e.length;o++)t.push((e[o]>>>4).toString(16)),t.push((15&e[o]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],o=0;o<e.length;o+=2)t.push(parseInt(e.substr(o,2),16));return t},bytesToBase64:function(e){for(var o=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],l=0;l<4;l++)8*n+6*l<=8*e.length?o.push(t.charAt(r>>>6*(3-l)&63)):o.push("=");return o.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var o=[],n=0,r=0;n<e.length;r=++n%4)0!=r&&o.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|t.indexOf(e.charAt(n))>>>6-2*r);return o}},e.exports=o},960:function(e,t){"use strict";var o;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"}(o=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===o.Tag||e.type===o.Script||e.type===o.Style},t.Root=o.Root,t.Text=o.Text,t.Directive=o.Directive,t.Comment=o.Comment,t.Script=o.Script,t.Style=o.Style,t.Tag=o.Tag,t.CDATA=o.CDATA,t.Doctype=o.Doctype},915:function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__exportStar||function(e,t){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(t,o)||n(t,e,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var l=o(960),a=o(790);r(o(790),t);var i={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,o){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&&(o=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!=o?o: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 o=this.options.xmlMode?l.ElementType.Tag:void 0,n=new a.Element(e,t,void 0,o);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===l.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var o=new a.Text(e);this.addNode(o),this.lastNode=o}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===l.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 o=new a.ProcessingInstruction(e,t);this.addNode(o)},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],o=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),o&&(e.prev=o,o.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},790:function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},n(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 o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),l=this&&this.__assign||function(){return l=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},l.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=o(960),i=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),w(this,e)},e}();t.Node=i;var c=function(e){function t(t){var o=e.call(this)||this;return o.data=t,o}return r(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(i);t.DataNode=c;var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Text,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(c);t.Text=s;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Comment,t}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(c);t.Comment=u;var p=function(e){function t(t,o){var n=e.call(this,o)||this;return n.name=t,n.type=a.ElementType.Directive,n}return r(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(c);t.ProcessingInstruction=p;var d=function(e){function t(t){var o=e.call(this)||this;return o.children=t,o}return r(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?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 m=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=m;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 b=function(e){function t(t,o,n,r){void 0===n&&(n=[]),void 0===r&&(r="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var l=e.call(this,n)||this;return l.name=t,l.attribs=o,l.type=r,l}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 o,n;return{name:t,value:e.attribs[t],namespace:null===(o=e["x-attribsNamespace"])||void 0===o?void 0:o[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(d);function y(e){return(0,a.isTag)(e)}function h(e){return e.type===a.ElementType.CDATA}function v(e){return e.type===a.ElementType.Text}function g(e){return e.type===a.ElementType.Comment}function _(e){return e.type===a.ElementType.Directive}function k(e){return e.type===a.ElementType.Root}function w(e,t){var o;if(void 0===t&&(t=!1),v(e))o=new s(e.data);else if(g(e))o=new u(e.data);else if(y(e)){var n=t?O(e.children):[],r=new b(e.name,l({},e.attribs),n);n.forEach((function(e){return e.parent=r})),null!=e.namespace&&(r.namespace=e.namespace),e["x-attribsNamespace"]&&(r["x-attribsNamespace"]=l({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(r["x-attribsPrefix"]=l({},e["x-attribsPrefix"])),o=r}else if(h(e)){n=t?O(e.children):[];var a=new m(n);n.forEach((function(e){return e.parent=a})),o=a}else if(k(e)){n=t?O(e.children):[];var i=new f(n);n.forEach((function(e){return e.parent=i})),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),o=i}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new p(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),o=c}return o.startIndex=e.startIndex,o.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(o.sourceCodeLocation=e.sourceCodeLocation),o}function O(e){for(var t=e.map((function(e){return w(e,!0)})),o=1;o<t.length;o++)t[o].prev=t[o-1],t[o-1].next=t[o];return t}t.Element=b,t.isTag=y,t.isCDATA=h,t.isText=v,t.isComment=g,t.isDirective=_,t.isDocument=k,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=w},991:function(e){"use strict";e.exports=function e(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var n,r,l;if(Array.isArray(t)){if((n=t.length)!=o.length)return!1;for(r=n;0!=r--;)if(!e(t[r],o[r]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],o.get(r[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if((n=t.length)!=o.length)return!1;for(r=n;0!=r--;)if(t[r]!==o[r])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if((n=(l=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(o,l[r]))return!1;for(r=n;0!=r--;){var a=l[r];if(!e(t[a],o[a]))return!1}return!0}return t!=t&&o!=o}},885:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,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"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},276:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,p=e.match(l),d=p&&p[1]?p[1].toLowerCase():"";switch(d){case o:var f=s(e);if(!a.test(e))null===(t=null==(y=f.querySelector(n))?void 0:y.parentNode)||void 0===t||t.removeChild(y);if(!i.test(e))null===(u=null==(y=f.querySelector(r))?void 0:y.parentNode)||void 0===u||u.removeChild(y);return f.querySelectorAll(o);case n:case r:var b=c(e).querySelectorAll(d);return i.test(e)&&a.test(e)?b[0].parentNode.childNodes:b;default:return m?m(e):(y=c(e,r).querySelector(r)).childNodes;var y}};var o="html",n="head",r="body",l=/<([a-zA-Z]+[0-9]?)/,a=/<head[^]*>/i,i=/<body[^]*>/i,c=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},s=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var p=new u;c=s=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),p.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var d=document.implementation.createHTMLDocument();c=function(e,t){if(t){var o=d.documentElement.querySelector(t);return o&&(o.innerHTML=e),d}return d.documentElement.innerHTML=e,d}}var m,f="object"==typeof document&&document.createElement("template");f&&f.content&&(m=function(e){return f.innerHTML=e,f.content.childNodes})},152:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(a),o=t?t[1]:void 0;return(0,l.formatDOM)((0,r.default)(e),null,o)};var r=n(o(276)),l=o(507),a=/<(![a-zA-Z\s]+)>/},507:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=l,t.formatDOM=function e(t,o,r){void 0===o&&(o=null);for(var i,c=[],s=0,u=t.length;s<u;s++){var p=t[s];switch(p.nodeType){case 1:var d=a(p.nodeName);(i=new n.Element(d,l(p.attributes))).children=e("template"===d?p.content.childNodes:p.childNodes,i);break;case 3:i=new n.Text(p.nodeValue);break;case 8:i=new n.Comment(p.nodeValue);break;default:continue}var m=c[s-1]||null;m&&(m.next=i),i.parent=o,i.prev=m,i.next=null,c.push(i)}r&&((i=new n.ProcessingInstruction(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=c[0]||null,i.parent=o,c.unshift(i),c[1]&&(c[1].prev=c[0]));return c};var n=o(915),r=o(885);function l(e){for(var t={},o=0,n=e.length;o<n;o++){var r=e[o];t[r.name]=r.value}return t}function a(e){var t=function(e){return r.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase());return t||e}},484:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var o={},s=Boolean(e.type&&i[e.type]);for(var u in e){var p=e[u];if((0,n.isCustomAttribute)(u))o[u]=p;else{var d=u.toLowerCase(),m=c(d);if(m){var f=(0,n.getPropertyInfo)(m);switch(l.includes(m)&&a.includes(t)&&!s&&(m=c("default"+d)),o[m]=p,f&&f.type){case n.BOOLEAN:o[m]=!0;break;case n.OVERLOADED_BOOLEAN:""===p&&(o[m]=!0)}}else r.PRESERVE_CUSTOM_ATTRIBUTES&&(o[u]=p)}}return(0,r.setStyleProp)(e.style,o),o};var n=o(726),r=o(606),l=["checked","value"],a=["input","select","textarea"],i={reset:!0,submit:!0};function c(e){return n.possibleStandardNames[e]}},670:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,o){void 0===o&&(o={});for(var n=[],r="function"==typeof o.replace,s=o.transform||a.returnFirstArg,u=o.library||i,p=u.cloneElement,d=u.createElement,m=u.isValidElement,f=t.length,b=0;b<f;b++){var y=t[b];if(r){var h=o.replace(y,b);if(m(h)){f>1&&(h=p(h,{key:h.key||b})),n.push(s(h,y,b));continue}}if("text"!==y.type){var v=y,g={};c(v)?((0,a.setStyleProp)(v.attribs.style,v.attribs),g=v.attribs):v.attribs&&(g=(0,l.default)(v.attribs,v.name));var _=void 0;switch(y.type){case"script":case"style":y.children[0]&&(g.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?g.defaultValue=y.children[0].data:y.children&&y.children.length&&(_=e(y.children,o));break;default:continue}f>1&&(g.key=b),n.push(s(d(y.name,g,_),y,b))}else{var k=!y.data.trim().length;if(k&&y.parent&&!(0,a.canTextBeChildOfNode)(y.parent))continue;if(o.trim&&k)continue;n.push(s(y.data,y,b))}}return 1===n.length?n[0]:n};var r=o(313),l=n(o(484)),a=o(606),i={cloneElement:r.cloneElement,createElement:r.createElement,isValidElement:r.isValidElement};function c(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,a.isCustomComponent)(e.name,e.attribs)}},426:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];return(0,a.default)((0,r.default)(e,(null==t?void 0:t.htmlparser2)||c),t)};var r=n(o(152));t.htmlToDOM=r.default;var l=n(o(484));t.attributesToProps=l.default;var a=n(o(670));t.domToReact=a.default;var i=o(915);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return i.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return i.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return i.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return i.Text}});var c={lowerCaseAttributeNames:!1}},606:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){if(!e.includes("-"))return Boolean(t&&"string"==typeof t.is);if(a.has(e))return!1;return!0},t.setStyleProp=function(e,t){if("string"!=typeof e)return;if(!e.trim())return void(t.style={});try{t.style=(0,l.default)(e,i)}catch(e){t.style={}}};var r=o(313),l=n(o(476)),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);var i={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(r.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)};t.returnFirstArg=function(e){return e}},139:function(e){var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,o=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,c=/^\s+|\s+$/g,s="";function u(e){return e?e.replace(c,s):s}e.exports=function(e,c){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];c=c||{};var p=1,d=1;function m(e){var t=e.match(o);t&&(p+=t.length);var n=e.lastIndexOf("\n");d=~n?e.length-n:d+e.length}function f(){var e={line:p,column:d};return function(t){return t.position=new b(e),g(),t}}function b(e){this.start=e,this.end={line:p,column:d},this.source=c.source}b.prototype.content=e;var y=[];function h(t){var o=new Error(c.source+":"+p+":"+d+": "+t);if(o.reason=t,o.filename=c.source,o.line=p,o.column=d,o.source=e,!c.silent)throw o;y.push(o)}function v(t){var o=t.exec(e);if(o){var n=o[0];return m(n),e=e.slice(n.length),o}}function g(){v(n)}function _(e){var t;for(e=e||[];t=k();)!1!==t&&e.push(t);return e}function k(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var o=2;s!=e.charAt(o)&&("*"!=e.charAt(o)||"/"!=e.charAt(o+1));)++o;if(o+=2,s===e.charAt(o-1))return h("End of comment missing");var n=e.slice(2,o-2);return d+=2,m(n),e=e.slice(o),d+=2,t({type:"comment",comment:n})}}function w(){var e=f(),o=v(r);if(o){if(k(),!v(l))return h("property missing ':'");var n=v(a),c=e({type:"declaration",property:u(o[0].replace(t,s)),value:n?u(n[0].replace(t,s)):s});return v(i),c}}return g(),function(){var e,t=[];for(_(t);e=w();)!1!==e&&(t.push(e),_(t));return t}()}},738:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */ e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},568:function(e,t,o){var n,r,l,a,i;n=o(12),r=o(487).utf8,l=o(738),a=o(487).bin,(i=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):r.stringToBytes(e):l(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var o=n.bytesToWords(e),c=8*e.length,s=1732584193,u=-271733879,p=-1732584194,d=271733878,m=0;m<o.length;m++)o[m]=16711935&(o[m]<<8|o[m]>>>24)|4278255360&(o[m]<<24|o[m]>>>8);o[c>>>5]|=128<<c%32,o[14+(c+64>>>9<<4)]=c;var f=i._ff,b=i._gg,y=i._hh,h=i._ii;for(m=0;m<o.length;m+=16){var v=s,g=u,_=p,k=d;s=f(s,u,p,d,o[m+0],7,-680876936),d=f(d,s,u,p,o[m+1],12,-389564586),p=f(p,d,s,u,o[m+2],17,606105819),u=f(u,p,d,s,o[m+3],22,-1044525330),s=f(s,u,p,d,o[m+4],7,-176418897),d=f(d,s,u,p,o[m+5],12,1200080426),p=f(p,d,s,u,o[m+6],17,-1473231341),u=f(u,p,d,s,o[m+7],22,-45705983),s=f(s,u,p,d,o[m+8],7,1770035416),d=f(d,s,u,p,o[m+9],12,-1958414417),p=f(p,d,s,u,o[m+10],17,-42063),u=f(u,p,d,s,o[m+11],22,-1990404162),s=f(s,u,p,d,o[m+12],7,1804603682),d=f(d,s,u,p,o[m+13],12,-40341101),p=f(p,d,s,u,o[m+14],17,-1502002290),s=b(s,u=f(u,p,d,s,o[m+15],22,1236535329),p,d,o[m+1],5,-165796510),d=b(d,s,u,p,o[m+6],9,-1069501632),p=b(p,d,s,u,o[m+11],14,643717713),u=b(u,p,d,s,o[m+0],20,-373897302),s=b(s,u,p,d,o[m+5],5,-701558691),d=b(d,s,u,p,o[m+10],9,38016083),p=b(p,d,s,u,o[m+15],14,-660478335),u=b(u,p,d,s,o[m+4],20,-405537848),s=b(s,u,p,d,o[m+9],5,568446438),d=b(d,s,u,p,o[m+14],9,-1019803690),p=b(p,d,s,u,o[m+3],14,-187363961),u=b(u,p,d,s,o[m+8],20,1163531501),s=b(s,u,p,d,o[m+13],5,-1444681467),d=b(d,s,u,p,o[m+2],9,-51403784),p=b(p,d,s,u,o[m+7],14,1735328473),s=y(s,u=b(u,p,d,s,o[m+12],20,-1926607734),p,d,o[m+5],4,-378558),d=y(d,s,u,p,o[m+8],11,-2022574463),p=y(p,d,s,u,o[m+11],16,1839030562),u=y(u,p,d,s,o[m+14],23,-35309556),s=y(s,u,p,d,o[m+1],4,-1530992060),d=y(d,s,u,p,o[m+4],11,1272893353),p=y(p,d,s,u,o[m+7],16,-155497632),u=y(u,p,d,s,o[m+10],23,-1094730640),s=y(s,u,p,d,o[m+13],4,681279174),d=y(d,s,u,p,o[m+0],11,-358537222),p=y(p,d,s,u,o[m+3],16,-722521979),u=y(u,p,d,s,o[m+6],23,76029189),s=y(s,u,p,d,o[m+9],4,-640364487),d=y(d,s,u,p,o[m+12],11,-421815835),p=y(p,d,s,u,o[m+15],16,530742520),s=h(s,u=y(u,p,d,s,o[m+2],23,-995338651),p,d,o[m+0],6,-198630844),d=h(d,s,u,p,o[m+7],10,1126891415),p=h(p,d,s,u,o[m+14],15,-1416354905),u=h(u,p,d,s,o[m+5],21,-57434055),s=h(s,u,p,d,o[m+12],6,1700485571),d=h(d,s,u,p,o[m+3],10,-1894986606),p=h(p,d,s,u,o[m+10],15,-1051523),u=h(u,p,d,s,o[m+1],21,-2054922799),s=h(s,u,p,d,o[m+8],6,1873313359),d=h(d,s,u,p,o[m+15],10,-30611744),p=h(p,d,s,u,o[m+6],15,-1560198380),u=h(u,p,d,s,o[m+13],21,1309151649),s=h(s,u,p,d,o[m+4],6,-145523070),d=h(d,s,u,p,o[m+11],10,-1120210379),p=h(p,d,s,u,o[m+2],15,718787259),u=h(u,p,d,s,o[m+9],21,-343485551),s=s+v>>>0,u=u+g>>>0,p=p+_>>>0,d=d+k>>>0}return n.endian([s,u,p,d])})._ff=function(e,t,o,n,r,l,a){var i=e+(t&o|~t&n)+(r>>>0)+a;return(i<<l|i>>>32-l)+t},i._gg=function(e,t,o,n,r,l,a){var i=e+(t&n|o&~n)+(r>>>0)+a;return(i<<l|i>>>32-l)+t},i._hh=function(e,t,o,n,r,l,a){var i=e+(t^o^n)+(r>>>0)+a;return(i<<l|i>>>32-l)+t},i._ii=function(e,t,o,n,r,l,a){var i=e+(o^(t|~n))+(r>>>0)+a;return(i<<l|i>>>32-l)+t},i._blocksize=16,i._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var o=n.wordsToBytes(i(e,t));return t&&t.asBytes?o:t&&t.asString?a.bytesToString(o):n.bytesToHex(o)}},496:function(e){for(var t=self.crypto||self.msCrypto,o="-_",n=36;n--;)o+=n.toString(36);for(n=36;n---10;)o+=n.toString(36).toUpperCase();e.exports=function(e){var r="",l=t.getRandomValues(new Uint8Array(e||21));for(n=e||21;n--;)r+=o[63&l[n]];return r}},726:function(e,t,o){"use strict";function n(e,t,o,n,r,l,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=r,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=a}const r={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{r[e]=new n(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{r[e]=new n(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{r[e]=new n(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{r[e]=new n(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{r[e]=new n(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{r[e]=new n(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{r[e]=new n(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{r[e]=new n(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{r[e]=new n(e,5,!1,e.toLowerCase(),null,!1,!1)}));const l=/[\-\:]([a-z])/g,a=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(l,a);r[t]=new n(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(l,a);r[t]=new n(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(l,a);r[t]=new n(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{r[e]=new n(e,1,!1,e.toLowerCase(),null,!1,!1)}));r.xlinkHref=new n("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{r[e]=new n(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:i,SAME:c,possibleStandardNames:s}=o(229),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(s).reduce(((e,t)=>{const o=s[t];return o===c?e[t]=t:o===i?e[t.toLowerCase()]=t:e[t]=o,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return r.hasOwnProperty(e)?r[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=p},229:function(e,t){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}},826:function(e){var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},o=Object.keys(t).join("|"),n=new RegExp(o,"g"),r=new RegExp(o,"");function l(e){return t[e]}var a=function(e){return e.replace(n,l)};e.exports=a,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=a},975:function(e,t,o){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function l(e){return function(e,t){var o,n,a,i,c,s,u,p,d,m=1,f=e.length,b="";for(n=0;n<f;n++)if("string"==typeof e[n])b+=e[n];else if("object"==typeof e[n]){if((i=e[n]).keys)for(o=t[m],a=0;a<i.keys.length;a++){if(null==o)throw new Error(l('[sprintf] Cannot access property "%s" of undefined value "%s"',i.keys[a],i.keys[a-1]));o=o[i.keys[a]]}else o=i.param_no?t[i.param_no]:t[m++];if(r.not_type.test(i.type)&&r.not_primitive.test(i.type)&&o instanceof Function&&(o=o()),r.numeric_arg.test(i.type)&&"number"!=typeof o&&isNaN(o))throw new TypeError(l("[sprintf] expecting number but found %T",o));switch(r.number.test(i.type)&&(p=o>=0),i.type){case"b":o=parseInt(o,10).toString(2);break;case"c":o=String.fromCharCode(parseInt(o,10));break;case"d":case"i":o=parseInt(o,10);break;case"j":o=JSON.stringify(o,null,i.width?parseInt(i.width):0);break;case"e":o=i.precision?parseFloat(o).toExponential(i.precision):parseFloat(o).toExponential();break;case"f":o=i.precision?parseFloat(o).toFixed(i.precision):parseFloat(o);break;case"g":o=i.precision?String(Number(o.toPrecision(i.precision))):parseFloat(o);break;case"o":o=(parseInt(o,10)>>>0).toString(8);break;case"s":o=String(o),o=i.precision?o.substring(0,i.precision):o;break;case"t":o=String(!!o),o=i.precision?o.substring(0,i.precision):o;break;case"T":o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=i.precision?o.substring(0,i.precision):o;break;case"u":o=parseInt(o,10)>>>0;break;case"v":o=o.valueOf(),o=i.precision?o.substring(0,i.precision):o;break;case"x":o=(parseInt(o,10)>>>0).toString(16);break;case"X":o=(parseInt(o,10)>>>0).toString(16).toUpperCase()}r.json.test(i.type)?b+=o:(!r.number.test(i.type)||p&&!i.sign?d="":(d=p?"+":"-",o=o.toString().replace(r.sign,"")),s=i.pad_char?"0"===i.pad_char?"0":i.pad_char.charAt(1):" ",u=i.width-(d+o).length,c=i.width&&u>0?s.repeat(u):"",b+=i.align?d+o+c:"0"===s?d+c+o:c+d+o)}return b}(function(e){if(i[e])return i[e];var t,o=e,n=[],l=0;for(;o;){if(null!==(t=r.text.exec(o)))n.push(t[0]);else if(null!==(t=r.modulo.exec(o)))n.push("%");else{if(null===(t=r.placeholder.exec(o)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){l|=1;var a=[],c=t[2],s=[];if(null===(s=r.key.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(a.push(s[1]);""!==(c=c.substring(s[0].length));)if(null!==(s=r.key_access.exec(c)))a.push(s[1]);else{if(null===(s=r.index_access.exec(c)))throw new SyntaxError("[sprintf] failed to parse named argument key");a.push(s[1])}t[2]=a}else l|=2;if(3===l)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}o=o.substring(t[0].length)}return i[e]=n}(e),arguments)}function a(e,t){return l.apply(null,[e].concat(t||[]))}var i=Object.create(null);l,a,"undefined"!=typeof window&&(window.sprintf=l,window.vsprintf=a,void 0===(n=function(){return{sprintf:l,vsprintf:a}}.call(t,o,t,e))||(e.exports=n))}()},476:function(e,t,o){"use strict";var n=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(o(174)),r=o(678);function l(e,t){var o={};return e&&"string"==typeof e?((0,n.default)(e,(function(e,n){e&&n&&(o[(0,r.camelCase)(e,t)]=n)})),o):o}l.default=l,e.exports=l},678:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var o=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},c=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||r.test(e)||o.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,c):e.replace(l,c)).replace(n,i))}},174:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var o=null;if(!e||"string"!=typeof e)return o;var n=(0,r.default)(e),l="function"==typeof t;return n.forEach((function(e){if("declaration"===e.type){var n=e.property,r=e.value;l?t(n,r,e):r&&((o=o||{})[n]=r)}})),o};var r=n(o(139))},313:function(e){"use strict";e.exports=window.React},61:function(e,t,o){var n=o(698).default;function r(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=r=function(){return o},e.exports.__esModule=!0,e.exports.default=e.exports;var t,o={},l=Object.prototype,a=l.hasOwnProperty,i=Object.defineProperty||function(e,t,o){e[t]=o.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",p=c.toStringTag||"@@toStringTag";function d(e,t,o){return Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(t){d=function(e,t,o){return e[t]=o}}function m(e,t,o,n){var r=t&&t.prototype instanceof _?t:_,l=Object.create(r.prototype),a=new A(n||[]);return i(l,"_invoke",{value:j(e,o,a)}),l}function f(e,t,o){try{return{type:"normal",arg:e.call(t,o)}}catch(e){return{type:"throw",arg:e}}}o.wrap=m;var b="suspendedStart",y="suspendedYield",h="executing",v="completed",g={};function _(){}function k(){}function w(){}var O={};d(O,s,(function(){return this}));var x=Object.getPrototypeOf,C=x&&x(x(B([])));C&&C!==l&&a.call(C,s)&&(O=C);var E=w.prototype=_.prototype=Object.create(O);function P(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function o(r,l,i,c){var s=f(e[r],e,l);if("throw"!==s.type){var u=s.arg,p=u.value;return p&&"object"==n(p)&&a.call(p,"__await")?t.resolve(p.__await).then((function(e){o("next",e,i,c)}),(function(e){o("throw",e,i,c)})):t.resolve(p).then((function(e){u.value=e,i(u)}),(function(e){return o("throw",e,i,c)}))}c(s.arg)}var r;i(this,"_invoke",{value:function(e,n){function l(){return new t((function(t,r){o(e,n,t,r)}))}return r=r?r.then(l,l):l()}})}function j(e,o,n){var r=b;return function(l,a){if(r===h)throw Error("Generator is already running");if(r===v){if("throw"===l)throw a;return{value:t,done:!0}}for(n.method=l,n.arg=a;;){var i=n.delegate;if(i){var c=I(i,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===b)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var s=f(e,o,n);if("normal"===s.type){if(r=n.done?v:y,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=v,n.method="throw",n.arg=s.arg)}}}function I(e,o){var n=o.method,r=e.iterator[n];if(r===t)return o.delegate=null,"throw"===n&&e.iterator.return&&(o.method="return",o.arg=t,I(e,o),"throw"===o.method)||"return"!==n&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var l=f(r,e.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,g;var a=l.arg;return a?a.done?(o[e.resultName]=a.value,o.next=e.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,g):a:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,g)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function B(e){if(e||""===e){var o=e[s];if(o)return o.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,l=function o(){for(;++r<e.length;)if(a.call(e,r))return o.value=e[r],o.done=!1,o;return o.value=t,o.done=!0,o};return l.next=l}}throw new TypeError(n(e)+" is not iterable")}return k.prototype=w,i(E,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:k,configurable:!0}),k.displayName=d(w,p,"GeneratorFunction"),o.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,d(e,p,"GeneratorFunction")),e.prototype=Object.create(E),e},o.awrap=function(e){return{__await:e}},P(S.prototype),d(S.prototype,u,(function(){return this})),o.AsyncIterator=S,o.async=function(e,t,n,r,l){void 0===l&&(l=Promise);var a=new S(m(e,t,n,r),l);return o.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(E),d(E,p,"Generator"),d(E,s,(function(){return this})),d(E,"toString",(function(){return"[object Generator]"})),o.keys=function(e){var t=Object(e),o=[];for(var n in t)o.push(n);return o.reverse(),function e(){for(;o.length;){var n=o.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},o.values=B,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var o in this)"t"===o.charAt(0)&&a.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var o=this;function n(n,r){return i.type="throw",i.arg=e,o.next=n,r&&(o.method="next",o.arg=t),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var l=this.tryEntries[r],i=l.completion;if("root"===l.tryLoc)return n("end");if(l.tryLoc<=this.prev){var c=a.call(l,"catchLoc"),s=a.call(l,"finallyLoc");if(c&&s){if(this.prev<l.catchLoc)return n(l.catchLoc,!0);if(this.prev<l.finallyLoc)return n(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return n(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return n(l.finallyLoc)}}}},abrupt:function(e,t){for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var l=r?r.completion:{};return l.type=e,l.arg=t,r?(this.method="next",this.next=r.finallyLoc,g):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.finallyLoc===e)return this.complete(o.completion,o.afterLoc),D(o),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var o=this.tryEntries[t];if(o.tryLoc===e){var n=o.completion;if("throw"===n.type){var r=n.arg;D(o)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,o,n){return this.delegate={iterator:B(e),resultName:o,nextLoc:n},"next"===this.method&&(this.arg=t),g}},o}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},698:function(e){function t(o){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},687:function(e,t,o){var n=o(61)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var l=o[t]={exports:{}};return e[t].call(l.exports,l,l.exports,n),l.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function o(t){var o=function(t,o){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,o||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"==e(o)?o:o+""}function r(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=window.wp.element,a=window.wp.i18n,i=window.wp.blocks,c=window.wp.blockEditor,s=window.wp.data,u=window.blc_blocks_data,p=u.breadcrumb_home_item,d=u.breadcrumb_home_text,m=u.breadcrumb_separator,f=u.breadcrumb_page_title,b=function(){var e=(0,l.useMemo)((function(){return"text"===p?d:(0,l.createElement)("svg",{class:"ct-home-icon",width:"15",viewBox:"0 0 24 20"},(0,l.createElement)("path",{d:"M12,0L0.4,10.5h3.2V20h6.3v-6.3h4.2V20h6.3v-9.5h3.2L12,0z"}))}),[]),t=(0,l.useMemo)((function(){return"type-2"===m?(0,l.createElement)("svg",{class:"separator",width:"8",height:"8",viewBox:"0 0 8 8"},(0,l.createElement)("polygon",{points:"2.5,0 6.9,4 2.5,8 "})):"type-3"===m?(0,l.createElement)("span",{className:"separator"},"/"):(0,l.createElement)("svg",{class:"separator",width:"8",height:"8",viewBox:"0 0 8 8"},(0,l.createElement)("path",{d:"M2,6.9L4.8,4L2,1.1L2.6,0l4,4l-4,4L2,6.9z"}))}),[]),o=(0,s.withSelect)((function(e){var t;return{title:(null===(t=e("core/editor"))||void 0===t?void 0:t.getEditedPostAttribute("title"))||""}}))((function(e){return(0,l.createElement)("span",null,(null==e?void 0:e.title)||(0,a.__)("Page","blocksy-companion"))}));return(0,l.createElement)(React.Fragment,null,(0,l.createElement)("span",null,(0,l.createElement)("span",null,e),t),(0,l.createElement)("span",null,(0,l.createElement)("span",null,(0,a.__)("Subpage","blocksy-companion")),f&&t),f&&(0,l.createElement)(o,null))};function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},y.apply(null,arguments)}var h=window.wp.components,v=function(e){var t=e.label,o=e.resetAll,n=e.panelId,r=e.settings,a=e.skipToolsPanel,i=void 0!==a&&a,s=e.containerProps,u=void 0===s?{}:s,p=(0,c.__experimentalUseMultipleOriginColorsAndGradients)();return i?(0,l.createElement)(c.__experimentalColorGradientSettingsDropdown,y({__experimentalIsRenderedInSidebar:!0,__experimentalHasMultipleOrigins:!0,__experimentalGroup:"bg",settings:r,panelId:n,disableCustomGradients:!0},u,p)):(0,l.createElement)(h.__experimentalToolsPanel,{label:t,resetAll:o,panelId:n,hasInnerWrapper:!0,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last"},(0,l.createElement)("div",{className:"color-block-support-panel__inner-wrapper"},(0,l.createElement)(c.__experimentalColorGradientSettingsDropdown,y({__experimentalIsRenderedInSidebar:!0,__experimentalHasMultipleOrigins:!0,__experimentalGroup:"bg",settings:r,panelId:n,disableCustomGradients:!0},u,p))))},g=(0,c.withColors)({textColor:"color"},{linkColor:"color"},{linkHoverColor:"color"})((function(e){var t=e.clientId,o=e.textColor,n=e.setTextColor,r=e.linkColor,i=e.setLinkColor,s=e.linkHoverColor,u=e.setLinkHoverColor,p=e.className,d=(0,l.useRef)(),m=(0,c.useBlockProps)({ref:d,className:{"ct-breadcrumbs":!0,className:p},style:{color:null==o?void 0:o.color,"--theme-link-initial-color":null==r?void 0:r.color,"--theme-link-hover-color":null==s?void 0:s.color}});return(0,l.createElement)(React.Fragment,null,(0,l.createElement)("div",m,(0,l.createElement)(b,null),(0,l.createElement)(c.InspectorControls,{group:"styles"},(0,l.createElement)(v,{label:(0,a.__)("Text Color","blocksy-companion"),resetAll:function(){n(""),i(""),u("")},panelId:t,settings:[{colorValue:o.color,enableAlpha:!0,label:(0,a.__)("Text","blocksy-companion"),onColorChange:n},{colorValue:r.color,enableAlpha:!0,label:(0,a.__)("Link Initial","blocksy-companion"),onColorChange:i},{colorValue:s.color,enableAlpha:!0,label:(0,a.__)("Link Hover","blocksy-companion"),onColorChange:u}]}))))})),_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/breadcrumbs","category":"blocksy-blocks","attributes":{"textColor":{"type":"string"},"customTextColor":{"type":"string"},"linkColor":{"type":"string"},"customLinkColor":{"type":"string"},"linkHoverColor":{"type":"string"},"customLinkHoverColor":{"type":"string"}},"supports":{"className":false,"spacing":{"margin":true,"__experimentalDefaultControls":{"margin":true}}},"providesContext":{"textColor":"textColor","linkColor":"linkColor","linkHoverColor":"linkHoverColor"}}');function k(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?k(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function x(e,t){if(e){if("string"==typeof e)return O(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?O(e,t):void 0}}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,l,a,i=[],c=!0,s=!1;try{if(l=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;c=!1}else for(;!(c=(n=l.call(o)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(s)throw r}}return i}}(e,t)||x(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)o=l[n],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function P(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||x(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}(0,i.registerBlockType)("blocksy/breadcrumbs",w(w({},_),{},{title:(0,a.__)("Breadcrumbs","blocksy-companion"),description:(0,a.__)("Display navigational links, showing users their path within the site.","blocksy-companion"),icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)("path",{d:"M4,10.5h6v3H4V10.5z M12,13.5h3v-3h-3V13.5z M17,10.5v3h3v-3H17z"}))},edit:function(e){return(0,l.createElement)(g,e)},save:function(){return null}}));var j=function(){var e={};return e.promise=new Promise((function(t,o){e.resolve=t,e.reject=o})),e},I=n(568),T=n.n(I);function D(t){if(Array.isArray(t))return"[".concat(t.map((function(e){return D(e)})).join(","),"]");if("object"===e(t)&&null!==t){var o="",n=Object.keys(t).sort();o+="{".concat(JSON.stringify(n));for(var r=0;r<n.length;r++)o+="".concat(D(t[n[r]]),",");return"".concat(o,"}")}return"".concat(JSON.stringify(t))}var A=function(e){return T()(D(e))};function B(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function H(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?B(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):B(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var N=0,z=1,M=2,F={cacheKey:{state:N,response:null,payoad:{}}},R={},V=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return function(e,t,o){t&&S(e.prototype,t),o&&S(e,o),Object.defineProperty(e,"prototype",{writable:!1})}(e,[{key:"parseOptions",value:function(e){var t=e.fetcherName;return{args:{fetcherName:void 0===t?null:t},inputFetchOptions:E(e,["fetcherName"])}}},{key:"fetch",value:function(e,t,o){var n=this.parseOptions(o).args,r=A(H(H({},t),{},{url:e}));if(F[r]||(F[r]={state:N,response:null,payload:{waitingForResponse:[]}},n.fetcherName&&R[n.fetcherName]&&(R[n.fetcherName].forEach((function(e){e.abort()})),R[n.fetcherName]=[])),F[r].state===M){var l=j();return l.resolve(F[r].response.clone()),l.promise}if(F[r].state===z)return this.fetchLoadingState(r,e,t,o);if(F[r].state===N)return this.fetchEmptyState(r,e,t,o);throw new Error("Invalid state",{cacheEntry:F[r]})}},{key:"fetchLoadingState",value:function(e,t,o,n){var r=j();return F[e].payload.waitingForResponse.push(r),r.promise}},{key:"fetchEmptyState",value:function(e,t,o,n){var r=this.parseOptions(n),l=r.args,a=r.inputFetchOptions;F[e].state=z;var i=new AbortController;l.fetcherName&&(R[l.fetcherName]||(R[l.fetcherName]=[]),R[l.fetcherName].push(i));var c=j(),s=H({method:"POST",headers:{"Content-Type":"application/json"},signal:i.signal},a);return"POST"===s.method&&(s.body=JSON.stringify(o)),fetch(t,s).then((function(t){F[e].response=t.clone(),[c].concat(P(F[e].payload.waitingForResponse)).forEach((function(t){t.resolve(F[e].response.clone())})),F[e].payload={waitingForResponse:[]},F[e].state=M,l.fetcherName&&(R[l.fetcherName]=[])})).catch((function(t){[c].concat(P(F[e].payload.waitingForResponse)).forEach((function(t){t.reject(F[e].response)})),F[e].payload={waitingForResponse:[]},F[e].state=N})),c.promise}}]),e}(),L=new V,U=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return L.fetch(e,t,o)},q=function(e){var t=e.attributes,o=e.previewedPostId,n=C((0,l.useState)(null),2),r=n[0],a=n[1];return(0,l.useEffect)((function(){var e=new URLSearchParams(window.location.search);U("".concat(wp.ajax.settings.url,"?action=blocksy_get_posts_block_data").concat(e.get("lang")?"&lang="+e.get("lang"):""),{attributes:t,previewedPostId:o},{fetcherName:"posts-block-data-".concat(t.uniqueId),headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.success,o=e.data;t&&a(o)})).catch((function(e){}))}),[t,o]),{blockData:r}},G=window.blocksyOptions,W=function(e){var t=e.isSlideshow,o=e.attributes,n=e.context,r=e.toWatch,a=C((0,l.useState)(null),2),i=a[0],c=a[1],s=(0,l.useRef)(),u=C((0,l.useState)(null),2),p=u[0],d=u[1],m={},f=[];return(0,l.useEffect)((function(){i&&i.scheduleSliderRecalculation()}),[o,n]),(0,l.useEffect)((function(){i&&!t&&i.destroy(),i&&t&&setTimeout((function(){i.refreshActivation()}),50)}),[t,i,r]),(0,l.useEffect)((function(){return function(){i&&i.destroy()}}),[]),t&&(m.ref=s,m.onMouseOver=function(){i||(0,G.mountFlexy)().then((function(e){var t=e.mount;e.Flexy;c(t((function(){return s.current}),{flexyOptions:{dragAndDropOptions:{mountDragAndDropEventListener:!1},arrowsOptions:{mountListeners:!1},onRender:function(e,t){d(t)}}}))}))}),p&&(Object.keys(p.flexyAttributeElAttr).map((function(e){m[e]=p.flexyAttributeElAttr[e]})),f=p.elementsDescriptor),{flexyInstance:i,flexyContainerAttr:m,elementsDescriptor:f,elementDescriptorForIndex:function(e){return f&&f.length>0&&f[e]?f[e]:f&&f.length>0&&!f[e]?f[0]:null},arrowsDescritor:{left:{onClick:function(e){e.preventDefault(),i&&i.sliderArrows.navigate("left")}},right:{onClick:function(e){e.preventDefault(),i&&i.sliderArrows.navigate("right")}}}}},Z=n(496),$=n.n(Z);function K(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}var X=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o="",n=$()(),a={cacheId:n,initialStyleTagsDescriptor:[{readStyles:function(){return""},persistStyles:function(e){o=e}}]};G.syncHelpers.getStyleTagsWithAst(a);e.map((function(e){var t=G.syncHelpers.getUpdateAstsForStyleDescriptor(function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?K(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({variableDescriptor:e.variables,value:e.value,fullValue:{}},a));G.syncHelpers.persistNewAsts(n,t)}));var i=o?(0,l.createElement)("style",null,o):null;return t=[(window.ct_localizations||window.ct_customizer_localizations).backend_dynamic_styles_urls.flexy],(0,l.createElement)(l.Fragment,null,i,t.map((function(e){return(0,l.createElement)("link",{key:e,rel:"stylesheet",href:e})})))},J=n(184),Y=n.n(J),Q=n(426),ee=Q.default||Q;function te(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function oe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?te(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):te(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var ne=function(e){var t=e.attributes,o=e.postId,n=(e.uniqueId,q({attributes:t,previewedPostId:o}).blockData),r="yes"===t.has_slideshow,i=W({isSlideshow:r,attributes:t,toWatch:n?n.customizer_preview:{}}),c=X([]);return n?n.customizer_preview?(0,l.createElement)(React.Fragment,null,function(e){var t=e.isSlideshow,o=e.sliderDescriptor,n=e.blockData;if(!t)return(0,l.createElement)(l.RawHTML,null,n.customizer_preview);var r={replace:function(e,t){var n=e.attribs,a=e.children,i=e.name;if(n&&n.class&&n.class.includes("flexy-container"))return(0,l.createElement)("div",y({},(0,Q.attributesToProps)(n),o.flexyContainerAttr),(0,Q.domToReact)(a,r));if(n&&n.class&&n.class.includes("flexy-arrow-")){var c=i,s=n.class.includes("flexy-arrow-next")?o.arrowsDescritor.right:o.arrowsDescritor.left;return(0,l.createElement)(c,y({},(0,Q.attributesToProps)(n),s),(0,Q.domToReact)(a,r))}if((n&&n.class?n.class.split(" "):[]).includes("flexy-item")){var u=o.elementDescriptorForIndex(t);u&&(u=u.attr);var p=(0,Q.attributesToProps)(n),d=p.className,m=E(p,["className"]);if(u){var f=u,b=f.className,h=E(f,["className"]);d=Y()(d,b),m=oe(oe({},m),h)}return(0,l.createElement)("div",y({className:Y()(d)},m),(0,Q.domToReact)(a,r))}}};return ee(n.customizer_preview,r)}({isSlideshow:r,sliderDescriptor:i,blockData:n}),c):(0,l.createElement)("p",null,(0,a.__)("No results found.","blocksy-companion")):(0,l.createElement)(h.Spinner,null)},re=function(e){return e.split("-")[0]};var le=function(e){var t=e.attributes,o=e.clientId,n=e.setAttributes,r=e.blockType;(0,l.useEffect)((function(){t.uniqueId&&!function(e){var t=e.attributes,o=e.blockType,n=document.querySelectorAll("iframe");return[document].concat(P(Array.from(n).map((function(e){return e.contentDocument})).filter((function(e){return e})))).flatMap((function(e){return P(e.querySelectorAll('[data-id="'.concat(t.uniqueId,'"][data-type="').concat(o,'"]')))})).length>1}({attributes:t,clientId:o,blockType:r})||n({uniqueId:re(o)})}),[o]);var a=t.uniqueId||re(o);return{uniqueId:a,props:{"data-id":a}}},ae=function(e){var t=e.clientId,o=e.setAttributes,n=e.setIsPatternSelectionModalOpen,r=(0,s.useDispatch)(c.store).replaceInnerBlocks;return(0,l.createElement)("div",{className:"components-placeholder is-large"},(0,l.createElement)("div",{className:"components-placeholder__label"},(0,l.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"})),(0,a.__)("Advanced Posts","blocksy-companion")),(0,l.createElement)("fieldset",{className:"components-placeholder__fieldset"},(0,l.createElement)("legend",{className:"components-placeholder__instructions"},(0,a.__)("Inherit the Customizer layout, start with a pattern or create a custom layout","blocksy-companion")),(0,l.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),o({design:"default"})}},(0,a.__)("Inherit From Customizer","blocksy-companion")),(0,l.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),n(!0)}},(0,a.__)("Choose Pattern","blocksy-companion")),(0,l.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),r(t,(0,i.createBlocksFromInnerBlocksTemplate)([["blocksy/post-template",{},[["blocksy/dynamic-data",{tagName:"h2",field:"wp:title",has_field_link:"yes"}],["blocksy/dynamic-data",{field:"wp:date"}],["blocksy/dynamic-data",{field:"wp:excerpt"}]]]]),!1)}},(0,a.__)("Create Custom Layout","blocksy-companion"))))},ie=n(313),ce=window.wp.primitives;var se=(0,ie.createElement)(ce.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,ie.createElement)(ce.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"}));var ue=(0,ie.createElement)(ce.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,ie.createElement)(ce.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"}));var pe=(0,ie.createElement)(ce.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,ie.createElement)(ce.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),de=window.wp.a11y,me=function(e){var t=e.items,o=e.selectedItems,n=e.onItemClick,r=e.label,i=e.resetAll,c=o.length>0;return(0,l.createElement)(h.__experimentalHStack,null,(0,l.createElement)(h.__experimentalHeading,{style:{margin:0},level:2},r),(0,l.createElement)(h.DropdownMenu,{icon:0===o.length?se:ue,label:(0,a.__)("Parameters options","blocksy-companion"),toggleProps:{isSmall:!0,describedBy:0===o.length?(0,a.__)("All options are currently hidden","blocksy-companion"):void 0}},(function(){return(0,l.createElement)(React.Fragment,null,t.map((function(e,t){return(0,l.createElement)(h.MenuGroup,{key:t,label:e.label},e.items.map((function(e,t){var r=o.includes(e.label);return(0,l.createElement)(h.MenuItem,{key:t,icon:r?pe:null,isSelected:r,onClick:function(){return n(e.label)}},e.label)})))})),(0,l.createElement)(h.MenuGroup,null,(0,l.createElement)(h.MenuItem,{"aria-disabled":!c,variant:"tertiary",onClick:function(){c&&(i(),(0,de.speak)((0,a.__)("All options reset","blocksy-companion"),"assertive"))}},(0,a.__)("Reset all","blocksy-companion"))))})))},fe=function(e){var t=e.className,o=e.attributes,n=e.setAttributes,r=e.resetAll,a=e.items,i=e.label,c=a.reduce((function(e,t){return[].concat(P(e),P(t.items.filter((function(e){return e.hasValue()})).map((function(e){return e.label}))))}),[]),s=C((0,l.useState)([]),2),u=s[0],p=s[1],d=P(new Set([].concat(P(u),P(c))));return(0,l.createElement)("div",{className:Y()("ct-tools-panel",t)},(0,l.createElement)(me,{label:i,resetAll:function(){p([]),r()},items:a,selectedItems:d,attributes:o,setAttributes:n,onItemClick:function(e){if(d.includes(e)){var t=a.reduce((function(e,t){return[].concat(P(e),P(t.items))}),[]).find((function(t){return t.label===e}));p(u.filter((function(t){return t!==e}))),t.reset()}else p([].concat(P(u),[e]))}}),(0,l.createElement)("div",{className:"ct-tools-panel-items"},a.reduce((function(e,t){return[].concat(P(e),P(t.items))}),[]).filter((function(e){return d.includes(e.label)})).map((function(e){return e.render()}))))},be=window.wp.coreData;function ye(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function he(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ye(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var ve=["wp_pattern_category","nav_menu"],ge=function(e,t){for(var o=e.map((function(e){return(0,i.cloneBlock)(e)})),n=[],r=P(o);r.length>0;){var l,a=r.shift();"blocksy/query"===a.name&&(a.attributes.uniqueId="",n.push(a.clientId)),null===(l=a.innerBlocks)||void 0===l||l.forEach((function(e){r.push(e)}))}return{newBlocks:o,queryClientIds:n}};var _e=function(e){return(0,s.useSelect)((function(t){return((0,t(be.store).getTaxonomies)({type:e,per_page:-1,context:"view"})||[]).filter((function(e){var t=e.slug;return!ve.includes(t)}))}),[e])},ke=window.wp.compose;function we(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return Oe(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return Oe(e,t)}(e))){var t=0,o=function(){};return{s:o,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,r,l=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw r}}}}function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function xe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Ce(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):xe(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Ee=[],Pe={order:"asc",_fields:"id,name,slug",context:"view"},Se=function(e,t){var o,n,r=(null==t?void 0:t.slug)||(null==e||null===(o=e.find((function(e){return e.name===t})))||void 0===o?void 0:o.slug);if(r)return r;var l=t.toLocaleLowerCase();return null==e||null===(n=e.find((function(e){return e.name.toLocaleLowerCase()===l})))||void 0===n?void 0:n.slug};function je(e){var t=e.taxonomy,o=e.termIds,n=e.onChange,r=e.label,i=void 0!==r&&r,c=C((0,l.useState)(""),2),u=c[0],p=c[1],d=C((0,l.useState)(Ee),2),m=d[0],f=d[1],b=C((0,l.useState)(Ee),2),y=b[0],v=b[1],g=(0,ke.useDebounce)(p,250),_=(0,s.useSelect)((function(e){if(!u)return{searchResults:Ee,searchHasResolved:!0};var o=e(be.store),n=o.getEntityRecords,r=o.hasFinishedResolution,l=["taxonomy",t.slug,Ce(Ce({},Pe),{},{search:u,orderby:"name",per_page:20})];return{searchResults:n.apply(void 0,l),searchHasResolved:r("getEntityRecords",l)}}),[u,o]),k=_.searchResults,w=_.searchHasResolved,O=(0,s.useSelect)((function(e){return null!=o&&o.length?(0,e(be.store).getEntityRecords)("taxonomy",t.slug,Ce(Ce({},Pe),{},{slug:o,per_page:o.length})):Ee}),[o]);(0,l.useEffect)((function(){if(null!=o&&o.length||f(Ee),null!=O&&O.length){var e=o.reduce((function(e,t){var o=O.find((function(e){return e.slug===t}));return o&&e.push({id:t,slug:t,value:o.name}),e}),[]);f(e)}}),[o,O]),(0,l.useEffect)((function(){w&&v(k.map((function(e){return e.name})))}),[k,w]);return(0,l.createElement)(h.FormTokenField,{label:i,value:m,onInputChange:g,suggestions:y,onChange:function(e){var t,o=new Set,r=we(e);try{for(r.s();!(t=r.n()).done;){var l=t.value,a=Se(k,l);a&&o.add(a)}}catch(e){r.e(e)}finally{r.f()}v(Ee),n(Array.from(o))},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,placeholder:(0,a.__)("Search for a term","blocksy-companion")})}function Ie(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Te(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ie(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function De(t){var o=function(t,o){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,o||"default");if("object"!==e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===o?String:Number)(t)}(t,"string");return"symbol"===e(o)?o:String(o)}var Ae=function(e){var t=e.taxonomy,o=e.attributes,n=e.setAttributes,i=e.previewedPostMatchesType;return{label:(0,a.sprintf)((0,a.__)("Include %s","blocksy-companion"),t.name),hasValue:function(){return o.include_term_ids[t.slug]},reset:function(){var e=o.include_term_ids||{},r=t.slug,l=(e[r],E(e,[r].map(De)));n({include_term_ids:l})},render:function(){var e=o.include_term_ids[t.slug]||{strategy:"all",terms:[]};return(0,l.createElement)("div",null,(0,l.createElement)(h.__experimentalToggleGroupControl,{label:(0,a.sprintf)((0,a.__)("Include %s","blocksy-companion"),t.name),value:e.strategy,isBlock:!0,onChange:function(l){n({include_term_ids:Te(Te({},o.include_term_ids),{},r({},t.slug,Te(Te({},e),{},{strategy:l})))})}},(0,l.createElement)(h.__experimentalToggleGroupControlOption,{value:"all",label:(0,a.__)("All","blocksy-companion")}),(0,l.createElement)(h.__experimentalToggleGroupControlOption,{value:"specific",label:(0,a.__)("Specific","blocksy-companion")}),i&&(0,l.createElement)(h.__experimentalToggleGroupControlOption,{value:"related",label:(0,a.__)("Related","blocksy-companion")})),"specific"===e.strategy&&(0,l.createElement)(je,{taxonomy:t,termIds:e.terms,onChange:function(l){n({include_term_ids:Te(Te({},o.include_term_ids),{},r({},t.slug,Te(Te({},e),{},{terms:l})))})}}))}}},Be=function(e){var t=e.taxonomy,o=e.attributes,n=e.setAttributes;return{label:(0,a.sprintf)((0,a.__)("Exclude %s","blocksy-companion"),t.name),hasValue:function(){return o.exclude_term_ids[t.slug]},reset:function(){var e=o.exclude_term_ids||{},r=t.slug,l=(e[r],E(e,[r].map(De)));n({exclude_term_ids:l})},render:function(){var e=o.exclude_term_ids[t.slug]||{strategy:"specific",terms:[]};return(0,l.createElement)(je,{label:(0,a.sprintf)((0,a.__)("Exclude %s","blocksy-companion"),t.name),taxonomy:t,termIds:e.terms,onChange:function(l){n({exclude_term_ids:Te(Te({},o.exclude_term_ids),{},r({},t.slug,Te(Te({},e),{},{terms:l})))})}})}}},He=function(e){var t=e.attributes,o=e.attributes.taxonomy,n=e.setAttributes,r=function(e){return(0,s.useSelect)((function(t){return(0,t(be.store).getTaxonomy)(e)}),[e])}(o);if(!r)return{taxonomiesGroup:null};var l=[Ae({taxonomy:r,attributes:t,setAttributes:n}),Be({taxonomy:r,attributes:t,setAttributes:n})].concat();return{taxonomiesGroup:l.length>0?{label:(0,a.__)("Taxonomies","blocksy-companion"),items:l}:null}},Ne=function(e){var t=e.context,o=e.attributes,n=(e.attributes.post_type,e.setAttributes),i=function(e){var t=e.attributes,o=e.attributes.post_type,n=e.previewedPostMatchesType,r=e.setAttributes,l=_e(o),i=[];return l&&l.length>0&&(i=[].concat(P(l.map((function(e){return Ae({taxonomy:e,attributes:t,setAttributes:r,previewedPostMatchesType:n})}))),P(l.map((function(e){return Be({taxonomy:e,attributes:t,setAttributes:r})}))))),{taxonomiesGroup:i.length>0?{label:(0,a.__)("Taxonomies","blocksy-companion"),items:i}:null}}({attributes:o,setAttributes:n,previewedPostMatchesType:o.post_type===t.postType}),s=i.taxonomiesGroup;return(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(fe,{className:"ct-query-parameters-component",attributes:o,setAttributes:n,resetAll:function(){n({offset:0,sticky_posts:"include",orderby:"post_date",order:"desc",include_term_ids:{},exclude_term_ids:{}})},items:[{label:(0,a.__)("General","blocksy-companion"),items:[{label:(0,a.__)("Offset","blocksy-companion"),hasValue:function(){return 0!==o.offset},reset:function(){n({offset:0})},render:function(){return(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n(r({},e,t))},options:{offset:{type:"ct-number",label:(0,a.__)("Offset","blocksy-companion"),value:"",min:0,max:500}},value:o,hasRevertButton:!1})}},{label:(0,a.__)("Order by","blocksy-companion"),hasValue:function(){return"post_date"!==o.orderby},reset:function(){n({orderby:"post_date"})},render:function(){return(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n(r({},e,t))},options:{orderby:{type:"ct-select",label:(0,a.__)("Order by","blocksy-companion"),value:"",choices:[{key:"title",value:(0,a.__)("Title","blocksy-companion")},{key:"post_date",value:(0,a.__)("Publish Date","blocksy-companion")},{key:"modified",value:(0,a.__)("Modified Date","blocksy-companion")},{key:"comment_count",value:(0,a.__)("Most commented","blocksy-companion")},{key:"author",value:(0,a.__)("Author","blocksy-companion")},{key:"rand",value:(0,a.__)("Random","blocksy-companion")},{key:"menu_order",value:(0,a.__)("Menu Order","blocksy-companion")}]}},value:o,hasRevertButton:!1})}},{label:(0,a.__)("Order","blocksy-companion"),hasValue:function(){return"desc"!==o.order},reset:function(){n({order:"desc"})},render:function(){return(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n(r({},e,t))},options:{order:{type:"ct-select",label:(0,a.__)("Order","blocksy-companion"),value:"",choices:[{key:"DESC",value:(0,a.__)("Descending","blocksy-companion")},{key:"ASC",value:(0,a.__)("Ascending","blocksy-companion")}]}},value:o,hasRevertButton:!1})}},{label:(0,a.__)("Sticky Posts","blocksy-companion"),hasValue:function(){return"include"!==o.sticky_posts},reset:function(){n({sticky_posts:"include"})},render:function(){return(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){n(r({},e,t))},options:{sticky_posts:{type:"ct-select",label:(0,a.__)("Sticky Posts","blocksy-companion"),value:"include",choices:[{key:"include",value:(0,a.__)("Include","blocksy-companion")},{key:"exclude",value:(0,a.__)("Exclude","blocksy-companion")},{key:"only",value:(0,a.__)("Only","blocksy-companion")}]}},value:o,hasRevertButton:!1})}}]}].concat(P(s?[s]:[])),label:(0,a.__)("Parameters","blocksy-companion")}))};function ze(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Me(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ze(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Fe=null,Re=new AbortController,Ve=n(826),Le=n.n(Ve);function Ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e=(e=Le()(e)).trim().toLowerCase()}function qe(e,t){var o=Ue(t),n=Ue(e.title),r=0;if(o===n)r+=30;else if(n.startsWith(o))r+=20;else{o.split(" ").every((function(e){return n.includes(e)}))&&(r+=10)}return r}function Ge(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t)return e;var o=e.map((function(e){return[e,qe(e,t)]})).filter((function(e){return C(e,2)[1]>0}));return o.sort((function(e,t){var o=C(e,2)[1];return C(t,2)[1]-o})),o.map((function(e){return C(e,1)[0]}))}var We=function(e){var t=e.clientId,o=(e.attributes,e.setIsPatternSelectionModalOpen),n=e.postType,r=C((0,l.useState)(""),2),u=r[0],p=r[1],d=(0,s.useDispatch)(c.store),m=d.replaceBlock,f=d.selectBlock,b=C((0,l.useState)([]),2),y=b[0],v=b[1];(0,l.useEffect)((function(){new Promise((function(e){Fe?e(Fe):fetch("".concat(wp.ajax.settings.url,"?action=blocksy_get_posts_block_patterns"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({}),signal:Re.signal}).then((function(e){return e.json()})).then((function(t){var o=t.success,n=t.data;o&&(Fe=n.patterns.map((function(e){return Me(Me({},e),{},{blocks:(0,i.parse)(e.content,{__unstableSkipMigrationLogs:!0})})})),e(Fe))}))})).then((function(e){v(e)}))}),[]);var g=(0,l.useMemo)((function(){return{previewPostType:n}}),[n]),_=(0,l.useMemo)((function(){return Ge(y,u)}),[y,u]),k=(0,ke.useAsyncList)(_);return(0,l.createElement)(h.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,a.__)("Choose a pattern","blocksy-companion"),onRequestClose:function(){return o(!1)},isFullScreen:!0},(0,l.createElement)("div",{className:"block-library-query-pattern__selection-content"},(0,l.createElement)("div",{className:"block-library-query-pattern__selection-search"},(0,l.createElement)(h.SearchControl,{__nextHasNoMarginBottom:!0,onChange:p,value:u,label:(0,a.__)("Search for patterns","blocksy-companion"),placeholder:(0,a.__)("Search","blocksy-companion")})),(0,l.createElement)(c.BlockContextProvider,{value:g},(0,l.createElement)(c.__experimentalBlockPatternsList,{blockPatterns:_,shownPatterns:k,onClickPattern:function(e,o){var n=ge(o),r=n.newBlocks,l=n.queryClientIds;m(t,r),l[0]&&f(l[0])}}))))};function Ze(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function $e(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ze(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Ke=function(e){var t=e.clientId,o=e.className,n=e.attributes,i=e.setAttributes,u=e.context,p=(0,c.useInnerBlocksProps)({},{}),d=(0,s.useSelect)((function(e){return!!e(c.store).getBlocks(t).length}),[t]),m=!d&&"default"!==n.design,f=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).hasPages,t=void 0!==e&&e,o=(0,s.useSelect)((function(e){var o,n=e(be.store).getPostTypes,r=["attachment","product"].concat(P(t?[]:["page"]));return null===(o=n({per_page:-1}))||void 0===o?void 0:o.filter((function(e){var t=e.viewable,o=e.slug;return t&&!r.includes(o)&&!o.includes("ct_")&&!o.includes("blc-")}))}),[t]);return{postTypesTaxonomiesMap:(0,l.useMemo)((function(){if(null!=o&&o.length)return o.reduce((function(e,t){return e[t.slug]=t.taxonomies,e}),{})}),[o]),postTypesSelectOptions:(0,l.useMemo)((function(){return(o||[]).reduce((function(e,t){return he(he({},e),{},r({},t.slug,t.labels.singular_name))}),{})}),[o])}}({hasPages:d}),b=f.postTypesSelectOptions,v=le({attributes:n,setAttributes:i,clientId:t,blockType:"blocksy/query"}),g=v.uniqueId,_=v.props,k=u.postId,w=(u.postType,(0,l.useRef)()),O=C((0,l.useState)(null),2),x=(O[0],O[1],(0,c.__experimentalUseBorderProps)(n)),E=(0,c.useBlockProps)({ref:w,className:o,style:$e({},x.style)}),S=C((0,l.useState)(!1),2),j=S[0],I=S[1];return(0,l.createElement)(React.Fragment,null,j&&(0,l.createElement)(We,{clientId:t,attributes:n,setIsPatternSelectionModalOpen:I,postType:n.post_type}),m?(0,l.createElement)("div",y({},E,_),(0,l.createElement)(ae,{setIsPatternSelectionModalOpen:I,attributes:n,setAttributes:i,clientId:t})):(0,l.createElement)("div",y({},E,_),"default"===n.design&&(0,l.createElement)(ne,{uniqueId:g,attributes:n,postId:k}),d&&(0,l.createElement)("div",p)),(0,l.createElement)(c.BlockControls,null,(0,l.createElement)(h.ToolbarGroup,null,(0,l.createElement)(h.ToolbarButton,{className:"components-toolbar__control",icon:"layout",label:(0,a.__)("Reset layout","blocksy-companion"),disabled:m,onClick:function(){d?(0,s.dispatch)("core/block-editor").replaceInnerBlocks(t,[],!1):(0,s.dispatch)("core/block-editor").updateBlockAttributes(t,{design:""})}}))),!m&&(0,l.createElement)(React.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(h.PanelBody,null,(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i($e(r({},e,t),"post_type"===e?{include_term_ids:{},exclude_term_ids:{},include_post_ids:{ids:[],current_post:!1},exclude_post_ids:{ids:[],current_post:!1}}:{}))},options:{post_type:{type:"ct-select",label:(0,a.__)("Post Type","blocksy-companion"),value:"",defaultToFirstItem:!1,choices:b,purpose:"default"},limit:{type:"ct-number",label:(0,a.__)("Limit","blocksy-companion"),value:"",min:1,max:100},has_slideshow:{type:"ct-switch",label:(0,a.__)("Slideshow","blocksy-companion"),value:""},has_slideshow_condition:{type:"ct-condition",condition:{has_slideshow:"yes"},options:{has_slideshow_arrows:{type:"ct-switch",label:(0,a.__)("Arrows","blocksy-companion"),value:""},has_slideshow_autoplay:{type:"ct-switch",label:(0,a.__)("Autoplay","blocksy-companion"),value:""},has_slideshow_autoplay_condition:{type:"ct-condition",condition:{has_slideshow_autoplay:"yes"},options:{has_slideshow_autoplay_speed:{type:"ct-number",label:(0,a.__)("Autoplay Speed","blocksy-companion"),value:"",min:1,max:100}}}}},has_pagination_condition:{type:"ct-condition",condition:{has_slideshow:"no"},options:{has_pagination:{type:"ct-switch",label:(0,a.__)("Pagination","blocksy-companion"),value:""}}}},value:n,hasRevertButton:!1}))),(0,l.createElement)(Ne,{attributes:n,setAttributes:i,context:u})),(0,l.createElement)(c.InspectorControls,{group:"advanced"},(0,l.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,a.__)("Block ID","blocksy-companion"),value:g,onChange:function(e){},onFocus:function(e){e.target.select()},help:(0,a.__)("Please look at the documentation for more information on why this is useful.","blocksy-companion")})))},Xe=function(e){var t=c.useBlockProps.save(),o=c.useInnerBlocksProps.save(t);return(0,l.createElement)("div",o)},Je=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/query","category":"blocksy-blocks","attributes":{"uniqueId":{"type":"string","default":""},"type":{"type":"string","default":"post"},"post_type":{"type":"string","default":"post"},"limit":{"type":"number","default":5},"include_term_ids":{"type":"object","default":{}},"exclude_term_ids":{"type":"object","default":{}},"include_post_ids":{"type":"object","default":{"ids":[],"current_post":false}},"exclude_post_ids":{"type":"object","default":{"ids":[],"current_post":false}},"order":{"type":"string","default":"desc"},"orderby":{"type":"string","default":"post_date"},"orderby_custom":{"type":"string","default":""},"offset":{"type":"number","default":0},"design":{"type":"string","default":""},"has_pagination":{"type":"string","default":"no"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"linkColor":{"type":"string"},"customLinkColor":{"type":"string"},"linkHoverColor":{"type":"string"},"customLinkHoverColor":{"type":"string"},"sticky_posts":{"type":"string","default":"include"},"has_slideshow":{"type":"string","default":"no"},"has_slideshow_arrows":{"type":"string","default":"yes"},"has_slideshow_autoplay":{"type":"string","default":"no"},"has_slideshow_autoplay_speed":{"type":"number","default":3}},"supports":{"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSelector":"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay","__experimentalSkipSerialization":true},"color":{"gradients":true,"link":false,"__experimentalDefaultControls":{"text":false,"background":true,"link":false}}},"usesContext":["postId","postType"],"providesContext":{"uniqueId":"uniqueId","post_type":"post_type","limit":"limit","order":"order","orderby":"orderby","sticky_posts":"sticky_posts","orderby_custom":"orderby_custom","offset":"offset","has_slideshow":"has_slideshow","has_slideshow_arrows":"has_slideshow_arrows","has_slideshow_autoplay":"has_slideshow_autoplay","has_slideshow_autoplay_speed":"has_slideshow_autoplay_speed","has_pagination":"has_pagination","include_term_ids":"include_term_ids","exclude_term_ids":"exclude_term_ids"}}');function Ye(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Qe(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ye(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}(0,i.registerBlockType)("blocksy/query",Qe(Qe({},Je),{},{title:(0,a.__)("Advanced Posts","blocksy-companion"),description:(0,a.__)("Create advanced queries based on your specified criterias.","blocksy-companion"),icon:{src:(0,l.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"}))},edit:function(e){return(0,l.createElement)(Ke,e)},save:function(){return(0,l.createElement)(Xe,null)}}));var et=function(e){var t=e.attributes,o=C((0,l.useState)(null),2),n=o[0],r=o[1];return(0,l.useEffect)((function(){var e=new URLSearchParams(window.location.search);U("".concat(wp.ajax.settings.url,"?action=blocksy_get_tax_block_data").concat(e.get("lang")?"&lang="+e.get("lang"):""),{attributes:t},{fetcherName:"tax-block-data-".concat(t.uniqueId),headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.success,o=e.data;t&&r(o)})).catch((function(e){}))}),[t]),{blockData:n}},tt=function(e){var t=e.attributes,o=et({attributes:t}).blockData;return o&&o.block?(0,l.createElement)(React.Fragment,null,(0,l.createElement)(l.RawHTML,null,o.block),o&&o.dynamic_styles&&(0,l.createElement)("style",null,o.dynamic_styles)):(0,l.createElement)(h.Spinner,null)},ot=function(e){var t=e.clientId,o=(e.setAttributes,e.setIsPatternSelectionModalOpen),n=(0,s.useDispatch)(c.store).replaceInnerBlocks;return(0,l.createElement)("div",{className:"components-placeholder is-large"},(0,l.createElement)("div",{className:"components-placeholder__label"},(0,l.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"})),(0,a.__)("Advanced Taxonomies","blocksy-companion")),(0,l.createElement)("fieldset",{className:"components-placeholder__fieldset"},(0,l.createElement)("legend",{className:"components-placeholder__instructions"},(0,a.__)("Start with a pattern or create a custom layout","blocksy-companion")),(0,l.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),o(!0)}},(0,a.__)("Choose Pattern","blocksy-companion")),(0,l.createElement)("button",{className:"components-button is-primary",onClick:function(e){e.preventDefault(),n(t,(0,i.createBlocksFromInnerBlocksTemplate)([["blocksy/tax-template",{},[["blocksy/dynamic-data",{tagName:"h2",field:"wp:term_title",has_field_link:"yes"}],["blocksy/dynamic-data",{field:"wp:term_description"}]]]]),!1)}},(0,a.__)("Create Custom Layout","blocksy-companion"))))};function nt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function rt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):nt(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var lt=null,at=new AbortController,it=function(e){var t=e.clientId,o=(e.attributes,e.setIsPatternSelectionModalOpen),n=e.postType,r=C((0,l.useState)(""),2),u=r[0],p=r[1],d=(0,s.useDispatch)(c.store),m=d.replaceBlock,f=d.selectBlock,b=C((0,l.useState)([]),2),y=b[0],v=b[1];(0,l.useEffect)((function(){new Promise((function(e){lt?e(lt):fetch("".concat(wp.ajax.settings.url,"?action=blocksy_get_terms_block_patterns"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({}),signal:at.signal}).then((function(e){return e.json()})).then((function(t){var o=t.success,n=t.data;o&&(lt=n.patterns.map((function(e){return rt(rt({},e),{},{blocks:(0,i.parse)(e.content,{__unstableSkipMigrationLogs:!0})})})),e(lt))}))})).then((function(e){v(e)}))}),[]);var g=(0,l.useMemo)((function(){return{previewPostType:n}}),[n]),_=(0,l.useMemo)((function(){return Ge(y,u)}),[y,u]),k=(0,ke.useAsyncList)(_);return(0,l.createElement)(h.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,a.__)("Choose a pattern","blocksy-companion"),onRequestClose:function(){return o(!1)},isFullScreen:!0},(0,l.createElement)("div",{className:"block-library-query-pattern__selection-content"},(0,l.createElement)("div",{className:"block-library-query-pattern__selection-search"},(0,l.createElement)(h.SearchControl,{__nextHasNoMarginBottom:!0,onChange:p,value:u,label:(0,a.__)("Search for patterns","blocksy-companion"),placeholder:(0,a.__)("Search","blocksy-companion")})),(0,l.createElement)(c.BlockContextProvider,{value:g},(0,l.createElement)(c.__experimentalBlockPatternsList,{blockPatterns:_,shownPatterns:k,onClickPattern:function(e,o){var n=ge(o),r=n.newBlocks,l=n.queryClientIds;m(t,r),l[0]&&f(l[0])}}))))},ct=function(e){e.context;var t=e.attributes,o=(e.attributes.post_type,e.setAttributes),n=He({attributes:t,setAttributes:o}).taxonomiesGroup;return(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(fe,{className:"ct-query-parameters-component",attributes:t,setAttributes:o,resetAll:function(){o({level:"all",hide_empty:"yes",offset:0,orderby:"none",order:"desc",include_term_ids:{},exclude_term_ids:{}})},items:[{label:(0,a.__)("General","blocksy-companion"),items:[{label:(0,a.__)("Offset","blocksy-companion"),hasValue:function(){return 0!==t.offset},reset:function(){o({offset:0})},render:function(){return(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){o(r({},e,t))},options:{offset:{type:"ct-number",label:(0,a.__)("Offset","blocksy-companion"),value:"",min:0,max:500}},value:t,hasRevertButton:!1})}},{label:(0,a.__)("Order by","blocksy-companion"),hasValue:function(){return"none"!==t.orderby},reset:function(){o({orderby:"none"})},render:function(){return(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){o(r({},e,t))},options:{orderby:{type:"ct-select",label:(0,a.__)("Order by","blocksy-companion"),value:"",choices:[{key:"id",value:(0,a.__)("ID","blocksy-companion")},{key:"name",value:(0,a.__)("Name","blocksy-companion")},{key:"count",value:(0,a.__)("Count","blocksy-companion")},{key:"rand",value:(0,a.__)("Random","blocksy-companion")}]}},value:t,hasRevertButton:!1})}},{label:(0,a.__)("Order","blocksy-companion"),hasValue:function(){return"desc"!==t.order},reset:function(){o({order:"desc"})},render:function(){return(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){o(r({},e,t))},options:{order:{type:"ct-select",label:(0,a.__)("Order","blocksy-companion"),value:"",choices:[{key:"DESC",value:(0,a.__)("Descending","blocksy-companion")},{key:"ASC",value:(0,a.__)("Ascending","blocksy-companion")}]}},value:t,hasRevertButton:!1})}},{label:(0,a.__)("Level","blocksy-companion"),hasValue:function(){return"all"!==t.level},reset:function(){o({level:"all"})},render:function(){return(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){o(r({},e,t))},options:{level:{type:"ct-select",label:(0,a.__)("Level","blocksy-companion"),value:"",choices:[{key:"all",value:(0,a.__)("All Taxonomies","blocksy-companion")},{key:"parent",value:(0,a.__)("Only Parent Taxonomies","blocksy-companion")},{key:"relevant",value:(0,a.__)("Relevant Taxonomies","blocksy-companion")}]}},value:t,hasRevertButton:!1})}},{label:(0,a.__)("Taxonomies Visibility","blocksy-companion"),hasValue:function(){return"no"===t.hide_empty},reset:function(){o({hide_empty:"yes"})},render:function(){return(0,l.createElement)(h.__experimentalToggleGroupControl,{label:(0,a.__)("Hide Empty Taxonomies","blocksy-companion"),value:t.hide_empty,isBlock:!0,onChange:function(e){o({hide_empty:e})}},(0,l.createElement)(h.__experimentalToggleGroupControlOption,{value:"no",label:(0,a.__)("No","blocksy-companion")}),(0,l.createElement)(h.__experimentalToggleGroupControlOption,{value:"yes",label:(0,a.__)("Yes","blocksy-companion")}))}}]}].concat(P(n?[n]:[])),label:(0,a.__)("Parameters","blocksy-companion")}))};function st(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ut(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?st(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):st(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var pt=function(e){var t=e.clientId,o=e.className,n=e.attributes,i=e.setAttributes,u=e.context,p=(0,c.useInnerBlocksProps)({},{}),d=(0,s.useSelect)((function(e){return!!e(c.store).getBlocks(t).length}),[t]),m=!d&&"default"!==n.design,f=(_e()||[]).reduce((function(e,t){return e[t.slug]=t.name,e}),{}),b=le({attributes:n,setAttributes:i,clientId:t,blockType:"blocksy/tax-query"}),v=b.uniqueId,g=b.props,_=u.postId,k=(0,l.useRef)(),w=(0,c.__experimentalUseBorderProps)(n),O=(0,c.useBlockProps)({ref:k,className:o,style:ut({},w.style)}),x=C((0,l.useState)(!1),2),E=x[0],P=x[1];return(0,l.createElement)(React.Fragment,null,E&&(0,l.createElement)(it,{clientId:t,attributes:n,setIsPatternSelectionModalOpen:P,postType:n.taxonomy}),m?(0,l.createElement)("div",y({},O,g),(0,l.createElement)(ot,{setIsPatternSelectionModalOpen:P,attributes:n,setAttributes:i,clientId:t})):(0,l.createElement)("div",y({},O,g),"default"===n.design&&(0,l.createElement)(tt,{uniqueId:v,attributes:n,postId:_}),d&&(0,l.createElement)("div",p)),(0,l.createElement)(c.BlockControls,null,(0,l.createElement)(h.ToolbarGroup,null,(0,l.createElement)(h.ToolbarButton,{className:"components-toolbar__control",icon:"layout",label:(0,a.__)("Reset layout","blocksy-companion"),disabled:m,onClick:function(){d?(0,s.dispatch)("core/block-editor").replaceInnerBlocks(t,[],!1):(0,s.dispatch)("core/block-editor").updateBlockAttributes(t,{design:""})}}))),!m&&(0,l.createElement)(React.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(h.PanelBody,null,(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){i(r({},e,t))},options:{taxonomy:{type:"ct-select",label:(0,a.__)("Taxonomy","blocksy-companion"),value:"",defaultToFirstItem:!1,choices:f,purpose:"default"},limit:{type:"ct-number",label:(0,a.__)("Limit","blocksy-companion"),value:"",min:1,max:200},has_slideshow:{type:"ct-switch",label:(0,a.__)("Slideshow","blocksy-companion"),value:""},has_slideshow_condition:{type:"ct-condition",condition:{has_slideshow:"yes"},options:{has_slideshow_arrows:{type:"ct-switch",label:(0,a.__)("Arrows","blocksy-companion"),value:""},has_slideshow_autoplay:{type:"ct-switch",label:(0,a.__)("Autoplay","blocksy-companion"),value:""},has_slideshow_autoplay_condition:{type:"ct-condition",condition:{has_slideshow_autoplay:"yes"},options:{has_slideshow_autoplay_speed:{type:"ct-number",label:(0,a.__)("Autoplay Speed","blocksy-companion"),value:"",min:1,max:100}}}}}},value:n,hasRevertButton:!1}))),(0,l.createElement)(ct,{attributes:n,setAttributes:i,context:u})),(0,l.createElement)(c.InspectorControls,{group:"advanced"},(0,l.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,a.__)("Block ID","blocksy-companion"),value:v,onChange:function(e){},onFocus:function(e){e.target.select()},help:(0,a.__)("Please look at the documentation for more information on why this is useful.","blocksy-companion")})))},dt=function(e){var t=c.useBlockProps.save(),o=c.useInnerBlocksProps.save(t);return(0,l.createElement)("div",o)},mt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/tax-query","category":"blocksy-blocks","attributes":{"uniqueId":{"type":"string","default":""},"taxonomy":{"type":"string","default":"category"},"level":{"type":"string","default":"all"},"limit":{"type":"number","default":5},"hide_empty":{"type":"string","default":"yes"},"include_term_ids":{"type":"object","default":{}},"exclude_term_ids":{"type":"object","default":{}},"order":{"type":"string","default":"desc"},"orderby":{"type":"string","default":"none"},"offset":{"type":"number","default":0},"design":{"type":"string","default":""},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"linkColor":{"type":"string"},"customLinkColor":{"type":"string"},"linkHoverColor":{"type":"string"},"customLinkHoverColor":{"type":"string"},"has_slideshow":{"type":"string","default":"no"},"has_slideshow_arrows":{"type":"string","default":"yes"},"has_slideshow_autoplay":{"type":"string","default":"no"},"has_slideshow_autoplay_speed":{"type":"number","default":3}},"supports":{"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSelector":"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay","__experimentalSkipSerialization":true},"color":{"gradients":true,"link":false,"__experimentalDefaultControls":{"text":false,"background":true,"link":false}}},"usesContext":["postId","postType"],"providesContext":{"uniqueId":"uniqueId","taxonomy":"taxonomy","level":"level","limit":"limit","hide_empty":"hide_empty","order":"order","orderby":"orderby","offset":"offset","include_term_ids":"include_term_ids","exclude_term_ids":"exclude_term_ids","has_slideshow":"has_slideshow","has_slideshow_arrows":"has_slideshow_arrows","has_slideshow_autoplay":"has_slideshow_autoplay","has_slideshow_autoplay_speed":"has_slideshow_autoplay_speed"}}');function ft(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function bt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ft(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}(0,i.registerBlockType)("blocksy/tax-query",bt(bt({},mt),{},{title:(0,a.__)("Advanced Taxonomies","blocksy-companion"),description:(0,a.__)("Create advanced queries based on your specified criterias.","blocksy-companion"),icon:{src:(0,l.createElement)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{d:"M5.5 18v-1c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2v-1c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2H6zm-.5-9V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H6zm8.5 0v5c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-5c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5zM13 18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v5zm1.5-11V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v1c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5zm.5 2c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v1c0 1.1-.9 2-2 2h-3z",fillRule:"evenodd"}))},edit:function(e){return(0,l.createElement)(pt,e)},save:function(){return(0,l.createElement)(dt,null)}}));var yt=(0,ie.createElement)(ce.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,ie.createElement)(ce.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"}));var ht=(0,ie.createElement)(ce.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,ie.createElement)(ce.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"})),vt=function(e){var t=e.label,o=e.onChange,n=e.value;return(0,l.createElement)(h.BaseControl,{label:t},(0,l.createElement)(h.Flex,{gap:4},(0,l.createElement)(h.FlexItem,{isBlock:!0},(0,l.createElement)(h.__experimentalNumberControl,{size:"__unstable-large",onChange:function(e){return o(+e)},value:n,min:1,label:t,hideLabelFromVision:!0})),(0,l.createElement)(h.FlexItem,{isBlock:!0},(0,l.createElement)(h.RangeControl,{value:parseInt(n,10),onChange:function(e){return o(+e)},min:1,max:6,withInputField:!1,label:t,hideLabelFromVision:!0}))))};function gt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function _t(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?gt(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):gt(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var kt=[];function wt(e){var t=e.isSlideshow,o=e.elementDescriptor,n=(0,c.useInnerBlocksProps)({className:"wp-block-post is-layout-flow"},{template:kt,__unstableDisableLayoutClassNames:!0});if(t){var r=(null==o?void 0:o.attr)||{},a=r.className,i=E(r,["className"]);return(0,l.createElement)("div",y({className:Y()("flexy-item",a)},i),(0,l.createElement)("article",n))}return(0,l.createElement)("article",n)}var Ot=(0,l.memo)((function(e){var t=e.blocks,o=e.blockContextId,n=e.isHidden,r=e.isSlideshow,a=e.elementDescriptor,i=e.setActiveBlockContextId,s=(0,c.__experimentalUseBlockPreview)({blocks:t,props:{className:"wp-block-post is-layout-flow"}}),u=function(){i(o)};if(n)return null;if(r){var p=(null==a?void 0:a.attr)||{},d=p.className,m=E(p,["className"]);return(0,l.createElement)("div",y({className:Y()("flexy-item",d)},m),(0,l.createElement)("article",y({tabIndex:0},s,{role:"button",onClick:u,onKeyPress:u})))}return(0,l.createElement)("article",y({},s,{tabIndex:0,role:"button",onClick:u,onKeyPress:u}))})),xt=function(e){var t=e.has_slideshow_arrows,o=e.sliderDescriptor;return t?(0,l.createElement)(React.Fragment,null,(0,l.createElement)("span",y({class:"flexy-arrow-prev"},o.arrowsDescritor.left),(0,l.createElement)("svg",{width:"16",height:"10",fill:"currentColor",viewBox:"0 0 16 10"},(0,l.createElement)("path",{d:"M15.3 4.3h-13l2.8-3c.3-.3.3-.7 0-1-.3-.3-.6-.3-.9 0l-4 4.2-.2.2v.6c0 .1.1.2.2.2l4 4.2c.3.4.6.4.9 0 .3-.3.3-.7 0-1l-2.8-3h13c.2 0 .4-.1.5-.2s.2-.3.2-.5-.1-.4-.2-.5c-.1-.1-.3-.2-.5-.2z"}))),(0,l.createElement)("span",y({class:"flexy-arrow-next"},o.arrowsDescritor.right),(0,l.createElement)("svg",{width:"16",height:"10",fill:"currentColor",viewBox:"0 0 16 10"},(0,l.createElement)("path",{d:"M.2 4.5c-.1.1-.2.3-.2.5s.1.4.2.5c.1.1.3.2.5.2h13l-2.8 3c-.3.3-.3.7 0 1 .3.3.6.3.9 0l4-4.2.2-.2V5v-.3c0-.1-.1-.2-.2-.2l-4-4.2c-.3-.4-.6-.4-.9 0-.3.3-.3.7 0 1l2.8 3H.7c-.2 0-.4.1-.5.2z"})))):null},Ct=function(e){var t=e.clientId,o=(e.className,e.attributes),n=e.attributes,r=n.layout,i=n.verticalAlignment,u=e.setAttributes,p=e.context,d=e.__unstableLayoutClassNames,m=p.postId,f=p.has_slideshow,b=p.has_slideshow_arrows,v=p.uniqueId,g=C((0,l.useState)(),2),_=g[0],k=g[1],w=r||{},O=w.type,x=w.columnCount,E=void 0===x?3:x,P="grid"===O,S=null!==E,j="yes"===f,I=X(function(e){var t=e.attributes,o=e.context,n=t.style,r=t.layout,l=t.verticalAlignment,a=o.has_slideshow,i=o.uniqueId,s=r||{},u=s.type,p=s.columnCount,d=void 0===p?3:p,m="grid"===u,f=null!==d,b="yes"===a,y="";n&&n.spacing&&n.spacing.blockGap&&(y=(0,c.getSpacingPresetCssVar)(n.spacing.blockGap)),y||(y="CT_CSS_SKIP_RULE");var h=[],v={desktop:1,tablet:1,mobile:1};if(m&&l&&h.push({variables:{selector:"[data-id='".concat(i,"']"),variable:"align-items"},value:"top"===l?"flex-start":"bottom"===l?"flex-end":"center"}),m&&l&&h.push({variables:{selector:"[data-id='".concat(i,"']"),variable:"align-items"},value:"top"===l?"flex-start":"bottom"===l?"flex-end":"center"}),m&&f){v={desktop:d,tablet:t.tabletColumns,mobile:t.mobileColumns},h.push({variables:{selector:"[data-id='".concat(i,"']"),variable:"grid-columns-gap",unit:""},value:y});var g={desktop:d,tablet:t.tabletColumns,mobile:t.mobileColumns};b&&(g={desktop:"".concat((100/d).toFixed(2),"%"),tablet:"".concat((100/t.tabletColumns).toFixed(2),"%"),mobile:"".concat((100/t.mobileColumns).toFixed(2),"%")}),h.push({variables:{selector:"[data-id='".concat(i,"']"),variable:"grid-columns-width",unit:"",responsive:!0},value:g})}else b||h.push({variables:{selector:".editor-styles-wrapper [data-id='".concat(i,"'] :where(.is-layout-flow > *)"),variable:"margin-block-end",unit:"",responsive:!0},value:y});if(b){var _={desktop:"",tablet:"",mobile:""};Object.keys(_).forEach((function(e){_[e]=["[data-id='".concat(i,"']"),'[data-flexy="no"]',".flexy-item:nth-child(n + ".concat(parseFloat(v[e])+1,")")].join(" ")})),h.push({variables:{selector:_,variable:"height",responsive:!0},value:"1px"})}return h}({attributes:o,context:p})),T=(0,c.useBlockProps)({className:Y()(d,{"ct-query-template-grid":P&&!j,"ct-query-template-default":!P&&!j,"is-layout-flow":!P&&!j,"ct-query-template":j,"is-layout-slider":j}),"data-id":v}),D=q({attributes:p,previewedPostId:m}).blockData,A=W({isSlideshow:j,context:p,attributes:o,toWatch:D?D.all_posts:{}}),B=(0,s.useSelect)((function(e){return{blocks:(0,e(c.store).getBlocks)(t)}}),[t]).blocks;if(!D)return(0,l.createElement)("p",T,(0,l.createElement)(h.Spinner,null));var H=D.all_posts.map((function(e){return{postId:e.ID,postType:e.post_type}})),N=[{icon:yt,title:(0,a.__)("List view"),onClick:function(){u({layout:{type:"default"},tabletColumns:2,mobileColumns:1})},isActive:!P},{icon:ht,title:(0,a.__)("Grid view"),onClick:function(){u({layout:{type:"grid",columnCount:3},tabletColumns:2,mobileColumns:1})},isActive:P}],z=function(e){var t=e.isSlideshow,o=e.elementDescriptorForIndex;return(0,l.createElement)(React.Fragment,null,0===H.length&&(0,l.createElement)("p",null,(0,a.__)("No results found.","blocksy-companion")),H.length>0&&H.map((function(e,n){var r,a;return(0,l.createElement)(c.BlockContextProvider,{key:e.postId,value:e},e.postId===(_||(null===(r=H[0])||void 0===r?void 0:r.postId))?(0,l.createElement)(wt,{isSlideshow:t,elementDescriptor:o?o(n):null}):null,(0,l.createElement)(Ot,{blocks:B,blockContextId:e.postId,setActiveBlockContextId:k,isSlideshow:t,elementDescriptor:o?o(n):null,isHidden:e.postId===(_||(null===(a=H[0])||void 0===a?void 0:a.postId))}))})))};return(0,l.createElement)(React.Fragment,null,(0,l.createElement)(c.BlockControls,null,(0,l.createElement)(h.ToolbarGroup,{controls:N}),P?(0,l.createElement)(c.BlockVerticalAlignmentToolbar,{onChange:function(e){u({verticalAlignment:e})},value:i}):null),(0,l.createElement)(c.InspectorControls,null,P&&S?(0,l.createElement)(h.PanelBody,{title:"Layout",initialOpen:!0},(0,l.createElement)(vt,{label:(0,a.__)("Desktop Columns","blocksy-companion"),onChange:function(e){return u({layout:_t(_t({},r),{},{columnCount:e})})},value:E}),(0,l.createElement)(vt,{label:(0,a.__)("Tablet Columns","blocksy-companion"),onChange:function(e){return u({tabletColumns:e})},value:null==o?void 0:o.tabletColumns}),(0,l.createElement)(vt,{label:(0,a.__)("Mobile Columns","blocksy-companion"),onChange:function(e){return u({mobileColumns:e})},value:null==o?void 0:o.mobileColumns})):null),(0,l.createElement)("div",T,j?(0,l.createElement)("div",y({class:"flexy-container","data-flexy":"no"},A.flexyContainerAttr),(0,l.createElement)("div",{class:"flexy"},(0,l.createElement)("div",{class:"flexy-view","data-flexy-view":"boxed"},(0,l.createElement)("div",{class:"flexy-items"},z({isSlideshow:j,elementDescriptorForIndex:A.elementDescriptorForIndex}))),(0,l.createElement)(xt,{has_slideshow_arrows:"yes"===b,sliderDescriptor:A}))):z({isSlideshow:j})),D&&"yes"===p.has_pagination&&!j&&(0,l.createElement)(l.RawHTML,null,D.pagination_output),I||null)},Et=function(){return(0,l.createElement)(c.InnerBlocks.Content,null)},Pt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/post-template","parent":["blocksy/query"],"title":"Post Template","category":"theme","description":"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","supports":{"reusable":false,"html":false,"layout":false,"spacing":{"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true}}},"attributes":{"tabletColumns":{"type":"number","default":2},"mobileColumns":{"type":"number","default":1},"verticalAlignment":{"type":"string"},"layout":{"type":"object"}},"usesContext":["uniqueId","post_type","limit","order","orderby","orderby_custom","offset","postId","postType","has_slideshow","has_slideshow_arrows","has_slideshow_autoplay","has_slideshow_autoplay_speed","has_pagination","include_term_ids","exclude_term_ids","sticky_posts"]}');function St(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function jt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?St(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):St(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}(0,i.registerBlockType)("blocksy/post-template",jt(jt({},Pt),{},{title:(0,a.__)("Post Template","blocksy-companion"),description:(0,a.__)("Post Template","blocksy-companion"),icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}))},edit:function(e){return(0,l.createElement)(Ct,e)},save:Et}));function It(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Tt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?It(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):It(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Dt=[];function At(e){var t=e.isSlideshow,o=(e.termId,e.elementDescriptor),n=(0,c.useInnerBlocksProps)({className:Y()("wp-block-term is-layout-flow",[])},{template:Dt,__unstableDisableLayoutClassNames:!0});if(t){var r=(null==o?void 0:o.attr)||{},a=r.className,i=E(r,["className"]);return(0,l.createElement)("div",y({className:Y()("flexy-item",a)},i),(0,l.createElement)("article",n))}return(0,l.createElement)("div",n)}var Bt=(0,l.memo)((function(e){var t=e.blocks,o=e.blockContextId,n=e.isHidden,r=e.isSlideshow,a=e.elementDescriptor,i=e.setActiveBlockContextId,s=(e.termId,(0,c.__experimentalUseBlockPreview)({blocks:t,props:{className:Y()("wp-block-term is-layout-flow",[])}})),u=function(){i(o)};if(n)return null;if(r){var p=(null==a?void 0:a.attr)||{},d=p.className,m=E(p,["className"]);return(0,l.createElement)("div",y({className:Y()("flexy-item",d)},m),(0,l.createElement)("div",y({tabIndex:0},s,{role:"button",onClick:u,onKeyPress:u})))}return(0,l.createElement)("div",y({},s,{tabIndex:0,role:"button",onClick:u,onKeyPress:u}))})),Ht=function(e){var t=e.clientId,o=e.attributes,n=o.layout,r=o.verticalAlignment,i=(o.style,e.attributes),u=e.setAttributes,p=e.context,d=e.__unstableLayoutClassNames,m=p.postId,f=p.has_slideshow,b=p.has_slideshow_arrows,v=p.uniqueId,g=C((0,l.useState)(),2),_=g[0],k=g[1],w=n||{},O=w.type,x=w.columnCount,E=void 0===x?3:x,P="grid"===O,S="yes"===f,j=X(function(e){var t=e.attributes,o=e.context,n=t.style,r=t.layout,l=o.has_slideshow,a=o.uniqueId,i=r||{},s=i.type,u=i.columnCount,p=void 0===u?3:u,d="grid"===s,m=null!==p,f="yes"===l,b="";n&&n.spacing&&n.spacing.blockGap&&(b=(0,c.getSpacingPresetCssVar)(n.spacing.blockGap)),b||(b="CT_CSS_SKIP_RULE");var y=[],h={desktop:1,tablet:1,mobile:1};if(d&&m){h={desktop:p,tablet:t.tabletColumns,mobile:t.mobileColumns},y.push({variables:{selector:"[data-id='".concat(a,"']"),variable:"grid-columns-gap",unit:""},value:b});var v={desktop:p,tablet:t.tabletColumns,mobile:t.mobileColumns};f&&(v={desktop:"".concat((100/p).toFixed(2),"%"),tablet:"".concat((100/t.tabletColumns).toFixed(2),"%"),mobile:"".concat((100/t.mobileColumns).toFixed(2),"%")}),y.push({variables:{selector:"[data-id='".concat(a,"']"),variable:"grid-columns-width",unit:"",responsive:!0},value:v})}else f||y.push({variables:{selector:".editor-styles-wrapper [data-id='".concat(a,"'] :where(.is-layout-flow > *)"),variable:"margin-block-end",unit:""},value:b});if(f){var g={desktop:"",tablet:"",mobile:""};Object.keys(g).forEach((function(e){g[e]=["[data-id='".concat(a,"']"),'[data-flexy="no"]',".flexy-item:nth-child(n + ".concat(parseFloat(h[e])+1,")")].join(" ")})),y.push({variables:{selector:g,variable:"height",responsive:!0},value:"1px"})}return y}({attributes:i,context:p})),I=(0,c.useBlockProps)({className:Y()(d,{"ct-query-template-grid":P&&!S,"ct-query-template-default":!P&&!S,"is-layout-flow":!P&&!S,"ct-query-template":S,"is-layout-slider":S}),"data-id":v}),T=et({attributes:p,previewedPostId:m}).blockData,D=W({isSlideshow:S,attributes:i,context:p,toWatch:T?T.all_terms:{}}),A=(0,s.useSelect)((function(e){return{blocks:(0,e(c.store).getBlocks)(t)}}),[t]).blocks;if(!T)return(0,l.createElement)("p",I,(0,l.createElement)(h.Spinner,null));var B=T.all_terms.map((function(e){return{termId:e.term_id,termIcon:null==e?void 0:e.icon,termImage:null==e?void 0:e.image}})),H=[{icon:yt,title:(0,a.__)("List view"),onClick:function(){u({layout:{type:"default"},tabletColumns:2,mobileColumns:1})},isActive:!P},{icon:ht,title:(0,a.__)("Grid view"),onClick:function(){u({layout:{type:"grid",columnCount:3},tabletColumns:2,mobileColumns:1})},isActive:P}],N=function(e){var t=e.isSlideshow,o=e.elementDescriptorForIndex;return(0,l.createElement)(React.Fragment,null,0===B.length&&(0,l.createElement)("p",null,(0,a.__)("No results found.","blocksy-companion")),B.length>0&&B.map((function(e,n){var r,a;return(0,l.createElement)(c.BlockContextProvider,{key:e.termId,value:e},e.termId===(_||(null===(r=B[0])||void 0===r?void 0:r.termId))?(0,l.createElement)(At,{isSlideshow:t,termId:e.termId,elementDescriptor:o?o(n):null}):null,(0,l.createElement)(Bt,{blocks:A,blockContextId:e.termId,setActiveBlockContextId:k,isSlideshow:t,termId:e.termId,elementDescriptor:o?o(n):null,isHidden:e.termId===(_||(null===(a=B[0])||void 0===a?void 0:a.termId))}))})))};return(0,l.createElement)(React.Fragment,null,(0,l.createElement)(c.BlockControls,null,(0,l.createElement)(h.ToolbarGroup,{controls:H}),P?(0,l.createElement)(c.BlockVerticalAlignmentToolbar,{onChange:function(e){u({verticalAlignment:e})},value:r}):null),(0,l.createElement)(c.InspectorControls,null,P?(0,l.createElement)(h.PanelBody,{title:"Layout",initialOpen:!0},(0,l.createElement)(vt,{label:(0,a.__)("Desktop Columns","blocksy-companion"),onChange:function(e){return u({layout:Tt(Tt({},n),{},{columnCount:e})})},value:E}),(0,l.createElement)(vt,{label:(0,a.__)("Tablet Columns","blocksy-companion"),onChange:function(e){return u({tabletColumns:e})},value:null==i?void 0:i.tabletColumns}),(0,l.createElement)(vt,{label:(0,a.__)("Mobile Columns","blocksy-companion"),onChange:function(e){return u({mobileColumns:e})},value:null==i?void 0:i.mobileColumns})):null),(0,l.createElement)("div",I,S?(0,l.createElement)("div",y({class:"flexy-container","data-flexy":"no"},D.flexyContainerAttr),(0,l.createElement)("div",{class:"flexy"},(0,l.createElement)("div",{class:"flexy-view","data-flexy-view":"boxed"},(0,l.createElement)("div",{class:"flexy-items"},N({isSlideshow:S,elementDescriptorForIndex:D.elementDescriptorForIndex}))),(0,l.createElement)(xt,{has_slideshow_arrows:"yes"===b,sliderDescriptor:D}))):N({isSlideshow:S})),j||null)},Nt=function(){return(0,l.createElement)(c.InnerBlocks.Content,null)},zt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/tax-template","parent":["blocksy/tax-query"],"title":"Tax Template","category":"theme","description":"Contains the block elements used to render a taxonomy, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","supports":{"reusable":false,"html":false,"layout":false,"spacing":{"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true}}},"attributes":{"tabletColumns":{"type":"number","default":2},"mobileColumns":{"type":"number","default":1},"verticalAlignment":{"type":"string"},"layout":{"type":"object"}},"usesContext":["uniqueId","taxonomy","level","limit","hide_empty","order","orderby","offset","include_term_ids","exclude_term_ids","has_slideshow","has_slideshow_arrows","has_slideshow_autoplay","has_slideshow_autoplay_speed"]}');function Mt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Ft(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Mt(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}(0,i.registerBlockType)("blocksy/tax-template",Ft(Ft({},zt),{},{title:(0,a.__)("Taxonomy Template","blocksy-companion"),description:(0,a.__)("Taxonomy Template","blocksy-companion"),icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",context:"list-view","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"}))},edit:function(e){return(0,l.createElement)(Ht,e)},save:Nt}));var Rt=function(e){return Object.entries((0,G.getFirstLevelOptions)(e)).reduce((function(e,t){var o=t[1].type,n="string";return"ct-number"===o&&(n="number"),"ct-visibility"!==o&&"ct-checkboxes"!==o&&"ct-image-uploader"!==o||(n="object"),"ct-layers"===o&&(n="array"),e[t[0]]={type:n,default:t[1].value},e}),{})},Vt=function(e){var t,o;return(null===(t=window.ct_localizations||window.ct_customizer_localizations)||void 0===t||null===(o=t.gutenberg_blocks_data)||void 0===o?void 0:o[e])||[]};function Lt(e,t,o,n,r,l,a){try{var i=e[l](a),c=i.value}catch(e){return void o(e)}i.done?t(c):Promise.resolve(c).then(n,r)}function Ut(e){return function(){var t=this,o=arguments;return new Promise((function(n,r){var l=e.apply(t,o);function a(e){Lt(l,n,r,a,i,"next",e)}function i(e){Lt(l,n,r,a,i,"throw",e)}a(void 0)}))}}var qt=n(687),Gt=n.n(qt),Wt={},Zt=function(e,t,o){var n=C((0,l.useState)([]),2),r=n[0],a=n[1],i=C((0,l.useState)([]),2),c=i[0],s=i[1],u=(0,l.useCallback)(Ut(Gt().mark((function n(){var l,i,c;return Gt().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:l=new FormData,i=JSON.stringify(t),l.append("action","blocksy_get_dynamic_block_view"),l.append("block",e),l.append("attributes",i),Wt[i]?(a(o(Wt[i])),s(!1)):(r||s(!0),fetch((null===(c=window.ct_localizations||ct_customizer_localizations)||void 0===c?void 0:c.ajax_url)||wp.ajax.settings.url,{method:"POST",body:l}).then((function(e){return e.json()})).then((function(e){var t=e.data.content;a(o(t)),s(!1),Wt[i]=t})));case 6:case"end":return n.stop()}}),n)}))),[t,r]);return(0,l.useEffect)((function(){u()}),[t]),{isLoading:c,preview:r}},$t=function(e){return Object.keys(e).reduce((function(t,o){return t[o]={type:"string",default:e[o]},t}),{})},Kt={textColor:"",customTextColor:"",textHoverColor:"",customTextHoverColor:"",iconsColor:"",customIconsColor:"",iconsHoverColor:"",customIconsHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},Xt=$t(Kt);function Jt(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Yt(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Jt(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Qt=Yt({about_alignment:"center",avatar_shape:"round",about_avatar_size:"small",post_widget_thumb_size:"default",about_social_type:"rounded",about_social_icons_fill:"outline",about_social_icons_color:"official",about_text:"Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor incididunt ut labore et dolore magna aliqua tincidunt tortor aliquam.",about_name:"John Doe",about_items_spacing:"",about_social_icons_size:""},Kt),eo=function(e){var t=e.attributes,o=e.setAttributes,n=(0,l.useRef)({image:"",socials:""}),r=t.about_name,a=t.about_text,i=t.about_source,s=t.about_alignment,u=t.avatar_shape,p=t.about_avatar_size,d=t.about_social_type,m=t.about_social_icons_fill,f=t.about_items_spacing,b=t.about_social_icons_size,y=t.about_social_icons_color,v=(0,l.useCallback)((function(e){var t=document.createElement("div");t.innerHTML=e;var o=t.querySelector(".ct-about-me-block");if(o){o.querySelector("div").dataset.alignment=s;var r=o.querySelector(".ct-media-container");r&&(r.dataset.shape=u,r.dataset.size=p);var l,a=o.querySelector(".ct-social-box");if(a&&(a.dataset.iconsType="simple"===d?d:"".concat(d,":").concat(m),a.dataset.color=y),"custom"===i)n.current={image:(null===(l=o.querySelector(".ct-media-container"))||void 0===l?void 0:l.outerHTML)||"",socials:(null==a?void 0:a.outerHTML)||""}}return o.innerHTML}),[s,u,i,p,d,m,b,f,y]),g=Zt("about-me",Yt(Yt({},t),Qt),v),_=g.isLoading,k=g.preview;return _?(0,l.createElement)(h.Spinner,null):"from_wp"===i?(0,l.createElement)(l.RawHTML,null,k):(0,l.createElement)("div",{"data-alignment":s},(0,l.createElement)(l.RawHTML,null,n.current.image),(0,l.createElement)("div",{className:"ct-about-me-name"},(0,l.createElement)(c.RichText,{tagName:"span",value:r,placeholder:"User Name",onChange:function(e){return o({about_name:e})}})),(0,l.createElement)(c.RichText,{tagName:"div",className:"ct-about-me-text",value:a,placeholder:"User Description",onChange:function(e){return o({about_text:e})}}),(0,l.createElement)(l.RawHTML,null,n.current.socials))},to=function(e){var t=e.attributes,o=e.setAttributes,n=e.options;return(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(h.PanelBody,null,(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){o(r({},e,t))},options:n,value:t,hasRevertButton:!1})))};function oo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function no(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?oo(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):oo(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var ro=(0,c.withColors)({textColor:"color"},{textHoverColor:"color"},{iconsColor:"color"},{iconsHoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})((function(e){var t=e.attributes,o=e.setAttributes,n=e.clientId,r=e.className,i=e.textColor,s=e.setTextColor,u=e.textHoverColor,p=e.setTextHoverColor,d=e.iconsColor,m=e.setIconsColor,f=e.iconsHoverColor,b=e.setIconsHoverColor,y=e.backgroundColor,h=e.setBackgroundColor,g=e.backgroundHoverColor,_=e.setBackgroundHoverColor,k=e.borderColor,w=e.setBorderColor,O=e.borderHoverColor,x=e.setBorderHoverColor,C=t.about_alignment,E=void 0===C?"center":C,P=t.about_items_spacing,S=void 0===P?"":P,j=t.about_social_icons_size,I=void 0===j?"":j,T=t.about_social_type,D=void 0===T?"simple":T,A=t.about_social_icons_fill,B=void 0===A?"outline":A,H=t.about_social_icons_color,N=void 0===H?"default":H,z=(0,l.useRef)(),M=(0,c.useBlockProps)({ref:z,className:{"ct-about-me-block":!0,className:r},"data-alignment":E,style:no(no({"--theme-block-text-color":null==i?void 0:i.color,"--theme-link-hover-color":null==i?void 0:i.color,"--theme-icon-color":null==d?void 0:d.color,"--theme-icon-hover-color":null==f?void 0:f.color,"--background-color":"solid"===B?null==y?void 0:y.color:null==k?void 0:k.color,"--background-hover-color":"solid"===B?null==g?void 0:g.color:null==O?void 0:O.color},I?{"--theme-icon-size":"".concat(I,"px")}:{}),S?{"--items-spacing":"".concat(S,"px")}:{})});return(0,l.createElement)("div",M,(0,l.createElement)(eo,{attributes:t,setAttributes:o}),(0,l.createElement)(to,{attributes:t,setAttributes:o,options:io}),(0,l.createElement)(c.InspectorControls,{group:"styles"},(0,l.createElement)(v,{label:(0,a.__)("Text Color","blocksy-companion"),resetAll:function(){s(Kt.textColor),p(Kt.textHoverColor)},panelId:n,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return s(e||Kt.textColor)}},{colorValue:u.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return p(e||Kt.textHoverColor)}}]}),"default"===N?(0,l.createElement)(v,{label:(0,a.__)("Icons Color","blocksy-companion"),resetAll:function(){m(Kt.iconsColor),b(Kt.iconsHoverColor)},panelId:n,settings:[{colorValue:d.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return m(e||Kt.iconsColor)}},{colorValue:f.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return b(e||Kt.iconsHoverColor)}}]}):null,"simple"!==D&&"default"===N&&("solid"===B?(0,l.createElement)(v,{label:(0,a.__)("Icons Background Color","blocksy-companion"),resetAll:function(){h(Kt.backgroundColor),_(Kt.backgroundHoverColor)},panelId:n,settings:[{colorValue:y.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return h(e||Kt.backgroundColor)}},{colorValue:g.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return _(e||Kt.backgroundHoverColor)}}]}):(0,l.createElement)(v,{label:(0,a.__)("Icons Border Color","blocksy-companion"),resetAll:function(){w(Kt.borderColor),x(Kt.borderHoverColor)},panelId:n,settings:[{colorValue:k.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return w(e||Kt.borderColor)}},{colorValue:O.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return x(e||Kt.borderHoverColor)}}]}))))}));function lo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ao(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?lo(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):lo(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var io=Vt("about_me"),co=Rt(io);(0,i.registerBlockType)("blocksy/about-me",{apiVersion:3,title:(0,a.__)("About Me Controls","blocksy-companion"),icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,l.createElement)("path",{d:"M5.8 13H4.2v-1c0-1.5 1.2-2.8 2.8-2.8h4c1.5 0 2.8 1.2 2.8 2.8v1h-1.5v-1c0-.7-.6-1.2-1.2-1.2H7c-.7 0-1.2.6-1.2 1.2v1zM4 21h9v-1.5H4V21zm0-5.5V17h16v-1.5H4zm2.5-10C6.5 4.1 7.6 3 9 3s2.5 1.1 2.5 2.5S10.4 8 9 8 6.5 6.9 6.5 5.5zm1.5 0c0 .6.4 1 1 1s1-.4 1-1-.4-1-1-1-1 .4-1 1z"}))},supports:{html:!1,inserter:!1,lock:!1},parent:["blocksy/widgets-wrapper"],attributes:ao(ao({},co),Xt),edit:function(e){return(0,l.createElement)(ro,e)},save:function(){return(0,l.createElement)("div",null,"Blocksy: About Me")}}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-about-me",title:(0,a.__)("About Me","blocksy-companion"),description:(0,a.__)("Showcase your personal information across your website.","blocksy-companion"),attributes:{heading:(0,a.__)("About Me","blocksy-companion"),block:"blocksy/about-me"},isDefault:!0,isActive:function(e){return"blocksy/about-me"===e.block},icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,l.createElement)("path",{d:"M5.8 13H4.2v-1c0-1.5 1.2-2.8 2.8-2.8h4c1.5 0 2.8 1.2 2.8 2.8v1h-1.5v-1c0-.7-.6-1.2-1.2-1.2H7c-.7 0-1.2.6-1.2 1.2v1zM4 21h9v-1.5H4V21zm0-5.5V17h16v-1.5H4zm2.5-10C6.5 4.1 7.6 3 9 3s2.5 1.1 2.5 2.5S10.4 8 9 8 6.5 6.9 6.5 5.5zm1.5 0c0 .6.4 1 1 1s1-.4 1-1-.4-1-1-1-1 .4-1 1z"}))}});var so={textColor:"",customTextColor:"",textInitialColor:"",customTextInitialColor:"",textHoverColor:"",customTextHoverColor:"",iconsColor:"",customIconsColor:"",iconsHoverColor:"",customIconsHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},uo=$t(so);function po(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function mo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?po(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):po(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var fo=mo({contacts_icons_size:20,contacts_items_spacing:"",contacts_icon_shape:"rounded",contacts_icon_fill_type:"outline",contact_link_target:"no",contact_text:"",contacts_items_direction:"column",link_icons:"no"},so),bo=function(e){var t=e.attributes,o=t.contacts_icons_size,n=void 0===o?20:o,r=t.contacts_items_spacing,a=void 0===r?"":r,i=t.contacts_icon_shape,c=void 0===i?"rounded":i,s=t.contacts_icon_fill_type,u=void 0===s?"outline":s,p=t.contact_link_target,d=void 0===p?"no":p,m=t.contacts_items_direction,f=void 0===m?"column":m,b=(0,l.useCallback)((function(e){var t=document.createElement("div");t.innerHTML=e;var o=t.querySelector(".ct-contact-info-block ul"),n=t.querySelectorAll("a");return n&&n.forEach((function(e){e.target="yes"===d?"_blank":"_self"})),o.innerHTML}),[n,c,u,d,f,a]),y=Zt("contact-info",mo(mo({},t),fo),b),v=y.isLoading,g=y.preview;return v?(0,l.createElement)(h.Spinner,null):(0,l.createElement)("ul",{"data-icons-type":"simple"===c?c:"".concat(c,":").concat(u),dangerouslySetInnerHTML:{__html:g}})};function yo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ho(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?yo(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):yo(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var vo,go=(0,c.withColors)({textColor:"color"},{textInitialColor:"color"},{textHoverColor:"color"},{iconsColor:"color"},{iconsHoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})((function(e){var t=e.attributes,o=e.setAttributes,n=e.clientId,r=e.className,i=e.textColor,s=e.setTextColor,u=e.textInitialColor,p=e.setTextInitialColor,d=e.textHoverColor,m=e.setTextHoverColor,f=e.iconsColor,b=e.setIconsColor,y=e.iconsHoverColor,h=e.setIconsHoverColor,g=e.backgroundColor,_=e.setBackgroundColor,k=e.backgroundHoverColor,w=e.setBackgroundHoverColor,O=e.borderColor,x=e.setBorderColor,C=e.borderHoverColor,E=e.setBorderHoverColor,P=t.contacts_items_direction,S=void 0===P?"column":P,j=t.contacts_icons_size,I=void 0===j?20:j,T=t.contacts_items_spacing,D=void 0===T?"":T,A=t.contacts_icon_shape,B=void 0===A?"rounded":A,H=t.contacts_icon_fill_type,N=void 0===H?"outline":H,z=(0,l.useRef)(),M=(0,c.useBlockProps)({ref:z,className:{"ct-contact-info-block":!0,className:r},style:ho(ho(ho({"--theme-block-text-color":null==i?void 0:i.color,"--theme-link-initial-color":null==u?void 0:u.color,"--theme-link-hover-color":null==d?void 0:d.color,"--theme-icon-color":null==f?void 0:f.color,"--theme-icon-hover-color":null==y?void 0:y.color,"--background-color":"solid"===N?null==g?void 0:g.color:null==O?void 0:O.color,"--background-hover-color":"solid"===N?null==k?void 0:k.color:null==C?void 0:C.color},I?{"--theme-icon-size":"".concat(I,"px")}:{}),D?{"--items-spacing":"".concat(D,"px")}:{}),"column"===S?{"--items-direction":S}:{})});return(0,l.createElement)("div",M,(0,l.createElement)(bo,{attributes:t,setAttributes:o}),(0,l.createElement)(to,{attributes:t,setAttributes:o,options:wo}),(0,l.createElement)(c.InspectorControls,{group:"styles"},(0,l.createElement)(v,{label:(0,a.__)("Text Color","blocksy-companion"),resetAll:function(){s(so.textColor),p(so.textInitialColor),m(so.textHoverColor)},panelId:n,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,a.__)("Text","blocksy-companion"),onColorChange:function(e){return s(e||so.textColor)}},{colorValue:u.color,enableAlpha:!0,label:(0,a.__)("Link Initial","blocksy-companion"),onColorChange:function(e){return p(e||so.textInitialColor)}},{colorValue:d.color,enableAlpha:!0,label:(0,a.__)("Link Hover","blocksy-companion"),onColorChange:function(e){return m(e||so.textHoverColor)}}]}),(0,l.createElement)(v,{label:(0,a.__)("Icons Color","blocksy-companion"),resetAll:function(){b(so.iconsColor),h(so.iconsHoverColor)},panelId:n,settings:[{colorValue:f.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return b(e||so.iconsColor)}},{colorValue:y.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return h(e||so.iconsHoverColor)}}]}),"simple"!==B&&("solid"===N?(0,l.createElement)(v,{label:(0,a.__)("Icons Background Color","blocksy-companion"),resetAll:function(){_(so.backgroundColor),w(so.backgroundHoverColor)},panelId:n,settings:[{colorValue:g.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return _(e||so.backgroundColor)}},{colorValue:k.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return w(e||so.backgroundHoverColor)}}]}):(0,l.createElement)(v,{label:(0,a.__)("Icons Border Color","blocksy-companion"),resetAll:function(){x(so.borderColor),E(so.borderHoverColor)},panelId:n,settings:[{colorValue:O.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return x(e||so.borderColor)}},{colorValue:C.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return E(e||so.borderHoverColor)}}]}))))}));function _o(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ko(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_o(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):_o(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var wo=Vt("contact_info"),Oo=Rt(wo);(0,i.registerBlockType)("blocksy/contact-info",{apiVersion:3,title:(0,a.__)("Contact Info Controls","blocksy-companion"),icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,l.createElement)("path",{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}))},supports:{html:!1,inserter:!1,lock:!1,typography:{fontSize:!0}},parent:["blocksy/widgets-wrapper"],attributes:ko(ko({},Oo),uo),edit:function(e){return(0,l.createElement)(go,e)},save:function(){return(0,l.createElement)("div",null,"Blocksy: Contact Info")}}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-contact-info",title:(0,a.__)("Contact Info","blocksy-companion"),description:(0,a.__)("Display essential contact details to your visitors.","blocksy-companion"),attributes:{heading:(0,a.__)("Contact Info","blocksy-companion"),block:"blocksy/contact-info",hasDescription:!0,description:(null==Oo||null===(vo=Oo.contact_text)||void 0===vo?void 0:vo.default)||""},isActive:function(e){return"blocksy/contact-info"===e.block},icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,l.createElement)("path",{fillRule:"evenodd",d:"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z",clipRule:"evenodd"}))}});var xo={initialColor:"",customInitialColor:"",hoverColor:"",customHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},Co=$t(xo);function Eo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Po(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Eo(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Eo(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var So=Po({link_nofollow:"no",link_target:"no",social_icons_color:"official",social_icons_fill:"outline",social_icons_size:"",items_spacing:"",social_type:"simple"},xo),jo=function(e){var t=e.attributes,o=t.social_icons_color,n=t.social_icons_size,r=t.social_type,a=t.social_icons_fill,i=t.items_spacing,c=(0,l.useCallback)((function(e){var t=document.createElement("div");return t.innerHTML=e,t.querySelector(".ct-social-box").innerHTML}),[o,n,r,a,i]),s=Zt("socials",Po(Po({},t),So),c),u=s.isLoading,p=s.preview;return u?(0,l.createElement)(h.Spinner,null):(0,l.createElement)(l.RawHTML,{className:"ct-social-box","data-icons-type":"simple"===r?r:"".concat(r,":").concat(a),"data-color":o},p)};function Io(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function To(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Io(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Io(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Do=Vt("socials"),Ao=(0,c.withColors)({initialColor:"color"},{hoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})((function(e){var t=e.attributes,o=e.setAttributes,n=e.clientId,r=e.className,i=e.initialColor,s=e.setInitialColor,u=e.hoverColor,p=e.setHoverColor,d=e.backgroundColor,m=e.setBackgroundColor,f=e.backgroundHoverColor,b=e.setBackgroundHoverColor,y=e.borderColor,h=e.setBorderColor,g=e.borderHoverColor,_=e.setBorderHoverColor,k=t.items_spacing,w=void 0===k?"":k,O=t.social_icons_size,x=void 0===O?"":O,C=t.social_type,E=void 0===C?"simple":C,P=t.social_icons_fill,S=void 0===P?"outline":P,j=t.social_icons_color,I=void 0===j?"default":j,T=(0,l.useRef)(),D=(0,c.useBlockProps)({ref:T,className:{"ct-socials-block":!0,className:r},style:To(To({"--theme-icon-color":null==i?void 0:i.color,"--theme-icon-hover-color":null==u?void 0:u.color,"--background-color":"solid"===S?null==d?void 0:d.color:null==y?void 0:y.color,"--background-hover-color":"solid"===S?null==f?void 0:f.color:null==g?void 0:g.color},x?{"--theme-icon-size":"".concat(x,"px")}:{}),w?{"--items-spacing":"".concat(w,"px")}:{})});return(0,l.createElement)("div",D,(0,l.createElement)(jo,{attributes:t,setAttributes:o}),(0,l.createElement)(to,{attributes:t,setAttributes:o,options:Do}),"default"===I?(0,l.createElement)(c.InspectorControls,{group:"styles"},(0,l.createElement)(v,{label:(0,a.__)("Icon Color","blocksy-companion"),resetAll:function(){s(xo.initialColor),p(xo.hoverColor)},panelId:n,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return s(e||xo.initialColor)}},{colorValue:u.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return p(e||xo.hoverColor)}}]}),"simple"!==E&&("solid"===S?(0,l.createElement)(v,{label:(0,a.__)("Icons Background Colors","blocksy-companion"),resetAll:function(){m(xo.backgroundColor),b(xo.backgroundHoverColor)},panelId:n,settings:[{colorValue:d.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return m(e||xo.backgroundColor)}},{colorValue:f.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return b(e||xo.backgroundHoverColor)}}]}):(0,l.createElement)(v,{label:(0,a.__)("Icons Border Colors","blocksy-companion"),resetAll:function(){h(xo.borderColor),_(xo.borderHoverColor)},panelId:n,settings:[{colorValue:y.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return h(e||xo.borderColor)}},{colorValue:g.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return _(e||xo.borderHoverColor)}}]}))):null)}));function Bo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Ho(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Bo(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Bo(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var No=Rt(Vt("socials"));(0,i.registerBlockType)("blocksy/socials",{apiVersion:3,title:(0,a.__)("Socials Controls","blocksy-companion"),icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,l.createElement)("path",{d:"M16.4 14.2c-.8 0-1.5.3-2.1.9l-3.9-2.3c.1-.3.1-.5.1-.8 0-.3-.1-.5-.1-.8L14.3 9c.5.5 1.3.9 2.1.9 1.6 0 2.9-1.3 2.9-2.9S18 4 16.4 4s-2.9 1.3-2.9 2.9c0 .3.1.5.1.8L9.7 10c-.5-.6-1.3-.9-2.1-.9-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9.8 0 1.5-.3 2.1-.9l3.9 2.3c-.1.3-.1.5-.1.8 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9c0-1.6-1.3-2.9-2.9-2.9zm0-8.7c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5.7-1.5 1.5-1.5zm-8.8 8c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm8.8 5c-.8 0-1.5-.7-1.5-1.5 0-.3.1-.5.2-.7.3-.4.7-.7 1.2-.7.8 0 1.5.7 1.5 1.5s-.6 1.4-1.4 1.4z"}))},supports:{html:!1,inserter:!1,lock:!1},parent:["blocksy/widgets-wrapper"],attributes:Ho(Ho({},No),Co),edit:function(e){return(0,l.createElement)(Ao,e)},save:function(){return(0,l.createElement)("div",null,"Blocksy: Socials")}}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-socials",title:(0,a.__)("Socials","blocksy-companion"),description:(0,a.__)("Display your social media profiles and boost the site engagement.","blocksy-companion"),attributes:{heading:(0,a.__)("Socials","blocksy-companion"),block:"blocksy/socials"},isActive:function(e){return"blocksy/socials"===e.block},icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,l.createElement)("path",{d:"M16.4 14.2c-.8 0-1.5.3-2.1.9l-3.9-2.3c.1-.3.1-.5.1-.8 0-.3-.1-.5-.1-.8L14.3 9c.5.5 1.3.9 2.1.9 1.6 0 2.9-1.3 2.9-2.9S18 4 16.4 4s-2.9 1.3-2.9 2.9c0 .3.1.5.1.8L9.7 10c-.5-.6-1.3-.9-2.1-.9-1.6 0-2.9 1.3-2.9 2.9 0 1.6 1.3 2.9 2.9 2.9.8 0 1.5-.3 2.1-.9l3.9 2.3c-.1.3-.1.5-.1.8 0 1.6 1.3 2.9 2.9 2.9s2.9-1.3 2.9-2.9c0-1.6-1.3-2.9-2.9-2.9zm0-8.7c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5-1.5-.7-1.5-1.5.7-1.5 1.5-1.5zm-8.8 8c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm8.8 5c-.8 0-1.5-.7-1.5-1.5 0-.3.1-.5.2-.7.3-.4.7-.7 1.2-.7.8 0 1.5.7 1.5 1.5s-.6 1.4-1.4 1.4z"}))}});var zo={initialColor:"",customInitialColor:"",hoverColor:"",customHoverColor:"",borderColor:"rgba(218, 222, 228, 0.5)",customBorderColor:"rgba(218, 222, 228, 0.5)",borderHoverColor:"rgba(218, 222, 228, 0.7)",customBorderHoverColor:"rgba(218, 222, 228, 0.7)",backgroundColor:"rgba(218, 222, 228, 0.5)",customBackgroundColor:"rgba(218, 222, 228, 0.5)",backgroundHoverColor:"rgba(218, 222, 228, 0.7)",customBackgroundHoverColor:"rgba(218, 222, 228, 0.7)"},Mo=$t(zo);function Fo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Ro(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Fo(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Fo(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Vo=Ro({link_nofollow:"no",share_icons_size:"",items_spacing:""},zo),Lo=function(e){var t=e.attributes,o=t.share_icons_color,n=t.share_icons_size,r=t.share_type,a=t.share_icons_fill,i=t.items_spacing,c=(0,l.useCallback)((function(e){var t=document.createElement("div");return t.innerHTML=e,t.querySelector(".ct-share-box").innerHTML}),[o,n,r,a,i]),s=Zt("share-box",Ro(Ro({},t),Vo),c),u=s.isLoading,p=s.preview;return u?(0,l.createElement)(h.Spinner,null):(0,l.createElement)(l.RawHTML,{className:"ct-share-box","data-type":"type-3"},p)};function Uo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function qo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Uo(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Uo(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Go=Vt("share_box"),Wo=(0,c.withColors)({initialColor:"color"},{hoverColor:"color"},{backgroundColor:"color"},{backgroundHoverColor:"color"},{borderColor:"color"},{borderHoverColor:"color"})((function(e){var t=e.attributes,o=e.setAttributes,n=e.clientId,r=e.className,i=e.initialColor,s=e.setInitialColor,u=e.hoverColor,p=e.setHoverColor,d=e.backgroundColor,m=e.setBackgroundColor,f=e.backgroundHoverColor,b=e.setBackgroundHoverColor,y=e.borderColor,h=e.setBorderColor,g=e.borderHoverColor,_=e.setBorderHoverColor,k=t.items_spacing,w=void 0===k?"":k,O=t.share_icons_size,x=void 0===O?"":O,C=t.share_type,E=void 0===C?"simple":C,P=t.share_icons_fill,S=void 0===P?"outline":P,j=t.share_icons_color,I=void 0===j?"default":j,T=(0,l.useRef)(),D=(0,c.useBlockProps)({ref:T,className:{"ct-shares-block":!0,className:r},style:qo(qo({"--theme-icon-color":null==i?void 0:i.color,"--theme-icon-hover-color":null==u?void 0:u.color,"--background-color":"solid"===S?null==d?void 0:d.color:null==y?void 0:y.color,"--background-hover-color":"solid"===S?null==f?void 0:f.color:null==g?void 0:g.color},x?{"--theme-icon-size":"".concat(x,"px")}:{}),w?{"--items-spacing":"".concat(w,"px")}:{})});return(0,l.createElement)("div",D,(0,l.createElement)(Lo,{attributes:t,setAttributes:o}),(0,l.createElement)(to,{attributes:t,setAttributes:o,options:Go}),"default"===I?(0,l.createElement)(c.InspectorControls,{group:"styles"},(0,l.createElement)(v,{label:(0,a.__)("Icon Color","blocksy-companion"),resetAll:function(){s(zo.initialColor),p(zo.hoverColor)},panelId:n,settings:[{colorValue:i.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return s(e||zo.initialColor)}},{colorValue:u.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return p(e||zo.hoverColor)}}]}),"simple"!==E&&("solid"===S?(0,l.createElement)(v,{label:(0,a.__)("Icons Background Colors","blocksy-companion"),resetAll:function(){m(zo.backgroundColor),b(zo.backgroundHoverColor)},panelId:n,settings:[{colorValue:d.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return m(e||zo.backgroundColor)}},{colorValue:f.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return b(e||zo.backgroundHoverColor)}}]}):(0,l.createElement)(v,{label:(0,a.__)("Icons Border Colors","blocksy-companion"),resetAll:function(){h(zo.borderColor),_(zo.borderHoverColor)},panelId:n,settings:[{colorValue:y.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return h(e||zo.borderColor)}},{colorValue:g.color,enableAlpha:!0,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return _(e||zo.borderHoverColor)}}]}))):null)}));function Zo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function $o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Zo(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Zo(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Ko=["facebook","twitter","pinterest","linkedin"],Xo=["facebook","twitter","pinterest","linkedin","reddit","hacker_news","vk","ok","telegram","viber","whatsapp","flipboard","line","email","clipboard"],Jo=[{apiVersion:3,isEligible:function(e){return!e.share_networks},migrate:function(e){var t=Xo.reduce((function(t,o){return e["share_".concat(o)]?("yes"===e["share_".concat(o)]&&t.push({id:o,enabled:!0}),t):(Ko.includes(o)&&t.push({id:o,enabled:!0}),t)}),[]);return $o($o({},Object.keys(e).reduce((function(t,o){return Xo.includes(o.replace("share_",""))||(t[o]=e[o]),t}),{})),{},{share_networks:t})},attributes:{title:{type:"string",default:"Share Icons"},share_facebook:{type:"string",default:"yes"},share_twitter:{type:"string",default:"yes"},share_pinterest:{type:"string",default:"yes"},share_linkedin:{type:"string",default:"yes"},share_reddit:{type:"string",default:"no"},share_hacker_news:{type:"string",default:"no"},share_vk:{type:"string",default:"no"},share_ok:{type:"string",default:"no"},share_telegram:{type:"string",default:"no"},share_viber:{type:"string",default:"no"},share_whatsapp:{type:"string",default:"no"},share_flipboard:{type:"string",default:"no"},share_line:{type:"string",default:"no"},share_email:{type:"string",default:"no"},share_clipboard:{type:"string",default:"no"},share_item_tooltip:{type:"string",default:"no"},link_nofollow:{type:"string",default:"no"},share_icons_size:{type:"string",default:""},items_spacing:{type:"string",default:""},share_icons_color:{type:"string",default:"default"},share_type:{type:"string",default:"simple"},share_icons_fill:{type:"string",default:"outline"},initialColor:{type:"string",default:""},customInitialColor:{type:"string",default:""},hoverColor:{type:"string",default:""},customHoverColor:{type:"string",default:""},borderColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},customBorderColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},borderHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"},customBorderHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"},backgroundColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},customBackgroundColor:{type:"string",default:"rgba(218, 222, 228, 0.5)"},backgroundHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"},customBackgroundHoverColor:{type:"string",default:"rgba(218, 222, 228, 0.7)"}},save:function(e){return(0,l.createElement)("div",null,"Blocksy: Share Box")}}];function Yo(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Qo(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Yo(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Yo(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var en=Rt(Vt("share_box"));function tn(e){e=function(e){const{body:t}=document.implementation.createHTMLDocument("");t.innerHTML=e;const o=t.getElementsByTagName("*");let n=o.length;for(;n--;){const e=o[n];if("SCRIPT"===e.tagName)(r=e).parentNode,r.parentNode.removeChild(r);else{let t=e.attributes.length;for(;t--;){const{name:o}=e.attributes[t];o.startsWith("on")&&e.removeAttribute(o)}}}var r;return t.innerHTML}(e);const t=document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body.textContent||""}(0,i.registerBlockType)("blocksy/share-box",{apiVersion:3,title:(0,a.__)("Share Box Controls","blocksy-companion"),icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,l.createElement)("path",{d:"M20 14.6c-.2-.3-.5-.6-.9-.8.1-1.2-.1-2.4-.6-3.5s-1.3-2.1-2.3-2.9c-.4-.3-.8-.5-1.3-.8 0-.6-.2-1.2-.5-1.6-.3-.5-.8-.9-1.4-1.1-1-.4-2.4-.1-3.2.8-.5.5-.8 1.2-.8 2-1 .4-1.8 1-2.5 1.8-.8 1-1.4 2.1-1.6 3.3-.1.6-.1 1.3-.1 2-.7.4-1.2 1-1.4 1.7-.3 1.2.1 2.4 1 3.2s2.3.8 3.3.2c.9.6 1.9 1.1 3 1.2.4.1.8.1 1.2.1.9 0 1.9-.2 2.7-.5.5-.2.9-.5 1.4-.8.2.1.4.2.7.3 1.1.3 2.4-.1 3.1-1 .1-.1.2-.3.3-.4v-.1c.7-.9.6-2.2-.1-3.1zm-9.6-8.1c0-.1 0-.2.1-.3 0 0 0-.1.1-.2 0-.1.1-.2.2-.3l.1-.1s.1-.1.1-.2h.1s.1 0 .1-.1c0 0 .1 0 .1-.1h.1c.1 0 .2-.1.3-.1h.7c.1 0 .1 0 .2.1.1 0 .1.1.2.1 0 0 .1 0 .1.1 0 0 .1 0 .1.1l.1.1.2.2v.1l.1.1s0 .1.1.1V7c0 .1 0 .2-.1.3 0 0 0 .1-.1.1 0 0 0 .1-.1.1 0 0-.1.1-.1.2l-.1.1-.1.1h-.1c-.1 0-.1.1-.2.1h-.2c-.1 0-.2.1-.3.1h-1l.1-.1s-.1 0-.1-.1l-.1-.1-.1-.1-.1-.1v-.1l-.1-.1s0-.1-.1-.1v-.1c0-.1-.1-.2-.1-.3V6.6c-.1 0-.1 0-.1-.1zM8 16.6c0 .1-.1.3-.1.4 0 .1-.1.1-.1.2s-.1.1-.1.1l-.1.1-.3.3-.1.1H7v.1c-.1 0-.2.1-.3.1h-.8c-.1 0-.2 0-.3-.1 0 0-.1 0-.1-.1 0 0-.1 0-.1-.1l-.1-.1h-.1l-.1-.1-.1-.1v-.1c.1-.1 0-.2-.1-.3v-.2c0-.1 0-.2-.1-.2V16.3c0-.1 0-.2.1-.2 0 0 0-.1.1-.2 0-.1.1-.2.1-.2l.1-.1.2-.2.1-.1c.1 0 .1-.1.2-.1h.2c.1 0 .2-.1.3-.1h.6c.1 0 .1 0 .2.1l.3-.2s.1 0 .1.1l.2.2c0 .1.1.1.1.1 0 .1.1.1.1.2v.1c.1.2.2.3.2.5v.4c0-.1 0 0 0 0zm7.1 1.4c-.3.2-.5.3-.8.4h-.1l-.2.1c-.1 0-.3.1-.4.1-.3.1-.5.1-.8.2H11.1l-.2-.1c-.1 0-.3-.1-.4-.1-.3-.1-.5-.2-.8-.3-.1-.1-.2-.1-.3-.2-.1-.1-.3-.1-.4-.2 0 .2 0 .1-.1.1.5-.8.6-1.9.3-2.7-.3-.6-.7-1.1-1.2-1.4-.5-.3-1.1-.5-1.7-.4v-1c0-.3.1-.5.2-.8 0-.1.1-.3.1-.4l.1-.3c.1-.2.2-.5.4-.7.1-.1.1-.2.2-.3l.1-.1.1-.1c.1-.4.3-.6.5-.8l.3-.3.1-.1.1-.1c.2-.1.5-.3.7-.4 0 0 .1 0 .1-.1 0 0 0 .1.1.1.3.5.7.9 1.3 1.2.6.3 1.2.4 1.9.3.9-.1 1.7-.8 2.2-1.6.2.1.4.3.7.5l.2.1c.1.1.2.2.3.2.2.2.4.4.5.6l.1.1s0 .1.1.1c.1.1.2.2.2.3.1.2.3.4.4.7 0 .1.1.1.1.2v.1c0 .1.1.2.1.4.1.3.1.5.2.8v1.3c-.4 0-.8 0-1.1.1-1.2.4-2.1 1.6-2 2.9 0 .6.2 1.1.5 1.6zm1.7-3.3zm2.4 1.8v.2c0 .1 0 .2-.1.3v.1c0 .1 0 .1-.1.1 0 0-.1.1-.1.2l-.2.2-.1.1c-.1.1-.2.1-.3.2h-.1c-.1 0-.2.1-.3.1h-.7c-.1 0-.2-.1-.3-.2h-.1l-.1-.1-.1-.1c-.1-.1-.1-.2-.2-.3v-.2c0-.1-.1-.2-.1-.4v-.4c0-.1 0-.2.1-.3l.1-.2v-.1c0-.1.1-.2.2-.3l.1-.1.1-.1c.1-.1.2-.1.3-.2h.2c.1 0 .2-.1.3-.1H18.7c.1 0 .2.1.3.2l.1.1.2.2c.1.1.1.2.2.3v.2c0 .1.1.2.1.3v.1c-.4 0-.4.1-.4.2z"}))},supports:{html:!1,inserter:!1,lock:!1},parent:["blocksy/widgets-wrapper"],attributes:Qo(Qo({},en),Mo),edit:function(e){return(0,l.createElement)(Wo,e)},save:function(){return(0,l.createElement)("div",null,"Blocksy: Share Box")},deprecated:Jo}),wp.blocks.registerBlockVariation("blocksy/widgets-wrapper",{name:"blocksy-share-box",title:(0,a.__)("Share Box","blocksy-companion"),description:(0,a.__)("Share content on social media, boosting visibility & engagement.","blocksy-companion"),attributes:{heading:(0,a.__)("Share Box","blocksy-companion"),block:"blocksy/share-box"},isActive:function(e){return"blocksy/share-box"===e.block},icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,l.createElement)("path",{d:"M20 14.6c-.2-.3-.5-.6-.9-.8.1-1.2-.1-2.4-.6-3.5s-1.3-2.1-2.3-2.9c-.4-.3-.8-.5-1.3-.8 0-.6-.2-1.2-.5-1.6-.3-.5-.8-.9-1.4-1.1-1-.4-2.4-.1-3.2.8-.5.5-.8 1.2-.8 2-1 .4-1.8 1-2.5 1.8-.8 1-1.4 2.1-1.6 3.3-.1.6-.1 1.3-.1 2-.7.4-1.2 1-1.4 1.7-.3 1.2.1 2.4 1 3.2s2.3.8 3.3.2c.9.6 1.9 1.1 3 1.2.4.1.8.1 1.2.1.9 0 1.9-.2 2.7-.5.5-.2.9-.5 1.4-.8.2.1.4.2.7.3 1.1.3 2.4-.1 3.1-1 .1-.1.2-.3.3-.4v-.1c.7-.9.6-2.2-.1-3.1zm-9.6-8.1c0-.1 0-.2.1-.3 0 0 0-.1.1-.2 0-.1.1-.2.2-.3l.1-.1s.1-.1.1-.2h.1s.1 0 .1-.1c0 0 .1 0 .1-.1h.1c.1 0 .2-.1.3-.1h.7c.1 0 .1 0 .2.1.1 0 .1.1.2.1 0 0 .1 0 .1.1 0 0 .1 0 .1.1l.1.1.2.2v.1l.1.1s0 .1.1.1V7c0 .1 0 .2-.1.3 0 0 0 .1-.1.1 0 0 0 .1-.1.1 0 0-.1.1-.1.2l-.1.1-.1.1h-.1c-.1 0-.1.1-.2.1h-.2c-.1 0-.2.1-.3.1h-1l.1-.1s-.1 0-.1-.1l-.1-.1-.1-.1-.1-.1v-.1l-.1-.1s0-.1-.1-.1v-.1c0-.1-.1-.2-.1-.3V6.6c-.1 0-.1 0-.1-.1zM8 16.6c0 .1-.1.3-.1.4 0 .1-.1.1-.1.2s-.1.1-.1.1l-.1.1-.3.3-.1.1H7v.1c-.1 0-.2.1-.3.1h-.8c-.1 0-.2 0-.3-.1 0 0-.1 0-.1-.1 0 0-.1 0-.1-.1l-.1-.1h-.1l-.1-.1-.1-.1v-.1c.1-.1 0-.2-.1-.3v-.2c0-.1 0-.2-.1-.2V16.3c0-.1 0-.2.1-.2 0 0 0-.1.1-.2 0-.1.1-.2.1-.2l.1-.1.2-.2.1-.1c.1 0 .1-.1.2-.1h.2c.1 0 .2-.1.3-.1h.6c.1 0 .1 0 .2.1l.3-.2s.1 0 .1.1l.2.2c0 .1.1.1.1.1 0 .1.1.1.1.2v.1c.1.2.2.3.2.5v.4c0-.1 0 0 0 0zm7.1 1.4c-.3.2-.5.3-.8.4h-.1l-.2.1c-.1 0-.3.1-.4.1-.3.1-.5.1-.8.2H11.1l-.2-.1c-.1 0-.3-.1-.4-.1-.3-.1-.5-.2-.8-.3-.1-.1-.2-.1-.3-.2-.1-.1-.3-.1-.4-.2 0 .2 0 .1-.1.1.5-.8.6-1.9.3-2.7-.3-.6-.7-1.1-1.2-1.4-.5-.3-1.1-.5-1.7-.4v-1c0-.3.1-.5.2-.8 0-.1.1-.3.1-.4l.1-.3c.1-.2.2-.5.4-.7.1-.1.1-.2.2-.3l.1-.1.1-.1c.1-.4.3-.6.5-.8l.3-.3.1-.1.1-.1c.2-.1.5-.3.7-.4 0 0 .1 0 .1-.1 0 0 0 .1.1.1.3.5.7.9 1.3 1.2.6.3 1.2.4 1.9.3.9-.1 1.7-.8 2.2-1.6.2.1.4.3.7.5l.2.1c.1.1.2.2.3.2.2.2.4.4.5.6l.1.1s0 .1.1.1c.1.1.2.2.2.3.1.2.3.4.4.7 0 .1.1.1.1.2v.1c0 .1.1.2.1.4.1.3.1.5.2.8v1.3c-.4 0-.8 0-1.1.1-1.2.4-2.1 1.6-2 2.9 0 .6.2 1.1.5 1.6zm1.7-3.3zm2.4 1.8v.2c0 .1 0 .2-.1.3v.1c0 .1 0 .1-.1.1 0 0-.1.1-.1.2l-.2.2-.1.1c-.1.1-.2.1-.3.2h-.1c-.1 0-.2.1-.3.1h-.7c-.1 0-.2-.1-.3-.2h-.1l-.1-.1-.1-.1c-.1-.1-.1-.2-.2-.3v-.2c0-.1-.1-.2-.1-.4v-.4c0-.1 0-.2.1-.3l.1-.2v-.1c0-.1.1-.2.2-.3l.1-.1.1-.1c.1-.1.2-.1.3-.2h.2c.1 0 .2-.1.3-.1H18.7c.1 0 .2.1.3.2l.1.1.2.2c.1.1.1.2.2.3v.2c0 .1.1.2.1.3v.1c-.4 0-.4.1-.4.2z"}))}});var on=function(e){return"wp"===e.provider?"featured_image"===e.id||"author_avatar"===e.id||"archive_image"===e.id||"term_image"===e.id:"image"===e.type},nn={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"};function rn(e){return function(e){return!e||"center center"===e||"center"===e}(e)?"":nn[e]}function ln(e){return tn(e=e.replace(/<br>/g,"\n")).trim().replace(/\n\n+/g,"\n\n")}var an=function(e){var t=e.attributes.has_field_link,o=e.postId,n=e.postType,r=C((0,be.useEntityProp)("postType",n,"title",o),3),a=r[0],i=void 0===a?"":a;r[1],r[2];return o?i?"yes"===t?(0,l.createElement)("a",{href:"#",rel:"noopener noreferrer"},ln(i)):ln(i):null:"Title"},cn=function(e){if(!e)return"";var t=(new window.DOMParser).parseFromString(e,"text/html");return t.body.textContent||t.body.innerText||""},sn=function(e){var t=e.attributes.excerpt_length,o=e.postId,n=e.postType,r=e.fallback,a=C((0,be.useEntityProp)("postType",n,"excerpt",o),3),i=a[0],c=(a[1],a[2]),s=(c=void 0===c?{}:c).rendered,u=(c.protected,C((0,be.useEntityProp)("postType",n,"content",o),3)),p=(u[0],u[1],u[2]),d=(p=void 0===p?{}:p).rendered,m=(i||cn(s)||cn(d)).trim(),f=m.split(" ",t).join(" "),b=f!==m?"...":"";return o?f?(0,l.createElement)(l.RawHTML,null,f,b):r:"Excerpt"},un=window.wp.date,pn=function(e){var t=e.postId,o=e.postType,n=e.attributes,r=n.date_type,a=n.default_format,i=n.date_format,c=n.custom_date_format,s=n.has_field_link,u=C((0,be.useEntityProp)("postType",o,"published"===r?"date":"modified",t),1)[0],p="yes"===a?(0,un.getSettings)().formats.date:"custom"!==i?i:c,d=(0,l.createElement)("span",null,(0,un.format)(p,u));return t?(s&&(d=(0,l.createElement)("a",{href:"#"},d)),d):"Date"},dn=window.wp.apiFetch,mn=n.n(dn),fn=window.wp.url,bn={},yn=function(e){var t=e.postId,o=C((0,l.useState)(null),2),n=o[0],r=o[1];return(0,l.useEffect)((function(){bn[t]&&r(bn[t]),bn[t]||mn()({path:(0,fn.addQueryArgs)("/wp/v2/comments",{post:t,_fields:"id"}),method:"HEAD",parse:!1}).then((function(e){var o={total:parseInt(e.headers.get("X-WP-Total"))};r(o),bn[t]=o}))}),[t]),{commentsData:n}},hn=function(e){var t=e.postId,o=(e.postType,e.attributes),n=o.has_field_link,r=o.zero_text,a=o.single_text,i=o.multiple_text,c=yn({postId:t}).commentsData,s=c&&c.total?c.total:0,u=0===s?r:1===s?a:i;return"yes"===n?(0,l.createElement)("a",{href:"#",rel:"noopener noreferrer"},u.replace("%",s)):u.replace("%",s)},vn=function(e,t){switch(t){case"email":return(null==e?void 0:e.email)||"";case"nicename":return(null==e?void 0:e.nickname)||"";case"display_name":return(null==e?void 0:e.name)||"";case"first_name":return(null==e?void 0:e.first_name)||"";case"last_name":return(null==e?void 0:e.last_name)||"";case"description":return(null==e?void 0:e.description)||""}},gn=function(e){var t=e.postId,o=e.postType,n=e.attributes,r=n.has_field_link,a=n.author_field,i=e.fallback,c=(e.fieldsDescriptor,(0,s.useSelect)((function(e){var n,r=e(be.store),l=r.getEditedEntityRecord,a=r.getUser,i=(r.getUsers,null===(n=l("postType",o,t))||void 0===n?void 0:n.author);return{authorId:i,authorDetails:i?a(i):null}}),[o,t])),u=(c.authorId,c.authorDetails);return t?u?"yes"===r?(0,l.createElement)("a",{href:"#",rel:"noopener noreferrer"},vn(u,a)||i):vn(u,a)||i:null:"Author: ".concat(a)},_n=function(e){var t,o=e.postId,n=e.postType,a=e.fallback,i=e.attributes,c=e.attributes,u=c.has_field_link,p=c.taxonomy,d=c.separator,m=(e.fieldsDescriptor,_e(n)),f=(0,s.useSelect)((function(e){return{terms:e("core").getEntityRecords("taxonomy",p||(m&&m.length>0?m[0].slug:""),{per_page:-1,post:o})||[]}})).terms,b=(null===(t=m.find((function(e){return e.slug===p})))||void 0===t?void 0:t.name)||"Category";if(!o)return"".concat(b);if(0===f.length)return a||"".concat(b);var h="span",v={};return"yes"===u&&(h="a",v.href="#",v.rel="noopener noreferrer"),f.map((function(e,t){return(0,l.createElement)(React.Fragment,null,(0,l.createElement)(h,y({},v,{className:Y()(r({},"ct-term-".concat(e.id),"yes"===i.termAccentColor),i.termClass),dangerouslySetInnerHTML:{__html:e.name}})),t!==f.length-1?d.replace(/ /g," "):"")}))},kn={x:.5,y:.5};function wn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kn,t=e.x,o=e.y;return"".concat(Math.round(100*t),"% ").concat(Math.round(100*o),"%")}var On=function(e){var t=e.attributes,o=e.url,n=t.hasParallax,r=t.focalPoint,a=t.alt,i=o?"url(".concat(o,")"):void 0,c=wn(r);return o?n?(0,l.createElement)("div",{role:a?"img":void 0,"aria-label":a||void 0,className:Y()("wp-block-cover__image-background",{"has-parallax":n}),style:{backgroundImage:i,backgroundPosition:c}}):(0,l.createElement)("img",{alt:a,className:Y()("wp-block-cover__image-background",{"has-parallax":n}),src:o,style:{objectPosition:r?wn(r):void 0}}):(0,l.createElement)("div",{className:Y()("ct-dynamic-data-placeholder",{})},(0,l.createElement)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",className:"ct-dynamic-data-placeholder-illustration","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"})))};var xn=function(){return xn=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},xn.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function Cn(e){return e.toLowerCase()}var En=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Pn=/[^A-Z0-9]+/gi;function Sn(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce((function(e,t){return e.replace(t,o)}),e)}function jn(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var o=t.splitRegexp,n=void 0===o?En:o,r=t.stripRegexp,l=void 0===r?Pn:r,a=t.transform,i=void 0===a?Cn:a,c=t.delimiter,s=void 0===c?" ":c,u=Sn(Sn(e,n,"$1\0$2"),l,"\0"),p=0,d=u.length;"\0"===u.charAt(p);)p++;for(;"\0"===u.charAt(d-1);)d--;return u.slice(p,d).split("\0").map(i).join(s)}(e,xn({delimiter:"."},t))}var In=window.wp.styleEngine;function Tn(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Dn(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Tn(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Tn(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function An(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.additionalRules,n=E(t,["additionalRules"]),r=[].concat(P((0,In.getCSSRules)(e,n)),P(o||[]));if(null==n||!n.selector){var l=[];return r.forEach((function(e){l.push("".concat(Hn(e.key),": ").concat(e.value,";"))})),l.join(" ")}var a=r.reduce((function(e,t){var o=t.selector;return o?(e[o]||(e[o]=[]),e[o].push(t),e):e}),{});return Object.keys(a).reduce((function(e,t){return e.push("".concat(t," { ").concat(a[t].map((function(e){return"".concat(Hn(e.key),": ").concat(e.value,";")})).join(" ")," }")),e}),[]).join("\n")}function Bn(e,t){var o=C((0,c.useSettings)("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow"),56),n=o[0],r=o[1],a=o[2],i=o[3],s=o[4],u=o[5],p=o[6],d=o[7],m=o[8],f=o[9],b=o[10],y=o[11],h=o[12],v=o[13],g=o[14],_=o[15],k=o[16],w=o[17],O=o[18],x=o[19],E=o[20],P=o[21],S=o[22],j=o[23],I=o[24],T=o[25],D=o[26],A=o[27],B=o[28],H=o[29],N=o[30],z=o[31],M=o[32],F=o[33],R=o[34],V=o[35],L=o[36],U=o[37],q=o[38],G=o[39],W=o[40],Z=o[41],$=o[42],K=o[43],X=o[44],J=o[45],Y=o[46],Q=o[47],ee=o[48],te=o[49],oe=o[50],ne=o[51],re=o[52],le=o[53],ae=o[54],ie=o[55];return(0,l.useMemo)((function(){return{background:{backgroundImage:n,backgroundSize:r},color:{palette:{custom:L,theme:q,default:G},gradients:{custom:J,theme:Y,default:Q},duotone:{custom:$,theme:K,default:X},defaultGradients:ee,defaultPalette:W,defaultDuotone:Z,custom:V,customGradient:te,customDuotone:U,background:oe,link:ne,heading:le,button:ae,text:re},typography:{fontFamilies:{custom:a,default:i,theme:s},fontSizes:{custom:p,default:d,theme:m},customFontSize:f,defaultFontSizes:u,fontStyle:b,fontWeight:y,lineHeight:h,textAlign:v,textColumns:g,textDecoration:_,textTransform:w,letterSpacing:O,writingMode:k},spacing:{spacingSizes:{custom:I,default:T,theme:D},customSpacingSize:j,defaultSpacingSizes:S,padding:x,margin:E,blockGap:P,units:A},border:{color:z,radius:M,style:F,width:R},dimensions:{aspectRatio:B,minHeight:H},layout:N,parentLayout:t,shadow:ie}}),[n,r,a,i,s,u,p,d,m,f,b,y,h,v,g,_,w,O,k,x,E,P,S,j,I,T,D,A,B,H,N,t,z,M,F,R,V,L,U,q,G,W,Z,$,K,X,J,Y,Q,ee,te,oe,ne,re,le,ae,ie])}function Hn(e){var t,o,n=null!==(t=null==e||null===(o=e.toString)||void 0===o?void 0:o.call(e))&&void 0!==t?t:"";return function(e,t){return void 0===t&&(t={}),jn(e,xn({delimiter:"-"},t))}(n=n.replace(/['\u2019]/,""),{splitRegexp:[/(?!(?:1ST|2ND|3RD|[4-9]TH)(?![a-z]))([a-z0-9])([A-Z])/g,/(?!(?:1st|2nd|3rd|[4-9]th)(?![a-z]))([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]})}function Nn(e,t){if(e&&t)return"has-".concat(Hn(t),"-").concat(e)}var zn=function t(o){if(null===o||"object"!==e(o)||Array.isArray(o))return o;var n=Object.entries(o).map((function(e){var o=C(e,2),n=o[0],r=o[1];return[n,t(r)]})).filter((function(e){return void 0!==C(e,2)[1]}));return n.length?Object.fromEntries(n):void 0};function Mn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return(0,In.getCSSRules)(e).forEach((function(e){t[e.key]=e.value})),t}var Fn={link:"a",overlay:".wp-block-cover__background"};function Rn(e,t){if(!e||!t)return t;var o=e.split(","),n=t.split(","),r=[];return o.forEach((function(e){n.forEach((function(t){r.push("".concat(e.trim()," ").concat(t.trim()))}))})),r.join(", ")}var Vn=function(e){var t=e.fieldType,o=e.attributes,n=e.uniqueClass,a=C((0,c.useSettings)("color.palette.custom","color.palette.theme","color.palette.default"),3),i=a[0],s=a[1],u=a[2],p=((0,l.useMemo)((function(){return[].concat(P(i||[]),P(s||[]),P(u||[]))}),[i,s,u]),o.style),d=function(e,t,o,n){var r=[{elementType:"link",pseudo:[":hover"]}];"image"===o&&r.push({elementType:"overlay",additionalRules:function(e,t){return[{selector:e,key:"opacity",value:parseFloat(t.dimRatio)/100}]}});var a=".".concat(n),i=null==e?void 0:e.elements;return{className:n,styles:(0,l.useMemo)((function(){if(i){var e=[];return r.forEach((function(o){var n=o.elementType,r=o.pseudo,l=(o.elements,o.additionalRules),c=null==i?void 0:i[n];if(c){var s=Rn(a,Fn[n]),u=An(c,{selector:s,additionalRules:l?l(s,t):[]});e.push(u),r&&r.forEach((function(t){c[t]&&e.push(An(c[t],{selector:Rn(a,"".concat(Fn[n]).concat(t))}))}))}})),e.length>0?e.join(""):void 0}}),[a,i,t])}}(p,o,t,n);if("text"===t){var m,f,b,y,h,v,g=o.backgroundColor,_=o.textColor,k=Nn("background-color",g),w=Nn("color",_),O=g||(null==p||null===(m=p.color)||void 0===m?void 0:m.background);g||(null==p||null===(f=p.color)||void 0===f||f.background);return{className:Y()(w,d.className,(v={},r(v,k,!!k),r(v,"has-background",O),r(v,"has-text-color",_||(null==p||null===(b=p.color)||void 0===b?void 0:b.text)),r(v,"has-link-color",null==p||null===(y=p.elements)||void 0===y||null===(h=y.link)||void 0===h?void 0:h.color),v)),style:Mn(p),css:d.styles}}return{className:Y()(d.className,{}),style:"",css:d.styles}};function Ln(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Un(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ln(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Ln(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var qn=function(){return(0,l.createElement)("span",{className:"ct-video-indicator"},(0,l.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"#fff"},(0,l.createElement)("path",{className:"ct-play-path",d:"M20,0C8.9,0,0,8.9,0,20s8.9,20,20,20s20-9,20-20S31,0,20,0z M16,29V11l12,9L16,29z"})))},Gn=function(e){var t,o=e.media,n=e.url,a=e.postId,i=e.attributes,s=e.attributes,u=s.aspectRatio,p=s.imageFit,d=s.width,m=s.height,f=s.imageAlign,b=s.image_hover_effect,h=s.videoThumbnail,v=s.minimumHeight,g=s.contentPosition,_=s.viewType,k=s.hasParallax,w=s.gradient,O=s.customGradient,x=(0,c.__experimentalUseBorderProps)(i),E=C((0,c.useSettings)("color.gradients","color.customGradient"),1)[0],P=O||(0,c.getGradientValueBySlug)(E,w),S=(0,c.__experimentalGetGradientClass)(w),j=(0,c.useBlockProps)({className:Y()("ct-dynamic-media",(t={},r(t,"align".concat(f),f),r(t,"wp-block-cover","cover"===_),r(t,"has-parallax","cover"===_&&k),r(t,rn(g),"cover"===_&&g),r(t,"has-custom-content-position","cover"===_&&g),t)),style:{width:d,height:m}}),I=j.className.split(" ").find((function(e){return e.startsWith("wp-elements-")})),T=Vn({fieldType:"image",attributes:i,uniqueClass:I}),D={height:u?"100%":m,width:!!u&&"100%",objectFit:p,aspectRatio:u},A=i.allowCustomContentAndWideSize,B=i.contentSize,H=i.wideSize,N=(0,c.useInnerBlocksProps)({className:Y()("wp-block-cover__inner-container",{"is-layout-constrained":A,"wp-block-cover-is-layout-constrained":A,"is-layout-flow":!A,"wp-block-cover-is-layout-flow":!A})},{template:[["core/paragraph",{align:"center",placeholder:"Add text…"}]],templateInsertUpdatesSelection:!1}),z=(null==o?void 0:o.has_video)&&"yes"===h||"none"!==b;if("cover"===_)return(0,l.createElement)("div",y({},j,{style:Un(Un(Un(Un({},j.style||{}),x.style||{}),"auto"!==u?{aspectRatio:u}:{}),{},{minHeight:v||("auto"!==u?"unset":void 0)}),className:Y()(j.className,x.className,T.className)}),(0,l.createElement)("style",null,"\n\t\t\t\t\t\t\t".concat(B?"#".concat(j.id," > .wp-block-cover__inner-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {\n\t\t\t\t\t\t\t\t\t\tmax-width: ").concat(B,";\n\t\t\t\t\t\t\t\t\t}"):"","\n\n\t\t\t\t\t\t\t").concat(H?"#".concat(j.id," > .wp-block-cover__inner-container > .alignwide {\n\t\t\t\t\t\t\t\t\t\t\tmax-width: ").concat(H,";\n\t\t\t\t\t\t\t\t\t\t}"):"","\n\t\t\t\t\t\t"),T.css),(0,l.createElement)(On,{attributes:i,url:n}),(0,l.createElement)("span",{"aria-hidden":"true",className:Y()("wp-block-cover__background",r({"wp-block-cover__gradient-background":!!P,"has-background-gradient":!!P},S,!!S)),style:{background:P}}),(0,l.createElement)("div",N));var M=(0,l.createElement)("img",{className:z?"":x.className,style:Un(Un({},z?{}:x.style),D),src:n,loading:"lazy"});return n&&a||(M=(0,l.createElement)("div",{className:Y()("ct-dynamic-data-placeholder",r({},x.className,!z)),style:Un(Un({},z?{}:x.style),D)},(0,l.createElement)("svg",{fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60",preserveAspectRatio:"none",className:"ct-dynamic-data-placeholder-illustration","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{vectorEffect:"non-scaling-stroke",d:"M60 60 0 0"})))),z&&(M=(0,l.createElement)("span",{"data-hover":b,className:"ct-dynamic-media-inner ".concat(x.className),style:Un({},x.style)},M,null!=o&&o.has_video&&"yes"===h?(0,l.createElement)(qn,null):null)),(0,l.createElement)("figure",j,M,null!=o&&o.has_video&&"yes"===h?(0,l.createElement)(qn,null):null)},Wn=n(649),Zn=n.n(Wn);n(975);Zn()(console.error);var $n,Kn,Xn,Jn;$n={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},Kn=["(","?"],Xn={")":["("],":":["?","?:"]},Jn=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var Yn={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,o){if(e)throw t;return o}};function Qn(e){var t=function(e){for(var t,o,n,r,l=[],a=[];t=e.match(Jn);){for(o=t[0],(n=e.substr(0,t.index).trim())&&l.push(n);r=a.pop();){if(Xn[o]){if(Xn[o][0]===r){o=Xn[o][1]||o;break}}else if(Kn.indexOf(r)>=0||$n[r]<$n[o]){a.push(r);break}l.push(r)}Xn[o]||a.push(o),e=e.substr(t.index+o.length)}return(e=e.trim())&&l.push(e),l.concat(a.reverse())}(e);return function(e){return function(e,t){var o,n,r,l,a,i,c=[];for(o=0;o<e.length;o++){if(a=e[o],l=Yn[a]){for(n=l.length,r=Array(n);n--;)r[n]=c.pop();try{i=l.apply(null,r)}catch(e){return e}}else i=t.hasOwnProperty(a)?t[a]:+a;c.push(i)}return c[0]}(t,e)}}var er={contextDelimiter:"",onMissingKey:null};function tr(e,t){var o;for(o in this.data=e,this.pluralForms={},this.options={},er)this.options[o]=void 0!==t&&o in t?t[o]:er[o]}tr.prototype.getPluralForm=function(e,t){var o,n,r,l=this.pluralForms[e];return l||("function"!=typeof(r=(o=this.data[e][""])["Plural-Forms"]||o["plural-forms"]||o.plural_forms)&&(n=function(e){var t,o,n;for(t=e.split(";"),o=0;o<t.length;o++)if(0===(n=t[o].trim()).indexOf("plural="))return n.substr(7)}(o["Plural-Forms"]||o["plural-forms"]||o.plural_forms),r=function(e){var t=Qn(e);return function(e){return+t({n:e})}}(n)),l=this.pluralForms[e]=r),l(t)},tr.prototype.dcnpgettext=function(e,t,o,n,r){var l,a,i;return l=void 0===r?0:this.getPluralForm(e,r),a=o,t&&(a=t+this.options.contextDelimiter+o),(i=this.data[e][a])&&i[l]?i[l]:(this.options.onMissingKey&&this.options.onMissingKey(o,e),0===l?o:n)};const or={plural_forms:e=>1===e?0:1},nr=/^i18n\.(n?gettext|has_translation)(_|$)/;const rr=((e,t,o)=>{const n=new tr({}),r=new Set,l=()=>{r.forEach((e=>e()))},a=function(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[o]={...n.data[o],...e},n.data[o][""]={...or,...null===(t=n.data[o])||void 0===t?void 0:t[""]},delete n.pluralForms[o]},i=(e,t)=>{a(e,t),l()},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;return n.data[e]||a(void 0,e),n.dcnpgettext(e,t,o,r,l)},s=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"},u=(e,t,n)=>{let r=c(n,t,e);return o?(r=o.applyFilters("i18n.gettext_with_context",r,e,t,n),o.applyFilters("i18n.gettext_with_context_"+s(n),r,e,t,n)):r};if(e&&i(e,t),o){const e=e=>{nr.test(e)&&l()};o.addAction("hookAdded","core/i18n",e),o.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[e]},setLocaleData:i,addLocaleData:function(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[o]={...n.data[o],...e,"":{...or,...null===(t=n.data[o])||void 0===t?void 0:t[""],...null==e?void 0:e[""]}},delete n.pluralForms[o],l()},resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},i(e,t)},subscribe:e=>(r.add(e),()=>r.delete(e)),__:(e,t)=>{let n=c(t,void 0,e);return o?(n=o.applyFilters("i18n.gettext",n,e,t),o.applyFilters("i18n.gettext_"+s(t),n,e,t)):n},_x:u,_n:(e,t,n,r)=>{let l=c(r,void 0,e,t,n);return o?(l=o.applyFilters("i18n.ngettext",l,e,t,n,r),o.applyFilters("i18n.ngettext_"+s(r),l,e,t,n,r)):l},_nx:(e,t,n,r,l)=>{let a=c(l,r,e,t,n);return o?(a=o.applyFilters("i18n.ngettext_with_context",a,e,t,n,r,l),o.applyFilters("i18n.ngettext_with_context_"+s(l),a,e,t,n,r,l)):a},isRTL:()=>"rtl"===u("ltr","text direction"),hasTranslation:(e,t,r)=>{var l,a;const i=t?t+""+e:e;let c=!(null===(l=n.data)||void 0===l||null===(a=l[null!=r?r:"default"])||void 0===a||!a[i]);return o&&(c=o.applyFilters("i18n.has_translation",c,e,t,r),c=o.applyFilters("i18n.has_translation_"+s(r),c,e,t,r)),c}}})(void 0,void 0,window.wp.hooks.defaultHooks);rr.getLocaleData.bind(rr),rr.setLocaleData.bind(rr),rr.resetLocaleData.bind(rr),rr.subscribe.bind(rr);const lr=rr.__.bind(rr);rr._x.bind(rr),rr._n.bind(rr),rr._nx.bind(rr),rr.isRTL.bind(rr),rr.hasTranslation.bind(rr);function ar(e){var t=e.postId,o=e.postType,n=(0,s.useSelect)((function(e){var n,r=e(be.store),l=r.getEditedEntityRecord,a=r.getUser,i=null===(n=l("postType",o,t))||void 0===n?void 0:n.author;return{authorDetails:i?a(i):null}}),[o,t]).authorDetails,r=null!=n&&n.avatar_urls?Object.values(n.avatar_urls):null,l=(null!=n&&n.avatar_urls&&Object.keys(n.avatar_urls),(0,s.useSelect)((function(e){return(0,e(c.store).getSettings)().__experimentalDiscussionSettings})).avatarURL);return{src:r?r[r.length-1]:l}}function ir(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function cr(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ir(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ir(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var sr=function(e){var t=e.postId,o=e.postType,n=e.attributes,a=e.attributes,i=a.avatar_size,s=a.imageAlign,u=a.has_field_link,p=(0,c.useBlockProps)({className:Y()("ct-dynamic-media",r({},"align".concat(s),s)),style:{}}),d=(0,c.__experimentalUseBorderProps)(n),m=ar({postId:t,postType:o}),f=(0,fn.addQueryArgs)((0,fn.removeQueryArgs)(m.src,["s"]),{s:2*i}),b=cr({},d.style),y=(0,l.createElement)("img",{style:cr(cr({},b),{},{width:"".concat(i,"px"),height:"".concat(i,"px")}),src:f,className:Y()("avatar","avatar-"+i,"photo",d.className)});return u&&(y=(0,l.createElement)("a",{href:"#"},y)),(0,l.createElement)("figure",p,y)},ur={"wp:term_title":(0,a.__)("Term Title","blocksy-companion"),"wp:term_description":(0,a.__)("Term Description","blocksy-companion"),"wp:term_count":(0,a.__)("Term Count","blocksy-companion")},pr={"wp:term_title":"name","wp:term_description":"description","wp:term_count":"count"},dr=function(e){var t=e.termId,o=e.taxonomy,n=e.attributes,a=e.attributes.has_field_link,i=(e.fieldsDescriptor,(0,s.useSelect)((function(e){return{terms:e("core").getEntityRecords("taxonomy",o,{per_page:1,include:[t]})||[]}})).terms);if(!i.length)return ur[n.field]||ur["wp:term_title"];var c="span",u={};"yes"===a&&(c="a",u.href="#",u.rel="noopener noreferrer");var p=i[0][pr[n.field]];return(0,l.createElement)(c,y({},u,{className:Y()(r({},"ct-term-".concat(i[0].id),"yes"===n.termAccentColor),n.termClass),dangerouslySetInnerHTML:{__html:p}}))};var mr=function(e){var t=e.termImage,o=e.termIcon,n=e.attributes,r=e.attributes,a=r.sizeSlug,i="icon"===r.imageSource?null==o?void 0:o.attachment_id:null==t?void 0:t.attachment_id,c=function(e,t){var o,n,r;return(null==e||null===(o=e.media_details)||void 0===o||null===(n=o.sizes)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.source_url)||(null==e?void 0:e.source_url)}((0,s.useSelect)((function(e){var t=e(be.store).getMedia;return{media:i&&t(i,{context:"view"})}}),[i]).media,a);return(0,l.createElement)(Gn,{attributes:n,url:c,postId:!0})};var fr=function(e){var t=e.postType,o=e.postId,n=e.attributes,r=e.attributes.sizeSlug,a=C((0,be.useEntityProp)("postType",t,"featured_media",o),2),i=a[0],c=(a[1],(0,s.useSelect)((function(e){var t=e(be.store).getMedia;return{media:i&&t(i,{context:"view"})}}),[i]).media),u=function(e,t){var o,n,r;return(null==e||null===(o=e.media_details)||void 0===o||null===(n=o.sizes)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.source_url)||(null==e?void 0:e.source_url)}(c,r);return(0,l.createElement)(Gn,{postId:o,attributes:n,url:u,media:c})};function br(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function yr(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?br(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):br(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var hr=function(e){var t=e.fieldDescriptor,o=e.fieldsDescriptor,n=e.attributes,i=e.attributes,s=i.align,u=i.tagName,p=i.before,d=i.after,m=i.fallback,f=e.postId,b=e.postType,h=e.termId,v=e.taxonomy,g=(0,c.useBlockProps)({className:Y()("ct-dynamic-data",r({},"has-text-align-".concat(s),s))}),_=g.className.split(" ").find((function(e){return e.startsWith("wp-elements-")})),k=Vn({fieldType:"text",attributes:n,uniqueClass:_}),w=(0,c.__experimentalUseBorderProps)(n),O=null;"archive_title"===t.id&&(O=function(){return(0,a.__)("Archive Title","blocksy-companion")}),"archive_description"===t.id&&(O=function(){return(0,a.__)("Archive Description","blocksy-companion")}),"term_title"!==t.id&&"term_description"!==t.id&&"term_count"!==t.id||(O=dr),"title"===t.id&&(O=an),"excerpt"===t.id&&(O=sn),"date"===t.id&&(O=pn),"comments"===t.id&&(O=hn),"terms"===t.id&&(O=_n),"author"===t.id&&(O=gn);var x="";return o&&o.dynamic_styles&&(x=o.dynamic_styles),k.css&&(x+=k.css),O?(0,l.createElement)(l.Fragment,null,(0,l.createElement)(u,y({},g,w,{style:yr(yr(yr({},g.style||{}),w.style||{}),k.style||{}),className:Y()(g.className,w.className,k.className)}),x&&(0,l.createElement)("style",null,x),p,(0,l.createElement)(O,{attributes:n,postId:f,postType:b,termId:h,taxonomy:v,fallback:m,fieldsDescriptor:o}),d)):null},vr=function(e){var t=e.fieldDescriptor;return"featured_image"===t.id?(0,l.createElement)(fr,e):"author_avatar"===t.id?(0,l.createElement)(sr,e):"term_image"===t.id?(0,l.createElement)(mr,e):"archive_image"===t.id?(0,l.createElement)(Gn,e):(0,l.createElement)(hr,e)};function gr(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function _r(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):gr(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var kr=function(e){var t=e.postId,o=e.fieldDescriptor,n=C((0,l.useState)({}),2),a=n[0],i=n[1],c=(0,l.useMemo)((function(){var e="".concat(wp.ajax.settings.url,"?action=blocksy_dynamic_data_block_custom_field_data"),n={post_id:t,field_provider:o.provider,field_id:o.id};return{url:e,body:n,cacheKey:A(_r(_r({},n),{},{url:e}))}}),[t,o.provider,o.id]);return(0,l.useEffect)((function(){a[c.cacheKey]||U(c.url,c.body).then((function(e){return e.json()})).then((function(e){var t=e.success,o=e.data;t&&i((function(e){return _r(_r({},e),{},r({},c.cacheKey,o.field_data))}))}))}),[c,a]),{fieldData:a[c.cacheKey]?a[c.cacheKey]:null}};function wr(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Or(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?wr(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):wr(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var xr=function(e){var t=e.fieldDescriptor,o=e.attributes,n=e.attributes,a=n.align,i=n.tagName,s=n.before,u=n.after,p=n.fallback,d=e.fieldData,m=(e.colors,(0,c.useBlockProps)({className:Y()("ct-dynamic-data",r({},"has-text-align-".concat(a),a))})),f=m.className.split(" ").find((function(e){return e.startsWith("wp-elements-")})),b=Vn({fieldType:"text",attributes:o,uniqueClass:f}),h=(0,c.__experimentalUseBorderProps)(o),v=!1,g=d||"";g||(v=!0,g=p||"Dynamic data: ".concat(null==t?void 0:t.label)),!v&&g&&"string"==typeof g&&(g=s+g+u);var _="";return b.css&&(_+=b.css),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(i,y({},m,h,{style:Or(Or(Or({},m.style||{}),h.style||{}),b.style||{}),className:Y()(m.className,h.className,b.className),dangerouslySetInnerHTML:{__html:g}})),_&&(0,l.createElement)("style",null,_))},Cr=function(e){var t,o,n,r=e.fieldData,a=e.attributes,i=e.attributes.sizeSlug,c=e.postId,s=null==r||null===(t=r.value)||void 0===t?void 0:t.url;return null!=r&&null!==(o=r.value)&&void 0!==o&&null!==(n=o.sizes)&&void 0!==n&&n[i]&&(s="string"==typeof r.value.sizes[i]?r.value.sizes[i]:r.value.sizes[i].url),(0,l.createElement)(Gn,{postId:c,attributes:a,url:s})},Er=function(e){var t=e.fieldDescriptor,o=e.postId,n=(e.postType,e.attributes),r=kr({postId:o,fieldDescriptor:t}).fieldData;return"image"===t.type?(0,l.createElement)(Cr,{fieldData:r,fieldDescriptor:t,attributes:n,postId:o}):(0,l.createElement)(xr,{fieldData:r,fieldDescriptor:t,attributes:n,postId:o})},Pr=function(e){var t=e.product;return(0,l.createElement)(l.RawHTML,null,null==t?void 0:t.price_html)},Sr=function(e){var t=e.product;return null!=t&&t.is_in_stock?(0,a.__)("In Stock","blocksy-companion"):(0,a.__)("Out of Stock","blocksy-companion")},jr=function(e){var t=e.product,o=parseFloat(null==t?void 0:t.average_rating)/5*100+"%";return(0,l.createElement)("div",{className:"star-rating",role:"img","aria-label":"Rated 2.15 out of 5"},(0,l.createElement)("span",{style:{width:o}},(0,a.sprintf)((0,a.__)("Rated %s out of 5","blocksy-companion"),null==t?void 0:t.average_rating)))},Ir=function(e){var t=e.product;return(null==t?void 0:t.sku)||""},Tr=function(e){var o=e.product,n=e.attributes,r=kr({postId:o.id,fieldDescriptor:{provider:"woo",id:"brands"}}).fieldData;return(0,l.createElement)("div",{className:"ct-product-brands",style:{"--product-brand-logo-size":"".concat(n.brands_size,"px"),"--product-brands-gap":"".concat(n.brands_gap,"px")}},r&&r.map((function(e){return e.image&&e.image.url?(0,l.createElement)("span",{key:e.slug,className:"ct-media-container"},(0,l.createElement)("img",{src:e.image.url,alt:e.name})):(0,l.createElement)("span",{key:e.slug,dangerouslySetInnerHTML:{__html:t.name}})})))};function Dr(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Ar(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Dr(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Dr(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Br=function(e){var t=e.fieldDescriptor,o=e.attributes,n=e.attributes,a=n.align,i=n.tagName,s=n.before,u=n.after,p=n.fallback,d=e.postId,m=e.postType,f=(e.colors,wc.wcBlocksSharedContext.useProductDataContext()),b=f.product,v=f.isLoading,g=(0,c.useBlockProps)({className:Y()("ct-dynamic-data",r({},"has-text-align-".concat(a),a))}),_=g.className.split(" ").find((function(e){return e.startsWith("wp-elements-")})),k=Vn({fieldType:"text",attributes:o,uniqueClass:_}),w=(0,c.__experimentalUseBorderProps)(o);if(v)return(0,l.createElement)(h.Spinner,null);var O=null;"price"===t.id&&(O=Pr),"stock_status"===t.id&&(O=Sr),"brands"===t.id&&(O=Tr),"rating"===t.id&&(O=jr),"sku"===t.id&&(O=Ir);var x="";return k.css&&(x+=k.css),O?(0,l.createElement)(i,y({},g,w,{style:Ar(Ar(Ar({},g.style||{}),w.style||{}),k.style||{}),className:Y()(g.className,w.className,k.className)}),x&&(0,l.createElement)("style",null,x),s,(0,l.createElement)(O,{attributes:o,postId:d,postType:m,fallback:p,product:b}),u):null},Hr=function(e){e.fieldDescriptor;var t=e.postId;return(0,wc.wcBlocksSharedHocs.withProductDataContext)(Br)(Ar(Ar({},e),{},{productId:t}))},Nr=function(e){var t=e.fieldDescriptor,o=e.fieldsDescriptor,n=e.postId,r=e.postType,a=e.termId,i=e.taxonomy,c=e.termIcon,s=e.termImage,u=e.attributes,p=e.attributes,d=(p.tagName,p.align,p.field,p.before,p.after,p.fallback,e.colors);return"woo"===t.provider?(0,l.createElement)(Hr,{fieldDescriptor:t,attributes:u,postId:n,postType:r,colors:d}):"wp"===t.provider?(0,l.createElement)(vr,{fieldsDescriptor:o,fieldDescriptor:t,attributes:u,postId:n,postType:r,termId:a,taxonomy:i,termImage:s,termIcon:c,colors:d}):(0,l.createElement)(Er,{fieldDescriptor:t,attributes:u,postId:n,postType:r,colors:d})};function zr(e){var t=e.level,o=e.isPressed,n=void 0!==o&&o,r={h1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",h2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",h3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",h4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",h5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",h6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z",p:"M6.2 15V5h3.2c1.2 0 2 .1 2.4.2.6.2 1 .5 1.4 1 .4.5.6 1.1.6 1.9 0 .6-.1 1.1-.3 1.6-.2.4-.5.8-.9 1-.3.2-.7.4-1 .5-.5.1-1.2.1-2.1.1H8.2V15h-2zm2-8.3v2.8h1.1c.8 0 1.3 0 1.6-.2.3-.1.5-.3.6-.5.2-.2.2-.5.2-.8 0-.4-.1-.7-.3-.9-.2-.2-.5-.4-.8-.4-.2 0-.7-.1-1.5-.1.1.1-.9.1-.9.1z",span:"M8.2 12c.2 1 .9 1.4 2 1.4s1.6-.4 1.6-1.2c0-.8-.5-1.1-2.1-1.5-2.7-.6-3.3-1.5-3.3-2.9C6.4 6.2 7.6 5 9.9 5c2.6 0 3.6 1.4 3.7 2.8h-2.1c-.1-.6-.4-1.2-1.7-1.2-.9 0-1.4.4-1.4 1 0 .7.4.9 2 1.3 2.9.7 3.6 1.7 3.6 3.1 0 1.8-1.3 3-3.9 3-2.5 0-3.8-1.2-4-3h2.1z",div:"M5.8 5h3.7c.8 0 1.5.1 1.9.2.6.2 1.1.5 1.5.9.4.4.7 1 1 1.6.2.6.3 1.4.3 2.4 0 .8-.1 1.5-.3 2.1-.3.7-.6 1.3-1.1 1.8-.3.3-.8.6-1.4.8-.4.1-1 .2-1.8.2H5.8V5zm2 1.7v6.6h1.5c.6 0 1 0 1.2-.1.3-.1.6-.2.8-.4.2-.2.4-.5.5-1 .1-.4.2-1.1.2-1.8 0-.8-.1-1.4-.2-1.8-.1-.4-.3-.7-.6-1-.2-.2-.6-.4-.9-.5-.3-.1-.8-.1-1.6-.1l-.9.1z"};return r.hasOwnProperty(t)?(0,l.createElement)(h.SVG,{width:"24",height:"24",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:n},(0,l.createElement)(h.Path,{d:r[t]})):null}function Mr(e){var t=e.tagName,o=e.onChange;return(0,l.createElement)(h.ToolbarDropdownMenu,{popoverProps:{className:"block-library-heading-level-dropdown"},icon:(0,l.createElement)(zr,{level:t}),label:(0,a.__)("Change heading level","blocksy-companion"),controls:["h1","h2","h3","h4","h5","h6","p","span","div"].map((function(e){var n=e===t;return{icon:(0,l.createElement)(zr,{level:e,isPressed:n}),label:e,title:{h1:(0,a.__)("Heading 1","blocksy-companion"),h2:(0,a.__)("Heading 2","blocksy-companion"),h3:(0,a.__)("Heading 3","blocksy-companion"),h4:(0,a.__)("Heading 4","blocksy-companion"),h5:(0,a.__)("Heading 5","blocksy-companion"),h6:(0,a.__)("Heading 6","blocksy-companion"),p:(0,a.__)("Paragraph","blocksy-companion"),span:(0,a.__)("Span","blocksy-companion"),div:(0,a.__)("Div","blocksy-companion")}[e],isActive:n,onClick:function(){o(e)},role:"menuitemradio"}}))})}var Fr=function(e){var t,o,n,r,a,i,s,u,p,d,m,f,b,h=e.fieldDescriptor,v=e.attributes,g=e.attributes,_=(g.name,g.style),k=g.align,w=g.imageAlign,O=g.contentPosition,x=g.minimumHeight,E=g.viewType,S=e.setAttributes,j=C((0,l.useState)(""),2),I=j[0],T=j[1],D="100vh"===x,A=Bn(),B=[].concat(P(null!==(t=null===(o=A.color.duotone)||void 0===o?void 0:o.custom)&&void 0!==t?t:[]),P(null!==(n=null===(r=A.color.duotone)||void 0===r?void 0:r.theme)&&void 0!==n?n:[]),P(null!==(a=null===(i=A.color.duotone)||void 0===i?void 0:i.default)&&void 0!==a?a:[])),H=([].concat(P(null!==(s=null===(u=A.color.palette)||void 0===u?void 0:u.custom)&&void 0!==s?s:[]),P(null!==(p=null===(d=A.color.palette)||void 0===d?void 0:d.theme)&&void 0!==p?p:[]),P(null!==(m=null===(f=A.color.palette)||void 0===f?void 0:f.default)&&void 0!==m?m:[])),null==_||null===(b=_.color)||void 0===b?void 0:b.duotone);Array.isArray(H)||function(e,t){if(e){var o=null==t?void 0:t.find((function(t){var o=t.slug;return e==="var:preset|duotone|".concat(o)}));o&&o.colors}}(H,B);return(0,l.createElement)(c.BlockControls,{group:"block"},on(h)?(0,l.createElement)(React.Fragment,null,(0,l.createElement)(c.BlockAlignmentControl,y({},"wp"===h.provider&&"author_avatar"===h.id?{controls:["none","left","center","right"]}:{},{value:w,onChange:function(e){return S({imageAlign:e})}})),null,"cover"===E?(0,l.createElement)(React.Fragment,null,(0,l.createElement)(c.__experimentalBlockAlignmentMatrixControl,{label:lr("Change content position"),value:O,onChange:function(e){return S({contentPosition:e})}}),(0,l.createElement)(c.__experimentalBlockFullHeightAligmentControl,{isActive:D,onToggle:function(){D?S({minimumHeight:I}):(T(x),S({minimumHeight:"100vh",aspectRatio:"auto"}))}})):null):(0,l.createElement)(React.Fragment,null,(0,l.createElement)(c.AlignmentControl,{value:k,onChange:function(e){return S({align:e})}}),(0,l.createElement)(Mr,{tagName:v.tagName,onChange:function(e){return S({tagName:e})}})))},Rr=(0,G.getOptionsForBlock)("dynamic-data"),Vr=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).termId,t=document.body.classList.contains("post-type-ct_content_block"),o=[];return e&&(o=[{id:"term_title",label:(0,a.__)("Term Title","blocksy-companion")},{id:"term_description",label:(0,a.__)("Term Description","blocksy-companion")},{id:"term_image",label:(0,a.__)("Term Image","blocksy-companion")},{id:"term_count",label:(0,a.__)("Term Count","blocksy-companion")}]),e||(o=[{id:"title",label:(0,a.__)("Title","blocksy-companion")},{id:"excerpt",label:(0,a.__)("Excerpt","blocksy-companion")},{id:"date",label:(0,a.__)("Post Date","blocksy-companion")},{id:"comments",label:(0,a.__)("Comments","blocksy-companion")},{id:"terms",label:(0,a.__)("Terms","blocksy-companion")},{id:"author",label:(0,a.__)("Author","blocksy-companion")},{id:"featured_image",label:(0,a.__)("Featured Image","blocksy-companion")},{id:"author_avatar",label:(0,a.__)("Author Avatar","blocksy-companion")}]),!e&&t&&(o=[].concat(P(o),[{id:"archive_title",label:(0,a.__)("Archive Title","blocksy-companion")},{id:"archive_description",label:(0,a.__)("Archive Description","blocksy-companion")},{id:"archive_image",label:(0,a.__)("Archive Image","blocksy-companion")}])),{provider:"wp",fields:o}},Lr=function(e){var t=e.postId,o=e.postType,n=e.termId,r=(e.taxonomy,_e(o)),i=C((0,l.useState)([]),2),c=i[0],s=i[1];(0,l.useEffect)((function(){t&&!n&&U("".concat(wp.ajax.settings.url,"?action=blocksy_blocks_retrieve_dynamic_data_descriptor"),{post_id:t}).then((function(e){return e.json()})).then((function(e){e.success;var t=e.data;s(t.fields)}))}),[t,n]);var u={fields:[Vr({termId:n})]},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===window.wc||"product"!==e)return null;var o=(t||[]).find((function(e){return"product_brands"===e.slug}));return{provider:"woo",fields:[{id:"price",label:(0,a.__)("Price","blocksy-companion")},{id:"rating",label:(0,a.__)("Rating","blocksy-companion")},{id:"stock_status",label:(0,a.__)("Stock Status","blocksy-companion")},{id:"sku",label:(0,a.__)("SKU","blocksy-companion")}].concat(P(o?[{id:"brands",label:(0,a.__)("Brands","blocksy-companion")}]:[]))}}(o,r);return p&&u.fields.push(p),c.length>0&&(u.fields=[].concat(P(u.fields),P(c))),{fieldsDescriptor:u,options:Rr,fieldsChoices:u.fields.reduce((function(e,t){return[].concat(P(e),P(t.fields.filter((function(e){return"wp"!==t.provider||"terms"!==e.id||r&&r.length>0})).map((function(e){return{group:(o=t.provider,{wp:"WordPress",woo:"WooCommerce",acf:"ACF",metabox:"MetaBox",custom:(0,a.__)("Custom","blocksy-companion"),toolset:"Toolset",jetengine:"Jet Engine",pods:"Pods",acpt:"ACPT"}[o]||(0,a.__)("Unknown","blocksy-companion")),key:"".concat(t.provider,":").concat(e.id),value:e.label};var o}))))}),[])}},Ur=function(e){var t=e.sizeSlug,o=e.onChange,n=e.clientId,r=(0,s.useSelect)((function(e){return e(c.store).getSettings().imageSizes}),[]).map((function(e){var t=e.name;return{value:e.slug,label:t}}));return r.length?(0,l.createElement)(h.__experimentalToolsPanelItem,{hasValue:function(){return!!t},label:(0,a.__)("Resolution","blocksy-companion"),onDeselect:function(){return o(void 0)},resetAllFilter:function(){return{sizeSlug:void 0}},isShownByDefault:!1,key:n},(0,l.createElement)(h.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Resolution","blocksy-companion"),value:t||"full",options:r,onChange:function(e){return o(e)},help:(0,a.__)("Select the size of the source image.","blocksy-companion")})):null},qr=function(e){var t=e.clientId,o=e.attributes,n=o.aspectRatio,i=o.imageFit,s=o.width,u=o.height,p=o.sizeSlug,d=o.viewType,m=o.minimumHeight,f=e.setAttributes,b=(0,h.__experimentalUseCustomUnits)({availableUnits:(0,c.useSetting)("spacing.units")||["px","%","vw","em","rem"]}),y=function(e,t){var o=parseFloat(t);isNaN(o)&&t||f(r({},e,o<0?"0":t))};return(0,l.createElement)(h.__experimentalToolsPanel,{label:"cover"===d?(0,a.__)("Block Settings","blocksy-companion"):(0,a.__)("Image Settings","blocksy-companion"),resetAll:function(){f({aspectRatio:"auto",width:void 0,height:void 0,sizeSlug:void 0,minimumHeight:void 0})}},(0,l.createElement)(h.__experimentalToolsPanelItem,{hasValue:function(){return!!n},label:(0,a.__)("Aspect Ratio","blocksy-companion"),onDeselect:function(){return f({aspectRatio:void 0})},resetAllFilter:function(){return{aspectRatio:"auto"}},isShownByDefault:!0,key:t},(0,l.createElement)(h.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Aspect Ratio","blocksy-companion"),value:n,options:[{label:(0,a.__)("Original","blocksy-companion"),value:"auto"},{label:(0,a.__)("Square","blocksy-companion"),value:"1"},{label:(0,a.__)("16:9","blocksy-companion"),value:"16/9"},{label:(0,a.__)("4:3","blocksy-companion"),value:"4/3"},{label:(0,a.__)("3:2","blocksy-companion"),value:"3/2"},{label:(0,a.__)("9:16","blocksy-companion"),value:"9/16"},{label:(0,a.__)("3:4","blocksy-companion"),value:"3/4"},{label:(0,a.__)("2:3","blocksy-companion"),value:"2/3"}],onChange:function(e){return f({aspectRatio:e,minimumHeight:void 0})}})),"cover"!==d?(0,l.createElement)(React.Fragment,null,(0,l.createElement)(h.__experimentalToolsPanelItem,{style:{"grid-column":"span 1 / auto"},hasValue:function(){return!!s},label:(0,a.__)("Width","blocksy-companion"),onDeselect:function(){return f({width:void 0})},resetAllFilter:function(){return{width:void 0}},isShownByDefault:!0,key:t},(0,l.createElement)(h.__experimentalUnitControl,{label:(0,a.__)("Width","blocksy-companion"),labelPosition:"top",value:s||"",min:0,onChange:function(e){return y("width",e)},units:b})),(0,l.createElement)(h.__experimentalToolsPanelItem,{style:{"grid-column":"span 1 / auto"},hasValue:function(){return!!u},label:(0,a.__)("Height","blocksy-companion"),onDeselect:function(){return f({height:void 0})},resetAllFilter:function(){return{height:void 0}},isShownByDefault:!0,key:t},(0,l.createElement)(h.__experimentalUnitControl,{label:(0,a.__)("Height","blocksy-companion"),labelPosition:"top",value:u||"",min:0,onChange:function(e){return y("height",e)},units:b})),(0,l.createElement)(h.__experimentalToolsPanelItem,{hasValue:function(){return!!i},label:(0,a.__)("Scale","blocksy-companion"),onDeselect:function(){return f({imageFit:void 0})},resetAllFilter:function(){return{imageFit:"cover"}},isShownByDefault:!0,key:t},(0,l.createElement)(h.__experimentalToggleGroupControl,{label:(0,a.__)("Scale","blocksy-companion"),value:i,isBlock:!0,onChange:function(e){return f({imageFit:e})}},(0,l.createElement)(h.__experimentalToggleGroupControlOption,{key:"cover",value:"cover",label:(0,a.__)("Cover","blocksy-companion")}),(0,l.createElement)(h.__experimentalToggleGroupControlOption,{key:"contain",value:"contain",label:(0,a.__)("Contain","blocksy-companion")})))):null,"cover"===d?(0,l.createElement)(h.__experimentalToolsPanelItem,{hasValue:function(){return!!m},label:(0,a.__)("Minimum height"),onDeselect:function(){return f({minimumHeight:void 0})},isShownByDefault:!0},(0,l.createElement)(h.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,a.__)("Minimum height"),labelPosition:"top",value:m||"",onChange:function(e){e=0>parseFloat(e)?"0":e,f({minimumHeight:e,aspectRatio:"auto"})},units:b})):(0,l.createElement)(Ur,{sizeSlug:p,onChange:function(e){return f({sizeSlug:e})},clientId:t}))};function Gr(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}var Wr=function(){return(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"}))},Zr=function(){return(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false"},(0,l.createElement)("path",{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"}))},$r=function(e){var t=e.clientId,o=e.postType,n=e.postId,a=e.attributes,i=e.setAttributes,u=a.focalPoint,p=a.hasParallax,d=a.isRepeated,m=a.sizeSlug,f=a.allowCustomContentAndWideSize,b=a.contentSize,y=a.wideSize,v=C((0,be.useEntityProp)("postType",o,"featured_media",n),2),g=v[0],_=(v[1],function(e,t){var o,n,r;return(null==e||null===(o=e.media_details)||void 0===o||null===(n=o.sizes)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.source_url)||(null==e?void 0:e.source_url)}((0,s.useSelect)((function(e){var t=e(be.store).getMedia;return{media:g&&t(g,{context:"view"})}}),[g]).media,m)),k=!p,w=(0,h.__experimentalUseCustomUnits)({availableUnits:(0,c.useSetting)("spacing.units")||["px","%","vw","em","rem"]});return"cover"!==a.viewType?null:(0,l.createElement)(React.Fragment,null,(0,l.createElement)(h.__experimentalToolsPanel,{label:lr("Layout"),resetAll:function(){i({hasParallax:!1,focalPoint:void 0,isRepeated:!1})}},(0,l.createElement)(h.__experimentalToolsPanelItem,{label:lr("Layout"),isShownByDefault:!0,hasValue:function(){return!f},onDeselect:function(){return i({allowCustomContentAndWideSize:!0,contentSize:void 0,wideSize:void 0})}},(0,l.createElement)(h.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained"},(0,l.createElement)(h.ToggleControl,{label:lr("Inner blocks use content width"),checked:f,onChange:function(){i({allowCustomContentAndWideSize:!f})},help:lr(f?"Nested blocks use content width with options for full and wide widths.":"Nested blocks will fill the width of this container. Toggle to constrain.")}),f&&(0,l.createElement)(React.Fragment,null,(0,l.createElement)(h.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:lr("Content width"),labelPosition:"top",value:b||y||"",onChange:function(e){e=0>parseFloat(e)?"0":e,i({contentSize:e})},units:w,prefix:(0,l.createElement)(h.__experimentalInputControlPrefixWrapper,{variant:"icon"},(0,l.createElement)(Wr,null))}),(0,l.createElement)(h.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:lr("Wide width"),labelPosition:"top",value:y||b||"",onChange:function(e){e=0>parseFloat(e)?"0":e,i({wideSize:e})},units:w,prefix:(0,l.createElement)(h.__experimentalInputControlPrefixWrapper,{variant:"icon"},(0,l.createElement)(Zr,null))}),(0,l.createElement)("p",{className:"block-editor-hooks__layout-constrained-helptext"},lr("Customize the width for all elements that are assigned to the center or wide columns.")))))),(0,l.createElement)(h.__experimentalToolsPanel,{label:lr("Image Settings","blocksy-companion"),resetAll:function(){i({hasParallax:!1,focalPoint:void 0,isRepeated:!1})}},k&&(0,l.createElement)(h.__experimentalToolsPanelItem,{label:lr("Focal point"),isShownByDefault:!0,hasValue:function(){return!!u},onDeselect:function(){return i({focalPoint:void 0})}},(0,l.createElement)(h.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:lr("Focal point"),url:_,value:u,onDragStart:function(e){return i({focalPoint:e})},onDrag:function(e){return i({focalPoint:e})},onChange:function(e){return i({focalPoint:e})}})),(0,l.createElement)(h.__experimentalToolsPanelItem,{label:lr("Fixed background"),isShownByDefault:!0,hasValue:function(){return p},onDeselect:function(){return i({hasParallax:!1,focalPoint:void 0})}},(0,l.createElement)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:lr("Fixed background"),checked:p,onChange:function(){i(function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Gr(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Gr(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({hasParallax:!p},p?{}:{focalPoint:void 0}))}})),(0,l.createElement)(h.__experimentalToolsPanelItem,{label:lr("Repeated background"),isShownByDefault:!0,hasValue:function(){return d},onDeselect:function(){return i({isRepeated:!1})}},(0,l.createElement)(h.ToggleControl,{__nextHasNoMarginBottom:!0,label:lr("Repeated background"),checked:d,onChange:function(){i({isRepeated:!d})}})),(0,l.createElement)(Ur,{sizeSlug:m,onChange:function(e){return i({sizeSlug:e})},clientId:t})))};n(991);const Kr="1600px",Xr="320px",Jr=1,Yr=.25,Qr=.75,el="14px";function tl(e,t={}){if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:o,rootSizeValue:n,acceptableUnits:r}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},l=r?.join("|"),a=new RegExp(`^(\\d*\\.?\\d+)(${l}){1,1}$`),i=e.match(a);if(!i||i.length<3)return null;let[,c,s]=i,u=parseFloat(c);return"px"!==o||"em"!==s&&"rem"!==s||(u*=n,s=o),"px"!==s||"em"!==o&&"rem"!==o||(u/=n,s=o),"em"!==o&&"rem"!==o||"em"!==s&&"rem"!==s||(s=o),{value:ol(u,3),unit:s}}function ol(e,t=3){const o=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*o)/o):void 0}function nl(e,t){const{size:o}=e;if(!o||"0"===o||!1===e?.fluid)return o;if(!rl(t?.typography)&&!rl(e))return o;let n=function(e){const t=e?.typography,o=e?.layout,n=tl(o?.wideSize)?o?.wideSize:null;return rl(t)&&n?{fluid:{maxViewportWidth:n,...t.fluid}}:{fluid:t?.fluid}}(t);n="object"==typeof n?.fluid?n?.fluid:{};const r=function({minimumFontSize:e,maximumFontSize:t,fontSize:o,minimumViewportWidth:n=Xr,maximumViewportWidth:r=Kr,scaleFactor:l=Jr,minimumFontSizeLimit:a}){if(a=tl(a)?a:el,o){const n=tl(o);if(!n?.unit)return null;const r=tl(a,{coerceTo:n.unit});if(r?.value&&!e&&!t&&n?.value<=r?.value)return null;if(t||(t=`${n.value}${n.unit}`),!e){const t="px"===n.unit?n.value:16*n.value,o=Math.min(Math.max(1-.075*Math.log2(t),Yr),Qr),l=ol(n.value*o,3);e=r?.value&&l<r?.value?`${r.value}${r.unit}`:`${l}${n.unit}`}}const i=tl(e),c=i?.unit||"rem",s=tl(t,{coerceTo:c});if(!i||!s)return null;const u=tl(e,{coerceTo:"rem"}),p=tl(r,{coerceTo:c}),d=tl(n,{coerceTo:c});if(!p||!d||!u)return null;const m=p.value-d.value;if(!m)return null;const f=ol(d.value/100,3),b=ol(f,3)+c,y=ol(((s.value-i.value)/m*100||1)*l,3);return`clamp(${e}, ${u.value}${u.unit} + ((1vw - ${b}) * ${y}), ${t})`}({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:o,minimumFontSizeLimit:n?.minFontSize,maximumViewportWidth:n?.maxViewportWidth,minimumViewportWidth:n?.minViewportWidth});return r||o}function rl(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}const ll=(e,t,o)=>{const n=Array.isArray(t)?t:t.split(".");let r=e;return n.forEach((e=>{r=r?.[e]})),r??o};const al=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>nl(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",valueFunc:({size:e})=>e,classes:[]}];function il(e,t,o,n,r){const l=[ll(e,["blocks",t,...o]),ll(e,o)];for(const a of l)if(a){const l=["custom","theme","default"];for(const i of l){const l=a[i];if(l){const a=l.find((e=>e[n]===r));if(a){if("slug"===n)return a;return il(e,t,o,"slug",a.slug)[n]===a[n]?a:void 0}}}}}function cl(e,t,o){if(!o||"string"!=typeof o){if("string"!=typeof o?.ref)return o;if(!(o=ll(e,o.ref))||o?.ref)return o}const n="var:",r="var(--wp--";let l;if(o.startsWith(n))l=o.slice(4).split("|");else{if(!o.startsWith(r)||!o.endsWith(")"))return o;l=o.slice(10,-1).split("--")}const[a,...i]=l;return"preset"===a?function(e,t,o,[n,r]){const l=al.find((e=>e.cssVarInfix===n));if(!l)return o;const a=il(e.settings,t,l.path,"slug",r);if(a){const{valueKey:o}=l;return cl(e,t,a[o])}return o}(e,t,o,i):"custom"===a?function(e,t,o,n){const r=ll(e.settings,["blocks",t,"custom",...n])??ll(e.settings,["custom",...n]);return r?cl(e,t,r):o}(e,t,o,i):o}function sl(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return ul(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ul(e,t)}(e))){var t=0,o=function(){};return{s:o,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,r,l=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==n.return||n.return()}finally{if(a)throw r}}}}function ul(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function pl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function dl(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?pl(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):pl(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function ml(e,t,o){t=Array.isArray(t)?P(t):[t],e=Array.isArray(e)?P(e):dl({},e);var n,r=t.pop(),l=e,a=sl(t);try{for(a.s();!(n=a.n()).done;){var i=n.value,c=l[i];l=l[i]=Array.isArray(c)?P(c):dl({},c)}}catch(e){a.e(e)}finally{a.f()}return l[r]=o,e}var fl=function(e){return function(e){var t,o,n,r,l,a,i;return Dn(Dn({},e.style),{},{color:Dn(Dn({},null===(t=e.style)||void 0===t?void 0:t.color),{},{text:e.textColor?"var:preset|color|"+e.textColor:null===(o=e.style)||void 0===o||null===(n=o.color)||void 0===n?void 0:n.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:null===(r=e.style)||void 0===r||null===(l=r.color)||void 0===l?void 0:l.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:null===(a=e.style)||void 0===a||null===(i=a.color)||void 0===i?void 0:i.gradient})})}({style:e.style,textColor:e.textColor})},bl=function(e){var t,o,n,i,u,p,d,m,f,b,y,g,_,k,w,O,x=e.fieldDescriptor,C=e.fieldsDescriptor,S=e.attributes,j=e.setAttributes,I=e.options,T=e.fieldsChoices,D=e.clientId,A=(e.name,e.__unstableParentLayout),B=e.taxonomies,H=e.postId,N=e.postType,z=(0,s.useDispatch)("core/block-editor").replaceInnerBlocks,M=fl(S),F=Bn(0,A),R=function(e){return cl({settings:F},"",e)},V=function(e){var t,o,n,r,i,c,s,u=null==e||null===(t=e.color)||void 0===t||null===(o=t.palette)||void 0===o?void 0:o.custom,p=null==e||null===(n=e.color)||void 0===n||null===(r=n.palette)||void 0===r?void 0:r.theme,d=null==e||null===(i=e.color)||void 0===i||null===(c=i.palette)||void 0===c?void 0:c.default,m=null==e||null===(s=e.color)||void 0===s?void 0:s.defaultPalette;return(0,l.useMemo)((function(){var e=[];return p&&p.length&&e.push({name:(0,a._x)("Theme","Indicates this palette comes from the theme."),colors:p}),m&&d&&d.length&&e.push({name:(0,a._x)("Default","Indicates this palette comes from WordPress."),colors:d}),u&&u.length&&e.push({name:(0,a._x)("Custom","Indicates this palette is created by the user."),colors:u}),e}),[u,p,d,m])}(F),L=function(e){var t,o,n,r,i,c,s,u=null==e||null===(t=e.color)||void 0===t||null===(o=t.gradients)||void 0===o?void 0:o.custom,p=null==e||null===(n=e.color)||void 0===n||null===(r=n.gradients)||void 0===r?void 0:r.theme,d=null==e||null===(i=e.color)||void 0===i||null===(c=i.gradients)||void 0===c?void 0:c.default,m=null==e||null===(s=e.color)||void 0===s?void 0:s.defaultGradients;return(0,l.useMemo)((function(){var e=[];return p&&p.length&&e.push({name:(0,a._x)("Theme","Indicates this palette comes from the theme."),gradients:p}),m&&d&&d.length&&e.push({name:(0,a._x)("Default","Indicates this palette comes from WordPress."),gradients:d}),u&&u.length&&e.push({name:(0,a._x)("Custom","Indicates this palette is created by the user."),gradients:u}),e}),[u,p,d,m])}(F),U=function(e){var t=V.flatMap((function(e){return e.colors})).find((function(t){return t.color===e}));return t?"var:preset|color|"+t.slug:e},q=function(e){var t=L.flatMap((function(e){return e.gradients})).find((function(t){return t.gradient===e}));return t?"var:preset|gradient|"+t.slug:e},W=function(e){var t,o,n,r,l,a,i,c,s,u,p;j((l=null==(t=e)||null===(o=t.color)||void 0===o?void 0:o.text,a=null!=l&&l.startsWith("var:preset|color|")?l.substring(17):void 0,i=null==t||null===(n=t.color)||void 0===n?void 0:n.background,c=null!=i&&i.startsWith("var:preset|color|")?i.substring(17):void 0,s=null==t||null===(r=t.color)||void 0===r?void 0:r.gradient,u=null!=s&&s.startsWith("var:preset|gradient|")?s.substring(20):void 0,(p=Dn({},t)).color=Dn(Dn({},p.color),{},{text:a?void 0:l,background:c?void 0:i,gradient:u?void 0:s}),{style:zn(p),textColor:a,backgroundColor:c,gradient:u}))},Z=R(null==M||null===(t=M.elements)||void 0===t||null===(o=t.link)||void 0===o||null===(n=o.color)||void 0===n?void 0:n.text),$=R(null==M||null===(i=M.elements)||void 0===i||null===(u=i.link)||void 0===u||null===(p=u[":hover"])||void 0===p||null===(d=p.color)||void 0===d?void 0:d.text),K=R(null==S||null===(m=S.style)||void 0===m||null===(f=m.elements)||void 0===f||null===(b=f.overlay)||void 0===b||null===(y=b.color)||void 0===y?void 0:y.background),X=R(null==S||null===(g=S.style)||void 0===g||null===(_=g.elements)||void 0===_||null===(k=_.overlay)||void 0===k||null===(w=k.color)||void 0===w?void 0:w.gradient),J=null,Y=function(e){if(J||(J="color"),"gradient"!==J){var t=ml(M,["elements","overlay","color","background"],U(e));e&&(t=ml(t,["elements","overlay","color","gradient"],q(void 0))),W(t)}else J=null},Q=R(null==M||null===(O=M.color)||void 0===O?void 0:O.text),ee=function(e){var t=ml(M,["color","text"],U(e));Q===Z&&(t=ml(t,["elements","link","color","text"],U(e))),W(t)},te=function(e){W(ml(M,["elements","link","color","text"],U(e)))},oe=function(e){W(ml(M,["elements","link",":hover","color","text"],U(e)))},ne="default"!==S.viewType&&on(x)?[{colorValue:X?void 0:K,gradientValue:X,label:(0,a.__)("Overlay","blocksy-companion"),enableAlpha:!0,onColorChange:Y,onGradientChange:function(e){!function(e){if(J||(J="gradient"),"color"!==J){var t=ml(M,["elements","overlay","color","gradient"],q(e));e&&(t=ml(t,["elements","overlay","color","background"],U(void 0))),W(t)}}(e)},isShownByDefault:!0,clearable:!0}]:P("yes"===S.has_field_link?[{colorValue:Z,label:(0,a.__)("Link","blocksy-companion"),enableAlpha:!0,onColorChange:te},{colorValue:$,label:(0,a.__)("Link Hover","blocksy-companion"),enableAlpha:!0,onColorChange:oe}]:[{colorValue:Q,label:(0,a.__)("Text","blocksy-companion"),enableAlpha:!0,onColorChange:ee}]);return(0,l.createElement)(React.Fragment,null,(0,l.createElement)(c.InspectorControls,null,(0,l.createElement)(h.PanelBody,null,(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){j(r({},e,t)),"viewType"!==e||K||setTimeout((function(){Y("#000000")}),50),"viewType"!==e&&("field"!==e||on(t)&&"wp:author_avatar"!==S.field)||z(D,[],!1)},options:dl(dl(dl(dl({field:{type:"ct-select",label:(0,a.__)("Content Source","blocksy-companion"),value:"",search:!0,searchPlaceholder:(0,a.__)("Search for field","blocksy-companion"),defaultToFirstItem:!1,choices:T,purpose:"default"}},"wp:author_avatar"!==S.field&&on(x)?{viewType:{type:"ct-radio",label:(0,a.__)("View Type","blocksy-companion"),value:S.viewType,design:"inline",purpose:"gutenberg",divider:"bottom:full",choices:{default:(0,a.__)("Image","blocksy-companion"),cover:(0,a.__)("Cover","blocksy-companion")}}}:{}),"wp:terms"===S.field&&B&&B.length>0?{taxonomy:{type:"ct-select",label:(0,a.__)("Taxonomy","blocksy-companion"),value:"",design:"inline",purpose:"default",choices:B.map((function(e){var t=e.name;return{key:e.slug,value:t}}))}}:{}),"wp:term_image"===S.field?{imageSource:{type:"ct-radio",label:(0,a.__)("Image Source","blocksy-companion"),value:S.imageSource,design:"inline",purpose:"gutenberg",divider:"bottom",choices:{featured:(0,a.__)("Image","blocksy-companion"),icon:(0,a.__)("Icon/Logo","blocksy-companion")}}}:{}),I),value:dl(dl({},S),C&&C.has_taxonomies_customization?{has_taxonomies_customization:"yes"}:{}),hasRevertButton:!1}),on(x)&&"wp:author_avatar"!==S.field&&"wp:archive_image"!==S.field&&"default"===S.viewType&&(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){j(r({},e,t))},options:dl(dl({lightbox_condition:{type:"ct-condition",condition:{has_field_link:"no"},options:{lightbox:{type:"ct-switch",label:(0,a.__)("Expand on click","blocksy-companion"),value:"no"}}}},"wp:featured_image"===S.field?{videoThumbnail:{type:"ct-switch",label:(0,a.__)("Video thumbnail","blocksy-companion"),value:"no"}}:{}),{},{image_hover_effect:{label:(0,a.__)("Image Hover Effect","blocksy-companion"),type:"ct-select",value:"none",view:"text",design:"inline",divider:"top:full",choices:{none:(0,a.__)("None","blocksy-companion"),"zoom-in":(0,a.__)("Zoom In","blocksy-companion"),"zoom-out":(0,a.__)("Zoom Out","blocksy-companion")}}}),value:S,hasRevertButton:!1})),on(x)&&"wp:author_avatar"!==S.field&&(0,l.createElement)(React.Fragment,null,(0,l.createElement)($r,{attributes:S,setAttributes:j,postId:H,postType:N}),(0,l.createElement)(qr,{clientId:D,attributes:S,setAttributes:j})),"wp:author_avatar"===S.field&&(0,l.createElement)(h.PanelBody,null,(0,l.createElement)(h.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Image size","blocksy-companion"),onChange:function(e){return j({avatar_size:e})},min:5,max:500,initialPosition:null==S?void 0:S.avatar_size,value:null==S?void 0:S.avatar_size})),"woo:brands"===S.field&&(0,l.createElement)(h.PanelBody,null,(0,l.createElement)(h.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Logo Size","blocksy-companion"),onChange:function(e){return j({brands_size:e})},min:5,max:500,initialPosition:null==S?void 0:S.brands_size,value:null==S?void 0:S.brands_size}),(0,l.createElement)(h.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,a.__)("Logo Gap","blocksy-companion"),onChange:function(e){return j({brands_gap:e})},min:5,max:500,initialPosition:null==S?void 0:S.brands_gap,value:null==S?void 0:S.brands_gap})),!on(x)&&"woo:brands"!==S.field&&(0,l.createElement)(h.PanelBody,null,(0,l.createElement)(G.OptionsPanel,{purpose:"gutenberg",onChange:function(e,t){j(r({},e,t))},options:dl({before:{type:"text",label:(0,a.__)("Before","blocksy-companion"),value:""},after:{type:"text",label:(0,a.__)("After","blocksy-companion"),value:""}},"wp"!==x.provider||"wp"===x.provider&&("excerpt"===x.id||"terms"===x.id||"author"===x.id)?{fallback:{type:"text",label:(0,a.__)("Fallback","blocksy-companion"),value:(0,a.__)("Custom field fallback","blocksy-companion")}}:{}),value:S,hasRevertButton:!1}))),(0,l.createElement)(c.InspectorControls,{group:"color",resetAllFilter:function(){var e=on(x)?"image":"text";"text"===e&&(ee(),te(),oe(),setTimeout((function(){var e,t=null==S||null===(e=S.style)||void 0===e?void 0:e.elements,o=(t.link,E(t,["link"])),n=dl(dl({},S.style),{},{elements:o});j({textColor:void 0,style:n})}))),"image"===e&&setTimeout((function(){Y("#000000")}),50)}},(0,l.createElement)(v,{label:(0,a.__)("Colors","blocksy-companion"),panelId:D,settings:ne,skipToolsPanel:!0,containerProps:{"data-field-type":on(x)?"image:".concat(S.viewType):"text"}}),on(x)&&"default"!==S.viewType?(0,l.createElement)(h.__experimentalToolsPanelItem,{hasValue:function(){return void 0!==S.dimRatio&&50!==S.dimRatio},label:(0,a.__)("Overlay opacity"),onDeselect:function(){return j({dimRatio:50})},resetAllFilter:function(){return{dimRatio:50}},isShownByDefault:!0,panelId:D},(0,l.createElement)(h.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,a.__)("Overlay opacity"),value:S.dimRatio,onChange:function(e){return j({dimRatio:e})},min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})):null),"wp:terms"===S.field&&(0,l.createElement)(c.InspectorControls,{group:"advanced"},(0,l.createElement)(h.TextControl,{__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,a.__)("Term additional class","blocksy-companion"),value:S.termClass,onChange:function(e){j({termClass:e})},help:(0,a.__)("Additional class for term items. Useful for styling.","blocksy-companion")})))};function yl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function hl(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?yl(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):yl(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var vl=function(e){var t=e.clientId,o=e.attributes,n=e.setAttributes,r=e.context,a=e.name,i=e.__unstableParentLayout,c=r.postType,s=r.taxonomy,u=Lr(r),p=u.fieldsDescriptor,d=u.options,m=u.fieldsChoices,f=_e(c),b=(0,l.useMemo)((function(){if(!o.field||!p)return null;var e=C(o.field.split(":"),2),t=e[0],n=e[1],r=p.fields.find((function(e){return e.provider===t}));if(!r)return null;var l=r.fields.find((function(e){return e.id===n}));return l?hl(hl({},l),{},{provider:r.provider}):null}),[o.field,p]);return(0,l.useEffect)((function(){"wp:title"===o.field&&s&&n({field:"wp:term_title"})}),[s,o.fiel]),b?(0,l.createElement)(React.Fragment,null,(0,l.createElement)(Fr,{fieldDescriptor:b,attributes:o,setAttributes:n}),(0,l.createElement)(Nr,y({attributes:o,fieldsDescriptor:p,fieldDescriptor:b},r)),(0,l.createElement)(bl,y({options:d,fieldDescriptor:b,attributes:o,setAttributes:n,fieldsChoices:m,clientId:t,fieldsDescriptor:p,taxonomies:f},r,{name:a,__unstableParentLayout:i}))):null},gl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"blocksy/dynamic-data","category":"blocksy-blocks","attributes":{"tagName":{"type":"string","default":"div"},"field":{"type":"string","default":"wp:title"},"before":{"type":"string","default":""},"after":{"type":"string","default":""},"fallback":{"type":"string","default":""},"align":{"type":"string"},"imageAlign":{"type":"string"},"aspectRatio":{"type":"string","default":"auto"},"imageFit":{"type":"string","default":"cover"},"width":{"type":"string"},"height":{"type":"string"},"sizeSlug":{"type":"string"},"alt_text":{"type":"string","default":""},"avatar_size":{"type":"number","default":96},"avatarIsLink":{"type":"boolean","default":false},"avatarLinkTarget":{"type":"string","default":"_self"},"featuredIsLink":{"type":"boolean","default":false},"featuredLinkTarget":{"type":"string","default":"_self"},"taxonomy":{"type":"string","default":""},"lightbox":{"type":"string","default":"no"},"videoThumbnail":{"type":"string","default":"no"},"image_hover_effect":{"type":"string","default":"none"},"termClass":{"type":"string","default":""},"termAccentColor":{"type":"string","default":"yes"},"brands_size":{"type":"number","default":100},"brands_gap":{"type":"number","default":10},"imageSource":{"type":"string","default":"featured"},"viewType":{"type":"string","default":"default"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"dimRatio":{"type":"number","default":50},"style":{"type":"object","default":{"elements":{"overlay":{"color":{"background":"#000000"}}}}}},"supports":{"color":{"text":false,"background":false,"__experimentalSkipSerialization":["link","heading","button","gradients"]},"className":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true},"__experimentalSelector":"img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay","__experimentalSkipSerialization":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}}},"usesContext":["postId","postType","queryId","taxonomy","termId","termIcon","termImage"]}'),_l=JSON.parse('{"Y":{"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"isUserOverlayColor":{"type":"boolean"},"focalPoint":{"type":"object"},"minHeight":{"type":"number"},"minHeightUnit":{"type":"string"},"contentPosition":{"type":"string"},"isDark":{"type":"boolean","default":true},"allowedBlocks":{"type":"array"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]},"tagName":{"type":"string","default":"div"},"allowCustomContentAndWideSize":{"type":"boolean","default":true},"contentSize":{"type":"string","default":""},"wideSize":{"type":"string","default":""},"minimumHeight":{"type":"string","default":""}}}'),kl=(0,G.getColorsDefaults)({textColor:"",customTextColor:"",backgroundColor:"",customBackgroundColor:"",linkColor:"",customLinkColor:"",linkHoverColor:"",customLinkHoverColor:"",overlayColor:"",customOverlayColor:"#000000"});function wl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Ol(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?wl(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):wl(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var xl=(0,G.getOptionsForBlock)("dynamic-data"),Cl=(0,G.getAttributesFromOptions)(xl);(0,i.registerBlockType)("blocksy/dynamic-data",Ol(Ol({},gl),{},{title:(0,a.__)("Dynamic Data","blocksy-companion"),description:(0,a.__)("Fetch and display content from various sources.","blocksy-companion"),attributes:Ol(Ol(Ol(Ol({},gl.attributes),_l.Y),Cl),kl),icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)("path",{d:"M17.9 10.5c-.1-.3-.4-.4-.7-.4h-3.7V4.6c0-.4-.2-.7-.6-.8h-.2c-.3 0-.5.1-.7.4l-5.7 8.6c-.2.3-.2.6 0 .8 0 .2.3.4.6.4h3.7v5.5c0 .4.2.7.6.8h.2c.3 0 .5-.1.7-.4l5.7-8.6c.2-.2.2-.6.1-.8zm-5.9 7v-4.4c0-.3-.3-.6-.6-.6H7.9l4.1-6v4.4c0 .3.3.6.6.6h3.5l-4.1 6z"}))},edit:function(e){return(0,l.createElement)(vl,e)},save:function(){return(0,l.createElement)(c.InnerBlocks.Content,null)},__experimentalLabel:function(e){return"wp:title"===e.field?(0,a.__)("Dynamic Title","blocksy-companion"):"wp:excerpt"===e.field?(0,a.__)("Dynamic Excerpt","blocksy-companion"):"wp:date"===e.field?(0,a.__)("Dynamic Post Date","blocksy-companion"):"wp:comments"===e.field?(0,a.__)("Dynamic Comments","blocksy-companion"):"wp:terms"===e.field?(0,a.__)("Dynamic Terms","blocksy-companion"):"wp:author"===e.field?(0,a.__)("Dynamic Author","blocksy-companion"):"wp:featured_image"===e.field?(0,a.__)("Dynamic Featured Image","blocksy-companion"):"wp:author_avatar"===e.field?(0,a.__)("Dynamic Author Avatar","blocksy-companion"):"woo:price"===e.field?(0,a.__)("Dynamic Price","blocksy-companion"):"woo:stock_status"===e.field?(0,a.__)("Dynamic Stock Status","blocksy-companion"):"woo:brands"===e.field?(0,a.__)("Dynamic Brands","blocksy-companion"):"woo:sku"===e.field?(0,a.__)("Dynamic SKU","blocksy-companion"):"woo:rating"===e.field?(0,a.__)("Dynamic Rating","blocksy-companion"):"wp:term_title"===e.field?(0,a.__)("Dynamic Term Title","blocksy-companion"):"wp:term_description"===e.field?(0,a.__)("Dynamic Term Description","blocksy-companion"):"wp:term_count"===e.field?(0,a.__)("Dynamic Term Count","blocksy-companion"):"wp:term_image"===e.field?(0,a.__)("Dynamic Term Image","blocksy-companion"):"wp:archive_image"===e.field?(0,a.__)("Dynamic Archive Image","blocksy-companion"):"wp:archive_title"===e.field?(0,a.__)("Dynamic Archive Title","blocksy-companion"):"wp:archive_description"===e.field?(0,a.__)("Dynamic Archive Description","blocksy-companion"):(0,a.__)("Dynamic Data","blocksy-companion")}}));var El={inputFontColor:"",customInputFontColor:"",inputFontColorFocus:"",customInputFontColorFocus:"",inputIconColor:"",customInputIconColor:"",inputIconColorFocus:"",customInputIconColorFocus:"",inputBorderColor:"",customInputBorderColor:"",inputBorderColorFocus:"",customInputBorderColorFocus:"",inputBackgroundColor:"",customInputBackgroundColor:"",inputBackgroundColorFocus:"",customInputBackgroundColorFocus:"",buttonBackgroundColor:"",customButtonBackgroundColor:"",buttonBackgroundColorHover:"",customButtonBackgroundColorHover:"",dropdownTextInitialColor:"",customDropdownTextInitialColor:"",dropdownTextHoverColor:"",customDropdownTextHoverColor:"",dropdownBackgroundColor:"",customDropdownBackgroundColor:"",shadowColor:"",customShadowColor:""},Pl=$t(El);function Sl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function jl(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Sl(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Sl(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Il=jl({enable_live_results:"no",live_results_images:"yes",searchBoxHeight:"",searchProductPrice:"no",searchProductStatus:"no",search_box_placeholder:(0,a.__)("Search","blocksy-companion"),taxonomy_filter_label:(0,a.__)("Select category","blocksy-companion"),search_through:{post:!0,page:!0,product:!0,custom:!0},taxonomy_filter_visibility:{desktop:!0,tablet:!0,mobile:!1}},El),Tl=function(e){var t=e.attributes,o=e.setAttributes,n=e.buttonStyles,r=C((0,l.useState)(!1),2),a=r[0],i=r[1],s=t.search_box_button_text,u=t.search_box_placeholder,p=t.taxonomy_filter_label,d=t.buttonPosition,m=t.has_taxonomy_filter,f=t.buttonUseText,b=t.taxonomy_filter_visibility,y=(0,l.useRef)({taxonomy:"",icon:""}),v=(0,l.useCallback)((function(e){var t=document.createElement("div");t.innerHTML=e;var o=t.querySelector('[type="search"]');return o&&o.setAttribute("placeholder",u),t.querySelector(".ct-search-box").style="",t.querySelector(".ct-select-taxonomy")&&(y.current=jl(jl({},y.current),{},{taxonomy:t.querySelector(".ct-select-taxonomy").outerHTML})),t.querySelector(".ct-icon")&&(y.current=jl(jl({},y.current),{},{icon:t.querySelector(".ct-icon").outerHTML})),t.innerHTML}),[u,d,n]),g=Zt("search",jl(jl({},t),Il),v).isLoading;return(0,l.useEffect)((function(){i(!0),setTimeout((function(){i(!1)}),100)}),[t]),g?(0,l.createElement)(h.Spinner,null):(0,l.createElement)("form",{role:"search",method:"get",className:"ct-search-form","data-form-controls":d,"data-taxonomy-filter":"yes"===m?"true":"false","data-submit-button":"yes"===f?"text":"icon","data-updating":a?"yes":"no"},(0,l.createElement)("input",{type:"search",value:u,onChange:function(e){o({search_box_placeholder:e.target.value})},placeholder:"Search",name:"s",autoComplete:"off",title:"Search for...","aria-label":"Search for..."}),(0,l.createElement)("div",{className:"ct-search-form-controls"},"yes"===m?(0,l.createElement)("span",{className:Y()("ct-fake-select-container",{"ct-hidden-lg":!b.desktop,"ct-hidden-md":!b.tablet,"ct-hidden-sm":!b.mobile})},(0,l.createElement)("select",{className:"ct-select-taxonomy"}),(0,l.createElement)(c.RichText,{tagName:"span",className:"ct-fake-select",value:p,placeholder:"Select Category",allowedFormats:[],onChange:function(e){return o({taxonomy_filter_label:e})}})):null,(0,l.createElement)("div",{className:"wp-element-button","data-button":"".concat(d,":").concat("yes"===f?"text":"icon"),"aria-label":"Search button",style:n},"yes"===f?(0,l.createElement)(c.RichText,{tagName:"span",value:s,placeholder:"Search",allowedFormats:[],onChange:function(e){return o({search_box_button_text:e})}}):(0,l.createElement)(l.RawHTML,null,y.current.icon),(0,l.createElement)("span",{className:"ct-ajax-loader"},(0,l.createElement)("svg",{viewBox:"0 0 24 24"},(0,l.createElement)("circle",{cx:"12",cy:"12",r:"10",opacity:"0.2",fill:"none",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"2"}),(0,l.createElement)("path",{d:"m12,2c5.52,0,10,4.48,10,10",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2"},(0,l.createElement)("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"0.6s",from:"0 12 12",to:"360 12 12",repeatCount:"indefinite"})))))))},Dl=(0,l.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(h.Rect,{x:"4.75",y:"15.25",width:"6.5",height:"9.5",transform:"rotate(-90 4.75 15.25)",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),(0,l.createElement)(h.Rect,{x:"16",y:"10",width:"4",height:"4",rx:"1",fill:"currentColor"})),Al=(0,l.createElement)(h.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,l.createElement)(h.Rect,{x:"4.75",y:"7.75",width:"14.5",height:"8.5",rx:"1.25",stroke:"currentColor",fill:"none",strokeWidth:"1.5"}),(0,l.createElement)(h.Rect,{x:"8",y:"11",width:"8",height:"2",fill:"currentColor"}));function Bl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Hl(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Bl(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Bl(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Nl=(0,c.withColors)({textColor:"color"},{inputFontColor:"color"},{inputFontColorFocus:"color"},{inputIconColor:"color"},{inputIconColorFocus:"color"},{inputBorderColor:"color"},{inputBorderColorFocus:"color"},{inputBackgroundColor:"color"},{inputBackgroundColorFocus:"color"},{buttonBackgroundColor:"color"},{buttonBackgroundColorHover:"color"},{dropdownTextInitialColor:"color"},{dropdownTextHoverColor:"color"},{dropdownBackgroundColor:"color"},{shadowColor:"color"})((function(e){var t,o,n=e.attributes,r=e.setAttributes,i=e.clientId,s=e.className,u=e.inputFontColor,p=e.setInputFontColor,d=e.inputFontColorFocus,m=e.setInputFontColorFocus,f=e.inputIconColor,b=e.setInputIconColor,y=e.inputIconColorFocus,g=e.setInputIconColorFocus,_=e.inputBorderColor,k=e.setInputBorderColor,w=e.inputBorderColorFocus,O=e.setInputBorderColorFocus,x=e.inputBackgroundColor,C=e.setInputBackgroundColor,E=e.inputBackgroundColorFocus,P=e.setInputBackgroundColorFocus,S=e.buttonBackgroundColor,j=e.setButtonBackgroundColor,I=e.buttonBackgroundColorHover,T=e.setButtonBackgroundColorHover,D=e.dropdownTextInitialColor,A=e.setDropdownTextInitialColor,B=e.dropdownTextHoverColor,H=e.setDropdownTextHoverColor,N=e.dropdownBackgroundColor,z=e.setDropdownBackgroundColor,M=e.shadowColor,F=e.setShadowColor,R=n.buttonUseText,V=void 0===R?"no":R,L=n.buttonPosition,U=n.enable_live_results,q=null==n||null===(t=n.style)||void 0===t||null===(o=t.border)||void 0===o?void 0:o.radius,G=(0,l.useRef)(),W=(0,c.useBlockProps)({ref:G,className:{"ct-search-box":!0,className:s},style:Hl(Hl(Hl({"--theme-form-text-initial-color":null==u?void 0:u.color,"--theme-form-text-focus-color":null==d?void 0:d.color,"--theme-form-field-border-initial-color":null==_?void 0:_.color,"--theme-form-field-border-focus-color":null==w?void 0:w.color,"--theme-form-field-background-initial-color":null==x?void 0:x.color,"--theme-form-field-background-focus-color":null==E?void 0:E.color},q?{"--theme-form-field-border-radius":"".concat("string"==typeof q?q:"".concat(q.topLeft," ").concat(q.topRight," ").concat(q.bottomLeft," ").concat(q.bottomRight))}:{}),null!=n&&n.searchBoxHeight?{"--theme-form-field-height":"".concat(n.searchBoxHeight,"px")}:{}),"yes"===U?{"--theme-link-initial-color":null==D?void 0:D.color,"--theme-link-hover-color":null==B?void 0:B.color,"--search-dropdown-background":null==N?void 0:N.color,"--search-dropdown-box-shadow-color":null==M?void 0:M.color}:{})});return(0,l.createElement)("div",W,(0,l.createElement)(Tl,{blockProps:W,attributes:n,setAttributes:r,buttonStyles:Hl(Hl(Hl({},null!=f&&f.color?{"--theme-button-text-initial-color":f.color}:{}),null!=y&&y.color?{"--theme-button-text-hover-color":y.color}:{}),"outside"===L?Hl(Hl({},null!=S&&S.color?{"--theme-button-background-initial-color":S.color}:{}),null!=I&&I.color?{"--theme-button-background-hover-color":I.color}:{}):{})}),(0,l.createElement)(to,{attributes:n,setAttributes:r,options:Fl}),(0,l.createElement)(c.BlockControls,null,(0,l.createElement)(h.ToolbarGroup,null,(0,l.createElement)(h.ToolbarButton,{title:(0,a.__)("Button Outside"),icon:Dl,onClick:function(){r({buttonPosition:"outside"===L?"inside":"outside"})},className:"outside"===L?"is-pressed":void 0}),(0,l.createElement)(h.ToolbarButton,{title:(0,a.__)("Use button with text"),icon:Al,onClick:function(){r({buttonUseText:"no"===V?"yes":"no"})},className:"yes"===V?"is-pressed":void 0}))),(0,l.createElement)(c.InspectorControls,{group:"styles"},(0,l.createElement)(v,{label:(0,a.__)("Input Font Color","blocksy-companion"),resetAll:function(){p(El.inputFontColor),m(El.inputFontColorFocus)},panelId:i,settings:[{colorValue:u.color,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return p(e||El.inputFontColor)}},{colorValue:d.color,label:(0,a.__)("Focus","blocksy-companion"),onColorChange:function(e){return m(e||El.inputFontColorFocus)}}]}),(0,l.createElement)(v,{label:(0,a.__)("Input Border Color","blocksy-companion"),resetAll:function(){k(El.inputBorderColor),O(El.inputBorderColorFocus)},panelId:i,settings:[{colorValue:_.color,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return k(e||El.inputBorderColor)}},{colorValue:w.color,label:(0,a.__)("Focus","blocksy-companion"),onColorChange:function(e){return O(e||El.inputBorderColorFocus)}}]}),(0,l.createElement)(v,{label:(0,a.__)("Input Background Color","blocksy-companion"),resetAll:function(){C(El.inputBackgroundColor),P(El.inputBackgroundColorFocus)},panelId:i,settings:[{colorValue:x.color,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return C(e||El.inputBackgroundColor)}},{colorValue:E.color,label:(0,a.__)("Focus","blocksy-companion"),onColorChange:function(e){return P(e||El.inputBackgroundColorFocus)}}]}),(0,l.createElement)(v,{label:"yes"===V?(0,a.__)("Button Text Color","blocksy-companion"):(0,a.__)("Button Icon Color","blocksy-companion"),resetAll:function(){b(El.inputIconColor),g(El.inputIconColorFocus)},panelId:i,settings:[{colorValue:f.color,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return b(e||El.inputIconColor)}},{colorValue:y.color,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return g(e||El.inputIconColorFocus)}}]}),"outside"===L?(0,l.createElement)(v,{label:(0,a.__)("Button Background Color","blocksy-companion"),resetAll:function(){j(El.buttonBackgroundColor),T(El.buttonBackgroundColorHover)},panelId:i,settings:[{colorValue:S.color,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return j(e||El.buttonBackgroundColor)}},{colorValue:I.color,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return T(e||El.buttonBackgroundColorHover)}}]}):null,"yes"===U?(0,l.createElement)(React.Fragment,null,(0,l.createElement)(v,{label:(0,a.__)("Dropdown Text Color","blocksy-companion"),resetAll:function(){A(El.dropdownTextInitialColor),H(El.dropdownTextHoverColor)},panelId:i,settings:[{colorValue:D.color,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return A(e||El.dropdownTextInitialColor)}},{colorValue:B.color,label:(0,a.__)("Hover","blocksy-companion"),onColorChange:function(e){return H(e||El.dropdownTextHoverColor)}}]}),(0,l.createElement)(v,{label:(0,a.__)("Dropdown Background Color","blocksy-companion"),resetAll:function(){z(El.dropdownBackgroundColor)},panelId:i,settings:[{colorValue:N.color,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return z(e||El.dropdownBackgroundColor)}}]}),(0,l.createElement)(v,{label:(0,a.__)("Dropdown Shadow Color","blocksy-companion"),resetAll:function(){F(El.shadowColor)},panelId:i,settings:[{colorValue:M.color,enableAlpha:!0,label:(0,a.__)("Initial","blocksy-companion"),onColorChange:function(e){return F(e||El.shadowColor)}}]})):null))}));function zl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function Ml(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?zl(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):zl(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var Fl=Vt("search"),Rl=Rt(Fl);(0,i.registerBlockType)("blocksy/search",{apiVersion:3,title:(0,a.__)("Advanced Search","blocksy-companion"),description:(0,a.__)("Quickly find specific content on your site.","blocksy-companion"),icon:{src:(0,l.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"wc-block-editor-components-block-icon"},(0,l.createElement)("path",{d:"m19.7 18.5-3-2.9c1-1.3 1.6-2.8 1.6-4.5 0-3.9-3.2-7.2-7.2-7.2S4 7.2 4 11.2s3.2 7.2 7.2 7.2c1.7 0 3.3-.6 4.5-1.6l3 3c.1.1.3.2.5.2s.4-.1.5-.2c.3-.4.3-1 0-1.3zM5.6 11.2c0-3.1 2.5-5.5 5.5-5.5s5.6 2.4 5.6 5.5-2.5 5.5-5.5 5.5-5.6-2.5-5.6-5.5z"}))},category:"blocksy-blocks",attributes:Ml(Ml({},Rl),Pl),supports:{spacing:{margin:!0,__experimentalDefaultControls:{margin:!0}},__experimentalBorder:{color:!1,radius:!0,width:!1,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!1,radius:!0,width:!1}}},edit:function(e){return(0,l.createElement)(Nl,e)},save:function(){return(0,l.createElement)("div",null,"Blocksy: Search Block")}})}()}();
💾 Save Changes
❌ Cancel