diff --git a/wp-content/themes/generatepress/assets/css/admin/block-editor.css b/wp-content/themes/generatepress/assets/css/admin/block-editor.css index 1ae4b0e4..85d0a717 100644 --- a/wp-content/themes/generatepress/assets/css/admin/block-editor.css +++ b/wp-content/themes/generatepress/assets/css/admin/block-editor.css @@ -69,11 +69,6 @@ body .block-editor-block-list__block hr { width: auto; } -body .block-editor-block-list__block, -body .block-editor-block-list__block p { - font-size: inherit; -} - body .block-editor-default-block-appender input[type=text].editor-default-block-appender__content, body .block-editor-default-block-appender textarea.editor-default-block-appender__content { font-family: inherit; diff --git a/wp-content/themes/generatepress/assets/css/admin/editor-typography.css b/wp-content/themes/generatepress/assets/css/admin/editor-typography.css index 9ca21f40..3594ba27 100644 --- a/wp-content/themes/generatepress/assets/css/admin/editor-typography.css +++ b/wp-content/themes/generatepress/assets/css/admin/editor-typography.css @@ -1,4 +1,4 @@ -.editor-styles-wrapper { +body { font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-weight: normal; text-transform: none; @@ -6,21 +6,22 @@ line-height: 1.5; } -.editor-styles-wrapper p { - line-height: 1.5; +p { + line-height: inherit; + font-size: inherit; margin-top: 0; margin-bottom: 1.5em; } -.editor-styles-wrapper h1, .editor-styles-wrapper h2, .editor-styles-wrapper h3, .editor-styles-wrapper h4, .editor-styles-wrapper h5, .editor-styles-wrapper h6 { +h1, h2, h3, h4, h5, h6 { font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; } -.editor-styles-wrapper h1, -.editor-styles-wrapper .editor-post-title__input { +h1, +.editor-post-title__input { font-family: inherit; font-size: 42px; margin-bottom: 20px; @@ -30,7 +31,7 @@ text-transform: none; } -.editor-styles-wrapper h2 { +h2 { font-family: inherit; font-size: 35px; margin-bottom: 20px; @@ -40,7 +41,7 @@ text-transform: none; } -.editor-styles-wrapper h3 { +h3 { font-family: inherit; font-size: 29px; margin-bottom: 20px; @@ -50,17 +51,17 @@ text-transform: none; } -.editor-styles-wrapper h4 { +h4 { font-size: 24px; } -.editor-styles-wrapper h5 { +h5 { font-size: 20px; } -.editor-styles-wrapper h4, -.editor-styles-wrapper h5, -.editor-styles-wrapper h6 { +h4, +h5, +h6 { font-family: inherit; margin-bottom: 20px; margin-top: 0; diff --git a/wp-content/themes/generatepress/assets/dist/customizer.asset.php b/wp-content/themes/generatepress/assets/dist/customizer.asset.php index 0b9e6985..094c64b2 100644 --- a/wp-content/themes/generatepress/assets/dist/customizer.asset.php +++ b/wp-content/themes/generatepress/assets/dist/customizer.asset.php @@ -1 +1 @@ - array('react', 'react-dom', 'wp-components', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'cce88a99e1e77f1e8791fa8ad107481c'); \ No newline at end of file + array('react', 'react-dom', 'wp-components', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'da1908e9e6ce0313d16a77f4eee7c763'); \ No newline at end of file diff --git a/wp-content/themes/generatepress/assets/dist/customizer.js b/wp-content/themes/generatepress/assets/dist/customizer.js index 4ab7c4fd..e8bc817f 100644 --- a/wp-content/themes/generatepress/assets/dist/customizer.js +++ b/wp-content/themes/generatepress/assets/dist/customizer.js @@ -1,4 +1,4 @@ -(window.webpackJsonp_generatepress=window.webpackJsonp_generatepress||[]).push([[3],{21:function(e,a,t){},29:function(e,a,t){},30:function(e,a,t){},31:function(e,a,t){},35:function(e,a,t){},44:function(e,a,t){},47:function(e,a,t){},48:function(e,a,t){},49:function(e,a,t){},50:function(e,a,t){}}]),function(e){function a(a){for(var r,o,s=a[0],l=a[1],c=a[2],g=0,p=[];ge.length)&&(a=e.length);for(var t=0,r=new Array(a);t=0||Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}(this.props,[]);return function(e){u.forEach((function(a){return delete e[a]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=t,o.default.createElement("div",{className:this.props.className,style:a},this.renderStyles(),o.default.createElement("input",r({},i,{ref:this.inputRef})),o.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?o.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),a}(n.Component);d.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},d.defaultProps={minWidth:1,injectStyles:!0},a.default=d},function(e,a){e.exports=window.ReactDOM},function(e,a,t){"use strict";var r=t(42),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,d=Object.prototype;e.exports=function e(a,t,r){if("string"!=typeof t){if(d){var i=f(t);i&&i!==d&&e(a,i,r)}var o=u(t);g&&(o=o.concat(g(t)));for(var s=l(a),y=l(t),v=0;v=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,a){e.exports=function(e,a){if(null==e)return{};var t,r,i={},n=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,a){e.exports=function(e,a){return a||(a=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(a)}}))},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,a,t){e.exports=t(40)()},function(e,a,t){"use strict";var r=t(41);function i(){}function n(){}n.resetWarningCache=i,e.exports=function(){function e(e,a,t,i,n,o){if(o!==r){var s=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 s.name="Invariant Violation",s}}function a(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:a,element:e,elementType:e,instanceOf:a,node:e,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:i};return t.PropTypes=t,t}},function(e,a,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,a,t){"use strict";e.exports=t(43)},function(e,a,t){"use strict";var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,g=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,h=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,S=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var a=e.$$typeof;switch(a){case i:switch(e=e.type){case g:case p:case o:case l:case s:case d:return e;default:switch(e=e&&e.$$typeof){case u:case f:case m:case v:case c:return e;default:return a}}case n:return a}}}function C(e){return w(e)===p}a.AsyncMode=g,a.ConcurrentMode=p,a.ContextConsumer=u,a.ContextProvider=c,a.Element=i,a.ForwardRef=f,a.Fragment=o,a.Lazy=m,a.Memo=v,a.Portal=n,a.Profiler=l,a.StrictMode=s,a.Suspense=d,a.isAsyncMode=function(e){return C(e)||w(e)===g},a.isConcurrentMode=C,a.isContextConsumer=function(e){return w(e)===u},a.isContextProvider=function(e){return w(e)===c},a.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},a.isForwardRef=function(e){return w(e)===f},a.isFragment=function(e){return w(e)===o},a.isLazy=function(e){return w(e)===m},a.isMemo=function(e){return w(e)===v},a.isPortal=function(e){return w(e)===n},a.isProfiler=function(e){return w(e)===l},a.isStrictMode=function(e){return w(e)===s},a.isSuspense=function(e){return w(e)===d},a.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===p||e===l||e===s||e===d||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===O||e.$$typeof===S||e.$$typeof===h)},a.typeOf=w},,function(e,a){function t(a,r){return e.exports=t=Object.setPrototypeOf||function(e,a){return e.__proto__=a,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(a,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,a){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},,,,,,,,,function(e,a,t){"use strict";t.r(a),t(29);var r=t(6),i=t.n(r),n=t(0),o=t(2),s=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return wp.customize.Control.extend(Object.assign({},{ready:function(){var e=this;e.setting.bind((function(){e.renderContent()}))},embed:function(){var e=this,a=e.section();a&&wp.customize.section(a,(function(a){a.expanded.bind((function(a){a&&e.actuallyEmbed()}))}))},actuallyEmbed:function(){"resolved"!==this.deferred.embedded.state()&&(this.renderContent(),this.deferred.embedded.resolve())},initialize:function(e,a){var t=this;t.setNotificationContainer=t.setNotificationContainer.bind(t),wp.customize.Control.prototype.initialize.call(t,e,a),wp.customize.control.bind("removed",(function e(a){t===a&&(t.destroy(),t.container.remove(),wp.customize.control.unbind("removed",e))}))},setNotificationContainer:function(e){this.notifications.container=jQuery(e),this.notifications.render()},getWrapper:function(){var e=this.container[0];if(this.params.choices.wrapper){var a=document.getElementById(this.params.choices.wrapper+"--wrapper");a&&(e=a,this.container.hide())}return e},renderContent:function(){var a=this.setting.get(),t=Object(n.createElement)(o.SlotFillProvider,null,Object(n.createElement)(e,i()({},this.params,{value:a,setNotificationContainer:this.setNotificationContainer,customizerSetting:this.setting,control:this,choices:this.params.choices,default:this.params.defaultValue})),Object(n.createElement)(o.Popover.Slot,null)),r=this.getWrapper();Object(n.render)(t,r)},destroy:function(){Object(n.unmountComponentAtNode)(this.container[0]),wp.customize.Control.prototype.destroy&&wp.customize.Control.prototype.destroy.call(this)}},a))},l=(t(30),t(4)),c=t.n(l);function u(e){return"info"===e?Object(n.createElement)("svg",{width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024","aria-hidden":"true"},Object(n.createElement)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}),Object(n.createElement)("path",{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"})):"x"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M18 6L6 18M6 6l12 12"})):"ellipsis"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(n.createElement)("rect",{x:"0",fill:"none",width:"20",height:"20"}),Object(n.createElement)("g",null,Object(n.createElement)("path",{d:"M5 10c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}))):"mobile"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",width:"1em",height:"1em"},Object(n.createElement)("path",{d:"M6 2h8c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm7 12V4H7v10h6zM8 5h4l-4 5V5z",fill:"currentColor"})):"tablet"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",width:"1em",height:"1em"},Object(n.createElement)("path",{d:"M4 2h12c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H4c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm11 14V4H5v12h10zM6 5h6l-6 5V5z",fill:"currentColor"})):"desktop"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",width:"1em",height:"1em"},Object(n.createElement)("path",{d:"M3 2h14c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1h-5v2h2c.55 0 1 .45 1 1v1H5v-1c0-.55.45-1 1-1h2v-2H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm13 9V4H4v7h12zM5 5h9L5 9V5z",fill:"currentColor"})):"dash"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M4.5 12.75a.75.75 0 01.75-.75h13.5a.75.75 0 010 1.5H5.25a.75.75 0 01-.75-.75z",fill:"currentColor"})):"plus"===e?Object(n.createElement)("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 5v14M5 12h14"})):"lock"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),Object(n.createElement)("path",{d:"M7 11V7a5 5 0 0110 0v4"})):"unlock"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),Object(n.createElement)("path",{d:"M7 11V7a5 5 0 019.9-1"})):"chevron-down"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M6 9l6 6 6-6"})):"chevron-up"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M18 15l-6-6-6 6"})):"chevron-right"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M9 18l6-6-6-6"})):"trash"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",style:{fill:"none"},stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M3 6h18M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2M10 11v6M14 11v6"})):void 0}t(31);var g=t(1),p=function(e){var a=Object(n.useState)(!1),t=c()(a,2),r=t[0],i=t[1],s=Object(n.useState)(!1),l=c()(s,2),p=l[0],f=l[1],d=Object(n.useState)(!0),y=c()(d,2),v=y[0],m=y[1],h=Object(n.useState)(!1),b=c()(h,2),O=b[0],S=b[1],w=e.value,C=e.varNameValue,x=e.onChange,j=e.onVarChange,M=e.choices,E=e.tooltipPosition,k=void 0===E?"top center":E,N=e.tooltipText,P=void 0===N?Object(g.__)("Choose Color","generatepress"):N,_=e.hideLabel,T=void 0!==_&&_;Object(n.useEffect)((function(){m(!!w)}),[w]),Object(n.useEffect)((function(){if(O){var e=setTimeout((function(){f(w);var e=document.querySelector(".generate-color-input-wrapper input");e&&e.focus()}),350);return function(){clearTimeout(e),S(!1)}}}),[w]);var I=function(){i(!1),m(!0)},A=P;M.tooltip&&(A=M.tooltip);var B=!!M.showPalette||void 0===M.showPalette,L=!!M.showReset||void 0===M.showReset,F=generateCustomizerControls.palette,V=window.sessionStorage.getItem("generateGlobalColors");return V&&(F=JSON.parse(V)),Object(n.createElement)("div",{className:"generate-color-picker-area"},Object(n.createElement)("div",{className:"components-color-palette__item-wrapper components-circular-option-picker__option-wrapper components-color-palette__custom-color"},!r&&Object(n.createElement)(o.Tooltip,{text:A,position:k},Object(n.createElement)(o.Button,{"aria-expanded":r,className:"components-color-palette__item components-circular-option-picker__option",onClick:function(){i(!0)},"aria-label":A,style:{color:w||"transparent"}},Object(n.createElement)("span",{className:"components-color-palette__custom-color-gradient"}))),r&&Object(n.createElement)(o.Tooltip,{text:A,position:k},Object(n.createElement)(o.Button,{"aria-expanded":r,className:"components-color-palette__item components-circular-option-picker__option",onClick:I,"aria-label":A,style:{color:w||"transparent"}},Object(n.createElement)("span",{className:"components-color-palette__custom-color-gradient"})))),r&&Object(n.createElement)(o.Popover,{position:"bottom center",className:"generate-component-color-picker",onClose:I,focusOnMount:"container"},Object(n.createElement)(o.BaseControl,{key:p,label:e.label&&!T?e.label:"",id:"generate-color-input-field",className:"generate-color-input-main-label"},Object(n.createElement)(o.ColorPicker,{key:p,color:function(e){if(String(e).startsWith("var(")){var a=e.match(/\(([^)]+)\)/);if(a){var t=getComputedStyle(document.documentElement).getPropertyValue(a[1]);t&&(e=t)}}return e}(w)||"",onChangeComplete:function(e){var a;if(void 0===e.rgb||1===e.rgb.a)a=e.hex;else{var t=e.rgb,r=t.r,i=t.g,n=t.b,o=t.a;a="rgba(".concat(r,", ").concat(i,", ").concat(n,", ").concat(o,")")}x(a)},disableAlpha:!M.alpha}),Object(n.createElement)("div",{className:"generate-color-option-area"},!!M.showVarName&&Object(n.createElement)("div",{className:"generate-color-input--css-var-name-wrapper"},Object(n.createElement)(o.TextControl,{label:Object(g.__)("CSS Variable Name","generatepress"),disabled:!!v,type:"text",value:C||"",onChange:function(e){j(e)}}),!!v&&Object(n.createElement)(o.Tooltip,{text:Object(g.__)("Changing this name will remove its color from elements already using it.","generatepress")},Object(n.createElement)(o.Button,{onClick:function(){window.alert(Object(g.__)("Changing this name will break styles that are using it to define its color.","generatepress")),m(!1),setTimeout((function(){document.querySelector(".generate-color-input--css-var-name-wrapper input").focus()}),10)}},u("unlock")))),Object(n.createElement)("div",{className:"generate-color-input-wrapper"},Object(n.createElement)(o.TextControl,{id:"generate-color-input-field",className:"generate-color-input",type:"text",value:w||"",onChange:function(e){!e.startsWith("#")&&/^([0-9A-F]{3}){1,2}$/i.test(e)&&(e="#"+e),x(e),S(!0)}}),!!L&&Object(n.createElement)(o.Button,{isSmall:!0,isSecondary:!0,className:"components-color-clear-color",onClick:function(){var a=e.defaultValue?e.defaultValue:"";wp.customize.control(e.customizerSetting.id).setting.set(a),setTimeout((function(){document.querySelector(".generate-color-input-wrapper input").focus()}),10)}},Object(g.__)("Default","generatepress"))),!!B&&Object(n.createElement)(o.BaseControl,{className:"generate-component-color-picker-palette"},Object(n.createElement)(o.ColorPalette,{colors:F,value:w,onChange:function(e){void 0===e&&(e=""),x(e),f(e),setTimeout((function(){document.querySelector(".generate-color-input-wrapper input").focus()}),10)},disableCustomColors:!0,clearable:!1}))))))},f=s((function(e){var a=!e.choices.hideLabel||void 0===e.choices.hideLabel;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"description customize-control-description",dangerouslySetInnerHTML:{__html:e.description}}),Object(n.createElement)("div",{className:"customize-control-notifications-container",ref:e.setNotificationContainer}),Object(n.createElement)(o.BaseControl,{className:"generate-component-color-picker-wrapper","data-toggleId":e.choices.toggleId?e.choices.toggleId:null},!!e.label&&a&&Object(n.createElement)("div",{className:"generate-color-component-label"},Object(n.createElement)("span",null,e.label)),Object(n.createElement)(p,i()({},e,{onChange:function(a){var t;t=a,wp.customize.control(e.customizerSetting.id).setting.set(t)}}))))}),{getWrapper:function(){var e=this.container[0];if(this.params.choices.wrapper){var a=document.getElementById(this.params.choices.wrapper+"--wrapper");a&&(e=a,this.container[0].style.display="none")}return this.params.choices.toggleId&&e.setAttribute("data-toggleId",this.params.choices.toggleId),e}});wp.customize.controlConstructor["generate-color-control"]=f;var d=t(8),y=t.n(d),v=t(7),m=t.n(v),h=t(5),b=t.n(h),O=(t(21),t(10));function S(){return(S=Object.assign||function(e){for(var a=1;a0?B(W,--G):0,z--,10===U&&(z=1,R--),U}function J(){return U=G2||X(U)>3?"":" "}function ie(e,a){for(;--a&&J()&&!(U<48||U>102||U>57&&U<65||U>70&&U<97););return Q(e,Z()+(a<6&&32==q()&&32==J()))}function ne(e,a){for(;J()&&e+U!==57&&(e+U!==84||47!==q()););return"/*"+Q(a,G-1)+"*"+_(47===e?e:J())}function oe(e){for(;!X(q());)J();return Q(e,G)}function se(e){return ae(function e(a,t,r,i,n,o,s,l,c){for(var u=0,g=0,p=s,f=0,d=0,y=0,v=1,m=1,h=1,b=0,O="",S=n,w=o,C=i,x=O;m;)switch(y=b,b=J()){case 34:case 39:case 91:case 40:x+=te(b);break;case 9:case 10:case 13:case 32:x+=re(y);break;case 92:x+=ie(Z()-1,7);continue;case 47:switch(q()){case 42:case 47:D(ce(ne(J(),Z()),t,r),c);break;default:x+="/"}break;case 123*v:l[u++]=F(x)*h;case 125*v:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+g:d>0&&F(x)-p&&D(d>32?ue(x+";",i,r,p-1):ue(I(x," ","")+";",i,r,p-2),c);break;case 59:x+=";";default:if(D(C=le(x,t,r,u,g,n,l,O,S=[],w=[],p),o),123===b)if(0===g)e(x,t,C,C,S,o,p,l,w);else switch(f){case 100:case 109:case 115:e(a,C,C,i&&D(le(a,C,C,0,0,n,l,O,n,S=[],p),w),n,w,p,l,i?S:w);break;default:e(x,C,C,C,[""],w,p,l,w)}}u=g=d=0,v=h=1,O=x="",p=s;break;case 58:p=1+F(x),d=y;default:if(v<1)if(123==b)--v;else if(125==b&&0==v++&&125==Y())continue;switch(x+=_(b),b*v){case 38:h=g>0?1:(x+="\f",-1);break;case 44:l[u++]=(F(x)-1)*h,h=1;break;case 64:45===q()&&(x+=te(J())),f=q(),g=F(O=x+=oe(Z())),b++;break;case 45:45===y&&2==F(x)&&(v=0)}}return o}("",null,null,null,[""],e=ee(e),0,[0],e))}function le(e,a,t,r,i,n,o,s,l,c,u){for(var g=i-1,p=0===i?n:[""],f=V(p),d=0,y=0,v=0;d0?p[m]+" "+h:I(h,/&\f/g,p[m])))&&(l[v++]=b);return K(e,a,t,0===i?"rule":s,l,c,u)}function ce(e,a,t){return K(e,a,t,k,_(U),L(e,2,-2),0)}function ue(e,a,t,r){return K(e,a,t,N,L(e,0,r),L(e,r+1,-1),r)}function ge(e,a){for(var t="",r=V(e),i=0;i6)switch(B(a,t+1)){case 109:if(45!==B(a,t+4))break;case 102:return I(a,/(.+:)(.+)-([^]+)/,"$1"+E+"$2-$3$1"+M+(108==B(a,t+3)?"$3":"$2-$3"))+a;case 115:return~A(a,"stretch")?e(I(a,"stretch","fill-available"),t)+a:a}break;case 4949:if(115!==B(a,t+1))break;case 6444:switch(B(a,F(a)-3-(~A(a,"!important")&&10))){case 107:return I(a,":",":"+E)+a;case 101:return I(a,/(.+:)([^;!]+)(;|!.+)?/,"$1"+E+(45===B(a,14)?"inline-":"")+"box$3$1"+E+"$2$3$1"+j+"$2box$3")+a}break;case 5936:switch(B(a,t+11)){case 114:return E+a+j+I(a,/[svh]\w+-[tblr]{2}/,"tb")+a;case 108:return E+a+j+I(a,/[svh]\w+-[tblr]{2}/,"tb-rl")+a;case 45:return E+a+j+I(a,/[svh]\w+-[tblr]{2}/,"lr")+a}return E+a+j+a+a}return a}(e.value,e.length);break;case"@keyframes":return ge([$(I(e.value,"@","@"+E),e,"")],r);case"rule":if(e.length)return function(e,a){return e.map(a).join("")}(e.props,(function(a){switch(function(e,a){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(a)){case":read-only":case":read-write":return ge([$(I(a,/:(read-\w+)/,":-moz-$1"),e,"")],r);case"::placeholder":return ge([$(I(a,/:(plac\w+)/,":"+E+"input-$1"),e,""),$(I(a,/:(plac\w+)/,":-moz-$1"),e,""),$(I(a,/:(plac\w+)/,j+"input-$1"),e,"")],r)}return""}))}}var ve=function(e){var a={};return function(t){return void 0===a[t]&&(a[t]=e(t)),a[t]}},me=new WeakMap,he=function(e){if("rule"===e.type&&e.parent&&e.length){for(var a=e.value,t=e.parent,r=e.column===t.column&&e.line===t.line;"rule"!==t.type;)if(!(t=t.parent))return;if((1!==e.props.length||58===a.charCodeAt(0)||me.get(t))&&!r){me.set(e,!0);for(var i=[],n=function(e,a){return ae(function(e,a){var t=-1,r=44;do{switch(X(r)){case 0:38===r&&12===q()&&(a[t]=1),e[t]+=oe(G-1);break;case 2:e[t]+=te(r);break;case 4:if(44===r){e[++t]=58===q()?"&\f":"",a[t]=e[t].length;break}default:e[t]+=_(r)}}while(r=J());return e}(ee(e),a))}(a,i),o=t.props,s=0,l=0;s=4;++r,i-=4)a=1540483477*(65535&(a=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(a>>>16)<<16),t=1540483477*(65535&(a^=a>>>24))+(59797*(a>>>16)<<16)^1540483477*(65535&t)+(59797*(t>>>16)<<16);switch(i){case 3:t^=(255&e.charCodeAt(r+2))<<16;case 2:t^=(255&e.charCodeAt(r+1))<<8;case 1:t=1540483477*(65535&(t^=255&e.charCodeAt(r)))+(59797*(t>>>16)<<16)}return(((t=1540483477*(65535&(t^=t>>>13))+(59797*(t>>>16)<<16))^t>>>15)>>>0).toString(36)},je={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Me=/[A-Z]|^ms/g,Ee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ke=function(e){return 45===e.charCodeAt(1)},Ne=function(e){return null!=e&&"boolean"!=typeof e},Pe=ve((function(e){return ke(e)?e:e.replace(Me,"-$&").toLowerCase()})),_e=function(e,a){switch(e){case"animation":case"animationName":if("string"==typeof a)return a.replace(Ee,(function(e,a,t){return Ie={name:a,styles:t,next:Ie},a}))}return 1===je[e]||ke(e)||"number"!=typeof a||0===a?a:a+"px"};function Te(e,a,t){if(null==t)return"";if(void 0!==t.__emotion_styles)return t;switch(typeof t){case"boolean":return"";case"object":if(1===t.anim)return Ie={name:t.name,styles:t.styles,next:Ie},t.name;if(void 0!==t.styles){var r=t.next;if(void 0!==r)for(;void 0!==r;)Ie={name:r.name,styles:r.styles,next:Ie},r=r.next;return t.styles+";"}return function(e,a,t){var r="";if(Array.isArray(t))for(var i=0;i=0||(i[t]=e[t]);return i}(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function Je(e){return(Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var qe=t(17),Ze=t.n(qe);function Qe(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function Xe(e,a){for(var t=0;t-1}function ma(e){return va(e)?window.pageYOffset:e.scrollTop}function ha(e,a){va(e)?window.scrollTo(0,a):e.scrollTop=a}function ba(e,a,t,r){return t*((e=e/r-1)*e*e+1)+a}function Oa(e,a){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ga,i=ma(e),n=a-i,o=10,s=0;function l(){var a=ba(s+=o,i,n,t);ha(e,a),s=f)return{placement:"bottom",maxHeight:a};if(C>=f&&!o)return n&&Oa(l,x,160),{placement:"bottom",maxHeight:a};if(!o&&C>=r||o&&S>=r)return n&&Oa(l,x,160),{placement:"bottom",maxHeight:o?S-h:C-h};if("auto"===i||o){var M=a,E=o?O:w;return E>=r&&(M=Math.min(E-h-s.controlHeight,a)),{placement:"top",maxHeight:M}}if("bottom"===i)return n&&ha(l,x),{placement:"bottom",maxHeight:a};break;case"top":if(O>=f)return{placement:"top",maxHeight:a};if(w>=f&&!o)return n&&Oa(l,j,160),{placement:"top",maxHeight:a};if(!o&&w>=r||o&&O>=r){var k=a;return(!o&&w>=r||o&&O>=r)&&(k=o?O-b:w-b),n&&Oa(l,j,160),{placement:"top",maxHeight:k}}return{placement:"bottom",maxHeight:a};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}var Ea=function(e){return"auto"===e?"bottom":e},ka=Object(w.createContext)({getPortalPlacement:null}),Na=function(e){ta(t,e);var a=ua(t);function t(){var e;Qe(this,t);for(var r=arguments.length,i=new Array(r),n=0;ne.length)&&(a=e.length);for(var t=0,r=new Array(a);t0,y=g-p-u,v=!1;y>a&&o.current&&(r&&r(e),o.current=!1),d&&s.current&&(n&&n(e),s.current=!1),d&&a>y?(t&&!o.current&&t(e),f.scrollTop=g,v=!0,o.current=!0):!d&&-a>u&&(i&&!s.current&&i(e),f.scrollTop=0,v=!0,s.current=!0),v&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[]),g=Object(w.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=Object(w.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=Object(w.useCallback)((function(e){var a=l.current-e.changedTouches[0].clientY;u(e,a)}),[u]),d=Object(w.useCallback)((function(e){if(e){var a=!!ja&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",g,a),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",p,a),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",f,a)}}),[f,p,g]),y=Object(w.useCallback)((function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",g,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",p,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",f,!1))}),[f,p,g]);return Object(w.useEffect)((function(){if(a){var e=c.current;return d(e),function(){y(e)}}}),[a,d,y]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),n=function(e){var a=e.isEnabled,t=e.accountForScrollbars,r=void 0===t||t,i=Object(w.useRef)({}),n=Object(w.useRef)(null),o=Object(w.useCallback)((function(e){if(Mt){var a=document.body,t=a&&a.style;if(r&&Ot.forEach((function(e){var a=t&&t[e];i.current[e]=a})),r&&Et<1){var n=parseInt(i.current.paddingRight,10)||0,o=document.body?document.body.clientWidth:0,s=window.innerWidth-o+n||0;Object.keys(St).forEach((function(e){var a=St[e];t&&(t[e]=a)})),t&&(t.paddingRight="".concat(s,"px"))}a&&jt()&&(a.addEventListener("touchmove",wt,kt),e&&(e.addEventListener("touchstart",xt,kt),e.addEventListener("touchmove",Ct,kt))),Et+=1}}),[]),s=Object(w.useCallback)((function(e){if(Mt){var a=document.body,t=a&&a.style;Et=Math.max(Et-1,0),r&&Et<1&&Ot.forEach((function(e){var a=i.current[e];t&&(t[e]=a)})),a&&jt()&&(a.removeEventListener("touchmove",wt,kt),e&&(e.removeEventListener("touchstart",xt,kt),e.removeEventListener("touchmove",Ct,kt)))}}),[]);return Object(w.useEffect)((function(){if(a){var e=n.current;return o(e),function(){s(e)}}}),[a,o,s]),function(e){n.current=e}}({isEnabled:t});return Ge(C.a.Fragment,null,t&&Ge("div",{onClick:Nt,css:Pt}),a((function(e){i(e),n(e)})))}var Tt={clearIndicator:Wa,container:function(e){var a=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:a?"none":null,position:"relative"}},control:function(e){var a=e.isDisabled,t=e.isFocused,r=e.theme,i=r.colors,n=r.borderRadius,o=r.spacing;return{label:"control",alignItems:"center",backgroundColor:a?i.neutral5:i.neutral0,borderColor:a?i.neutral10:t?i.primary:i.neutral20,borderRadius:n,borderStyle:"solid",borderWidth:1,boxShadow:t?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:t?i.primary:i.neutral30}}},dropdownIndicator:Ua,group:function(e){var a=e.theme.spacing;return{paddingBottom:2*a.baseUnit,paddingTop:2*a.baseUnit}},groupHeading:function(e){var a=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*a.baseUnit,paddingRight:3*a.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var a=e.isDisabled,t=e.theme,r=t.spacing.baseUnit,i=t.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:a?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var a=e.isDisabled,t=e.theme,r=t.spacing,i=t.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:a?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var a=e.isFocused,t=e.size,r=e.theme,i=r.colors,n=r.spacing.baseUnit;return{label:"loadingIndicator",color:a?i.neutral60:i.neutral20,display:"flex",padding:2*n,transition:"color 150ms",alignSelf:"center",fontSize:t,lineHeight:1,marginRight:t,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Ta,menu:function(e){var a,t=e.placement,r=e.theme,i=r.borderRadius,n=r.spacing,o=r.colors;return ra(a={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(t),"100%"),ra(a,"backgroundColor",o.neutral0),ra(a,"borderRadius",i),ra(a,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),ra(a,"marginBottom",n.menuGutter),ra(a,"marginTop",n.menuGutter),ra(a,"position","absolute"),ra(a,"width","100%"),ra(a,"zIndex",1),a},menuList:function(e){var a=e.maxHeight,t=e.theme.spacing.baseUnit;return{maxHeight:a,overflowY:"auto",paddingBottom:t,paddingTop:t,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var a=e.rect,t=e.offset,r=e.position;return{left:a.left,position:r,top:t,width:a.width,zIndex:1}},multiValue:function(e){var a=e.theme,t=a.spacing,r=a.borderRadius;return{label:"multiValue",backgroundColor:a.colors.neutral10,borderRadius:r/2,display:"flex",margin:t.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var a=e.theme,t=a.borderRadius,r=a.colors,i=e.cropWithEllipsis;return{borderRadius:t/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var a=e.theme,t=a.spacing,r=a.borderRadius,i=a.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:t.baseUnit,paddingRight:t.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:_a,option:function(e){var a=e.isDisabled,t=e.isFocused,r=e.isSelected,i=e.theme,n=i.spacing,o=i.colors;return{label:"option",backgroundColor:r?o.primary:t?o.primary25:"transparent",color:a?o.neutral20:r?o.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*n.baseUnit,"px ").concat(3*n.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!a&&(r?o.primary:o.primary50)}}},placeholder:function(e){var a=e.theme,t=a.spacing;return{label:"placeholder",color:a.colors.neutral50,marginLeft:t.baseUnit/2,marginRight:t.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var a=e.isDisabled,t=e.theme,r=t.spacing,i=t.colors;return{label:"singleValue",color:a?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var a=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(a.baseUnit/2,"px ").concat(2*a.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},It={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},At={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Sa(),captureMenuScroll:!Sa(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,a){var t=sa({ignoreCase:!0,ignoreAccents:!0,stringify:ht,trim:!0,matchFrom:"any"},void 0),r=t.ignoreCase,i=t.ignoreAccents,n=t.stringify,o=t.trim,s=t.matchFrom,l=o?mt(a):a,c=o?mt(n(e)):n(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=vt(l),c=yt(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var a=e.count;return"".concat(a," result").concat(1!==a?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function Bt(e,a,t,r){return{type:"option",data:a,isDisabled:zt(e,a,t),isSelected:Ht(e,a,t),label:Dt(e,a),value:Rt(e,a),index:r}}function Lt(e,a){return e.options.map((function(t,r){if(t.options){var i=t.options.map((function(t,r){return Bt(e,t,a,r)})).filter((function(a){return Vt(e,a)}));return i.length>0?{type:"group",data:t,options:i,index:r}:void 0}var n=Bt(e,t,a,r);return Vt(e,n)?n:void 0})).filter((function(e){return!!e}))}function Ft(e){return e.reduce((function(e,a){return"group"===a.type?e.push.apply(e,tt(a.options.map((function(e){return e.data})))):e.push(a.data),e}),[])}function Vt(e,a){var t=e.inputValue,r=void 0===t?"":t,i=a.data,n=a.isSelected,o=a.label,s=a.value;return(!Ut(e)||!n)&&Gt(e,{label:o,value:s,data:i},r)}var Dt=function(e,a){return e.getOptionLabel(a)},Rt=function(e,a){return e.getOptionValue(a)};function zt(e,a,t){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(a,t)}function Ht(e,a,t){if(t.indexOf(a)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(a,t);var r=Rt(e,a);return t.some((function(a){return Rt(e,a)===r}))}function Gt(e,a,t){return!e.filterOption||e.filterOption(a,t)}var Ut=function(e){var a=e.hideSelectedOptions,t=e.isMulti;return void 0===a?t:a},Wt=1,Kt=function(e){ta(t,e);var a=ua(t);function t(e){var r;return Qe(this,t),(r=a.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,a){var t=r.props,i=t.onChange,n=t.name;a.name=n,r.ariaOnChange(e,a),i(e,a)},r.setValue=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",t=arguments.length>2?arguments[2]:void 0,i=r.props,n=i.closeMenuOnSelect,o=i.isMulti;r.onInputChange("",{action:"set-value"}),n&&(r.setState({inputIsHiddenAfterUpdate:!o}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:a,option:t})},r.selectOption=function(e){var a=r.props,t=a.blurInputOnSelect,i=a.isMulti,n=a.name,o=r.state.selectValue,s=i&&r.isOptionSelected(e,o),l=r.isOptionDisabled(e,o);if(s){var c=r.getOptionValue(e);r.setValue(o.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",name:n});i?r.setValue([].concat(tt(o),[e]),"select-option",e):r.setValue(e,"select-option")}t&&r.blurInput()},r.removeValue=function(e){var a=r.props.isMulti,t=r.state.selectValue,i=r.getOptionValue(e),n=t.filter((function(e){return r.getOptionValue(e)!==i})),o=a?n:n[0]||null;r.onChange(o,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(r.props.isMulti?[]:null,{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,a=r.state.selectValue,t=a[a.length-1],i=a.slice(0,a.length-1),n=e?i:i[0]||null;r.onChange(n,{action:"pop-value",removedValue:t})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,a=new Array(e),t=0;t5||n>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var a=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(a,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return Ut(r.props)},r.onKeyDown=function(e){var a=r.props,t=a.isMulti,i=a.backspaceRemovesValue,n=a.escapeClearsValue,o=a.inputValue,s=a.isClearable,l=a.isDisabled,c=a.menuIsOpen,u=a.onKeyDown,g=a.tabSelectsValue,p=a.openMenuOnFocus,f=r.state,d=f.focusedOption,y=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!t||o)return;r.focusValue("previous");break;case"ArrowRight":if(!t||o)return;r.focusValue("next");break;case"Delete":case"Backspace":if(o)return;if(y)r.removeValue(y);else{if(!i)return;t?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!g||!d||p&&r.isOptionSelected(d,v))return;r.selectOption(d);break;case"Enter":if(229===e.keyCode)break;if(c){if(!d)return;if(r.isComposing)return;r.selectOption(d);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&n&&r.clearValue();break;case" ":if(o)return;if(!c){r.openMenu("first");break}if(!d)return;r.selectOption(d);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++Wt),r.state.selectValue=da(e.value),r}return ea(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var a,t,r,i,n,o=this.props,s=o.isDisabled,l=o.menuIsOpen,c=this.state.isFocused;(c&&!s&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),c&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(a=this.menuListRef,t=this.focusedOptionRef,r=a.getBoundingClientRect(),i=t.getBoundingClientRect(),n=t.offsetHeight/3,i.bottom+n>r.bottom?ha(a,Math.min(t.offsetTop+t.clientHeight-a.offsetHeight+n,a.scrollHeight)):i.top-n-1&&(o=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:n[o]},(function(){return a.onMenuOpen()}))}},{key:"focusValue",value:function(e){var a=this.state,t=a.selectValue,r=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=t.indexOf(r);r||(i=-1);var n=t.length-1,o=-1;if(t.length){switch(e){case"previous":o=0===i?0:-1===i?n:i-1;break;case"next":i>-1&&i0&&void 0!==arguments[0]?arguments[0]:"first",a=this.props.pageSize,t=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,n=r.indexOf(t);t||(n=-1),"up"===e?i=n>0?n-1:r.length-1:"down"===e?i=(n+1)%r.length:"pageup"===e?(i=n-a)<0&&(i=0):"pagedown"===e?(i=n+a)>r.length-1&&(i=r.length-1):"last"===e&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(It):sa(sa({},It),this.props.theme):It}},{key:"getCommonProps",value:function(){var e=this.clearValue,a=this.cx,t=this.getStyles,r=this.getValue,i=this.selectOption,n=this.setValue,o=this.props,s=o.isMulti,l=o.isRtl,c=o.options;return{clearValue:e,cx:a,getStyles:t,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:c,selectOption:i,selectProps:o,setValue:n,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,a=e.isClearable,t=e.isMulti;return void 0===a?t:a}},{key:"isOptionDisabled",value:function(e,a){return zt(this.props,e,a)}},{key:"isOptionSelected",value:function(e,a){return Ht(this.props,e,a)}},{key:"filterOption",value:function(e,a){return Gt(this.props,e,a)}},{key:"formatOptionLabel",value:function(e,a){if("function"==typeof this.props.formatOptionLabel){var t=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:a,inputValue:t,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,a=e.isDisabled,t=e.isSearchable,r=e.inputId,i=e.inputValue,n=e.tabIndex,o=e.form,s=this.getComponents().Input,l=this.state.inputIsHidden,c=this.commonProps,u=r||this.getElementId("input"),g={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return t?C.a.createElement(s,S({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:u,innerRef:this.getInputRef,isDisabled:a,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:n,form:o,type:"text",value:i},g)):C.a.createElement(bt,S({id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ga,onFocus:this.onInputFocus,readOnly:!0,disabled:a,tabIndex:n,form:o,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,a=this.getComponents(),t=a.MultiValue,r=a.MultiValueContainer,i=a.MultiValueLabel,n=a.MultiValueRemove,o=a.SingleValue,s=a.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,g=c.isDisabled,p=c.isMulti,f=c.inputValue,d=c.placeholder,y=this.state,v=y.selectValue,m=y.focusedValue,h=y.isFocused;if(!this.hasValue()||!u)return f?null:C.a.createElement(s,S({},l,{key:"placeholder",isDisabled:g,isFocused:h}),d);if(p)return v.map((function(a,o){var s=a===m;return C.a.createElement(t,S({},l,{components:{Container:r,Label:i,Remove:n},isFocused:s,isDisabled:g,key:"".concat(e.getOptionValue(a)).concat(o),index:o,removeProps:{onClick:function(){return e.removeValue(a)},onTouchEnd:function(){return e.removeValue(a)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:a}),e.formatOptionLabel(a,"value"))}));if(f)return null;var b=v[0];return C.a.createElement(o,S({},l,{data:b,isDisabled:g}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,a=this.commonProps,t=this.props,r=t.isDisabled,i=t.isLoading,n=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var o={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return C.a.createElement(e,S({},a,{innerProps:o,isFocused:n}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,a=this.commonProps,t=this.props,r=t.isDisabled,i=t.isLoading,n=this.state.isFocused;return e&&i?C.a.createElement(e,S({},a,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:n})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),a=e.DropdownIndicator,t=e.IndicatorSeparator;if(!a||!t)return null;var r=this.commonProps,i=this.props.isDisabled,n=this.state.isFocused;return C.a.createElement(t,S({},r,{isDisabled:i,isFocused:n}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var a=this.commonProps,t=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return C.a.createElement(e,S({},a,{innerProps:i,isDisabled:t,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,a=this.getComponents(),t=a.Group,r=a.GroupHeading,i=a.Menu,n=a.MenuList,o=a.MenuPortal,s=a.LoadingMessage,l=a.NoOptionsMessage,c=a.Option,u=this.commonProps,g=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,d=p.inputValue,y=p.isLoading,v=p.loadingMessage,m=p.minMenuHeight,h=p.maxMenuHeight,b=p.menuIsOpen,O=p.menuPlacement,w=p.menuPosition,x=p.menuPortalTarget,j=p.menuShouldBlockScroll,M=p.menuShouldScrollIntoView,E=p.noOptionsMessage,k=p.onMenuScrollToTop,N=p.onMenuScrollToBottom;if(!b)return null;var P,_=function(a,t){var r=a.type,i=a.data,n=a.isDisabled,o=a.isSelected,s=a.label,l=a.value,p=g===i,f=n?void 0:function(){return e.onOptionHover(i)},d=n?void 0:function(){return e.selectOption(i)},y="".concat(e.getElementId("option"),"-").concat(t),v={id:y,onClick:d,onMouseMove:f,onMouseOver:f,tabIndex:-1};return C.a.createElement(c,S({},u,{innerProps:v,data:i,isDisabled:n,isSelected:o,key:y,label:s,type:r,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(a.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(a){if("group"===a.type){var i=a.data,n=a.options,o=a.index,s="".concat(e.getElementId("group"),"-").concat(o),l="".concat(s,"-heading");return C.a.createElement(t,S({},u,{key:s,data:i,options:n,Heading:r,headingProps:{id:l,data:a.data},label:e.formatGroupLabel(a.data)}),a.options.map((function(e){return _(e,"".concat(o,"-").concat(e.index))})))}if("option"===a.type)return _(a,"".concat(a.index))}));else if(y){var T=v({inputValue:d});if(null===T)return null;P=C.a.createElement(s,u,T)}else{var I=E({inputValue:d});if(null===I)return null;P=C.a.createElement(l,u,I)}var A={minMenuHeight:m,maxMenuHeight:h,menuPlacement:O,menuPosition:w,menuShouldScrollIntoView:M},B=C.a.createElement(Na,S({},u,A),(function(a){var t=a.ref,r=a.placerProps,o=r.placement,s=r.maxHeight;return C.a.createElement(i,S({},u,A,{innerRef:t,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:y,placement:o}),C.a.createElement(_t,{captureEnabled:f,onTopArrive:k,onBottomArrive:N,lockEnabled:j},(function(a){return C.a.createElement(n,S({},u,{innerRef:function(t){e.getMenuListRef(t),a(t)},isLoading:y,maxHeight:s,focusedOption:g}),P)})))}));return x||"fixed"===w?C.a.createElement(o,S({},u,{appendTo:x,controlElement:this.controlRef,menuPlacement:O,menuPosition:w}),B):B}},{key:"renderFormField",value:function(){var e=this,a=this.props,t=a.delimiter,r=a.isDisabled,i=a.isMulti,n=a.name,o=this.state.selectValue;if(n&&!r){if(i){if(t){var s=o.map((function(a){return e.getOptionValue(a)})).join(t);return C.a.createElement("input",{name:n,type:"hidden",value:s})}var l=o.length>0?o.map((function(a,t){return C.a.createElement("input",{key:"i-".concat(t),name:n,type:"hidden",value:e.getOptionValue(a)})})):C.a.createElement("input",{name:n,type:"hidden"});return C.a.createElement("div",null,l)}var c=o[0]?this.getOptionValue(o[0]):"";return C.a.createElement("input",{name:n,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,a=this.state,t=a.ariaSelection,r=a.focusedOption,i=a.focusedValue,n=a.isFocused,o=a.selectValue,s=this.getFocusableOptions();return C.a.createElement(lt,S({},e,{ariaSelection:t,focusedOption:r,focusedValue:i,isFocused:n,selectValue:o,focusableOptions:s}))}},{key:"render",value:function(){var e=this.getComponents(),a=e.Control,t=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,n=this.props,o=n.className,s=n.id,l=n.isDisabled,c=n.menuIsOpen,u=this.state.isFocused,g=this.commonProps=this.getCommonProps();return C.a.createElement(r,S({},g,{className:o,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),C.a.createElement(a,S({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),C.a.createElement(i,S({},g,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),C.a.createElement(t,S({},g,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,a){var t=a.prevProps,r=a.clearFocusValueOnUpdate,i=a.inputIsHiddenAfterUpdate,n=e.options,o=e.value,s=e.menuIsOpen,l=e.inputValue,c={};if(t&&(o!==t.value||n!==t.options||s!==t.menuIsOpen||l!==t.inputValue)){var u=da(o),g=s?function(e,a){return Ft(Lt(e,a))}(e,u):[],p=r?function(e,a){var t=e.focusedValue,r=e.selectValue.indexOf(t);if(r>-1){if(a.indexOf(t)>-1)return t;if(r-1?t:a[0]}(a,g),focusedValue:p,clearFocusValueOnUpdate:!1}}var f=null!=i&&e!==t?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{};return sa(sa(sa({},c),f),{},{prevProps:e})}}]),t}(w.Component);Kt.defaultProps=At;var $t,Yt,Jt,qt=(t(36),t(38),w.Component,$t=Kt,Jt=Yt=function(e){ta(t,e);var a=ua(t);function t(){var e;Qe(this,t);for(var r=arguments.length,i=new Array(r),n=0;n1?t-1:0),i=1;i0&&a.forEach((function(e,r){t.push({value:a[r].fontFamily,label:a[r].fontFamily})})),t),onChange:function(e){s("fontFamily",e,r)}})};function mr(e,a){var t=[{value:"",label:Object(g.__)("Default","generatepress")},{value:"normal",label:Object(g.__)("Normal","generatepress")},{value:"bold",label:Object(g.__)("Bold","generatepress")},{value:"100",label:"100"},{value:"200",label:"200"},{value:"300",label:"300"},{value:"400",label:"400"},{value:"500",label:"500"},{value:"600",label:"600"},{value:"700",label:"700"},{value:"800",label:"800"},{value:"900",label:"900"}];return void 0!==O[e]&&"undefined"!==a.googleFontVariants&&(t=[{value:"",label:Object(g.__)("Default","generatepress")},{value:"normal",label:Object(g.__)("Normal","generatepress")},{value:"bold",label:Object(g.__)("Bold","generatepress")}],a.filter((function(a){return a.fontFamily===e})).forEach((function(e){var a=e.googleFontVariants.replaceAll(" ","");(a=a.split(",")).filter((function(e){var a=e.match(/[a-z]/g),t=e.match(/[0-9]/g);return!(a&&t||"italic"===e||"regular"===e||""===e)})).forEach((function(e){t.push({value:e,label:e})}))}))),t}var hr=function(e){var a=e.index,t=e.value,r=e.fontFamily,i=e.onChange;return Object(n.createElement)(o.SelectControl,{label:Object(g.__)("Font Weight","generatepress"),value:t,options:mr(r,ur()),onChange:function(e){i("fontWeight",e,a)}})},br=function(e){var a=e.index,t=e.value,r=e.onChange;return Object(n.createElement)(o.SelectControl,{label:Object(g.__)("Text Transform","generatepress"),value:t,options:[{value:"",label:Object(g.__)("Default","generatepress")},{value:"uppercase",label:Object(g.__)("Uppercase","generatepress")},{value:"lowercase",label:Object(g.__)("Lowercase","generatepress")},{value:"capitalize",label:Object(g.__)("Capitalize","generatepress")},{value:"initial",label:Object(g.__)("Normal","generatepress")}],onChange:function(e){r("textTransform",e,a)}})},Or=(t(44),function(e){var a=Object(n.useState)("desktop"),t=c()(a,2),r=(t[0],t[1]),i=e.label,s=e.devices;return Object(n.createElement)("div",{className:"components-generate-units-control-header__units"},Object(n.createElement)("div",{className:"components-generate-units-control-label__units"},i),Object(n.createElement)("div",{className:"components-generate-control__units"},Object(n.createElement)(o.ButtonGroup,{className:"components-generate-control-buttons__units","aria-label":Object(g.__)("Select Units","generatepress")},s.map((function(e){var a=Object(g.__)("Desktop","generatepress");return"tablet"===e&&(a=Object(g.__)("Tablet","generatepress")),"mobile"===e&&(a=Object(g.__)("Mobile","generatepress")),Object(n.createElement)(o.Tooltip +(window.webpackJsonp_generatepress=window.webpackJsonp_generatepress||[]).push([[3],{21:function(e,a,t){},29:function(e,a,t){},30:function(e,a,t){},31:function(e,a,t){},35:function(e,a,t){},44:function(e,a,t){},47:function(e,a,t){},48:function(e,a,t){},49:function(e,a,t){},50:function(e,a,t){}}]),function(e){function a(a){for(var r,o,s=a[0],l=a[1],c=a[2],g=0,p=[];ge.length)&&(a=e.length);for(var t=0,r=new Array(a);t=0||Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}(this.props,[]);return function(e){u.forEach((function(a){return delete e[a]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=t,o.default.createElement("div",{className:this.props.className,style:a},this.renderStyles(),o.default.createElement("input",r({},i,{ref:this.inputRef})),o.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?o.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),a}(n.Component);d.propTypes={className:s.default.string,defaultValue:s.default.any,extraWidth:s.default.oneOfType([s.default.number,s.default.string]),id:s.default.string,injectStyles:s.default.bool,inputClassName:s.default.string,inputRef:s.default.func,inputStyle:s.default.object,minWidth:s.default.oneOfType([s.default.number,s.default.string]),onAutosize:s.default.func,onChange:s.default.func,placeholder:s.default.string,placeholderIsMinWidth:s.default.bool,style:s.default.object,value:s.default.any},d.defaultProps={minWidth:1,injectStyles:!0},a.default=d},function(e,a){e.exports=window.ReactDOM},function(e,a,t){"use strict";var r=t(42),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,d=Object.prototype;e.exports=function e(a,t,r){if("string"!=typeof t){if(d){var i=f(t);i&&i!==d&&e(a,i,r)}var o=u(t);g&&(o=o.concat(g(t)));for(var s=l(a),y=l(t),v=0;v=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,a){e.exports=function(e,a){if(null==e)return{};var t,r,i={},n=Object.keys(e);for(r=0;r=0||(i[t]=e[t]);return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,a){e.exports=function(e,a){return a||(a=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(a)}}))},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,a,t){e.exports=t(40)()},function(e,a,t){"use strict";var r=t(41);function i(){}function n(){}n.resetWarningCache=i,e.exports=function(){function e(e,a,t,i,n,o){if(o!==r){var s=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 s.name="Invariant Violation",s}}function a(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:a,element:e,elementType:e,instanceOf:a,node:e,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:i};return t.PropTypes=t,t}},function(e,a,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,a,t){"use strict";e.exports=t(43)},function(e,a,t){"use strict";var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,n=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,g=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,h=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,S=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var a=e.$$typeof;switch(a){case i:switch(e=e.type){case g:case p:case o:case l:case s:case d:return e;default:switch(e=e&&e.$$typeof){case u:case f:case m:case v:case c:return e;default:return a}}case n:return a}}}function C(e){return w(e)===p}a.AsyncMode=g,a.ConcurrentMode=p,a.ContextConsumer=u,a.ContextProvider=c,a.Element=i,a.ForwardRef=f,a.Fragment=o,a.Lazy=m,a.Memo=v,a.Portal=n,a.Profiler=l,a.StrictMode=s,a.Suspense=d,a.isAsyncMode=function(e){return C(e)||w(e)===g},a.isConcurrentMode=C,a.isContextConsumer=function(e){return w(e)===u},a.isContextProvider=function(e){return w(e)===c},a.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},a.isForwardRef=function(e){return w(e)===f},a.isFragment=function(e){return w(e)===o},a.isLazy=function(e){return w(e)===m},a.isMemo=function(e){return w(e)===v},a.isPortal=function(e){return w(e)===n},a.isProfiler=function(e){return w(e)===l},a.isStrictMode=function(e){return w(e)===s},a.isSuspense=function(e){return w(e)===d},a.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===p||e===l||e===s||e===d||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===O||e.$$typeof===S||e.$$typeof===h)},a.typeOf=w},,function(e,a){function t(a,r){return e.exports=t=Object.setPrototypeOf||function(e,a){return e.__proto__=a,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(a,r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,a){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},,,,,,,,,function(e,a,t){"use strict";t.r(a),t(29);var r=t(6),i=t.n(r),n=t(0),o=t(2),s=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return wp.customize.Control.extend(Object.assign({},{ready:function(){var e=this;e.setting.bind((function(){e.renderContent()}))},embed:function(){var e=this,a=e.section();a&&wp.customize.section(a,(function(a){a.expanded.bind((function(a){a&&e.actuallyEmbed()}))}))},actuallyEmbed:function(){"resolved"!==this.deferred.embedded.state()&&(this.renderContent(),this.deferred.embedded.resolve())},initialize:function(e,a){var t=this;t.setNotificationContainer=t.setNotificationContainer.bind(t),wp.customize.Control.prototype.initialize.call(t,e,a),wp.customize.control.bind("removed",(function e(a){t===a&&(t.destroy(),t.container.remove(),wp.customize.control.unbind("removed",e))}))},setNotificationContainer:function(e){this.notifications.container=jQuery(e),this.notifications.render()},getWrapper:function(){var e=this.container[0];if(this.params.choices.wrapper){var a=document.getElementById(this.params.choices.wrapper+"--wrapper");a&&(e=a,this.container.hide())}return e},renderContent:function(){var a=this.setting.get(),t=Object(n.createElement)(o.SlotFillProvider,null,Object(n.createElement)(e,i()({},this.params,{value:a,setNotificationContainer:this.setNotificationContainer,customizerSetting:this.setting,control:this,choices:this.params.choices,default:this.params.defaultValue})),Object(n.createElement)(o.Popover.Slot,null)),r=this.getWrapper();Object(n.render)(t,r)},destroy:function(){Object(n.unmountComponentAtNode)(this.container[0]),wp.customize.Control.prototype.destroy&&wp.customize.Control.prototype.destroy.call(this)}},a))},l=(t(30),t(4)),c=t.n(l);function u(e){return"info"===e?Object(n.createElement)("svg",{width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024","aria-hidden":"true"},Object(n.createElement)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}),Object(n.createElement)("path",{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"})):"x"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M18 6L6 18M6 6l12 12"})):"ellipsis"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(n.createElement)("rect",{x:"0",fill:"none",width:"20",height:"20"}),Object(n.createElement)("g",null,Object(n.createElement)("path",{d:"M5 10c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}))):"mobile"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",width:"1em",height:"1em"},Object(n.createElement)("path",{d:"M6 2h8c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm7 12V4H7v10h6zM8 5h4l-4 5V5z",fill:"currentColor"})):"tablet"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",width:"1em",height:"1em"},Object(n.createElement)("path",{d:"M4 2h12c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H4c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm11 14V4H5v12h10zM6 5h6l-6 5V5z",fill:"currentColor"})):"desktop"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",width:"1em",height:"1em"},Object(n.createElement)("path",{d:"M3 2h14c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1h-5v2h2c.55 0 1 .45 1 1v1H5v-1c0-.55.45-1 1-1h2v-2H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm13 9V4H4v7h12zM5 5h9L5 9V5z",fill:"currentColor"})):"dash"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M4.5 12.75a.75.75 0 01.75-.75h13.5a.75.75 0 010 1.5H5.25a.75.75 0 01-.75-.75z",fill:"currentColor"})):"plus"===e?Object(n.createElement)("svg",{fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 5v14M5 12h14"})):"lock"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),Object(n.createElement)("path",{d:"M7 11V7a5 5 0 0110 0v4"})):"unlock"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),Object(n.createElement)("path",{d:"M7 11V7a5 5 0 019.9-1"})):"chevron-down"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M6 9l6 6 6-6"})):"chevron-up"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M18 15l-6-6-6 6"})):"chevron-right"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M9 18l6-6-6-6"})):"trash"===e?Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",style:{fill:"none"},stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M3 6h18M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2M10 11v6M14 11v6"})):void 0}t(31);var g=t(1),p=function(e){var a=Object(n.useState)(!1),t=c()(a,2),r=t[0],i=t[1],s=Object(n.useState)(!1),l=c()(s,2),p=l[0],f=l[1],d=Object(n.useState)(!0),y=c()(d,2),v=y[0],m=y[1],h=Object(n.useState)(!1),b=c()(h,2),O=b[0],S=b[1],w=e.value,C=e.varNameValue,x=e.onChange,j=e.onVarChange,M=e.choices,E=e.tooltipPosition,k=void 0===E?"top center":E,N=e.tooltipText,P=void 0===N?Object(g.__)("Choose Color","generatepress"):N,_=e.hideLabel,T=void 0!==_&&_;Object(n.useEffect)((function(){m(!!w)}),[w]),Object(n.useEffect)((function(){if(O){var e=setTimeout((function(){f(w);var e=document.querySelector(".generate-color-input-wrapper input");e&&e.focus()}),350);return function(){clearTimeout(e),S(!1)}}}),[w]);var I=function(){i(!1),m(!0)},A=P;M.tooltip&&(A=M.tooltip);var B=!!M.showPalette||void 0===M.showPalette,L=!!M.showReset||void 0===M.showReset,F=generateCustomizerControls.palette,V=window.sessionStorage.getItem("generateGlobalColors");return V&&(F=JSON.parse(V)),Object(n.createElement)("div",{className:"generate-color-picker-area"},Object(n.createElement)("div",{className:"components-circular-option-picker__option-wrapper"},!r&&Object(n.createElement)(o.Tooltip,{text:A,position:k},Object(n.createElement)(o.Button,{"aria-expanded":r,className:"components-color-palette__item components-circular-option-picker__option",onClick:function(){i(!0)},"aria-label":A,style:{color:w||"transparent"}},Object(n.createElement)("span",{className:"components-color-palette__custom-color-gradient"}))),r&&Object(n.createElement)(o.Tooltip,{text:A,position:k},Object(n.createElement)(o.Button,{"aria-expanded":r,className:"components-color-palette__item components-circular-option-picker__option",onClick:I,"aria-label":A,style:{color:w||"transparent"}},Object(n.createElement)("span",{className:"components-color-palette__custom-color-gradient"})))),r&&Object(n.createElement)(o.Popover,{position:"bottom center",className:"generate-component-color-picker",onClose:I,focusOnMount:"container"},Object(n.createElement)(o.BaseControl,{key:p,label:e.label&&!T?e.label:"",id:"generate-color-input-field",className:"generate-color-input-main-label"},Object(n.createElement)(o.ColorPicker,{key:p,color:function(e){if(String(e).startsWith("var(")){var a=e.match(/\(([^)]+)\)/);if(a){var t=getComputedStyle(document.documentElement).getPropertyValue(a[1]);t&&(e=t)}}return e}(w)||"",onChangeComplete:function(e){var a;if(void 0===e.rgb||1===e.rgb.a)a=e.hex;else{var t=e.rgb,r=t.r,i=t.g,n=t.b,o=t.a;a="rgba(".concat(r,", ").concat(i,", ").concat(n,", ").concat(o,")")}x(a)},disableAlpha:!M.alpha}),Object(n.createElement)("div",{className:"generate-color-option-area"},!!M.showVarName&&Object(n.createElement)("div",{className:"generate-color-input--css-var-name-wrapper"},Object(n.createElement)(o.TextControl,{label:Object(g.__)("CSS Variable Name","generatepress"),disabled:!!v,type:"text",value:C||"",onChange:function(e){j(e)}}),!!v&&Object(n.createElement)(o.Tooltip,{text:Object(g.__)("Changing this name will remove its color from elements already using it.","generatepress")},Object(n.createElement)(o.Button,{onClick:function(){window.alert(Object(g.__)("Changing this name will break styles that are using it to define its color.","generatepress")),m(!1),setTimeout((function(){document.querySelector(".generate-color-input--css-var-name-wrapper input").focus()}),10)}},u("unlock")))),Object(n.createElement)("div",{className:"generate-color-input-wrapper"},Object(n.createElement)(o.TextControl,{id:"generate-color-input-field",className:"generate-color-input",type:"text",value:w||"",onChange:function(e){!e.startsWith("#")&&/^([0-9A-F]{3}){1,2}$/i.test(e)&&(e="#"+e),x(e),S(!0)}}),!!L&&Object(n.createElement)(o.Button,{isSmall:!0,isSecondary:!0,className:"components-color-clear-color",onClick:function(){var a=e.defaultValue?e.defaultValue:"";wp.customize.control(e.customizerSetting.id).setting.set(a),setTimeout((function(){document.querySelector(".generate-color-input-wrapper input").focus()}),10)}},Object(g.__)("Default","generatepress"))),!!B&&Object(n.createElement)(o.BaseControl,{className:"generate-component-color-picker-palette"},Object(n.createElement)(o.ColorPalette,{colors:F,value:w,onChange:function(e){void 0===e&&(e=""),x(e),f(e),setTimeout((function(){document.querySelector(".generate-color-input-wrapper input").focus()}),10)},disableCustomColors:!0,clearable:!1}))))))},f=s((function(e){var a=!e.choices.hideLabel||void 0===e.choices.hideLabel;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"description customize-control-description",dangerouslySetInnerHTML:{__html:e.description}}),Object(n.createElement)("div",{className:"customize-control-notifications-container",ref:e.setNotificationContainer}),Object(n.createElement)(o.BaseControl,{className:"generate-component-color-picker-wrapper","data-toggleId":e.choices.toggleId?e.choices.toggleId:null},!!e.label&&a&&Object(n.createElement)("div",{className:"generate-color-component-label"},Object(n.createElement)("span",null,e.label)),Object(n.createElement)(p,i()({},e,{onChange:function(a){var t;t=a,wp.customize.control(e.customizerSetting.id).setting.set(t)}}))))}),{getWrapper:function(){var e=this.container[0];if(this.params.choices.wrapper){var a=document.getElementById(this.params.choices.wrapper+"--wrapper");a&&(e=a,this.container[0].style.display="none")}return this.params.choices.toggleId&&e.setAttribute("data-toggleId",this.params.choices.toggleId),e}});wp.customize.controlConstructor["generate-color-control"]=f;var d=t(8),y=t.n(d),v=t(7),m=t.n(v),h=t(5),b=t.n(h),O=(t(21),t(10));function S(){return(S=Object.assign||function(e){for(var a=1;a0?B(W,--G):0,z--,10===U&&(z=1,R--),U}function J(){return U=G2||X(U)>3?"":" "}function ie(e,a){for(;--a&&J()&&!(U<48||U>102||U>57&&U<65||U>70&&U<97););return Q(e,Z()+(a<6&&32==q()&&32==J()))}function ne(e,a){for(;J()&&e+U!==57&&(e+U!==84||47!==q()););return"/*"+Q(a,G-1)+"*"+_(47===e?e:J())}function oe(e){for(;!X(q());)J();return Q(e,G)}function se(e){return ae(function e(a,t,r,i,n,o,s,l,c){for(var u=0,g=0,p=s,f=0,d=0,y=0,v=1,m=1,h=1,b=0,O="",S=n,w=o,C=i,x=O;m;)switch(y=b,b=J()){case 34:case 39:case 91:case 40:x+=te(b);break;case 9:case 10:case 13:case 32:x+=re(y);break;case 92:x+=ie(Z()-1,7);continue;case 47:switch(q()){case 42:case 47:D(ce(ne(J(),Z()),t,r),c);break;default:x+="/"}break;case 123*v:l[u++]=F(x)*h;case 125*v:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+g:d>0&&F(x)-p&&D(d>32?ue(x+";",i,r,p-1):ue(I(x," ","")+";",i,r,p-2),c);break;case 59:x+=";";default:if(D(C=le(x,t,r,u,g,n,l,O,S=[],w=[],p),o),123===b)if(0===g)e(x,t,C,C,S,o,p,l,w);else switch(f){case 100:case 109:case 115:e(a,C,C,i&&D(le(a,C,C,0,0,n,l,O,n,S=[],p),w),n,w,p,l,i?S:w);break;default:e(x,C,C,C,[""],w,p,l,w)}}u=g=d=0,v=h=1,O=x="",p=s;break;case 58:p=1+F(x),d=y;default:if(v<1)if(123==b)--v;else if(125==b&&0==v++&&125==Y())continue;switch(x+=_(b),b*v){case 38:h=g>0?1:(x+="\f",-1);break;case 44:l[u++]=(F(x)-1)*h,h=1;break;case 64:45===q()&&(x+=te(J())),f=q(),g=F(O=x+=oe(Z())),b++;break;case 45:45===y&&2==F(x)&&(v=0)}}return o}("",null,null,null,[""],e=ee(e),0,[0],e))}function le(e,a,t,r,i,n,o,s,l,c,u){for(var g=i-1,p=0===i?n:[""],f=V(p),d=0,y=0,v=0;d0?p[m]+" "+h:I(h,/&\f/g,p[m])))&&(l[v++]=b);return K(e,a,t,0===i?"rule":s,l,c,u)}function ce(e,a,t){return K(e,a,t,k,_(U),L(e,2,-2),0)}function ue(e,a,t,r){return K(e,a,t,N,L(e,0,r),L(e,r+1,-1),r)}function ge(e,a){for(var t="",r=V(e),i=0;i6)switch(B(a,t+1)){case 109:if(45!==B(a,t+4))break;case 102:return I(a,/(.+:)(.+)-([^]+)/,"$1"+E+"$2-$3$1"+M+(108==B(a,t+3)?"$3":"$2-$3"))+a;case 115:return~A(a,"stretch")?e(I(a,"stretch","fill-available"),t)+a:a}break;case 4949:if(115!==B(a,t+1))break;case 6444:switch(B(a,F(a)-3-(~A(a,"!important")&&10))){case 107:return I(a,":",":"+E)+a;case 101:return I(a,/(.+:)([^;!]+)(;|!.+)?/,"$1"+E+(45===B(a,14)?"inline-":"")+"box$3$1"+E+"$2$3$1"+j+"$2box$3")+a}break;case 5936:switch(B(a,t+11)){case 114:return E+a+j+I(a,/[svh]\w+-[tblr]{2}/,"tb")+a;case 108:return E+a+j+I(a,/[svh]\w+-[tblr]{2}/,"tb-rl")+a;case 45:return E+a+j+I(a,/[svh]\w+-[tblr]{2}/,"lr")+a}return E+a+j+a+a}return a}(e.value,e.length);break;case"@keyframes":return ge([$(I(e.value,"@","@"+E),e,"")],r);case"rule":if(e.length)return function(e,a){return e.map(a).join("")}(e.props,(function(a){switch(function(e,a){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(a)){case":read-only":case":read-write":return ge([$(I(a,/:(read-\w+)/,":-moz-$1"),e,"")],r);case"::placeholder":return ge([$(I(a,/:(plac\w+)/,":"+E+"input-$1"),e,""),$(I(a,/:(plac\w+)/,":-moz-$1"),e,""),$(I(a,/:(plac\w+)/,j+"input-$1"),e,"")],r)}return""}))}}var ve=function(e){var a={};return function(t){return void 0===a[t]&&(a[t]=e(t)),a[t]}},me=new WeakMap,he=function(e){if("rule"===e.type&&e.parent&&e.length){for(var a=e.value,t=e.parent,r=e.column===t.column&&e.line===t.line;"rule"!==t.type;)if(!(t=t.parent))return;if((1!==e.props.length||58===a.charCodeAt(0)||me.get(t))&&!r){me.set(e,!0);for(var i=[],n=function(e,a){return ae(function(e,a){var t=-1,r=44;do{switch(X(r)){case 0:38===r&&12===q()&&(a[t]=1),e[t]+=oe(G-1);break;case 2:e[t]+=te(r);break;case 4:if(44===r){e[++t]=58===q()?"&\f":"",a[t]=e[t].length;break}default:e[t]+=_(r)}}while(r=J());return e}(ee(e),a))}(a,i),o=t.props,s=0,l=0;s=4;++r,i-=4)a=1540483477*(65535&(a=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(a>>>16)<<16),t=1540483477*(65535&(a^=a>>>24))+(59797*(a>>>16)<<16)^1540483477*(65535&t)+(59797*(t>>>16)<<16);switch(i){case 3:t^=(255&e.charCodeAt(r+2))<<16;case 2:t^=(255&e.charCodeAt(r+1))<<8;case 1:t=1540483477*(65535&(t^=255&e.charCodeAt(r)))+(59797*(t>>>16)<<16)}return(((t=1540483477*(65535&(t^=t>>>13))+(59797*(t>>>16)<<16))^t>>>15)>>>0).toString(36)},je={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Me=/[A-Z]|^ms/g,Ee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ke=function(e){return 45===e.charCodeAt(1)},Ne=function(e){return null!=e&&"boolean"!=typeof e},Pe=ve((function(e){return ke(e)?e:e.replace(Me,"-$&").toLowerCase()})),_e=function(e,a){switch(e){case"animation":case"animationName":if("string"==typeof a)return a.replace(Ee,(function(e,a,t){return Ie={name:a,styles:t,next:Ie},a}))}return 1===je[e]||ke(e)||"number"!=typeof a||0===a?a:a+"px"};function Te(e,a,t){if(null==t)return"";if(void 0!==t.__emotion_styles)return t;switch(typeof t){case"boolean":return"";case"object":if(1===t.anim)return Ie={name:t.name,styles:t.styles,next:Ie},t.name;if(void 0!==t.styles){var r=t.next;if(void 0!==r)for(;void 0!==r;)Ie={name:r.name,styles:r.styles,next:Ie},r=r.next;return t.styles+";"}return function(e,a,t){var r="";if(Array.isArray(t))for(var i=0;i=0||(i[t]=e[t]);return i}(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function Je(e){return(Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var qe=t(17),Ze=t.n(qe);function Qe(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function Xe(e,a){for(var t=0;t-1}function ma(e){return va(e)?window.pageYOffset:e.scrollTop}function ha(e,a){va(e)?window.scrollTo(0,a):e.scrollTop=a}function ba(e,a,t,r){return t*((e=e/r-1)*e*e+1)+a}function Oa(e,a){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ga,i=ma(e),n=a-i,o=10,s=0;function l(){var a=ba(s+=o,i,n,t);ha(e,a),s=f)return{placement:"bottom",maxHeight:a};if(C>=f&&!o)return n&&Oa(l,x,160),{placement:"bottom",maxHeight:a};if(!o&&C>=r||o&&S>=r)return n&&Oa(l,x,160),{placement:"bottom",maxHeight:o?S-h:C-h};if("auto"===i||o){var M=a,E=o?O:w;return E>=r&&(M=Math.min(E-h-s.controlHeight,a)),{placement:"top",maxHeight:M}}if("bottom"===i)return n&&ha(l,x),{placement:"bottom",maxHeight:a};break;case"top":if(O>=f)return{placement:"top",maxHeight:a};if(w>=f&&!o)return n&&Oa(l,j,160),{placement:"top",maxHeight:a};if(!o&&w>=r||o&&O>=r){var k=a;return(!o&&w>=r||o&&O>=r)&&(k=o?O-b:w-b),n&&Oa(l,j,160),{placement:"top",maxHeight:k}}return{placement:"bottom",maxHeight:a};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}var Ea=function(e){return"auto"===e?"bottom":e},ka=Object(w.createContext)({getPortalPlacement:null}),Na=function(e){ta(t,e);var a=ua(t);function t(){var e;Qe(this,t);for(var r=arguments.length,i=new Array(r),n=0;ne.length)&&(a=e.length);for(var t=0,r=new Array(a);t0,y=g-p-u,v=!1;y>a&&o.current&&(r&&r(e),o.current=!1),d&&s.current&&(n&&n(e),s.current=!1),d&&a>y?(t&&!o.current&&t(e),f.scrollTop=g,v=!0,o.current=!0):!d&&-a>u&&(i&&!s.current&&i(e),f.scrollTop=0,v=!0,s.current=!0),v&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[]),g=Object(w.useCallback)((function(e){u(e,e.deltaY)}),[u]),p=Object(w.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),f=Object(w.useCallback)((function(e){var a=l.current-e.changedTouches[0].clientY;u(e,a)}),[u]),d=Object(w.useCallback)((function(e){if(e){var a=!!ja&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",g,a),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",p,a),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",f,a)}}),[f,p,g]),y=Object(w.useCallback)((function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",g,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",p,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",f,!1))}),[f,p,g]);return Object(w.useEffect)((function(){if(a){var e=c.current;return d(e),function(){y(e)}}}),[a,d,y]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),n=function(e){var a=e.isEnabled,t=e.accountForScrollbars,r=void 0===t||t,i=Object(w.useRef)({}),n=Object(w.useRef)(null),o=Object(w.useCallback)((function(e){if(Mt){var a=document.body,t=a&&a.style;if(r&&Ot.forEach((function(e){var a=t&&t[e];i.current[e]=a})),r&&Et<1){var n=parseInt(i.current.paddingRight,10)||0,o=document.body?document.body.clientWidth:0,s=window.innerWidth-o+n||0;Object.keys(St).forEach((function(e){var a=St[e];t&&(t[e]=a)})),t&&(t.paddingRight="".concat(s,"px"))}a&&jt()&&(a.addEventListener("touchmove",wt,kt),e&&(e.addEventListener("touchstart",xt,kt),e.addEventListener("touchmove",Ct,kt))),Et+=1}}),[]),s=Object(w.useCallback)((function(e){if(Mt){var a=document.body,t=a&&a.style;Et=Math.max(Et-1,0),r&&Et<1&&Ot.forEach((function(e){var a=i.current[e];t&&(t[e]=a)})),a&&jt()&&(a.removeEventListener("touchmove",wt,kt),e&&(e.removeEventListener("touchstart",xt,kt),e.removeEventListener("touchmove",Ct,kt)))}}),[]);return Object(w.useEffect)((function(){if(a){var e=n.current;return o(e),function(){s(e)}}}),[a,o,s]),function(e){n.current=e}}({isEnabled:t});return Ge(C.a.Fragment,null,t&&Ge("div",{onClick:Nt,css:Pt}),a((function(e){i(e),n(e)})))}var Tt={clearIndicator:Wa,container:function(e){var a=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:a?"none":null,position:"relative"}},control:function(e){var a=e.isDisabled,t=e.isFocused,r=e.theme,i=r.colors,n=r.borderRadius,o=r.spacing;return{label:"control",alignItems:"center",backgroundColor:a?i.neutral5:i.neutral0,borderColor:a?i.neutral10:t?i.primary:i.neutral20,borderRadius:n,borderStyle:"solid",borderWidth:1,boxShadow:t?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:t?i.primary:i.neutral30}}},dropdownIndicator:Ua,group:function(e){var a=e.theme.spacing;return{paddingBottom:2*a.baseUnit,paddingTop:2*a.baseUnit}},groupHeading:function(e){var a=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*a.baseUnit,paddingRight:3*a.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var a=e.isDisabled,t=e.theme,r=t.spacing.baseUnit,i=t.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:a?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var a=e.isDisabled,t=e.theme,r=t.spacing,i=t.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:a?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var a=e.isFocused,t=e.size,r=e.theme,i=r.colors,n=r.spacing.baseUnit;return{label:"loadingIndicator",color:a?i.neutral60:i.neutral20,display:"flex",padding:2*n,transition:"color 150ms",alignSelf:"center",fontSize:t,lineHeight:1,marginRight:t,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Ta,menu:function(e){var a,t=e.placement,r=e.theme,i=r.borderRadius,n=r.spacing,o=r.colors;return ra(a={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(t),"100%"),ra(a,"backgroundColor",o.neutral0),ra(a,"borderRadius",i),ra(a,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),ra(a,"marginBottom",n.menuGutter),ra(a,"marginTop",n.menuGutter),ra(a,"position","absolute"),ra(a,"width","100%"),ra(a,"zIndex",1),a},menuList:function(e){var a=e.maxHeight,t=e.theme.spacing.baseUnit;return{maxHeight:a,overflowY:"auto",paddingBottom:t,paddingTop:t,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var a=e.rect,t=e.offset,r=e.position;return{left:a.left,position:r,top:t,width:a.width,zIndex:1}},multiValue:function(e){var a=e.theme,t=a.spacing,r=a.borderRadius;return{label:"multiValue",backgroundColor:a.colors.neutral10,borderRadius:r/2,display:"flex",margin:t.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var a=e.theme,t=a.borderRadius,r=a.colors,i=e.cropWithEllipsis;return{borderRadius:t/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var a=e.theme,t=a.spacing,r=a.borderRadius,i=a.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:t.baseUnit,paddingRight:t.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:_a,option:function(e){var a=e.isDisabled,t=e.isFocused,r=e.isSelected,i=e.theme,n=i.spacing,o=i.colors;return{label:"option",backgroundColor:r?o.primary:t?o.primary25:"transparent",color:a?o.neutral20:r?o.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*n.baseUnit,"px ").concat(3*n.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!a&&(r?o.primary:o.primary50)}}},placeholder:function(e){var a=e.theme,t=a.spacing;return{label:"placeholder",color:a.colors.neutral50,marginLeft:t.baseUnit/2,marginRight:t.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var a=e.isDisabled,t=e.theme,r=t.spacing,i=t.colors;return{label:"singleValue",color:a?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var a=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(a.baseUnit/2,"px ").concat(2*a.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},It={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},At={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Sa(),captureMenuScroll:!Sa(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,a){var t=sa({ignoreCase:!0,ignoreAccents:!0,stringify:ht,trim:!0,matchFrom:"any"},void 0),r=t.ignoreCase,i=t.ignoreAccents,n=t.stringify,o=t.trim,s=t.matchFrom,l=o?mt(a):a,c=o?mt(n(e)):n(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=vt(l),c=yt(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var a=e.count;return"".concat(a," result").concat(1!==a?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function Bt(e,a,t,r){return{type:"option",data:a,isDisabled:zt(e,a,t),isSelected:Ht(e,a,t),label:Dt(e,a),value:Rt(e,a),index:r}}function Lt(e,a){return e.options.map((function(t,r){if(t.options){var i=t.options.map((function(t,r){return Bt(e,t,a,r)})).filter((function(a){return Vt(e,a)}));return i.length>0?{type:"group",data:t,options:i,index:r}:void 0}var n=Bt(e,t,a,r);return Vt(e,n)?n:void 0})).filter((function(e){return!!e}))}function Ft(e){return e.reduce((function(e,a){return"group"===a.type?e.push.apply(e,tt(a.options.map((function(e){return e.data})))):e.push(a.data),e}),[])}function Vt(e,a){var t=e.inputValue,r=void 0===t?"":t,i=a.data,n=a.isSelected,o=a.label,s=a.value;return(!Ut(e)||!n)&&Gt(e,{label:o,value:s,data:i},r)}var Dt=function(e,a){return e.getOptionLabel(a)},Rt=function(e,a){return e.getOptionValue(a)};function zt(e,a,t){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(a,t)}function Ht(e,a,t){if(t.indexOf(a)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(a,t);var r=Rt(e,a);return t.some((function(a){return Rt(e,a)===r}))}function Gt(e,a,t){return!e.filterOption||e.filterOption(a,t)}var Ut=function(e){var a=e.hideSelectedOptions,t=e.isMulti;return void 0===a?t:a},Wt=1,Kt=function(e){ta(t,e);var a=ua(t);function t(e){var r;return Qe(this,t),(r=a.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,a){var t=r.props,i=t.onChange,n=t.name;a.name=n,r.ariaOnChange(e,a),i(e,a)},r.setValue=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",t=arguments.length>2?arguments[2]:void 0,i=r.props,n=i.closeMenuOnSelect,o=i.isMulti;r.onInputChange("",{action:"set-value"}),n&&(r.setState({inputIsHiddenAfterUpdate:!o}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:a,option:t})},r.selectOption=function(e){var a=r.props,t=a.blurInputOnSelect,i=a.isMulti,n=a.name,o=r.state.selectValue,s=i&&r.isOptionSelected(e,o),l=r.isOptionDisabled(e,o);if(s){var c=r.getOptionValue(e);r.setValue(o.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",name:n});i?r.setValue([].concat(tt(o),[e]),"select-option",e):r.setValue(e,"select-option")}t&&r.blurInput()},r.removeValue=function(e){var a=r.props.isMulti,t=r.state.selectValue,i=r.getOptionValue(e),n=t.filter((function(e){return r.getOptionValue(e)!==i})),o=a?n:n[0]||null;r.onChange(o,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(r.props.isMulti?[]:null,{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,a=r.state.selectValue,t=a[a.length-1],i=a.slice(0,a.length-1),n=e?i:i[0]||null;r.onChange(n,{action:"pop-value",removedValue:t})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,a=new Array(e),t=0;t5||n>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var a=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(a,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return Ut(r.props)},r.onKeyDown=function(e){var a=r.props,t=a.isMulti,i=a.backspaceRemovesValue,n=a.escapeClearsValue,o=a.inputValue,s=a.isClearable,l=a.isDisabled,c=a.menuIsOpen,u=a.onKeyDown,g=a.tabSelectsValue,p=a.openMenuOnFocus,f=r.state,d=f.focusedOption,y=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!t||o)return;r.focusValue("previous");break;case"ArrowRight":if(!t||o)return;r.focusValue("next");break;case"Delete":case"Backspace":if(o)return;if(y)r.removeValue(y);else{if(!i)return;t?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!g||!d||p&&r.isOptionSelected(d,v))return;r.selectOption(d);break;case"Enter":if(229===e.keyCode)break;if(c){if(!d)return;if(r.isComposing)return;r.selectOption(d);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&n&&r.clearValue();break;case" ":if(o)return;if(!c){r.openMenu("first");break}if(!d)return;r.selectOption(d);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++Wt),r.state.selectValue=da(e.value),r}return ea(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var a,t,r,i,n,o=this.props,s=o.isDisabled,l=o.menuIsOpen,c=this.state.isFocused;(c&&!s&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),c&&s&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(a=this.menuListRef,t=this.focusedOptionRef,r=a.getBoundingClientRect(),i=t.getBoundingClientRect(),n=t.offsetHeight/3,i.bottom+n>r.bottom?ha(a,Math.min(t.offsetTop+t.clientHeight-a.offsetHeight+n,a.scrollHeight)):i.top-n-1&&(o=s)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:n[o]},(function(){return a.onMenuOpen()}))}},{key:"focusValue",value:function(e){var a=this.state,t=a.selectValue,r=a.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=t.indexOf(r);r||(i=-1);var n=t.length-1,o=-1;if(t.length){switch(e){case"previous":o=0===i?0:-1===i?n:i-1;break;case"next":i>-1&&i0&&void 0!==arguments[0]?arguments[0]:"first",a=this.props.pageSize,t=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,n=r.indexOf(t);t||(n=-1),"up"===e?i=n>0?n-1:r.length-1:"down"===e?i=(n+1)%r.length:"pageup"===e?(i=n-a)<0&&(i=0):"pagedown"===e?(i=n+a)>r.length-1&&(i=r.length-1):"last"===e&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(It):sa(sa({},It),this.props.theme):It}},{key:"getCommonProps",value:function(){var e=this.clearValue,a=this.cx,t=this.getStyles,r=this.getValue,i=this.selectOption,n=this.setValue,o=this.props,s=o.isMulti,l=o.isRtl,c=o.options;return{clearValue:e,cx:a,getStyles:t,getValue:r,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:c,selectOption:i,selectProps:o,setValue:n,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,a=e.isClearable,t=e.isMulti;return void 0===a?t:a}},{key:"isOptionDisabled",value:function(e,a){return zt(this.props,e,a)}},{key:"isOptionSelected",value:function(e,a){return Ht(this.props,e,a)}},{key:"filterOption",value:function(e,a){return Gt(this.props,e,a)}},{key:"formatOptionLabel",value:function(e,a){if("function"==typeof this.props.formatOptionLabel){var t=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:a,inputValue:t,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,a=e.isDisabled,t=e.isSearchable,r=e.inputId,i=e.inputValue,n=e.tabIndex,o=e.form,s=this.getComponents().Input,l=this.state.inputIsHidden,c=this.commonProps,u=r||this.getElementId("input"),g={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return t?C.a.createElement(s,S({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:u,innerRef:this.getInputRef,isDisabled:a,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:n,form:o,type:"text",value:i},g)):C.a.createElement(bt,S({id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ga,onFocus:this.onInputFocus,readOnly:!0,disabled:a,tabIndex:n,form:o,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,a=this.getComponents(),t=a.MultiValue,r=a.MultiValueContainer,i=a.MultiValueLabel,n=a.MultiValueRemove,o=a.SingleValue,s=a.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,g=c.isDisabled,p=c.isMulti,f=c.inputValue,d=c.placeholder,y=this.state,v=y.selectValue,m=y.focusedValue,h=y.isFocused;if(!this.hasValue()||!u)return f?null:C.a.createElement(s,S({},l,{key:"placeholder",isDisabled:g,isFocused:h}),d);if(p)return v.map((function(a,o){var s=a===m;return C.a.createElement(t,S({},l,{components:{Container:r,Label:i,Remove:n},isFocused:s,isDisabled:g,key:"".concat(e.getOptionValue(a)).concat(o),index:o,removeProps:{onClick:function(){return e.removeValue(a)},onTouchEnd:function(){return e.removeValue(a)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:a}),e.formatOptionLabel(a,"value"))}));if(f)return null;var b=v[0];return C.a.createElement(o,S({},l,{data:b,isDisabled:g}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,a=this.commonProps,t=this.props,r=t.isDisabled,i=t.isLoading,n=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var o={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return C.a.createElement(e,S({},a,{innerProps:o,isFocused:n}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,a=this.commonProps,t=this.props,r=t.isDisabled,i=t.isLoading,n=this.state.isFocused;return e&&i?C.a.createElement(e,S({},a,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:n})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),a=e.DropdownIndicator,t=e.IndicatorSeparator;if(!a||!t)return null;var r=this.commonProps,i=this.props.isDisabled,n=this.state.isFocused;return C.a.createElement(t,S({},r,{isDisabled:i,isFocused:n}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var a=this.commonProps,t=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return C.a.createElement(e,S({},a,{innerProps:i,isDisabled:t,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,a=this.getComponents(),t=a.Group,r=a.GroupHeading,i=a.Menu,n=a.MenuList,o=a.MenuPortal,s=a.LoadingMessage,l=a.NoOptionsMessage,c=a.Option,u=this.commonProps,g=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,d=p.inputValue,y=p.isLoading,v=p.loadingMessage,m=p.minMenuHeight,h=p.maxMenuHeight,b=p.menuIsOpen,O=p.menuPlacement,w=p.menuPosition,x=p.menuPortalTarget,j=p.menuShouldBlockScroll,M=p.menuShouldScrollIntoView,E=p.noOptionsMessage,k=p.onMenuScrollToTop,N=p.onMenuScrollToBottom;if(!b)return null;var P,_=function(a,t){var r=a.type,i=a.data,n=a.isDisabled,o=a.isSelected,s=a.label,l=a.value,p=g===i,f=n?void 0:function(){return e.onOptionHover(i)},d=n?void 0:function(){return e.selectOption(i)},y="".concat(e.getElementId("option"),"-").concat(t),v={id:y,onClick:d,onMouseMove:f,onMouseOver:f,tabIndex:-1};return C.a.createElement(c,S({},u,{innerProps:v,data:i,isDisabled:n,isSelected:o,key:y,label:s,type:r,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(a.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(a){if("group"===a.type){var i=a.data,n=a.options,o=a.index,s="".concat(e.getElementId("group"),"-").concat(o),l="".concat(s,"-heading");return C.a.createElement(t,S({},u,{key:s,data:i,options:n,Heading:r,headingProps:{id:l,data:a.data},label:e.formatGroupLabel(a.data)}),a.options.map((function(e){return _(e,"".concat(o,"-").concat(e.index))})))}if("option"===a.type)return _(a,"".concat(a.index))}));else if(y){var T=v({inputValue:d});if(null===T)return null;P=C.a.createElement(s,u,T)}else{var I=E({inputValue:d});if(null===I)return null;P=C.a.createElement(l,u,I)}var A={minMenuHeight:m,maxMenuHeight:h,menuPlacement:O,menuPosition:w,menuShouldScrollIntoView:M},B=C.a.createElement(Na,S({},u,A),(function(a){var t=a.ref,r=a.placerProps,o=r.placement,s=r.maxHeight;return C.a.createElement(i,S({},u,A,{innerRef:t,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:y,placement:o}),C.a.createElement(_t,{captureEnabled:f,onTopArrive:k,onBottomArrive:N,lockEnabled:j},(function(a){return C.a.createElement(n,S({},u,{innerRef:function(t){e.getMenuListRef(t),a(t)},isLoading:y,maxHeight:s,focusedOption:g}),P)})))}));return x||"fixed"===w?C.a.createElement(o,S({},u,{appendTo:x,controlElement:this.controlRef,menuPlacement:O,menuPosition:w}),B):B}},{key:"renderFormField",value:function(){var e=this,a=this.props,t=a.delimiter,r=a.isDisabled,i=a.isMulti,n=a.name,o=this.state.selectValue;if(n&&!r){if(i){if(t){var s=o.map((function(a){return e.getOptionValue(a)})).join(t);return C.a.createElement("input",{name:n,type:"hidden",value:s})}var l=o.length>0?o.map((function(a,t){return C.a.createElement("input",{key:"i-".concat(t),name:n,type:"hidden",value:e.getOptionValue(a)})})):C.a.createElement("input",{name:n,type:"hidden"});return C.a.createElement("div",null,l)}var c=o[0]?this.getOptionValue(o[0]):"";return C.a.createElement("input",{name:n,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,a=this.state,t=a.ariaSelection,r=a.focusedOption,i=a.focusedValue,n=a.isFocused,o=a.selectValue,s=this.getFocusableOptions();return C.a.createElement(lt,S({},e,{ariaSelection:t,focusedOption:r,focusedValue:i,isFocused:n,selectValue:o,focusableOptions:s}))}},{key:"render",value:function(){var e=this.getComponents(),a=e.Control,t=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,n=this.props,o=n.className,s=n.id,l=n.isDisabled,c=n.menuIsOpen,u=this.state.isFocused,g=this.commonProps=this.getCommonProps();return C.a.createElement(r,S({},g,{className:o,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),C.a.createElement(a,S({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),C.a.createElement(i,S({},g,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),C.a.createElement(t,S({},g,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,a){var t=a.prevProps,r=a.clearFocusValueOnUpdate,i=a.inputIsHiddenAfterUpdate,n=e.options,o=e.value,s=e.menuIsOpen,l=e.inputValue,c={};if(t&&(o!==t.value||n!==t.options||s!==t.menuIsOpen||l!==t.inputValue)){var u=da(o),g=s?function(e,a){return Ft(Lt(e,a))}(e,u):[],p=r?function(e,a){var t=e.focusedValue,r=e.selectValue.indexOf(t);if(r>-1){if(a.indexOf(t)>-1)return t;if(r-1?t:a[0]}(a,g),focusedValue:p,clearFocusValueOnUpdate:!1}}var f=null!=i&&e!==t?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{};return sa(sa(sa({},c),f),{},{prevProps:e})}}]),t}(w.Component);Kt.defaultProps=At;var $t,Yt,Jt,qt=(t(36),t(38),w.Component,$t=Kt,Jt=Yt=function(e){ta(t,e);var a=ua(t);function t(){var e;Qe(this,t);for(var r=arguments.length,i=new Array(r),n=0;n1?t-1:0),i=1;i0&&a.forEach((function(e,r){t.push({value:a[r].fontFamily,label:a[r].fontFamily})})),t),onChange:function(e){s("fontFamily",e,r)}})};function mr(e,a){var t=[{value:"",label:Object(g.__)("Default","generatepress")},{value:"normal",label:Object(g.__)("Normal","generatepress")},{value:"bold",label:Object(g.__)("Bold","generatepress")},{value:"100",label:"100"},{value:"200",label:"200"},{value:"300",label:"300"},{value:"400",label:"400"},{value:"500",label:"500"},{value:"600",label:"600"},{value:"700",label:"700"},{value:"800",label:"800"},{value:"900",label:"900"}];return void 0!==O[e]&&"undefined"!==a.googleFontVariants&&(t=[{value:"",label:Object(g.__)("Default","generatepress")},{value:"normal",label:Object(g.__)("Normal","generatepress")},{value:"bold",label:Object(g.__)("Bold","generatepress")}],a.filter((function(a){return a.fontFamily===e})).forEach((function(e){var a=e.googleFontVariants.replaceAll(" ","");(a=a.split(",")).filter((function(e){var a=e.match(/[a-z]/g),t=e.match(/[0-9]/g);return!(a&&t||"italic"===e||"regular"===e||""===e)})).forEach((function(e){t.push({value:e,label:e})}))}))),t}var hr=function(e){var a=e.index,t=e.value,r=e.fontFamily,i=e.onChange;return Object(n.createElement)(o.SelectControl,{label:Object(g.__)("Font Weight","generatepress"),value:t,options:mr(r,ur()),onChange:function(e){i("fontWeight",e,a)}})},br=function(e){var a=e.index,t=e.value,r=e.onChange;return Object(n.createElement)(o.SelectControl,{label:Object(g.__)("Text Transform","generatepress"),value:t,options:[{value:"",label:Object(g.__)("Default","generatepress")},{value:"uppercase",label:Object(g.__)("Uppercase","generatepress")},{value:"lowercase",label:Object(g.__)("Lowercase","generatepress")},{value:"capitalize",label:Object(g.__)("Capitalize","generatepress")},{value:"initial",label:Object(g.__)("Normal","generatepress")}],onChange:function(e){r("textTransform",e,a)}})},Or=(t(44),function(e){var a=Object(n.useState)("desktop"),t=c()(a,2),r=(t[0],t[1]),i=e.label,s=e.devices;return Object(n.createElement)("div",{className:"components-generate-units-control-header__units"},Object(n.createElement)("div",{className:"components-generate-units-control-label__units"},i),Object(n.createElement)("div",{className:"components-generate-control__units"},Object(n.createElement)(o.ButtonGroup,{className:"components-generate-control-buttons__units","aria-label":Object(g.__)("Select Units","generatepress")},s.map((function(e){var a=Object(g.__)("Desktop","generatepress");return"tablet"===e&&(a=Object(g.__)("Tablet","generatepress")),"mobile"===e&&(a=Object(g.__)("Mobile","generatepress")),Object(n.createElement)(o.Tooltip /* translators: Unit type (px, em, %) */,{text:Object(g.sprintf)(Object(g.__)("%s Preview","generatepress"),a),key:e},Object(n.createElement)(o.Button,{key:e,className:"components-generate-control-button__units--"+e,isSmall:!0 /* translators: %s: values associated with CSS syntax, 'Pixel', 'Em', 'Percentage' */,"aria-label":a,onClick:function(){wp.customize.previewedDevice.set(e),r(e)}},u(e)))})))))}),Sr=t(22),wr=t.n(Sr),Cr=t(23),xr=t.n(Cr),jr=t(24),Mr=t.n(jr),Er=t(25),kr=t.n(Er),Nr=t(20),Pr=t.n(Nr);t(47);var _r=function(e){Mr()(i,e);var a,t,r=(a=i,t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Pr()(a);if(t){var i=Pr()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return kr()(this,e)});function i(){return wr()(this,i),r.apply(this,arguments)}return xr()(i,[{key:"render",value:function(){var e=this.props,a=e.label,t=e.value,r=e.onChange,i=e.rangeMin,s=void 0===i?0:i,l=e.rangeMax,c=void 0===l?100:l,u=e.inputMin,g=void 0===u?"":u,p=e.inputMax,f=void 0===p?"":p,d=e.step,y=void 0===d?1:d,v=e.help,m=void 0===v?"":v,h=e.beforeIcon,b=void 0===h?"":h,O=e.initialPosition,S=void 0===O?"":O,w=e.placeholder,C=void 0===w?"":w;return Object(n.createElement)("div",{className:"components-generate-range-control"},a&&Object(n.createElement)("div",{className:"components-generate-range-control--label"},a),Object(n.createElement)("div",{className:"components-generate-range-control--wrapper"},Object(n.createElement)("div",{className:"components-generate-range-control--range"},Object(n.createElement)(o.RangeControl,{className:"generate-range-control-range",beforeIcon:b,value:ir(t)?parseFloat(t):"",onChange:function(e){return r(e)},min:s,max:c,step:y,withInputField:!1,initialPosition:S})),Object(n.createElement)("div",{className:"components-generate-range-control-input"},Object(n.createElement)(o.TextControl,{type:"number",placeholder:""!==C?C:"",min:g,max:f,step:y,value:ir(t)?t:"",onChange:function(e){return r(e)}}))),m&&Object(n.createElement)("p",{className:"components-base-control__help"},m))}}]),i}(n.Component),Tr=(t(48),function(e){var a=e.value,t=e.onClick,r=e.units;return Object(n.createElement)("div",{className:"components-generate--control__units"},Object(n.createElement)(o.Dropdown,{className:"generate-component-control--unit-picker",contentClassName:"generate-component-control--unit-picker-area",position:"middle center",focusOnMount:"container",renderToggle:function(e){var t=e.isOpen,r=e.onToggle;return Object(n.createElement)(o.Button,{onClick:r,"aria-expanded":t},a||u("dash"))},renderContent:function(e){var i=e.onClose;return Object(n.createElement)(o.ButtonGroup,{className:"components-generate--control-buttons__units","aria-label":Object(g.__)("Select Units","generatepress")},r.map((function(e){var r=e,s=e||u("dash");return""===e&&(r=Object(g.__)("No Unit","generatepress")),"px"===e&&(r=Object(g._x)("Pixel","A size unit for CSS markup","generatepress")),"em"===e&&(r=Object(g._x)("Em","A size unit for CSS markup","generatepress")),"%"===e&&(r=Object(g._x)("Percentage","A size unit for CSS markup","generatepress")),"deg"===e&&(r=Object(g._x)("Degree","A size unit for CSS markup","generatepress")),Object(n.createElement)(o.Tooltip /* translators: Unit type (px, em, %) */,{text:e?Object(g.sprintf)(Object(g.__)("%s Units","generatepress"),r):r,key:e},Object(n.createElement)(o.Button,{key:e,className:"components-generate--control-button__units--"+e,isSmall:!0,isPrimary:a===e,"aria-pressed":a===e diff --git a/wp-content/themes/generatepress/assets/dist/style-customizer.css b/wp-content/themes/generatepress/assets/dist/style-customizer.css index 93df01d2..dacbcc54 100644 --- a/wp-content/themes/generatepress/assets/dist/style-customizer.css +++ b/wp-content/themes/generatepress/assets/dist/style-customizer.css @@ -1,6 +1,6 @@ .components-base-control__help{margin-top:2px;margin-bottom:0}.components-base-control__label{display:block;margin-bottom:10px}.generate-customize-control-wrapper{display:flex}.generate-customize-control-wrapper[data-wrapper-type=color]>div:first-child{flex-grow:1}.generate-customize-control-wrapper[data-wrapper-type=color]>div:not(:first-child):not(:empty){margin-left:5px}.generate-customize-control-wrapper[data-wrapper-type=two-col]>div{flex-basis:calc(50% - 5px)}.generate-customize-control-wrapper[data-wrapper-type=two-col]>div:nth-child(odd){margin-right:5px}.generate-customize-control-wrapper[data-wrapper-type=two-col]>div:nth-child(even){margin-left:5px}.generate-customize-control--popover>.components-popover__content{padding:15px;width:280px;box-sizing:border-box}.generate-customize-control--popover .components-base-control:not(:last-child){margin-bottom:15px}.customize-control[data-toggleid]{display:none}#customize-control-generate_settings-google_font_display{margin-top:10px;display:flex;flex-direction:column}#customize-control-generate_settings-google_font_display .description{order:10;margin-bottom:0;margin-top:5px} -.generate-component-color-picker .components-color-picker{box-sizing:border-box}.generate-component-color-picker .components-color-picker__inputs-wrapper{display:none}.generate-component-color-picker .generate-color-input-wrapper{display:flex;padding:0}.generate-component-color-picker .generate-color-input-wrapper .generate-color-input{flex-grow:1}.generate-component-color-picker .generate-color-input-wrapper .components-color-clear-color{margin-left:5px}.generate-component-color-picker .generate-color-input-wrapper input{margin-right:5px}.generate-component-color-picker .generate-color-input-wrapper .components-base-control__field{margin-bottom:0}.generate-component-color-picker>.components-base-control:first-child{margin-bottom:0}.generate-component-color-picker .components-color-picker__inputs-wrapper{min-width:auto}.generate-component-color-picker .generate-component-color-picker-palette{padding:16px 0 0}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker{display:flex;flex-wrap:wrap}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker .components-circular-option-picker__option-wrapper{margin:0 8px 8px 0}.generate-component-color-picker .components-color-palette{margin:0}.generate-component-color-picker .components-color-picker{padding:5px}.generate-component-color-picker .components-color-picker__body{padding-bottom:0}.generate-component-color-picker .components-popover__content{padding:10px;width:295px;box-sizing:border-box}.generate-component-color-picker .components-color-clear-color{height:auto}.generate-component-color-picker .components-circular-option-picker__option.is-pressed+svg{fill:#fff;background:#000;transform:scale(0.6)}.generate-component-color-picker[data-x-axis=left] .components-popover__content{margin-right:-35px !important}.generate-customize-control-wrapper{display:flex}.generate-customize-control-wrapper.generate-customize-color-control-wrapper>div:first-child{flex-grow:1}.generate-customize-control-wrapper.generate-customize-color-control-wrapper>div:not(:last-child){margin-right:5px}.generate-component-color-picker-wrapper>.components-base-control__field{position:relative;display:flex;align-items:center;justify-content:space-between}.generate-component-color-picker-wrapper>.components-base-control__field .components-color-palette__item-wrapper{margin:0}.generate-component-color-picker-palette button,.generate-color-picker-area button{width:28px;height:28px;position:relative}.generate-component-color-picker-palette button:hover,.generate-color-picker-area button:hover{background-color:inherit}.generate-component-color-picker-palette button:focus:after,.generate-color-picker-area button:focus:after{width:28px;height:28px}.generate-customize-control--popover .components-color-picker{box-sizing:border-box}.generate-customize-control--popover .components-color-picker__inputs-wrapper{display:none}.generate-customize-control--popover>.components-base-control:first-child{margin-bottom:0}.generate-customize-control--popover .components-color-picker__inputs-wrapper{min-width:auto}.generate-customize-control--popover .components-color-picker{padding:5px}.generate-customize-control--popover .components-color-picker__body{padding-bottom:0}.generate-customize-control--popover .components-color-clear-color{height:auto}.generate-component-color-picker[data-x-axis=left] .components-popover__content{margin-right:-35px !important}.generate-color-input--icon{align-items:center;justify-content:center;display:flex;padding:5px;border:1px solid currentColor;border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.generate-color-input--icon svg{height:1em;width:1em;transform:scale(1.3)}.generate-color-option-area{padding:16px 16px 0}.generate-color-input--css-var-name-wrapper{position:relative}.generate-color-input--css-var-name-wrapper button{position:absolute;bottom:0;right:0;padding:0 8px;min-height:30px;height:auto}.generate-color-input--css-var-name-wrapper button svg{width:1em;height:1em;fill:none} +.generate-component-color-picker .components-color-picker{box-sizing:border-box}.generate-component-color-picker .components-color-picker__inputs-wrapper{display:none}.generate-component-color-picker .react-colorful{width:100% !important}.generate-component-color-picker .react-colorful .react-colorful__saturation{height:150px}.generate-component-color-picker .react-colorful .react-colorful__hue,.generate-component-color-picker .react-colorful .react-colorful__alpha{width:calc(100% - 40px)}.generate-component-color-picker .react-colorful+div{display:none}.generate-component-color-picker .generate-color-input-wrapper{display:flex;padding:0}.generate-component-color-picker .generate-color-input-wrapper .generate-color-input{flex-grow:1}.generate-component-color-picker .generate-color-input-wrapper .components-color-clear-color{margin-left:5px}.generate-component-color-picker .generate-color-input-wrapper input{margin-right:5px}.generate-component-color-picker .generate-color-input-wrapper .components-base-control__field{margin-bottom:0}.generate-component-color-picker>.components-base-control:first-child{margin-bottom:0}.generate-component-color-picker .components-color-picker__inputs-wrapper{min-width:auto}.generate-component-color-picker .generate-component-color-picker-palette{padding:16px 0 0}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker{display:flex;flex-wrap:wrap}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker .components-circular-option-picker__swatches{display:flex;flex-wrap:wrap;gap:6px}.generate-component-color-picker .generate-component-color-picker-palette .components-circular-option-picker .components-circular-option-picker__swatches .components-circular-option-picker__option-wrapper{margin:0}.generate-component-color-picker .components-color-palette{margin:0}.generate-component-color-picker .components-color-picker{padding:5px;width:100%}.generate-component-color-picker .components-color-picker__body{padding-bottom:0}.generate-component-color-picker .components-popover__content{padding:10px;width:295px;box-sizing:border-box}.generate-component-color-picker .components-color-clear-color{height:auto}.generate-component-color-picker .components-circular-option-picker__option.is-pressed+svg{fill:#fff;background:#000;transform:scale(0.6)}.generate-component-color-picker[data-x-axis=left] .components-popover__content{margin-right:-35px !important}.generate-customize-control-wrapper{display:flex}.generate-customize-control-wrapper.generate-customize-color-control-wrapper>div:first-child{flex-grow:1}.generate-customize-control-wrapper.generate-customize-color-control-wrapper>div:not(:last-child){margin-right:5px}.generate-component-color-picker-wrapper>.components-base-control__field{position:relative;display:flex;align-items:center;justify-content:space-between}.generate-component-color-picker-wrapper>.components-base-control__field .components-color-palette__item-wrapper{margin:0}.generate-component-color-picker-palette button,.generate-color-picker-area button{width:28px;height:28px;position:relative}.generate-component-color-picker-palette button:hover,.generate-color-picker-area button:hover{background-color:inherit}.generate-component-color-picker-palette button:focus:after,.generate-color-picker-area button:focus:after{width:28px;height:28px}.generate-customize-control--popover .components-color-picker{box-sizing:border-box}.generate-customize-control--popover .components-color-picker__inputs-wrapper{display:none}.generate-customize-control--popover>.components-base-control:first-child{margin-bottom:0}.generate-customize-control--popover .components-color-picker__inputs-wrapper{min-width:auto}.generate-customize-control--popover .components-color-picker{padding:5px}.generate-customize-control--popover .components-color-picker__body{padding-bottom:0}.generate-customize-control--popover .components-color-clear-color{height:auto}.generate-component-color-picker[data-x-axis=left] .components-popover__content{margin-right:-35px !important}.generate-color-input--icon{align-items:center;justify-content:center;display:flex;padding:5px;border:1px solid currentColor;border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.generate-color-input--icon svg{height:1em;width:1em;transform:scale(1.3)}.generate-color-option-area{padding:16px 16px 0}.generate-color-input--css-var-name-wrapper{position:relative}.generate-color-input--css-var-name-wrapper button{position:absolute;bottom:0;right:0;padding:0 8px;min-height:30px;height:auto}.generate-color-input--css-var-name-wrapper button svg{width:1em;height:1em;fill:none} .generate-font-manager--item{margin-bottom:10px}.generate-font-manager--item .generate-font-manager--header{display:flex;align-items:center}.generate-font-manager--item .generate-font-manager--header .generate-font-manager--label{flex-grow:1;padding-left:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.generate-font-manager--item .generate-font-manager--header .components-button:not(.generate-font-manager--label){background:#fff;border:1px solid #777;padding:0;display:flex;justify-content:center;align-items:center;width:30px;height:30px;min-width:30px;margin-left:5px;border-radius:100%;flex-shrink:0}.generate-font-manager--item .generate-font-manager--header .components-button:not(.generate-font-manager--label) svg{margin-right:0;width:1em;height:1em}.generate-font-manager--item .generate-font-manager--header .components-button:not(.generate-font-manager--label).generate-font-manager--open svg{fill:none}.generate-font-manager--item .generate-font-manager--options{margin-top:15px}.generate-font-manager--item .generate-font-manager--footer{margin-top:15px;padding-top:15px;border-top:1px solid #ddd}.generate-font-manager--item .generate-font-manager-google-font--field{margin-top:10px}.generate-font-manager--item .generate-font-manager--google-font-options{display:flex;flex-wrap:wrap;margin-top:15px}.generate-font-manager--item .generate-font-manager--google-font-options>div{flex-basis:calc(50% - 10px);margin-bottom:0}.generate-font-manager--item .generate-font-manager--google-font-options>div:nth-child(even){margin-left:5px}.generate-font-manager--item .generate-font-manager--google-font-options>div:nth-child(odd){margin-right:5px}.generate-font-manager--item .generate-font-manager--google-font-options .components-base-control__field{margin-bottom:0 !important}.generate-font-manager--item .generate-font-manager--select-options{display:flex;flex-wrap:wrap}.generate-font-manager--item .generate-font-manager--select-options>div{flex-basis:calc(50% - 5px)}.generate-font-manager--item .generate-font-manager--select-options>div:nth-child(even){margin-left:5px}.generate-font-manager--item .generate-font-manager--select-options>div:nth-child(odd){margin-right:5px}.generate-font-manager--item .components-select-control__input--generate-fontfamily{margin-bottom:3px}.generate-font-manager--item .generate-advanced-select__menu{position:relative !important}.generate-font-manager-group{margin-top:10px;margin-bottom:20px}.generate-font-manager-group__label{margin-top:0;color:#000;text-transform:uppercase;font-size:11px;margin-bottom:10px}.generate-font-manager-group .generate-font-manager--item:last-child{margin-bottom:0}.generate-customize-control--font-dropdown{background:#fff;padding:15px;margin-top:10px;position:relative}.generate-customize-control--font-dropdown:before{content:"";position:absolute;left:11px;top:-10px;width:0;height:0;border-style:solid;border-width:0 10px 10px 10px;border-color:transparent transparent #fff transparent;z-index:10}.generate-customize-control--font-dropdown>.components-base-control:not(:last-child){margin-bottom:15px}.generate-customize-control--font-dropdown>.components-base-control:last-child .components-base-control__field{margin-bottom:0} .generate-advanced-select__control{margin-bottom:12px}.generate-advanced-select__value-container{padding:0 6px !important}.generate-advanced-select__value-container>div{padding:0;margin:0}.generate-advanced-select__input input[type=text]:focus{box-shadow:none}.generate-advanced-select__option--is-selected{color:rgba(255,255,255,.5) !important} .components-generate-units-control-header__units{display:flex;justify-content:space-between;margin-bottom:5px;align-items:center}.components-generate-control__units .components-generate-control-buttons__units button.components-button{background:#fff;box-shadow:none !important;color:#929da7;font-size:10px;padding:0 5px;position:relative;text-align:center;text-shadow:none;border:0;border-radius:0 !important;line-height:20px;padding:0 5px;height:auto}.components-generate-control__units .components-generate-control-buttons__units button.components-button.is-primary{background:#fff !important;color:#000 !important;cursor:default;z-index:1;font-weight:bold}.generate-component-device-field[data-device=desktop],.generate-component-device-field[data-device=tablet],.generate-component-device-field[data-device=mobile]{display:none}.preview-desktop .generate-component-device-field[data-device=desktop]{display:block}.preview-desktop .components-generate-control__units button.components-generate-control-button__units--desktop{color:#000}.preview-tablet .generate-component-device-field[data-device=tablet]{display:block}.preview-tablet .components-generate-control__units button.components-generate-control-button__units--tablet{color:#000}.preview-mobile .generate-component-device-field[data-device=mobile]{display:block}.preview-mobile .components-generate-control__units button.components-generate-control-button__units--mobile{color:#000} diff --git a/wp-content/themes/generatepress/functions.php b/wp-content/themes/generatepress/functions.php index 8839b582..19c427b5 100644 --- a/wp-content/themes/generatepress/functions.php +++ b/wp-content/themes/generatepress/functions.php @@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) { } // Set our theme version. -define( 'GENERATE_VERSION', '3.1.0' ); +define( 'GENERATE_VERSION', '3.1.3' ); if ( ! function_exists( 'generate_setup' ) ) { add_action( 'after_setup_theme', 'generate_setup' ); @@ -68,8 +68,17 @@ if ( ! function_exists( 'generate_setup' ) ) { $content_width = 1200; /* pixels */ } - // This theme styles the visual editor to resemble the theme style. - add_editor_style( 'assets/css/admin/editor-style.css' ); + // Add editor styles to the block editor. + add_theme_support( 'editor-styles' ); + + $editor_styles = apply_filters( + 'generate_editor_styles', + array( + 'assets/css/admin/block-editor.css', + ) + ); + + add_editor_style( $editor_styles ); } } diff --git a/wp-content/themes/generatepress/inc/block-editor.php b/wp-content/themes/generatepress/inc/block-editor.php index e5a8fba9..4b6309ed 100644 --- a/wp-content/themes/generatepress/inc/block-editor.php +++ b/wp-content/themes/generatepress/inc/block-editor.php @@ -92,6 +92,34 @@ function generate_get_block_editor_content_width() { return apply_filters( 'generate_block_editor_content_width', $content_width ); } +add_filter( 'block_editor_settings_all', 'generate_add_inline_block_editor_styles' ); +/** + * Add dynamic inline styles to the block editor content. + * + * @param array $editor_settings The existing editor settings. + */ +function generate_add_inline_block_editor_styles( $editor_settings ) { + $show_editor_styles = apply_filters( 'generate_show_block_editor_styles', true ); + + if ( $show_editor_styles ) { + if ( generate_is_using_dynamic_typography() ) { + $google_fonts_uri = GeneratePress_Typography::get_google_fonts_uri(); + + if ( $google_fonts_uri ) { + // Need to use @import for now until this is ready: https://github.com/WordPress/gutenberg/pull/35950. + $google_fonts_import = sprintf( + '@import "%s";', + $google_fonts_uri + ); + + $editor_settings['styles'][] = array( 'css' => $google_fonts_import ); + } + } + } + + return $editor_settings; +} + add_action( 'enqueue_block_editor_assets', 'generate_enqueue_google_fonts' ); add_action( 'enqueue_block_editor_assets', 'generate_enqueue_backend_block_editor_assets' ); /** @@ -100,18 +128,17 @@ add_action( 'enqueue_block_editor_assets', 'generate_enqueue_backend_block_edito * @since 2.2 */ function generate_enqueue_backend_block_editor_assets() { - wp_enqueue_style( 'generate-block-editor-styles', get_template_directory_uri() . '/assets/css/admin/block-editor.css', false, GENERATE_VERSION, 'all' ); wp_enqueue_script( 'generate-block-editor-tinycolor', get_template_directory_uri() . '/assets/js/admin/tinycolor.js', false, GENERATE_VERSION, true ); wp_enqueue_script( 'generate-block-editor-scripts', get_template_directory_uri() . '/assets/js/admin/block-editor.js', array( 'jquery', 'generate-block-editor-tinycolor' ), GENERATE_VERSION, true ); $show_editor_styles = apply_filters( 'generate_show_block_editor_styles', true ); if ( $show_editor_styles ) { - wp_add_inline_style( 'generate-block-editor-styles', wp_strip_all_tags( generate_do_inline_block_editor_css() ) ); + // Using wp-edit-blocks for now until we do this: https://github.com/tomusborne/generatepress/pull/343. + wp_add_inline_style( 'wp-edit-blocks', wp_strip_all_tags( generate_do_inline_block_editor_css() ) ); if ( generate_is_using_dynamic_typography() ) { - wp_enqueue_style( 'generate-editor-typography', get_template_directory_uri() . '/assets/css/admin/editor-typography.css', false, GENERATE_VERSION, 'all' ); - wp_add_inline_style( 'generate-editor-typography', wp_strip_all_tags( GeneratePress_Typography::get_css( 'core', 'editor' ) ) ); + wp_add_inline_style( 'wp-edit-blocks', wp_strip_all_tags( GeneratePress_Typography::get_css( 'core', 'editor' ) ) ); } } @@ -220,7 +247,7 @@ function generate_do_inline_block_editor_css() { $css->add_property( 'max-width', $content_width_calc ); } - $css->set_selector( 'html body.gutenberg-editor-page .block-editor-block-list__block[data-align="full"]' ); + $css->set_selector( '.editor-styles-wrapper .wp-block[data-align="full"]' ); $css->add_property( 'max-width', 'none' ); $css->set_selector( '.wp-block[data-align="wide"]' ); @@ -281,7 +308,7 @@ function generate_do_inline_block_editor_css() { $buttons_family = generate_get_font_family_css( 'font_buttons', 'generate_settings', generate_get_default_fonts() ); } - $css->set_selector( 'body.gutenberg-editor-page .block-editor-block-list__block, body .editor-styles-wrapper' ); + $css->set_selector( 'body.gutenberg-editor-page .block-editor-block-list__block, html .editor-styles-wrapper' ); if ( ! generate_is_using_dynamic_typography() ) { $css->add_property( 'font-family', $body_family ); @@ -303,15 +330,15 @@ function generate_do_inline_block_editor_css() { } if ( ! generate_is_using_dynamic_typography() ) { - $css->set_selector( 'body .editor-styles-wrapper, body .editor-styles-wrapper p, body .editor-styles-wrapper .mce-content-body' ); + $css->set_selector( 'html .editor-styles-wrapper, html .editor-styles-wrapper p, html .editor-styles-wrapper .mce-content-body' ); $css->add_property( 'line-height', floatval( $font_settings['body_line_height'] ) ); - $css->set_selector( 'body .editor-styles-wrapper p' ); + $css->set_selector( 'html .editor-styles-wrapper p' ); $css->add_property( 'margin-top', '0px' ); $css->add_property( 'margin-bottom', $font_settings['paragraph_margin'], false, 'em' ); } - $css->set_selector( 'body .editor-styles-wrapper h1, .wp-block-heading h1.editor-rich-text__tinymce, .editor-styles-wrapper .editor-post-title__input' ); + $css->set_selector( 'html .editor-styles-wrapper h1, .wp-block-heading h1.editor-rich-text__tinymce, .editor-styles-wrapper .editor-post-title__input' ); if ( ! generate_is_using_dynamic_typography() ) { $css->add_property( 'font-family', 'inherit' === $h1_family || '' === $h1_family ? $body_family : $h1_family ); @@ -336,7 +363,7 @@ function generate_do_inline_block_editor_css() { $css->add_property( 'color', $color_settings['content_title_color'] ); } - $css->set_selector( 'body .editor-styles-wrapper h2, .wp-block-heading h2.editor-rich-text__tinymce' ); + $css->set_selector( 'html .editor-styles-wrapper h2, .wp-block-heading h2.editor-rich-text__tinymce' ); if ( ! generate_is_using_dynamic_typography() ) { $css->add_property( 'font-family', $h2_family ); @@ -356,7 +383,7 @@ function generate_do_inline_block_editor_css() { $css->add_property( 'color', generate_get_option( 'text_color' ) ); } - $css->set_selector( 'body .editor-styles-wrapper h3, .wp-block-heading h3.editor-rich-text__tinymce' ); + $css->set_selector( 'html .editor-styles-wrapper h3, .wp-block-heading h3.editor-rich-text__tinymce' ); if ( ! generate_is_using_dynamic_typography() ) { $css->add_property( 'font-family', $h3_family ); @@ -376,7 +403,7 @@ function generate_do_inline_block_editor_css() { $css->add_property( 'color', generate_get_option( 'text_color' ) ); } - $css->set_selector( 'body .editor-styles-wrapper h4, .wp-block-heading h4.editor-rich-text__tinymce' ); + $css->set_selector( 'html .editor-styles-wrapper h4, .wp-block-heading h4.editor-rich-text__tinymce' ); if ( ! generate_is_using_dynamic_typography() ) { $css->add_property( 'font-family', $h4_family ); @@ -404,7 +431,7 @@ function generate_do_inline_block_editor_css() { $css->add_property( 'color', generate_get_option( 'text_color' ) ); } - $css->set_selector( 'body .editor-styles-wrapper h5, .wp-block-heading h5.editor-rich-text__tinymce' ); + $css->set_selector( 'html .editor-styles-wrapper h5, .wp-block-heading h5.editor-rich-text__tinymce' ); if ( ! generate_is_using_dynamic_typography() ) { $css->add_property( 'font-family', $h5_family ); @@ -432,7 +459,7 @@ function generate_do_inline_block_editor_css() { $css->add_property( 'color', generate_get_option( 'text_color' ) ); } - $css->set_selector( 'body .editor-styles-wrapper h6, .wp-block-heading h6.editor-rich-text__tinymce' ); + $css->set_selector( 'html .editor-styles-wrapper h6, .wp-block-heading h6.editor-rich-text__tinymce' ); if ( ! generate_is_using_dynamic_typography() ) { $css->add_property( 'font-family', $h6_family ); diff --git a/wp-content/themes/generatepress/inc/class-dashboard.php b/wp-content/themes/generatepress/inc/class-dashboard.php index 538c6826..1a13981f 100644 --- a/wp-content/themes/generatepress/inc/class-dashboard.php +++ b/wp-content/themes/generatepress/inc/class-dashboard.php @@ -220,7 +220,7 @@ class GeneratePress_Dashboard { 'siteIdentitySection' => admin_url( 'customize.php?autofocus[section]=title_tagline' ), 'colorsSection' => admin_url( 'customize.php?autofocus[section]=generate_colors_section' ), 'typographySection' => admin_url( 'customize.php?autofocus[section]=generate_typography_section' ), - 'layoutSection' => admin_url( 'customize.php?autofocus[section]=generate_layout_panel' ), + 'layoutSection' => admin_url( 'customize.php?autofocus[panel]=generate_layout_panel' ), ), ) ); diff --git a/wp-content/themes/generatepress/inc/class-typography.php b/wp-content/themes/generatepress/inc/class-typography.php index 4a2974f1..ed650af2 100644 --- a/wp-content/themes/generatepress/inc/class-typography.php +++ b/wp-content/themes/generatepress/inc/class-typography.php @@ -36,23 +36,25 @@ class GeneratePress_Typography { */ public function __construct() { add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_google_fonts' ) ); - add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_google_fonts' ) ); + add_filter( 'generate_editor_styles', array( $this, 'add_editor_styles' ) ); + + // Load fonts the old way in versions before 5.8 as block_editor_settings_all didn't exist. + if ( version_compare( $GLOBALS['wp_version'], '5.8', '<' ) ) { + add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_google_fonts' ) ); + } } /** - * Enqueue Google Fonts if they're set. + * Generate our Google Fonts URI. */ - public function enqueue_google_fonts() { - if ( ! generate_is_using_dynamic_typography() ) { - return; - } - + public static function get_google_fonts_uri() { $fonts = generate_get_option( 'font_manager' ); if ( empty( $fonts ) ) { return; } + $google_fonts_uri = ''; $data = array(); foreach ( $fonts as $font ) { @@ -92,6 +94,22 @@ class GeneratePress_Typography { ); $google_fonts_uri = add_query_arg( $font_args, 'https://fonts.googleapis.com/css' ); + } + + return $google_fonts_uri; + } + + /** + * Enqueue Google Fonts if they're set. + */ + public function enqueue_google_fonts() { + if ( ! generate_is_using_dynamic_typography() ) { + return; + } + + $google_fonts_uri = self::get_google_fonts_uri(); + + if ( $google_fonts_uri ) { wp_enqueue_style( 'generate-google-fonts', $google_fonts_uri, array(), GENERATE_VERSION ); } } @@ -118,14 +136,10 @@ class GeneratePress_Typography { $body_selector = 'body'; $paragraph_selector = 'p'; - $tablet_prefix = ''; - $mobile_prefix = ''; if ( 'editor' === $type ) { - $body_selector = '.editor-styles-wrapper'; - $paragraph_selector = '.editor-styles-wrapper p'; - $tablet_prefix = '.gp-is-device-tablet '; - $mobile_prefix = '.gp-is-device-mobile '; + $body_selector = 'html .editor-styles-wrapper'; + $paragraph_selector = 'html .editor-styles-wrapper p'; } foreach ( $typography as $key => $data ) { @@ -160,16 +174,7 @@ class GeneratePress_Typography { $css->add_property( 'margin-bottom', $options['marginBottom'], false, $options['marginBottomUnit'] ); } - if ( 'frontend' === $type ) { - $css->start_media_query( generate_get_media_query( 'tablet' ) ); - } - - if ( 'editor' === $type ) { - // Add the tablet prefix to each class. - $selector = explode( ', ', $selector ); - $selector = preg_filter( '/^/', $tablet_prefix, $selector ); - $selector = implode( ', ', $selector ); - } + $css->start_media_query( generate_get_media_query( 'tablet' ) ); $css->set_selector( $selector ); $css->add_property( 'font-size', $options['fontSizeTablet'], false, $options['fontSizeUnit'] ); @@ -179,24 +184,16 @@ class GeneratePress_Typography { $css->add_property( 'line-height', $options['lineHeightTablet'], false, $options['lineHeightUnit'] ); $css->add_property( 'margin-bottom', $options['marginBottomTablet'], false, $options['marginBottomUnit'] ); } else { - $css->set_selector( $tablet_prefix . $body_selector ); + $css->set_selector( $body_selector ); $css->add_property( 'line-height', $options['lineHeightTablet'], false, $options['lineHeightUnit'] ); - $css->set_selector( $tablet_prefix . $paragraph_selector ); + $css->set_selector( $paragraph_selector ); $css->add_property( 'margin-bottom', $options['marginBottomTablet'], false, $options['marginBottomUnit'] ); } - if ( 'frontend' === $type ) { - $css->stop_media_query(); - } + $css->stop_media_query(); - if ( 'frontend' === $type ) { - $css->start_media_query( generate_get_media_query( 'mobile' ) ); - } - - if ( 'editor' === $type ) { - $selector = str_replace( '.gp-is-device-tablet', '.gp-is-device-mobile', $selector ); - } + $css->start_media_query( generate_get_media_query( 'mobile' ) ); $css->set_selector( $selector ); $css->add_property( 'font-size', $options['fontSizeMobile'], false, $options['fontSizeUnit'] ); @@ -206,16 +203,14 @@ class GeneratePress_Typography { $css->add_property( 'line-height', $options['lineHeightMobile'], false, $options['lineHeightUnit'] ); $css->add_property( 'margin-bottom', $options['marginBottomMobile'], false, $options['marginBottomUnit'] ); } else { - $css->set_selector( $mobile_prefix . $body_selector ); + $css->set_selector( $body_selector ); $css->add_property( 'line-height', $options['lineHeightMobile'], false, $options['lineHeightUnit'] ); - $css->set_selector( $mobile_prefix . $paragraph_selector ); + $css->set_selector( $paragraph_selector ); $css->add_property( 'margin-bottom', $options['marginBottomMobile'], false, $options['marginBottomUnit'] ); } - if ( 'frontend' === $type ) { - $css->stop_media_query(); - } + $css->stop_media_query(); } return $css->css_output(); @@ -288,7 +283,7 @@ class GeneratePress_Typography { if ( 'editor' === $type ) { switch ( $selector ) { case 'body': - $selector = 'body .editor-styles-wrapper'; + $selector = 'html .editor-styles-wrapper'; break; case 'buttons': @@ -296,15 +291,15 @@ class GeneratePress_Typography { break; case 'all-headings': - $selector = '.editor-styles-wrapper h1, .editor-styles-wrapper h2, .editor-styles-wrapper h3, .editor-styles-wrapper h4, .editor-styles-wrapper h5, .editor-styles-wrapper h6'; + $selector = 'html .editor-styles-wrapper h1, html .editor-styles-wrapper h2, html .editor-styles-wrapper h3, html .editor-styles-wrapper h4, html .editor-styles-wrapper h5, html .editor-styles-wrapper h6'; break; case 'h1': - $selector = '.editor-styles-wrapper h1, .editor-styles-wrapper .editor-post-title__input'; + $selector = 'html .editor-styles-wrapper h1, html .editor-styles-wrapper .editor-post-title__input'; break; case 'single-content-title': - $selector = '.editor-styles-wrapper .editor-post-title__input'; + $selector = 'html .editor-styles-wrapper .editor-post-title__input'; break; case 'h2': @@ -312,7 +307,7 @@ class GeneratePress_Typography { case 'h4': case 'h5': case 'h6': - $selector = '.editor-styles-wrapper ' . $selector; + $selector = 'html .editor-styles-wrapper ' . $selector; break; } } @@ -378,6 +373,19 @@ class GeneratePress_Typography { 'marginBottomUnit' => 'px', ); } + + /** + * Add editor styles to the block editor. + * + * @param array $editor_styles Existing styles. + */ + public function add_editor_styles( $editor_styles ) { + if ( generate_is_using_dynamic_typography() ) { + $editor_styles[] = 'assets/css/admin/editor-typography.css'; + } + + return $editor_styles; + } } GeneratePress_Typography::get_instance(); diff --git a/wp-content/themes/generatepress/inc/customizer/helpers.php b/wp-content/themes/generatepress/inc/customizer/helpers.php index 1eb99e1c..6f46aa81 100644 --- a/wp-content/themes/generatepress/inc/customizer/helpers.php +++ b/wp-content/themes/generatepress/inc/customizer/helpers.php @@ -328,6 +328,10 @@ function generate_do_control_inline_scripts() { true ); + if ( function_exists( 'wp_set_script_translations' ) ) { + wp_set_script_translations( 'generate-customizer-controls', 'generatepress' ); + } + $color_palette = get_theme_support( 'editor-color-palette' ); $colors = array(); diff --git a/wp-content/themes/generatepress/readme.txt b/wp-content/themes/generatepress/readme.txt index a5cb6f01..051f684c 100644 --- a/wp-content/themes/generatepress/readme.txt +++ b/wp-content/themes/generatepress/readme.txt @@ -5,8 +5,8 @@ License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options Requires at least: 5.2 -Tested up to: 5.8 -Stable tag: 3.1.0 +Tested up to: 5.9 +Stable tag: 3.1.3 GeneratePress is a lightweight WordPress theme built with a focus on speed and usability. @@ -99,6 +99,29 @@ MIT License: https://github.com/JedWatson/react-select/blob/master/LICENSE == Changelog == += 3.1.3 = + +Release date: February 9, 2022 + +* Fix: Adjust editor block width selector to fix compatibility with GP Premium +* Fix: Missing editor styles when viewing tablet/mobile previews in Firefox +* Fix: Missing Google Fonts API request when viewing tablet/mobile previews in the editor + += 3.1.2 = + +Release date: January 31, 2022 + +* Fix: Align-full alignment in the editor +* Fix: Missing editor text colors in responsive views + += 3.1.1 = + +Release date: January 17, 2022 + +* Fix: Color picker UI in WP 5.9 +* Fix: Translations using javascript +* Fix: Layout panel link inside the Start Customizing Dashboard + = 3.1.0 = Release date: October 26, 2021 diff --git a/wp-content/themes/generatepress/style.css b/wp-content/themes/generatepress/style.css index dfc61a9a..029c49bc 100644 --- a/wp-content/themes/generatepress/style.css +++ b/wp-content/themes/generatepress/style.css @@ -4,19 +4,19 @@ Theme URI: https://generatepress.com Author: Tom Usborne Author URI: https://tomusborne.com Description: GeneratePress is a lightweight WordPress theme built with a focus on speed and usability. Performance is important to us, which is why a fresh GeneratePress install adds less than 10kb (gzipped) to your page size. We take full advantage of the block editor (Gutenberg), which gives you more control over creating your content. If you use page builders, GeneratePress is the right theme for you. It is completely compatible with all major page builders, including Beaver Builder and Elementor. Thanks to our emphasis on WordPress coding standards, we can boast full compatibility with all well-coded plugins, including WooCommerce. GeneratePress is fully responsive, uses valid HTML/CSS, and is translated into over 25 languages by our amazing community of users. A few of our many features include 60+ color controls, powerful dynamic typography, 5 navigation locations, 5 sidebar layouts, dropdown menus (click or hover), and 9 widget areas. Learn more and check out our powerful premium version at https://generatepress.com -Version: 3.1.0 +Version: 3.1.3 Requires at least: 5.2 -Tested up to: 5.8 +Tested up to: 5.9 Requires PHP: 5.6 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: generatepress Tags: two-columns, three-columns, one-column, right-sidebar, left-sidebar, footer-widgets, blog, e-commerce, flexible-header, full-width-template, buddypress, custom-header, custom-background, custom-menu, custom-colors, sticky-post, threaded-comments, translation-ready, rtl-language-support, featured-images, theme-options -GeneratePress, Copyright 2014-2021 EDGE22 Studios LTD. +GeneratePress, Copyright 2014-2022 EDGE22 Studios LTD. GeneratePress is distributed under the terms of the GNU GPL -GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2021 Automattic, Inc. +GeneratePress is based on Underscores http://underscores.me/, (C) 2012-2022 Automattic, Inc. Actual CSS can be found in /assets/css/ folder. */