Blocksy Companion - Version 1.8.26

Version Description

Download this release

Release Info

Developer creativethemeshq
Plugin Icon wp plugin Blocksy Companion
Version 1.8.26
Comparing to
See all releases

Code changes from version 1.8.25 to 1.8.26

blocksy-companion.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
- Version: 1.8.25
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blocksy-companion
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
+ Version: 1.8.26
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blocksy-companion
framework/extensions/cookies-consent/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.25
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.26
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/newsletter-subscribe/dashboard-static/bundle/main.js CHANGED
@@ -3,7 +3,7 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var u in r)n.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.blocksyOptions},function(e,t,n){"use strict";e.exports=n(13)},function(e,t){e.exports=window.ctEvents},function(e,t,n){var r,o,i=n(11),a=n(12),u=(o=[],{activateTrap:function(e){if(o.length>0){var t=o[o.length-1];t!==e&&t.pause()}var n=o.indexOf(e);-1===n||o.splice(n,1),o.push(e)},deactivateTrap:function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1),o.length>0&&o[o.length-1].unpause()}});function c(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),l={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},p={activate:function(e){if(l.active)return;O(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return f(),p},deactivate:d,pause:function(){if(l.paused||!l.active)return;l.paused=!0,h()},unpause:function(){if(!l.paused||!l.active)return;l.paused=!1,O(),f()}};return p;function d(e){if(l.active){clearTimeout(r),h(),l.active=!1,l.paused=!1,u.deactivateTrap(p);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&c((function(){var e;w((e=l.nodeFocusedBeforeActivation,m("setReturnFocus")||e))})),p}}function f(){if(l.active)return u.activateTrap(p),r=c((function(){w(v())})),n.addEventListener("focusin",y,!0),n.addEventListener("mousedown",g,{capture:!0,passive:!1}),n.addEventListener("touchstart",g,{capture:!0,passive:!1}),n.addEventListener("click",I,{capture:!0,passive:!1}),n.addEventListener("keydown",b,{capture:!0,passive:!1}),p}function h(){if(l.active)return n.removeEventListener("focusin",y,!0),n.removeEventListener("mousedown",g,!0),n.removeEventListener("touchstart",g,!0),n.removeEventListener("click",I,!0),n.removeEventListener("keydown",b,!0),p}function m(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function v(){var e;if(!(e=null!==m("initialFocus")?m("initialFocus"):o.contains(n.activeElement)?n.activeElement:l.firstTabbableNode||m("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function g(e){o.contains(e.target)||(s.clickOutsideDeactivates?d({returnFocus:!i.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function y(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),w(l.mostRecentlyFocusedNode||v()))}function b(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void d();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(O(),e.shiftKey&&e.target===l.firstTabbableNode)return e.preventDefault(),void w(l.lastTabbableNode);if(!e.shiftKey&&e.target===l.lastTabbableNode)e.preventDefault(),w(l.firstTabbableNode)}(e)}function I(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function O(){var e=i(o);l.firstTabbableNode=e[0]||v(),l.lastTabbableNode=e[e.length-1]||v()}function w(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):w(v()))}}},function(e,t,n){"use strict";var r=n(10);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),o="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function i(e,t){t=t||{};var n,i,u,c=[],p=[],d=e.querySelectorAll(r);for(t.includeContainer&&o.call(e,r)&&(d=Array.prototype.slice.apply(d)).unshift(e),n=0;n<d.length;n++)a(i=d[n])&&(0===(u=s(i))?c.push(i):p.push({documentOrder:n,tabIndex:u,node:i}));return p.sort(l).map((function(e){return e.node})).concat(c)}function a(e){return!(!u(e)||function(e){return function(e){return p(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||s(e)<0)}function u(e){return!(e.disabled||function(e){return p(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}i.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,r)&&a(e)},i.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,c)&&u(e)};var c=n.concat("iframe").join(",");function s(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function l(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function p(e){return"INPUT"===e.tagName}e.exports=i},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";
7
  /** @license React v16.13.1
8
  * react-is.production.min.js
9
  *
@@ -11,4 +11,4 @@
11
  *
12
  * This source code is licensed under the MIT license found in the
13
  * LICENSE file in the root directory of this source tree.
14
- */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,I=r?Symbol.for("react.responder"):60118,O=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case d:case a:case c:case u:case h:return e;default:switch(e=e&&e.$$typeof){case l:case f:case g:case v:case s:return e;default:return t}}case i:return t}}}function S(e){return w(e)===d}t.AsyncMode=p,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Lazy=g,t.Memo=v,t.Portal=i,t.Profiler=c,t.StrictMode=u,t.Suspense=h,t.isAsyncMode=function(e){return S(e)||w(e)===p},t.isConcurrentMode=S,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===a},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===v},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===c},t.isStrictMode=function(e){return w(e)===u},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===c||e===u||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===s||e.$$typeof===l||e.$$typeof===f||e.$$typeof===b||e.$$typeof===I||e.$$typeof===O||e.$$typeof===y)},t.typeOf=w},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(7),i=n.n(o),a=n(2),u=n(4),c=n.n(u),s=n(3),l=n.n(s),p=n(1),d=n.n(p);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},v=function(e){function t(){var n,r;f(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=h(this,e.call.apply(e,[this].concat(i))),g.call(r),h(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:m(t),refs:o,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:m(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:m(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(l.a.Component);v.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var g=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},y=v,b=function(e){var t=e.children,n=e.container,o=void 0===n?document.body:n,i=e.type,a=void 0===i?"reach-portal":i;return Object(r.createElement)(y,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=o.hasOwnProperty("current")?o.current:o;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var I=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},O=n(8),w=n.n(O);function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function x(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(){},j=function(){},_=function(e,t){var n,r,o;e.disposeAriaHider=(n=e.overlayNode,r=[],o=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),o.push(e),e.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=w()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},C=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},k=React.createContext(),P=React.forwardRef((function(e,t){var n=e.container,o=e.isOpen,i=void 0===o||o,a=e.onDismiss,u=void 0===a?E:a,c=e.initialFocusRef,s=e.onClick,l=e.onKeyDown,p=x(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(y,{didMount:j},i?Object(r.createElement)(b,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(y,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;_(t,c)},willUnmount:C},(function(e){var n=e.refs;return Object(r.createElement)(k.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",S({"data-reach-dialog-overlay":!0,onClick:I(s,(function(e){e.stopPropagation(),u()})),onKeyDown:I(l,(function(e){"Escape"===e.key&&(e.stopPropagation(),u())})),ref:function(e){n.overlayNode=e,t&&t(e)}},p)))}))):null)}));P.propTypes={initialFocusRef:function(){}};var A=function(e){return e.stopPropagation()},D=React.forwardRef((function(e,t){var n=e.onClick,o=(e.onKeyDown,x(e,["onClick","onKeyDown"]));return Object(r.createElement)(k.Consumer,null,(function(e){return Object(r.createElement)("div",S({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:I(n,A),ref:function(n){e(n),t&&t(n)}},o))}))})),M=n(5),T=function(e){return!!e},H=function(e){var t=e.items,n=e.isVisible,o=void 0===n?T:n,i=e.render,a=e.className,u=e.onDismiss;return Object(r.createElement)(M.Transition,{items:t,onStart:function(){return document.body.classList[o(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return o(e)&&function(t){return Object(r.createElement)(P,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return u()}},Object(r.createElement)(D,{className:c()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return u()}},"×"),i(e,t)))}}))};function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(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 N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var L=function(e){var t=R(Object(r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0)},Object(r.createElement)(H,{items:n,onDismiss:function(){return o(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]};function U(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function K(){return(K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function F(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(6);function V(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function B(e,t){return(!t||"hidden"!==e)&&("visible"!==e&&"clip"!==e)}function $(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return B(n.overflowY,t)||B(n.overflowX,t)||function(e){var t=function(e){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.frameElement:null}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function W(e,t,n,r,o,i,a,u){return i<e&&a>t||i>e&&a<t?0:i<=e&&u<=n||a>=t&&u>=n?i-e-r:a>t&&u<n||i<e&&u>n?a-t+o:0}var z=0;function q(e){return"function"==typeof e?e:Y}function Y(){}function X(e,t){null!==e&&function(e,t){var n=t.scrollMode,r=t.block,o=t.inline,i=t.boundary,a=t.skipOverflowHiddenElements,u="function"==typeof i?i:function(e){return e!==i};if(!V(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,s=[],l=e;V(l)&&u(l);){if((l=l.parentNode)===c){s.push(l);break}l===document.body&&$(l)&&!$(document.documentElement)||$(l,a)&&s.push(l)}for(var p=window.visualViewport?visualViewport.width:innerWidth,d=window.visualViewport?visualViewport.height:innerHeight,f=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,m=e.getBoundingClientRect(),v=m.height,g=m.width,y=m.top,b=m.right,I=m.bottom,O=m.left,w="start"===r||"nearest"===r?y:"end"===r?I:y+v/2,S="center"===o?O+g/2:"end"===o?b:O,x=[],E=0;E<s.length;E++){var j=s[E],_=j.getBoundingClientRect(),C=_.height,k=_.width,P=_.top,A=_.right,D=_.bottom,M=_.left;if("if-needed"===n&&y>=0&&O>=0&&I<=d&&b<=p&&y>=P&&I<=D&&O>=M&&b<=A)return x;var T=getComputedStyle(j),H=parseInt(T.borderLeftWidth,10),R=parseInt(T.borderTopWidth,10),N=parseInt(T.borderRightWidth,10),L=parseInt(T.borderBottomWidth,10),U=0,K=0,F="offsetWidth"in j?j.offsetWidth-j.clientWidth-H-N:0,B="offsetHeight"in j?j.offsetHeight-j.clientHeight-R-L:0;if(c===j)U="start"===r?w:"end"===r?w-d:"nearest"===r?W(h,h+d,d,R,L,h+w,h+w+v,v):w-d/2,K="start"===o?S:"center"===o?S-p/2:"end"===o?S-p:W(f,f+p,p,H,N,f+S,f+S+g,g),U=Math.max(0,U+h),K=Math.max(0,K+f);else{U="start"===r?w-P-R:"end"===r?w-D+L+B:"nearest"===r?W(P,D,C,R,L+B,w,w+v,v):w-(P+C/2)+B/2,K="start"===o?S-M-H:"center"===o?S-(M+k/2)+F/2:"end"===o?S-A+N+F:W(M,A,k,H,N+F,S,S+g,g);var z=j.scrollLeft,q=j.scrollTop;w+=q-(U=Math.max(0,Math.min(q+U,j.scrollHeight-C+B))),S+=z-(K=Math.max(0,Math.min(z+K,j.scrollWidth-k+F)))}x.push({el:j,top:U,left:K})}return x}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function G(e,t){return e===t||e.contains&&e.contains(t)}function J(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function ee(e){var t=e.isOpen,n=e.selectedItem,r=e.resultCount,o=e.previousResultCount,i=e.itemToString;return t?r?r!==o?r+" result"+(1===r?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":n?i(n):""}function te(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function ne(e){return"string"==typeof e.type}function re(e){return e.props}var oe=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ie(e){void 0===e&&(e={});var t={};return oe.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function ae(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function ue(e,t,n){var r=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:r+1);var o=t+e;return o<0?o=r:o>r&&(o=0),o}var ce=J((function(){le().textContent=""}),500);function se(e,t){var n=le(t);e&&(n.textContent=e,ce())}function le(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var pe=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),de=function(){var e=function(e){var t,n;function r(t){var n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+String(z++),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=ie(t),n.internalSetState(K({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=ie(t),n.internalSetState(K({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},a="function"==typeof e;return!a&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,K({},n.getStateAndHelpers(),{},e)),n.setState((function(t){t=n.getState(t);var u=a?e(t):e;u=n.props.stateReducer(t,u),r=u.hasOwnProperty("selectedItem");var c={},s={};return r&&u.selectedItem!==t.selectedItem&&(o=u.selectedItem),u.type=u.type||0,Object.keys(u).forEach((function(e){t[e]!==u[e]&&(i[e]=u[e]),"type"!==e&&(s[e]=u[e],n.isControlledProp(e)||(c[e]=u[e]))})),a&&u.hasOwnProperty("inputValue")&&n.props.onInputValueChange(u.inputValue,K({},n.getStateAndHelpers(),{},u)),c}),(function(){q(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,u=o.ref,c=U(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;n.getRootProps.called=!0,n.getRootProps.refKey=a,n.getRootProps.suppressRefError=l;var p=n.getState().isOpen;return K(((r={})[a]=Z(u,n.rootRef),r.role="combobox",r["aria-expanded"]=p,r["aria-haspopup"]="listbox",r["aria-owns"]=p?n.menuId:null,r["aria-labelledby"]=n.labelId,r),c)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(ue(1,t.getState().highlightedIndex,e),{type:4})}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(ue(-1,t.getState().highlightedIndex,e),{type:4})}))},Enter:function(e){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}},Escape:function(e){e.preventDefault(),this.reset({type:5,selectedItem:null,inputValue:""})}},n.buttonKeyDownHandlers=K({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=K({},n.keyDownHandlers,{Home:function(e){this.highlightFirstOrLastIndex(e,!0,{type:7})},End:function(e){this.highlightFirstOrLastIndex(e,!1,{type:8})}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick,o=(t.onPress,t.onKeyDown),i=t.onKeyUp,a=t.onBlur,u=U(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),c=n.getState().isOpen,s={onClick:Q(r,n.buttonHandleClick),onKeyDown:Q(o,n.buttonHandleKeyDown),onKeyUp:Q(i,n.buttonHandleKeyUp),onBlur:Q(a,n.buttonHandleBlur)};return K({type:"button",role:"button","aria-label":c?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},u.disabled?{}:s,{},u)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=ae(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(F(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return K({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,a=t.onInput,u=(t.onChangeText,U(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),c={};var s,l=n.getState(),p=l.inputValue,d=l.isOpen,f=l.highlightedIndex;u.disabled||((s={}).onChange=Q(i,a,n.inputHandleChange),s.onKeyDown=Q(r,n.inputHandleKeyDown),s.onBlur=Q(o,n.inputHandleBlur),c=s);return K({"aria-autocomplete":"list","aria-activedescendant":d&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":d?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},c,{},u)},n.inputHandleKeyDown=function(e){var t=ae(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(F(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,u=o.ref,c=U(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;return n.getMenuProps.called=!0,n.getMenuProps.refKey=a,n.getMenuProps.suppressRefError=l,K(((r={})[a]=Z(u,n.menuRef),r.role="listbox",r["aria-labelledby"]=c&&c["aria-label"]?null:n.labelId,r.id=n.menuId,r),c)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,a=r.onClick,u=(r.onPress,r.index),c=r.item,s=void 0===c?void 0:c,l=U(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===u?(n.items.push(s),u=n.items.indexOf(s)):n.items[u]=s;var p=a,d=((t={onMouseMove:Q(o,(function(){u!==n.getState().highlightedIndex&&(n.setHighlightedIndex(u,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:Q(i,(function(e){e.preventDefault()}))}).onClick=Q(p,(function(){n.selectItemAtIndex(u,{type:9})})),t),f=l.disabled?{onMouseDown:d.onMouseDown}:d;return K({id:n.getItemId(u),role:"option","aria-selected":n.getState().highlightedIndex===u},f,{},l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=ie(e),n.internalSetState((function(t){var r=t.selectedItem;return K({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=ie(e),n.internalSetState((function(t){var r=t.isOpen;return K({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},{},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),q(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=J((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(K({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,se(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,a=void 0===i?o:i,u=r.defaultIsOpen,c=r.initialIsOpen,s=void 0===c?u:c,l=r.initialInputValue,p=void 0===l?"":l,d=r.initialSelectedItem,f=void 0===d?null:d,h=n.getState({highlightedIndex:a,isOpen:s,inputValue:p,selectedItem:f});return null!=h.selectedItem&&void 0===n.props.initialInputValue&&(h.inputValue=n.props.itemToString(h.selectedItem)),n.state=h,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},o.getState=function(e){var t=this;return void 0===e&&(e=this.state),Object.keys(e).reduce((function(n,r){return n[r]=t.isControlledProp(r)?t.props[r]:e[r],n}),{})},o.isControlledProp=function(e){return void 0!==this.props[e]},o.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},o.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},o.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},o.moveHighlightedIndex=function(e,t){var n=this.getItemCount();if(n>0){var r=ue(e,this.getState().highlightedIndex,n);this.setHighlightedIndex(r,t)}},o.highlightFirstOrLastIndex=function(e,t,n){var r=this.getItemCount()-1;r<0||!this.getState().isOpen||(e.preventDefault(),this.setHighlightedIndex(t?0:r,n))},o.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,a=this.id,u=this.getRootProps,c=this.getToggleButtonProps,s=this.getLabelProps,l=this.getMenuProps,p=this.getInputProps,d=this.getItemProps,f=this.openMenu,h=this.closeMenu,m=this.toggleMenu,v=this.selectItem,g=this.selectItemAtIndex,y=this.selectHighlightedItem,b=this.setHighlightedIndex,I=this.clearSelection,O=this.clearItems;return{getRootProps:u,getToggleButtonProps:c,getLabelProps:s,getMenuProps:l,getInputProps:p,getItemProps:d,reset:this.reset,openMenu:f,closeMenu:h,toggleMenu:m,selectItem:v,selectItemAtIndex:g,selectHighlightedItem:y,setHighlightedIndex:b,clearSelection:I,clearItems:O,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},o.componentDidMount=function(){var e=this;var t=function(t,n){void 0===n&&(n=!0);var r=e.props.environment.document;return[e._rootNode,e._menuNode].some((function(e){return e&&(G(e,t)||n&&G(e,r.activeElement))}))},n=function(){e.isMouseDown=!0},r=function(n){e.isMouseDown=!1,!t(n.target)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},o=function(){e.isTouchMove=!1},i=function(){e.isTouchMove=!0},a=function(n){var r=t(n.target,!1);e.isTouchMove||r||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},u=this.props.environment;u.addEventListener("mousedown",n),u.addEventListener("mouseup",r),u.addEventListener("touchstart",o),u.addEventListener("touchmove",i),u.addEventListener("touchend",a),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),u.removeEventListener("mousedown",n),u.removeEventListener("mouseup",r),u.removeEventListener("touchstart",o),u.removeEventListener("touchmove",i),u.removeEventListener("touchend",a)}},o.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},o.componentDidUpdate=function(e,t){this.isControlledProp("selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},o.componentWillUnmount=function(){this.cleanup()},o.render=function(){var e=te(this.props.children,Y);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=te(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:ne(t)?Object(s.cloneElement)(t,this.getRootProps(re(t))):void 0:null},r}(s.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:ee,itemToString:function(e){return null==e?"":String(e)},onStateChange:Y,onInputValueChange:Y,onUserAction:Y,onChange:Y,onSelect:Y,onOuterClick:Y,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:X},e.stateChangeTypes=pe,e}();d.a.array.isRequired,d.a.func,d.a.func,d.a.func,d.a.bool,d.a.number,d.a.number,d.a.number,d.a.bool,d.a.bool,d.a.bool,d.a.any,d.a.any,d.a.any,d.a.string,d.a.string,d.a.string,d.a.func,d.a.string,d.a.func,d.a.func,d.a.func,d.a.func,d.a.func,d.a.shape({addEventListener:d.a.func,removeEventListener:d.a.func,document:d.a.shape({getElementById:d.a.func,activeElement:d.a.any,body:d.a.any})});"undefined"==typeof window||window;var fe=de;function he(){return(he=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function me(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ge(e,t)}(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 ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ye=function(e){var t=e.listId,n=e.provider,o=e.apiKey,i=e.onChange,u=ve(Object(r.useState)([]),2),s=u[0],l=u[1],p=ve(Object(r.useState)(!1),2),d=p[0],f=p[1],h=ve(Object(r.useState)({controller:null}),2),m=h[0].controller,v=h[1],g=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m&&m.abort(),f(!0),"AbortController"in window&&(m=new AbortController,v({controller:m})),(t=new FormData).append("api_key",o),t.append("provider",n),t.append("action","blocksy_ext_newsletter_subscribe_maybe_get_lists"),e.prev=7,e.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",signal:m.signal,body:t});case 10:if(200!==(r=e.sent).status){e.next=20;break}return e.next=14,r.json();case 14:if(!(i=e.sent).success){e.next=20;break}if("api_key_invalid"===i.data.result){e.next=20;break}return f(!1),l(i.data.result),e.abrupt("return");case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(7);case 24:l([]),f(!1);case 26:case"end":return e.stop()}}),e,null,[[7,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){me(i,r,o,a,u,"next",e)}function u(e){me(i,r,o,a,u,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){o?g():l([])}),[n,o]),0===s.length?Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",{disabled:!0,placeholder:d?Object(a.__)("Loading","blocksy-companion"):Object(a.__)("Invalid API Key...","blocksy-companion")})):Object(r.createElement)(fe,{selectedItem:t||"",onChange:function(e){return i(e)},itemToString:function(e){return e?(s.find((function(t){return t.id===e}))||{}).name:""}},(function(e){var t=e.getInputProps,n=e.getItemProps,o=(e.getLabelProps,e.getMenuProps),i=e.isOpen,u=(e.inputValue,e.highlightedIndex),l=e.selectedItem,p=e.openMenu;return Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",he({},t({onFocus:function(){return p()},onClick:function(){return p()}}),{placeholder:Object(a.__)("Select list...","blocksy-companion"),readOnly:!0})),i&&Object(r.createElement)("div",o({className:"ct-select-dropdown"}),s.map((function(e,t){return Object(r.createElement)("div",n({key:e.id,index:t,item:e.id,className:c()("ct-select-dropdown-item",{active:u===t,selected:l===e.id})}),e.name)}))))}))};function be(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oe(e,t)}(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 Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var we=function(e){var t=e.extension,n=e.isEditingCredentials,o=e.setIsEditingCredentials,i=e.onCredentialsValidated,u=Ie(Object(r.useState)(t.data.provider),2),s=u[0],l=u[1],p=Ie(Object(r.useState)(t.data.api_key),2),d=p[0],f=p[1],h=Ie(Object(r.useState)(t.data.list_id),2),m=h[0],v=h[1],g=Ie(Object(r.useState)(!1),2),y=g[0],b=g[1],I=Ie(Object(r.useState)(!1),2),O=I[0],w=I[1],S=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("provider",s),t.append("api_key",d),t.append("list_id",m),t.append("action","blocksy_ext_newsletter_subscribe_maybe_save_credentials"),b(!0),e.prev=6,e.next=9,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 9:if(200!==(n=e.sent).status){e.next=15;break}return e.next=13,n.json();case 13:(r=e.sent).success&&"api_key_invalid"!==r.data.result&&(i(),w(!1));case 15:w(!0),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(6),w(!0);case 21:return e.next=23,new Promise((function(e){return setTimeout((function(){return e()}),1e3)}));case 23:b(!1);case 24:case"end":return e.stop()}}),e,null,[[6,18]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){be(i,r,o,a,u,"next",e)}function u(e){be(i,r,o,a,u,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)(H,{items:n,onDismiss:function(){return o(!1)},className:"ct-mailchimp-modal",render:function(){return Object(r.createElement)("div",{className:c()("ct-modal-content",{"ct-key-invalid":O})},Object(r.createElement)("h2",null,Object(a.__)("API Credentials","blocksy-companion")),Object(r.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.__)("Enter your Newsletter provider API credentials in the form below.","blocksy-companion")}}),Object(r.createElement)("div",{className:"ct-newsletter-select-provider"},Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h4",null,Object(a.__)("Select Provider","blocksy-companion")),Object(r.createElement)(M.Select,{onChange:function(e){l(e)},option:{placeholder:Object(a.__)("Pick Mailing Service","blocksy-companion"),choices:[{key:"mailchimp",value:"Mailchimp"},{key:"mailerlite",value:"Mailerlite"}]},value:s})),!ctDashboardLocalizations.plugin_data.is_pro&&"mailchimp"!==s&&Object(r.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.sprintf)(Object(a.__)("This option is available only in Blocksy premium %sversion%s.","blocksy-companion"),'<a target="_blank" href="https://creativethemes.com/blocksy/pricing/">',"</a>")}}),"mailchimp"===s&&Object(r.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.sprintf)(Object(a.__)("More info on how to generate an API key for Mailchimp can be found %shere%s.","blocksy-companion"),'<a target="_blank" href="https://mailchimp.com/help/about-api-keys/">',"</a>")}}),ctDashboardLocalizations.plugin_data.is_pro&&"mailerlite"===s&&Object(r.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.sprintf)(Object(a.__)("More info on how to generate an API key for Mailerlite can be found %shere%s.","blocksy-companion"),'<a target="_blank" href="https://help.mailerlite.com/article/show/35040-where-to-find-the-mailerlite-api-key-and-api-documentation">',"</a>")}})),("mailchimp"===s||ctDashboardLocalizations.plugin_data.is_pro)&&Object(r.createElement)("div",{className:"mailchimp-credentials"},Object(r.createElement)("section",null,Object(r.createElement)("label",null,Object(a.__)("API Key","blocksy-companion")),Object(r.createElement)("div",{className:"ct-option-input"},Object(r.createElement)("input",{type:"text",onChange:function(e){var t=e.target.value;return f(t)},value:d||""}))),Object(r.createElement)("section",null,Object(r.createElement)("label",null,Object(a.__)("List ID","blocksy-companion")),Object(r.createElement)(ye,{listId:m,onChange:function(e){return v(e)},provider:s,apiKey:d})),Object(r.createElement)("section",null,Object(r.createElement)("label",null," "),Object(r.createElement)("button",{className:"ct-button","data-button":"blue",disabled:!d||!m||y,onClick:function(){return S()}},y?Object(a.__)("Loading...","blocksy-companion"):t.__object?Object(a.__)("Save Settings","blocksy-companion"):Object(a.__)("Activate","blocksy-companion")))))}})};function Se(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function xe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Se(i,r,o,a,u,"next",e)}function u(e){Se(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(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 je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),o=Ee(n,2),i=o[0],u=o[1],c=Object(r.useState)(!1),s=Ee(c,2),l=s[0],p=s[1],d=function(){var n=xe(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),u(!0),n.prev=4,n.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 7:t(),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(4);case 12:u(!1);case 13:case"end":return n.stop()}}),n,null,[[4,10]])})));return function(){return n.apply(this,arguments)}}(),f=function(){e.__object||e.data.api_key?d():p(!0)};return[i,f,Object(r.createElement)(r.Fragment,null,e.__object&&e.data.api_key&&Object(r.createElement)("button",{className:"ct-button ct-config-btn","data-button":"white",title:"Edit Credentials",onClick:function(){return p(!0)}},Object(a.__)("Configure","blocksy-companion")),Object(r.createElement)(we,{isEditingCredentials:l,setIsEditingCredentials:p,extension:e,onCredentialsValidated:function(){e.__object||d(),p(!1)}}))]};function Ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ke(e,t)}(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 ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pe=function(e){var t=e.extension,n=e.onExtsSync,o=Ce(_e(t,(function(){n()})),3),i=o[0],u=o[1],s=o[2],l=Ce(L(t),2),p=l[0],d=l[1];return Object(r.createElement)("li",{className:c()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,i&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),t.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},t.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:c()(t.__object?"ct-button":"ct-button-primary"),"data-button":"white",disabled:i,onClick:function(){return u()}},t.__object?Object(a.__)("Deactivate","blocksy-companion"):Object(a.__)("Activate","blocksy-companion")),s,t.readme&&Object(r.createElement)("button",{onClick:function(){return p()},"data-button":"white",className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"})))),d)};i.a.on("ct:extensions:card",(function(e){var t=e.CustomComponent;"newsletter-subscribe"===e.extension.name&&(t.extension=Pe)}))}]);
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var u in r)n.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.blocksyOptions},function(e,t,n){"use strict";e.exports=n(13)},function(e,t){e.exports=window.ctEvents},function(e,t,n){var r,o,i=n(11),a=n(12),u=(o=[],{activateTrap:function(e){if(o.length>0){var t=o[o.length-1];t!==e&&t.pause()}var n=o.indexOf(e);-1===n||o.splice(n,1),o.push(e)},deactivateTrap:function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1),o.length>0&&o[o.length-1].unpause()}});function c(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),l={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},p={activate:function(e){if(l.active)return;I(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return f(),p},deactivate:d,pause:function(){if(l.paused||!l.active)return;l.paused=!0,h()},unpause:function(){if(!l.paused||!l.active)return;l.paused=!1,I(),f()}};return p;function d(e){if(l.active){clearTimeout(r),h(),l.active=!1,l.paused=!1,u.deactivateTrap(p);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&c((function(){var e;O((e=l.nodeFocusedBeforeActivation,m("setReturnFocus")||e))})),p}}function f(){if(l.active)return u.activateTrap(p),r=c((function(){O(v())})),n.addEventListener("focusin",y,!0),n.addEventListener("mousedown",g,{capture:!0,passive:!1}),n.addEventListener("touchstart",g,{capture:!0,passive:!1}),n.addEventListener("click",w,{capture:!0,passive:!1}),n.addEventListener("keydown",b,{capture:!0,passive:!1}),p}function h(){if(l.active)return n.removeEventListener("focusin",y,!0),n.removeEventListener("mousedown",g,!0),n.removeEventListener("touchstart",g,!0),n.removeEventListener("click",w,!0),n.removeEventListener("keydown",b,!0),p}function m(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function v(){var e;if(!(e=null!==m("initialFocus")?m("initialFocus"):o.contains(n.activeElement)?n.activeElement:l.firstTabbableNode||m("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function g(e){o.contains(e.target)||(s.clickOutsideDeactivates?d({returnFocus:!i.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function y(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),O(l.mostRecentlyFocusedNode||v()))}function b(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void d();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(I(),e.shiftKey&&e.target===l.firstTabbableNode)return e.preventDefault(),void O(l.lastTabbableNode);if(!e.shiftKey&&e.target===l.lastTabbableNode)e.preventDefault(),O(l.firstTabbableNode)}(e)}function w(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function I(){var e=i(o);l.firstTabbableNode=e[0]||v(),l.lastTabbableNode=e[e.length-1]||v()}function O(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):O(v()))}}},function(e,t,n){"use strict";var r=n(10);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),o="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function i(e,t){t=t||{};var n,i,u,c=[],p=[],d=e.querySelectorAll(r);for(t.includeContainer&&o.call(e,r)&&(d=Array.prototype.slice.apply(d)).unshift(e),n=0;n<d.length;n++)a(i=d[n])&&(0===(u=s(i))?c.push(i):p.push({documentOrder:n,tabIndex:u,node:i}));return p.sort(l).map((function(e){return e.node})).concat(c)}function a(e){return!(!u(e)||function(e){return function(e){return p(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||s(e)<0)}function u(e){return!(e.disabled||function(e){return p(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}i.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,r)&&a(e)},i.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,c)&&u(e)};var c=n.concat("iframe").join(",");function s(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function l(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function p(e){return"INPUT"===e.tagName}e.exports=i},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";
7
  /** @license React v16.13.1
8
  * react-is.production.min.js
9
  *
11
  *
12
  * This source code is licensed under the MIT license found in the
13
  * LICENSE file in the root directory of this source tree.
14
+ */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,I=r?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case d:case a:case c:case u:case h:return e;default:switch(e=e&&e.$$typeof){case l:case f:case g:case v:case s:return e;default:return t}}case i:return t}}}function S(e){return O(e)===d}t.AsyncMode=p,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Lazy=g,t.Memo=v,t.Portal=i,t.Profiler=c,t.StrictMode=u,t.Suspense=h,t.isAsyncMode=function(e){return S(e)||O(e)===p},t.isConcurrentMode=S,t.isContextConsumer=function(e){return O(e)===l},t.isContextProvider=function(e){return O(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return O(e)===f},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===g},t.isMemo=function(e){return O(e)===v},t.isPortal=function(e){return O(e)===i},t.isProfiler=function(e){return O(e)===c},t.isStrictMode=function(e){return O(e)===u},t.isSuspense=function(e){return O(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===c||e===u||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===s||e.$$typeof===l||e.$$typeof===f||e.$$typeof===b||e.$$typeof===w||e.$$typeof===I||e.$$typeof===y)},t.typeOf=O},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(7),i=n.n(o),a=n(2),u=n(4),c=n.n(u),s=n(3),l=n.n(s),p=n(1),d=n.n(p);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},v=function(e){function t(){var n,r;f(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=h(this,e.call.apply(e,[this].concat(i))),g.call(r),h(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:m(t),refs:o,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:m(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:m(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(l.a.Component);v.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var g=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},y=v,b=function(e){var t=e.children,n=e.container,o=void 0===n?document.body:n,i=e.type,a=void 0===i?"reach-portal":i;return Object(r.createElement)(y,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=o.hasOwnProperty("current")?o.current:o;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var w=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},I=n(8),O=n.n(I);function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function x(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(){},j=function(){},_=function(e,t){var n,r,o;e.disposeAriaHider=(n=e.overlayNode,r=[],o=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),o.push(e),e.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=O()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},C=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},k=React.createContext(),P=React.forwardRef((function(e,t){var n=e.container,o=e.isOpen,i=void 0===o||o,a=e.onDismiss,u=void 0===a?E:a,c=e.initialFocusRef,s=e.onClick,l=e.onKeyDown,p=x(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(y,{didMount:j},i?Object(r.createElement)(b,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(y,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;_(t,c)},willUnmount:C},(function(e){var n=e.refs;return Object(r.createElement)(k.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",S({"data-reach-dialog-overlay":!0,onClick:w(s,(function(e){e.stopPropagation(),u()})),onKeyDown:w(l,(function(e){"Escape"===e.key&&(e.stopPropagation(),u())})),ref:function(e){n.overlayNode=e,t&&t(e)}},p)))}))):null)}));P.propTypes={initialFocusRef:function(){}};var A=function(e){return e.stopPropagation()},D=React.forwardRef((function(e,t){var n=e.onClick,o=(e.onKeyDown,x(e,["onClick","onKeyDown"]));return Object(r.createElement)(k.Consumer,null,(function(e){return Object(r.createElement)("div",S({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:w(n,A),ref:function(n){e(n),t&&t(n)}},o))}))})),M=n(5),T=function(e){return!!e},H=function(e){var t=e.items,n=e.isVisible,o=void 0===n?T:n,i=e.render,a=e.className,u=e.onDismiss;return Object(r.createElement)(M.Transition,{items:t,onStart:function(){return document.body.classList[o(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return o(e)&&function(t){return Object(r.createElement)(P,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return u()}},Object(r.createElement)(D,{className:c()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return u()}},"×"),i(e,t)))}}))};function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(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 N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var L=function(e){var t=R(Object(r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0)},Object(r.createElement)(H,{items:n,onDismiss:function(){return o(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]};function U(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function K(){return(K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function F(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(6);function V(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function B(e,t){return(!t||"hidden"!==e)&&("visible"!==e&&"clip"!==e)}function $(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return B(n.overflowY,t)||B(n.overflowX,t)||function(e){var t=function(e){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.frameElement:null}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function W(e,t,n,r,o,i,a,u){return i<e&&a>t||i>e&&a<t?0:i<=e&&u<=n||a>=t&&u>=n?i-e-r:a>t&&u<n||i<e&&u>n?a-t+o:0}var z=0;function q(e){return"function"==typeof e?e:Y}function Y(){}function X(e,t){null!==e&&function(e,t){var n=t.scrollMode,r=t.block,o=t.inline,i=t.boundary,a=t.skipOverflowHiddenElements,u="function"==typeof i?i:function(e){return e!==i};if(!V(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,s=[],l=e;V(l)&&u(l);){if((l=l.parentNode)===c){s.push(l);break}l===document.body&&$(l)&&!$(document.documentElement)||$(l,a)&&s.push(l)}for(var p=window.visualViewport?visualViewport.width:innerWidth,d=window.visualViewport?visualViewport.height:innerHeight,f=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,m=e.getBoundingClientRect(),v=m.height,g=m.width,y=m.top,b=m.right,w=m.bottom,I=m.left,O="start"===r||"nearest"===r?y:"end"===r?w:y+v/2,S="center"===o?I+g/2:"end"===o?b:I,x=[],E=0;E<s.length;E++){var j=s[E],_=j.getBoundingClientRect(),C=_.height,k=_.width,P=_.top,A=_.right,D=_.bottom,M=_.left;if("if-needed"===n&&y>=0&&I>=0&&w<=d&&b<=p&&y>=P&&w<=D&&I>=M&&b<=A)return x;var T=getComputedStyle(j),H=parseInt(T.borderLeftWidth,10),R=parseInt(T.borderTopWidth,10),N=parseInt(T.borderRightWidth,10),L=parseInt(T.borderBottomWidth,10),U=0,K=0,F="offsetWidth"in j?j.offsetWidth-j.clientWidth-H-N:0,B="offsetHeight"in j?j.offsetHeight-j.clientHeight-R-L:0;if(c===j)U="start"===r?O:"end"===r?O-d:"nearest"===r?W(h,h+d,d,R,L,h+O,h+O+v,v):O-d/2,K="start"===o?S:"center"===o?S-p/2:"end"===o?S-p:W(f,f+p,p,H,N,f+S,f+S+g,g),U=Math.max(0,U+h),K=Math.max(0,K+f);else{U="start"===r?O-P-R:"end"===r?O-D+L+B:"nearest"===r?W(P,D,C,R,L+B,O,O+v,v):O-(P+C/2)+B/2,K="start"===o?S-M-H:"center"===o?S-(M+k/2)+F/2:"end"===o?S-A+N+F:W(M,A,k,H,N+F,S,S+g,g);var z=j.scrollLeft,q=j.scrollTop;O+=q-(U=Math.max(0,Math.min(q+U,j.scrollHeight-C+B))),S+=z-(K=Math.max(0,Math.min(z+K,j.scrollWidth-k+F)))}x.push({el:j,top:U,left:K})}return x}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function G(e,t){return e===t||e.contains&&e.contains(t)}function J(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function ee(e){var t=e.isOpen,n=e.selectedItem,r=e.resultCount,o=e.previousResultCount,i=e.itemToString;return t?r?r!==o?r+" result"+(1===r?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":n?i(n):""}function te(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function ne(e){return"string"==typeof e.type}function re(e){return e.props}var oe=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ie(e){void 0===e&&(e={});var t={};return oe.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function ae(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function ue(e,t,n){var r=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:r+1);var o=t+e;return o<0?o=r:o>r&&(o=0),o}var ce=J((function(){le().textContent=""}),500);function se(e,t){var n=le(t);e&&(n.textContent=e,ce())}function le(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var pe=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),de=function(){var e=function(e){var t,n;function r(t){var n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+String(z++),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=ie(t),n.internalSetState(K({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=ie(t),n.internalSetState(K({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},a="function"==typeof e;return!a&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,K({},n.getStateAndHelpers(),{},e)),n.setState((function(t){t=n.getState(t);var u=a?e(t):e;u=n.props.stateReducer(t,u),r=u.hasOwnProperty("selectedItem");var c={},s={};return r&&u.selectedItem!==t.selectedItem&&(o=u.selectedItem),u.type=u.type||0,Object.keys(u).forEach((function(e){t[e]!==u[e]&&(i[e]=u[e]),"type"!==e&&(s[e]=u[e],n.isControlledProp(e)||(c[e]=u[e]))})),a&&u.hasOwnProperty("inputValue")&&n.props.onInputValueChange(u.inputValue,K({},n.getStateAndHelpers(),{},u)),c}),(function(){q(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,u=o.ref,c=U(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;n.getRootProps.called=!0,n.getRootProps.refKey=a,n.getRootProps.suppressRefError=l;var p=n.getState().isOpen;return K(((r={})[a]=Z(u,n.rootRef),r.role="combobox",r["aria-expanded"]=p,r["aria-haspopup"]="listbox",r["aria-owns"]=p?n.menuId:null,r["aria-labelledby"]=n.labelId,r),c)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(ue(1,t.getState().highlightedIndex,e),{type:4})}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(ue(-1,t.getState().highlightedIndex,e),{type:4})}))},Enter:function(e){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}},Escape:function(e){e.preventDefault(),this.reset({type:5,selectedItem:null,inputValue:""})}},n.buttonKeyDownHandlers=K({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=K({},n.keyDownHandlers,{Home:function(e){this.highlightFirstOrLastIndex(e,!0,{type:7})},End:function(e){this.highlightFirstOrLastIndex(e,!1,{type:8})}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick,o=(t.onPress,t.onKeyDown),i=t.onKeyUp,a=t.onBlur,u=U(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),c=n.getState().isOpen,s={onClick:Q(r,n.buttonHandleClick),onKeyDown:Q(o,n.buttonHandleKeyDown),onKeyUp:Q(i,n.buttonHandleKeyUp),onBlur:Q(a,n.buttonHandleBlur)};return K({type:"button",role:"button","aria-label":c?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},u.disabled?{}:s,{},u)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=ae(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(F(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return K({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,a=t.onInput,u=(t.onChangeText,U(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),c={};var s,l=n.getState(),p=l.inputValue,d=l.isOpen,f=l.highlightedIndex;u.disabled||((s={}).onChange=Q(i,a,n.inputHandleChange),s.onKeyDown=Q(r,n.inputHandleKeyDown),s.onBlur=Q(o,n.inputHandleBlur),c=s);return K({"aria-autocomplete":"list","aria-activedescendant":d&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":d?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},c,{},u)},n.inputHandleKeyDown=function(e){var t=ae(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(F(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,u=o.ref,c=U(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;return n.getMenuProps.called=!0,n.getMenuProps.refKey=a,n.getMenuProps.suppressRefError=l,K(((r={})[a]=Z(u,n.menuRef),r.role="listbox",r["aria-labelledby"]=c&&c["aria-label"]?null:n.labelId,r.id=n.menuId,r),c)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,a=r.onClick,u=(r.onPress,r.index),c=r.item,s=void 0===c?void 0:c,l=U(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===u?(n.items.push(s),u=n.items.indexOf(s)):n.items[u]=s;var p=a,d=((t={onMouseMove:Q(o,(function(){u!==n.getState().highlightedIndex&&(n.setHighlightedIndex(u,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:Q(i,(function(e){e.preventDefault()}))}).onClick=Q(p,(function(){n.selectItemAtIndex(u,{type:9})})),t),f=l.disabled?{onMouseDown:d.onMouseDown}:d;return K({id:n.getItemId(u),role:"option","aria-selected":n.getState().highlightedIndex===u},f,{},l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=ie(e),n.internalSetState((function(t){var r=t.selectedItem;return K({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=ie(e),n.internalSetState((function(t){var r=t.isOpen;return K({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},{},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),q(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=J((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(K({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,se(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,a=void 0===i?o:i,u=r.defaultIsOpen,c=r.initialIsOpen,s=void 0===c?u:c,l=r.initialInputValue,p=void 0===l?"":l,d=r.initialSelectedItem,f=void 0===d?null:d,h=n.getState({highlightedIndex:a,isOpen:s,inputValue:p,selectedItem:f});return null!=h.selectedItem&&void 0===n.props.initialInputValue&&(h.inputValue=n.props.itemToString(h.selectedItem)),n.state=h,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},o.getState=function(e){var t=this;return void 0===e&&(e=this.state),Object.keys(e).reduce((function(n,r){return n[r]=t.isControlledProp(r)?t.props[r]:e[r],n}),{})},o.isControlledProp=function(e){return void 0!==this.props[e]},o.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},o.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},o.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},o.moveHighlightedIndex=function(e,t){var n=this.getItemCount();if(n>0){var r=ue(e,this.getState().highlightedIndex,n);this.setHighlightedIndex(r,t)}},o.highlightFirstOrLastIndex=function(e,t,n){var r=this.getItemCount()-1;r<0||!this.getState().isOpen||(e.preventDefault(),this.setHighlightedIndex(t?0:r,n))},o.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,a=this.id,u=this.getRootProps,c=this.getToggleButtonProps,s=this.getLabelProps,l=this.getMenuProps,p=this.getInputProps,d=this.getItemProps,f=this.openMenu,h=this.closeMenu,m=this.toggleMenu,v=this.selectItem,g=this.selectItemAtIndex,y=this.selectHighlightedItem,b=this.setHighlightedIndex,w=this.clearSelection,I=this.clearItems;return{getRootProps:u,getToggleButtonProps:c,getLabelProps:s,getMenuProps:l,getInputProps:p,getItemProps:d,reset:this.reset,openMenu:f,closeMenu:h,toggleMenu:m,selectItem:v,selectItemAtIndex:g,selectHighlightedItem:y,setHighlightedIndex:b,clearSelection:w,clearItems:I,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},o.componentDidMount=function(){var e=this;var t=function(t,n){void 0===n&&(n=!0);var r=e.props.environment.document;return[e._rootNode,e._menuNode].some((function(e){return e&&(G(e,t)||n&&G(e,r.activeElement))}))},n=function(){e.isMouseDown=!0},r=function(n){e.isMouseDown=!1,!t(n.target)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},o=function(){e.isTouchMove=!1},i=function(){e.isTouchMove=!0},a=function(n){var r=t(n.target,!1);e.isTouchMove||r||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},u=this.props.environment;u.addEventListener("mousedown",n),u.addEventListener("mouseup",r),u.addEventListener("touchstart",o),u.addEventListener("touchmove",i),u.addEventListener("touchend",a),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),u.removeEventListener("mousedown",n),u.removeEventListener("mouseup",r),u.removeEventListener("touchstart",o),u.removeEventListener("touchmove",i),u.removeEventListener("touchend",a)}},o.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},o.componentDidUpdate=function(e,t){this.isControlledProp("selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},o.componentWillUnmount=function(){this.cleanup()},o.render=function(){var e=te(this.props.children,Y);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=te(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:ne(t)?Object(s.cloneElement)(t,this.getRootProps(re(t))):void 0:null},r}(s.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:ee,itemToString:function(e){return null==e?"":String(e)},onStateChange:Y,onInputValueChange:Y,onUserAction:Y,onChange:Y,onSelect:Y,onOuterClick:Y,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:X},e.stateChangeTypes=pe,e}();d.a.array.isRequired,d.a.func,d.a.func,d.a.func,d.a.bool,d.a.number,d.a.number,d.a.number,d.a.bool,d.a.bool,d.a.bool,d.a.any,d.a.any,d.a.any,d.a.string,d.a.string,d.a.string,d.a.func,d.a.string,d.a.func,d.a.func,d.a.func,d.a.func,d.a.func,d.a.shape({addEventListener:d.a.func,removeEventListener:d.a.func,document:d.a.shape({getElementById:d.a.func,activeElement:d.a.any,body:d.a.any})});"undefined"==typeof window||window;var fe=de;function he(){return(he=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function me(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ge(e,t)}(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 ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ye=function(e){var t=e.listId,n=e.provider,o=e.apiKey,i=e.onChange,u=ve(Object(r.useState)([]),2),s=u[0],l=u[1],p=ve(Object(r.useState)(!1),2),d=p[0],f=p[1],h=ve(Object(r.useState)({controller:null}),2),m=h[0].controller,v=h[1],g=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m&&m.abort(),f(!0),"AbortController"in window&&(m=new AbortController,v({controller:m})),(t=new FormData).append("api_key",o),t.append("provider",n),t.append("action","blocksy_ext_newsletter_subscribe_maybe_get_lists"),e.prev=7,e.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",signal:m.signal,body:t});case 10:if(200!==(r=e.sent).status){e.next=20;break}return e.next=14,r.json();case 14:if(!(i=e.sent).success){e.next=20;break}if("api_key_invalid"===i.data.result){e.next=20;break}return f(!1),l(i.data.result),e.abrupt("return");case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(7);case 24:l([]),f(!1);case 26:case"end":return e.stop()}}),e,null,[[7,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){me(i,r,o,a,u,"next",e)}function u(e){me(i,r,o,a,u,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){o?g():l([])}),[n,o]),0===s.length?Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",{disabled:!0,placeholder:d?Object(a.__)("Loading","blocksy-companion"):Object(a.__)("Invalid API Key...","blocksy-companion")})):Object(r.createElement)(fe,{selectedItem:t||"",onChange:function(e){return i(e)},itemToString:function(e){return e?(s.find((function(t){return t.id===e}))||{}).name:""}},(function(e){var t=e.getInputProps,n=e.getItemProps,o=(e.getLabelProps,e.getMenuProps),i=e.isOpen,u=(e.inputValue,e.highlightedIndex),l=e.selectedItem,p=e.openMenu;return Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",he({},t({onFocus:function(){return p()},onClick:function(){return p()}}),{placeholder:Object(a.__)("Select list...","blocksy-companion"),readOnly:!0})),i&&Object(r.createElement)("div",o({className:"ct-select-dropdown"}),s.map((function(e,t){return Object(r.createElement)("div",n({key:e.id,index:t,item:e.id,className:c()("ct-select-dropdown-item",{active:u===t,selected:l===e.id})}),e.name)}))))}))};function be(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ie(e,t)}(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 Ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Oe=function(e){var t=e.extension,n=e.isEditingCredentials,o=e.setIsEditingCredentials,i=e.onCredentialsValidated,u=we(Object(r.useState)(t.data.provider),2),s=u[0],l=u[1],p=we(Object(r.useState)(t.data.api_key),2),d=p[0],f=p[1],h=we(Object(r.useState)(t.data.list_id),2),m=h[0],v=h[1],g=we(Object(r.useState)(!1),2),y=g[0],b=g[1],w=we(Object(r.useState)(!1),2),I=w[0],O=w[1],S=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("provider",s),t.append("api_key",d),t.append("list_id",m),t.append("action","blocksy_ext_newsletter_subscribe_maybe_save_credentials"),b(!0),e.prev=6,e.next=9,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 9:if(200!==(n=e.sent).status){e.next=15;break}return e.next=13,n.json();case 13:(r=e.sent).success&&"api_key_invalid"!==r.data.result&&(i(),O(!1));case 15:O(!0),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(6),O(!0);case 21:return e.next=23,new Promise((function(e){return setTimeout((function(){return e()}),1e3)}));case 23:b(!1);case 24:case"end":return e.stop()}}),e,null,[[6,18]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){be(i,r,o,a,u,"next",e)}function u(e){be(i,r,o,a,u,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)(H,{items:n,onDismiss:function(){return o(!1)},className:"ct-mailchimp-modal",render:function(){return Object(r.createElement)("div",{className:c()("ct-modal-content",{"ct-key-invalid":I})},Object(r.createElement)("h2",null,Object(a.__)("API Credentials","blocksy-companion")),Object(r.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.__)("Enter your Newsletter provider API credentials in the form below.","blocksy-companion")}}),Object(r.createElement)("div",{className:"ct-newsletter-select-provider"},Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h4",null,Object(a.__)("Select Provider","blocksy-companion")),Object(r.createElement)(M.Select,{onChange:function(e){l(e)},option:{placeholder:Object(a.__)("Pick Mailing Service","blocksy-companion"),choices:[{key:"mailchimp",value:"Mailchimp"},{key:"mailerlite",value:"Mailerlite"}]},value:s})),!ctDashboardLocalizations.plugin_data.is_pro&&"mailchimp"!==s&&Object(r.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.sprintf)(Object(a.__)("This option is available only in Blocksy premium %sversion%s.","blocksy-companion"),'<a target="_blank" href="https://creativethemes.com/blocksy/pricing/">',"</a>")}}),"mailchimp"===s&&Object(r.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.sprintf)(Object(a.__)("More info on how to generate an API key for Mailchimp can be found %shere%s.","blocksy-companion"),'<a target="_blank" href="https://mailchimp.com/help/about-api-keys/">',"</a>")}}),ctDashboardLocalizations.plugin_data.is_pro&&"mailerlite"===s&&Object(r.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.sprintf)(Object(a.__)("More info on how to generate an API key for Mailerlite can be found %shere%s. Please note that we require at least one group to be created in your account for the integration to work. More info on how to create a group %shere%s.","blocksy-companion"),'<a target="_blank" href="https://www.mailerlite.com/help/where-to-find-the-mailerlite-api-key-and-documentation">',"</a>",'<a target="_blank" href="https://www.mailerlite.com/help/how-to-create-and-use-groups">',"</a>")}})),("mailchimp"===s||ctDashboardLocalizations.plugin_data.is_pro)&&Object(r.createElement)("div",{className:"mailchimp-credentials"},Object(r.createElement)("section",null,Object(r.createElement)("label",null,Object(a.__)("API Key","blocksy-companion")),Object(r.createElement)("div",{className:"ct-option-input"},Object(r.createElement)("input",{type:"text",onChange:function(e){var t=e.target.value;return f(t)},value:d||""}))),Object(r.createElement)("section",null,Object(r.createElement)("label",null,Object(a.__)("List ID","blocksy-companion")),Object(r.createElement)(ye,{listId:m,onChange:function(e){return v(e)},provider:s,apiKey:d})),Object(r.createElement)("section",null,Object(r.createElement)("label",null," "),Object(r.createElement)("button",{className:"ct-button","data-button":"blue",disabled:!d||!m||y,onClick:function(){return S()}},y?Object(a.__)("Loading...","blocksy-companion"):t.__object?Object(a.__)("Save Settings","blocksy-companion"):Object(a.__)("Activate","blocksy-companion")))))}})};function Se(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function xe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Se(i,r,o,a,u,"next",e)}function u(e){Se(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(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 je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),o=Ee(n,2),i=o[0],u=o[1],c=Object(r.useState)(!1),s=Ee(c,2),l=s[0],p=s[1],d=function(){var n=xe(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),u(!0),n.prev=4,n.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 7:t(),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(4);case 12:u(!1);case 13:case"end":return n.stop()}}),n,null,[[4,10]])})));return function(){return n.apply(this,arguments)}}(),f=function(){e.__object||e.data.api_key?d():p(!0)};return[i,f,Object(r.createElement)(r.Fragment,null,e.__object&&e.data.api_key&&Object(r.createElement)("button",{className:"ct-button ct-config-btn","data-button":"white",title:"Edit Credentials",onClick:function(){return p(!0)}},Object(a.__)("Configure","blocksy-companion")),Object(r.createElement)(Oe,{isEditingCredentials:l,setIsEditingCredentials:p,extension:e,onCredentialsValidated:function(){e.__object||d(),p(!1)}}))]};function Ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ke(e,t)}(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 ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pe=function(e){var t=e.extension,n=e.onExtsSync,o=Ce(_e(t,(function(){n()})),3),i=o[0],u=o[1],s=o[2],l=Ce(L(t),2),p=l[0],d=l[1];return Object(r.createElement)("li",{className:c()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,i&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),t.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},t.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:c()(t.__object?"ct-button":"ct-button-primary"),"data-button":"white",disabled:i,onClick:function(){return u()}},t.__object?Object(a.__)("Deactivate","blocksy-companion"):Object(a.__)("Activate","blocksy-companion")),s,t.readme&&Object(r.createElement)("button",{onClick:function(){return p()},"data-button":"white",className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"})))),d)};i.a.on("ct:extensions:card",(function(e){var t=e.CustomComponent;"newsletter-subscribe"===e.extension.name&&(t.extension=Pe)}))}]);
framework/extensions/newsletter-subscribe/dashboard-static/js/EditCredentials.js CHANGED
@@ -88,7 +88,9 @@ const EditCredentials = ({
88
 
89
  <div className="ct-newsletter-select-provider">
90
  <Fragment>
91
- <h4>{__('Select Provider', 'blocksy-companion')}</h4>
 
 
92
 
93
  <Select
94
  onChange={(copy) => {
@@ -154,11 +156,13 @@ const EditCredentials = ({
154
  dangerouslySetInnerHTML={{
155
  __html: sprintf(
156
  __(
157
- 'More info on how to generate an API key for Mailerlite can be found %shere%s.',
158
  'blocksy-companion'
159
  ),
160
 
161
- '<a target="_blank" href="https://help.mailerlite.com/article/show/35040-where-to-find-the-mailerlite-api-key-and-api-documentation">',
 
 
162
  '</a>'
163
  ),
164
  }}
@@ -170,7 +174,9 @@ const EditCredentials = ({
170
  ctDashboardLocalizations.plugin_data.is_pro) && (
171
  <div className="mailchimp-credentials">
172
  <section>
173
- <label>{__('API Key', 'blocksy-companion')}</label>
 
 
174
 
175
  <div className="ct-option-input">
176
  <input
@@ -184,7 +190,9 @@ const EditCredentials = ({
184
  </section>
185
 
186
  <section>
187
- <label>{__('List ID', 'blocksy-companion')}</label>
 
 
188
 
189
  <ListPicker
190
  listId={listId}
@@ -205,7 +213,10 @@ const EditCredentials = ({
205
  ? __('Loading...', 'blocksy-companion')
206
  : !extension.__object
207
  ? __('Activate', 'blocksy-companion')
208
- : __('Save Settings', 'blocksy-companion')}
 
 
 
209
  </button>
210
  </section>
211
  </div>
88
 
89
  <div className="ct-newsletter-select-provider">
90
  <Fragment>
91
+ <h4>
92
+ {__('Select Provider', 'blocksy-companion')}
93
+ </h4>
94
 
95
  <Select
96
  onChange={(copy) => {
156
  dangerouslySetInnerHTML={{
157
  __html: sprintf(
158
  __(
159
+ 'More info on how to generate an API key for Mailerlite can be found %shere%s. Please note that we require at least one group to be created in your account for the integration to work. More info on how to create a group %shere%s.',
160
  'blocksy-companion'
161
  ),
162
 
163
+ '<a target="_blank" href="https://www.mailerlite.com/help/where-to-find-the-mailerlite-api-key-and-documentation">',
164
+ '</a>',
165
+ '<a target="_blank" href="https://www.mailerlite.com/help/how-to-create-and-use-groups">',
166
  '</a>'
167
  ),
168
  }}
174
  ctDashboardLocalizations.plugin_data.is_pro) && (
175
  <div className="mailchimp-credentials">
176
  <section>
177
+ <label>
178
+ {__('API Key', 'blocksy-companion')}
179
+ </label>
180
 
181
  <div className="ct-option-input">
182
  <input
190
  </section>
191
 
192
  <section>
193
+ <label>
194
+ {__('List ID', 'blocksy-companion')}
195
+ </label>
196
 
197
  <ListPicker
198
  listId={listId}
213
  ? __('Loading...', 'blocksy-companion')
214
  : !extension.__object
215
  ? __('Activate', 'blocksy-companion')
216
+ : __(
217
+ 'Save Settings',
218
+ 'blocksy-companion'
219
+ )}
220
  </button>
221
  </section>
222
  </div>
framework/extensions/newsletter-subscribe/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.25
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.26
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/product-reviews/static/bundle/main-admin.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.25
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.26
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/product-reviews/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.25
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.26
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/trending/customizer.php CHANGED
@@ -133,6 +133,7 @@ $options = [
133
  'h4' => 'H4',
134
  'h5' => 'H5',
135
  'h6' => 'H6',
 
136
  ]
137
  ),
138
  'sync' => [
@@ -234,7 +235,25 @@ $options = [
234
  'sync' => [
235
  'selector' => '.ct-trending-block',
236
  'render' => function () {
237
- echo blocksy_get_trending_block();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
239
  ],
240
  ],
133
  'h4' => 'H4',
134
  'h5' => 'H5',
135
  'h6' => 'H6',
136
+ 'span' => 'span',
137
  ]
138
  ),
139
  'sync' => [
235
  'sync' => [
236
  'selector' => '.ct-trending-block',
237
  'render' => function () {
238
+ echo blc_get_trending_block();
239
+ }
240
+ ],
241
+ ],
242
+
243
+ 'trending_block_thumbnails_size' => [
244
+ 'label' => __('Image Size', 'blocksy-companion'),
245
+ 'type' => 'ct-select',
246
+ 'value' => 'thumbnail',
247
+ 'view' => 'text',
248
+ 'design' => 'inline',
249
+ 'divider' => 'top',
250
+ 'choices' => blocksy_ordered_keys(
251
+ blocksy_get_all_image_sizes()
252
+ ),
253
+ 'sync' => [
254
+ 'selector' => '.ct-trending-block',
255
+ 'render' => function () {
256
+ echo blc_get_trending_block();
257
  }
258
  ],
259
  ],
framework/extensions/trending/helpers.php CHANGED
@@ -154,7 +154,10 @@ if (! function_exists('blc_get_trending_posts_value')) {
154
  ['fn' => 'blocksy_image'],
155
  [
156
  'attachment_id' => get_post_thumbnail_id(),
157
- 'size' => 'thumbnail',
 
 
 
158
  'ratio' => '1/1',
159
  'tag_name' => 'div',
160
  ]
154
  ['fn' => 'blocksy_image'],
155
  [
156
  'attachment_id' => get_post_thumbnail_id(),
157
+ 'size' => get_theme_mod(
158
+ 'trending_block_thumbnails_size',
159
+ 'thumbnail'
160
+ ),
161
  'ratio' => '1/1',
162
  'tag_name' => 'div',
163
  ]
framework/extensions/trending/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.25
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.26
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/widgets/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.25
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.26
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/features/conditions-manager.php CHANGED
@@ -8,7 +8,9 @@ class ConditionsManager {
8
 
9
  public function condition_matches($rules = [], $args = []) {
10
  $args = wp_parse_args($args, [
11
- 'relation' => 'OR'
 
 
12
  ]);
13
 
14
  if (empty($rules)) {
@@ -23,12 +25,26 @@ class ConditionsManager {
23
  return $el['type'] === 'exclude';
24
  });
25
 
26
- $resolved_includes = array_filter($all_includes, function ($el) {
27
- return $this->resolve_single_condition($el);
 
 
 
 
 
 
 
28
  });
29
 
30
- $resolved_excludes = array_filter($all_excludes, function ($el) {
31
- return $this->resolve_single_condition($el);
 
 
 
 
 
 
 
32
  });
33
 
34
  // If at least one exclusion is true -- return false
@@ -81,7 +97,7 @@ class ConditionsManager {
81
  }
82
 
83
  if ($rule['rule'] === 'blog') {
84
- return !is_front_page() && is_home();
85
  }
86
 
87
  if ($rule['rule'] === 'front_page') {
@@ -147,7 +163,7 @@ class ConditionsManager {
147
  }
148
 
149
  if ($rule['rule'] === 'user_logged_out') {
150
- return !is_user_logged_in();
151
  }
152
 
153
  if ($rule['rule'] === 'user_post_author_id') {
@@ -318,58 +334,128 @@ class ConditionsManager {
318
  return false;
319
  }
320
 
321
- public function get_all_rules() {
322
- $has_woo = class_exists('WooCommerce');
 
 
323
 
324
- $cpts = [];
 
 
 
 
 
 
 
 
325
 
326
- $custom_post_types = array_diff(
327
- get_post_types(['public' => true]),
328
- [
329
- 'post',
330
- 'page',
331
- 'attachment',
332
- 'documentation',
333
- 'ct_content_block',
334
- 'product'
335
- ]
336
- );
337
 
338
- foreach ($custom_post_types as $custom_post_type) {
339
- $post_type_object = get_post_type_object($custom_post_type);
 
340
 
341
- $cpts[] = [
342
- 'id' => 'post_type_single_' . $custom_post_type,
343
- 'title' => sprintf(
344
- __('%s Single', 'blocksy-companion'),
345
- $post_type_object->labels->singular_name
346
- )
347
- ];
348
 
349
- $cpts[] = [
350
- 'id' => 'post_type_archive_' . $custom_post_type,
351
- 'title' => sprintf(
352
- __('%s Archive', 'blocksy-companion'),
353
- $post_type_object->labels->singular_name
354
- )
355
- ];
356
 
357
- $taxonomies = get_object_taxonomies($custom_post_type);
 
 
358
 
359
- foreach ($taxonomies as $single_taxonomy) {
360
- $cpts[] = [
361
- 'id' => 'post_type_taxonomy_' . $single_taxonomy,
362
- 'title' => sprintf(
363
- __('%s %s Taxonomy', 'blocksy-companion'),
364
- $post_type_object->labels->singular_name,
365
- get_taxonomy($single_taxonomy)->label
366
- )
367
- ];
368
- }
369
  }
370
 
371
- return array_merge([
372
- [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  'title' => '',
374
  'rules' => [
375
  [
@@ -377,9 +463,9 @@ class ConditionsManager {
377
  'title' => __('Entire Website', 'blocksy-companion')
378
  ]
379
  ]
380
- ],
381
 
382
- [
383
  'title' => __('Basic', 'blocksy-companion'),
384
  'rules' => [
385
  [
@@ -392,9 +478,9 @@ class ConditionsManager {
392
  'title' => __('Archives', 'blocksy-companion')
393
  ]
394
  ]
395
- ],
396
 
397
- [
398
  'title' => __('Posts', 'blocksy-companion'),
399
  'rules' => [
400
  [
@@ -417,90 +503,168 @@ class ConditionsManager {
417
  'title' => __('Post Tags', 'blocksy-companion')
418
  ],
419
  ]
420
- ],
 
421
 
422
- [
423
- 'title' => __('Pages', 'blocksy-companion'),
 
424
  'rules' => [
425
  [
426
- 'id' => 'single_page',
427
- 'title' => __('Single Page', 'blocksy-companion')
428
- ],
429
  ]
430
- ],
431
- ],
432
 
433
- $has_woo ? [
434
- [
435
- 'title' => __('WooCommerce', 'blocksy-companion'),
436
  'rules' => [
437
  [
438
- 'id' => 'woo_shop',
439
- 'title' => __('Shop Home', 'blocksy-companion')
440
  ],
441
 
442
  [
443
- 'id' => 'single_product',
444
- 'title' => __('Single Product', 'blocksy-companion')
445
  ],
446
 
447
  [
448
- 'id' => 'all_product_archives',
449
- 'title' => __('Product Archives', 'blocksy-companion')
450
  ],
 
 
 
451
 
 
 
 
 
452
  [
453
- 'id' => 'all_product_categories',
454
- 'title' => __('Product Categories', 'blocksy-companion')
455
- ],
 
 
 
 
 
 
 
 
 
 
 
 
 
456
 
 
 
 
 
457
  [
458
- 'id' => 'all_product_tags',
459
- 'title' => __('Product Tags', 'blocksy-companion')
460
  ],
461
  ]
462
- ]
463
- ] : [],
464
 
465
- count($cpts) > 0 ? [
 
 
 
466
  [
467
- 'title' => __('Custom Post Types', 'blocksy-companion'),
468
- 'rules' => $cpts
 
 
 
 
469
  ]
470
- ] : [],
471
 
472
- [
473
- [
474
- 'title' => __('Specific', 'blocksy-companion'),
475
- 'rules' => [
476
- [
477
- 'id' => 'post_ids',
478
- 'title' => __('Post ID', 'blocksy-companion')
479
- ],
480
 
481
- [
482
- 'id' => 'page_ids',
483
- 'title' => __('Page ID', 'blocksy-companion')
484
- ],
 
 
 
 
 
485
 
486
- [
487
- 'id' => 'custom_post_type_ids',
488
- 'title' => __('Custom Post Type ID', 'blocksy-companion')
489
- ],
 
 
 
 
 
490
 
491
- [
492
- 'id' => 'taxonomy_ids',
493
- 'title' => __('Taxonomy ID', 'blocksy-companion')
494
- ],
495
 
496
- [
497
- 'id' => 'post_with_taxonomy_ids',
498
- 'title' => __('Post with Taxonomy ID', 'blocksy-companion')
499
- ],
500
- ]
501
- ],
 
 
 
 
 
 
 
502
 
503
- [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  'title' => __('Other Pages', 'blocksy-companion'),
505
  'rules' => [
506
  [
@@ -535,66 +699,112 @@ class ConditionsManager {
535
  'title' => __('Author', 'blocksy-companion')
536
  ],
537
  ],
538
- ],
 
539
 
540
- [
541
- 'title' => __('User Auth', 'blocksy-companion'),
542
- 'rules' => [
543
- [
544
- 'id' => 'user_logged_in',
545
- 'title' => __('User Logged In', 'blocksy-companion')
546
- ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
547
 
548
- [
549
- 'id' => 'user_logged_out',
550
- 'title' => __('User Logged Out', 'blocksy-companion')
551
- ],
552
  ]
553
- ],
554
 
555
- [
556
- 'title' => __('User Roles', 'blocksy-companion'),
557
- 'rules' => $this->get_user_roles_rules()
558
- ],
559
 
560
  [
561
- 'title' => __('Other', 'blocksy-companion'),
562
- 'rules' => [
563
- [
564
- 'id' => 'user_post_author_id',
565
- 'title' => __('Post Author', 'blocksy-companion')
 
 
 
 
 
 
 
566
  ]
567
- ]
568
- ],
569
- ],
570
 
571
- (
572
- function_exists('blocksy_get_current_language')
573
- &&
574
- blocksy_get_current_language() !== '__NOT_KNOWN__'
575
- ) ? [
576
- [
577
- 'title' => __('Languages', 'blocksy-companion'),
578
- 'rules' => [
579
- [
580
- 'id' => 'current_language',
581
- 'title' => __('Current Language', 'blocksy-companion')
 
582
  ]
583
- ]
584
- ]
585
- ] : [],
586
 
587
- function_exists('bbp_is_single_user_profile') ? [
588
- [
589
- 'title' => __('bbPress', 'blocksy-companion'),
590
- 'rules' => [
591
- [
592
- 'id' => 'bbpress_profile',
593
- 'title' => __('Profile', 'blocksy-companion')
 
 
 
 
 
594
  ]
595
  ]
596
- ]
597
- ] : []);
 
 
 
 
 
 
 
 
 
 
 
 
598
  }
599
 
600
  public function humanize_conditions($conditions) {
8
 
9
  public function condition_matches($rules = [], $args = []) {
10
  $args = wp_parse_args($args, [
11
+ 'relation' => 'OR',
12
+ // prefix | current-screen
13
+ 'strategy' => 'current-screen'
14
  ]);
15
 
16
  if (empty($rules)) {
25
  return $el['type'] === 'exclude';
26
  });
27
 
28
+ $resolved_includes = array_filter($all_includes, function ($el) use ($args) {
29
+ if ($args['strategy'] === 'current-screen') {
30
+ return $this->resolve_single_condition($el);
31
+ }
32
+
33
+ return $this->resolve_single_condition_with_prefix(
34
+ $el,
35
+ $args['strategy']
36
+ );
37
  });
38
 
39
+ $resolved_excludes = array_filter($all_excludes, function ($el) use ($args) {
40
+ if ($args['strategy'] === 'current-screen') {
41
+ return $this->resolve_single_condition($el);
42
+ }
43
+
44
+ return $this->resolve_single_condition_with_prefix(
45
+ $el,
46
+ $args['strategy']
47
+ );
48
  });
49
 
50
  // If at least one exclusion is true -- return false
97
  }
98
 
99
  if ($rule['rule'] === 'blog') {
100
+ return ! is_front_page() && is_home();
101
  }
102
 
103
  if ($rule['rule'] === 'front_page') {
163
  }
164
 
165
  if ($rule['rule'] === 'user_logged_out') {
166
+ return ! is_user_logged_in();
167
  }
168
 
169
  if ($rule['rule'] === 'user_post_author_id') {
334
  return false;
335
  }
336
 
337
+ public function resolve_single_condition_with_prefix($rule, $prefix) {
338
+ if ($rule['rule'] === 'everywhere') {
339
+ return true;
340
+ }
341
 
342
+ if ($rule['rule'] === 'singulars') {
343
+ return (
344
+ $prefix === 'single_blog_post'
345
+ ||
346
+ $prefix === 'single_page'
347
+ ||
348
+ strpos($prefix, '_single') !== false
349
+ );
350
+ }
351
 
352
+ if ($rule['rule'] === 'archives') {
353
+ return is_archive();
354
+ }
 
 
 
 
 
 
 
 
355
 
356
+ if ($rule['rule'] === '404') {
357
+ return $prefix === '404';
358
+ }
359
 
360
+ if ($rule['rule'] === 'search') {
361
+ return $prefix === 'search';
362
+ }
 
 
 
 
363
 
364
+ if ($rule['rule'] === 'blog') {
365
+ return $prefix === 'blog';
366
+ }
 
 
 
 
367
 
368
+ if ($rule['rule'] === 'front_page') {
369
+ return $prefix === 'blog';
370
+ }
371
 
372
+ if ($rule['rule'] === 'date') {
373
+ return is_date();
 
 
 
 
 
 
 
 
374
  }
375
 
376
+ if ($rule['rule'] === 'author') {
377
+ return is_author();
378
+ }
379
+
380
+ if ($rule['rule'] === 'woo_shop') {
381
+ return function_exists('is_shop') && is_shop();
382
+ }
383
+
384
+ if ($rule['rule'] === 'single_post') {
385
+ return $prefix === 'single_blog_post';
386
+ }
387
+
388
+ if ($rule['rule'] === 'all_post_archives') {
389
+ return is_post_type_archive('post');
390
+ }
391
+
392
+ if ($rule['rule'] === 'post_categories') {
393
+ return $prefix === 'categories';
394
+ }
395
+
396
+ if ($rule['rule'] === 'post_tags') {
397
+ return $prefix === 'categories';
398
+ }
399
+
400
+ if ($rule['rule'] === 'single_page') {
401
+ return $prefix === 'single_page';
402
+ }
403
+
404
+ if ($rule['rule'] === 'single_product') {
405
+ return $prefix === 'product';
406
+ }
407
+
408
+ if ($rule['rule'] === 'all_product_archives') {
409
+ return $prefix === 'woo_categories';
410
+ }
411
+
412
+ if ($rule['rule'] === 'all_product_categories') {
413
+ return $prefix === 'woo_categories';
414
+ }
415
+
416
+ if ($rule['rule'] === 'all_product_tags') {
417
+ return $prefix === 'woo_categories';
418
+ }
419
+
420
+ if (strpos($rule['rule'], 'post_type_single_') !== false) {
421
+ return $prefix === str_replace(
422
+ 'post_type_single_',
423
+ '',
424
+ $rule['rule']
425
+ ) . '_single';
426
+ }
427
+
428
+ if (strpos($rule['rule'], 'post_type_archive_') !== false) {
429
+ return $prefix === str_replace(
430
+ 'post_type_archive_',
431
+ '',
432
+ $rule['rule']
433
+ ) . '_archive';
434
+ }
435
+
436
+ if (strpos($rule['rule'], 'post_type_taxonomy_') !== false) {
437
+ return $prefix === str_replace(
438
+ 'post_type_taxonomy_',
439
+ '',
440
+ $rule['rule']
441
+ ) . '_archive';
442
+ }
443
+
444
+ return false;
445
+ }
446
+
447
+ public function get_all_rules($args = []) {
448
+ $args = wp_parse_args($args, [
449
+ // all | archive | singular
450
+ 'filter' => 'all'
451
+ ]);
452
+
453
+ $has_woo = class_exists('WooCommerce');
454
+
455
+ $common_rules = [];
456
+
457
+ if ($args['filter'] === 'all') {
458
+ $common_rules[] = [
459
  'title' => '',
460
  'rules' => [
461
  [
463
  'title' => __('Entire Website', 'blocksy-companion')
464
  ]
465
  ]
466
+ ];
467
 
468
+ $common_rules[] = [
469
  'title' => __('Basic', 'blocksy-companion'),
470
  'rules' => [
471
  [
478
  'title' => __('Archives', 'blocksy-companion')
479
  ]
480
  ]
481
+ ];
482
 
483
+ $common_rules[] = [
484
  'title' => __('Posts', 'blocksy-companion'),
485
  'rules' => [
486
  [
503
  'title' => __('Post Tags', 'blocksy-companion')
504
  ],
505
  ]
506
+ ];
507
+ }
508
 
509
+ if ($args['filter'] === 'archive') {
510
+ $common_rules[] = [
511
+ 'title' => __('Basic', 'blocksy-companion'),
512
  'rules' => [
513
  [
514
+ 'id' => 'archives',
515
+ 'title' => __('Archives', 'blocksy-companion')
516
+ ]
517
  ]
518
+ ];
 
519
 
520
+ $common_rules[] = [
521
+ 'title' => __('Posts', 'blocksy-companion'),
 
522
  'rules' => [
523
  [
524
+ 'id' => 'all_post_archives',
525
+ 'title' => __('All Post Archives', 'blocksy-companion')
526
  ],
527
 
528
  [
529
+ 'id' => 'post_categories',
530
+ 'title' => __('Post Categories', 'blocksy-companion')
531
  ],
532
 
533
  [
534
+ 'id' => 'post_tags',
535
+ 'title' => __('Post Tags', 'blocksy-companion')
536
  ],
537
+ ]
538
+ ];
539
+ }
540
 
541
+ if ($args['filter'] === 'singular') {
542
+ $common_rules[] = [
543
+ 'title' => __('Basic', 'blocksy-companion'),
544
+ 'rules' => [
545
  [
546
+ 'id' => 'singulars',
547
+ 'title' => __('Singulars', 'blocksy-companion')
548
+ ]
549
+ ]
550
+ ];
551
+
552
+ $common_rules[] = [
553
+ 'title' => __('Posts', 'blocksy-companion'),
554
+ 'rules' => [
555
+ [
556
+ 'id' => 'single_post',
557
+ 'title' => __('Single Post', 'blocksy-companion')
558
+ ]
559
+ ]
560
+ ];
561
+ }
562
 
563
+ if ($args['filter'] === 'all' || $args['filter'] === 'singular') {
564
+ $common_rules[] = [
565
+ 'title' => __('Pages', 'blocksy-companion'),
566
+ 'rules' => [
567
  [
568
+ 'id' => 'single_page',
569
+ 'title' => __('Single Page', 'blocksy-companion')
570
  ],
571
  ]
572
+ ];
573
+ }
574
 
575
+ $cpts = [];
576
+
577
+ $custom_post_types = array_diff(
578
+ get_post_types(['public' => true]),
579
  [
580
+ 'post',
581
+ 'page',
582
+ 'attachment',
583
+ 'documentation',
584
+ 'ct_content_block',
585
+ 'product'
586
  ]
587
+ );
588
 
589
+ foreach ($custom_post_types as $custom_post_type) {
590
+ $post_type_object = get_post_type_object($custom_post_type);
 
 
 
 
 
 
591
 
592
+ if ($args['filter'] === 'all' || $args['filter'] === 'singular') {
593
+ $cpts[] = [
594
+ 'id' => 'post_type_single_' . $custom_post_type,
595
+ 'title' => sprintf(
596
+ __('%s Single', 'blocksy-companion'),
597
+ $post_type_object->labels->singular_name
598
+ )
599
+ ];
600
+ }
601
 
602
+ if ($args['filter'] === 'all' || $args['filter'] === 'archive') {
603
+ $cpts[] = [
604
+ 'id' => 'post_type_archive_' . $custom_post_type,
605
+ 'title' => sprintf(
606
+ __('%s Archive', 'blocksy-companion'),
607
+ $post_type_object->labels->singular_name
608
+ )
609
+ ];
610
+ }
611
 
612
+ $taxonomies = get_object_taxonomies($custom_post_type);
 
 
 
613
 
614
+ if ($args['filter'] === 'all' || $args['filter'] === 'archive') {
615
+ foreach ($taxonomies as $single_taxonomy) {
616
+ $cpts[] = [
617
+ 'id' => 'post_type_taxonomy_' . $single_taxonomy,
618
+ 'title' => sprintf(
619
+ __('%s %s Taxonomy', 'blocksy-companion'),
620
+ $post_type_object->labels->singular_name,
621
+ get_taxonomy($single_taxonomy)->label
622
+ )
623
+ ];
624
+ }
625
+ }
626
+ }
627
 
628
+ $specific_conditions = [];
629
+
630
+ $specific_ids = [];
631
+
632
+ if ($args['filter'] === 'all' || $args['filter'] === 'singular') {
633
+ $specific_ids[] = [
634
+ 'id' => 'post_ids',
635
+ 'title' => __('Post ID', 'blocksy-companion')
636
+ ];
637
+
638
+ $specific_ids[] = [
639
+ 'id' => 'page_ids',
640
+ 'title' => __('Page ID', 'blocksy-companion')
641
+ ];
642
+
643
+ $specific_ids[] = [
644
+ 'id' => 'custom_post_type_ids',
645
+ 'title' => __('Custom Post Type ID', 'blocksy-companion')
646
+ ];
647
+
648
+ $specific_ids[] = [
649
+ 'id' => 'post_with_taxonomy_ids',
650
+ 'title' => __('Post with Taxonomy ID', 'blocksy-companion')
651
+ ];
652
+ }
653
+
654
+ if ($args['filter'] === 'all' || $args['filter'] === 'archive') {
655
+ $specific_ids[] = [
656
+ 'id' => 'taxonomy_ids',
657
+ 'title' => __('Taxonomy ID', 'blocksy-companion')
658
+ ];
659
+ }
660
+
661
+ $specific_conditions[] = [
662
+ 'title' => __('Specific', 'blocksy-companion'),
663
+ 'rules' => $specific_ids
664
+ ];
665
+
666
+ if ($args['filter'] === 'all' || $args['filter'] === 'archive') {
667
+ $specific_conditions[] = [
668
  'title' => __('Other Pages', 'blocksy-companion'),
669
  'rules' => [
670
  [
699
  'title' => __('Author', 'blocksy-companion')
700
  ],
701
  ],
702
+ ];
703
+ }
704
 
705
+ return array_merge(
706
+ $common_rules,
707
+ $has_woo && $args['filter'] === 'all' ? [
708
+ [
709
+ 'title' => __('WooCommerce', 'blocksy-companion'),
710
+ 'rules' => [
711
+ [
712
+ 'id' => 'woo_shop',
713
+ 'title' => __('Shop Home', 'blocksy-companion')
714
+ ],
715
+
716
+ [
717
+ 'id' => 'single_product',
718
+ 'title' => __('Single Product', 'blocksy-companion')
719
+ ],
720
+
721
+ [
722
+ 'id' => 'all_product_archives',
723
+ 'title' => __('Product Archives', 'blocksy-companion')
724
+ ],
725
+
726
+ [
727
+ 'id' => 'all_product_categories',
728
+ 'title' => __('Product Categories', 'blocksy-companion')
729
+ ],
730
+
731
+ [
732
+ 'id' => 'all_product_tags',
733
+ 'title' => __('Product Tags', 'blocksy-companion')
734
+ ],
735
+ ]
736
+ ]
737
+ ] : [],
738
 
739
+ count($cpts) > 0 ? [
740
+ [
741
+ 'title' => __('Custom Post Types', 'blocksy-companion'),
742
+ 'rules' => $cpts
743
  ]
744
+ ] : [],
745
 
746
+ $specific_conditions,
 
 
 
747
 
748
  [
749
+ [
750
+ 'title' => __('User Auth', 'blocksy-companion'),
751
+ 'rules' => [
752
+ [
753
+ 'id' => 'user_logged_in',
754
+ 'title' => __('User Logged In', 'blocksy-companion')
755
+ ],
756
+
757
+ [
758
+ 'id' => 'user_logged_out',
759
+ 'title' => __('User Logged Out', 'blocksy-companion')
760
+ ],
761
  ]
762
+ ],
 
 
763
 
764
+ [
765
+ 'title' => __('User Roles', 'blocksy-companion'),
766
+ 'rules' => $this->get_user_roles_rules()
767
+ ],
768
+
769
+ [
770
+ 'title' => __('Other', 'blocksy-companion'),
771
+ 'rules' => [
772
+ [
773
+ 'id' => 'user_post_author_id',
774
+ 'title' => __('Post Author', 'blocksy-companion')
775
+ ]
776
  ]
777
+ ],
778
+ ],
 
779
 
780
+ (
781
+ function_exists('blocksy_get_current_language')
782
+ &&
783
+ blocksy_get_current_language() !== '__NOT_KNOWN__'
784
+ ) ? [
785
+ [
786
+ 'title' => __('Languages', 'blocksy-companion'),
787
+ 'rules' => [
788
+ [
789
+ 'id' => 'current_language',
790
+ 'title' => __('Current Language', 'blocksy-companion')
791
+ ]
792
  ]
793
  ]
794
+ ] : [],
795
+
796
+ function_exists('bbp_is_single_user_profile') && $args['filter'] === 'all' ? [
797
+ [
798
+ 'title' => __('bbPress', 'blocksy-companion'),
799
+ 'rules' => [
800
+ [
801
+ 'id' => 'bbpress_profile',
802
+ 'title' => __('Profile', 'blocksy-companion')
803
+ ]
804
+ ]
805
+ ]
806
+ ] : []
807
+ );
808
  }
809
 
810
  public function humanize_conditions($conditions) {
framework/features/header.php CHANGED
@@ -274,6 +274,12 @@ class HeaderAdditions {
274
  $localize = array_merge(
275
  [
276
  'all_condition_rules' => $conditions_manager->get_all_rules(),
 
 
 
 
 
 
277
  'ajax_url' => admin_url('admin-ajax.php'),
278
  'rest_url' => get_rest_url(),
279
  ]
274
  $localize = array_merge(
275
  [
276
  'all_condition_rules' => $conditions_manager->get_all_rules(),
277
+ 'singular_condition_rules' => $conditions_manager->get_all_rules([
278
+ 'filter' => 'singular'
279
+ ]),
280
+ 'archive_condition_rules' => $conditions_manager->get_all_rules([
281
+ 'filter' => 'archive'
282
+ ]),
283
  'ajax_url' => admin_url('admin-ajax.php'),
284
  'rest_url' => get_rest_url(),
285
  ]
framework/theme-integration.php CHANGED
@@ -242,6 +242,13 @@ class ThemeIntegration {
242
  );
243
  }
244
 
 
 
 
 
 
 
 
245
  $query = new \WP_Query($query_args);
246
 
247
  $posts_result = $query->posts;
242
  );
243
  }
244
 
245
+ if (strpos($query_args['post_type'], 'ct_all_posts') !== false) {
246
+ $query_args['post_type'] = array_diff(
247
+ get_post_types(['public' => true]),
248
+ ['product', 'attachment', 'ct_content_block']
249
+ );
250
+ }
251
+
252
  $query = new \WP_Query($query_args);
253
 
254
  $posts_result = $query->posts;
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires PHP: 7.0
5
  Tested up to: 5.9
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
- Stable tag: 1.8.25
9
 
10
  == Description ==
11
 
@@ -23,6 +23,12 @@ It runs and adds its enhancements only if the Blocksy theme is installed and act
23
  2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
24
 
25
  == Changelog ==
 
 
 
 
 
 
26
  1.8.25: 2022-04-08
27
  - Improvement: Solidify usage of classes from Blocksy theme
28
  - Improvement: More robust widgets handling in options importer
5
  Tested up to: 5.9
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
+ Stable tag: 1.8.26
9
 
10
  == Description ==
11
 
23
  2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
24
 
25
  == Changelog ==
26
+ 1.8.26: 2022-04-21
27
+ - Improvement: General fixes and improvements
28
+
29
+ 1.8.26-beta2: 2022-04-20
30
+ - Improvement: General fixes and improvements
31
+
32
  1.8.25: 2022-04-08
33
  - Improvement: Solidify usage of classes from Blocksy theme
34
  - Improvement: More robust widgets handling in options importer
static/bundle/account-lazy.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.25
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.26
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
static/bundle/dashboard.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.blocksyOptions},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){var r,o,c=n(11),a=n(12),i=(o=[],{activateTrap:function(e){if(o.length>0){var t=o[o.length-1];t!==e&&t.pause()}var n=o.indexOf(e);-1===n||o.splice(n,1),o.push(e)},deactivateTrap:function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1),o.length>0&&o[o.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),u={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},m={activate:function(e){if(u.active)return;g(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return p(),m},deactivate:f,pause:function(){if(u.paused||!u.active)return;u.paused=!0,d()},unpause:function(){if(!u.paused||!u.active)return;u.paused=!1,g(),p()}};return m;function f(e){if(u.active){clearTimeout(r),d(),u.active=!1,u.paused=!1,i.deactivateTrap(m);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&l((function(){var e;_((e=u.nodeFocusedBeforeActivation,b("setReturnFocus")||e))})),m}}function p(){if(u.active)return i.activateTrap(m),r=l((function(){_(h())})),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",y,{capture:!0,passive:!1}),n.addEventListener("touchstart",y,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",O,{capture:!0,passive:!1}),m}function d(){if(u.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",y,!0),n.removeEventListener("touchstart",y,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",O,!0),m}function b(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function h(){var e;if(!(e=null!==b("initialFocus")?b("initialFocus"):o.contains(n.activeElement)?n.activeElement:u.firstTabbableNode||b("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function y(e){o.contains(e.target)||(s.clickOutsideDeactivates?f({returnFocus:!c.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function v(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),_(u.mostRecentlyFocusedNode||h()))}function O(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void f();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===u.firstTabbableNode)return e.preventDefault(),void _(u.lastTabbableNode);if(!e.shiftKey&&e.target===u.lastTabbableNode)e.preventDefault(),_(u.firstTabbableNode)}(e)}function j(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=c(o);u.firstTabbableNode=e[0]||h(),u.lastTabbableNode=e[e.length-1]||h()}function _(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),u.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):_(h()))}}},function(e,t,n){(function(n){var r,o,c;o=[],void 0===(c="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var c="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=c.saveAs||("object"!=typeof window||window!==c?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=c.URL||c.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):r(l.href)?t(e,n,a):o(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,c){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,c),n);else if(r(e))t(e,n,c);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){o(a)}))}}:function(e,n,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(c.HTMLElement)||c.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},s.readAsDataURL(e)}else{var u=c.URL||c.webkitURL,m=u.createObjectURL(e);o?o.location=m:location.href=m,o=null,setTimeout((function(){u.revokeObjectURL(m)}),4e4)}});c.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,o):r)||(e.exports=c)}).call(this,n(13))},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(10);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),o="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function c(e,t){t=t||{};var n,c,i,l=[],m=[],f=e.querySelectorAll(r);for(t.includeContainer&&o.call(e,r)&&(f=Array.prototype.slice.apply(f)).unshift(e),n=0;n<f.length;n++)a(c=f[n])&&(0===(i=s(c))?l.push(c):m.push({documentOrder:n,tabIndex:i,node:c}));return m.sort(u).map((function(e){return e.node})).concat(l)}function a(e){return!(!i(e)||function(e){return function(e){return m(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||s(e)<0)}function i(e){return!(e.disabled||function(e){return m(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}c.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,r)&&a(e)},c.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,l)&&i(e)};var l=n.concat("iframe").join(",");function s(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function u(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function m(e){return"INPUT"===e.tagName}e.exports=c},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n.n(o),a=n(1),i=n(2),l=n.n(i),s=n(5),u=n.n(s);n(8);function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},d=function(e){function t(){var n,r;m(this,t);for(var o=arguments.length,c=Array(o),a=0;a<o;a++)c[a]=arguments[a];return n=r=f(this,e.call.apply(e,[this].concat(c))),b.call(r),f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:p(t),refs:o,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:p(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:p(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:p(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:p(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(u.a.Component);d.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var b=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},h=d,y=function(e){var t=e.children,n=e.container,o=void 0===n?document.body:n,c=e.type,a=void 0===c?"reach-portal":c;return Object(r.createElement)(h,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=o.hasOwnProperty("current")?o.current:o;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var v=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},O=n(6),j=n.n(O);function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(){},w=function(){},k=function(e,t){var n,r,o;e.disposeAriaHider=(n=e.overlayNode,r=[],o=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),o.push(e),e.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=j()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},x=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},S=React.createContext(),C=React.forwardRef((function(e,t){var n=e.container,o=e.isOpen,c=void 0===o||o,a=e.onDismiss,i=void 0===a?E:a,l=e.initialFocusRef,s=e.onClick,u=e.onKeyDown,m=_(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(h,{didMount:w},c?Object(r.createElement)(y,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(h,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;k(t,l)},willUnmount:x},(function(e){var n=e.refs;return Object(r.createElement)(S.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:v(s,(function(e){e.stopPropagation(),i()})),onKeyDown:v(u,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},m)))}))):null)}));C.propTypes={initialFocusRef:function(){}};var D=function(e){return e.stopPropagation()},P=React.forwardRef((function(e,t){var n=e.onClick,o=(e.onKeyDown,_(e,["onClick","onKeyDown"]));return Object(r.createElement)(S.Consumer,null,(function(e){return Object(r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:v(n,D),ref:function(n){e(n),t&&t(n)}},o))}))})),A=n(3),N=function(e){return!!e},M=function(e){var t=e.items,n=e.isVisible,o=void 0===n?N:n,c=e.render,a=e.className,i=e.onDismiss;return Object(r.createElement)(A.Transition,{items:t,onStart:function(){return document.body.classList[o(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return o(e)&&function(t){return Object(r.createElement)(C,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return i()}},Object(r.createElement)(P,{className:l()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return i()}},"×"),c(e,t)))}}))};function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}(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 z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=function(e){var t=L(Object(r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0)},Object(r.createElement)(M,{items:n,onDismiss:function(){return o(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]},I=window.ctDashboardLocalizations.DashboardContext,R=(I.Provider,I.Consumer,I);function F(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){F(c,r,o,a,i,"next",e)}function i(e){F(c,r,o,a,i,"throw",e)}a(void 0)}))}}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V(e,t)}(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 V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),o=U(n,2),c=o[0],i=o[1],l=Object(r.useState)(!1),s=U(l,2),u=s[0],m=s[1],f=Object(r.useContext)(R),p=(f.Link,f.history),d=ctDashboardLocalizations.plugin_data.is_pro,b=function(){var n=B(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(d||!e.config.pro){n.next=3;break}return m(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),n.prev=7,n.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:e.config.require_refresh&&location.reload(),t(),n.next=16;break;case 14:n.prev=14,n.t0=n.catch(7);case 16:i(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[c,b,!d&&e.config.pro?Object(r.createElement)(M,{items:u,className:"ct-onboarding-modal",onDismiss:function(){return m(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"55",height:"55",viewBox:"0 0 40.5 48.3"},Object(r.createElement)("path",{fill:"#2d82c8",d:"M33.4 29.4l7.1 12.3-7.4.6-4 6-7.3-12.9"}),Object(r.createElement)("path",{d:"M33.5 29.6L26 42.7l-4.2-7.3 11.6-6 .1.2zM0 41.7l7.5.6 3.9 6 7.2-12.4-11-7.3L0 41.7z",fill:"#2271b1"}),Object(r.createElement)("path",{d:"M39.5 18.7c0 1.6-2.4 2.8-2.7 4.3-.4 1.5 1 3.8.2 5.1-.8 1.3-3.4 1.2-4.5 2.3-1.1 1.1-1 3.7-2.3 4.5-1.3.8-3.6-.6-5.1-.2-1.5.4-2.7 2.7-4.3 2.7S18 35 16.5 34.7c-1.5-.4-3.8 1-5.1.2s-1.2-3.4-2.3-4.5-3.7-1-4.5-2.3.6-3.6.2-5.1-2.7-2.7-2.7-4.3 2.4-2.8 2.7-4.3c.4-1.5-1-3.8-.2-5.1C5.4 8 8.1 8.1 9.1 7c1.1-1.1 1-3.7 2.3-4.5s3.6.6 5.1.2C18 2.4 19.2 0 20.8 0c1.6 0 2.8 2.4 4.3 2.7 1.5.4 3.8-1 5.1-.2 1.3.8 1.2 3.4 2.3 4.5 1.1 1.1 3.7 1 4.5 2.3s-.6 3.6-.2 5.1c.3 1.5 2.7 2.7 2.7 4.3z",fill:"#599fd9"}),Object(r.createElement)("path",{d:"M23.6 7c-6.4-1.5-12.9 2.5-14.4 8.9-.7 3.1-.2 6.3 1.5 9.1 1.7 2.7 4.3 4.6 7.4 5.4.9.2 1.9.3 2.8.3 2.2 0 4.4-.6 6.3-1.8 2.7-1.7 4.6-4.3 5.4-7.5C34 15 30 8.5 23.6 7zm7 14c-.6 2.6-2.2 4.8-4.5 6.2-2.3 1.4-5 1.8-7.6 1.2-2.6-.6-4.8-2.2-6.2-4.5-1.4-2.3-1.8-5-1.2-7.6.6-2.6 2.2-4.8 4.5-6.2 1.6-1 3.4-1.5 5.2-1.5.8 0 1.5.1 2.3.3 5.4 1.3 8.7 6.7 7.5 12.1zm-8.2-4.5l3.7.5-2.7 2.7.7 3.7-3.4-1.8-3.3 1.8.6-3.7-2.7-2.7 3.8-.5 1.6-3.4 1.7 3.4z",fill:"#fff"})),Object(r.createElement)("h2",{className:"ct-modal-title"},"This is a Pro extension"),Object(r.createElement)("p",null,Object(a.__)("Upgrade to the Pro version and get instant access to all premium extensions, features and future updates.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("a",{onClick:function(e){e.preventDefault(),m(!1),setTimeout((function(){p.navigate("/pro")}),300)},className:"button"},Object(a.__)("Free vs Pro","blocksy")),Object(r.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/",target:"_blank",className:"button button-primary"},Object(a.__)("Upgrade Now","blocksy-companion"))))}}):null]},q=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:Object(r.createElement)("div",{className:"ct-support-container"},Object(r.createElement)("h2",null,Object(a.__)("Need help or advice?","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Got a question or need help with the theme? You can always submit a support ticket or ask for help in our friendly Facebook community.","blocksy-companion")),Object(r.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Submit a Support Ticket","blocksy-companion")),Object(r.createElement)("a",{href:"https://www.facebook.com/groups/blocksy.community",className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Join Facebook Community","blocksy-companion")))};function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(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 J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Y=null,X=function(e){var t=e.extension,n=e.onExtsSync,o=K(T(t),2),c=o[0],i=o[1],s=K(H(t,(function(){n()})),3),u=s[0],m=s[1],f=s[2];return Object(r.createElement)("li",{className:l()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,u&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),t.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},t.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:l()(t.__object?"ct-button":"ct-button-primary"),"data-hover":"white",disabled:u,onClick:function(){m()}},t.__object?Object(a.__)("Deactivate","blocksy-companion"):Object(a.__)("Activate","blocksy-companion")),t.readme&&Object(r.createElement)("button",{onClick:function(){return c()},className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"}))),t.__object&&t.config&&t.config.buttons&&t.config.buttons.map((function(e,t){var n=e.text,o=e.url;return Object(r.createElement)("a",{href:o,className:"ct-button ct-config-btn",dataButton:"white"},n)}))),i,f)},Q=function(){var e=K(Object(r.useState)(!Y),2),t=e[0],n=e[1],o=K(Object(r.useState)(Y||[]),2),i=o[0],s=o[1],u=K(Object(r.useState)(!1),2),m=u[0],f=u[1],p=K(Object(r.useState)("free"),2),d=p[0],b=p[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,o,c,a,i,l,u,m,p=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},r=Z({verbose:!1,extension:null,extAction:null},t),o=r.verbose,c=r.extension,a=r.extAction,o&&n(!0),f(!0),e.next=6,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),Z({method:"POST"},c&&a?{body:JSON.stringify({extension:c,extAction:a})}:{}));case 6:if(200===(i=e.sent).status){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,i.json();case 11:if(l=e.sent,u=l.success,m=l.data,u){e.next=16;break}return e.abrupt("return");case 16:if(f(!1),n(!1),s(m),Y=m,!c){e.next=22;break}return e.abrupt("return",m[c]);case 22:return e.abrupt("return",m);case 23:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){G(c,r,o,a,i,"next",e)}function i(e){G(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();Object(r.useEffect)((function(){h({verbose:!Y});var e=function(){h()};return c.a.on("blocksy_exts_sync_exts",e),function(){c.a.off("blocksy_exts_sync_exts",e)}}),[]);var y=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return Z(Z({},e),{},{name:Object.keys(i)[t]})})).find((function(e){return e.config.pro}))}),[i]),v=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return Z(Z({},e),{},{name:Object.keys(i)[t]})})).filter((function(e){return!e.config.hidden})).filter((function(e){var t=e.config;return"free"===d?!t.pro:t.pro}))}),[d,i]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-extensions-container"},Object(r.createElement)(A.Transition,{items:t,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Extensions Status...","blocksy-companion"))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,y&&Object(r.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(e){return Object(r.createElement)("li",{key:e,onClick:function(){return b(e)},className:l()({active:e===d})},{free:Object(a.__)("Free Extensions","blocksy-companion"),pro:Object(a.__)("Pro Extensions","blocksy-companion")}[e])}))),Object(r.createElement)("ul",{className:l()("ct-extensions-list",{"is-pro":"pro"===d})},v.map((function(e){var t={extension:X};return c.a.trigger("ct:extensions:card",{CustomComponent:t,extension:e}),Object(r.createElement)(t.extension,{key:e.name,extension:e,extsSyncLoading:m,onExtsSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.extAction||(i[e.name].__object=!i[e.name].__object,s(i)),h(Z(Z({},t),{},{extension:e.name}))}})}))),Object(r.createElement)(q,null)))}}))))},ee=function(e){var t=e.children,n=e.activated,o=e.checked,c=e.onChange;return Object(r.createElement)("div",{onClick:function(){return c()},className:l()("ct-checkbox-container",{activated:n})},t,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:o})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{class:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))};function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}(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 ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ae=function(e){return({coblocks:"CoBlocks","contact-form-7":"Contact Form 7",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","wpforms-lite":"WPForms - Contact Form","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ie=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(Je),i=c.currentDemo,l=c.demos_list,s=c.pluginsStatus,u=(c.setCurrentDemo,oe((i||"").split(":"),2)),m=u[0];u[1],l.filter((function(e){return e.name===m||""}));return Object(r.createElement)("div",{style:o},Object(r.createElement)("div",{className:"ct-demo-plugins"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),Object(r.createElement)("h2",null,Object(a.__)("Install & Activate Plugins","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("The following plugins are required for this starter site in order to work properly.","blocksy-companion")),t.plugins.map((function(e){var o=e.plugin,c=e.enabled;return Object(r.createElement)(r.Fragment,{key:o},!s[o]&&Object(r.createElement)(ee,{key:o,checked:c,onChange:function(){return n(ne(ne({},t),{},{plugins:t.plugins.map((function(e){return e.plugin===o?ne(ne({},e),{},{enabled:!c}):e}))}))}},ae(o)),s[o]&&Object(r.createElement)(ee,{activated:!0,checked:!0,onChange:function(){}},ae(o)))}))))},le=function(){var e=Object(r.useContext)(Je),t=e.currentlyInstalledDemo,n=e.demos_list,o=e.setCurrentDemo,c=e.demo_error,i=e.setInstallerBlockingReleased;Object(r.useContext)(R).Link;return Object(r.createElement)("ul",null,n.filter((function(e,t){return n.map((function(e){return e.name})).indexOf(e.name)===t})).map((function(e){return Object(r.createElement)("li",{key:e.name,className:l()("ct-single-demo",{"ct-is-pro":e.is_pro})},Object(r.createElement)("figure",null,Object(r.createElement)("img",{src:e.screenshot}),Object(r.createElement)("section",null,Object(r.createElement)("h3",null,Object(a.__)("Available for","blocksy-companion")),Object(r.createElement)("div",null,n.filter((function(t){return t.name===e.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var t=e.builder;return Object(r.createElement)("span",{key:t},ae(t)||"Gutenberg")})))),e.is_pro&&Object(r.createElement)("a",{onClick:function(e){return e.preventDefault()},href:"#"},"PRO")),Object(r.createElement)("div",{className:"ct-demo-actions"},Object(r.createElement)("h4",null,e.name),Object(r.createElement)("div",null,Object(r.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},Object(a.__)("Preview","blocksy-companion")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(){i(!1),o(e.name)},disabled:!!c},t&&t.demo.indexOf(e.name)>-1?Object(a.__)("Modify","blocksy-companion"):Object(a.__)("Import","blocksy-companion")))))})))};function se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}(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 ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var me=function(e){var t=e.style,n=e.nextStep,o=(Object(r.useContext)(R).is_child_theme,Object(r.useContext)(Je)),c=o.setCurrentlyInstalledDemo,i=o.setCurrentDemo,l=o.currentDemo,s=o.demos_list,u=se(Object(r.useState)(0),2),m=u[0],f=u[1],p=se(Object(r.useState)("idle"),2),d=p[0],b=p[1],h=se((l||"").split(":"),2),y=h[0],v=(h[1],s.filter((function(e){return e.name===y}))),O={erase_content:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:Object(a.__)("Deactivate demo plugins","blocksy-companion"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(v[0].plugins.join(":"))},deregister_current_demo:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_deregister_current_demo"}},j=["erase_content","deactivate_demo_plugins","deregister_current_demo"],g=j[m],_=function(){var e=O[g],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),m===j.length-1)return void b("done");f(Math.min(j.length-1,m+1))}}};return Object(r.useEffect)((function(){0!==m&&"done"!==d&&_()}),[g]),Object(r.createElement)("div",{className:"ct-modify-demo",style:t},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),Object(r.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===d&&Object(r.createElement)("h2",null,Object(a.__)("This starter site is already installed","blocksy-companion")),"loading"===d&&Object(r.createElement)("h2",null,"Removing starter site..."),"done"===d&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(a.__)("Starter Site Removed","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),i("".concat(y,":hide"))}},Object(a.__)("Dismiss","blocksy-companion")))),"idle"===d&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(a.__)("What steps do you want to perform next?","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){b("loading"),e.preventDefault(),_(),c()}},Object(a.__)("Remove","blocksy-companion")),Object(r.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},Object(a.__)("Reinstall","blocksy-companion")))))};function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){de(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(R),i=c.is_child_theme,l=c.child_theme_exists;return Object(r.createElement)("div",{className:"ct-demo-child",style:o},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),Object(r.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),Object(r.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?Object(r.createElement)("h2",null,Object(a.__)("Activate Child Theme","blocksy-companion")):Object(r.createElement)("h2",null,Object(a.__)("Install Child Theme","blocksy-companion")),!i&&Object(r.createElement)(r.Fragment,null,l?Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")):Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")),Object(r.createElement)(ee,{checked:t.child_theme,onChange:function(){return n(pe(pe({},t),{},{child_theme:!t.child_theme}))}},l?Object(a.__)("Activate Child Theme","blocksy-companion"):Object(a.__)("Install Child Theme","blocksy-companion"))),i&&Object(a.__)("You already have a child theme properly installed and activated. Move on.","blocksy-companion"),Object(r.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},Object(a.__)("Learn more about child themes","blocksy-companion")))};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(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 je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ge=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(Je),i=c.currentDemo,s=c.demos_list,u=(c.pluginsStatus,c.setCurrentDemo,Oe((i||"").split(":"),2)),m=u[0],f=(u[1],s.filter((function(e){return e.name===m||""})));return Object(r.createElement)("div",{style:o},f.length>1&&Object(r.createElement)("div",{className:"ct-demo-builder"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),Object(r.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),Object(r.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),Object(r.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),Object(r.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),Object(r.createElement)("h2",null,Object(a.__)("Choose Page Builder","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("This starter site can be imported and used with one of these page builders. Please select your prefered one in order to continue.","blocksy-companion")),Object(r.createElement)("ul",{"data-count":f.length},f.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var o=e.builder,c=e.plugins;return Object(r.createElement)("li",{className:l()({active:o===(null===t.builder?f[0].builder:t.builder)}),onClick:function(){return n(ye(ye({},t),{},{builder:o,plugins:c.map((function(e){return{plugin:e,enabled:!0}}))}))}},Object(r.createElement)("figure",null,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:o===(null===t.builder?f[0].builder:t.builder)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),Object(r.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),Object(r.createElement)("div",{className:"builder-name"},ae(o)||"Gutenberg"))})))))};function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){we(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ke=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=(e.currentDemo,e.style);return Object(r.createElement)("div",{style:o},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),Object(r.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),Object(r.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),Object(r.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),Object(r.createElement)("h2",null,Object(a.__)("Import Content","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blocksy-companion")),["options","widgets","content"].map((function(e){return Object(r.createElement)(ee,{checked:t.content[e],onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},we({},e,!t.content[e]))}))},key:e},e.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),Object(r.createElement)("div",{className:"ct-demo-erase"},Object(r.createElement)(ee,{checked:t.content.erase_content,onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},{erase_content:!t.content.erase_content})}))}},Object(r.createElement)("div",null,Object(a.__)("Clean Install","blocksy-companion"),Object(r.createElement)("i",null,Object(a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blocksy-companion"))))))},xe=function(){var e=Object(r.useContext)(R),t=e.home_url,n=e.customizer_url;return Object(r.createElement)("div",{className:"ct-install-success"},Object(r.createElement)("h2",null,Object(a.__)("Starter Site Imported Successfully","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Now you can view your website or start customizing it","blocksy-companion")),Object(r.createElement)("div",null,Object(r.createElement)("a",{href:n,className:"ct-button"},Object(a.__)("Customize","blocksy-companion")),Object(r.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},Object(a.__)("View site","blocksy-companion"))))},Se=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return Object(a.__)("copying child theme sources","blocksy-companion");if("import_activate_child"===n)return Object(a.__)("activating child theme","blocksy-companion");if("install_plugin"===n)return Object(a.sprintf)(Object(a.__)("installing plugin %s","blocksy-companion"),ae(e.name)||e.name);if("activate_plugin"===n)return Object(a.sprintf)(Object(a.__)("activating plugin %s","blocksy-companion"),ae(e.name)||e.name);if("download_demo_widgets"===n)return Object(a.__)("downloading demo widgets","blocksy-companion");if("apply_demo_widgets"===n)return Object(a.__)("installing demo widgets","blocksy-companion");if("download_demo_options"===n)return Object(a.__)("downloading demo options","blocksy-companion");if("import_mods_images"===n)return Object(a.__)("importing images from customizer","blocksy-companion");if("import_customizer_options"===n)return Object(a.__)("import customizer options","blocksy-companion");if("activate_required_extensions"===n)return Object(a.__)("activating required extensions","blocksy-companion");if("erase_previous_posts"===n)return Object(a.__)("removing previously installed posts","blocksy-companion");if("erase_previous_terms"===n)return Object(a.__)("removing previously installed taxonomies","blocksy-companion");if("erase_default_pages"===n)return Object(a.__)("removing default WordPress pages","blocksy-companion");if("erase_customizer_settings"===n)return Object(a.__)("resetting customizer options","blocksy-companion");if("erase_widgets_data"===n)return Object(a.__)("resetting widgets","blocksy-companion");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],o=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(o,r)," of ").concat(r," ").concat({users:Object(a.__)("users","blocksy-companion"),term:Object(a.__)("terms","blocksy-companion"),media:Object(a.__)("images","blocksy-companion"),post:Object(a.__)("posts","blocksy-companion"),comment:Object(a.__)("comments","blocksy-companion")}[e.kind])}return""};function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){Pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ne(e,t)}(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 Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Me=function(e){e.preventDefault(),e.returnValue=""},Le=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,o=e.includeMetaSteps,c=[];return void 0!==o&&o&&c.push("register_current_demo"),t.child_theme&&(r||c.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&c.push("plugins"),t.content.erase_content&&c.push("erase_content"),t.content.options&&c.push("options"),t.content.widgets&&c.push("widgets"),t.content.content&&c.push("content"),c.push("install_finish"),c},ze=function(e){var t=e.demoConfiguration,n=e.style,o=function(e){var t=Object(r.useContext)(Je),n=t.demos_list,o=t.currentDemo,c=(t.setCurrentDemo,t.setInstallerBlockingReleased),i=t.setCurrentlyInstalledDemo,l=t.pluginsStatus,s=Object(r.useContext)(R),u=(s.home_url,s.customizer_url,s.is_child_theme),m=(s.Link,Ae(Object(r.useState)(!1),2)),f=m[0],p=m[1],d=Ae(Object(r.useState)(0),2),b=d[0],h=d[1],y=Ae((o||"").split(":"),2),v=y[0],O=(y[1],n.filter((function(e){return e.name===v})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),j=e.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),g=Ae(Object(r.useState)({register_current_demo:{title:Object(a.__)("Register demo","blocksy-companion"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:1},child_theme:{title:Object(a.__)("Child theme","blocksy-companion"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:Object(a.__)("Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(j.join(":")),expected_signals:2*j.length+1},fake_step:{title:Object(a.__)("Fake Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:Object(a.__)("Final touches","blocksy-companion"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:Object(a.__)("Import options","blocksy-companion"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:5},widgets:{title:Object(a.__)("Import widgets","blocksy-companion"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:3},content:{title:Object(a.__)("Import content","blocksy-companion"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:50}}),2),_=g[0],E=g[1],w=Le({demoConfiguration:e,pluginsStatus:l,is_child_theme:u,includeMetaSteps:!0}),k=w[b],x=Ae(Object(r.useState)(0),2),S=x[0],C=x[1],D=Ae(Object(r.useState)(null),2),P=D[0],A=D[1],N=Object(r.useRef)(S),M=Object(r.useRef)(_);Object(r.useEffect)((function(){N.current=S,M.current=_}));var L=function(e){return"content"===e?1===w.length?100:50:w.indexOf("content")>-1?50/(w.length-1):100/w.length},z=w.reduce((function(e,t,n){return n>=b?e:e+L(t)}),0)+100*S/_[k].expected_signals*(L(k)/100),T=function(){var e=_[k],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(C(N.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(A(n),E(De(De({},M.current),{},{content:De(De({},M.current.content),{},Pe({},"".concat(r,"_count"),M.current.content["".concat(r,"_count")]+1))})))}else A(n);if("get_content_preliminary_data"===n.action){var o=n.data,a=(o.comment_count,o.media_count,o.post_count,o.term_count,o.users,De(De({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));E(De(De({},M.current),{},{content:De(De({},M.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),b===w.length-1)return p(!0),c(!0),void window.removeEventListener("beforeunload",Me);A(null),C(0),h(Math.min(w.length-1,b+1))}}};return Object(r.useEffect)((function(){f||(A(null),C(0),"fake_step"===k?(console.log("here we go delay before fake_step"),setTimeout((function(){T()}),2e3)):T())}),[k]),Object(r.useEffect)((function(){return window.addEventListener("beforeunload",Me),i({demo:"".concat(o,":").concat(e.builder)}),function(){window.removeEventListener("beforeunload",Me)}}),[]),{isCompleted:f,stepName:k,stepsDescriptors:_,lastMessage:P,progress:z}}(t),c=o.isCompleted,i=o.stepName,l=o.stepsDescriptors,s=o.lastMessage,u=o.progress;return Object(r.createElement)("div",{className:"ct-demo-install",style:n},Object(r.createElement)(A.Transition,{initial:!0,items:c,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return function(t){return Object(r.createElement)("div",{style:t},e?Object(r.createElement)(xe,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},Object(r.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),Object(r.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),Object(r.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),Object(r.createElement)("h2",null,Object(a.__)("Installing","blocksy-companion"),"..."),Object(r.createElement)("p",null,Object(a.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-progress-info"},l[i].title,s&&Se(s,l)?": ".concat(Se(s,l)):"",Object(r.createElement)("span",null,Math.round(u),"%")),Object(r.createElement)("div",{style:{"--progress":"".concat(u,"%")},className:"ct-installer-progress"},Object(r.createElement)("div",null))))}})))};function Te(e){return function(e){if(Array.isArray(e))return Fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Re(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 Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||Re(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 Re(e,t){if(e){if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fe(e,t):void 0}}function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Be=function(e){e.location,e.navigate;var t=Ie(Object(r.useState)(!0),2),n=(t[0],t[1],Object(r.useContext)(Je)),o=n.installerBlockingReleased,c=n.demos_list,i=n.currentDemo,s=n.pluginsStatus,u=n.currentlyInstalledDemo,m=n.setCurrentDemo,f=Object(r.useContext)(R).is_child_theme,p=Ie(Object(r.useState)(u),2),d=p[0],b=p[1],h=Ie(Object(r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),y=h[0],v=h[1],O=Ie(Object(r.useState)(0),2),j=O[0],g=O[1],_=Ie((i||"").split(":"),2),E=_[0],w=(_[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!i)return!1;if("modify_demo"===e){if(!d)return!1;if(-1===d.demo.indexOf(E))return!1}if("child_theme"===e&&f)return!1;var t=c.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(Te(e),Te(t.plugins||[]))}),[]).filter((function(e){return!s[e]})).length)&&("builder"!==e||t.length>1)}))),k=w[j];return Object(r.useEffect)((function(){if(E&&!(i.indexOf(":hide")>-1)){var e=c.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));g(0),b(u),v({builder:1===e.length?e[0].builder:null,child_theme:!0,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[i]),Object(r.createElement)(M,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:l()("ct-demo-modal",{"ct-demo-installer":"installer"===k||"modify_demo"===k}),onDismiss:function(){("installer"!==k||o)&&m("".concat(E,":hide"))},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},Object(r.createElement)("div",{className:"ct-current-step"},Object(r.createElement)(A.Transition,{items:k,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(e){return function(t){return Object(r.createElement)(r.Fragment,null,"modify_demo"===e&&Object(r.createElement)(me,{demoConfiguration:y,nextStep:function(){g(Math.min(j+1,w.length-1))},style:t}),"child_theme"===e&&Object(r.createElement)(be,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"plugins"===e&&Object(r.createElement)(ie,{demoConfiguration:y,style:t,setDemoConfiguration:v}),"builder"===e&&Object(r.createElement)(ge,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"content"===e&&Object(r.createElement)(ke,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"installer"===e&&Object(r.createElement)(ze,{style:t,demoConfiguration:y}))}}))),"installer"!==k&&"modify_demo"!==k&&Object(r.createElement)("div",{className:"ct-demo-step-controls"},j>0&&Object(r.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){g(Math.max(j-1,0))}},Object(a.__)("Back","blocksy-companion")),w.length>2&&Object(r.createElement)("ul",{className:"ct-steps-pills"},w.map((function(e,t){return t===w.length-1?null:Object(r.createElement)("li",{className:l()({active:e===k}),key:e},t+1)}))),Object(r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===k&&0===Le({demoConfiguration:y,pluginsStatus:s,is_child_theme:f}).length,onClick:function(){g(Math.min(j+1,w.length-1))}},"content"===k?Object(a.__)("Install","blocksy-companion"):Object(a.__)("Next","blocksy-companion"))))}})},Ue=n(7),Ve=n.n(Ue);function He(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function qe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return We(e,t)}(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 We(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ze=function(){var e=qe(Object(r.useState)(!1),2),t=e[0],n=e[1],o=qe(Object(r.useState)(!1),2),c=o[0],i=o[1],l=qe(Object(r.useState)(""),2),s=l[0],u=l[1],m=qe(Object(r.useState)(""),2),f=m[0],p=m[1],d=qe(Object(r.useState)("coblocks,elementor,contact-form-7"),2),b=d[0],h=d[1],y=qe(Object(r.useState)(""),2),v=y[0],O=y[1],j=qe(Object(r.useState)(!1),2),g=j[0],_=j[1],E=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,o,c,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("name",s),t.append("is_pro",g),t.append("url",v),t.append("builder",f),t.append("plugins",b),t.append("wp_customize","on"),e.prev=9,e.next=12,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 12:if(200!==(r=e.sent).status){e.next=20;break}return e.next=16,r.json();case 16:o=e.sent,c=o.success,a=o.data,c&&(i=new Blob([JSON.stringify(a.demo)],{type:"text/plain;charset=utf-8"}),Ve.a.saveAs(i,"".concat(s,".json")));case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(9);case 24:n(!1);case 25:case"end":return e.stop()}}),e,null,[[9,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){He(c,r,o,a,i,"next",e)}function i(e){He(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return ct_localizations.is_dev_mode?Object(r.createElement)("div",{className:"ct-export"},Object(r.createElement)("button",{className:"ct-button",onClick:function(e){i(!0)}},Object(a.__)("Site export")),Object(r.createElement)(M,{items:c,className:"ct-site-export-modal",onDismiss:function(){return i(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-site-export"},Object(r.createElement)("label",null,Object(a.__)("Name","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Name","blocksy-companion"),value:s,onChange:function(e){var t=e.target.value;return u(t)}})),Object(r.createElement)("label",null,Object(a.__)("Preview URL","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Preview URL","blocksy-companion"),value:v,onChange:function(e){var t=e.target.value;return O(t)}})),Object(r.createElement)("label",null,Object(a.__)("PRO","blocksy-companion"),Object(r.createElement)("input",{type:"checkbox",value:g,onChange:function(e){e.target.value;return _(!g)}})),Object(r.createElement)("label",null,Object(a.__)("Builder","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Builder","blocksy-companion"),value:f,onChange:function(e){var t=e.target.value;return p(t)}})),Object(r.createElement)("label",null,Object(a.__)("Plugins","blocksy-companion"),Object(r.createElement)("textarea",{placeholder:Object(a.__)("Plugins","blocksy-companion"),value:b,onChange:function(e){var t=e.target.value;return h(t)}})),Object(r.createElement)("button",{className:"ct-button",disabled:t,onClick:function(){return E()}},t?Object(a.__)("Loading...","blocksy-companion"):Object(a.__)("Export site","blocksy-companion")))}})):null};function $e(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function Ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ke(e,t)}(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 Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Je=Object(r.createContext)({demos:[]}),Ye=null,Xe=null,Qe=function(e){e.children,e.path,e.location;var t=Ge(Object(r.useState)(!Ye),2),n=t[0],o=t[1],c=Ge(Object(r.useState)(Ye||[]),2),i=c[0],l=c[1],s=Ge(Object(r.useState)(Xe||{}),2),u=s[0],m=s[1],f=Ge(Object(r.useState)(null),2),p=f[0],d=f[1],b=Ge(Object(r.useState)(null),2),h=b[0],y=b[1],v=Ge(Object(r.useState)(!1),2),O=v[0],j=v[1],g=Ge(Object(r.useState)({builder:""}),2),_=(g[0],g[1],Ge(Object(r.useState)(!1),2)),E=_[0],w=_[1],k=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,c,a,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.length>0&&void 0!==i[0]&&i[0]&&o(!0),(t=new FormData).append("action","blocksy_demo_list"),e.prev=4,e.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=15;break}return e.next=11,n.json();case 11:r=e.sent,c=r.success,a=r.data,c&&(l(a.demos),m(a.active_plugins),y(a.current_installed_demo),j(a.demo_error),Xe=a.active_plugins,Ye=a.demos,a.demo_error);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:o(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){$e(c,r,o,a,i,"next",e)}function i(e){$e(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){k(!Ye)}),[]),Object(r.createElement)("div",{className:"ct-demos-list-container"},O&&Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:O}}),Object(r.createElement)(A.Transition,{items:n,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Starter Sites...","blocksy-companion"))}:0===i.length?function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:Object(a.__)("The connection to our <b>demo.creativethemes.com</b> server didn't worked. This connection is required for importing the starter sites from our demo content server. All you have to do is to contact your hosting provider and ask them to white list our demo server address.","blocksy-companion")}}),Object(r.createElement)(q,null))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Je.Provider,{value:{demo_error:O,demos_list:i.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:p,pluginsStatus:u,installerBlockingReleased:E,setInstallerBlockingReleased:w,setCurrentDemo:d,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:y}},Object(r.createElement)(le,null),Object(r.createElement)(Be,null),Object(r.createElement)(Ze,null)),Object(r.createElement)(q,null)))}})))};function et(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}var tt=function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,c,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_fs_connect_again"),e.prev=2,e.next=5,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 5:if(200!==(n=e.sent).status){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,o=r.success,r.data,o&&((c=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,a=c.querySelector("form"),document.body.appendChild(a),a.submit());case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(2);case 17:case"end":return e.stop()}}),e,null,[[2,15]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){et(c,r,o,a,i,"next",e)}function i(e){et(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)("div",{className:"ct-freemius-optin-message"},Object(r.createElement)("i",null,Object(r.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Object(r.createElement)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),Object(r.createElement)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"}))),Object(r.createElement)("h2",null,Object(a.__)("Stay Updated","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking.","blocksy-companion")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(t){t.preventDefault(),e()}},Object(a.__)("Allow & Continue","blocksy-companion")))};c.a.on("ct:dashboard:routes",(function(e){e.push({Component:function(){return Object(r.createElement)(Q,null)},path:"/extensions"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return Object(r.createElement)(Qe,e)},path:"/demos"})})),c.a.on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:Object(a.__)("Starter Sites","blocksy-companion"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:Object(a.__)("Extensions","blocksy-companion"),path:"/extensions"})})),c.a.on("ct:dashboard:home:before",(function(e){ctDashboardLocalizations.plugin_data.is_anonymous&&(e.content=Object(r.createElement)(tt,null))})),c.a.on("ct:dashboard:heading:after",(function(e){ctDashboardLocalizations.plugin_data.is_pro&&(e.content=Object(r.createElement)("span",null,"PRO"))}))}]);
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.blocksyOptions},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){var r,o,c=n(11),a=n(12),i=(o=[],{activateTrap:function(e){if(o.length>0){var t=o[o.length-1];t!==e&&t.pause()}var n=o.indexOf(e);-1===n||o.splice(n,1),o.push(e)},deactivateTrap:function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1),o.length>0&&o[o.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),u={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},m={activate:function(e){if(u.active)return;g(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return p(),m},deactivate:f,pause:function(){if(u.paused||!u.active)return;u.paused=!0,d()},unpause:function(){if(!u.paused||!u.active)return;u.paused=!1,g(),p()}};return m;function f(e){if(u.active){clearTimeout(r),d(),u.active=!1,u.paused=!1,i.deactivateTrap(m);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&l((function(){var e;_((e=u.nodeFocusedBeforeActivation,b("setReturnFocus")||e))})),m}}function p(){if(u.active)return i.activateTrap(m),r=l((function(){_(h())})),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",y,{capture:!0,passive:!1}),n.addEventListener("touchstart",y,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",O,{capture:!0,passive:!1}),m}function d(){if(u.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",y,!0),n.removeEventListener("touchstart",y,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",O,!0),m}function b(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function h(){var e;if(!(e=null!==b("initialFocus")?b("initialFocus"):o.contains(n.activeElement)?n.activeElement:u.firstTabbableNode||b("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function y(e){o.contains(e.target)||(s.clickOutsideDeactivates?f({returnFocus:!c.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function v(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),_(u.mostRecentlyFocusedNode||h()))}function O(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void f();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===u.firstTabbableNode)return e.preventDefault(),void _(u.lastTabbableNode);if(!e.shiftKey&&e.target===u.lastTabbableNode)e.preventDefault(),_(u.firstTabbableNode)}(e)}function j(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=c(o);u.firstTabbableNode=e[0]||h(),u.lastTabbableNode=e[e.length-1]||h()}function _(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),u.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):_(h()))}}},function(e,t,n){(function(n){var r,o,c;o=[],void 0===(c="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var c="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=c.saveAs||("object"!=typeof window||window!==c?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=c.URL||c.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):r(l.href)?t(e,n,a):o(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,c){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,c),n);else if(r(e))t(e,n,c);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){o(a)}))}}:function(e,n,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(c.HTMLElement)||c.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},s.readAsDataURL(e)}else{var u=c.URL||c.webkitURL,m=u.createObjectURL(e);o?o.location=m:location.href=m,o=null,setTimeout((function(){u.revokeObjectURL(m)}),4e4)}});c.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,o):r)||(e.exports=c)}).call(this,n(13))},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(10);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),o="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function c(e,t){t=t||{};var n,c,i,l=[],m=[],f=e.querySelectorAll(r);for(t.includeContainer&&o.call(e,r)&&(f=Array.prototype.slice.apply(f)).unshift(e),n=0;n<f.length;n++)a(c=f[n])&&(0===(i=s(c))?l.push(c):m.push({documentOrder:n,tabIndex:i,node:c}));return m.sort(u).map((function(e){return e.node})).concat(l)}function a(e){return!(!i(e)||function(e){return function(e){return m(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||s(e)<0)}function i(e){return!(e.disabled||function(e){return m(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}c.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,r)&&a(e)},c.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,l)&&i(e)};var l=n.concat("iframe").join(",");function s(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function u(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function m(e){return"INPUT"===e.tagName}e.exports=c},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n.n(o),a=n(1),i=n(2),l=n.n(i),s=n(5),u=n.n(s);n(8);function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},d=function(e){function t(){var n,r;m(this,t);for(var o=arguments.length,c=Array(o),a=0;a<o;a++)c[a]=arguments[a];return n=r=f(this,e.call.apply(e,[this].concat(c))),b.call(r),f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:p(t),refs:o,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:p(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:p(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:p(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:p(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(u.a.Component);d.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var b=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},h=d,y=function(e){var t=e.children,n=e.container,o=void 0===n?document.body:n,c=e.type,a=void 0===c?"reach-portal":c;return Object(r.createElement)(h,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=o.hasOwnProperty("current")?o.current:o;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var v=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},O=n(6),j=n.n(O);function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(){},w=function(){},k=function(e,t){var n,r,o;e.disposeAriaHider=(n=e.overlayNode,r=[],o=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),o.push(e),e.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=j()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},x=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},S=React.createContext(),C=React.forwardRef((function(e,t){var n=e.container,o=e.isOpen,c=void 0===o||o,a=e.onDismiss,i=void 0===a?E:a,l=e.initialFocusRef,s=e.onClick,u=e.onKeyDown,m=_(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(h,{didMount:w},c?Object(r.createElement)(y,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(h,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;k(t,l)},willUnmount:x},(function(e){var n=e.refs;return Object(r.createElement)(S.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:v(s,(function(e){e.stopPropagation(),i()})),onKeyDown:v(u,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},m)))}))):null)}));C.propTypes={initialFocusRef:function(){}};var D=function(e){return e.stopPropagation()},P=React.forwardRef((function(e,t){var n=e.onClick,o=(e.onKeyDown,_(e,["onClick","onKeyDown"]));return Object(r.createElement)(S.Consumer,null,(function(e){return Object(r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:v(n,D),ref:function(n){e(n),t&&t(n)}},o))}))})),A=n(3),N=function(e){return!!e},M=function(e){var t=e.items,n=e.isVisible,o=void 0===n?N:n,c=e.render,a=e.className,i=e.onDismiss;return Object(r.createElement)(A.Transition,{items:t,onStart:function(){return document.body.classList[o(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return o(e)&&function(t){return Object(r.createElement)(C,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return i()}},Object(r.createElement)(P,{className:l()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return i()}},"×"),c(e,t)))}}))};function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}(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 z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var T=function(e){var t=L(Object(r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0)},Object(r.createElement)(M,{items:n,onDismiss:function(){return o(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]},I=window.ctDashboardLocalizations.DashboardContext,R=(I.Provider,I.Consumer,I);function F(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){F(c,r,o,a,i,"next",e)}function i(e){F(c,r,o,a,i,"throw",e)}a(void 0)}))}}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return V(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return V(e,t)}(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 V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),o=U(n,2),c=o[0],i=o[1],l=Object(r.useState)(!1),s=U(l,2),u=s[0],m=s[1],f=Object(r.useContext)(R),p=(f.Link,f.history),d=ctDashboardLocalizations.plugin_data.is_pro,b=function(){var n=B(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(d||!e.config.pro){n.next=3;break}return m(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),n.prev=7,n.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:e.config.require_refresh&&location.reload(),t(),n.next=16;break;case 14:n.prev=14,n.t0=n.catch(7);case 16:i(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[c,b,!d&&e.config.pro?Object(r.createElement)(M,{items:u,className:"ct-onboarding-modal",onDismiss:function(){return m(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"55",height:"55",viewBox:"0 0 40.5 48.3"},Object(r.createElement)("path",{fill:"#2d82c8",d:"M33.4 29.4l7.1 12.3-7.4.6-4 6-7.3-12.9"}),Object(r.createElement)("path",{d:"M33.5 29.6L26 42.7l-4.2-7.3 11.6-6 .1.2zM0 41.7l7.5.6 3.9 6 7.2-12.4-11-7.3L0 41.7z",fill:"#2271b1"}),Object(r.createElement)("path",{d:"M39.5 18.7c0 1.6-2.4 2.8-2.7 4.3-.4 1.5 1 3.8.2 5.1-.8 1.3-3.4 1.2-4.5 2.3-1.1 1.1-1 3.7-2.3 4.5-1.3.8-3.6-.6-5.1-.2-1.5.4-2.7 2.7-4.3 2.7S18 35 16.5 34.7c-1.5-.4-3.8 1-5.1.2s-1.2-3.4-2.3-4.5-3.7-1-4.5-2.3.6-3.6.2-5.1-2.7-2.7-2.7-4.3 2.4-2.8 2.7-4.3c.4-1.5-1-3.8-.2-5.1C5.4 8 8.1 8.1 9.1 7c1.1-1.1 1-3.7 2.3-4.5s3.6.6 5.1.2C18 2.4 19.2 0 20.8 0c1.6 0 2.8 2.4 4.3 2.7 1.5.4 3.8-1 5.1-.2 1.3.8 1.2 3.4 2.3 4.5 1.1 1.1 3.7 1 4.5 2.3s-.6 3.6-.2 5.1c.3 1.5 2.7 2.7 2.7 4.3z",fill:"#599fd9"}),Object(r.createElement)("path",{d:"M23.6 7c-6.4-1.5-12.9 2.5-14.4 8.9-.7 3.1-.2 6.3 1.5 9.1 1.7 2.7 4.3 4.6 7.4 5.4.9.2 1.9.3 2.8.3 2.2 0 4.4-.6 6.3-1.8 2.7-1.7 4.6-4.3 5.4-7.5C34 15 30 8.5 23.6 7zm7 14c-.6 2.6-2.2 4.8-4.5 6.2-2.3 1.4-5 1.8-7.6 1.2-2.6-.6-4.8-2.2-6.2-4.5-1.4-2.3-1.8-5-1.2-7.6.6-2.6 2.2-4.8 4.5-6.2 1.6-1 3.4-1.5 5.2-1.5.8 0 1.5.1 2.3.3 5.4 1.3 8.7 6.7 7.5 12.1zm-8.2-4.5l3.7.5-2.7 2.7.7 3.7-3.4-1.8-3.3 1.8.6-3.7-2.7-2.7 3.8-.5 1.6-3.4 1.7 3.4z",fill:"#fff"})),Object(r.createElement)("h2",{className:"ct-modal-title"},"This is a Pro extension"),Object(r.createElement)("p",null,Object(a.__)("Upgrade to the Pro version and get instant access to all premium extensions, features and future updates.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("a",{onClick:function(e){e.preventDefault(),m(!1),setTimeout((function(){p.navigate("/pro")}),300)},className:"button"},Object(a.__)("Free vs Pro","blocksy")),Object(r.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/",target:"_blank",className:"button button-primary"},Object(a.__)("Upgrade Now","blocksy-companion"))))}}):null]},q=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:Object(r.createElement)("div",{className:"ct-support-container"},Object(r.createElement)("h2",null,Object(a.__)("Need help or advice?","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Got a question or need help with the theme? You can always submit a support ticket or ask for help in our friendly Facebook community.","blocksy-companion")),Object(r.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Submit a Support Ticket","blocksy-companion")),Object(r.createElement)("a",{href:"https://www.facebook.com/groups/blocksy.community",className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Join Facebook Community","blocksy-companion")))};function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(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 J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Y=null,X=function(e){var t=e.extension,n=e.onExtsSync,o=K(T(t),2),c=o[0],i=o[1],s=K(H(t,(function(){n()})),3),u=s[0],m=s[1],f=s[2];return Object(r.createElement)("li",{className:l()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,u&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),t.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},t.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:l()(t.__object?"ct-button":"ct-button-primary"),"data-hover":"white",disabled:u,onClick:function(){m()}},t.__object?Object(a.__)("Deactivate","blocksy-companion"):Object(a.__)("Activate","blocksy-companion")),t.readme&&Object(r.createElement)("button",{onClick:function(){return c()},className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"}))),t.__object&&t.config&&t.config.buttons&&t.config.buttons.map((function(e,t){var n=e.text,o=e.url;return Object(r.createElement)("a",{href:o,className:"ct-button ct-config-btn",dataButton:"white"},n)}))),i,f)},Q=function(){var e=K(Object(r.useState)(!Y),2),t=e[0],n=e[1],o=K(Object(r.useState)(Y||[]),2),i=o[0],s=o[1],u=K(Object(r.useState)(!1),2),m=u[0],f=u[1],p=K(Object(r.useState)("free"),2),d=p[0],b=p[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,o,c,a,i,l,u,m,p=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},r=Z({verbose:!1,extension:null,extAction:null},t),o=r.verbose,c=r.extension,a=r.extAction,o&&n(!0),f(!0),e.next=6,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),Z({method:"POST"},c&&a?{body:JSON.stringify({extension:c,extAction:a})}:{}));case 6:if(200===(i=e.sent).status){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,i.json();case 11:if(l=e.sent,u=l.success,m=l.data,u){e.next=16;break}return e.abrupt("return");case 16:if(f(!1),n(!1),s(m),Y=m,!c){e.next=22;break}return e.abrupt("return",m[c]);case 22:return e.abrupt("return",m);case 23:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){G(c,r,o,a,i,"next",e)}function i(e){G(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();Object(r.useEffect)((function(){h({verbose:!Y});var e=function(){h()};return c.a.on("blocksy_exts_sync_exts",e),function(){c.a.off("blocksy_exts_sync_exts",e)}}),[]);var y=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return Z(Z({},e),{},{name:Object.keys(i)[t]})})).find((function(e){return e.config.pro}))}),[i]),v=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return Z(Z({},e),{},{name:Object.keys(i)[t]})})).filter((function(e){return!e.config.hidden})).filter((function(e){var t=e.config;return"free"===d?!t.pro:t.pro}))}),[d,i]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-extensions-container"},Object(r.createElement)(A.Transition,{items:t,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Extensions Status...","blocksy-companion"))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,y&&Object(r.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(e){return Object(r.createElement)("li",{key:e,onClick:function(){return b(e)},className:l()({active:e===d})},{free:Object(a.__)("Free Extensions","blocksy-companion"),pro:Object(a.__)("Pro Extensions","blocksy-companion")}[e])}))),Object(r.createElement)("ul",{className:l()("ct-extensions-list",{"is-pro":"pro"===d})},v.map((function(e){var t={extension:X};return c.a.trigger("ct:extensions:card",{CustomComponent:t,extension:e}),Object(r.createElement)(t.extension,{key:e.name,extension:e,extsSyncLoading:m,onExtsSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.extAction||(i[e.name].__object=!i[e.name].__object,s(i)),h(Z(Z({},t),{},{extension:e.name}))}})}))),Object(r.createElement)(q,null)))}}))))},ee=function(e){var t=e.children,n=e.activated,o=e.checked,c=e.onChange;return Object(r.createElement)("div",{onClick:function(){return c()},className:l()("ct-checkbox-container",{activated:n})},t,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:o})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{class:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))};function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}(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 ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ae=function(e){return({coblocks:"CoBlocks","contact-form-7":"Contact Form 7",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","wpforms-lite":"WPForms - Contact Form","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ie=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(Je),i=c.currentDemo,l=c.demos_list,s=c.pluginsStatus,u=(c.setCurrentDemo,oe((i||"").split(":"),2)),m=u[0];u[1],l.filter((function(e){return e.name===m||""}));return Object(r.createElement)("div",{style:o},Object(r.createElement)("div",{className:"ct-demo-plugins"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),Object(r.createElement)("h2",null,Object(a.__)("Install & Activate Plugins","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("The following plugins are required for this starter site in order to work properly.","blocksy-companion")),t.plugins.map((function(e){var o=e.plugin,c=e.enabled;return Object(r.createElement)(r.Fragment,{key:o},!s[o]&&Object(r.createElement)(ee,{key:o,checked:c,onChange:function(){return n(ne(ne({},t),{},{plugins:t.plugins.map((function(e){return e.plugin===o?ne(ne({},e),{},{enabled:!c}):e}))}))}},ae(o)),s[o]&&Object(r.createElement)(ee,{activated:!0,checked:!0,onChange:function(){}},ae(o)))}))))},le=function(){var e=Object(r.useContext)(Je),t=e.currentlyInstalledDemo,n=e.demos_list,o=e.setCurrentDemo,c=e.demo_error,i=e.setInstallerBlockingReleased;Object(r.useContext)(R).Link;return Object(r.createElement)("ul",null,n.filter((function(e,t){return n.map((function(e){return e.name})).indexOf(e.name)===t})).map((function(e){return Object(r.createElement)("li",{key:e.name,className:l()("ct-single-demo",{"ct-is-pro":e.is_pro})},Object(r.createElement)("figure",null,Object(r.createElement)("img",{src:e.screenshot}),Object(r.createElement)("section",null,Object(r.createElement)("h3",null,Object(a.__)("Available for","blocksy-companion")),Object(r.createElement)("div",null,n.filter((function(t){return t.name===e.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var t=e.builder;return Object(r.createElement)("span",{key:t},ae(t)||"Gutenberg")})))),e.is_pro&&Object(r.createElement)("a",{onClick:function(e){return e.preventDefault()},href:"#"},"PRO")),Object(r.createElement)("div",{className:"ct-demo-actions"},Object(r.createElement)("h4",null,e.name),Object(r.createElement)("div",null,Object(r.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},Object(a.__)("Preview","blocksy-companion")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(){i(!1),o(e.name)},disabled:!!c},t&&t.demo.indexOf(e.name)>-1?Object(a.__)("Modify","blocksy-companion"):Object(a.__)("Import","blocksy-companion")))))})))};function se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}(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 ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var me=function(e){var t=e.style,n=e.nextStep,o=(Object(r.useContext)(R).is_child_theme,Object(r.useContext)(Je)),c=o.setCurrentlyInstalledDemo,i=o.setCurrentDemo,l=o.currentDemo,s=o.demos_list,u=se(Object(r.useState)(0),2),m=u[0],f=u[1],p=se(Object(r.useState)("idle"),2),d=p[0],b=p[1],h=se((l||"").split(":"),2),y=h[0],v=(h[1],s.filter((function(e){return e.name===y}))),O={erase_content:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:Object(a.__)("Deactivate demo plugins","blocksy-companion"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(v[0].plugins.join(":"))},deregister_current_demo:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_deregister_current_demo"}},j=["erase_content","deactivate_demo_plugins","deregister_current_demo"],g=j[m],_=function(){var e=O[g],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),m===j.length-1)return void b("done");f(Math.min(j.length-1,m+1))}}};return Object(r.useEffect)((function(){0!==m&&"done"!==d&&_()}),[g]),Object(r.createElement)("div",{className:"ct-modify-demo",style:t},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),Object(r.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===d&&Object(r.createElement)("h2",null,Object(a.__)("This starter site is already installed","blocksy-companion")),"loading"===d&&Object(r.createElement)("h2",null,"Removing starter site..."),"done"===d&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(a.__)("Starter Site Removed","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),i("".concat(y,":hide"))}},Object(a.__)("Dismiss","blocksy-companion")))),"idle"===d&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(a.__)("What steps do you want to perform next?","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){b("loading"),e.preventDefault(),_(),c()}},Object(a.__)("Remove","blocksy-companion")),Object(r.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},Object(a.__)("Reinstall","blocksy-companion")))))};function fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){de(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(R),i=c.is_child_theme,l=c.child_theme_exists;return Object(r.createElement)("div",{className:"ct-demo-child",style:o},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),Object(r.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),Object(r.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?Object(r.createElement)("h2",null,Object(a.__)("Activate Child Theme","blocksy-companion")):Object(r.createElement)("h2",null,Object(a.__)("Install Child Theme","blocksy-companion")),!i&&Object(r.createElement)(r.Fragment,null,l?Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")):Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")),Object(r.createElement)(ee,{checked:t.child_theme,onChange:function(){return n(pe(pe({},t),{},{child_theme:!t.child_theme}))}},l?Object(a.__)("Activate Child Theme","blocksy-companion"):Object(a.__)("Install Child Theme","blocksy-companion"))),i&&Object(a.__)("You already have a child theme properly installed and activated. Move on.","blocksy-companion"),Object(r.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},Object(a.__)("Learn more about child themes","blocksy-companion")))};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(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 je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ge=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(Je),i=c.currentDemo,s=c.demos_list,u=(c.pluginsStatus,c.setCurrentDemo,Oe((i||"").split(":"),2)),m=u[0],f=(u[1],s.filter((function(e){return e.name===m||""})));return Object(r.createElement)("div",{style:o},f.length>1&&Object(r.createElement)("div",{className:"ct-demo-builder"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),Object(r.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),Object(r.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),Object(r.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),Object(r.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),Object(r.createElement)("h2",null,Object(a.__)("Choose Page Builder","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("This starter site can be imported and used with one of these page builders. Please select your prefered one in order to continue.","blocksy-companion")),Object(r.createElement)("ul",{"data-count":f.length},f.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var o=e.builder,c=e.plugins;return Object(r.createElement)("li",{className:l()({active:o===(null===t.builder?f[0].builder:t.builder)}),onClick:function(){return n(ye(ye({},t),{},{builder:o,plugins:c.map((function(e){return{plugin:e,enabled:!0}}))}))}},Object(r.createElement)("figure",null,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:o===(null===t.builder?f[0].builder:t.builder)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),Object(r.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),Object(r.createElement)("div",{className:"builder-name"},ae(o)||"Gutenberg"))})))))};function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){we(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ke=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=(e.currentDemo,e.style);return Object(r.createElement)("div",{style:o},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),Object(r.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),Object(r.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),Object(r.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),Object(r.createElement)("h2",null,Object(a.__)("Import Content","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blocksy-companion")),["options","widgets","content"].map((function(e){return Object(r.createElement)(ee,{checked:t.content[e],onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},we({},e,!t.content[e]))}))},key:e},e.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),Object(r.createElement)("div",{className:"ct-demo-erase"},Object(r.createElement)(ee,{checked:t.content.erase_content,onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},{erase_content:!t.content.erase_content})}))}},Object(r.createElement)("div",null,Object(a.__)("Clean Install","blocksy-companion"),Object(r.createElement)("i",null,Object(a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blocksy-companion"))))))},xe=function(){var e=Object(r.useContext)(R),t=e.home_url,n=e.customizer_url;return Object(r.createElement)("div",{className:"ct-install-success"},Object(r.createElement)("h2",null,Object(a.__)("Starter Site Imported Successfully","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Now you can view your website or start customizing it","blocksy-companion")),Object(r.createElement)("div",null,Object(r.createElement)("a",{href:n,className:"ct-button"},Object(a.__)("Customize","blocksy-companion")),Object(r.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},Object(a.__)("View site","blocksy-companion"))))},Se=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return Object(a.__)("copying child theme sources","blocksy-companion");if("import_activate_child"===n)return Object(a.__)("activating child theme","blocksy-companion");if("install_plugin"===n)return Object(a.sprintf)(Object(a.__)("installing plugin %s","blocksy-companion"),ae(e.name)||e.name);if("activate_plugin"===n)return Object(a.sprintf)(Object(a.__)("activating plugin %s","blocksy-companion"),ae(e.name)||e.name);if("download_demo_widgets"===n)return Object(a.__)("downloading demo widgets","blocksy-companion");if("apply_demo_widgets"===n)return Object(a.__)("installing demo widgets","blocksy-companion");if("download_demo_options"===n)return Object(a.__)("downloading demo options","blocksy-companion");if("import_mods_images"===n)return Object(a.__)("importing images from customizer","blocksy-companion");if("import_customizer_options"===n)return Object(a.__)("import customizer options","blocksy-companion");if("activate_required_extensions"===n)return Object(a.__)("activating required extensions","blocksy-companion");if("erase_previous_posts"===n)return Object(a.__)("removing previously installed posts","blocksy-companion");if("erase_previous_terms"===n)return Object(a.__)("removing previously installed taxonomies","blocksy-companion");if("erase_default_pages"===n)return Object(a.__)("removing default WordPress pages","blocksy-companion");if("erase_customizer_settings"===n)return Object(a.__)("resetting customizer options","blocksy-companion");if("erase_widgets_data"===n)return Object(a.__)("resetting widgets","blocksy-companion");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],o=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(o,r)," of ").concat(r," ").concat({users:Object(a.__)("users","blocksy-companion"),term:Object(a.__)("terms","blocksy-companion"),media:Object(a.__)("images","blocksy-companion"),post:Object(a.__)("posts","blocksy-companion"),comment:Object(a.__)("comments","blocksy-companion")}[e.kind])}return""};function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){Pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ne(e,t)}(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 Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Me=function(e){e.preventDefault(),e.returnValue=""},Le=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,o=e.includeMetaSteps,c=[];return void 0!==o&&o&&c.push("register_current_demo"),t.child_theme&&(r||c.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&c.push("plugins"),t.content.erase_content&&c.push("erase_content"),t.content.options&&c.push("options"),t.content.widgets&&c.push("widgets"),t.content.content&&c.push("content"),c.push("install_finish"),c},ze=function(e){var t=e.demoConfiguration,n=e.style,o=function(e){var t=Object(r.useContext)(Je),n=t.demos_list,o=t.currentDemo,c=(t.setCurrentDemo,t.setInstallerBlockingReleased),i=t.setCurrentlyInstalledDemo,l=t.pluginsStatus,s=Object(r.useContext)(R),u=(s.home_url,s.customizer_url,s.is_child_theme),m=(s.Link,Ae(Object(r.useState)(!1),2)),f=m[0],p=m[1],d=Ae(Object(r.useState)(0),2),b=d[0],h=d[1],y=Ae((o||"").split(":"),2),v=y[0],O=(y[1],n.filter((function(e){return e.name===v})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),j=e.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),g=Ae(Object(r.useState)({register_current_demo:{title:Object(a.__)("Register demo","blocksy-companion"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:1},child_theme:{title:Object(a.__)("Child theme","blocksy-companion"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:Object(a.__)("Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(j.join(":")),expected_signals:2*j.length+1},fake_step:{title:Object(a.__)("Fake Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:Object(a.__)("Final touches","blocksy-companion"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:Object(a.__)("Import options","blocksy-companion"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:5},widgets:{title:Object(a.__)("Import widgets","blocksy-companion"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:3},content:{title:Object(a.__)("Import content","blocksy-companion"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:50}}),2),_=g[0],E=g[1],w=Le({demoConfiguration:e,pluginsStatus:l,is_child_theme:u,includeMetaSteps:!0}),k=w[b],x=Ae(Object(r.useState)(0),2),S=x[0],C=x[1],D=Ae(Object(r.useState)(null),2),P=D[0],A=D[1],N=Object(r.useRef)(S),M=Object(r.useRef)(_);Object(r.useEffect)((function(){N.current=S,M.current=_}));var L=function(e){return"content"===e?1===w.length?100:50:w.indexOf("content")>-1?50/(w.length-1):100/w.length},z=w.reduce((function(e,t,n){return n>=b?e:e+L(t)}),0)+100*S/_[k].expected_signals*(L(k)/100),T=function(){var e=_[k],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(C(N.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(A(n),E(De(De({},M.current),{},{content:De(De({},M.current.content),{},Pe({},"".concat(r,"_count"),M.current.content["".concat(r,"_count")]+1))})))}else A(n);if("get_content_preliminary_data"===n.action){var o=n.data,a=(o.comment_count,o.media_count,o.post_count,o.term_count,o.users,De(De({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));E(De(De({},M.current),{},{content:De(De({},M.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),b===w.length-1)return p(!0),c(!0),void window.removeEventListener("beforeunload",Me);A(null),C(0),h(Math.min(w.length-1,b+1))}}};return Object(r.useEffect)((function(){f||(A(null),C(0),"fake_step"===k?(console.log("here we go delay before fake_step"),setTimeout((function(){T()}),2e3)):T())}),[k]),Object(r.useEffect)((function(){return window.addEventListener("beforeunload",Me),i({demo:"".concat(o,":").concat(e.builder)}),function(){window.removeEventListener("beforeunload",Me)}}),[]),{isCompleted:f,stepName:k,stepsDescriptors:_,lastMessage:P,progress:z}}(t),c=o.isCompleted,i=o.stepName,l=o.stepsDescriptors,s=o.lastMessage,u=o.progress;return Object(r.createElement)("div",{className:"ct-demo-install",style:n},Object(r.createElement)(A.Transition,{initial:!0,items:c,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return function(t){return Object(r.createElement)("div",{style:t},e?Object(r.createElement)(xe,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},Object(r.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),Object(r.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),Object(r.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),Object(r.createElement)("h2",null,Object(a.__)("Installing","blocksy-companion"),"..."),Object(r.createElement)("p",null,Object(a.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-progress-info"},l[i].title,s&&Se(s,l)?": ".concat(Se(s,l)):"",Object(r.createElement)("span",null,Math.round(u),"%")),Object(r.createElement)("div",{style:{"--progress":"".concat(u,"%")},className:"ct-installer-progress"},Object(r.createElement)("div",null))))}})))};function Te(e){return function(e){if(Array.isArray(e))return Fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Re(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 Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||Re(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 Re(e,t){if(e){if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fe(e,t):void 0}}function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Be=function(e){e.location,e.navigate;var t=Ie(Object(r.useState)(!0),2),n=(t[0],t[1],Object(r.useContext)(Je)),o=n.installerBlockingReleased,c=n.demos_list,i=n.currentDemo,s=n.pluginsStatus,u=n.currentlyInstalledDemo,m=n.setCurrentDemo,f=Object(r.useContext)(R).is_child_theme,p=Ie(Object(r.useState)(u),2),d=p[0],b=p[1],h=Ie(Object(r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),y=h[0],v=h[1],O=Ie(Object(r.useState)(0),2),j=O[0],g=O[1],_=Ie((i||"").split(":"),2),E=_[0],w=(_[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!i)return!1;if("modify_demo"===e){if(!d)return!1;if(-1===d.demo.indexOf(E))return!1}if("child_theme"===e&&f)return!1;var t=c.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(Te(e),Te(t.plugins||[]))}),[]).filter((function(e){return!s[e]})).length)&&("builder"!==e||t.length>1)}))),k=w[j];return Object(r.useEffect)((function(){if(E&&!(i.indexOf(":hide")>-1)){var e=c.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));g(0),b(u),v({builder:1===e.length?e[0].builder:null,child_theme:!0,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[i]),Object(r.createElement)(M,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:l()("ct-demo-modal",{"ct-demo-installer":"installer"===k||"modify_demo"===k}),onDismiss:function(){("installer"!==k||o)&&m("".concat(E,":hide"))},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},Object(r.createElement)("div",{className:"ct-current-step"},Object(r.createElement)(A.Transition,{items:k,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(e){return function(t){return Object(r.createElement)(r.Fragment,null,"modify_demo"===e&&Object(r.createElement)(me,{demoConfiguration:y,nextStep:function(){g(Math.min(j+1,w.length-1))},style:t}),"child_theme"===e&&Object(r.createElement)(be,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"plugins"===e&&Object(r.createElement)(ie,{demoConfiguration:y,style:t,setDemoConfiguration:v}),"builder"===e&&Object(r.createElement)(ge,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"content"===e&&Object(r.createElement)(ke,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"installer"===e&&Object(r.createElement)(ze,{style:t,demoConfiguration:y}))}}))),"installer"!==k&&"modify_demo"!==k&&Object(r.createElement)("div",{className:"ct-demo-step-controls"},j>0&&Object(r.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){g(Math.max(j-1,0))}},Object(a.__)("Back","blocksy-companion")),w.length>2&&Object(r.createElement)("ul",{className:"ct-steps-pills"},w.map((function(e,t){return t===w.length-1?null:Object(r.createElement)("li",{className:l()({active:e===k}),key:e},t+1)}))),Object(r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===k&&0===Le({demoConfiguration:y,pluginsStatus:s,is_child_theme:f}).length,onClick:function(){g(Math.min(j+1,w.length-1))}},"content"===k?Object(a.__)("Install","blocksy-companion"):Object(a.__)("Next","blocksy-companion"))))}})},Ue=n(7),Ve=n.n(Ue);function He(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function qe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return We(e,t)}(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 We(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ze=function(){var e=qe(Object(r.useState)(!1),2),t=e[0],n=e[1],o=qe(Object(r.useState)(!1),2),c=o[0],i=o[1],l=qe(Object(r.useState)(""),2),s=l[0],u=l[1],m=qe(Object(r.useState)(""),2),f=m[0],p=m[1],d=qe(Object(r.useState)("coblocks,elementor,contact-form-7"),2),b=d[0],h=d[1],y=qe(Object(r.useState)(""),2),v=y[0],O=y[1],j=qe(Object(r.useState)(!1),2),g=j[0],_=j[1],E=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,o,c,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("name",s),t.append("is_pro",g),t.append("url",v),t.append("builder",f),t.append("plugins",b),t.append("wp_customize","on"),e.prev=9,e.next=12,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 12:if(200!==(r=e.sent).status){e.next=20;break}return e.next=16,r.json();case 16:o=e.sent,c=o.success,a=o.data,c&&(i=new Blob([JSON.stringify(a.demo)],{type:"text/plain;charset=utf-8"}),Ve.a.saveAs(i,"".concat(s,".json")));case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(9);case 24:n(!1);case 25:case"end":return e.stop()}}),e,null,[[9,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){He(c,r,o,a,i,"next",e)}function i(e){He(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return ct_localizations.is_dev_mode?Object(r.createElement)("div",{className:"ct-export"},Object(r.createElement)("button",{className:"ct-button",onClick:function(e){i(!0)}},Object(a.__)("Site export")),Object(r.createElement)(M,{items:c,className:"ct-site-export-modal",onDismiss:function(){return i(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-site-export"},Object(r.createElement)("label",null,Object(a.__)("Name","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Name","blocksy-companion"),value:s,onChange:function(e){var t=e.target.value;return u(t)}})),Object(r.createElement)("label",null,Object(a.__)("Preview URL","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Preview URL","blocksy-companion"),value:v,onChange:function(e){var t=e.target.value;return O(t)}})),Object(r.createElement)("label",null,Object(a.__)("PRO","blocksy-companion"),Object(r.createElement)("input",{type:"checkbox",value:g,onChange:function(e){e.target.value;return _(!g)}})),Object(r.createElement)("label",null,Object(a.__)("Builder","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Builder","blocksy-companion"),value:f,onChange:function(e){var t=e.target.value;return p(t)}})),Object(r.createElement)("label",null,Object(a.__)("Plugins","blocksy-companion"),Object(r.createElement)("textarea",{placeholder:Object(a.__)("Plugins","blocksy-companion"),value:b,onChange:function(e){var t=e.target.value;return h(t)}})),Object(r.createElement)("button",{className:"ct-button",disabled:t,onClick:function(){return E()}},t?Object(a.__)("Loading...","blocksy-companion"):Object(a.__)("Export site","blocksy-companion")))}})):null};function $e(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function Ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ke(e,t)}(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 Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Je=Object(r.createContext)({demos:[]}),Ye=null,Xe=null,Qe=function(e){e.children,e.path,e.location;var t=Ge(Object(r.useState)(!Ye),2),n=t[0],o=t[1],c=Ge(Object(r.useState)(Ye||[]),2),i=c[0],l=c[1],s=Ge(Object(r.useState)(Xe||{}),2),u=s[0],m=s[1],f=Ge(Object(r.useState)(null),2),p=f[0],d=f[1],b=Ge(Object(r.useState)(null),2),h=b[0],y=b[1],v=Ge(Object(r.useState)(!1),2),O=v[0],j=v[1],g=Ge(Object(r.useState)({builder:""}),2),_=(g[0],g[1],Ge(Object(r.useState)(!1),2)),E=_[0],w=_[1],k=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,c,a,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.length>0&&void 0!==i[0]&&i[0]&&o(!0),(t=new FormData).append("action","blocksy_demo_list"),e.prev=4,e.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=15;break}return e.next=11,n.json();case 11:r=e.sent,c=r.success,a=r.data,c&&(l(a.demos),m(a.active_plugins),y(a.current_installed_demo),j(a.demo_error),Xe=a.active_plugins,Ye=a.demos,a.demo_error);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:o(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){$e(c,r,o,a,i,"next",e)}function i(e){$e(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){k(!Ye)}),[]),Object(r.createElement)("div",{className:"ct-demos-list-container"},O&&Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:O}}),Object(r.createElement)(A.Transition,{items:n,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Starter Sites...","blocksy-companion"))}:0===i.length?function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:Object(a.__)("The connection to our <b>demo.creativethemes.com</b> server didn't worked. This connection is required for importing the starter sites from our demo content server. All you have to do is to contact your hosting provider and ask them to white list our demo server address.","blocksy-companion")}}),Object(r.createElement)(q,null))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Je.Provider,{value:{demo_error:O,demos_list:i.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:p,pluginsStatus:u,installerBlockingReleased:E,setInstallerBlockingReleased:w,setCurrentDemo:d,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:y}},Object(r.createElement)(le,null),Object(r.createElement)(Be,null),Object(r.createElement)(Ze,null)),Object(r.createElement)(q,null)))}})))};function et(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}var tt=function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,c,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_fs_connect_again"),e.prev=2,e.next=5,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 5:if(200!==(n=e.sent).status){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,o=r.success,r.data,o&&((c=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,a=c.querySelector("form"),document.body.appendChild(a),a.submit());case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(2);case 17:case"end":return e.stop()}}),e,null,[[2,15]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){et(c,r,o,a,i,"next",e)}function i(e){et(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)("div",{className:"ct-freemius-optin-message"},Object(r.createElement)("i",null,Object(r.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Object(r.createElement)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),Object(r.createElement)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"}))),Object(r.createElement)("h2",null,Object(a.__)("Stay Updated","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking.","blocksy-companion")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(t){t.preventDefault(),e()}},Object(a.__)("Allow & Continue","blocksy-companion")))};c.a.on("ct:dashboard:routes",(function(e){e.push({Component:function(){return Object(r.createElement)(Q,null)},path:"/extensions"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return Object(r.createElement)(Qe,e)},path:"/demos"})})),c.a.on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:Object(a.__)("Starter Sites","blocksy-companion"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:Object(a.__)("Extensions","blocksy-companion"),path:"/extensions"})})),c.a.on("ct:dashboard:home:before",(function(e){ctDashboardLocalizations.plugin_data.is_anonymous&&(e.content=Object(r.createElement)(tt,null))})),c.a.on("ct:dashboard:heading:after",(function(e){ctDashboardLocalizations.plugin_data.is_pro&&(e.content=Object(r.createElement)("span",null,"PRO"))}))}]);
static/bundle/dashboard.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.25
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.26
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.24
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.26
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
static/bundle/options.js CHANGED
@@ -11,4 +11,4 @@
11
  * Copyright 2013 Bryan Davis and contributors
12
  * Released under the MIT license
13
  * http://www.opensource.org/licenses/MIT
14
- */!function(n,a){"use strict";o=[],void 0===(c="function"==typeof(r=function(){return function(e){var t,n=0,r=[],o=0,c=function(){var t=e.indexOf(":",n),r=e.substring(n,t);return n=t+2,parseInt(r,10)},a=function(){var t=e.indexOf(";",n),r=e.substring(n,t);return n=t+1,parseInt(r,10)},i=function(t='"'){for(var r,o,a=c(),i=0,l=0;l<a;)(r=e.charCodeAt(n+i++))<=127?l++:l+=r>2047?3:2;return e.charAt(n+i)!==t&&(i+=e.indexOf('"',n+i)-n-i),o=e.substring(n,n+i),n+=i+2,o},l=function(){var t=e.charAt(n);return n+=2,t},u=function(){var e=l();switch(e){case"i":return a();case"s":return i();default:throw new Error("Unknown key type '"+e+"' at position "+(n-2))}},s=function(e,t){var r,o,c;if("\0"===e.charAt(0)){if((c=e.indexOf("\0",1))>0)return r=e.substring(1,c),o=e.substr(c+1),"*"===r||t===r?o:r+"::"+o;var a="Expected two <NUL> characters in non-public property name '"+e+"' at position "+(n-e.length-2);throw new Error(a)}return e};return(t=function(){var p,d,f=l();switch(f){case"i":return d=a(),r[o++]=d,d;case"d":return function(){var t=e.indexOf(";",n),c=e.substring(n,t);return n=t+1,c=parseFloat(c),r[o++]=c,c}();case"b":return function(){var t=e.indexOf(";",n),c=e.substring(n,t);return n=t+1,c="1"===c,r[o++]=c,c}();case"s":return function(){var e=i();return r[o++]=e,e}();case"a":return function(){var e,a,i,l,s,p=c(),d=[],f={},b=d,m=o++;r[m]=b;try{for(i=0;i<p;i++)if(e=u(),a=t(),b===d&&e+""==i+"")d.push(a);else{if(b!==f){for(l=0,s=d.length;l<s;l++)f[l]=d[l];b=f,r[m]=b}f[e]=a}}catch(e){throw e.state=b,e}return n++,b}();case"O":return function(){var e,a,l,p,d={},f=o++,b=i();r[f]=d,e=c();try{for(p=0;p<e;p++)a=s(u(),b),l=t(),d[a]=l}catch(e){throw e.state=d,e}return n++,d}();case"C":return{__PHP_Incomplete_Class_Name:i(),serialized:i("}")};case"r":return function(){var e=a(),t=r[e-1];return r[o++]=t,t}();case"R":return p=a(),r[p-1];case"N":return r[o++]=null,null;default:throw new Error("Unknown type '"+f+"' at position "+(n-2))}})()}})?r.apply(t,o):r)||(e.exports=c)}()},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(14);function o(e,t,n,r,c){var a=new Error(n,r,c);return a.name="UseFetchError",a.status=e,a.statusText=t,Object.setPrototypeOf(a,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(a,o),a}o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error),e.exports=function(e,t,n){var c=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!c&&function(e,t,n){return fetch(e,t).then(n&&n.formatter||t&&t.formatter||function(e){if(!e.ok)throw new o(e.status,e.statusText,"Fetch error");return e.json()})},e,t||{},n||{})}},function(e,t,n){var r=n(16);e.exports=function(){var e=function(){e.id=r(),e.subscribers.forEach((function(e){e()}))};return e.id=r(),e.subscribers=[],e.subscribe=function(t){e.subscribers.push(t)},e.unsubscribe=function(t){e.subscribers.indexOf(t)>=0&&e.subscribers.splice(e.subscribers.indexOf(t),1)},e}},function(e,t,n){var r=n(6);e.exports=function(e){var t=r.useState(e.id),n=function(){return t[1](e.id)};return r.useEffect((function(){return e.subscribe(n),function(){return e.unsubscribe(n)}}),[]),t[0]}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),o=n(15);e.exports=function(e){var t=Array.prototype.slice.call(arguments,[1]),n=r.useState({isLoading:!!e});return r.useEffect((function(){e&&(!n[0].isLoading&&n[1]({data:n[0].data,isLoading:!0}),e.apply(null,t).then((function(e){n[1]({data:e,isLoading:!1})})).catch((function(e){n[1]({error:e,isLoading:!1})})))}),o(t)),n[0]}},function(e,t){e.exports=function e(){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(r instanceof Array)for(var o=0;o<r.length;o++)t=t.concat(e(r[o]));else if("undefined"!=typeof URL&&r instanceof URL)t=t.concat(r.toJSON());else if(r instanceof Object)for(var c=Object.keys(r),a=0;a<c.length;a++){var i=c[a];t=t.concat([i]).concat(e(r[i]))}else t=t.concat(r)}return t}},function(e,t,n){for(var r=self.crypto||self.msCrypto,o="-_",c=36;c--;)o+=c.toString(36);for(c=36;c---10;)o+=c.toString(36).toUpperCase();e.exports=function(e){var t="",n=r.getRandomValues(new Uint8Array(e||21));for(c=e||21;c--;)t+=o[63&n[c]];return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a=n(2),i=n(3),l=n.n(i);function u(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||b(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){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||b(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 b(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var y=function(e){return e.filter((function(e,t,n){return n.findIndex((function(t){return t.ID===e.ID}))===t}))},O=[],h=function(e){var t=e.condition,n=e.onChange,o=f(Object(r.useState)(O),2),i=o[0],l=o[1],s=Object(r.useMemo)((function(){return{post_ids:"post",page_ids:"page",custom_post_type_ids:"ct_cpt"}[t.rule]}),[t.rule]),d=Object(r.useMemo)((function(){return(t.payload||{}).post_id||""}),[t.payload&&t.payload.post_id]),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_posts"),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(p(p({post_type:s},e?{search_query:e}:{}),d?{alsoInclude:d}:{})),method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data.posts;l((function(e){return y([].concat(u(e),u(t)))})),O=y([].concat(u(O),u(t)))}))};return Object(r.useEffect)((function(){b()}),[s]),Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,searchPlaceholder:Object(c.__)("Type to search by ID or title...","blocksy-companion"),placeholder:"post_ids"===t.rule?Object(c.__)("Select post","blocksy-companion"):"page_ids"===t.rule?Object(c.__)("Select page","blocksy-companion"):Object(c.__)("Custom Post Type ID","blocksy-companion"),choices:i.filter((function(e){var t=e.post_type;return"ct_cpt"===s?"post"!==t&&"page"!==t:s===t})).map((function(e){return{key:e.ID,value:e.post_title}})),search:!0},value:d,onChange:function(e){return n(e)},onInputValueChange:function(e){i.find((function(t){return t.post_title===e}))||b(e)}})};function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||k(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 j(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||k(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 k(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var x=[],C=[],A=[],N=[],P=function(e){var t=e.value,n=e.onChange,o=blocksy_admin.all_condition_rules.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(w(e),w(n.map((function(e){return g(g({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=j(t,["title","id"]);return[].concat(w(e),[g({key:r,value:n},o)])}),[]),i=v(Object(r.useState)(x),2),u=(i[0],i[1],v(Object(r.useState)(C),2)),s=u[0],p=u[1],d=v(Object(r.useState)(A),2),f=d[0],b=d[1],m=v(Object(r.useState)(N),2),y=m[0],O=m[1],_=function(e){return"post_ids"===e.rule||"page_ids"===e.rule||"custom_post_type_ids"===e.rule||"taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule||"current_language"===e.rule||"user_post_author_id"===e.rule};return Object(r.useEffect)((function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_taxonomies"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data,n=t.taxonomies,r=t.languages,o=t.users;p(n),C=n,b(r),A=r,O(o),N=o}))}),[]),Object(r.createElement)("div",{className:"ct-display-conditions"},t.map((function(e,i){return Object(r.createElement)("div",{className:l()("ct-condition-group",{"ct-cols-3":_(e),"ct-cols-2":!_(e)}),key:i},Object(r.createElement)(a.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return Object(r.createElement)("span",{className:"ct-".concat(e.type)})},placeholder:Object(c.__)("Select variation","blocksy-companion"),choices:{include:Object(c.__)("Include","blocksy-companion"),exclude:Object(c.__)("Exclude","blocksy-companion")}},value:e.type,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{type:r}):t)})))}}),Object(r.createElement)(a.Select,{key:"second",option:{appendToBody:!0,placeholder:Object(c.__)("Select rule","blocksy-companion"),choices:"user"===e.category?o.filter((function(e){return 0===e.key.indexOf("user_")})):o.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:e.rule,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{rule:r}):t)})))}}),("post_ids"===e.rule||"custom_post_type_ids"===e.rule||"page_ids"===e.rule)&&Object(r.createElement)(h,{condition:e,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{post_id:r})}):t)})))}}),("taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule)&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blocksy-companion"),choices:s.map((function(e){return g({key:e.id,value:e.name},e.group?{group:e.group}:{})})),search:!0},value:(e.payload||{}).taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{taxonomy_id:r})}):t)})))}}),"current_language"===e.rule&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select language","blocksy-companion"),choices:f.map((function(e){return{key:e.id,value:e.name}})),search:!0},value:(e.payload||{}).language||"",onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{language:r})}):t)})))}}),"user_post_author_id"===e.rule&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select user","blocksy-companion"),choices:[{key:"current_user",value:Object(c.__)("Current user","blocksy-companion")}].concat(w(y.map((function(e){return{key:e.id,value:e.name}})))),search:!0},value:(e.payload||{}).user_id||"",onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{user_id:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=w(t);r.splice(i,1),n(r)}},"×"))})),Object(r.createElement)("div",{className:"ct-conditions-actions"},Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(w(t),[{type:"include",rule:"everywhere",payload:{}}]))}},Object(c.__)("Add Display Condition","blocksy-companion")),Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(w(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blocksy-companion"))))};function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D(e,t)}(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 D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var I=function(e){var t=e.option,n=t.display,o=void 0===n?"inline":n,i=t.modalTitle,l=void 0===i?Object(c.__)("Transparent Header Display Conditions","blocksy-companion"):i,u=t.modalDescription,s=void 0===u?Object(c.__)("Add one or more conditions to display the transparent header.","blocksy-companion"):u,p=e.value,d=e.onChange,f=T(Object(r.useState)(!1),2),b=f[0],m=f[1],y=T(Object(r.useState)(null),2),O=y[0],h=y[1];return"inline"===o?Object(r.createElement)(P,{value:p,onChange:d}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),m(!0),h(null)}},Object(c.__)("Add/Edit Conditions","blocksy-companion")),Object(r.createElement)(a.Overlay,{items:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){m(!1),h(null)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",null,l),Object(r.createElement)("p",null,s),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(P,{value:O||p,onChange:function(e){h(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!O,onClick:function(){d(O),m(!1)}},Object(c.__)("Save Conditions","blocksy-companion"))))}}))},z=n(7),L=n.n(z),R=n(8),F=n.n(R);function U(e){return function(e){if(Array.isArray(e))return H(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||B(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 M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||B(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 B(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var V=function(){var e=M(Object(r.useState)(null),2),t=e[0],n=e[1],o=M(Object(r.useState)(null),2),i=o[0],u=o[1],s=M(Object(r.useState)(!1),2),p=s[0],d=s[1],f=M(Object(r.useState)(!1),2),b=f[0],m=f[1],y=M(Object(r.useState)(["options"]),2),O=y[0],h=y[1],v=Object(r.useRef)(),j=Object(r.useRef)();return Object(r.useEffect)((function(){var e=function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",d(!0)},t=function(e){e.stopPropagation(),e.preventDefault(),d(!1)},r=function(e){e.stopPropagation(),e.preventDefault(),d(!1);var t=Array.from(e.dataTransfer.files||[]);if(Array.from(e.dataTransfer.items||[]).length>0){var r=e.dataTransfer.items[0].getAsFile();n(r)}else t.length>0&&n(t[0])};return j.current.addEventListener("dragover",e,!1),j.current.addEventListener("dragleave",t,!1),j.current.addEventListener("drop",r,!1),function(){j.current.removeEventListener("dragover",e,!1),j.current.removeEventListener("dragleave",t,!1),j.current.removeEventListener("drop",r,!1)}}),[]),Object(r.createElement)("div",{className:"ct-import-export"},Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Export Options","blocksy-companion")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Easily export the theme customizer settings.","blocksy-companion"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),m(!0)}},Object(c.__)("Export Customizations","blocksy-companion")))),Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Import Options","blocksy-companion")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Easily import the theme customizer settings.","blocksy-companion"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("div",{className:"ct-file-upload"},Object(r.createElement)("button",{type:"button",className:l()("button ct-upload-button",{active:p}),ref:j,onClick:function(){v.current.click()}},t?t.name:Object(c.__)("Click or drop to upload a file...","blocksy-companion")),Object(r.createElement)("input",{ref:v,type:"file",onChange:function(e){var t=M(e.target.files,1)[0];n(t)}}),Object(r.createElement)("button",{className:"button",onClick:function(e){if(e.preventDefault(),t){var n=new FileReader;n.readAsText(t,"UTF-8"),n.onload=function(e){try{fetch("".concat(window.ajaxurl,"?action=blocksy_customizer_import&wp_customize=on&nonce=").concat(ct_customizer_localizations.customizer_reset_none),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(F()(e.target.result))}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}}}},Object(c.__)("Import Customizations","blocksy-companion"))))),ct_customizer_localizations.has_child_theme&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Copy Options","blocksy-companion")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Copy and import your customizations from parent or child theme.","blocksy-companion"))),ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("child")}},Object(c.__)("Copy From Child Theme","blocksy-companion")))),!ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("parent")}},Object(c.__)("Copy From Parent Theme","blocksy-companion"))))),Object(r.createElement)(a.Overlay,{items:i,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"35",height:"35",viewBox:"0 0 66 66"},Object(r.createElement)("path",{d:"M66 33.1c0 2.8-.4 5.5-1.1 8.2 0 0-1.7-.6-1.9-.6 3.4-13.1-2.2-27.4-14.5-34.5C41.3 2 33 .9 25 3.1c-3.5.9-6.7 2.4-9.5 4.4L20 12 6 15 9 1l5 5c3.1-2.2 6.6-3.9 10.5-4.9 2.7-.7 5.4-1.1 8-1.1 5.9-.1 11.7 1.4 17 4.4C60.1 10.5 66 21.7 66 33.1zm-49 6.3l2.4-3c-.3-1.2-.4-2.3-.4-3.4s.1-2.2.4-3.3l-2.4-3 2.5-4.3 3.8.5c1.6-1.6 3.6-2.7 5.8-3.3l1.4-3.6h5l1.4 3.6c2.2.6 4.2 1.8 5.8 3.3l3.8-.5 2.5 4.3-2.4 3c.3 1.1.4 2.2.4 3.3s-.1 2.2-.4 3.3l2.4 3-2.5 4.3-3.8-.5c-1.6 1.6-3.6 2.7-5.8 3.3L35.4 50h-5L29 46.4c-2.2-.6-4.2-1.8-5.8-3.3l-3.8.5-2.4-4.2zm8-6.4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8-8 3.6-8 8zm25.9 25.3c-3 2.1-6.3 3.7-9.9 4.7-8 2.1-16.4 1-23.5-3.1C5.2 52.8-.4 38.5 3 25.4c-.7-.1-1.3-.3-2-.5-.7 2.7-1 5.3-1 8 0 11.4 5.9 22.5 16.5 28.6 7.6 4.4 16.5 5.6 25 3.3 4-1.1 7.6-2.8 10.8-5.2l4.6 4.6 3-14-14 3 5 5.1z"})),Object(r.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Parent Theme","blocksy-companion"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Child Theme","blocksy-companion")),Object(r.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blocksy-companion"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},Object(c.__)("Cancel","blocksy-companion")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_copy_options"),t.append("wp_customize","on"),t.append("strategy",i);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}},Object(c.__)("Yes, I am sure","blocksy-companion"))))}}),Object(r.createElement)(a.Overlay,{items:b,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return m(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Export Settings","blocksy-companion")),Object(r.createElement)("p",null,Object(c.__)("Choose what set of settings you want to export.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-export-options"},["options","widgets"].map((function(e){return Object(r.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===O.length&&O[0]===e||h((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(U(t),[e])}))}},{options:Object(c.__)("Customizer settings","blocksy-companion"),widgets:Object(c.__)("Widgets settings","blocksy-companion")}[e],Object(r.createElement)("span",{className:l()("ct-checkbox",{active:O.includes(e)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),m(!1)},className:"button"},Object(c.__)("Cancel","blocksy-companion")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_export"),t.append("strategy",O.join(":")),t.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){var t=e.success,n=e.data;if(t){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});L()(r,"".concat(n.site_url.replace("http://","").replace("https://","").replace(".","-").replace("/","-"),"-export.dat")),m(!1)}}))}))}catch(e){}}},Object(c.__)("Export","blocksy-companion"))))}}))},$=n(5),G=n.n($),J=n(9),Y=n(10),q=n.n(Y),W=n(11),X=n.n(W),K=n(12),Q=n.n(K);function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e){return function(e){if(Array.isArray(e))return oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||re(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 te(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||re(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 re(e,t){if(e){if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oe(e,t):void 0}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ce=X()(),ae=function(e){e.forcedEdit;var t,n,o=e.headerId,i=ne(Object(r.useState)(!1),2),l=i[0],u=i[1],s=ne(Object(r.useState)(null),2),p=s[0],d=s[1],f=Object(r.useContext)(a.PlacementsDragDropContext),b=(f.builderValueCollection,f.builderValueDispatch,Object(r.useRef)()),m=Q()(ce),y=q()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(t=regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,r=n.success,o=n.data,r&&o.conditions){e.next=7;break}throw new Error;case 7:return e.abrupt("return",o.conditions);case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function a(e){te(c,r,o,a,i,"next",e)}function i(e){te(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[m]}),O=y.data,h=y.isLoading;y.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){h||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blocksy-companion")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),d(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:b},Object(r.createElement)("h2",null,sprintf(Object(c.__)("Display Conditions","blocksy-companion"))),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions in order to display your header.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(a.OptionsPanel,{onChange:function(e,t){d((function(e){return[].concat(ee((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},Z(e,"design","none"),Z(e,"label",!1),e)},value:{conditions:((p||O).find((function(e){return e.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!p,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(p)}).then((function(e){return e.json()})).then((function(){ce(),u(!1)}))}},Object(c.__)("Save Conditions","blocksy-companion"))))}}))};function ie(){return(ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return de(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return de(e,t)}(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 de(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fe=function(){var e=pe(Object(r.useState)(!1),2),t=e[0],n=e[1],i=(ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header,Object(r.useContext)(a.PlacementsDragDropContext)),u=i.builderValueDispatch,s=i.builderValue,p=(i.option,i.builderValueCollection),d=i.panelsActions,f=Object(J.applyFilters)("blocksy.header.available-sections",null,p.sections)||p.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("ul",{className:l()("ct-panels-manager")},f.map((function(e){var t=e.name,o=e.id,i=t||{"type-1":Object(c.__)("Global Header","blocksy")}[o]||o,p="builder_header_panel_".concat(o),f=ct_customizer_localizations.header_builder_data.header_data.header_options,b={label:i,"inner-options":ue(ue({},o.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blocksy-companion"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(ae,{headerId:o})}},divider:{type:"ct-divider"}}:{}),f)};return Object(r.createElement)(a.PanelMetaWrapper,ie({id:p,key:o,option:b},d,{getActualOption:function(e){var t=e.open;return Object(r.createElement)(r.Fragment,null,o===s.id&&Object(r.createElement)(a.Panel,{id:p,getValues:function(){return ue({id:o},s.settings||{})},option:b,onChangeFor:function(e,t){u({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:t,values:Object(a.getValueFromInput)(f,Array.isArray(s.settings)?{}:s.settings||{})}})},view:"simple"}),Object(r.createElement)("li",{className:l()({active:o===s.id,"ct-global":"type-1"===o}),onClick:function(){o===s.id?t():u({type:"PICK_BUILDER_SECTION",payload:{id:o}})}},Object(r.createElement)("span",{className:"ct-panel-name"},i),o.indexOf("ct-custom")>-1&&o!==s.id&&Object(r.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),n(o)}},Object(r.createElement)("i",{className:"ct-tooltip-top"},Object(c.__)("Remove header","blocksy-companion")),Object(r.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})))))}}))}))),Object(r.createElement)(o.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})),Object(r.createElement)(a.Overlay,{items:t,className:"ct-admin-modal ct-reset-options",onDismiss:function(){return n(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Remove Header","blocksy-companion")),Object(r.createElement)("p",null,Object(c.__)("You are about to remove a custom header, are you sure you want to continue?","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),n(!1)},className:"button"},Object(c.__)("Cancel","blocksy-companion")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault(),u({type:"REMOVE_BUILDER_SECTION",payload:{id:t}}),n(!1)}},Object(c.__)("Confirm","blocksy-companion"))))}}))};G.a.on("blocksy:options:before-option",(function(e){if(e.option&&"ct-header-builder"===e.option.type){var t=e.content;e.content=Object(r.createElement)(r.Fragment,null,t,Object(r.createElement)(o.Fill,{name:"PlacementsBuilderPanelsManager"},Object(r.createElement)(fe,null)))}})),G.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=I,e["blocksy-customizer-options-manager"]=V}))}]);
11
  * Copyright 2013 Bryan Davis and contributors
12
  * Released under the MIT license
13
  * http://www.opensource.org/licenses/MIT
14
+ */!function(n,a){"use strict";o=[],void 0===(c="function"==typeof(r=function(){return function(e){var t,n=0,r=[],o=0,c=function(){var t=e.indexOf(":",n),r=e.substring(n,t);return n=t+2,parseInt(r,10)},a=function(){var t=e.indexOf(";",n),r=e.substring(n,t);return n=t+1,parseInt(r,10)},i=function(t='"'){for(var r,o,a=c(),i=0,l=0;l<a;)(r=e.charCodeAt(n+i++))<=127?l++:l+=r>2047?3:2;return e.charAt(n+i)!==t&&(i+=e.indexOf('"',n+i)-n-i),o=e.substring(n,n+i),n+=i+2,o},l=function(){var t=e.charAt(n);return n+=2,t},u=function(){var e=l();switch(e){case"i":return a();case"s":return i();default:throw new Error("Unknown key type '"+e+"' at position "+(n-2))}},s=function(e,t){var r,o,c;if("\0"===e.charAt(0)){if((c=e.indexOf("\0",1))>0)return r=e.substring(1,c),o=e.substr(c+1),"*"===r||t===r?o:r+"::"+o;var a="Expected two <NUL> characters in non-public property name '"+e+"' at position "+(n-e.length-2);throw new Error(a)}return e};return(t=function(){var p,d,f=l();switch(f){case"i":return d=a(),r[o++]=d,d;case"d":return function(){var t=e.indexOf(";",n),c=e.substring(n,t);return n=t+1,c=parseFloat(c),r[o++]=c,c}();case"b":return function(){var t=e.indexOf(";",n),c=e.substring(n,t);return n=t+1,c="1"===c,r[o++]=c,c}();case"s":return function(){var e=i();return r[o++]=e,e}();case"a":return function(){var e,a,i,l,s,p=c(),d=[],f={},b=d,m=o++;r[m]=b;try{for(i=0;i<p;i++)if(e=u(),a=t(),b===d&&e+""==i+"")d.push(a);else{if(b!==f){for(l=0,s=d.length;l<s;l++)f[l]=d[l];b=f,r[m]=b}f[e]=a}}catch(e){throw e.state=b,e}return n++,b}();case"O":return function(){var e,a,l,p,d={},f=o++,b=i();r[f]=d,e=c();try{for(p=0;p<e;p++)a=s(u(),b),l=t(),d[a]=l}catch(e){throw e.state=d,e}return n++,d}();case"C":return{__PHP_Incomplete_Class_Name:i(),serialized:i("}")};case"r":return function(){var e=a(),t=r[e-1];return r[o++]=t,t}();case"R":return p=a(),r[p-1];case"N":return r[o++]=null,null;default:throw new Error("Unknown type '"+f+"' at position "+(n-2))}})()}})?r.apply(t,o):r)||(e.exports=c)}()},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(14);function o(e,t,n,r,c){var a=new Error(n,r,c);return a.name="UseFetchError",a.status=e,a.statusText=t,Object.setPrototypeOf(a,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(a,o),a}o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error),e.exports=function(e,t,n){var c=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!c&&function(e,t,n){return fetch(e,t).then(n&&n.formatter||t&&t.formatter||function(e){if(!e.ok)throw new o(e.status,e.statusText,"Fetch error");return e.json()})},e,t||{},n||{})}},function(e,t,n){var r=n(16);e.exports=function(){var e=function(){e.id=r(),e.subscribers.forEach((function(e){e()}))};return e.id=r(),e.subscribers=[],e.subscribe=function(t){e.subscribers.push(t)},e.unsubscribe=function(t){e.subscribers.indexOf(t)>=0&&e.subscribers.splice(e.subscribers.indexOf(t),1)},e}},function(e,t,n){var r=n(6);e.exports=function(e){var t=r.useState(e.id),n=function(){return t[1](e.id)};return r.useEffect((function(){return e.subscribe(n),function(){return e.unsubscribe(n)}}),[]),t[0]}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),o=n(15);e.exports=function(e){var t=Array.prototype.slice.call(arguments,[1]),n=r.useState({isLoading:!!e});return r.useEffect((function(){e&&(!n[0].isLoading&&n[1]({data:n[0].data,isLoading:!0}),e.apply(null,t).then((function(e){n[1]({data:e,isLoading:!1})})).catch((function(e){n[1]({error:e,isLoading:!1})})))}),o(t)),n[0]}},function(e,t){e.exports=function e(){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(r instanceof Array)for(var o=0;o<r.length;o++)t=t.concat(e(r[o]));else if("undefined"!=typeof URL&&r instanceof URL)t=t.concat(r.toJSON());else if(r instanceof Object)for(var c=Object.keys(r),a=0;a<c.length;a++){var i=c[a];t=t.concat([i]).concat(e(r[i]))}else t=t.concat(r)}return t}},function(e,t,n){for(var r=self.crypto||self.msCrypto,o="-_",c=36;c--;)o+=c.toString(36);for(c=36;c---10;)o+=c.toString(36).toUpperCase();e.exports=function(e){var t="",n=r.getRandomValues(new Uint8Array(e||21));for(c=e||21;c--;)t+=o[63&n[c]];return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a=n(2),i=n(3),l=n.n(i);function u(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||b(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){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||b(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 b(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var y=function(e){return e.filter((function(e,t,n){return n.findIndex((function(t){return t.ID===e.ID}))===t}))},O=[],h=function(e){var t=e.condition,n=e.onChange,o=f(Object(r.useState)(O),2),i=o[0],l=o[1],s=Object(r.useMemo)((function(){return{post_ids:"post",page_ids:"page",custom_post_type_ids:"ct_cpt"}[t.rule]}),[t.rule]),d=Object(r.useMemo)((function(){return(t.payload||{}).post_id||""}),[t.payload&&t.payload.post_id]),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_posts"),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(p(p({post_type:s},e?{search_query:e}:{}),d?{alsoInclude:d}:{})),method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data.posts;l((function(e){return y([].concat(u(e),u(t)))})),O=y([].concat(u(O),u(t)))}))};return Object(r.useEffect)((function(){b()}),[s]),Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,searchPlaceholder:Object(c.__)("Type to search by ID or title...","blocksy-companion"),placeholder:"post_ids"===t.rule?Object(c.__)("Select post","blocksy-companion"):"page_ids"===t.rule?Object(c.__)("Select page","blocksy-companion"):Object(c.__)("Custom Post Type ID","blocksy-companion"),choices:i.filter((function(e){var t=e.post_type;return"ct_cpt"===s?"post"!==t&&"page"!==t:s===t})).map((function(e){return{key:e.ID,value:e.post_title}})),search:!0},value:d,onChange:function(e){return n(e)},onInputValueChange:function(e){i.find((function(t){return t.post_title===e}))||b(e)}})};function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||k(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 j(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||k(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 k(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var x=[],C=[],A=[],N=function(e){var t=e.value,n=e.onChange,o=e.filter,i=void 0===o?"all":o,u=blocksy_admin.all_condition_rules;"singular"===i&&(u=blocksy_admin.singular_condition_rules),"archive"===i&&(u=blocksy_admin.archive_condition_rules);var s=u.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(w(e),w(n.map((function(e){return g(g({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=j(t,["title","id"]);return[].concat(w(e),[g({key:r,value:n},o)])}),[]),p=v(Object(r.useState)(x),2),d=p[0],f=p[1],b=v(Object(r.useState)(C),2),m=b[0],y=b[1],O=v(Object(r.useState)(A),2),_=O[0],E=O[1],k=function(e){return"post_ids"===e.rule||"page_ids"===e.rule||"custom_post_type_ids"===e.rule||"taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule||"current_language"===e.rule||"user_post_author_id"===e.rule};return Object(r.useEffect)((function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_taxonomies"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data,n=t.taxonomies,r=t.languages,o=t.users;f(n),x=n,y(r),C=r,E(o),A=o}))}),[]),Object(r.createElement)("div",{className:"ct-display-conditions"},t.map((function(e,o){return Object(r.createElement)("div",{className:l()("ct-condition-group",{"ct-cols-3":k(e),"ct-cols-2":!k(e)}),key:o},Object(r.createElement)(a.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return Object(r.createElement)("span",{className:"ct-".concat(e.type)})},placeholder:Object(c.__)("Select variation","blocksy-companion"),choices:{include:Object(c.__)("Include","blocksy-companion"),exclude:Object(c.__)("Exclude","blocksy-companion")}},value:e.type,onChange:function(r){n(t.map((function(t,n){return g({},n===o?g(g({},e),{},{type:r}):t)})))}}),Object(r.createElement)(a.Select,{key:"second",option:{appendToBody:!0,placeholder:Object(c.__)("Select rule","blocksy-companion"),choices:"user"===e.category?s.filter((function(e){return 0===e.key.indexOf("user_")})):s.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:e.rule,onChange:function(r){n(t.map((function(t,n){return g({},n===o?g(g({},e),{},{rule:r}):t)})))}}),("post_ids"===e.rule||"custom_post_type_ids"===e.rule||"page_ids"===e.rule)&&Object(r.createElement)(h,{condition:e,onChange:function(r){n(t.map((function(t,n){return g({},n===o?g(g({},e),{},{payload:g(g({},e.payload),{},{post_id:r})}):t)})))}}),("taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule)&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blocksy-companion"),choices:d.map((function(e){return g({key:e.id,value:e.name},e.group?{group:e.group}:{})})),search:!0},value:(e.payload||{}).taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return g({},n===o?g(g({},e),{},{payload:g(g({},e.payload),{},{taxonomy_id:r})}):t)})))}}),"current_language"===e.rule&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select language","blocksy-companion"),choices:m.map((function(e){return{key:e.id,value:e.name}})),search:!0},value:(e.payload||{}).language||"",onChange:function(r){n(t.map((function(t,n){return g({},n===o?g(g({},e),{},{payload:g(g({},e.payload),{},{language:r})}):t)})))}}),"user_post_author_id"===e.rule&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select user","blocksy-companion"),choices:[{key:"current_user",value:Object(c.__)("Current user","blocksy-companion")}].concat(w(_.map((function(e){return{key:e.id,value:e.name}})))),search:!0},value:(e.payload||{}).user_id||"",onChange:function(r){n(t.map((function(t,n){return g({},n===o?g(g({},e),{},{payload:g(g({},e.payload),{},{user_id:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=w(t);r.splice(o,1),n(r)}},"×"))})),Object(r.createElement)("div",{className:"ct-conditions-actions"},Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(w(t),[{type:"include",rule:u[0].rules[0].id,payload:{}}]))}},Object(c.__)("Add Display Condition","blocksy-companion")),Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(w(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blocksy-companion"))))};function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T(e,t)}(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 T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var D=function(e){var t=e.option,n=t.display,o=void 0===n?"inline":n,i=t.filter,l=void 0===i?"all":i,u=t.modalTitle,s=void 0===u?Object(c.__)("Transparent Header Display Conditions","blocksy-companion"):u,p=t.modalDescription,d=void 0===p?Object(c.__)("Add one or more conditions to display the transparent header.","blocksy-companion"):p,f=e.value,b=e.onChange,m=P(Object(r.useState)(!1),2),y=m[0],O=m[1],h=P(Object(r.useState)(null),2),v=h[0],j=h[1];return"inline"===o?Object(r.createElement)(N,{filter:l,value:f,onChange:b}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),O(!0),j(null)}},Object(c.__)("Add/Edit Conditions","blocksy-companion")),Object(r.createElement)(a.Overlay,{items:y,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){O(!1),j(null)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",null,s),Object(r.createElement)("p",null,d),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(N,{filter:l,value:v||f,onChange:function(e){j(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!v,onClick:function(){b(v),O(!1)}},Object(c.__)("Save Conditions","blocksy-companion"))))}}))},I=n(7),z=n.n(I),L=n(8),R=n.n(L);function F(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||M(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 U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||M(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 M(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var H=function(){var e=U(Object(r.useState)(null),2),t=e[0],n=e[1],o=U(Object(r.useState)(null),2),i=o[0],u=o[1],s=U(Object(r.useState)(!1),2),p=s[0],d=s[1],f=U(Object(r.useState)(!1),2),b=f[0],m=f[1],y=U(Object(r.useState)(["options"]),2),O=y[0],h=y[1],v=Object(r.useRef)(),j=Object(r.useRef)();return Object(r.useEffect)((function(){var e=function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",d(!0)},t=function(e){e.stopPropagation(),e.preventDefault(),d(!1)},r=function(e){e.stopPropagation(),e.preventDefault(),d(!1);var t=Array.from(e.dataTransfer.files||[]);if(Array.from(e.dataTransfer.items||[]).length>0){var r=e.dataTransfer.items[0].getAsFile();n(r)}else t.length>0&&n(t[0])};return j.current.addEventListener("dragover",e,!1),j.current.addEventListener("dragleave",t,!1),j.current.addEventListener("drop",r,!1),function(){j.current.removeEventListener("dragover",e,!1),j.current.removeEventListener("dragleave",t,!1),j.current.removeEventListener("drop",r,!1)}}),[]),Object(r.createElement)("div",{className:"ct-import-export"},Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Export Options","blocksy-companion")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Easily export the theme customizer settings.","blocksy-companion"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),m(!0)}},Object(c.__)("Export Customizations","blocksy-companion")))),Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Import Options","blocksy-companion")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Easily import the theme customizer settings.","blocksy-companion"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("div",{className:"ct-file-upload"},Object(r.createElement)("button",{type:"button",className:l()("button ct-upload-button",{active:p}),ref:j,onClick:function(){v.current.click()}},t?t.name:Object(c.__)("Click or drop to upload a file...","blocksy-companion")),Object(r.createElement)("input",{ref:v,type:"file",onChange:function(e){var t=U(e.target.files,1)[0];n(t)}}),Object(r.createElement)("button",{className:"button",onClick:function(e){if(e.preventDefault(),t){var n=new FileReader;n.readAsText(t,"UTF-8"),n.onload=function(e){try{fetch("".concat(window.ajaxurl,"?action=blocksy_customizer_import&wp_customize=on&nonce=").concat(ct_customizer_localizations.customizer_reset_none),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(R()(e.target.result))}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}}}},Object(c.__)("Import Customizations","blocksy-companion"))))),ct_customizer_localizations.has_child_theme&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Copy Options","blocksy-companion")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Copy and import your customizations from parent or child theme.","blocksy-companion"))),ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("child")}},Object(c.__)("Copy From Child Theme","blocksy-companion")))),!ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("parent")}},Object(c.__)("Copy From Parent Theme","blocksy-companion"))))),Object(r.createElement)(a.Overlay,{items:i,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"35",height:"35",viewBox:"0 0 66 66"},Object(r.createElement)("path",{d:"M66 33.1c0 2.8-.4 5.5-1.1 8.2 0 0-1.7-.6-1.9-.6 3.4-13.1-2.2-27.4-14.5-34.5C41.3 2 33 .9 25 3.1c-3.5.9-6.7 2.4-9.5 4.4L20 12 6 15 9 1l5 5c3.1-2.2 6.6-3.9 10.5-4.9 2.7-.7 5.4-1.1 8-1.1 5.9-.1 11.7 1.4 17 4.4C60.1 10.5 66 21.7 66 33.1zm-49 6.3l2.4-3c-.3-1.2-.4-2.3-.4-3.4s.1-2.2.4-3.3l-2.4-3 2.5-4.3 3.8.5c1.6-1.6 3.6-2.7 5.8-3.3l1.4-3.6h5l1.4 3.6c2.2.6 4.2 1.8 5.8 3.3l3.8-.5 2.5 4.3-2.4 3c.3 1.1.4 2.2.4 3.3s-.1 2.2-.4 3.3l2.4 3-2.5 4.3-3.8-.5c-1.6 1.6-3.6 2.7-5.8 3.3L35.4 50h-5L29 46.4c-2.2-.6-4.2-1.8-5.8-3.3l-3.8.5-2.4-4.2zm8-6.4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8-8 3.6-8 8zm25.9 25.3c-3 2.1-6.3 3.7-9.9 4.7-8 2.1-16.4 1-23.5-3.1C5.2 52.8-.4 38.5 3 25.4c-.7-.1-1.3-.3-2-.5-.7 2.7-1 5.3-1 8 0 11.4 5.9 22.5 16.5 28.6 7.6 4.4 16.5 5.6 25 3.3 4-1.1 7.6-2.8 10.8-5.2l4.6 4.6 3-14-14 3 5 5.1z"})),Object(r.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Parent Theme","blocksy-companion"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Child Theme","blocksy-companion")),Object(r.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blocksy-companion"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},Object(c.__)("Cancel","blocksy-companion")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_copy_options"),t.append("wp_customize","on"),t.append("strategy",i);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}},Object(c.__)("Yes, I am sure","blocksy-companion"))))}}),Object(r.createElement)(a.Overlay,{items:b,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return m(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Export Settings","blocksy-companion")),Object(r.createElement)("p",null,Object(c.__)("Choose what set of settings you want to export.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-export-options"},["options","widgets"].map((function(e){return Object(r.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===O.length&&O[0]===e||h((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(F(t),[e])}))}},{options:Object(c.__)("Customizer settings","blocksy-companion"),widgets:Object(c.__)("Widgets settings","blocksy-companion")}[e],Object(r.createElement)("span",{className:l()("ct-checkbox",{active:O.includes(e)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),m(!1)},className:"button"},Object(c.__)("Cancel","blocksy-companion")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_export"),t.append("strategy",O.join(":")),t.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){var t=e.success,n=e.data;if(t){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});z()(r,"".concat(n.site_url.replace("http://","").replace("https://","").replace(".","-").replace("/","-"),"-export.dat")),m(!1)}}))}))}catch(e){}}},Object(c.__)("Export","blocksy-companion"))))}}))},V=n(5),$=n.n(V),G=n(9),J=n(10),Y=n.n(J),q=n(11),W=n.n(q),X=n(12),K=n.n(X);function Q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){return function(e){if(Array.isArray(e))return re(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ne(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 ee(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function te(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||ne(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 ne(e,t){if(e){if("string"==typeof e)return re(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?re(e,t):void 0}}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var oe=W()(),ce=function(e){e.forcedEdit;var t,n,o=e.headerId,i=te(Object(r.useState)(!1),2),l=i[0],u=i[1],s=te(Object(r.useState)(null),2),p=s[0],d=s[1],f=Object(r.useContext)(a.PlacementsDragDropContext),b=(f.builderValueCollection,f.builderValueDispatch,Object(r.useRef)()),m=K()(oe),y=Y()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(t=regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,r=n.success,o=n.data,r&&o.conditions){e.next=7;break}throw new Error;case 7:return e.abrupt("return",o.conditions);case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function a(e){ee(c,r,o,a,i,"next",e)}function i(e){ee(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[m]}),O=y.data,h=y.isLoading;y.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){h||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blocksy-companion")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),d(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:b},Object(r.createElement)("h2",null,sprintf(Object(c.__)("Display Conditions","blocksy-companion"))),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions in order to display your header.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(a.OptionsPanel,{onChange:function(e,t){d((function(e){return[].concat(Z((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},Q(e,"design","none"),Q(e,"label",!1),e)},value:{conditions:((p||O).find((function(e){return e.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!p,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(p)}).then((function(e){return e.json()})).then((function(){oe(),u(!1)}))}},Object(c.__)("Save Conditions","blocksy-companion"))))}}))};function ae(){return(ae=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pe(e,t)}(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 pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var de=function(){var e=se(Object(r.useState)(!1),2),t=e[0],n=e[1],i=(ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header,Object(r.useContext)(a.PlacementsDragDropContext)),u=i.builderValueDispatch,s=i.builderValue,p=(i.option,i.builderValueCollection),d=i.panelsActions,f=Object(G.applyFilters)("blocksy.header.available-sections",null,p.sections)||p.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("ul",{className:l()("ct-panels-manager")},f.map((function(e){var t=e.name,o=e.id,i=t||{"type-1":Object(c.__)("Global Header","blocksy")}[o]||o,p="builder_header_panel_".concat(o),f=ct_customizer_localizations.header_builder_data.header_data.header_options,b={label:i,"inner-options":le(le({},o.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blocksy-companion"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(ce,{headerId:o})}},divider:{type:"ct-divider"}}:{}),f)};return Object(r.createElement)(a.PanelMetaWrapper,ae({id:p,key:o,option:b},d,{getActualOption:function(e){var t=e.open;return Object(r.createElement)(r.Fragment,null,o===s.id&&Object(r.createElement)(a.Panel,{id:p,getValues:function(){return le({id:o},s.settings||{})},option:b,onChangeFor:function(e,t){u({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:t,values:Object(a.getValueFromInput)(f,Array.isArray(s.settings)?{}:s.settings||{})}})},view:"simple"}),Object(r.createElement)("li",{className:l()({active:o===s.id,"ct-global":"type-1"===o}),onClick:function(){o===s.id?t():u({type:"PICK_BUILDER_SECTION",payload:{id:o}})}},Object(r.createElement)("span",{className:"ct-panel-name"},i),o.indexOf("ct-custom")>-1&&o!==s.id&&Object(r.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),n(o)}},Object(r.createElement)("i",{className:"ct-tooltip-top"},Object(c.__)("Remove header","blocksy-companion")),Object(r.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})))))}}))}))),Object(r.createElement)(o.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})),Object(r.createElement)(a.Overlay,{items:t,className:"ct-admin-modal ct-reset-options",onDismiss:function(){return n(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Remove Header","blocksy-companion")),Object(r.createElement)("p",null,Object(c.__)("You are about to remove a custom header, are you sure you want to continue?","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),n(!1)},className:"button"},Object(c.__)("Cancel","blocksy-companion")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault(),u({type:"REMOVE_BUILDER_SECTION",payload:{id:t}}),n(!1)}},Object(c.__)("Confirm","blocksy-companion"))))}}))};$.a.on("blocksy:options:before-option",(function(e){if(e.option&&"ct-header-builder"===e.option.type){var t=e.content;e.content=Object(r.createElement)(r.Fragment,null,t,Object(r.createElement)(o.Fill,{name:"PlacementsBuilderPanelsManager"},Object(r.createElement)(de,null)))}})),$.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=D,e["blocksy-customizer-options-manager"]=H}))}]);
static/bundle/options.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.25
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.26
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
static/js/header/EditConditions.js CHANGED
@@ -93,7 +93,11 @@ const EditConditions = ({ forcedEdit = false, headerId }) => {
93
  }}
94
  render={() => (
95
  <div className="ct-modal-content" ref={containerRef}>
96
- <h2>{sprintf(__('Display Conditions', 'blocksy-companion'))}</h2>
 
 
 
 
97
  <p>
98
  {__(
99
  'Add one or more conditions in order to display your header.',
93
  }}
94
  render={() => (
95
  <div className="ct-modal-content" ref={containerRef}>
96
+ <h2>
97
+ {sprintf(
98
+ __('Display Conditions', 'blocksy-companion')
99
+ )}
100
+ </h2>
101
  <p>
102
  {__(
103
  'Add one or more conditions in order to display your header.',
static/js/options/ConditionsManager.js CHANGED
@@ -5,13 +5,22 @@ import { Select } from 'blocksy-options'
5
 
6
  import PostIdPicker from './ConditionsManager/PostIdPicker'
7
 
8
- let allPostsCache = []
9
  let allTaxonomiesCache = []
10
  let allLanguagesCache = []
11
  let allUsersCache = []
12
 
13
- const ConditionsManager = ({ value, onChange }) => {
14
- const allRules = blocksy_admin.all_condition_rules
 
 
 
 
 
 
 
 
 
 
15
  .reduce(
16
  (current, { rules, title }) => [
17
  ...current,
@@ -34,7 +43,6 @@ const ConditionsManager = ({ value, onChange }) => {
34
  []
35
  )
36
 
37
- const [allPosts, setAllPosts] = useState(allPostsCache)
38
  const [allTaxonomies, setAllTaxonomies] = useState(allTaxonomiesCache)
39
  const [allLanguages, setAllLanguages] = useState(allLanguagesCache)
40
  const [allUsers, setAllUsers] = useState(allUsersCache)
@@ -88,7 +96,10 @@ const ConditionsManager = ({ value, onChange }) => {
88
  selectInputStart: () => (
89
  <span className={`ct-${condition.type}`} />
90
  ),
91
- placeholder: __('Select variation', 'blocksy-companion'),
 
 
 
92
  choices: {
93
  include: __('Include', 'blocksy-companion'),
94
  exclude: __('Exclude', 'blocksy-companion'),
@@ -170,7 +181,10 @@ const ConditionsManager = ({ value, onChange }) => {
170
  option={{
171
  appendToBody: true,
172
  defaultToFirstItem: false,
173
- placeholder: __('Select taxonomy', 'blocksy-companion'),
 
 
 
174
  choices: allTaxonomies.map((taxonomy) => ({
175
  key: taxonomy.id,
176
  value: taxonomy.name,
@@ -204,7 +218,10 @@ const ConditionsManager = ({ value, onChange }) => {
204
  option={{
205
  appendToBody: true,
206
  defaultToFirstItem: false,
207
- placeholder: __('Select language', 'blocksy-companion'),
 
 
 
208
  choices: allLanguages.map((language) => ({
209
  key: language.id,
210
  value: language.name,
@@ -235,11 +252,17 @@ const ConditionsManager = ({ value, onChange }) => {
235
  option={{
236
  appendToBody: true,
237
  defaultToFirstItem: false,
238
- placeholder: __('Select user', 'blocksy-companion'),
 
 
 
239
  choices: [
240
  {
241
  key: 'current_user',
242
- value: __('Current user', 'blocksy-companion'),
 
 
 
243
  },
244
 
245
  ...allUsers.map((user) => ({
@@ -294,7 +317,7 @@ const ConditionsManager = ({ value, onChange }) => {
294
  ...value,
295
  {
296
  type: 'include',
297
- rule: 'everywhere',
298
  payload: {},
299
  },
300
  ])
5
 
6
  import PostIdPicker from './ConditionsManager/PostIdPicker'
7
 
 
8
  let allTaxonomiesCache = []
9
  let allLanguagesCache = []
10
  let allUsersCache = []
11
 
12
+ const ConditionsManager = ({ value, onChange, filter = 'all' }) => {
13
+ let rulesToUse = blocksy_admin.all_condition_rules
14
+
15
+ if (filter === 'singular') {
16
+ rulesToUse = blocksy_admin.singular_condition_rules
17
+ }
18
+
19
+ if (filter === 'archive') {
20
+ rulesToUse = blocksy_admin.archive_condition_rules
21
+ }
22
+
23
+ const allRules = rulesToUse
24
  .reduce(
25
  (current, { rules, title }) => [
26
  ...current,
43
  []
44
  )
45
 
 
46
  const [allTaxonomies, setAllTaxonomies] = useState(allTaxonomiesCache)
47
  const [allLanguages, setAllLanguages] = useState(allLanguagesCache)
48
  const [allUsers, setAllUsers] = useState(allUsersCache)
96
  selectInputStart: () => (
97
  <span className={`ct-${condition.type}`} />
98
  ),
99
+ placeholder: __(
100
+ 'Select variation',
101
+ 'blocksy-companion'
102
+ ),
103
  choices: {
104
  include: __('Include', 'blocksy-companion'),
105
  exclude: __('Exclude', 'blocksy-companion'),
181
  option={{
182
  appendToBody: true,
183
  defaultToFirstItem: false,
184
+ placeholder: __(
185
+ 'Select taxonomy',
186
+ 'blocksy-companion'
187
+ ),
188
  choices: allTaxonomies.map((taxonomy) => ({
189
  key: taxonomy.id,
190
  value: taxonomy.name,
218
  option={{
219
  appendToBody: true,
220
  defaultToFirstItem: false,
221
+ placeholder: __(
222
+ 'Select language',
223
+ 'blocksy-companion'
224
+ ),
225
  choices: allLanguages.map((language) => ({
226
  key: language.id,
227
  value: language.name,
252
  option={{
253
  appendToBody: true,
254
  defaultToFirstItem: false,
255
+ placeholder: __(
256
+ 'Select user',
257
+ 'blocksy-companion'
258
+ ),
259
  choices: [
260
  {
261
  key: 'current_user',
262
+ value: __(
263
+ 'Current user',
264
+ 'blocksy-companion'
265
+ ),
266
  },
267
 
268
  ...allUsers.map((user) => ({
317
  ...value,
318
  {
319
  type: 'include',
320
+ rule: rulesToUse[0].rules[0].id,
321
  payload: {},
322
  },
323
  ])
static/js/options/DisplayCondition.js CHANGED
@@ -15,7 +15,12 @@ const DisplayCondition = ({
15
  // inline | modal
16
  display = 'inline',
17
 
18
- modalTitle = __('Transparent Header Display Conditions', 'blocksy-companion'),
 
 
 
 
 
19
  modalDescription = __(
20
  'Add one or more conditions to display the transparent header.',
21
  'blocksy-companion'
@@ -28,7 +33,13 @@ const DisplayCondition = ({
28
  const [localValue, setLocalValue] = useState(null)
29
 
30
  if (display === 'inline') {
31
- return <ConditionsManager value={value} onChange={onChange} />
 
 
 
 
 
 
32
  }
33
 
34
  return (
@@ -58,6 +69,7 @@ const DisplayCondition = ({
58
 
59
  <div className="ct-modal-scroll">
60
  <ConditionsManager
 
61
  value={localValue || value}
62
  onChange={(value) => {
63
  setLocalValue(value)
15
  // inline | modal
16
  display = 'inline',
17
 
18
+ filter = 'all',
19
+
20
+ modalTitle = __(
21
+ 'Transparent Header Display Conditions',
22
+ 'blocksy-companion'
23
+ ),
24
  modalDescription = __(
25
  'Add one or more conditions to display the transparent header.',
26
  'blocksy-companion'
33
  const [localValue, setLocalValue] = useState(null)
34
 
35
  if (display === 'inline') {
36
+ return (
37
+ <ConditionsManager
38
+ filter={filter}
39
+ value={value}
40
+ onChange={onChange}
41
+ />
42
+ )
43
  }
44
 
45
  return (
69
 
70
  <div className="ct-modal-scroll">
71
  <ConditionsManager
72
+ filter={filter}
73
  value={localValue || value}
74
  onChange={(value) => {
75
  setLocalValue(value)
static/js/screens/DemoInstall/Wizzard/Plugins.js CHANGED
@@ -24,13 +24,11 @@ export const getNameForPlugin = (plugin) =>
24
  'wpforms-lite': 'WPForms - Contact Form',
25
  'simply-gallery-block': 'SimpLy Gallery Block & Lightbox',
26
  'recipe-card-blocks-by-wpzoom': 'Recipe Card Blocks by WPZOOM',
27
- 'stackable-ultimate-gutenberg-blocks':
28
- 'Stackable – Gutenberg Blocks',
29
-
30
  'map-block-gutenberg': 'Map Block for Google Maps',
31
-
32
  'mb-custom-post-type': 'MB Custom Post Types & Custom Taxonomies',
33
  'leadin': 'HubSpot',
 
34
  }[plugin] || plugin
35
  ).replace(/\b\w/, (v) => v.toUpperCase()))
36