!function(){var e={184:function(e,t){var n;
/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var a=o.apply(null,n);a&&e.push(a)}else if("object"===i)for(var c in n)r.call(n,c)&&n[c]&&e.push(c)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},172:function(e,t,n){var r,o,i=n(760),a=n(529),c=(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 u(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;w(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return d(),p},deactivate:f,pause:function(){if(l.paused||!l.active)return;l.paused=!0,v()},unpause:function(){if(!l.paused||!l.active)return;l.paused=!1,w(),d()}};return p;function f(e){if(l.active){clearTimeout(r),v(),l.active=!1,l.paused=!1,c.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)&&u((function(){var e;E((e=l.nodeFocusedBeforeActivation,y("setReturnFocus")||e))})),p}}function d(){if(l.active)return c.activateTrap(p),r=u((function(){E(b())})),n.addEventListener("focusin",m,!0),n.addEventListener("mousedown",h,{capture:!0,passive:!1}),n.addEventListener("touchstart",h,{capture:!0,passive:!1}),n.addEventListener("click",O,{capture:!0,passive:!1}),n.addEventListener("keydown",g,{capture:!0,passive:!1}),p}function v(){if(l.active)return n.removeEventListener("focusin",m,!0),n.removeEventListener("mousedown",h,!0),n.removeEventListener("touchstart",h,!0),n.removeEventListener("click",O,!0),n.removeEventListener("keydown",g,!0),p}function y(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 b(){var e;if(!(e=null!==y("initialFocus")?y("initialFocus"):o.contains(n.activeElement)?n.activeElement:l.firstTabbableNode||y("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function h(e){o.contains(e.target)||(s.clickOutsideDeactivates?f({returnFocus:!i.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function m(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),E(l.mostRecentlyFocusedNode||b()))}function g(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(w(),e.shiftKey&&e.target===l.firstTabbableNode)return e.preventDefault(),void E(l.lastTabbableNode);if(!e.shiftKey&&e.target===l.lastTabbableNode)e.preventDefault(),E(l.firstTabbableNode)}(e)}function O(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function w(){var e=i(o);l.firstTabbableNode=e[0]||b(),l.lastTabbableNode=e[e.length-1]||b()}function E(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()):E(b()))}}},703:function(e,t,n){"use strict";var r=n(414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=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 c.name="Invariant Violation",c}}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}},697:function(e,t,n){e.exports=n(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},760:function(e){var t=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],n=t.join(","),r="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var o,a,c,l=[],p=[],f=e.querySelectorAll(n);for(t.includeContainer&&r.call(e,n)&&(f=Array.prototype.slice.apply(f)).unshift(e),o=0;o<f.length;o++)i(a=f[o])&&(0===(c=u(a))?l.push(a):p.push({documentOrder:o,tabIndex:c,node:a}));return p.sort(s).map((function(e){return e.node})).concat(l)}function i(e){return!(!a(e)||function(e){return function(e){return l(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'),n=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(t);return!n||n===e}(e)}(e)||u(e)<0)}function a(e){return!(e.disabled||function(e){return l(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,n)&&i(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==r.call(e,c)&&a(e)};var c=t.concat("iframe").join(",");function u(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function s(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function l(e){return"INPUT"===e.tagName}e.exports=o},529:function(e){e.exports=function(){for(var e={},n=0;n<arguments.length;n++){var r=arguments[n];for(var o in r)t.call(r,o)&&(e[o]=r[o])}return e};var t=Object.prototype.hasOwnProperty}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.wp.element,t=window.wp.hooks,r=(window.ctEvents,window.blocksyOptions),o=n(184),i=n.n(o),a=window.wp.i18n,c=window.React,u=n.n(c);n(697);function s(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 l=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"])},p=function(e){function t(){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=s(this,e.call.apply(e,[this].concat(i))),f.call(r),s(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:l(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:l(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:l(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:l(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:l(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().Component);p.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var f=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)}},d=p,v=function(t){var n=t.children,r=t.container,o=void 0===r?document.body:r,i=t.type,a=void 0===i?"reach-portal":i;return(0,e.createElement)(d,{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(t){var r=t.refs.node;return r?(0,e.createPortal)(n,r):null}})};var y=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},b=n(172),h=n.n(b);function m(){return m=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},m.apply(this,arguments)}function g(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 O=function(){},w=function(){},E=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=h()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},S=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},P=React.createContext(),j=React.forwardRef((function(t,n){var r=t.container,o=t.isOpen,i=void 0===o||o,a=t.onDismiss,c=void 0===a?O:a,u=t.initialFocusRef,s=t.onClick,l=t.onKeyDown,p=g(t,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return(0,e.createElement)(d,{didMount:w},i?(0,e.createElement)(v,{container:r,"data-reach-dialog-wrapper":!0},(0,e.createElement)(d,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;E(t,u)},willUnmount:S},(function(t){var r=t.refs;return(0,e.createElement)(P.Provider,{value:function(e){return r.contentNode=e}},(0,e.createElement)("div",m({"data-reach-dialog-overlay":!0,onClick:y(s,(function(e){e.stopPropagation(),c()})),onKeyDown:y(l,(function(e){"Escape"===e.key&&(e.stopPropagation(),c())})),ref:function(e){r.overlayNode=e,n&&n(e)}},p)))}))):null)}));j.propTypes={initialFocusRef:function(){}};var x=function(e){return e.stopPropagation()};React.forwardRef((function(t,n){var r=t.onClick,o=(t.onKeyDown,g(t,["onClick","onKeyDown"]));return(0,e.createElement)(P.Consumer,null,(function(t){return(0,e.createElement)("div",m({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:y(r,x),ref:function(e){t(e),n&&n(e)}},o))}))}));function k(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 D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(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,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.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 T=function(t){var n=t.setExtsStatus,o=t.extension,c=t.onExtsSync,u=_((0,e.useState)(null),2),s=u[0],l=u[1];return(0,e.createElement)("div",{className:i()("ct-extension-options ct-product-reviews-options")},(0,e.createElement)("h4",null,(0,a.__)("Product Reviews Settings","blocksy-companion")),(0,e.createElement)("p",{className:"ct-modal-description"},(0,a.__)("Configure the slugs for single and category pages of the product review custom post type.","blocksy-companion")),(0,e.createElement)("form",null,(0,e.createElement)(r.OptionsPanel,{onChange:function(e,t){return l((function(n){return D(D({},n),{},A({},e,t))}))},options:{single_slug:{type:"text",value:"",label:(0,a.__)("Single Slug","blocksy-companion")},category_slug:{type:"text",value:"",label:(0,a.__)("Category Slug","blocksy-companion")}},value:D(D({},o.data.settings),s||{}),hasRevertButton:!1}),(0,e.createElement)("button",{className:"ct-button-primary",disabled:!s,onClick:function(e){if(e.preventDefault(),s){var t=D(D({},o.data.settings),s);n((function(e){return D(D({},e),{},A({},o.name,D(D({},e[o.name]),{},{data:D(D({},e[o.name].data),{},{settings:t})})))})),c({extAction:{type:"persist",settings:t}}),l(null)}}},(0,a.__)("Save Settings","blocksy-companion"))))};function C(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 U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,t.addFilter)("blocksy.extensions.current_extension_content","blocksy",(function(t,n){var r=n.extension,o=n.onExtsSync,i=n.setExtsStatus;return"product-reviews"!==r.name?t:U(U({},t),{},{content:(0,e.createElement)(T,{setExtsStatus:i,extension:r,onExtsSync:o})})}))}()}();