(window.webpackJsonp_generatepress=window.webpackJsonp_generatepress||[]).push([[4],{32:function(e,t,r){},45:function(e,t,r){},46:function(e,t,r){},47:function(e,t,r){},48:function(e,t,r){},57:function(e,t,r){},60:function(e,t,r){},61:function(e,t,r){},62:function(e,t,r){},65:function(e,t,r){}}]),function(e){function t(t){for(var a,o,s=t[0],l=t[1],c=t[2],g=0,d=[];ge.length)&&(t=e.length);for(var r=0,a=new Array(t);r=0||Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r}(this.props,[]);return function(e){u.forEach((function(t){return delete e[t]}))}(n),n.className=this.props.inputClassName,n.id=this.state.inputId,n.style=r,o.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),o.default.createElement("input",a({},n,{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)}}]),t}(i.Component);p.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},p.defaultProps={minWidth:1,injectStyles:!0},t.default=p},function(e,t){e.exports=window.ReactDOM},function(e,t,r){"use strict";var a=r(55),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={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 a.isMemo(e)?o:s[e.$$typeof]||n}s[a.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[a.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,r,a){if("string"!=typeof r){if(p){var n=f(r);n&&n!==p&&e(t,n,a)}var o=u(r);g&&(o=o.concat(g(r)));for(var s=l(t),v=l(r),h=0;h=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,a,n={},i=Object.keys(e);for(a=0;a=0||(n[r]=e[r]);return n},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){e.exports=r(53)()},function(e,t,r){"use strict";var a=r(54);function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function e(e,t,r,n,i,o){if(o!==a){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 t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:n};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";e.exports=r(56)},function(e,t,r){"use strict";var a="function"==typeof Symbol&&Symbol.for,n=a?Symbol.for("react.element"):60103,i=a?Symbol.for("react.portal"):60106,o=a?Symbol.for("react.fragment"):60107,s=a?Symbol.for("react.strict_mode"):60108,l=a?Symbol.for("react.profiler"):60114,c=a?Symbol.for("react.provider"):60109,u=a?Symbol.for("react.context"):60110,g=a?Symbol.for("react.async_mode"):60111,d=a?Symbol.for("react.concurrent_mode"):60111,f=a?Symbol.for("react.forward_ref"):60112,p=a?Symbol.for("react.suspense"):60113,v=a?Symbol.for("react.suspense_list"):60120,h=a?Symbol.for("react.memo"):60115,y=a?Symbol.for("react.lazy"):60116,m=a?Symbol.for("react.block"):60121,b=a?Symbol.for("react.fundamental"):60117,O=a?Symbol.for("react.responder"):60118,S=a?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case g:case d:case o:case l:case s:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case y:case h:case c:return e;default:return t}}case i:return t}}}function C(e){return w(e)===d}t.AsyncMode=g,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=c,t.Element=n,t.ForwardRef=f,t.Fragment=o,t.Lazy=y,t.Memo=h,t.Portal=i,t.Profiler=l,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return C(e)||w(e)===g},t.isConcurrentMode=C,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===y},t.isMemo=function(e){return w(e)===h},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===s||e===p||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===h||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===O||e.$$typeof===S||e.$$typeof===m)},t.typeOf=w},,function(e,t){function r(t,a){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,r(t,a)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){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,t){var r,a,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{a="function"==typeof clearTimeout?clearTimeout:o}catch(e){a=o}}();var l,c=[],u=!1,g=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):g=-1,c.length&&f())}function f(){if(!u){var e=s(d);u=!0;for(var t=c.length;t;){for(l=c,c=[];++g1)for(var r=1;r1&&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,t=e.section();t&&wp.customize.section(t,(function(t){t.expanded.bind((function(t){t&&e.actuallyEmbed()}))}))},actuallyEmbed:function(){"resolved"!==this.deferred.embedded.state()&&(this.renderContent(),this.deferred.embedded.resolve())},initialize:function(e,t){var r=this;r.setNotificationContainer=r.setNotificationContainer.bind(r),wp.customize.Control.prototype.initialize.call(r,e,t),wp.customize.control.bind("removed",(function e(t){r===t&&(r.destroy(),r.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 t=document.getElementById(this.params.choices.wrapper+"--wrapper");t&&(e=t,this.container.hide())}return e},renderContent:function(){var t=this.setting.get(),r=Object(o.createElement)(s.SlotFillProvider,null,Object(o.createElement)(e,i()({},this.params,{value:t,setNotificationContainer:this.setNotificationContainer,customizerSetting:this.setting,control:this,choices:this.params.choices,default:this.params.defaultValue})),Object(o.createElement)(s.Popover.Slot,null)),a=this.getWrapper();Object(o.render)(r,a)},destroy:function(){Object(o.unmountComponentAtNode)(this.container[0]),wp.customize.Control.prototype.destroy&&wp.customize.Control.prototype.destroy.call(this)}},t))},c=(r(46),r(2)),u=r(5),g=r.n(u);function d(e){var t=e.color,r=e.tooltip,a=e.tooltipPosition,n=e.onClick,i=e.ariaExpanded;return Object(o.createElement)("div",{className:"components-circular-option-picker__option-wrapper"},Object(o.createElement)(s.Tooltip,{text:r,position:a},Object(o.createElement)(s.Button,{className:"components-color-palette__item components-circular-option-picker__option","aria-expanded":i,onClick:n,"aria-label":r,style:{color:t}},Object(o.createElement)("span",{className:"components-color-palette__custom-color-gradient"}))))}r(47);var f=r(1),p=r.n(f);function v(){return(v=Object.assign||function(e){for(var t=1;t=0||(n[r]=e[r]);return n}function y(e){var t=Object(f.useRef)(e),r=Object(f.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,r.current}var m=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e0:e.buttons>0)&&n.current?i(S(n.current,e,s.current)):r(!1)},t=function(){return r(!1)};function r(r){var a=l.current,i=O(n.current),o=r?i.addEventListener:i.removeEventListener;o(a?"touchmove":"mousemove",e),o(a?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,a=n.current;if(a&&(w(t),!function(e,t){return t&&!b(e)}(t,l.current)&&a)){if(b(t)){l.current=!0;var o=t.changedTouches||[];o.length&&(s.current=o[0].identifier)}a.focus(),i(S(a,t,s.current)),r(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),o({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},r]}),[o,i]),u=c[0],g=c[1],d=c[2];return Object(f.useEffect)((function(){return d}),[d]),p.a.createElement("div",v({},a,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:n,onKeyDown:g,tabIndex:0,role:"slider"}))})),x=function(e){return e.filter(Boolean).join(" ")},E=function(e){var t=e.color,r=e.left,a=e.top,n=void 0===a?.5:a,i=x(["react-colorful__pointer",e.className]);return p.a.createElement("div",{className:i,style:{top:100*n+"%",left:100*r+"%"}},p.a.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},j=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r},N=(Math.PI,function(e){var t=e.s,r=e.v,a=e.a,n=(200-t)*r/100;return{h:j(e.h),s:j(n>0&&n<200?t*r/100/(n<=100?n:200-n)*100:0),l:j(n/2),a:j(a,2)}}),T=function(e){var t=N(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},D=function(e){var t=N(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},M=function(e){var t=e.h,r=e.s,a=e.v,n=e.a;t=t/360*6,r/=100,a/=100;var i=Math.floor(t),o=a*(1-r),s=a*(1-(t-i)*r),l=a*(1-(1-t+i)*r),c=i%6;return{r:j(255*[a,s,o,o,l,a][c]),g:j(255*[l,a,a,s,o,o][c]),b:j(255*[o,o,l,a,a,s][c]),a:j(n,2)}},I=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?P({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},k=I,P=function(e){var t=e.r,r=e.g,a=e.b,n=e.a,i=Math.max(t,r,a),o=i-Math.min(t,r,a),s=o?i===t?(r-a)/o:i===r?2+(a-t)/o:4+(t-r)/o:0;return{h:j(60*(s<0?s+6:s)),s:j(i?o/i*100:0),v:j(i/255*100),a:n}},_=p.a.memo((function(e){var t=e.hue,r=e.onChange,a=x(["react-colorful__hue",e.className]);return p.a.createElement("div",{className:a},p.a.createElement(C,{onMove:function(e){r({h:360*e.left})},onKey:function(e){r({h:m(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuetext":j(t)},p.a.createElement(E,{className:"react-colorful__hue-pointer",left:t/360,color:T({h:t,s:100,v:100,a:1})})))})),R=p.a.memo((function(e){var t=e.hsva,r=e.onChange,a={backgroundColor:T({h:t.h,s:100,v:100,a:1})};return p.a.createElement("div",{className:"react-colorful__saturation",style:a},p.a.createElement(C,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:m(t.s+100*e.left,0,100),v:m(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+j(t.s)+"%, Brightness "+j(t.v)+"%"},p.a.createElement(E,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:T(t)})))})),A=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function L(e,t,r){var a=y(r),n=Object(f.useState)((function(){return e.toHsva(t)})),i=n[0],o=n[1],s=Object(f.useRef)({color:t,hsva:i});Object(f.useEffect)((function(){if(!e.equal(t,s.current.color)){var r=e.toHsva(t);s.current={hsva:r,color:t},o(r)}}),[t,e]),Object(f.useEffect)((function(){var t;(function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0})(i,s.current.hsva)||e.equal(t=e.fromHsva(i),s.current.color)||(s.current={hsva:i,color:t},a(t))}),[i,e,a]);var l=Object(f.useCallback)((function(e){o((function(t){return Object.assign({},t,e)}))}),[]);return[i,l]}var F="undefined"!=typeof window?f.useLayoutEffect:f.useEffect,B=new Map,H=function(e){F((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!B.has(t)){var a=t.createElement("style");a.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',B.set(t,a);var n=r.nc;n&&a.setAttribute("nonce",n),t.head.appendChild(a)}}),[])},V=function(e){var t=e.className,r=e.colorModel,a=e.color,n=void 0===a?r.defaultColor:a,i=e.onChange,o=h(e,["className","colorModel","color","onChange"]),s=Object(f.useRef)(null);H(s);var l=L(r,n,i),c=l[0],u=l[1],g=x(["react-colorful",t]);return p.a.createElement("div",v({},o,{ref:s,className:g}),p.a.createElement(R,{hsva:c,onChange:u}),p.a.createElement(_,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},z=function(e){var t=e.className,r=e.hsva,a=e.onChange,n={backgroundImage:"linear-gradient(90deg, "+D(Object.assign({},r,{a:0}))+", "+D(Object.assign({},r,{a:1}))+")"},i=x(["react-colorful__alpha",t]);return p.a.createElement("div",{className:i},p.a.createElement("div",{className:"react-colorful__alpha-gradient",style:n}),p.a.createElement(C,{onMove:function(e){a({a:e.left})},onKey:function(e){a({a:m(r.a+e.left)})},"aria-label":"Alpha","aria-valuetext":j(100*r.a)+"%"},p.a.createElement(E,{className:"react-colorful__alpha-pointer",left:r.a,color:D(r)})))},U=function(e){var t=e.className,r=e.colorModel,a=e.color,n=void 0===a?r.defaultColor:a,i=e.onChange,o=h(e,["className","colorModel","color","onChange"]),s=Object(f.useRef)(null);H(s);var l=L(r,n,i),c=l[0],u=l[1],g=x(["react-colorful",t]);return p.a.createElement("div",v({},o,{ref:s,className:g}),p.a.createElement(R,{hsva:c,onChange:u}),p.a.createElement(_,{hue:c.h,onChange:u}),p.a.createElement(z,{hsva:c,onChange:u,className:"react-colorful__last-control"}))},G={defaultColor:"rgba(0, 0, 0, 1)",toHsva:I,fromHsva:function(e){var t=M(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:A},W=function(e){return p.a.createElement(U,v({},e,{colorModel:G}))},K={defaultColor:"rgb(0, 0, 0)",toHsva:k,fromHsva:function(e){var t=M(e);return"rgb("+t.r+", "+t.g+", "+t.b+")"},equal:A},$=function(e){return p.a.createElement(V,v({},e,{colorModel:K}))},Y={grad:.9,turn:360,rad:360/(2*Math.PI)},q=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},J=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},X=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e>t?e:t},Z=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Q=function(e){return{r:X(e.r,0,255),g:X(e.g,0,255),b:X(e.b,0,255),a:X(e.a)}},ee=function(e){return{r:J(e.r),g:J(e.g),b:J(e.b),a:J(e.a,3)}},te=/^#([0-9a-f]{3,8})$/i,re=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ae=function(e){var t=e.r,r=e.g,a=e.b,n=e.a,i=Math.max(t,r,a),o=i-Math.min(t,r,a),s=o?i===t?(r-a)/o:i===r?2+(a-t)/o:4+(t-r)/o:0;return{h:60*(s<0?s+6:s),s:i?o/i*100:0,v:i/255*100,a:n}},ne=function(e){var t=e.h,r=e.s,a=e.v,n=e.a;t=t/360*6,r/=100,a/=100;var i=Math.floor(t),o=a*(1-r),s=a*(1-(t-i)*r),l=a*(1-(1-t+i)*r),c=i%6;return{r:255*[a,s,o,o,l,a][c],g:255*[l,a,a,s,o,o][c],b:255*[o,o,l,a,a,s][c],a:n}},ie=function(e){return{h:Z(e.h),s:X(e.s,0,100),l:X(e.l,0,100),a:X(e.a)}},oe=function(e){return{h:J(e.h),s:J(e.s),l:J(e.l),a:J(e.a,3)}},se=function(e){return ne((r=(t=e).s,{h:t.h,s:(r*=((a=t.l)<50?a:100-a)/100)>0?2*r/(a+r)*100:0,v:a+r,a:t.a}));var t,r,a},le=function(e){return{h:(t=ae(e)).h,s:(n=(200-(r=t.s))*(a=t.v)/100)>0&&n<200?r*a/100/(n<=100?n:200-n)*100:0,l:n/2,a:t.a};var t,r,a,n},ce=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ue=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ge=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,de=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fe={string:[[function(e){var t=te.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?J(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?J(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ge.exec(e)||de.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Q({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=ce.exec(e)||ue.exec(e);if(!t)return null;var r,a,n=ie({h:(r=t[1],a=t[2],void 0===a&&(a="deg"),Number(r)*(Y[a]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return se(n)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,a=e.b,n=e.a,i=void 0===n?1:n;return q(t)&&q(r)&&q(a)?Q({r:Number(t),g:Number(r),b:Number(a),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,r=e.s,a=e.l,n=e.a,i=void 0===n?1:n;if(!q(t)||!q(r)||!q(a))return null;var o=ie({h:Number(t),s:Number(r),l:Number(a),a:Number(i)});return se(o)},"hsl"],[function(e){var t=e.h,r=e.s,a=e.v,n=e.a,i=void 0===n?1:n;if(!q(t)||!q(r)||!q(a))return null;var o=function(e){return{h:Z(e.h),s:X(e.s,0,100),v:X(e.v,0,100),a:X(e.a)}}({h:Number(t),s:Number(r),v:Number(a),a:Number(i)});return ne(o)},"hsv"]]},pe=function(e,t){for(var r=0;r=.5},e.prototype.toHex=function(){return t=(e=ee(this.rgba)).r,r=e.g,a=e.b,i=(n=e.a)<1?re(J(255*n)):"","#"+re(t)+re(r)+re(a)+i;var e,t,r,a,n,i},e.prototype.toRgb=function(){return ee(this.rgba)},e.prototype.toRgbString=function(){return t=(e=ee(this.rgba)).r,r=e.g,a=e.b,(n=e.a)<1?"rgba("+t+", "+r+", "+a+", "+n+")":"rgb("+t+", "+r+", "+a+")";var e,t,r,a,n},e.prototype.toHsl=function(){return oe(le(this.rgba))},e.prototype.toHslString=function(){return t=(e=oe(le(this.rgba))).h,r=e.s,a=e.l,(n=e.a)<1?"hsla("+t+", "+r+"%, "+a+"%, "+n+")":"hsl("+t+", "+r+"%, "+a+"%)";var e,t,r,a,n},e.prototype.toHsv=function(){return e=ae(this.rgba),{h:J(e.h),s:J(e.s),v:J(e.v),a:J(e.a,3)};var e},e.prototype.invert=function(){return be({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),be(ve(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),be(ve(this.rgba,-e))},e.prototype.grayscale=function(){return be(ve(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),be(ye(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),be(ye(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?be({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):J(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=le(this.rgba);return"number"==typeof e?be({h:e,s:t.s,l:t.l,a:t.a}):J(t.h)},e.prototype.isEqual=function(e){return this.toHex()===be(e).toHex()},e}(),be=function(e){return e instanceof me?e:new me(e)};function Oe(e,t,r){var a=this,n=Object(f.useRef)(null),i=Object(f.useRef)(0),o=Object(f.useRef)(null),s=Object(f.useRef)([]),l=Object(f.useRef)(),c=Object(f.useRef)(),u=Object(f.useRef)(e),g=Object(f.useRef)(!0);Object(f.useEffect)((function(){u.current=e}),[e]);var d=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var p=!!(r=r||{}).leading,v=!("trailing"in r)||!!r.trailing,h="maxWait"in r,y=h?Math.max(+r.maxWait||0,t):null;return Object(f.useEffect)((function(){return g.current=!0,function(){g.current=!1}}),[]),Object(f.useMemo)((function(){var e=function(e){var t=s.current,r=l.current;return s.current=l.current=null,i.current=e,c.current=u.current.apply(r,t)},r=function(e,t){d&&cancelAnimationFrame(o.current),o.current=d?requestAnimationFrame(e):setTimeout(e,t)},f=function(e){if(!g.current)return!1;var r=e-n.current;return!n.current||r>=t||r<0||h&&e-i.current>=y},m=function(t){return o.current=null,v&&s.current?e(t):(s.current=l.current=null,c.current)},b=function e(){var a=Date.now();if(f(a))return m(a);if(g.current){var o=t-(a-n.current),s=h?Math.min(o,y-(a-i.current)):o;r(e,s)}},O=function(){var u=Date.now(),d=f(u);if(s.current=[].slice.call(arguments),l.current=a,n.current=u,d){if(!o.current&&g.current)return i.current=n.current,r(b,t),p?e(n.current):c.current;if(h)return r(b,t),e(n.current)}return o.current||r(b,t),c.current};return O.cancel=function(){o.current&&(d?cancelAnimationFrame(o.current):clearTimeout(o.current)),i.current=0,s.current=n.current=l.current=o.current=null},O.isPending=function(){return!!o.current},O.flush=function(){return o.current?m(Date.now()):c.current},O}),[p,h,t,y,v,d])}function Se(e){var t=e.value,r=e.showAlpha,a=e.onChange,n=r?W:$,i=Object(o.useMemo)((function(){return function(e){if(String(e).startsWith("var(")){var t=e.match(/\(([^)]+)\)/);if(t){var r=getComputedStyle(document.documentElement).getPropertyValue(t[1]);r&&(e=r)}}return be(e).toRgbString()}(t)}),[t]),s=Oe(a,100);return Object(o.createElement)(n,{color:i,onChange:function(e){be(e).isValid()&&(e=1===be(e).alpha()?be(e).toHex():e),s(e)}})}function we(e){return"info"===e?Object(o.createElement)("svg",{width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024","aria-hidden":"true"},Object(o.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(o.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(o.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(o.createElement)("path",{d:"M18 6L6 18M6 6l12 12"})):"ellipsis"===e?Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Object(o.createElement)("rect",{x:"0",fill:"none",width:"20",height:"20"}),Object(o.createElement)("g",null,Object(o.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(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",width:"1em",height:"1em"},Object(o.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(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",width:"1em",height:"1em"},Object(o.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(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",width:"1em",height:"1em"},Object(o.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(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24"},Object(o.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(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M12 5v14M5 12h14"})):"lock"===e?Object(o.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(o.createElement)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),Object(o.createElement)("path",{d:"M7 11V7a5 5 0 0110 0v4"})):"unlock"===e?Object(o.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(o.createElement)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),Object(o.createElement)("path",{d:"M7 11V7a5 5 0 019.9-1"})):"chevron-down"===e?Object(o.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(o.createElement)("path",{d:"M6 9l6 6 6-6"})):"chevron-up"===e?Object(o.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(o.createElement)("path",{d:"M18 15l-6-6-6 6"})):"chevron-right"===e?Object(o.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(o.createElement)("path",{d:"M9 18l6-6-6-6"})):"trash"===e?Object(o.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(o.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"})):"reorder"===e?Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"m5 9-3 3 3 3M9 5l3-3 3 3M15 19l-3 3-3-3M19 9l3 3-3 3M2 12h20M12 2v20"})):"check"===e?Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M20 6 9 17l-5-5"})):void 0}function Ce(e){var t=e.value,r=e.onChange,a=e.onBlur,n=e.onEnable,i=e.isDisabled,l=e.helpText;return Object(o.createElement)("div",{className:"generate-color-input--css-var-name-wrapper"},Object(o.createElement)(s.TextControl,{label:Object(c.__)("CSS Variable Name","generatepress"),disabled:i,help:l,type:"text",value:t,onChange:r,onBlur:a}),i&&Object(o.createElement)(s.Tooltip,{text:Object(c.__)("Changing this name will remove its color from elements already using it.","generatepress")},Object(o.createElement)(s.Button,{onClick:function(){window.alert(Object(c.__)("Changing this name will break styles that are using it to define its color.","generatepress")),n(),setTimeout((function(){document.querySelector(".generate-color-input--css-var-name-wrapper input").focus()}),10)}},we("unlock"))))}function xe(e){var t=e.value,r=e.onChange,a=e.showReset,n=void 0!==a&&a,i=e.onClickReset;return Object(o.createElement)("div",{className:"generate-color-input-wrapper"},Object(o.createElement)(s.TextControl,{id:"generate-color-input-field",className:"generate-color-input",type:"text",value:t||"",onChange:function(e){!e.startsWith("#")&&/^([0-9A-F]{3}){1,2}$/i.test(e)&&(e="#"+e),r(e)}}),n&&Object(o.createElement)(s.Button,{isSmall:!0,isSecondary:!0,className:"components-color-clear-color",onClick:i},Object(c.__)("Default","generatepress")))}function Ee(e){var t=e.value,r=e.onChange,a=generateCustomizerControls.palette,n=window.sessionStorage.getItem("generateGlobalColors");return n&&(a=JSON.parse(n)),Object(o.createElement)(s.BaseControl,{className:"generate-component-color-picker-palette"},Object(o.createElement)(s.ColorPalette,{colors:a,value:t,onChange:function(e){void 0===e&&(e=""),r(e),setTimeout((function(){document.querySelector(".generate-color-input-wrapper input").focus()}),10)},disableCustomColors:!0,clearable:!1}))}function je(e){var t=e.value,r=e.variableName,a=e.label,n=e.tooltipText,l=e.tooltipPosition,c=e.showAlpha,u=e.showReset,f=e.showVariableName,p=e.showPalette,v=e.variableNameIsDisabled,h=e.variableNameHelpText,y=e.onChange,m=void 0===y?function(){return!1}:y,b=e.onClosePanel,O=void 0===b?function(){return!1}:b,S=e.onChangeVariableName,w=void 0===S?function(){return!1}:S,C=e.onBlurVariableName,x=void 0===C?function(){return!1}:C,E=e.onEnableVariableName,j=void 0===E?function(){return!1}:E,N=e.onClickReset,T=void 0===N?function(){return!1}:N,D=Object(o.useState)(!1),M=g()(D,2),I=M[0],k=M[1],P=Object(o.useCallback)((function(){k(!0)})),_=Oe(Object(o.useCallback)((function(){k(!1),O()})),100),R={};return generateCustomizerControls.colorPickerShouldShift&&(R.shift=!0),Object(o.createElement)("div",{className:"generate-color-picker-area"},Object(o.createElement)(d,{color:t||"transparent",tooltip:n,tooltipPosition:l,ariaExpanded:I,onClick:I?_:P}),I&&Object(o.createElement)(s.Popover,i()({position:"bottom center",className:"generate-component-color-picker",onClose:_,focusOnMount:"container"},R),Object(o.createElement)(s.BaseControl,{label:a||"",id:"generate-color-input-field",className:"generate-color-input-main-label"},Object(o.createElement)(Se,{value:t,onChange:m,showAlpha:c}),Object(o.createElement)("div",{className:"generate-color-option-area"},f&&Object(o.createElement)(Ce,{value:r,onChange:w,onBlur:x,onEnable:j,isDisabled:v,helpText:h}),Object(o.createElement)(xe,{value:t,onChange:m,showReset:u,onClickReset:T}),p&&Object(o.createElement)(Ee,{value:t,onChange:m})))))}var Ne=l((function(e){var t,r=function(t){wp.customize.control(e.customizerSetting.id).setting.set(t)},a=!e.choices.hideLabel||void 0===e.choices.hideLabel;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"description customize-control-description",dangerouslySetInnerHTML:{__html:e.description}}),Object(o.createElement)("div",{className:"customize-control-notifications-container",ref:e.setNotificationContainer}),Object(o.createElement)(s.BaseControl,{className:"generate-component-color-picker-wrapper","data-toggleId":e.choices.toggleId?e.choices.toggleId:null},!!e.label&&a&&Object(o.createElement)("div",{className:"generate-color-component-label"},Object(o.createElement)("span",null,e.label)),Object(o.createElement)(je,{value:e.value,hideLabel:!0,tooltipText:(null==e||null===(t=e.choices)||void 0===t?void 0:t.tooltip)||Object(c.__)("Choose Color","generatepress"),tooltipPosition:"top center",showAlpha:!0,showReset:!0,showVariableName:!1,showPalette:!0,variableNameIsDisabled:!0,label:e.label,onChange:function(e){r(e)},onClickReset:function(){r(e.defaultValue)}})))}),{getWrapper:function(){var e=this.container[0];if(this.params.choices.wrapper){var t=document.getElementById(this.params.choices.wrapper+"--wrapper");t&&(e=t,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"]=Ne;var Te=r(12),De=r.n(Te),Me=r(7),Ie=r.n(Me),ke=r(6),Pe=r.n(ke),_e=(r(32),r(15));function Re(){return(Re=Object.assign||function(e){for(var t=1;t2||ot(Ze)>3?"":" "}function gt(e,t){for(;--t&&rt()&&!(Ze<48||Ze>102||Ze>57&&Ze<65||Ze>70&&Ze<97););return it(e,nt()+(t<6&&32==at()&&32==rt()))}function dt(e,t){for(;rt()&&e+Ze!==57&&(e+Ze!==84||47!==at()););return"/*"+it(t,Xe-1)+"*"+Be(47===e?e:rt())}function ft(e){for(;!ot(at());)rt();return it(e,Xe)}function pt(e){return lt(function e(t,r,a,n,i,o,s,l,c){for(var u=0,g=0,d=s,f=0,p=0,v=0,h=1,y=1,m=1,b=0,O="",S=i,w=o,C=n,x=O;y;)switch(v=b,b=rt()){case 34:case 39:case 91:case 40:x+=ct(b);break;case 9:case 10:case 13:case 32:x+=ut(v);break;case 92:x+=gt(nt()-1,7);continue;case 47:switch(at()){case 42:case 47:$e(ht(dt(rt(),nt()),r,a),c);break;default:x+="/"}break;case 123*h:l[u++]=We(x)*m;case 125*h:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+g:p>0&&We(x)-d&&$e(p>32?yt(x+";",n,a,d-1):yt(Ve(x," ","")+";",n,a,d-2),c);break;case 59:x+=";";default:if($e(C=vt(x,r,a,u,g,i,l,O,S=[],w=[],d),o),123===b)if(0===g)e(x,r,C,C,S,o,d,l,w);else switch(f){case 100:case 109:case 115:e(t,C,C,n&&$e(vt(t,C,C,0,0,i,l,O,i,S=[],d),w),i,w,d,l,n?S:w);break;default:e(x,C,C,C,[""],w,d,l,w)}}u=g=p=0,h=m=1,O=x="",d=s;break;case 58:d=1+We(x),p=v;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==(Ze=Xe>0?Ue(Qe,--Xe):0,qe--,10===Ze&&(qe=1,Ye--),Ze))continue;switch(x+=Be(b),b*h){case 38:m=g>0?1:(x+="\f",-1);break;case 44:l[u++]=(We(x)-1)*m,m=1;break;case 64:45===at()&&(x+=ct(rt())),f=at(),g=We(O=x+=ft(nt())),b++;break;case 45:45===v&&2==We(x)&&(h=0)}}return o}("",null,null,null,[""],e=st(e),0,[0],e))}function vt(e,t,r,a,n,i,o,s,l,c,u){for(var g=n-1,d=0===n?i:[""],f=Ke(d),p=0,v=0,h=0;p0?d[y]+" "+m:Ve(m,/&\f/g,d[y])))&&(l[h++]=b);return et(e,t,r,0===n?"rule":s,l,c,u)}function ht(e,t,r){return et(e,t,r,"comm",Be(Ze),Ge(e,2,-2),0)}function yt(e,t,r,a){return et(e,t,r,"decl",Ge(e,0,a),Ge(e,a+1,-1),a)}function mt(e,t){for(var r="",a=Ke(e),n=0;n6)switch(Ue(t,r+1)){case 109:if(45!==Ue(t,r+4))break;case 102:return Ve(t,/(.+:)(.+)-([^]+)/,"$1"+Le+"$2-$3$1-moz-"+(108==Ue(t,r+3)?"$3":"$2-$3"))+t;case 115:return~ze(t,"stretch")?e(Ve(t,"stretch","fill-available"),r)+t:t}break;case 4949:if(115!==Ue(t,r+1))break;case 6444:switch(Ue(t,We(t)-3-(~ze(t,"!important")&&10))){case 107:return Ve(t,":",":"+Le)+t;case 101:return Ve(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Le+(45===Ue(t,14)?"inline-":"")+"box$3$1"+Le+"$2$3$1-ms-$2box$3")+t}break;case 5936:switch(Ue(t,r+11)){case 114:return Le+t+"-ms-"+Ve(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Le+t+"-ms-"+Ve(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Le+t+"-ms-"+Ve(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return Le+t+"-ms-"+t+t}var a;return t}(e.value,e.length);break;case"@keyframes":return mt([tt(Ve(e.value,"@","@"+Le),e,"")],a);case"rule":if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch((r=/(::plac\w+|:read-\w+)/.exec(r=t))?r[0]:r){case":read-only":case":read-write":return mt([tt(Ve(t,/:(read-\w+)/,":-moz-$1"),e,"")],a);case"::placeholder":return mt([tt(Ve(t,/:(plac\w+)/,":"+Le+"input-$1"),e,""),tt(Ve(t,/:(plac\w+)/,":-moz-$1"),e,""),tt(Ve(t,/:(plac\w+)/,"-ms-input-$1"),e,"")],a)}var r;return""}))}}var Ct=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}},xt=new WeakMap,Et=function(e){if("rule"===e.type&&e.parent&&e.length){for(var t=e.value,r=e.parent,a=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||xt.get(r))&&!a){xt.set(e,!0);for(var n=[],i=function(e,t){return lt(function(e,t){var r=-1,a=44;do{switch(ot(a)){case 0:38===a&&12===at()&&(t[r]=1),e[r]+=ft(Xe-1);break;case 2:e[r]+=ct(a);break;case 4:if(44===a){e[++r]=58===at()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=Be(a)}}while(a=rt());return e}(st(e),t))}(t,n),o=r.props,s=0,l=0;s=4;++a,n-=4)t=1540483477*(65535&(t=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(n){case 3:r^=(255&e.charCodeAt(a+2))<<16;case 2:r^=(255&e.charCodeAt(a+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(a)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)},kt={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},Pt=/[A-Z]|^ms/g,_t=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Rt=function(e){return 45===e.charCodeAt(1)},At=function(e){return null!=e&&"boolean"!=typeof e},Lt=Ct((function(e){return Rt(e)?e:e.replace(Pt,"-$&").toLowerCase()})),Ft=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(_t,(function(e,t,r){return Ht={name:t,styles:r,next:Ht},t}))}return 1===kt[e]||Rt(e)||"number"!=typeof t||0===t?t:t+"px"};function Bt(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return Ht={name:r.name,styles:r.styles,next:Ht},r.name;if(void 0!==r.styles){var a=r.next;if(void 0!==a)for(;void 0!==a;)Ht={name:a.name,styles:a.styles,next:Ht},a=a.next;return r.styles+";"}return function(e,t,r){var a="";if(Array.isArray(r))for(var n=0;n=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rr(e){return(rr="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 ar=r(25),nr=r.n(ar);function ir(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function or(e,t){for(var r=0;r-1}function xr(e){return Cr(e)?window.pageYOffset:e.scrollTop}function Er(e,t){Cr(e)?window.scrollTo(0,t):e.scrollTop=t}function jr(e,t,r,a){return r*((e=e/a-1)*e*e+1)+t}function Nr(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:mr,n=xr(e),i=t-n,o=10,s=0;function l(){var t=jr(s+=o,n,i,r);Er(e,t),s=f)return{placement:"bottom",maxHeight:t};if(C>=f&&!o)return i&&Nr(l,x,160),{placement:"bottom",maxHeight:t};if(!o&&C>=a||o&&S>=a)return i&&Nr(l,x,160),{placement:"bottom",maxHeight:o?S-m:C-m};if("auto"===n||o){var j=t,N=o?O:w;return N>=a&&(j=Math.min(N-m-s.controlHeight,t)),{placement:"top",maxHeight:j}}if("bottom"===n)return i&&Er(l,x),{placement:"bottom",maxHeight:t};break;case"top":if(O>=f)return{placement:"top",maxHeight:t};if(w>=f&&!o)return i&&Nr(l,E,160),{placement:"top",maxHeight:t};if(!o&&w>=a||o&&O>=a){var T=t;return(!o&&w>=a||o&&O>=a)&&(T=o?O-b:w-b),i&&Nr(l,E,160),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(n,'".'))}return c}var _r=function(e){return"auto"===e?"bottom":e},Rr=Object(f.createContext)({getPortalPlacement:null}),Ar=function(e){cr(r,e);var t=yr(r);function r(){var e;ir(this,r);for(var a=arguments.length,n=new Array(a),i=0;ie.length)&&(t=e.length);for(var r=0,a=new Array(t);r0,v=g-d-u,h=!1;v>t&&o.current&&(a&&a(e),o.current=!1),p&&s.current&&(i&&i(e),s.current=!1),p&&t>v?(r&&!o.current&&r(e),f.scrollTop=g,h=!0,o.current=!0):!p&&-t>u&&(n&&!s.current&&n(e),f.scrollTop=0,h=!0,s.current=!0),h&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[]),g=Object(f.useCallback)((function(e){u(e,e.deltaY)}),[u]),d=Object(f.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),p=Object(f.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)}),[u]),v=Object(f.useCallback)((function(e){if(e){var t=!!kr&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",g,t),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",d,t),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",p,t)}}),[p,d,g]),h=Object(f.useCallback)((function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",g,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",d,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",p,!1))}),[p,d,g]);return Object(f.useEffect)((function(){if(t){var e=c.current;return v(e),function(){h(e)}}}),[t,v,h]),function(e){c.current=e}}({isEnabled:void 0===a||a,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,r=e.accountForScrollbars,a=void 0===r||r,n=Object(f.useRef)({}),i=Object(f.useRef)(null),o=Object(f.useCallback)((function(e){if(Pa){var t=document.body,r=t&&t.style;if(a&&Na.forEach((function(e){var t=r&&r[e];n.current[e]=t})),a&&_a<1){var i=parseInt(n.current.paddingRight,10)||0,o=document.body?document.body.clientWidth:0,s=window.innerWidth-o+i||0;Object.keys(Ta).forEach((function(e){var t=Ta[e];r&&(r[e]=t)})),r&&(r.paddingRight="".concat(s,"px"))}t&&ka()&&(t.addEventListener("touchmove",Da,Ra),e&&(e.addEventListener("touchstart",Ia,Ra),e.addEventListener("touchmove",Ma,Ra))),_a+=1}}),[]),s=Object(f.useCallback)((function(e){if(Pa){var t=document.body,r=t&&t.style;_a=Math.max(_a-1,0),a&&_a<1&&Na.forEach((function(e){var t=n.current[e];r&&(r[e]=t)})),t&&ka()&&(t.removeEventListener("touchmove",Da,Ra),e&&(e.removeEventListener("touchstart",Ia,Ra),e.removeEventListener("touchmove",Ma,Ra)))}}),[]);return Object(f.useEffect)((function(){if(t){var e=i.current;return o(e),function(){s(e)}}}),[t,o,s]),function(e){i.current=e}}({isEnabled:r});return Jt(p.a.Fragment,null,r&&Jt("div",{onClick:Aa,css:La}),t((function(e){n(e),i(e)})))}var Ba={clearIndicator:Zr,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,r=e.isFocused,a=e.theme,n=a.colors,i=a.borderRadius,o=a.spacing;return{label:"control",alignItems:"center",backgroundColor:t?n.neutral5:n.neutral0,borderColor:t?n.neutral10:r?n.primary:n.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(n.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:r?n.primary:n.neutral30}}},dropdownIndicator:Xr,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,r=e.theme,a=r.spacing.baseUnit,n=r.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?n.neutral10:n.neutral20,marginBottom:2*a,marginTop:2*a,width:1}},input:function(e){var t=e.isDisabled,r=e.theme,a=r.spacing,n=r.colors;return{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,visibility:t?"hidden":"visible",color:n.neutral80}},loadingIndicator:function(e){var t=e.isFocused,r=e.size,a=e.theme,n=a.colors,i=a.spacing.baseUnit;return{label:"loadingIndicator",color:t?n.neutral60:n.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Br,menu:function(e){var t,r=e.placement,a=e.theme,n=a.borderRadius,i=a.spacing,o=a.colors;return t={label:"menu"},Object(ur.a)(t,function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),Object(ur.a)(t,"backgroundColor",o.neutral0),Object(ur.a)(t,"borderRadius",n),Object(ur.a)(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),Object(ur.a)(t,"marginBottom",i.menuGutter),Object(ur.a)(t,"marginTop",i.menuGutter),Object(ur.a)(t,"position","absolute"),Object(ur.a)(t,"width","100%"),Object(ur.a)(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,r=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:r,paddingTop:r,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,r=e.offset,a=e.position;return{left:t.left,position:a,top:r,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,r=t.spacing,a=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:a/2,display:"flex",margin:r.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,r=t.borderRadius,a=t.colors,n=e.cropWithEllipsis;return{borderRadius:r/2,color:a.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:n?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,r=t.spacing,a=t.borderRadius,n=t.colors;return{alignItems:"center",borderRadius:a/2,backgroundColor:e.isFocused&&n.dangerLight,display:"flex",paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:n.dangerLight,color:n.danger}}},noOptionsMessage:Fr,option:function(e){var t=e.isDisabled,r=e.isFocused,a=e.isSelected,n=e.theme,i=n.spacing,o=n.colors;return{label:"option",backgroundColor:a?o.primary:r?o.primary25:"transparent",color:t?o.neutral20:a?o.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(a?o.primary:o.primary50)}}},placeholder:function(e){var t=e.theme,r=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,r=e.theme,a=r.spacing,n=r.colors;return{label:"singleValue",color:t?n.neutral40:n.neutral80,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2,maxWidth:"calc(100% - ".concat(2*a.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},Ha={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}},Va={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Tr(),captureMenuScroll:!Tr(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var r=pr({ignoreCase:!0,ignoreAccents:!0,stringify:Ea,trim:!0,matchFrom:"any"},void 0),a=r.ignoreCase,n=r.ignoreAccents,i=r.stringify,o=r.trim,s=r.matchFrom,l=o?xa(t):t,c=o?xa(i(e)):i(e);return a&&(l=l.toLowerCase(),c=c.toLowerCase()),n&&(l=Ca(l),c=wa(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 t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function za(e,t,r,a){return{type:"option",data:t,isDisabled:Ya(e,t,r),isSelected:qa(e,t,r),label:Ka(e,t),value:$a(e,t),index:a}}function Ua(e,t){return e.options.map((function(r,a){if(r.options){var n=r.options.map((function(r,a){return za(e,r,t,a)})).filter((function(t){return Wa(e,t)}));return n.length>0?{type:"group",data:r,options:n,index:a}:void 0}var i=za(e,r,t,a);return Wa(e,i)?i:void 0})).filter((function(e){return!!e}))}function Ga(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,ca(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Wa(e,t){var r=e.inputValue,a=void 0===r?"":r,n=t.data,i=t.isSelected,o=t.label,s=t.value;return(!Xa(e)||!i)&&Ja(e,{label:o,value:s,data:n},a)}var Ka=function(e,t){return e.getOptionLabel(t)},$a=function(e,t){return e.getOptionValue(t)};function Ya(e,t,r){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,r)}function qa(e,t,r){if(r.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,r);var a=$a(e,t);return r.some((function(t){return $a(e,t)===a}))}function Ja(e,t,r){return!e.filterOption||e.filterOption(t,r)}var Xa=function(e){var t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t},Za=1,Qa=function(e){cr(r,e);var t=yr(r);function r(e){var a;return ir(this,r),(a=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},a.blockOptionHover=!1,a.isComposing=!1,a.commonProps=void 0,a.initialTouchX=0,a.initialTouchY=0,a.instancePrefix="",a.openAfterFocus=!1,a.scrollToFocusedOptionOnUpdate=!1,a.userIsDragging=void 0,a.controlRef=null,a.getControlRef=function(e){a.controlRef=e},a.focusedOptionRef=null,a.getFocusedOptionRef=function(e){a.focusedOptionRef=e},a.menuListRef=null,a.getMenuListRef=function(e){a.menuListRef=e},a.inputRef=null,a.getInputRef=function(e){a.inputRef=e},a.focus=a.focusInput,a.blur=a.blurInput,a.onChange=function(e,t){var r=a.props,n=r.onChange,i=r.name;t.name=i,a.ariaOnChange(e,t),n(e,t)},a.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,n=a.props,i=n.closeMenuOnSelect,o=n.isMulti;a.onInputChange("",{action:"set-value"}),i&&(a.setState({inputIsHiddenAfterUpdate:!o}),a.onMenuClose()),a.setState({clearFocusValueOnUpdate:!0}),a.onChange(e,{action:t,option:r})},a.selectOption=function(e){var t=a.props,r=t.blurInputOnSelect,n=t.isMulti,i=t.name,o=a.state.selectValue,s=n&&a.isOptionSelected(e,o),l=a.isOptionDisabled(e,o);if(s){var c=a.getOptionValue(e);a.setValue(o.filter((function(e){return a.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void a.ariaOnChange(e,{action:"select-option",name:i});n?a.setValue([].concat(ca(o),[e]),"select-option",e):a.setValue(e,"select-option")}r&&a.blurInput()},a.removeValue=function(e){var t=a.props.isMulti,r=a.state.selectValue,n=a.getOptionValue(e),i=r.filter((function(e){return a.getOptionValue(e)!==n})),o=t?i:i[0]||null;a.onChange(o,{action:"remove-value",removedValue:e}),a.focusInput()},a.clearValue=function(){var e=a.state.selectValue;a.onChange(a.props.isMulti?[]:null,{action:"clear",removedValues:e})},a.popValue=function(){var e=a.props.isMulti,t=a.state.selectValue,r=t[t.length-1],n=t.slice(0,t.length-1),i=e?n:n[0]||null;a.onChange(i,{action:"pop-value",removedValue:r})},a.getValue=function(){return a.state.selectValue},a.cx=function(){for(var e=arguments.length,t=new Array(e),r=0;r5||i>5}},a.onTouchEnd=function(e){a.userIsDragging||(a.controlRef&&!a.controlRef.contains(e.target)&&a.menuListRef&&!a.menuListRef.contains(e.target)&&a.blurInput(),a.initialTouchX=0,a.initialTouchY=0)},a.onControlTouchEnd=function(e){a.userIsDragging||a.onControlMouseDown(e)},a.onClearIndicatorTouchEnd=function(e){a.userIsDragging||a.onClearIndicatorMouseDown(e)},a.onDropdownIndicatorTouchEnd=function(e){a.userIsDragging||a.onDropdownIndicatorMouseDown(e)},a.handleInputChange=function(e){var t=e.currentTarget.value;a.setState({inputIsHiddenAfterUpdate:!1}),a.onInputChange(t,{action:"input-change"}),a.props.menuIsOpen||a.onMenuOpen()},a.onInputFocus=function(e){a.props.onFocus&&a.props.onFocus(e),a.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(a.openAfterFocus||a.props.openMenuOnFocus)&&a.openMenu("first"),a.openAfterFocus=!1},a.onInputBlur=function(e){a.menuListRef&&a.menuListRef.contains(document.activeElement)?a.inputRef.focus():(a.props.onBlur&&a.props.onBlur(e),a.onInputChange("",{action:"input-blur"}),a.onMenuClose(),a.setState({focusedValue:null,isFocused:!1}))},a.onOptionHover=function(e){a.blockOptionHover||a.state.focusedOption===e||a.setState({focusedOption:e})},a.shouldHideSelectedOptions=function(){return Xa(a.props)},a.onKeyDown=function(e){var t=a.props,r=t.isMulti,n=t.backspaceRemovesValue,i=t.escapeClearsValue,o=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,g=t.tabSelectsValue,d=t.openMenuOnFocus,f=a.state,p=f.focusedOption,v=f.focusedValue,h=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(a.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||o)return;a.focusValue("previous");break;case"ArrowRight":if(!r||o)return;a.focusValue("next");break;case"Delete":case"Backspace":if(o)return;if(v)a.removeValue(v);else{if(!n)return;r?a.popValue():s&&a.clearValue()}break;case"Tab":if(a.isComposing)return;if(e.shiftKey||!c||!g||!p||d&&a.isOptionSelected(p,h))return;a.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(c){if(!p)return;if(a.isComposing)return;a.selectOption(p);break}return;case"Escape":c?(a.setState({inputIsHiddenAfterUpdate:!1}),a.onInputChange("",{action:"menu-close"}),a.onMenuClose()):s&&i&&a.clearValue();break;case" ":if(o)return;if(!c){a.openMenu("first");break}if(!p)return;a.selectOption(p);break;case"ArrowUp":c?a.focusOption("up"):a.openMenu("last");break;case"ArrowDown":c?a.focusOption("down"):a.openMenu("first");break;case"PageUp":if(!c)return;a.focusOption("pageup");break;case"PageDown":if(!c)return;a.focusOption("pagedown");break;case"Home":if(!c)return;a.focusOption("first");break;case"End":if(!c)return;a.focusOption("last");break;default:return}e.preventDefault()}},a.instancePrefix="react-select-"+(a.props.instanceId||++Za),a.state.selectValue=Sr(e.value),a}return sr(r,[{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 t,r,a,n,i,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&&(t=this.menuListRef,r=this.focusedOptionRef,a=t.getBoundingClientRect(),n=r.getBoundingClientRect(),i=r.offsetHeight/3,n.bottom+i>a.bottom?Er(t,Math.min(r.offsetTop+r.clientHeight-t.offsetHeight+i,t.scrollHeight)):n.top-i-1&&(o=s)}this.scrollToFocusedOptionOnUpdate=!(n&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[o]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,r=t.selectValue,a=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var n=r.indexOf(a);a||(n=-1);var i=r.length-1,o=-1;if(r.length){switch(e){case"previous":o=0===n?0:-1===n?i:n-1;break;case"next":n>-1&&n0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,r=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var n=0,i=a.indexOf(r);r||(i=-1),"up"===e?n=i>0?i-1:a.length-1:"down"===e?n=(i+1)%a.length:"pageup"===e?(n=i-t)<0&&(n=0):"pagedown"===e?(n=i+t)>a.length-1&&(n=a.length-1):"last"===e&&(n=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[n],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ha):pr(pr({},Ha),this.props.theme):Ha}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,r=this.getStyles,a=this.getValue,n=this.selectOption,i=this.setValue,o=this.props,s=o.isMulti,l=o.isRtl,c=o.options;return{clearValue:e,cx:t,getStyles:r,getValue:a,hasValue:this.hasValue(),isMulti:s,isRtl:l,options:c,selectOption:n,selectProps:o,setValue:i,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,t=e.isClearable,r=e.isMulti;return void 0===t?r:t}},{key:"isOptionDisabled",value:function(e,t){return Ya(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return qa(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Ja(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var r=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:r,selectValue:a})}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,t=e.isDisabled,r=e.isSearchable,a=e.inputId,n=e.inputValue,i=e.tabIndex,o=e.form,s=this.getComponents().Input,l=this.state.inputIsHidden,c=this.commonProps,u=a||this.getElementId("input"),g={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return r?p.a.createElement(s,Re({},c,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:u,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:o,type:"text",value:n},g)):p.a.createElement(ja,Re({id:u,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:mr,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:i,form:o,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),r=t.MultiValue,a=t.MultiValueContainer,n=t.MultiValueLabel,i=t.MultiValueRemove,o=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,g=c.isDisabled,d=c.isMulti,f=c.inputValue,v=c.placeholder,h=this.state,y=h.selectValue,m=h.focusedValue,b=h.isFocused;if(!this.hasValue()||!u)return f?null:p.a.createElement(s,Re({},l,{key:"placeholder",isDisabled:g,isFocused:b}),v);if(d)return y.map((function(t,o){var s=t===m;return p.a.createElement(r,Re({},l,{components:{Container:a,Label:n,Remove:i},isFocused:s,isDisabled:g,key:"".concat(e.getOptionValue(t)).concat(o),index:o,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));if(f)return null;var O=y[0];return p.a.createElement(o,Re({},l,{data:O,isDisabled:g}),this.formatOptionLabel(O,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,r=this.props,a=r.isDisabled,n=r.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||a||!this.hasValue()||n)return null;var o={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return p.a.createElement(e,Re({},t,{innerProps:o,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,r=this.props,a=r.isDisabled,n=r.isLoading,i=this.state.isFocused;return e&&n?p.a.createElement(e,Re({},t,{innerProps:{"aria-hidden":"true"},isDisabled:a,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,r=e.IndicatorSeparator;if(!t||!r)return null;var a=this.commonProps,n=this.props.isDisabled,i=this.state.isFocused;return p.a.createElement(r,Re({},a,{isDisabled:n,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,r=this.props.isDisabled,a=this.state.isFocused,n={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return p.a.createElement(e,Re({},t,{innerProps:n,isDisabled:r,isFocused:a}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),r=t.Group,a=t.GroupHeading,n=t.Menu,i=t.MenuList,o=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,g=this.state.focusedOption,d=this.props,f=d.captureMenuScroll,v=d.inputValue,h=d.isLoading,y=d.loadingMessage,m=d.minMenuHeight,b=d.maxMenuHeight,O=d.menuIsOpen,S=d.menuPlacement,w=d.menuPosition,C=d.menuPortalTarget,x=d.menuShouldBlockScroll,E=d.menuShouldScrollIntoView,j=d.noOptionsMessage,N=d.onMenuScrollToTop,T=d.onMenuScrollToBottom;if(!O)return null;var D,M=function(t,r){var a=t.type,n=t.data,i=t.isDisabled,o=t.isSelected,s=t.label,l=t.value,d=g===n,f=i?void 0:function(){return e.onOptionHover(n)},v=i?void 0:function(){return e.selectOption(n)},h="".concat(e.getElementId("option"),"-").concat(r),y={id:h,onClick:v,onMouseMove:f,onMouseOver:f,tabIndex:-1};return p.a.createElement(c,Re({},u,{innerProps:y,data:n,isDisabled:i,isSelected:o,key:h,label:s,type:a,value:l,isFocused:d,innerRef:d?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())D=this.getCategorizedOptions().map((function(t){if("group"===t.type){var n=t.data,i=t.options,o=t.index,s="".concat(e.getElementId("group"),"-").concat(o),l="".concat(s,"-heading");return p.a.createElement(r,Re({},u,{key:s,data:n,options:i,Heading:a,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return M(e,"".concat(o,"-").concat(e.index))})))}if("option"===t.type)return M(t,"".concat(t.index))}));else if(h){var I=y({inputValue:v});if(null===I)return null;D=p.a.createElement(s,u,I)}else{var k=j({inputValue:v});if(null===k)return null;D=p.a.createElement(l,u,k)}var P={minMenuHeight:m,maxMenuHeight:b,menuPlacement:S,menuPosition:w,menuShouldScrollIntoView:E},_=p.a.createElement(Ar,Re({},u,P),(function(t){var r=t.ref,a=t.placerProps,o=a.placement,s=a.maxHeight;return p.a.createElement(n,Re({},u,P,{innerRef:r,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:h,placement:o}),p.a.createElement(Fa,{captureEnabled:f,onTopArrive:N,onBottomArrive:T,lockEnabled:x},(function(t){return p.a.createElement(i,Re({},u,{innerRef:function(r){e.getMenuListRef(r),t(r)},isLoading:h,maxHeight:s,focusedOption:g}),D)})))}));return C||"fixed"===w?p.a.createElement(o,Re({},u,{appendTo:C,controlElement:this.controlRef,menuPlacement:S,menuPosition:w}),_):_}},{key:"renderFormField",value:function(){var e=this,t=this.props,r=t.delimiter,a=t.isDisabled,n=t.isMulti,i=t.name,o=this.state.selectValue;if(i&&!a){if(n){if(r){var s=o.map((function(t){return e.getOptionValue(t)})).join(r);return p.a.createElement("input",{name:i,type:"hidden",value:s})}var l=o.length>0?o.map((function(t,r){return p.a.createElement("input",{key:"i-".concat(r),name:i,type:"hidden",value:e.getOptionValue(t)})})):p.a.createElement("input",{name:i,type:"hidden"});return p.a.createElement("div",null,l)}var c=o[0]?this.getOptionValue(o[0]):"";return p.a.createElement("input",{name:i,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,r=t.ariaSelection,a=t.focusedOption,n=t.focusedValue,i=t.isFocused,o=t.selectValue,s=this.getFocusableOptions();return p.a.createElement(va,Re({},e,{ariaSelection:r,focusedOption:a,focusedValue:n,isFocused:i,selectValue:o,focusableOptions:s}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,r=e.IndicatorsContainer,a=e.SelectContainer,n=e.ValueContainer,i=this.props,o=i.className,s=i.id,l=i.isDisabled,c=i.menuIsOpen,u=this.state.isFocused,g=this.commonProps=this.getCommonProps();return p.a.createElement(a,Re({},g,{className:o,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),p.a.createElement(t,Re({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),p.a.createElement(n,Re({},g,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),p.a.createElement(r,Re({},g,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=t.prevProps,a=t.clearFocusValueOnUpdate,n=t.inputIsHiddenAfterUpdate,i=e.options,o=e.value,s=e.menuIsOpen,l=e.inputValue,c={};if(r&&(o!==r.value||i!==r.options||s!==r.menuIsOpen||l!==r.inputValue)){var u=Sr(o),g=s?function(e,t){return Ga(Ua(e,t))}(e,u):[],d=a?function(e,t){var r=e.focusedValue,a=e.selectValue.indexOf(r);if(a>-1){if(t.indexOf(r)>-1)return r;if(a-1?r:t[0]}(t,g),focusedValue:d,clearFocusValueOnUpdate:!1}}var f=null!=n&&e!==r?{inputIsHidden:n,inputIsHiddenAfterUpdate:void 0}:{};return pr(pr(pr({},c),f),{},{prevProps:e})}}]),r}(f.Component);Qa.defaultProps=Va;var en,tn,rn,an=(r(49),r(51),f.Component,en=Qa,rn=tn=function(e){cr(r,e);var t=yr(r);function r(){var e;ir(this,r);for(var a=arguments.length,n=new Array(a),i=0;i1?r-1:0),n=1;n0&&t.forEach((function(e,a){r.push({value:t[a].fontFamily,label:t[a].fontFamily})})),r),onChange:function(e){i("fontFamily",e,a)}})};function En(e,t){var r=[{value:"",label:Object(c.__)("Default","generatepress")},{value:"normal",label:Object(c.__)("Normal","generatepress")},{value:"bold",label:Object(c.__)("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!==_e[e]&&"undefined"!==t.googleFontVariants&&(r=[{value:"",label:Object(c.__)("Default","generatepress")},{value:"normal",label:Object(c.__)("Normal","generatepress")},{value:"bold",label:Object(c.__)("Bold","generatepress")}],t.filter((function(t){return t.fontFamily===e})).forEach((function(e){var t=(e.googleFontVariants?e.googleFontVariants:"").replaceAll(" ","");(t=t.split(",")).filter((function(e){var t=e.match(/[a-z]/g),r=e.match(/[0-9]/g);return!(t&&r||"italic"===e||"regular"===e||""===e)})).forEach((function(e){r.push({value:e,label:e})}))}))),r}var jn=function(e){var t=e.index,r=e.value,a=e.fontFamily,n=e.onChange;return Object(o.createElement)(s.SelectControl,{label:Object(c.__)("Font Weight","generatepress"),value:r,options:En(a,mn()),onChange:function(e){n("fontWeight",e,t)}})},Nn=function(e){var t=e.index,r=e.value,a=e.onChange;return Object(o.createElement)(s.SelectControl,{label:Object(c.__)("Text Transform","generatepress"),value:r,options:[{value:"",label:Object(c.__)("Default","generatepress")},{value:"uppercase",label:Object(c.__)("Uppercase","generatepress")},{value:"lowercase",label:Object(c.__)("Lowercase","generatepress")},{value:"capitalize",label:Object(c.__)("Capitalize","generatepress")},{value:"initial",label:Object(c.__)("Normal","generatepress")}],onChange:function(e){a("textTransform",e,t)}})},Tn=function(e){var t=e.index,r=e.value,a=e.onChange;return Object(o.createElement)(s.SelectControl,{label:Object(c.__)("Font Style","generatepress"),value:r,options:[{value:"",label:Object(c.__)("Default","generatepress")},{value:"normal",label:Object(c.__)("Normal","generatepress")},{value:"italic",label:Object(c.__)("Italic","generatepress")},{value:"oblique",label:Object(c.__)("Oblique","generatepress")},{value:"initial",label:Object(c.__)("Initial","generatepress")}],onChange:function(e){a("fontStyle",e,t)}})},Dn=(r(57),function(e){var t=Object(o.useState)("desktop"),r=g()(t,2),a=(r[0],r[1]),n=e.label,i=e.devices;return Object(o.createElement)("div",{className:"components-generate-units-control-header__units"},Object(o.createElement)("div",{className:"components-generate-units-control-label__units"},n),Object(o.createElement)("div",{className:"components-generate-control__units"},Object(o.createElement)(s.ButtonGroup,{className:"components-generate-control-buttons__units","aria-label":Object(c.__)("Select Units","generatepress")},i.map((function(e){var t=Object(c.__)("Desktop","generatepress");return"tablet"===e&&(t=Object(c.__)("Tablet","generatepress")),"mobile"===e&&(t=Object(c.__)("Mobile","generatepress")),Object(o.createElement)(s.Tooltip /* translators: Unit type (px, em, %) */,{text:Object(c.sprintf)(Object(c.__)("%s Preview","generatepress"),t),key:e},Object(o.createElement)(s.Button,{key:e,className:"components-generate-control-button__units--"+e,isSmall:!0 /* translators: %s: values associated with CSS syntax, 'Pixel', 'Em', 'Percentage' */,"aria-label":t,onClick:function(){wp.customize.previewedDevice.set(e),a(e)}},we(e)))})))))}),Mn=r(34),In=r.n(Mn),kn=r(35),Pn=r.n(kn),Rn=r(36),An=r.n(Rn),Ln=r(37),Fn=r.n(Ln),Bn=r(28),Hn=r.n(Bn);r(60);var Vn=function(e){An()(n,e);var t,r,a=(t=n,r=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,a=Hn()(t);if(r){var n=Hn()(this).constructor;e=Reflect.construct(a,arguments,n)}else e=a.apply(this,arguments);return Fn()(this,e)});function n(){return In()(this,n),a.apply(this,arguments)}return Pn()(n,[{key:"render",value:function(){var e=this.props,t=e.label,r=e.value,a=e.onChange,n=e.rangeMin,i=void 0===n?0:n,l=e.rangeMax,c=void 0===l?100:l,u=e.inputMin,g=void 0===u?"":u,d=e.inputMax,f=void 0===d?"":d,p=e.step,v=void 0===p?1:p,h=e.help,y=void 0===h?"":h,m=e.beforeIcon,b=void 0===m?"":m,O=e.initialPosition,S=void 0===O?"":O,w=e.placeholder,C=void 0===w?"":w;return Object(o.createElement)("div",{className:"components-generate-range-control"},t&&Object(o.createElement)("div",{className:"components-generate-range-control--label"},t),Object(o.createElement)("div",{className:"components-generate-range-control--wrapper"},Object(o.createElement)("div",{className:"components-generate-range-control--range"},Object(o.createElement)(s.RangeControl,{className:"generate-range-control-range",beforeIcon:b,value:dn(r)?parseFloat(r):"",onChange:function(e){return a(e)},min:i,max:c,step:v,withInputField:!1,initialPosition:S})),Object(o.createElement)("div",{className:"components-generate-range-control-input"},Object(o.createElement)(s.TextControl,{type:"number",placeholder:""!==C?C:"",min:g,max:f,step:v,value:dn(r)?r:"",onChange:function(e){return a(e)}}))),y&&Object(o.createElement)("p",{className:"components-base-control__help"},y))}}]),n}(o.Component),zn=(r(61),function(e){var t=e.value,r=e.onClick,a=e.units;return Object(o.createElement)("div",{className:"components-generate--control__units"},Object(o.createElement)(s.Dropdown,{className:"generate-component-control--unit-picker",contentClassName:"generate-component-control--unit-picker-area",position:"bottom left",focusOnMount:"container",renderToggle:function(e){var r=e.isOpen,a=e.onToggle;return Object(o.createElement)(s.Button,{onClick:a,"aria-expanded":r},t||we("dash"))},renderContent:function(e){var n=e.onClose;return Object(o.createElement)(s.ButtonGroup,{className:"components-generate--control-buttons__units","aria-label":Object(c.__)("Select Units","generatepress")},a.map((function(e){var a=e,i=e||we("dash");return""===e&&(a=Object(c.__)("No Unit","generatepress")),"px"===e&&(a=Object(c._x)("Pixel","A size unit for CSS markup","generatepress")),"em"===e&&(a=Object(c._x)("Em","A size unit for CSS markup","generatepress")),"%"===e&&(a=Object(c._x)("Percentage","A size unit for CSS markup","generatepress")),"deg"===e&&(a=Object(c._x)("Degree","A size unit for CSS markup","generatepress")),Object(o.createElement)(s.Tooltip /* translators: Unit type (px, em, %) */,{text:e?Object(c.sprintf)(Object(c.__)("%s Units","generatepress"),a):a,key:e},Object(o.createElement)(s.Button,{key:e,className:"components-generate--control-button__units--"+e,isSmall:!0,isPrimary:t===e,"aria-pressed":t===e /* translators: %s: values associated with CSS syntax, 'Pixel', 'Em', 'Percentage' */,"aria-label":e?Object(c.sprintf)(Object(c.__)("%s Units","generatepress"),a):a,onClick:function(){r(e),n()}},i))})))}}))}),Un=function(e){var t=e.label,r=e.unitValue,a=e.units,n=e.onChangeUnit,i=e.step,l=e.rangeMin,c=e.rangeMax,u=e.inputMin,g=void 0===u?null:u,d=e.inputMax,f=void 0===d?null:d,p=e.desktopValue,v=e.desktopInitial,h=e.desktopOnChange,y=e.tabletValue,m=e.tabletInitial,b=e.tabletOnChange,O=e.mobileInitial,S=e.mobileValue,w=e.mobileOnChange;return Object(o.createElement)(s.BaseControl,null,Object(o.createElement)(Dn,{label:t,value:r,devices:["desktop","tablet","mobile"]}),Object(o.createElement)("div",{className:"generate-component-input-with-unit"},Object(o.createElement)("div",{className:"generate-component-device-field","data-device":"desktop"},Object(o.createElement)(Vn,{className:"generate-range-control-range",step:i,rangeMin:l,rangeMax:c,inputMin:g,inputMax:f,value:dn(p)?parseFloat(p):v,initialPosition:v,onChange:h,withInputField:!1})),Object(o.createElement)("div",{className:"generate-component-device-field","data-device":"tablet"},Object(o.createElement)(Vn,{"data-generate-control-device":"tablet",className:"generate-range-control-range",step:i,rangeMin:l,rangeMax:c,inputMin:g,inputMax:f,value:dn(y)?parseFloat(y):m,initialPosition:m,onChange:b,withInputField:!1})),Object(o.createElement)("div",{className:"generate-component-device-field","data-device":"mobile"},Object(o.createElement)(Vn,{"data-generate-control-device":"mobile",className:"generate-range-control-range",step:i,rangeMin:l,rangeMax:c,inputMin:g,inputMax:f,value:dn(S)?parseFloat(S):O,initialPosition:O,onChange:w,withInputField:!1})),Object(o.createElement)(zn,{value:r,units:a,onClick:n})))},Gn=function(e){var t=e.font,r=e.onChange;return Object(o.createElement)(Un,{label:Object(c.__)("Font size","generatepress"),unitValue:t.fontSizeUnit,units:["px","em","rem","%"],onChangeUnit:function(e){r("fontSizeUnit",e,t.index)},step:vn(t,"fontSize","step",1),rangeMin:vn(t,"fontSize","min",1),rangeMax:vn(t,"fontSize","max",100),inputMin:0,desktopValue:t.fontSize,desktopInitial:pn(t,"fontSize"),desktopOnChange:function(e){r("fontSize",e,t.index)},tabletValue:t.fontSizeTablet,tabletInitial:pn(t,"fontSizeTablet"),tabletOnChange:function(e){r("fontSizeTablet",e,t.index)},mobileValue:t.fontSizeMobile,mobileInitial:pn(t,"fontSizeMobile"),mobileOnChange:function(e){r("fontSizeMobile",e,t.index)}})},Wn=function(e){var t=e.font,r=e.onChange;return Object(o.createElement)(Un,{label:Object(c.__)("Line Height","generatepress"),unitValue:t.lineHeightUnit,units:["","px","em","rem"],onChangeUnit:function(e){r("lineHeightUnit",e,t.index)},step:vn(t,"lineHeight","step",.1),rangeMin:vn(t,"lineHeight","min",1),rangeMax:vn(t,"lineHeight","max",5),inputMin:0,desktopValue:t.lineHeight,desktopInitial:pn(t,"lineHeight"),desktopOnChange:function(e){r("lineHeight",e,t.index)},tabletValue:t.lineHeightTablet,tabletInitial:pn(t,"lineHeightTablet"),tabletOnChange:function(e){r("lineHeightTablet",e,t.index)},mobileValue:t.lineHeightMobile,mobileInitial:pn(t,"lineHeightMobile"),mobileOnChange:function(e){r("lineHeightMobile",e,t.index)}})},Kn=function(e){var t=e.font,r=e.onChange;return Object(o.createElement)(Un,{label:Object(c.__)("Letter Spacing","generatepress"),unitValue:t.letterSpacingUnit,units:["px","em","rem"],onChangeUnit:function(e){r("letterSpacingUnit",e,t.index)},step:vn(t,"letterSpacing","step",.01),rangeMin:vn(t,"letterSpacing","min",-1),rangeMax:vn(t,"letterSpacing","max",10),desktopValue:t.letterSpacing,desktopInitial:pn(t,"letterSpacing"),desktopOnChange:function(e){r("letterSpacing",e,t.index)},tabletValue:t.letterSpacingTablet,tabletInitial:pn(t,"letterSpacingTablet"),tabletOnChange:function(e){r("letterSpacingTablet",e,t.index)},mobileValue:t.letterSpacingMobile,mobileInitial:pn(t,"letterSpacingMobile"),mobileOnChange:function(e){r("letterSpacingMobile",e,t.index)}})},$n=function(e){var t=e.font,r=e.onChange;return Object(o.createElement)(Un,{label:"body"===t.selector?Object(c.__)("Paragraph Bottom Margin","generatepress"):Object(c.__)("Bottom Margin","generatepress"),unitValue:t.marginBottomUnit,units:["px","em","rem"],onChangeUnit:function(e){r("marginBottomUnit",e,t.index)},step:vn(t,"marginBottom","step",.1),rangeMin:vn(t,"marginBottom","min",0),rangeMax:vn(t,"marginBottom","max",5),inputMin:0,desktopValue:t.marginBottom,desktopInitial:pn(t,"marginBottom"),desktopOnChange:function(e){0>e&&(e=0),r("marginBottom",e,t.index)},tabletValue:t.marginBottomTablet,tabletInitial:pn(t,"marginBottomTablet"),tabletOnChange:function(e){0>e&&(e=0),r("marginBottomTablet",e,t.index)},mobileValue:t.marginBottomMobile,mobileInitial:pn(t,"marginBottomMobile"),mobileOnChange:function(e){0>e&&(e=0),r("marginBottomMobile",e,t.index)}})},Yn=function(e){var t=e.index,r=e.value,a=e.onChange;return Object(o.createElement)(s.SelectControl,{label:Object(c.__)("Text Decoration","generatepress"),value:r,options:[{value:"",label:Object(c.__)("Default","generatepress")},{value:"none",label:Object(c.__)("None","generatepress")},{value:"underline",label:Object(c.__)("Underline","generatepress")}],onChange:function(e){a("textDecoration",e,t)}})},qn=function(e){var t=e.font,r=e.toggleClose,a=e.onChangeFontValue,n=e.onChangeElement;return Object(o.createElement)("div",{className:"generate-customize-control--font-dropdown"},Object(o.createElement)(wn,{index:t.index,value:t.selector,onChange:n}),!!t.selector&&Object(o.createElement)(o.Fragment,null,"custom"===t.selector&&Object(o.createElement)(Cn,{index:t.index,value:t.customSelector,onChange:a}),Object(o.createElement)(xn,{index:t.index,value:t.fontFamily,onChange:a}),Object(o.createElement)("div",{className:"components-base-control generate-font-manager--select-options"},Object(o.createElement)(jn,{index:t.index,value:t.fontWeight,fontFamily:t.fontFamily,onChange:a}),Object(o.createElement)(Nn,{index:t.index,value:t.textTransform,onChange:a}),Object(o.createElement)(Tn,{index:t.index,value:t.fontStyle,onChange:a}),Object(o.createElement)(Yn,{index:t.index,value:t.textDecoration,onChange:a})),Object(o.createElement)(Gn,{font:t,onChange:a}),Object(o.createElement)(Wn,{font:t,onChange:a}),Object(o.createElement)(Kn,{font:t,onChange:a}),hn(t.selector)&&Object(o.createElement)($n,{font:t,onChange:a})),Object(o.createElement)("div",{className:"generate-font-manager--footer"},Object(o.createElement)(s.Button,{isSecondary:!0,isSmall:!0,onClick:r},Object(c.__)("Close","generatepress"))))},Jn=function(e){var t=e.font,r=e.label,a=e.itemId,n=e.setOpen,i=e.isOpen,s=e.deleteFont,l=e.toggleClose,c=e.onChangeFontValue,u=e.onChangeElement;return Object(o.createElement)("div",{className:"generate-font-manager--item"},Object(o.createElement)("div",{className:"generate-font-manager--header"},Object(o.createElement)(bn,{font:t,itemId:a,setOpen:n,isOpen:i,label:r}),Object(o.createElement)(On,{itemId:a,setOpen:n,isOpen:i}),Object(o.createElement)(Sn,{onClick:s.bind(null,t.index),isOpen:i,itemId:a})),a===i&&Object(o.createElement)(qn,{font:t,toggleClose:l,onChangeFontValue:c,onChangeElement:u}))},Xn=function(e){var t,r,a=e.fontList,n=("group","other",a.reduce((function(e,t,r){var a=t.group||"other";return t.index=r,e[a]=e[a]||[],e[a].push(t),e}),{}));return t=yn(),r=function(t,r){var a,s=null!==(a=n[r])&&void 0!==a?a:[];if(0!==s.length)return Object(o.createElement)("div",{className:"generate-font-manager-group",key:r},Object(o.createElement)("h4",{className:"generate-font-manager-group__label"},t),s.map((function(t){return Object(o.createElement)(Jn,i()({key:t.index,itemId:t.index+1,font:t},e))})))},Object.values(Object.fromEntries(Object.entries(t).map((function(e){var t=g()(e,2),a=t[0],n=t[1];return[a,r(n,a)]}))))};function Zn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function Qn(e){for(var t=1;t0&&v.push({label:Object(c.__)("Google Fonts","generatepress"),options:Object.keys(_e).map((function(e){return{value:e,label:e}}))}),d.forEach((function(e){var t=e.googleFont&&generateCustomizerControls.showGoogleFonts&&p.length>0?1:0;v[t].options=v[t].options.filter((function(t){return t.value!==e.fontFamily}))})),Object(o.createElement)("div",null,Object(o.createElement)("div",{className:"customize-control-notifications-container",ref:e.setNotificationContainer}),!!d.length>0&&d.map((function(t,r){var g=r+1,f=function(e){var t=Pe()(d),a=t[r];t[r]=un(un({},t[r]),{},{fontFamily:e}),i(t),void 0!==_e[e]&&generateCustomizerControls.showGoogleFonts?(t[r]=un(un({},t[r]),{},{googleFont:!0,googleFontCategory:_e[e].category,googleFontVariants:_e[e].variants.join(", ")}),i(t)):(t[r]=un(un({},t[r]),{},{googleFont:!1,googleFontCategory:"",googleFontVariants:""}),i(t)),l(t[r].fontFamily,a.fontFamily)},p=d[r].fontFamily||"";return Object(o.createElement)("div",{className:"generate-font-manager--item",key:r},Object(o.createElement)("div",{className:"generate-font-manager--header"},Object(o.createElement)(s.Button,{className:"generate-font-manager--label",onClick:function(){n(g!==a&&g)}},d[r].fontFamily?d[r].fontFamily:e.label),Object(o.createElement)(s.Tooltip,{text:Object(c.__)("Open Font Family Settings","generatepress")},Object(o.createElement)(s.Button,{className:"generate-font-manager--open",onClick:function(){n(g!==a&&g)}},we(g===a?"chevron-up":"chevron-down"))),Object(o.createElement)(s.Tooltip,{text:Object(c.__)("Delete Font Family","generatepress")},Object(o.createElement)(s.Button,{className:"generate-font-manager--delete-font",onClick:function(){if(window.confirm(Object(c.__)("This will permanently delete this font family. Doing so will stop elements from displaying it as their font.","generatepress"))){var e=Pe()(d),t=e[r];l("",t.fontFamily),e.splice(r,1),i(e)}}},we("trash")))),g===a&&Object(o.createElement)("div",{className:"generate-customize-control--font-dropdown"},Object(o.createElement)(s.BaseControl,{className:"generate-component-font-family-picker-wrapper",id:"generate-font-manager-family-name--input"},Object(o.createElement)(sn,{options:v,placeholder:Object(c.__)("Search fonts…","generatepress"),onChange:function(e){return f(e.value)}}),Object(o.createElement)(s.TextControl,{id:"generate-font-manager-family-name--input",className:"generate-font-manager-family-name--input",label:Object(c.__)("Font family name","generatepress"),value:p,onChange:function(e){var t;t=e,d.filter((function(e){return e.fontFamily===t})).length>0&&(alert(Object(c.__)("Font already selected","generatepress")),e=""),f(e)}}),!!d[r].fontFamily&&!!generateCustomizerControls.showGoogleFonts&&Object(o.createElement)("div",{className:"generate-font-manager--options"},Object(o.createElement)(s.ToggleControl,{className:"generate-font-manager-google-font--field",label:Object(c.__)("Use Google Fonts API","generatepress"),checked:!!d[r].googleFont,onChange:function(e){var t=Pe()(d);t[r]=un(un({},t[r]),{},{googleFont:e}),i(t)}}),!!d[r].googleFont&&Object(o.createElement)("div",{className:"generate-font-manager--google-font-options"},Object(o.createElement)(s.TextControl,{label:Object(c.__)("Category","generatepress"),value:d[r].googleFontCategory||"",onChange:function(e){var t=Pe()(d);t[r]=un(un({},t[r]),{},{googleFontCategory:e}),i(t)}}),Object(o.createElement)(s.TextControl,{label:Object(c.__)("Variants","generatepress"),value:d[r].googleFontVariants||"",onChange:function(e){var t=Pe()(d);t[r]=un(un({},t[r]),{},{googleFontVariants:e}),i(t)}}))),Object(o.createElement)("div",{className:"generate-font-manager--footer"},Object(o.createElement)(s.Button,{isSecondary:!0,isSmall:!0,onClick:u},Object(c.__)("Close","generatepress"))))))})),Object(o.createElement)(s.Button,{isPrimary:!0,onClick:function(){var t=Pe()(e.value);t.push({fontFamily:"",googleFont:!1,googleFontApi:1,googleFontCategory:"",googleFontVariants:""}),i(t);var r=wp.customize.control(e.customizerSetting.id).setting.get().length;n(r)}},Object(c.__)("Add Font","generatepress")))})),ti=l((function(e){var t=e.value,r=Object(o.useState)([]),a=g()(r,2),n=a[0],i=a[1],l=Object(o.useState)(0),u=g()(l,2),d=u[0],f=u[1],p=Object(o.useState)(!1),v=g()(p,2),h=v[0],y=v[1];Object(o.useEffect)((function(){Array.isArray(t)?i(t):"object"===De()(t)&&i(Object.values(t))}),[]),Object(o.useEffect)((function(){var t=h?"refresh":"postMessage";wp.customize.control(e.customizerSetting.id).setting.transport=t,wp.customize.control(e.customizerSetting.id).setting.set(n)}),[n]);var m=fn(),b=function(e){y(!0),i(e)};return Object(o.createElement)("div",null,Object(o.createElement)("div",{className:"customize-control-notifications-container",ref:e.setNotificationContainer}),Object(o.createElement)(Xn,{fontList:n,setOpen:f,isOpen:d,label:e.label,deleteFont:function(e){var t=Pe()(n);t.splice(e,1),b(t)},toggleClose:function(){return f(0)},onChangeFontValue:function(e,t,r){var a=Pe()(n);a[r]=Qn({},a[r]),a[r][e]=t,b(a)},onChangeElement:function(e,t){var r=e.value,a=e.group,i=e.module,o=Pe()(n);o[t]=Qn(Qn({},o[t]),{},{selector:r,module:i,group:a});var s=m[r].placeholders;s&&Object.keys(s).forEach((function(e){var a=m[r].placeholders[e].unit;if(a){var n=e+"Unit";o[t]=Qn(Qn({},o[t]),{},Ie()({},n,a))}})),hn(r)||(o[t]=Qn(Qn({},o[t]),{},{marginBottom:"",marginBottomTablet:"",marginBottomMobile:"",marginBottomUnit:""})),b(o)}}),Object(o.createElement)(s.Button,{isPrimary:!0,onClick:function(){var t=Pe()(e.value);t.push({selector:"",customSelector:"",fontFamily:"",fontWeight:"",textTransform:"",textDecoration:"",fontStyle:"",fontSize:"",fontSizeTablet:"",fontSizeMobile:"",fontSizeUnit:"px",lineHeight:"",lineHeightTablet:"",lineHeightMobile:"",lineHeightUnit:"",letterSpacing:"",letterSpacingTablet:"",letterSpacingMobile:"",letterSpacingUnit:"px"}),b(t),f(t.length)}},Object(c.__)("Add Typography","generatepress")))}));wp.customize.controlConstructor["generate-font-manager-control"]=ei,wp.customize.controlConstructor["generate-typography-control"]=ti,r(62);var ri=r(13);function ai(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function ni(e){for(var t=1;t(null==t&&(t=e()),t)}class vi{enter(e){const t=this.entered.length;return this.entered=function(e,t){const r=new Set,a=e=>r.add(e);e.forEach(a),t.forEach(a);const n=[];return r.forEach(e=>n.push(e)),n}(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var r,a;return this.entered=(r=this.entered.filter(this.isNodeInDocument),a=e,r.filter(e=>e!==a)),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class hi{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(r=>{const a=this.config.exposeProperties[r];null!=a&&(t[r]={value:a(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const yi="__NATIVE_FILE__",mi="__NATIVE_URL__",bi="__NATIVE_TEXT__",Oi="__NATIVE_HTML__";function Si(e,t,r){const a=t.reduce((t,r)=>t||e.getData(r),"");return null!=a?a:r}const wi={[yi]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Oi]:{exposeProperties:{html:(e,t)=>Si(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[mi]:{exposeProperties:{urls:(e,t)=>Si(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[bi]:{exposeProperties:{text:(e,t)=>Si(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Ci(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(wi).filter(e=>{const r=wi[e];return!!(null==r?void 0:r.matchesTypes)&&r.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null}const xi=pi(()=>/firefox/i.test(navigator.userAgent)),Ei=pi(()=>Boolean(window.safari));class ji{interpolate(e){const{xs:t,ys:r,c1s:a,c2s:n,c3s:i}=this;let o=t.length-1;if(e===t[o])return r[o];let s,l=0,c=i.length-1;for(;l<=c;){s=Math.floor(.5*(l+c));const a=t[s];if(ae))return r[s];c=s-1}}o=Math.max(0,c);const u=e-t[o],g=u*u;return r[o]+a[o]*u+n[o]*g+i[o]*u*g}constructor(e,t){const{length:r}=e,a=[];for(let e=0;ee[t]{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,r){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);const a=t=>this.handleDragStart(t,e),n=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",a),t.addEventListener("selectstart",n),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",a),t.removeEventListener("selectstart",n),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const r=t=>this.handleDragEnter(t,e),a=t=>this.handleDragOver(t,e),n=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",r),t.addEventListener("dragover",a),t.addEventListener("drop",n),()=>{t.removeEventListener("dragenter",r),t.removeEventListener("dragover",a),t.removeEventListener("drop",n)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Ii({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return Ii({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(a).some(t=>a[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const r=wi[e];if(!r)throw new Error(`native type ${e} has no configuration`);const a=new hi(r);return a.loadDataTransfer(t),a}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&Ni(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const r=Ti(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:r});const{dataTransfer:a}=e,n=Ci(a);if(this.monitor.isDragging()){if(a&&"function"==typeof a.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),n=this.sourcePreviewNodes.get(e)||t;if(n){const{anchorX:e,anchorY:i,offsetX:o,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),l=function(e,t,r,a,n){const i="IMG"===(o=t).nodeName&&(xi()||!(null===(s=document.documentElement)||void 0===s?void 0:s.contains(o)));var o,s;const l=Ni(i?e:t),c={x:r.x-l.x,y:r.y-l.y},{offsetWidth:u,offsetHeight:g}=e,{anchorX:d,anchorY:f}=a,{dragPreviewWidth:p,dragPreviewHeight:v}=function(e,t,r,a){let n=e?t.width:r,i=e?t.height:a;return Ei()&&e&&(i/=window.devicePixelRatio,n/=window.devicePixelRatio),{dragPreviewWidth:n,dragPreviewHeight:i}}(i,t,u,g),{offsetX:h,offsetY:y}=n,m=0===y||y;return{x:0===h||h?h:new ji([0,.5,1],[c.x,c.x/u*p,c.x+p-u]).interpolate(d),y:m?y:(()=>{let e=new ji([0,.5,1],[c.y,c.y/g*v,c.y+v-g]).interpolate(f);return Ei()&&i&&(e+=(window.devicePixelRatio-1)*v),e})()}}(t,n,r,{anchorX:e,anchorY:i},{offsetX:o,offsetY:s});a.setDragImage(n,l.x,l.y)}}try{null==a||a.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(n)this.beginDragNativeItem(n);else{if(a&&!a.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)),!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:r}=e,a=Ci(r);a&&this.beginDragNativeItem(a,r)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Ti(e)}),t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=e=>{var t;this.dragOverTargetIds=[],this.isDraggingNativeItem()&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=Ti(e),this.scheduleHover(t),(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;this.dropTargetIds=[],this.isDraggingNativeItem()?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):Ci(e.dataTransfer)&&e.preventDefault(),this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Ti(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new Di(t,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new vi(this.isNodeInDocument)}}const Pi=function(e,t,r){return new ki(e,t,r)};var _i=r(39),Ri=r.n(_i);const Ai="undefined"!=typeof window?f.useLayoutEffect:f.useEffect;function Li(e,t,r){return function(e,t,r){const[a,n]=function(e,t,r){const[a,n]=Object(f.useState)(()=>t(e)),i=Object(f.useCallback)(()=>{const i=t(e);Ri()(a,i)||(n(i),r&&r())},[a,e,r]);return Ai(i),[a,i]}(e,t,r);return Ai((function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(n,{handlerIds:[t]})}),[e,n]),a}(t,e||(()=>({})),()=>r.reconnect())}function Fi(e,t){const r=[...t||[]];return null==t&&"function"!=typeof e&&r.push(e),Object(f.useMemo)(()=>"function"==typeof e?e():e,r)}function Bi(e){return Object(f.useMemo)(()=>e.hooks.dropTarget(),[e])}function Hi(e,t,r,a){let n=r?r.call(a,e,t):void 0;if(void 0!==n)return!!n;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let o=0;o{const a=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{const e=function(e){return(t=null,r=null)=>{if(!Object(f.isValidElement)(t)){const a=t;return e(a,r),a}const a=t;return function(e){if("string"==typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a
, or turn it into a drag source or a drop target itself.`)}(a),function(e,t){const r=e.ref;return Object(zi.a)("string"!=typeof r,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?Object(f.cloneElement)(e,{ref:e=>{Gi(r,e),Gi(t,e)}}):Object(f.cloneElement)(e,{ref:t})}(a,r?t=>e(t,r):e)}}(a);t[r]=()=>e}}),t}function Gi(e,t){"function"==typeof e?e(t):e.current=t}class Wi{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Hi(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=Ui({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,Vi(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}var Ki=r(38);function $i(){const{dragDropManager:e}=Object(f.useContext)(Ki.a);return Object(zi.a)(null!=e,"Expected drag drop context"),e}let Yi=!1;class qi{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;Object(zi.a)(!Yi,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Yi=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Yi=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}class Ji{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function Xi(e,t){const r=Fi(e,t),a=function(){const e=$i();return Object(f.useMemo)(()=>new qi(e),[e])}(),n=function(e){const t=$i(),r=Object(f.useMemo)(()=>new Wi(t.getBackend()),[t]);return Ai(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}(r.options);return function(e,t,r){const a=$i(),n=function(e,t){const r=Object(f.useMemo)(()=>new Ji(e,t),[t]);return Object(f.useEffect)(()=>{r.spec=e},[e]),r}(e,t),i=function(e){const{accept:t}=e;return Object(f.useMemo)(()=>(Object(zi.a)(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}(e);Ai((function(){const[e,o]=function(e,t,r){const a=r.getRegistry(),n=a.addTarget(e,t);return[n,()=>a.removeTarget(n)]}(i,n,a);return t.receiveHandlerId(e),r.receiveHandlerId(e),o}),[a,t,n,r,i.map(e=>e.toString()).join("|")])}(r,a,n),[Li(r.collect,a,n),Bi(n)]}function Zi(e){return Object(f.useMemo)(()=>e.hooks.dragSource(),[e])}function Qi(e){return Object(f.useMemo)(()=>e.hooks.dragPreview(),[e])}class eo{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();r&&this.disconnectDragPreview(),this.handlerId&&(t?r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Hi(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Hi(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=Ui({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,Vi(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,Vi(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}let to=!1,ro=!1;class ao{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){Object(zi.a)(!to,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return to=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{to=!1}}isDragging(){if(!this.sourceId)return!1;Object(zi.a)(!ro,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ro=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{ro=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}class no{beginDrag(){const e=this.spec,t=this.monitor;let r=null;return r="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=r?r:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const r=this.spec,a=this.monitor,{isDragging:n}=r;return n?n(a):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,r=this.connector,{end:a}=e;a&&a(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}}function io(e,t){const r=Fi(e,t);Object(zi.a)(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const a=function(){const e=$i();return Object(f.useMemo)(()=>new ao(e),[e])}(),n=function(e,t){const r=$i(),a=Object(f.useMemo)(()=>new eo(r.getBackend()),[r]);return Ai(()=>(a.dragSourceOptions=e||null,a.reconnect(),()=>a.disconnectDragSource()),[a,e]),Ai(()=>(a.dragPreviewOptions=t||null,a.reconnect(),()=>a.disconnectDragPreview()),[a,t]),a}(r.options,r.previewOptions);return function(e,t,r){const a=$i(),n=function(e,t,r){const a=Object(f.useMemo)(()=>new no(e,t,r),[t,r]);return Object(f.useEffect)(()=>{a.spec=e},[e]),a}(e,t,r),i=function(e){return Object(f.useMemo)(()=>{const t=e.type;return Object(zi.a)(null!=t,"spec.type must be defined"),t},[e])}(e);Ai((function(){if(null!=i){const[e,o]=function(e,t,r){const a=r.getRegistry(),n=a.addSource(e,t);return[n,()=>a.removeSource(n)]}(i,n,a);return t.receiveHandlerId(e),r.receiveHandlerId(e),o}}),[a,t,r,n,i])}(r,a,n),[Li(r.collect,a,n),Zi(n),Qi(n)]}function oo(e){var t=e.id,r=e.itemType,a=e.onDrop,n=e.getIndex,i=e.className,s=e.innerComponentProps,l=e.InnerComponent,c=io((function(){return{type:r,item:{id:t},collect:function(e){return{isDragging:e.isDragging()}}}}),[t]),u=g()(c,2),d=u[0].isDragging,f=u[1],p=Xi((function(){return{accept:r,hover:function(e){var r=e.id;if(r!==t){var i=n(t);a(r,i)}}}}),[n,a]),v=g()(p,2)[1],h=d?"0.2":1;return Object(o.createElement)("div",{ref:function(e){return f(v(e))},className:i,style:{opacity:h}},l&&Object(o.createElement)(l,s))}function so(e){var t=e.data,r=e.itemIdKey,a=e.onDrop,n=e.getIndex,i=e.itemType,s=e.listClassName,l=e.itemClassName,c=e.InnerComponent,u=Xi((function(){return{accept:i}})),d=g()(u,2)[1];return Object(o.createElement)("div",{ref:d,className:s},t&&t.map((function(e){return Object(o.createElement)(oo,{key:e[r],id:e[r],itemType:i,className:l,onDrop:a,getIndex:n,InnerComponent:c,innerComponentProps:{item:e}})})))}function lo(e){var t=e.idKey,r=void 0===t?"id":t,a=e.acceptedType,n=void 0===a?"simple-list-item":a,i=e.listData,s=void 0===i?[]:i,l=e.onChangeData,c=e.listClassName,u=void 0===c?"":c,d=e.itemClassName,f=void 0===d?"":d,p=e.InnerComponent,v=Object(o.useState)([]),h=g()(v,2),y=h[0],m=h[1];Object(o.useEffect)((function(){m(s)}),[JSON.stringify(s)]),Object(o.useEffect)((function(){l(y)}),[JSON.stringify(y)]);var b=Object(o.useCallback)((function(e){var t=y.find((function(t){return e===t[r]}));return y.indexOf(t)}),[JSON.stringify(y)]),O=Object(o.useCallback)((function(e,t){var r=b(e);m(function(e,t,r){var a=Array.from(e),n=a.splice(t,1),i=g()(n,1)[0];return a.splice(r,0,i),a}(y,r,t))}),[JSON.stringify(y)]);return Object(o.createElement)(fi.a,{backend:Pi},Object(o.createElement)(so,{data:y,itemIdKey:r,onDrop:O,getIndex:b,itemType:n,listClassName:u,itemClassName:f,InnerComponent:p}))}function co(e){var t=e.item;return Object(o.createElement)(s.Tooltip,{text:t.slug,position:"top center"},Object(o.createElement)("span",{style:{backgroundColor:t.color}}))}var uo=l((function(e){var t=function(){var e=Object(o.useReducer)(si,oi),t=g()(e,2),r=t[0],a=t[1];return{colors:r,setColors:function(e){return a({type:"SET_COLORS",payload:e})},addColor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return a({type:"ADD_COLOR",payload:Object.assign({},ii,{slug:e,color:t})})},deleteColor:function(e){return a({type:"DELETE_COLOR",payload:e})},updateColorValue:function(e,t){return a({type:"UPDATE_COLOR_VALUE",payload:{slug:e,value:t}})},updateColorSlug:function(e,t){return a({type:"UPDATE_COLOR_SLUG",payload:{slug:e,value:t}})}}}(),r=t.colors,a=t.setColors,n=t.addColor,i=t.deleteColor,s=t.updateColorValue,l=t.updateColorSlug,u=Object(o.useState)(!1),d=g()(u,2),f=d[0],p=d[1],v=Object(o.useState)(!1),h=g()(v,2),y=h[0],m=h[1],b=Object(o.useState)([]),O=g()(b,2),S=O[0],w=O[1];Object(o.useEffect)((function(){var t=Object(ri.isObject)(e.value)?Object.values(e.value):e.value;a(t),p(!0)}),[]),Object(o.useEffect)((function(){var t,a;f&&(a=[],(t=r).length>0&&t.forEach((function(e){a.push({name:e.slug,slug:e.slug,color:"var(--"+e.slug+")"})})),window.sessionStorage.setItem("generateGlobalColors",JSON.stringify(a)),function(t){wp.customize.control(e.customizerSetting.id).setting.set(t);var r=":root {";t.length>0&&t.forEach((function(e){var t=e.slug.replace(" ","-").toLowerCase();r+="--"+t+": "+e.color+";"})),r+="}";var a=document.getElementById("generate-global-color-styles");a?a.innerHTML=r:document.body.insertAdjacentHTML("beforeend",'")}(r))}),[JSON.stringify(r),f]);var C=Object(o.useCallback)((function(){n(function e(t){var a="global-color-".concat(t+1);return-1===Object(ri.findIndex)(r,{slug:a})?a:e(t+1)}(r.length))}),[r.length]);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:"customize-control-notifications-container",ref:e.setNotificationContainer}),Object(o.createElement)("div",{className:"generate-color-manager-wrapper"},Object(o.createElement)("div",{className:"generate-color-manager--item"},Object(o.createElement)(ui,{onClick:C,disabled:y})),Object(o.createElement)("div",{className:"generate-color-manager--item"},Object(o.createElement)(li,{id:"add-color",icon:y?"check":"reorder",text:y?Object(c.__)("Finish re-ordering","generatepress"):Object(c.__)("Re-order colors","generatepress"),onClick:function(e){e.preventDefault(),y&&(a(S),window.sessionStorage.setItem("generateGlobalColors",JSON.stringify(S))),m(!y)}}))),y?Object(o.createElement)(lo,{listData:r,idKey:"slug",listClassName:"generate-color-manager-dnd-list",itemClassName:"generate-color-manager-dnd-list-item",InnerComponent:co,onChangeData:w}):Object(o.createElement)(di,{colors:r,onChangeColor:s,onChangeSlug:l,onClickDeleteColor:i}))}));wp.customize.controlConstructor["generate-color-manager-control"]=uo,r(65);var go=function(e){var t=Object(o.useState)(!1),r=g()(t,2),a=r[0],n=r[1],i=function(){e.choices.sectionRedirect?wp.customize.section(e.choices.toggleId).focus():document.querySelectorAll('[data-toggleId="'+e.choices.toggleId+'"]').forEach((function(e){a?(e.style.display="",n(!1)):(e.style.display="block",n(!0))}))},l=e.choices.tooltipText?e.choices.tooltipText:Object(c.sprintf)(Object(c.__)("Open %s Settings","generatepress"),e.choices.title),u=e.choices.sectionRedirect?"chevron-right":"chevron-down";return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("div",{className:"generate-customize-control-title"},!!e.choices.toggleId&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(s.Tooltip,{text:l},Object(o.createElement)(s.Button,{className:"generate-customize-control-title--label",onClick:i},e.choices.title)),Object(o.createElement)(s.Tooltip,{text:l},Object(o.createElement)(s.Button,{className:"generate-customize-control-title--toggle",onClick:i},we(a?"chevron-up":u)))),!e.choices.toggleId&&Object(o.createElement)("h3",null,e.choices.title)))},fo=wp.customize.Control.extend({ready:function(){this.renderContent()},embed:function(){var e=this,t=e.section();t&&wp.customize.section(t,(function(t){t.expanded.bind((function(t){t&&e.actuallyEmbed()}))}))},actuallyEmbed:function(){"resolved"!==this.deferred.embedded.state()&&(this.renderContent(),this.deferred.embedded.resolve())},initialize:function(e,t){var r=this;r.setNotificationContainer=r.setNotificationContainer.bind(r),wp.customize.Control.prototype.initialize.call(r,e,t),wp.customize.control.bind("removed",(function e(t){r===t&&(r.destroy(),r.container.remove(),wp.customize.control.unbind("removed",e))}))},setNotificationContainer:function(e){this.notifications.container=jQuery(e),this.notifications.render()},renderContent:function(){var e=Object(o.createElement)(s.SlotFillProvider,null,Object(o.createElement)(go,i()({},this.params,{control:this,choices:this.params.choices,title:this.params.title})),Object(o.createElement)(s.Popover.Slot,null)),t=this.container[0];if(this.params.choices.wrapper){var r=document.getElementById(this.params.choices.wrapper+"--wrapper");r&&(t=r,this.container.hide())}Object(o.render)(e,t)},destroy:function(){Object(o.unmountComponentAtNode)(this.container[0]),wp.customize.Control.prototype.destroy&&wp.customize.Control.prototype.destroy.call(this)}});wp.customize.controlConstructor["generate-title-control"]=fo;var po=r(41),vo=r.n(po),ho=wp.customize.Control.extend({ready:function(){this.renderContent()},embed:function(){var e=this,t=e.section();t&&wp.customize.section(t,(function(t){t.expanded.bind((function(t){t&&e.actuallyEmbed()}))}))},actuallyEmbed:function(){"resolved"!==this.deferred.embedded.state()&&(this.renderContent(),this.deferred.embedded.resolve())},initialize:function(e,t){var r=this;r.setNotificationContainer=r.setNotificationContainer.bind(r),wp.customize.Control.prototype.initialize.call(r,e,t),wp.customize.control.bind("removed",(function e(t){r===t&&(r.destroy(),r.container.remove(),wp.customize.control.unbind("removed",e))}))},setNotificationContainer:function(e){this.notifications.container=jQuery(e),this.notifications.render()},renderContent:function(){var e=this.params.choices;this.params.choices.toggleId&&this.container[0].setAttribute("data-toggleId",this.params.choices.toggleId),Object(o.render)(Object(o.createElement)("div",{className:vo()(Ie()({"generate-customize-control-wrapper":!0},e.class,!!e.class)),id:e.id,"data-wrapper-type":e.type},e.items.map((function(e){return Object(o.createElement)("div",{key:e,id:e+"--wrapper"})}))),this.container[0])},destroy:function(){Object(o.unmountComponentAtNode)(this.container[0]),wp.customize.Control.prototype.destroy&&wp.customize.Control.prototype.destroy.call(this)}});wp.customize.controlConstructor["generate-wrapper-control"]=ho,document.addEventListener("DOMContentLoaded",(function(){window.sessionStorage.removeItem("generateGlobalColors")}))},,,,function(e,t,r){"use strict";function a(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}r.d(t,"a",(function(){return te})),r(8);var n="function"==typeof Symbol&&Symbol.observable||"@@observable",i=function(){return Math.random().toString(36).substring(7).split("").join(".")},o={INIT:"@@redux/INIT"+i(),REPLACE:"@@redux/REPLACE"+i(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+i()}};function s(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function l(e,t,r){var i;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(a(1));return r(l)(e,t)}if("function"!=typeof e)throw new Error(a(2));var c=e,u=t,g=[],d=g,f=!1;function p(){d===g&&(d=g.slice())}function v(){if(f)throw new Error(a(3));return u}function h(e){if("function"!=typeof e)throw new Error(a(4));if(f)throw new Error(a(5));var t=!0;return p(),d.push(e),function(){if(t){if(f)throw new Error(a(6));t=!1,p();var r=d.indexOf(e);d.splice(r,1),g=null}}}function y(e){if(!s(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(f)throw new Error(a(9));try{f=!0,u=c(u,e)}finally{f=!1}for(var t=g=d,r=0;r=0;a--)if(t.canDragSource(e[a])){r=e[a];break}return r}(t,o);if(null==l)return void e.dispatch(h);let d=null;if(n){if(!i)throw new Error("getSourceClientOffset must be defined");!function(e){Object(c.a)("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(i),d=i(l)}e.dispatch(v(n,d));const f=s.getSource(l).beginDrag(o,l);if(null==f)return;!function(e){Object(c.a)(u(e),"Item must be an object.")}(f),s.pinSource(l);const p=s.getSourceType(l);return{type:g,payload:{itemType:p,item:f,sourceId:l,clientOffset:n||null,sourceClientOffset:d||null,isSourcePublic:!!a}}}}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function b(e){for(var t=1;t{const o=function(e,t,r,a){const n=r.getTarget(e);let i=n?n.drop(a,e):void 0;return function(e){Object(c.a)(void 0===e||u(e),"Drop result must either be an object or undefined.")}(i),void 0===i&&(i=0===t?{}:a.getDropResult()),i}(n,i,a,r),s={type:f,payload:{dropResult:b({},t,o)}};e.dispatch(s)})}}function S(e){return function(){const t=e.getMonitor(),r=e.getRegistry();!function(e){Object(c.a)(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const a=t.getSourceId();return null!=a&&(r.getSource(a,!0).endDrag(t,a),r.unpinSource()),{type:p}}}function w(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function C(e){return function(t,{clientOffset:r}={}){!function(e){Object(c.a)(Array.isArray(e),"Expected targetIds to be an array.")}(t);const a=t.slice(0),n=e.getMonitor(),i=e.getRegistry();return function(e,t,r){for(let a=e.length-1;a>=0;a--){const n=e[a];w(t.getTargetType(n),r)||e.splice(a,1)}}(a,i,n.getItemType()),function(e,t,r){Object(c.a)(t.isDragging(),"Cannot call hover while not dragging."),Object(c.a)(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t{const i=r[n];var o;return a[n]=(o=i,(...r)=>{const a=o.apply(e,r);void 0!==a&&t(a)}),a},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function j(e,t){return{x:e.x-t.x,y:e.y-t.y}}const N=[],T=[];N.__IS_NONE__=!0,T.__IS_ALL__=!0;class D{subscribeToStateChange(e,t={}){const{handlerIds:r}=t;Object(c.a)("function"==typeof e,"listener must be a function."),Object(c.a)(void 0===r||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let a=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),n=t.stateId;try{n===a||n===a+1&&!function(e,t){return e!==N&&(e===T||void 0===t||(r=e,t.filter(e=>r.indexOf(e)>-1)).length>0);var r}(t.dirtyHandlerIds,r)||e()}finally{a=n}})}subscribeToOffsetChange(e){Object(c.a)("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const r=this.store.getState().dragOffset;r!==t&&(t=r,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return Object(c.a)(t,"Expected to find a valid source. sourceId="+e),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);return Object(c.a)(t,"Expected to find a valid target. targetId="+e),!(!this.isDragging()||this.didDrop())&&(w(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e))}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);return Object(c.a)(t,"Expected to find a valid source. sourceId="+e),!(!this.isDragging()||!this.isSourcePublic())&&(this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e))}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:r}=t;if(!this.isDragging())return!1;const a=this.registry.getTargetType(e),n=this.getItemType();if(n&&!w(a,n))return!1;const i=this.getTargetIds();if(!i.length)return!1;const o=i.indexOf(e);return r?o===i.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:a}=e;return t&&r&&a?j((i=a,{x:(n=t).x+i.x,y:n.y+i.y}),r):null;var n,i}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:r}=e;return t&&r?j(t,r):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}var M=r(29);class I{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const k=new class{enqueueTask(e){const{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.indexthis.capacity){for(let t=0,r=e.length-this.index;t{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=Object(M.a)(this.flush),this.requestErrorThrow=Object(M.b)(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},P=new class{create(e){const t=this.freeTasks,r=t.length?t.pop():new I(this.onError,e=>t[t.length]=e);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}(k.registerPendingError),_="dnd-core/REMOVE_TARGET";function R(e,t){t&&Array.isArray(e)?e.forEach(e=>R(e,!1)):Object(c.a)("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var A;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(A||(A={}));let L=0;function F(e){switch(e[0]){case"S":return A.SOURCE;case"T":return A.TARGET;default:throw new Error("Cannot parse handler ID: "+e)}}function B(e,t){const r=e.entries();let a=!1;do{const{done:e,value:[,n]}=r.next();if(n===t)return!0;a=!!e}while(!a);return!1}class H{addSource(e,t){R(e),function(e){Object(c.a)("function"==typeof e.canDrag,"Expected canDrag to be a function."),Object(c.a)("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Object(c.a)("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const r=this.addHandler(A.SOURCE,e,t);return this.store.dispatch(function(e){return{type:"dnd-core/ADD_SOURCE",payload:{sourceId:e}}}(r)),r}addTarget(e,t){R(e,!0),function(e){Object(c.a)("function"==typeof e.canDrop,"Expected canDrop to be a function."),Object(c.a)("function"==typeof e.hover,"Expected hover to be a function."),Object(c.a)("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const r=this.addHandler(A.TARGET,e,t);return this.store.dispatch(function(e){return{type:"dnd-core/ADD_TARGET",payload:{targetId:e}}}(r)),r}containsHandler(e){return B(this.dragSources,e)||B(this.dropTargets,e)}getSource(e,t=!1){return Object(c.a)(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Object(c.a)(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Object(c.a)(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Object(c.a)(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return F(e)===A.SOURCE}isTargetId(e){return F(e)===A.TARGET}removeSource(e){var t;Object(c.a)(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:"dnd-core/REMOVE_SOURCE",payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},k.enqueueTask(P.create(t))}removeTarget(e){Object(c.a)(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:_,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);Object(c.a)(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Object(c.a)(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){const a=function(e){const t=(L++).toString();switch(e){case A.SOURCE:return"S"+t;case A.TARGET:return"T"+t;default:throw new Error("Unknown Handler Role: "+e)}}(e);return this.types.set(a,t),e===A.SOURCE?this.dragSources.set(a,r):e===A.TARGET&&this.dropTargets.set(a,r),a}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const V=(e,t)=>e===t;function z(e=N,t){switch(t.type){case d:break;case"dnd-core/ADD_SOURCE":case"dnd-core/ADD_TARGET":case _:case"dnd-core/REMOVE_SOURCE":return N;case g:case"dnd-core/PUBLISH_DRAG_SOURCE":case p:case f:default:return T}const{targetIds:r=[],prevTargetIds:a=[]}=t.payload,n=function(e,t){const r=new Map,a=e=>{r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(a),t.forEach(a);const n=[];return r.forEach((e,t)=>{1===e&&n.push(t)}),n}(r,a);if(!(n.length>0)&&function(e,t,r=V){if(e.length!==t.length)return!1;for(let a=0;ae!==n))});case f:return $({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case p:return $({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var a,n}function J(e=0,t){switch(t.type){case"dnd-core/ADD_SOURCE":case"dnd-core/ADD_TARGET":return e+1;case"dnd-core/REMOVE_SOURCE":case _:return e-1;default:return e}}function X(e=0){return e+1}function Z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q(e){for(var t=1;te&&e[t]?e[t]:a||null,r))})}),dragOffset:W(e.dragOffset,t),refCount:J(e.refCount,t),dragOperation:q(e.dragOperation,t),stateId:X(e.stateId)};var r,a}function te(e,t,r={},a=!1){const n=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return l(ee,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(a),i=new D(n,new H(n)),o=new E(n,i),s=e(o,t,r);return o.receiveBackend(s),o}},,,function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return c}));var a=r(40),n=r(74),i=r(1),o=r(38);let s=0;const l=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var c=Object(i.memo)((function(e){var{children:t}=e,r=function(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},i=Object.keys(e);for(a=0;a=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,["children"]);const[c,g]=function(e){if("manager"in e)return[{dragDropManager:e.manager},!1];return[function(e,t=u(),r,a){const i=t;return i[l]||(i[l]={dragDropManager:Object(n.a)(e,t,r,a)}),i[l]}(e.backend,e.context,e.options,e.debugMode),!e.context]}(r);return Object(i.useEffect)(()=>{if(g){const e=u();return++s,()=>{0==--s&&(e[l]=null)}}},[]),Object(a.jsx)(o.a.Provider,{value:c,children:t})}));function u(){return void 0!==e?e:window}}).call(this,r(33))}]);