(()=>{var e,t,n={748:(e,t,n)=>{"use strict";var o,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=(o=n(1609))&&o.__esModule?o:{default:o};t.A=function(e){var t=e.fill,n=void 0===t?"currentColor":t,o=e.width,i=void 0===o?24:o,l=e.height,s=void 0===l?24:l,c=e.style,u=void 0===c?{}:c,d=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["fill","width","height","style"]);return r.default.createElement("svg",a({viewBox:"0 0 24 24",style:a({fill:n,width:i,height:s},u)},d),r.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},4657:(e,t,n)=>{"use strict";var o,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=(o=n(1609))&&o.__esModule?o:{default:o};t.A=function(e){var t=e.fill,n=void 0===t?"currentColor":t,o=e.width,i=void 0===o?24:o,l=e.height,s=void 0===l?24:l,c=e.style,u=void 0===c?{}:c,d=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(e,["fill","width","height","style"]);return r.default.createElement("svg",a({viewBox:"0 0 24 24",style:a({fill:n,width:i,height:s},u)},d),r.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},9942:(e,t)=>{var n,o;(o=o||{}).stringify=(n={"visit_linear-gradient":function(e){return n.visit_gradient(e)},"visit_repeating-linear-gradient":function(e){return n.visit_gradient(e)},"visit_radial-gradient":function(e){return n.visit_gradient(e)},"visit_repeating-radial-gradient":function(e){return n.visit_gradient(e)},visit_gradient:function(e){var t=n.visit(e.orientation);return t&&(t+=", "),e.type+"("+t+n.visit(e.colorStops)+")"},visit_shape:function(e){var t=e.value,o=n.visit(e.at),a=n.visit(e.style);return a&&(t+=" "+a),o&&(t+=" at "+o),t},"visit_default-radial":function(e){var t="",o=n.visit(e.at);return o&&(t+=o),t},"visit_extent-keyword":function(e){var t=e.value,o=n.visit(e.at);return o&&(t+=" at "+o),t},"visit_position-keyword":function(e){return e.value},visit_position:function(e){return n.visit(e.value.x)+" "+n.visit(e.value.y)},"visit_%":function(e){return e.value+"%"},visit_em:function(e){return e.value+"em"},visit_px:function(e){return e.value+"px"},visit_literal:function(e){return n.visit_color(e.value,e)},visit_hex:function(e){return n.visit_color("#"+e.value,e)},visit_rgb:function(e){return n.visit_color("rgb("+e.value.join(", ")+")",e)},visit_rgba:function(e){return n.visit_color("rgba("+e.value.join(", ")+")",e)},visit_color:function(e,t){var o=e,a=n.visit(t.length);return a&&(o+=" "+a),o},visit_angular:function(e){return e.value+"deg"},visit_directional:function(e){return"to "+e.value},visit_array:function(e){var t="",o=e.length;return e.forEach((function(e,a){t+=n.visit(e),a<o-1&&(t+=", ")})),t},visit:function(e){if(!e)return"";if(e instanceof Array)return n.visit_array(e,"");if(e.type){var t=n["visit_"+e.type];if(t)return t(e);throw Error("Missing visitor visit_"+e.type)}throw Error("Invalid node.")}},function(e){return n.visit(e)}),(o=o||{}).parse=function(){var e=/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,t=/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,n=/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,o=/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,a=/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,r=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,i=/^(left|center|right|top|bottom)/i,l=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,s=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,d=/^\(/,p=/^\)/,h=/^,/,m=/^\#([0-9a-fA-F]+)/,f=/^([a-zA-Z]+)/,b=/^rgb/i,g=/^rgba/i,v=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,k=/var\(([a-zA-Z-0-9_#,\s]+)\)/,y="";function E(e){var t=new Error(y+": "+e);throw t.source=y,t}function x(){return _("linear-gradient",e,C)||_("repeating-linear-gradient",t,C)||_("radial-gradient",n,S)||_("repeating-radial-gradient",o,S)}function _(e,t,n){return w(t,(function(t){var o=n();return o&&(L(h)||E("Missing comma before color stops")),{type:e,orientation:o,colorStops:A(D)}}))}function w(e,t){var n=L(e);if(n){L(d)||E("Missing (");var o=t(n);return L(p)||E("Missing )"),o}}function C(){return F("directional",a,1)||F("angular",u,1)}function S(){var e,t,n=N();return n&&((e=[]).push(n),t=y,L(h)&&((n=N())?e.push(n):y=t)),e}function N(){var e,t,n=((t=F("shape",/^(circle)/i,0))&&(t.style=P()||O()),t||((e=F("shape",/^(ellipse)/i,0))&&(e.style=I()||O()),e));if(n)n.at=T();else{var o=O();if(o){n=o;var a=T();a&&(n.at=a)}else{var r=M();r&&(n={type:"default-radial",at:r})}}return n}function O(){return F("extent-keyword",r,1)}function T(){if(F("position",/^at/,0)){var e=M();return e||E("Missing positioning value"),e}}function M(){var e={x:I(),y:I()};if(e.x||e.y)return{type:"position",value:e}}function A(e){var t=e(),n=[];if(t)for(n.push(t);L(h);)(t=e())?n.push(t):E("One extra comma");return n}function D(){var e=F("hex",m,1)||w(g,(function(){return{type:"rgba",value:A(R)}}))||w(b,(function(){return{type:"rgb",value:A(R)}}))||F("literal",k,0)||F("literal",f,0);return e||E("Expected color definition"),e.length=I(),e}function R(){return L(v)[1]}function I(){return F("%",s,1)||F("position-keyword",i,1)||P()}function P(){return F("px",l,1)||F("em",c,1)}function F(e,t,n){var o=L(t);if(o)return{type:e,value:o[n]}}function L(e){var t,n;return(n=/^[\n\r\t\s]+/.exec(y))&&B(n[0].length),(t=e.exec(y))&&B(t[0].length),t}function B(e){y=y.substr(e)}return function(e){return y=e.toString(),t=A(x),y.length>0&&E("Invalid input not EOF"),t;var t}}(),t.parse=o.parse,t.stringify=o.stringify},370:(e,t,n)=>{"use strict";var o=n(9798);function a(){var e={},t=0,n=0,o=0;return{add:function(a,r){r||(r=a,a=0),a>n?n=a:a<o&&(o=a),e[a]||(e[a]=[]),e[a].push(r),t++},process:function(){for(var t=o;t<=n;t++)for(var a=e[t],r=0;r<a.length;r++)(0,a[r])()},size:function(){return t}}}e.exports=function(e){var t=(e=e||{}).reporter,n=o.getOption(e,"async",!0),r=o.getOption(e,"auto",!0);r&&!n&&(t&&t.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),n=!0);var i,l=a(),s=!1;function c(){for(s=!0;l.size();){var e=l;l=a(),e.process()}s=!1}function u(){i=setTimeout(c,0)}return{add:function(e,t){!s&&r&&n&&0===l.size()&&u(),l.add(e,t)},force:function(e){s||(void 0===e&&(e=n),i&&(clearTimeout(i),i=null),e?u():c())}}}},9798:e=>{"use strict";(e.exports={}).getOption=function(e,t,n){var o=e[t];return null==o&&void 0!==n?n:o}},2485:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var l in n)o.call(n,l)&&n[l]&&e.push(l);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},2963:(e,t,n)=>{"use strict";var o=n(4994);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,a.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var a=o(n(598));e.exports=t.default},598:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},788:e=>{"use strict";function t(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,n){e.classList?e.classList.remove(n):"string"==typeof e.className?e.className=t(e.className,n):e.setAttribute("class",t(e.className&&e.className.baseVal||"",n))}},4581:e=>{"use strict";var t=e.exports={};t.isIE=function(e){return!(-1===(t=navigator.userAgent.toLowerCase()).indexOf("msie")&&-1===t.indexOf("trident")&&-1===t.indexOf(" edge/")||e&&e!==function(){var e=3,t=document.createElement("div"),n=t.getElementsByTagName("i");do{t.innerHTML="\x3c!--[if gt IE "+ ++e+"]><i></i><![endif]--\x3e"}while(n[0]);return e>4?e:void 0}());var t},t.isLegacyOpera=function(){return!!window.opera}},4660:e=>{"use strict";(e.exports={}).forEach=function(e,t){for(var n=0;n<e.length;n++){var o=t(e[n]);if(o)return o}}},6057:(e,t,n)=>{"use strict";var o=n(4581);e.exports=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,a=e.stateHandler.getState;if(!t)throw new Error("Missing required dependency: reporter.");function r(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function i(e){return a(e).object}return{makeDetectable:function(e,i,l){l||(l=i,i=e,e=null),(e=e||{}).debug,o.isIE(8)?l(i):function(i,l){var s=r(["display: block","position: absolute","top: 0","left: 0","width: 100%","height: 100%","border: none","padding: 0","margin: 0","opacity: 0","z-index: -1000","pointer-events: none"]),c=!1,u=window.getComputedStyle(i),d=i.offsetWidth,p=i.offsetHeight;function h(){function n(){if("static"===u.position){i.style.setProperty("position","relative",e.important?"important":"");var n=function(t,n,o,a){var r=o[a];"auto"!==r&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(r)&&(t.warn("An element that is positioned static has style."+a+"="+r+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+a+" will be set to 0. Element: ",n),n.style.setProperty(a,"0",e.important?"important":""))};n(t,i,u,"top"),n(t,i,u,"right"),n(t,i,u,"bottom"),n(t,i,u,"left")}}""!==u.position&&(n(),c=!0);var r=document.createElement("object");r.style.cssText=s,r.tabIndex=-1,r.type="text/html",r.setAttribute("aria-hidden","true"),r.onload=function(){c||n(),function e(t,n){if(!t.contentDocument){var o=a(t);return o.checkForObjectDocumentTimeoutId&&window.clearTimeout(o.checkForObjectDocumentTimeoutId),void(o.checkForObjectDocumentTimeoutId=setTimeout((function(){o.checkForObjectDocumentTimeoutId=0,e(t,n)}),100))}n(t.contentDocument)}(this,(function(e){l(i)}))},o.isIE()||(r.data="about:blank"),a(i)&&(i.appendChild(r),a(i).object=r,o.isIE()&&(r.data="about:blank"))}a(i).startSize={width:d,height:p},n?n.add(h):h()}(i,l)},addListener:function(e,t){function n(){t(e)}if(o.isIE(8))a(e).object={proxy:n},e.attachEvent("onresize",n);else{var r=i(e);if(!r)throw new Error("Element is not detectable by this strategy.");r.contentDocument.defaultView.addEventListener("resize",n)}},uninstall:function(e){if(a(e)){var t=i(e);t&&(o.isIE(8)?e.detachEvent("onresize",t.proxy):e.removeChild(t),a(e).checkForObjectDocumentTimeoutId&&window.clearTimeout(a(e).checkForObjectDocumentTimeoutId),delete a(e).object)}}}}},7055:(e,t,n)=>{"use strict";var o=n(4660).forEach;e.exports=function(e){var t=(e=e||{}).reporter,n=e.batchProcessor,a=e.stateHandler.getState,r=(e.stateHandler.hasState,e.idHandler);if(!n)throw new Error("Missing required dependency: batchProcessor");if(!t)throw new Error("Missing required dependency: reporter.");var i=function(){var e=document.createElement("div");e.style.cssText=c(["position: absolute","width: 1000px","height: 1000px","visibility: hidden","margin: 0","padding: 0"]);var t=document.createElement("div");t.style.cssText=c(["position: absolute","width: 500px","height: 500px","overflow: scroll","visibility: none","top: -1500px","left: -1500px","visibility: hidden","margin: 0","padding: 0"]),t.appendChild(e),document.body.insertBefore(t,document.body.firstChild);var n=500-t.clientWidth,o=500-t.clientHeight;return document.body.removeChild(t),{width:n,height:o}}(),l="erd_scroll_detection_container";function s(e){!function(e,t,n){if(!e.getElementById(t)){var o=n+"_animation",a=n+"_animation_active",r="/* Created by the element-resize-detector library. */\n";r+="."+n+" > div::-webkit-scrollbar { "+c(["display: none"])+" }\n\n",r+="."+a+" { "+c(["-webkit-animation-duration: 0.1s","animation-duration: 0.1s","-webkit-animation-name: "+o,"animation-name: "+o])+" }\n",r+="@-webkit-keyframes "+o+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",function(n,o){o=o||function(t){e.head.appendChild(t)};var a=e.createElement("style");a.innerHTML=n,a.id=t,o(a)}(r+="@keyframes "+o+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }")}}(e,"erd_scroll_detection_scrollbar_style",l)}function c(t){var n=e.important?" !important; ":"; ";return(t.join(n)+n).trim()}function u(e,n,o){if(e.addEventListener)e.addEventListener(n,o);else{if(!e.attachEvent)return t.error("[scroll] Don't know how to add event listeners.");e.attachEvent("on"+n,o)}}function d(e,n,o){if(e.removeEventListener)e.removeEventListener(n,o);else{if(!e.detachEvent)return t.error("[scroll] Don't know how to remove event listeners.");e.detachEvent("on"+n,o)}}function p(e){return a(e).container.childNodes[0].childNodes[0].childNodes[0]}function h(e){return a(e).container.childNodes[0].childNodes[0].childNodes[1]}return s(window.document),{makeDetectable:function(e,s,d){function m(){if(e.debug){var n=Array.prototype.slice.call(arguments);if(n.unshift(r.get(s),"Scroll: "),t.log.apply)t.log.apply(null,n);else for(var o=0;o<n.length;o++)t.log(n[o])}}function f(e){var t=a(e).container.childNodes[0],n=window.getComputedStyle(t);return!n.width||-1===n.width.indexOf("px")}function b(){var e=window.getComputedStyle(s),t={};return t.position=e.position,t.width=s.offsetWidth,t.height=s.offsetHeight,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.widthCSS=e.width,t.heightCSS=e.height,t}function g(){if(m("storeStyle invoked."),a(s)){var e=b();a(s).style=e}else m("Aborting because element has been uninstalled")}function v(e,t,n){a(e).lastWidth=t,a(e).lastHeight=n}function k(){return 2*i.width+1}function y(){return 2*i.height+1}function E(e){return e+10+k()}function x(e){return e+10+y()}function _(e,t,n){var o=p(e),a=h(e),r=E(t),i=x(n),l=function(e){return 2*e+k()}(t),s=function(e){return 2*e+y()}(n);o.scrollLeft=r,o.scrollTop=i,a.scrollLeft=l,a.scrollTop=s}function w(){var e=a(s).container;if(!e){(e=document.createElement("div")).className=l,e.style.cssText=c(["visibility: hidden","display: inline","width: 0px","height: 0px","z-index: -1","overflow: hidden","margin: 0","padding: 0"]),a(s).container=e,function(e){e.className+=" "+l+"_animation_active"}(e),s.appendChild(e);var t=function(){a(s).onRendered&&a(s).onRendered()};u(e,"animationstart",t),a(s).onAnimationStart=t}return e}function C(){if(m("Injecting elements"),a(s)){!function(){var n=a(s).style;if("static"===n.position){s.style.setProperty("position","relative",e.important?"important":"");var o=function(e,t,n,o){var a=n[o];"auto"!==a&&"0"!==function(e){return e.replace(/[^-\d\.]/g,"")}(a)&&(e.warn("An element that is positioned static has style."+o+"="+a+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+o+" will be set to 0. Element: ",t),t.style[o]=0)};o(t,s,n,"top"),o(t,s,n,"right"),o(t,s,n,"bottom"),o(t,s,n,"left")}}();var n=a(s).container;n||(n=w());var o,r,d,p,h=i.width,f=i.height,b=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden","width: 100%","height: 100%","left: 0px","top: 0px"]),g=c(["position: absolute","flex: none","overflow: hidden","z-index: -1","visibility: hidden"].concat(["left: "+(o=(o=-(1+h))?o+"px":"0"),"top: "+(r=(r=-(1+f))?r+"px":"0"),"right: "+(p=(p=-h)?p+"px":"0"),"bottom: "+(d=(d=-f)?d+"px":"0")])),v=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),k=c(["position: absolute","flex: none","overflow: scroll","z-index: -1","visibility: hidden","width: 100%","height: 100%"]),y=c(["position: absolute","left: 0","top: 0"]),E=c(["position: absolute","width: 200%","height: 200%"]),x=document.createElement("div"),_=document.createElement("div"),C=document.createElement("div"),S=document.createElement("div"),N=document.createElement("div"),O=document.createElement("div");x.dir="ltr",x.style.cssText=b,x.className=l,_.className=l,_.style.cssText=g,C.style.cssText=v,S.style.cssText=y,N.style.cssText=k,O.style.cssText=E,C.appendChild(S),N.appendChild(O),_.appendChild(C),_.appendChild(N),x.appendChild(_),n.appendChild(x),u(C,"scroll",T),u(N,"scroll",M),a(s).onExpandScroll=T,a(s).onShrinkScroll=M}else m("Aborting because element has been uninstalled");function T(){var e=a(s);e&&e.onExpand?e.onExpand():m("Aborting expand scroll handler: element has been uninstalled")}function M(){var e=a(s);e&&e.onShrink?e.onShrink():m("Aborting shrink scroll handler: element has been uninstalled")}}function S(){function i(t,n,o){var a=function(e){return p(e).childNodes[0]}(t),r=E(n),i=x(o);a.style.setProperty("width",r+"px",e.important?"important":""),a.style.setProperty("height",i+"px",e.important?"important":"")}function l(o){var l=s.offsetWidth,u=s.offsetHeight,d=l!==a(s).lastWidth||u!==a(s).lastHeight;m("Storing current size",l,u),v(s,l,u),n.add(0,(function(){if(d)if(a(s))if(c()){if(e.debug){var n=s.offsetWidth,o=s.offsetHeight;n===l&&o===u||t.warn(r.get(s),"Scroll: Size changed before updating detector elements.")}i(s,l,u)}else m("Aborting because element container has not been initialized");else m("Aborting because element has been uninstalled")})),n.add(1,(function(){a(s)?c()?_(s,l,u):m("Aborting because element container has not been initialized"):m("Aborting because element has been uninstalled")})),d&&o&&n.add(2,(function(){a(s)?c()?o():m("Aborting because element container has not been initialized"):m("Aborting because element has been uninstalled")}))}function c(){return!!a(s).container}function u(){m("notifyListenersIfNeeded invoked");var e=a(s);return void 0===a(s).lastNotifiedWidth&&e.lastWidth===e.startSize.width&&e.lastHeight===e.startSize.height?m("Not notifying: Size is the same as the start size, and there has been no notification yet."):e.lastWidth===e.lastNotifiedWidth&&e.lastHeight===e.lastNotifiedHeight?m("Not notifying: Size already notified"):(m("Current size not notified, notifying..."),e.lastNotifiedWidth=e.lastWidth,e.lastNotifiedHeight=e.lastHeight,void o(a(s).listeners,(function(e){e(s)})))}function d(){m("Scroll detected."),f(s)?m("Scroll event fired while unrendered. Ignoring..."):l(u)}if(m("registerListenersAndPositionElements invoked."),a(s)){a(s).onRendered=function(){if(m("startanimation triggered."),f(s))m("Ignoring since element is still unrendered...");else{m("Element rendered.");var e=p(s),t=h(s);0!==e.scrollLeft&&0!==e.scrollTop&&0!==t.scrollLeft&&0!==t.scrollTop||(m("Scrollbars out of sync. Updating detector elements..."),l(u))}},a(s).onExpand=d,a(s).onShrink=d;var b=a(s).style;i(s,b.width,b.height)}else m("Aborting because element has been uninstalled")}function N(){if(m("finalizeDomMutation invoked."),a(s)){var e=a(s).style;v(s,e.width,e.height),_(s,e.width,e.height)}else m("Aborting because element has been uninstalled")}function O(){d(s)}function T(){var e;m("Installing..."),a(s).listeners=[],e=b(),a(s).startSize={width:e.width,height:e.height},m("Element start size",a(s).startSize),n.add(0,g),n.add(1,C),n.add(2,S),n.add(3,N),n.add(4,O)}d||(d=s,s=e,e=null),e=e||{},m("Making detectable..."),function(e){return!function(e){var t=e.getRootNode&&e.getRootNode().contains(e);return e===e.ownerDocument.body||e.ownerDocument.body.contains(e)||t}(e)||null===window.getComputedStyle(e)}(s)?(m("Element is detached"),w(),m("Waiting until element is attached..."),a(s).onRendered=function(){m("Element is now attached"),T()}):T()},addListener:function(e,t){if(!a(e).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");a(e).listeners.push(t)},uninstall:function(e){var t=a(e);t&&(t.onExpandScroll&&d(p(e),"scroll",t.onExpandScroll),t.onShrinkScroll&&d(h(e),"scroll",t.onShrinkScroll),t.onAnimationStart&&d(t.container,"animationstart",t.onAnimationStart),t.container&&e.removeChild(t.container))},initDocument:s}}},2558:(e,t,n)=>{"use strict";var o=n(4660).forEach,a=n(8182),r=n(3933),i=n(265),l=n(8860),s=n(569),c=n(4581),u=n(370),d=n(1766),p=n(6057),h=n(7055);function m(e){return Array.isArray(e)||void 0!==e.length}function f(e){if(Array.isArray(e))return e;var t=[];return o(e,(function(e){t.push(e)})),t}function b(e){return e&&1===e.nodeType}function g(e,t,n){var o=e[t];return null==o&&void 0!==n?n:o}e.exports=function(e){var t;if((e=e||{}).idHandler)t={get:function(t){return e.idHandler.get(t,!0)},set:e.idHandler.set};else{var n=i(),v=l({idGenerator:n,stateHandler:d});t=v}var k=e.reporter;k||(k=s(!1===k));var y=g(e,"batchProcessor",u({reporter:k})),E={};E.callOnAdd=!!g(e,"callOnAdd",!0),E.debug=!!g(e,"debug",!1);var x,_=r(t),w=a({stateHandler:d}),C=g(e,"strategy","object"),S=g(e,"important",!1),N={reporter:k,batchProcessor:y,stateHandler:d,idHandler:t,important:S};if("scroll"===C&&(c.isLegacyOpera()?(k.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),C="object"):c.isIE(9)&&(k.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),C="object")),"scroll"===C)x=h(N);else{if("object"!==C)throw new Error("Invalid strategy name: "+C);x=p(N)}var O={};return{listenTo:function(e,n,a){function r(e){var t=_.get(e);o(t,(function(t){t(e)}))}function i(e,t,n){_.add(t,n),e&&n(t)}if(a||(a=n,n=e,e={}),!n)throw new Error("At least one element required.");if(!a)throw new Error("Listener required.");if(b(n))n=[n];else{if(!m(n))return k.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=f(n)}var l=0,s=g(e,"callOnAdd",E.callOnAdd),c=g(e,"onReady",(function(){})),u=g(e,"debug",E.debug);o(n,(function(e){d.getState(e)||(d.initState(e),t.set(e));var p=t.get(e);if(u&&k.log("Attaching listener to element",p,e),!w.isDetectable(e))return u&&k.log(p,"Not detectable."),w.isBusy(e)?(u&&k.log(p,"System busy making it detectable"),i(s,e,a),O[p]=O[p]||[],void O[p].push((function(){++l===n.length&&c()}))):(u&&k.log(p,"Making detectable..."),w.markBusy(e,!0),x.makeDetectable({debug:u,important:S},e,(function(e){if(u&&k.log(p,"onElementDetectable"),d.getState(e)){w.markAsDetectable(e),w.markBusy(e,!1),x.addListener(e,r),i(s,e,a);var t=d.getState(e);if(t&&t.startSize){var h=e.offsetWidth,m=e.offsetHeight;t.startSize.width===h&&t.startSize.height===m||r(e)}O[p]&&o(O[p],(function(e){e()}))}else u&&k.log(p,"Element uninstalled before being detectable.");delete O[p],++l===n.length&&c()})));u&&k.log(p,"Already detecable, adding listener."),i(s,e,a),l++})),l===n.length&&c()},removeListener:_.removeListener,removeAllListeners:_.removeAllListeners,uninstall:function(e){if(!e)return k.error("At least one element is required.");if(b(e))e=[e];else{if(!m(e))return k.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=f(e)}o(e,(function(e){_.removeAllListeners(e),x.uninstall(e),d.cleanState(e)}))},initDocument:function(e){x.initDocument&&x.initDocument(e)}}}},8182:e=>{"use strict";e.exports=function(e){var t=e.stateHandler.getState;return{isDetectable:function(e){var n=t(e);return n&&!!n.isDetectable},markAsDetectable:function(e){t(e).isDetectable=!0},isBusy:function(e){return!!t(e).busy},markBusy:function(e,n){t(e).busy=!!n}}}},265:e=>{"use strict";e.exports=function(){var e=1;return{generate:function(){return e++}}}},8860:e=>{"use strict";e.exports=function(e){var t=e.idGenerator,n=e.stateHandler.getState;return{get:function(e){var t=n(e);return t&&void 0!==t.id?t.id:null},set:function(e){var o=n(e);if(!o)throw new Error("setId required the element to have a resize detection state.");var a=t.generate();return o.id=a,a}}}},3933:e=>{"use strict";e.exports=function(e){var t={};function n(n){var o=e.get(n);return void 0===o?[]:t[o]||[]}return{get:n,add:function(n,o){var a=e.get(n);t[a]||(t[a]=[]),t[a].push(o)},removeListener:function(e,t){for(var o=n(e),a=0,r=o.length;a<r;++a)if(o[a]===t){o.splice(a,1);break}},removeAllListeners:function(e){var t=n(e);t&&(t.length=0)}}}},569:e=>{"use strict";e.exports=function(e){function t(){}var n={log:t,warn:t,error:t};if(!e&&window.console){var o=function(e,t){e[t]=function(){var e=console[t];if(e.apply)e.apply(console,arguments);else for(var n=0;n<arguments.length;n++)e(arguments[n])}};o(n,"log"),o(n,"warn"),o(n,"error")}return n}},1766:e=>{"use strict";var t="_erd";function n(e){return e[t]}e.exports={initState:function(e){return e[t]={},n(e)},getState:n,cleanState:function(e){delete e[t]}}},311:e=>{"use strict";e.exports=function(e,t,n,o,a,r,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,o,a,r,i,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},5580:(e,t,n)=>{var o=n(6110)(n(9325),"DataView");e.exports=o},1549:(e,t,n)=>{var o=n(2032),a=n(3862),r=n(6721),i=n(2749),l=n(5749);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=o,s.prototype.delete=a,s.prototype.get=r,s.prototype.has=i,s.prototype.set=l,e.exports=s},79:(e,t,n)=>{var o=n(3702),a=n(80),r=n(4739),i=n(8655),l=n(1175);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=o,s.prototype.delete=a,s.prototype.get=r,s.prototype.has=i,s.prototype.set=l,e.exports=s},8223:(e,t,n)=>{var o=n(6110)(n(9325),"Map");e.exports=o},3661:(e,t,n)=>{var o=n(3040),a=n(7670),r=n(289),i=n(4509),l=n(2949);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=o,s.prototype.delete=a,s.prototype.get=r,s.prototype.has=i,s.prototype.set=l,e.exports=s},2804:(e,t,n)=>{var o=n(6110)(n(9325),"Promise");e.exports=o},6545:(e,t,n)=>{var o=n(6110)(n(9325),"Set");e.exports=o},8859:(e,t,n)=>{var o=n(3661),a=n(1380),r=n(1459);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new o;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=a,i.prototype.has=r,e.exports=i},7217:(e,t,n)=>{var o=n(79),a=n(1420),r=n(938),i=n(3605),l=n(9817),s=n(945);function c(e){var t=this.__data__=new o(e);this.size=t.size}c.prototype.clear=a,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=l,c.prototype.set=s,e.exports=c},1873:(e,t,n)=>{var o=n(9325).Symbol;e.exports=o},7828:(e,t,n)=>{var o=n(9325).Uint8Array;e.exports=o},8303:(e,t,n)=>{var o=n(6110)(n(9325),"WeakMap");e.exports=o},1033:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},3729:e=>{e.exports=function(e,t){for(var n=-1,o=null==e?0:e.length;++n<o&&!1!==t(e[n],n,e););return e}},9770:e=>{e.exports=function(e,t){for(var n=-1,o=null==e?0:e.length,a=0,r=[];++n<o;){var i=e[n];t(i,n,e)&&(r[a++]=i)}return r}},695:(e,t,n)=>{var o=n(8096),a=n(2428),r=n(6449),i=n(3656),l=n(361),s=n(7167),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=r(e),u=!n&&a(e),d=!n&&!u&&i(e),p=!n&&!u&&!d&&s(e),h=n||u||d||p,m=h?o(e.length,String):[],f=m.length;for(var b in e)!t&&!c.call(e,b)||h&&("length"==b||d&&("offset"==b||"parent"==b)||p&&("buffer"==b||"byteLength"==b||"byteOffset"==b)||l(b,f))||m.push(b);return m}},4932:e=>{e.exports=function(e,t){for(var n=-1,o=null==e?0:e.length,a=Array(o);++n<o;)a[n]=t(e[n],n,e);return a}},4528:e=>{e.exports=function(e,t){for(var n=-1,o=t.length,a=e.length;++n<o;)e[a+n]=t[n];return e}},4248:e=>{e.exports=function(e,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}},7805:(e,t,n)=>{var o=n(3360),a=n(5288);e.exports=function(e,t,n){(void 0!==n&&!a(e[t],n)||void 0===n&&!(t in e))&&o(e,t,n)}},6547:(e,t,n)=>{var o=n(3360),a=n(5288),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var i=e[t];r.call(e,t)&&a(i,n)&&(void 0!==n||t in e)||o(e,t,n)}},6025:(e,t,n)=>{var o=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}},4733:(e,t,n)=>{var o=n(1791),a=n(5950);e.exports=function(e,t){return e&&o(t,a(t),e)}},3838:(e,t,n)=>{var o=n(1791),a=n(7241);e.exports=function(e,t){return e&&o(t,a(t),e)}},3360:(e,t,n)=>{var o=n(3243);e.exports=function(e,t,n){"__proto__"==t&&o?o(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},9999:(e,t,n)=>{var o=n(7217),a=n(3729),r=n(6547),i=n(4733),l=n(3838),s=n(3290),c=n(3007),u=n(2271),d=n(8948),p=n(2),h=n(3349),m=n(5861),f=n(6189),b=n(7199),g=n(5529),v=n(6449),k=n(3656),y=n(7730),E=n(3805),x=n(8440),_=n(5950),w=n(7241),C="[object Arguments]",S="[object Function]",N="[object Object]",O={};O[C]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O[N]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O[S]=O["[object WeakMap]"]=!1,e.exports=function e(t,n,T,M,A,D){var R,I=1&n,P=2&n,F=4&n;if(T&&(R=A?T(t,M,A,D):T(t)),void 0!==R)return R;if(!E(t))return t;var L=v(t);if(L){if(R=f(t),!I)return c(t,R)}else{var B=m(t),V=B==S||"[object GeneratorFunction]"==B;if(k(t))return s(t,I);if(B==N||B==C||V&&!A){if(R=P||V?{}:g(t),!I)return P?d(t,l(R,t)):u(t,i(R,t))}else{if(!O[B])return A?t:{};R=b(t,B,I)}}D||(D=new o);var z=D.get(t);if(z)return z;D.set(t,R),x(t)?t.forEach((function(o){R.add(e(o,n,T,o,t,D))})):y(t)&&t.forEach((function(o,a){R.set(a,e(o,n,T,a,t,D))}));var j=L?void 0:(F?P?h:p:P?w:_)(t);return a(j||t,(function(o,a){j&&(o=t[a=o]),r(R,a,e(o,n,T,a,t,D))})),R}},9344:(e,t,n)=>{var o=n(3805),a=Object.create,r=function(){function e(){}return function(t){if(!o(t))return{};if(a)return a(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=r},909:(e,t,n)=>{var o=n(641),a=n(8329)(o);e.exports=a},6649:(e,t,n)=>{var o=n(3221)();e.exports=o},641:(e,t,n)=>{var o=n(6649),a=n(5950);e.exports=function(e,t){return e&&o(e,t,a)}},7422:(e,t,n)=>{var o=n(1769),a=n(7797);e.exports=function(e,t){for(var n=0,r=(t=o(t,e)).length;null!=e&&n<r;)e=e[a(t[n++])];return n&&n==r?e:void 0}},2199:(e,t,n)=>{var o=n(4528),a=n(6449);e.exports=function(e,t,n){var r=t(e);return a(e)?r:o(r,n(e))}},2552:(e,t,n)=>{var o=n(1873),a=n(659),r=n(9350),i=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?a(e):r(e)}},8077:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},7534:(e,t,n)=>{var o=n(2552),a=n(346);e.exports=function(e){return a(e)&&"[object Arguments]"==o(e)}},270:(e,t,n)=>{var o=n(7068),a=n(346);e.exports=function e(t,n,r,i,l){return t===n||(null==t||null==n||!a(t)&&!a(n)?t!=t&&n!=n:o(t,n,r,i,e,l))}},7068:(e,t,n)=>{var o=n(7217),a=n(5911),r=n(1986),i=n(689),l=n(5861),s=n(6449),c=n(3656),u=n(7167),d="[object Arguments]",p="[object Array]",h="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,f,b,g){var v=s(e),k=s(t),y=v?p:l(e),E=k?p:l(t),x=(y=y==d?h:y)==h,_=(E=E==d?h:E)==h,w=y==E;if(w&&c(e)){if(!c(t))return!1;v=!0,x=!1}if(w&&!x)return g||(g=new o),v||u(e)?a(e,t,n,f,b,g):r(e,t,y,n,f,b,g);if(!(1&n)){var C=x&&m.call(e,"__wrapped__"),S=_&&m.call(t,"__wrapped__");if(C||S){var N=C?e.value():e,O=S?t.value():t;return g||(g=new o),b(N,O,n,f,g)}}return!!w&&(g||(g=new o),i(e,t,n,f,b,g))}},9172:(e,t,n)=>{var o=n(5861),a=n(346);e.exports=function(e){return a(e)&&"[object Map]"==o(e)}},1799:(e,t,n)=>{var o=n(7217),a=n(270);e.exports=function(e,t,n,r){var i=n.length,l=i,s=!r;if(null==e)return!l;for(e=Object(e);i--;){var c=n[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<l;){var u=(c=n[i])[0],d=e[u],p=c[1];if(s&&c[2]){if(void 0===d&&!(u in e))return!1}else{var h=new o;if(r)var m=r(d,p,u,e,t,h);if(!(void 0===m?a(p,d,3,r,h):m))return!1}}return!0}},5083:(e,t,n)=>{var o=n(1882),a=n(7296),r=n(3805),i=n(7473),l=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,u=s.toString,d=c.hasOwnProperty,p=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!r(e)||a(e))&&(o(e)?p:l).test(i(e))}},6038:(e,t,n)=>{var o=n(5861),a=n(346);e.exports=function(e){return a(e)&&"[object Set]"==o(e)}},4901:(e,t,n)=>{var o=n(2552),a=n(294),r=n(346),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return r(e)&&a(e.length)&&!!i[o(e)]}},5389:(e,t,n)=>{var o=n(3663),a=n(7978),r=n(3488),i=n(6449),l=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?r:"object"==typeof e?i(e)?a(e[0],e[1]):o(e):l(e)}},8984:(e,t,n)=>{var o=n(5527),a=n(3650),r=Object.prototype.hasOwnProperty;e.exports=function(e){if(!o(e))return a(e);var t=[];for(var n in Object(e))r.call(e,n)&&"constructor"!=n&&t.push(n);return t}},2903:(e,t,n)=>{var o=n(3805),a=n(5527),r=n(181),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!o(e))return r(e);var t=a(e),n=[];for(var l in e)("constructor"!=l||!t&&i.call(e,l))&&n.push(l);return n}},5128:(e,t,n)=>{var o=n(909),a=n(4894);e.exports=function(e,t){var n=-1,r=a(e)?Array(e.length):[];return o(e,(function(e,o,a){r[++n]=t(e,o,a)})),r}},3663:(e,t,n)=>{var o=n(1799),a=n(776),r=n(7197);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?r(t[0][0],t[0][1]):function(n){return n===e||o(n,e,t)}}},7978:(e,t,n)=>{var o=n(270),a=n(8156),r=n(631),i=n(8586),l=n(756),s=n(7197),c=n(7797);e.exports=function(e,t){return i(e)&&l(t)?s(c(e),t):function(n){var i=a(n,e);return void 0===i&&i===t?r(n,e):o(t,i,3)}}},5250:(e,t,n)=>{var o=n(7217),a=n(7805),r=n(6649),i=n(2824),l=n(3805),s=n(7241),c=n(4974);e.exports=function e(t,n,u,d,p){t!==n&&r(n,(function(r,s){if(p||(p=new o),l(r))i(t,n,s,u,e,d,p);else{var h=d?d(c(t,s),r,s+"",t,n,p):void 0;void 0===h&&(h=r),a(t,s,h)}}),s)}},2824:(e,t,n)=>{var o=n(7805),a=n(3290),r=n(1961),i=n(3007),l=n(5529),s=n(2428),c=n(6449),u=n(3693),d=n(3656),p=n(1882),h=n(3805),m=n(1331),f=n(7167),b=n(4974),g=n(9884);e.exports=function(e,t,n,v,k,y,E){var x=b(e,n),_=b(t,n),w=E.get(_);if(w)o(e,n,w);else{var C=y?y(x,_,n+"",e,t,E):void 0,S=void 0===C;if(S){var N=c(_),O=!N&&d(_),T=!N&&!O&&f(_);C=_,N||O||T?c(x)?C=x:u(x)?C=i(x):O?(S=!1,C=a(_,!0)):T?(S=!1,C=r(_,!0)):C=[]:m(_)||s(_)?(C=x,s(x)?C=g(x):h(x)&&!p(x)||(C=l(_))):S=!1}S&&(E.set(_,C),k(C,_,v,y,E),E.delete(_)),o(e,n,C)}}},7237:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255:(e,t,n)=>{var o=n(7422);e.exports=function(e){return function(t){return o(t,e)}}},9302:(e,t,n)=>{var o=n(3488),a=n(6757),r=n(2865);e.exports=function(e,t){return r(a(e,t,o),e+"")}},9570:(e,t,n)=>{var o=n(7334),a=n(3243),r=n(3488),i=a?function(e,t){return a(e,"toString",{configurable:!0,enumerable:!1,value:o(t),writable:!0})}:r;e.exports=i},8096:e=>{e.exports=function(e,t){for(var n=-1,o=Array(e);++n<e;)o[n]=t(n);return o}},7556:(e,t,n)=>{var o=n(1873),a=n(4932),r=n(6449),i=n(4394),l=o?o.prototype:void 0,s=l?l.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(r(t))return a(t,e)+"";if(i(t))return s?s.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},4128:(e,t,n)=>{var o=n(1800),a=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(a,""):e}},7301:e=>{e.exports=function(e){return function(t){return e(t)}}},9219:e=>{e.exports=function(e,t){return e.has(t)}},4066:(e,t,n)=>{var o=n(3488);e.exports=function(e){return"function"==typeof e?e:o}},1769:(e,t,n)=>{var o=n(6449),a=n(8586),r=n(1802),i=n(3222);e.exports=function(e,t){return o(e)?e:a(e,t)?[e]:r(i(e))}},9653:(e,t,n)=>{var o=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new o(t).set(new o(e)),t}},3290:(e,t,n)=>{e=n.nmd(e);var o=n(9325),a=t&&!t.nodeType&&t,r=a&&e&&!e.nodeType&&e,i=r&&r.exports===a?o.Buffer:void 0,l=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,o=l?l(n):new e.constructor(n);return e.copy(o),o}},6169:(e,t,n)=>{var o=n(9653);e.exports=function(e,t){var n=t?o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},3201:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},3736:(e,t,n)=>{var o=n(1873),a=o?o.prototype:void 0,r=a?a.valueOf:void 0;e.exports=function(e){return r?Object(r.call(e)):{}}},1961:(e,t,n)=>{var o=n(9653);e.exports=function(e,t){var n=t?o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},3007:e=>{e.exports=function(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}},1791:(e,t,n)=>{var o=n(6547),a=n(3360);e.exports=function(e,t,n,r){var i=!n;n||(n={});for(var l=-1,s=t.length;++l<s;){var c=t[l],u=r?r(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),i?a(n,c,u):o(n,c,u)}return n}},2271:(e,t,n)=>{var o=n(1791),a=n(4664);e.exports=function(e,t){return o(e,a(e),t)}},8948:(e,t,n)=>{var o=n(1791),a=n(6375);e.exports=function(e,t){return o(e,a(e),t)}},5481:(e,t,n)=>{var o=n(9325)["__core-js_shared__"];e.exports=o},999:(e,t,n)=>{var o=n(9302),a=n(6800);e.exports=function(e){return o((function(t,n){var o=-1,r=n.length,i=r>1?n[r-1]:void 0,l=r>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(r--,i):void 0,l&&a(n[0],n[1],l)&&(i=r<3?void 0:i,r=1),t=Object(t);++o<r;){var s=n[o];s&&e(t,s,o,i)}return t}))}},8329:(e,t,n)=>{var o=n(4894);e.exports=function(e,t){return function(n,a){if(null==n)return n;if(!o(n))return e(n,a);for(var r=n.length,i=t?r:-1,l=Object(n);(t?i--:++i<r)&&!1!==a(l[i],i,l););return n}}},3221:e=>{e.exports=function(e){return function(t,n,o){for(var a=-1,r=Object(t),i=o(t),l=i.length;l--;){var s=i[e?l:++a];if(!1===n(r[s],s,r))break}return t}}},3243:(e,t,n)=>{var o=n(6110),a=function(){try{var e=o(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=a},5911:(e,t,n)=>{var o=n(8859),a=n(4248),r=n(9219);e.exports=function(e,t,n,i,l,s){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var p=s.get(e),h=s.get(t);if(p&&h)return p==t&&h==e;var m=-1,f=!0,b=2&n?new o:void 0;for(s.set(e,t),s.set(t,e);++m<u;){var g=e[m],v=t[m];if(i)var k=c?i(v,g,m,t,e,s):i(g,v,m,e,t,s);if(void 0!==k){if(k)continue;f=!1;break}if(b){if(!a(t,(function(e,t){if(!r(b,t)&&(g===e||l(g,e,n,i,s)))return b.push(t)}))){f=!1;break}}else if(g!==v&&!l(g,v,n,i,s)){f=!1;break}}return s.delete(e),s.delete(t),f}},1986:(e,t,n)=>{var o=n(1873),a=n(7828),r=n(5288),i=n(5911),l=n(317),s=n(4247),c=o?o.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,o,c,d,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=l;case"[object Set]":var m=1&o;if(h||(h=s),e.size!=t.size&&!m)return!1;var f=p.get(e);if(f)return f==t;o|=2,p.set(e,t);var b=i(h(e),h(t),o,c,d,p);return p.delete(e),b;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},689:(e,t,n)=>{var o=n(2),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,r,i,l){var s=1&n,c=o(e),u=c.length;if(u!=o(t).length&&!s)return!1;for(var d=u;d--;){var p=c[d];if(!(s?p in t:a.call(t,p)))return!1}var h=l.get(e),m=l.get(t);if(h&&m)return h==t&&m==e;var f=!0;l.set(e,t),l.set(t,e);for(var b=s;++d<u;){var g=e[p=c[d]],v=t[p];if(r)var k=s?r(v,g,p,t,e,l):r(g,v,p,e,t,l);if(!(void 0===k?g===v||i(g,v,n,r,l):k)){f=!1;break}b||(b="constructor"==p)}if(f&&!b){var y=e.constructor,E=t.constructor;y==E||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof E&&E instanceof E||(f=!1)}return l.delete(e),l.delete(t),f}},4840:(e,t,n)=>{var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=o},2:(e,t,n)=>{var o=n(2199),a=n(4664),r=n(5950);e.exports=function(e){return o(e,r,a)}},3349:(e,t,n)=>{var o=n(2199),a=n(6375),r=n(7241);e.exports=function(e){return o(e,r,a)}},2651:(e,t,n)=>{var o=n(4218);e.exports=function(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}},776:(e,t,n)=>{var o=n(756),a=n(5950);e.exports=function(e){for(var t=a(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,o(i)]}return t}},6110:(e,t,n)=>{var o=n(5083),a=n(392);e.exports=function(e,t){var n=a(e,t);return o(n)?n:void 0}},8879:(e,t,n)=>{var o=n(4335)(Object.getPrototypeOf,Object);e.exports=o},659:(e,t,n)=>{var o=n(1873),a=Object.prototype,r=a.hasOwnProperty,i=a.toString,l=o?o.toStringTag:void 0;e.exports=function(e){var t=r.call(e,l),n=e[l];try{e[l]=void 0;var o=!0}catch(e){}var a=i.call(e);return o&&(t?e[l]=n:delete e[l]),a}},4664:(e,t,n)=>{var o=n(9770),a=n(3345),r=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,l=i?function(e){return null==e?[]:(e=Object(e),o(i(e),(function(t){return r.call(e,t)})))}:a;e.exports=l},6375:(e,t,n)=>{var o=n(4528),a=n(8879),r=n(4664),i=n(3345),l=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)o(t,r(e)),e=a(e);return t}:i;e.exports=l},5861:(e,t,n)=>{var o=n(5580),a=n(8223),r=n(2804),i=n(6545),l=n(8303),s=n(2552),c=n(7473),u="[object Map]",d="[object Promise]",p="[object Set]",h="[object WeakMap]",m="[object DataView]",f=c(o),b=c(a),g=c(r),v=c(i),k=c(l),y=s;(o&&y(new o(new ArrayBuffer(1)))!=m||a&&y(new a)!=u||r&&y(r.resolve())!=d||i&&y(new i)!=p||l&&y(new l)!=h)&&(y=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,o=n?c(n):"";if(o)switch(o){case f:return m;case b:return u;case g:return d;case v:return p;case k:return h}return t}),e.exports=y},392:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},9326:(e,t,n)=>{var o=n(1769),a=n(2428),r=n(6449),i=n(361),l=n(294),s=n(7797);e.exports=function(e,t,n){for(var c=-1,u=(t=o(t,e)).length,d=!1;++c<u;){var p=s(t[c]);if(!(d=null!=e&&n(e,p)))break;e=e[p]}return d||++c!=u?d:!!(u=null==e?0:e.length)&&l(u)&&i(p,u)&&(r(e)||a(e))}},2032:(e,t,n)=>{var o=n(1042);e.exports=function(){this.__data__=o?o(null):{},this.size=0}},3862:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721:(e,t,n)=>{var o=n(1042),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(o){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0}},2749:(e,t,n)=>{var o=n(1042),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return o?void 0!==t[e]:a.call(t,e)}},5749:(e,t,n)=>{var o=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=o&&void 0===t?"__lodash_hash_undefined__":t,this}},6189:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,o=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(o.index=e.index,o.input=e.input),o}},7199:(e,t,n)=>{var o=n(9653),a=n(6169),r=n(3201),i=n(3736),l=n(1961);e.exports=function(e,t,n){var s=e.constructor;switch(t){case"[object ArrayBuffer]":return o(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return a(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return l(e,n);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return r(e);case"[object Symbol]":return i(e)}}},5529:(e,t,n)=>{var o=n(9344),a=n(8879),r=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||r(e)?{}:o(a(e))}},361:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var o=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==o||"symbol"!=o&&t.test(e))&&e>-1&&e%1==0&&e<n}},6800:(e,t,n)=>{var o=n(5288),a=n(4894),r=n(361),i=n(3805);e.exports=function(e,t,n){if(!i(n))return!1;var l=typeof t;return!!("number"==l?a(n)&&r(t,n.length):"string"==l&&t in n)&&o(n[t],e)}},8586:(e,t,n)=>{var o=n(6449),a=n(4394),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(o(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||i.test(e)||!r.test(e)||null!=t&&e in Object(t)}},4218:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296:(e,t,n)=>{var o,a=n(5481),r=(o=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";e.exports=function(e){return!!r&&r in e}},5527:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},756:(e,t,n)=>{var o=n(3805);e.exports=function(e){return e==e&&!o(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},80:(e,t,n)=>{var o=n(6025),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=o(t,e);return!(n<0||(n==t.length-1?t.pop():a.call(t,n,1),--this.size,0))}},4739:(e,t,n)=>{var o=n(6025);e.exports=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]}},8655:(e,t,n)=>{var o=n(6025);e.exports=function(e){return o(this.__data__,e)>-1}},1175:(e,t,n)=>{var o=n(6025);e.exports=function(e,t){var n=this.__data__,a=o(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}},3040:(e,t,n)=>{var o=n(1549),a=n(79),r=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new o,map:new(r||a),string:new o}}},7670:(e,t,n)=>{var o=n(2651);e.exports=function(e){var t=o(this,e).delete(e);return this.size-=t?1:0,t}},289:(e,t,n)=>{var o=n(2651);e.exports=function(e){return o(this,e).get(e)}},4509:(e,t,n)=>{var o=n(2651);e.exports=function(e){return o(this,e).has(e)}},2949:(e,t,n)=>{var o=n(2651);e.exports=function(e,t){var n=o(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}},317:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,o){n[++t]=[o,e]})),n}},7197:e=>{e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},2224:(e,t,n)=>{var o=n(104);e.exports=function(e){var t=o(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},1042:(e,t,n)=>{var o=n(6110)(Object,"create");e.exports=o},3650:(e,t,n)=>{var o=n(4335)(Object.keys,Object);e.exports=o},181:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},6009:(e,t,n)=>{e=n.nmd(e);var o=n(4840),a=t&&!t.nodeType&&t,r=a&&e&&!e.nodeType&&e,i=r&&r.exports===a&&o.process,l=function(){try{return r&&r.require&&r.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=l},9350:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},6757:(e,t,n)=>{var o=n(1033),a=Math.max;e.exports=function(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,l=a(r.length-t,0),s=Array(l);++i<l;)s[i]=r[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=r[i];return c[t]=n(s),o(e,this,c)}}},9325:(e,t,n)=>{var o=n(4840),a="object"==typeof self&&self&&self.Object===Object&&self,r=o||a||Function("return this")();e.exports=r},4974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},1380:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459:e=>{e.exports=function(e){return this.__data__.has(e)}},4247:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},2865:(e,t,n)=>{var o=n(9570),a=n(1811)(o);e.exports=a},1811:e=>{var t=Date.now;e.exports=function(e){var n=0,o=0;return function(){var a=t(),r=16-(a-o);if(o=a,r>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},1420:(e,t,n)=>{var o=n(79);e.exports=function(){this.__data__=new o,this.size=0}},938:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},3605:e=>{e.exports=function(e){return this.__data__.get(e)}},9817:e=>{e.exports=function(e){return this.__data__.has(e)}},945:(e,t,n)=>{var o=n(79),a=n(8223),r=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof o){var i=n.__data__;if(!a||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new r(i)}return n.set(e,t),this.size=n.size,this}},1802:(e,t,n)=>{var o=n(2224),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,i=o((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,n,o,a){t.push(o?a.replace(r,"$1"):n||e)})),t}));e.exports=i},7797:(e,t,n)=>{var o=n(4394);e.exports=function(e){if("string"==typeof e||o(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7473:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},1800:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},8055:(e,t,n)=>{var o=n(9999);e.exports=function(e){return o(e,5)}},7334:e=>{e.exports=function(e){return function(){return e}}},8221:(e,t,n)=>{var o=n(3805),a=n(124),r=n(9374),i=Math.max,l=Math.min;e.exports=function(e,t,n){var s,c,u,d,p,h,m=0,f=!1,b=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=s,o=c;return s=c=void 0,m=t,d=e.apply(o,n)}function k(e){var n=e-h;return void 0===h||n>=t||n<0||b&&e-m>=u}function y(){var e=a();if(k(e))return E(e);p=setTimeout(y,function(e){var n=t-(e-h);return b?l(n,u-(e-m)):n}(e))}function E(e){return p=void 0,g&&s?v(e):(s=c=void 0,d)}function x(){var e=a(),n=k(e);if(s=arguments,c=this,h=e,n){if(void 0===p)return function(e){return m=e,p=setTimeout(y,t),f?v(e):d}(h);if(b)return clearTimeout(p),p=setTimeout(y,t),v(h)}return void 0===p&&(p=setTimeout(y,t)),d}return t=r(t)||0,o(n)&&(f=!!n.leading,u=(b="maxWait"in n)?i(r(n.maxWait)||0,t):u,g="trailing"in n?!!n.trailing:g),x.cancel=function(){void 0!==p&&clearTimeout(p),m=0,s=h=c=p=void 0},x.flush=function(){return void 0===p?d:E(a())},x}},6135:(e,t,n)=>{e.exports=n(9754)},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},9754:(e,t,n)=>{var o=n(3729),a=n(909),r=n(4066),i=n(6449);e.exports=function(e,t){return(i(e)?o:a)(e,r(t))}},3215:(e,t,n)=>{var o=n(641),a=n(4066);e.exports=function(e,t){return e&&o(e,a(t))}},8156:(e,t,n)=>{var o=n(7422);e.exports=function(e,t,n){var a=null==e?void 0:o(e,t);return void 0===a?n:a}},631:(e,t,n)=>{var o=n(8077),a=n(9326);e.exports=function(e,t){return null!=e&&a(e,t,o)}},3488:e=>{e.exports=function(e){return e}},2428:(e,t,n)=>{var o=n(7534),a=n(346),r=Object.prototype,i=r.hasOwnProperty,l=r.propertyIsEnumerable,s=o(function(){return arguments}())?o:function(e){return a(e)&&i.call(e,"callee")&&!l.call(e,"callee")};e.exports=s},6449:e=>{var t=Array.isArray;e.exports=t},4894:(e,t,n)=>{var o=n(1882),a=n(294);e.exports=function(e){return null!=e&&a(e.length)&&!o(e)}},3693:(e,t,n)=>{var o=n(4894),a=n(346);e.exports=function(e){return a(e)&&o(e)}},3656:(e,t,n)=>{e=n.nmd(e);var o=n(9325),a=n(9935),r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,l=i&&i.exports===r?o.Buffer:void 0,s=(l?l.isBuffer:void 0)||a;e.exports=s},1882:(e,t,n)=>{var o=n(2552),a=n(3805);e.exports=function(e){if(!a(e))return!1;var t=o(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7730:(e,t,n)=>{var o=n(9172),a=n(7301),r=n(6009),i=r&&r.isMap,l=i?a(i):o;e.exports=l},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},1331:(e,t,n)=>{var o=n(2552),a=n(8879),r=n(346),i=Function.prototype,l=Object.prototype,s=i.toString,c=l.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!r(e)||"[object Object]"!=o(e))return!1;var t=a(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},8440:(e,t,n)=>{var o=n(6038),a=n(7301),r=n(6009),i=r&&r.isSet,l=i?a(i):o;e.exports=l},5015:(e,t,n)=>{var o=n(2552),a=n(6449),r=n(346);e.exports=function(e){return"string"==typeof e||!a(e)&&r(e)&&"[object String]"==o(e)}},4394:(e,t,n)=>{var o=n(2552),a=n(346);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==o(e)}},7167:(e,t,n)=>{var o=n(4901),a=n(7301),r=n(6009),i=r&&r.isTypedArray,l=i?a(i):o;e.exports=l},2216:e=>{e.exports=function(e){return void 0===e}},5950:(e,t,n)=>{var o=n(695),a=n(8984),r=n(4894);e.exports=function(e){return r(e)?o(e):a(e)}},7241:(e,t,n)=>{var o=n(695),a=n(2903),r=n(4894);e.exports=function(e){return r(e)?o(e,!0):a(e)}},5378:(e,t,n)=>{var o=n(4932),a=n(5389),r=n(5128),i=n(6449);e.exports=function(e,t){return(i(e)?o:r)(e,a(t,3))}},104:(e,t,n)=>{var o=n(3661);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var o=arguments,a=t?t.apply(this,o):o[0],r=n.cache;if(r.has(a))return r.get(a);var i=e.apply(this,o);return n.cache=r.set(a,i)||r,i};return n.cache=new(a.Cache||o),n}a.Cache=o,e.exports=a},5364:(e,t,n)=>{var o=n(5250),a=n(999)((function(e,t,n){o(e,t,n)}));e.exports=a},124:(e,t,n)=>{var o=n(9325);e.exports=function(){return o.Date.now()}},583:(e,t,n)=>{var o=n(7237),a=n(7255),r=n(8586),i=n(7797);e.exports=function(e){return r(e)?o(i(e)):a(e)}},3345:e=>{e.exports=function(){return[]}},9935:e=>{e.exports=function(){return!1}},7350:(e,t,n)=>{var o=n(8221),a=n(3805);e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return a(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),o(e,t,{leading:r,maxWait:t,trailing:i})}},9374:(e,t,n)=>{var o=n(4128),a=n(3805),r=n(4394),i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var n=l.test(e);return n||s.test(e)?c(e.slice(2),n?2:8):i.test(e)?NaN:+e}},9884:(e,t,n)=>{var o=n(1791),a=n(7241);e.exports=function(e){return o(e,a(e))}},3222:(e,t,n)=>{var o=n(7556);e.exports=function(e){return null==e?"":o(e)}},3491:function(e){(function(){var t,n,o,a,r,i;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-r)/1e6},n=process.hrtime,a=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),i=1e9*process.uptime(),r=a-i):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)},2694:(e,t,n)=>{"use strict";var o=n(6925);function a(){}function r(){}r.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,r,i){if(i!==o){var l=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 l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint: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:r,resetWarningCache:a};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3146:(e,t,n)=>{for(var o=n(3491),a="undefined"==typeof window?n.g:window,r=["moz","webkit"],i="AnimationFrame",l=a["request"+i],s=a["cancel"+i]||a["cancelRequest"+i],c=0;!l&&c<r.length;c++)l=a[r[c]+"Request"+i],s=a[r[c]+"Cancel"+i]||a[r[c]+"CancelRequest"+i];if(!l||!s){var u=0,d=0,p=[],h=1e3/60;l=function(e){if(0===p.length){var t=o(),n=Math.max(0,h-(t-u));u=n+t,setTimeout((function(){var e=p.slice(0);p.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(u)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return p.push({handle:++d,callback:e,cancelled:!1}),d},s=function(e){for(var t=0;t<p.length;t++)p[t].handle===e&&(p[t].cancelled=!0)}}e.exports=function(e){return l.call(a,e)},e.exports.cancel=function(){s.apply(a,arguments)},e.exports.polyfill=function(e){e||(e=a),e.requestAnimationFrame=l,e.cancelAnimationFrame=s}},9537:(e,t,n)=>{"use strict";t.o$=void 0;var o=r(n(1609)),a=r(n(8527));function r(e){return e&&e.__esModule?e:{default:e}}t.o$=function(){var e=(0,a.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return o.default.createElement("div",{style:e.picker})}},6617:(e,t,n)=>{"use strict";t.uy=void 0;var o=r(n(1609)),a=r(n(8527));function r(e){return e&&e.__esModule?e:{default:e}}t.uy=function(){var e=(0,a.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return o.default.createElement("div",{style:e.picker})}},3477:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Alpha=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(1609),i=u(r),l=u(n(8527)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(6412)),c=u(n(5413));function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=t.Alpha=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,r=Array(a),i=0;i<a;i++)r[i]=arguments[i];return n=o=d(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r))),o.handleChange=function(e){var t=s.calculateChange(e,o.props.hsl,o.props.direction,o.props.a,o.container);t&&"function"==typeof o.props.onChange&&o.props.onChange(t,e)},o.handleMouseDown=function(e){o.handleChange(e),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},o.unbindEventListeners=function(){window.removeEventListener("mousemove",o.handleChange),window.removeEventListener("mouseup",o.handleMouseUp)},d(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=(0,l.default)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:o({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return i.default.createElement("div",{style:n.alpha},i.default.createElement("div",{style:n.checkboard},i.default.createElement(c.default,{renderers:this.props.renderers})),i.default.createElement("div",{style:n.gradient}),i.default.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},i.default.createElement("div",{style:n.pointer},this.props.pointer?i.default.createElement(this.props.pointer,this.props):i.default.createElement("div",{style:n.slider}))))}}]),t}(r.PureComponent||r.Component);t.default=p},5413:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Checkboard=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=n(1609),r=s(a),i=s(n(8527)),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(7218));function s(e){return e&&e.__esModule?e:{default:e}}var c=t.Checkboard=function(e){var t=e.white,n=e.grey,s=e.size,c=e.renderers,u=e.borderRadius,d=e.boxShadow,p=e.children,h=(0,i.default)({default:{grid:{borderRadius:u,boxShadow:d,absolute:"0px 0px 0px 0px",background:"url("+l.get(t,n,s,c.canvas)+") center left"}}});return(0,a.isValidElement)(p)?r.default.cloneElement(p,o({},p.props,{style:o({},p.props.style,h.grid)})):r.default.createElement("div",{style:h.grid})};c.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},t.default=c},8582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorWrap=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(1609),i=c(r),l=c(n(8221)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(6195));function c(e){return e&&e.__esModule?e:{default:e}}var u=t.ColorWrap=function(e){var t=function(t){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.handleChange=function(e,n){if(s.simpleCheckForValidColor(e)){var o=s.toState(e,e.h||t.state.oldHue);t.setState(o),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,o,n),t.props.onChange&&t.props.onChange(o,n)}},t.handleSwatchHover=function(e,n){if(s.simpleCheckForValidColor(e)){var o=s.toState(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(o,n)}},t.state=o({},s.toState(e.color,0)),t.debounce=(0,l.default)((function(e,t,n){e(t,n)}),100),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),a(n,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),i.default.createElement(e,o({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return o({},s.toState(e.color,t.oldHue))}}]),n}(r.PureComponent||r.Component);return t.propTypes=o({},e.propTypes),t.defaultProps=o({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t};t.default=u},6593:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EditableInput=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(1609),r=l(a),i=l(n(8527));function l(e){return e&&e.__esModule?e:{default:e}}var s=[38,40],c=1,u=t.EditableInput=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,o=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(o)&&(t=e.keyCode,s.indexOf(t)>-1)){var a=n.getArrowOffset(),r=38===e.keyCode?o+a:o-a;n.setUpdatedValue(r,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+c++,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,i.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return r.default.createElement("div",{style:t.wrap},r.default.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?r.default.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(a.PureComponent||a.Component);t.default=u},4899:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hue=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(1609),r=s(a),i=s(n(8527)),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(9278));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=t.Hue=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,r=Array(a),i=0;i<a;i++)r[i]=arguments[i];return n=o=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r))),o.handleChange=function(e){var t=l.calculateChange(e,o.props.direction,o.props.hsl,o.container);t&&"function"==typeof o.props.onChange&&o.props.onChange(t,e)},o.handleMouseDown=function(e){o.handleChange(e),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},c(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,o=(0,i.default)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return r.default.createElement("div",{style:o.hue},r.default.createElement("div",{className:"hue-"+n,style:o.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.default.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),r.default.createElement("div",{style:o.pointer},this.props.pointer?r.default.createElement(this.props.pointer,this.props):r.default.createElement("div",{style:o.slider}))))}}]),t}(a.PureComponent||a.Component);t.default=u},9657:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Raised=void 0;var o=l(n(1609)),a=l(n(5556)),r=l(n(8527)),i=l(n(5364));function l(e){return e&&e.__esModule?e:{default:e}}var s=t.Raised=function(e){var t=e.zDepth,n=e.radius,a=e.background,l=e.children,s=e.styles,c=void 0===s?{}:s,u=(0,r.default)((0,i.default)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:n,background:a}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},c),{"zDepth-1":1===t});return o.default.createElement("div",{style:u.wrap},o.default.createElement("div",{style:u.bg}),o.default.createElement("div",{style:u.content},l))};s.propTypes={background:a.default.string,zDepth:a.default.oneOf([0,1,2,3,4,5]),radius:a.default.number,styles:a.default.object},s.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}},t.default=s},4749:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Saturation=void 0;var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(1609),r=c(a),i=c(n(8527)),l=c(n(7350)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(8222));function c(e){return e&&e.__esModule?e:{default:e}}var u=t.Saturation=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"==typeof n.props.onChange&&n.throttle(n.props.onChange,s.calculateChange(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=(0,l.default)((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,o=t.white,a=t.black,l=t.pointer,s=t.circle,c=(0,i.default)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:o,black:a,pointer:l,circle:s}},{custom:!!this.props.style});return r.default.createElement("div",{style:c.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},r.default.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),r.default.createElement("div",{style:c.white,className:"saturation-white"},r.default.createElement("div",{style:c.black,className:"saturation-black"}),r.default.createElement("div",{style:c.pointer},this.props.pointer?r.default.createElement(this.props.pointer,this.props):r.default.createElement("div",{style:c.circle}))))}}]),t}(a.PureComponent||a.Component);t.default=u},8333:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Swatch=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=s(n(1609)),r=s(n(8527)),i=n(4572),l=s(n(5413));function s(e){return e&&e.__esModule?e:{default:e}}var c=t.Swatch=function(e){var t=e.color,n=e.style,i=e.onClick,s=void 0===i?function(){}:i,c=e.onHover,u=e.title,d=void 0===u?t:u,p=e.children,h=e.focus,m=e.focusStyle,f=void 0===m?{}:m,b="transparent"===t,g=(0,r.default)({default:{swatch:o({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},n,h?f:{})}}),v={};return c&&(v.onMouseOver=function(e){return c(t,e)}),a.default.createElement("div",o({style:g.swatch,onClick:function(e){return s(t,e)},title:d,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&s(t,e)}},v),p,b&&a.default.createElement(l.default,{borderRadius:g.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))};t.default=(0,i.handleFocus)(c)},2825:(e,t,n)=>{"use strict";var o=n(3477);Object.defineProperty(t,"ry",{enumerable:!0,get:function(){return s(o).default}});var a=n(5413);Object.defineProperty(t,"xu",{enumerable:!0,get:function(){return s(a).default}});var r=n(6593);Object.defineProperty(t,"jc",{enumerable:!0,get:function(){return s(r).default}});var i=n(4899);Object.defineProperty(t,"RG",{enumerable:!0,get:function(){return s(i).default}});n(9657);var l=n(4749);Object.defineProperty(t,"VI",{enumerable:!0,get:function(){return s(l).default}});n(8582),n(8333);function s(e){return e&&e.__esModule?e:{default:e}}},6412:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateChange=function(e,t,n,o,a){var r=a.clientWidth,i=a.clientHeight,l="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=l-(a.getBoundingClientRect().left+window.pageXOffset),u=s-(a.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var d;if(d=u<0?0:u>i?1:Math.round(100*u/i)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var p;if(o!==(p=c<0?0:c>r?1:Math.round(100*c/r)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null}},7218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={},o=t.render=function(e,t,n,o){if("undefined"==typeof document&&!o)return null;var a=o?new o:document.createElement("canvas");a.width=2*n,a.height=2*n;var r=a.getContext("2d");return r?(r.fillStyle=e,r.fillRect(0,0,a.width,a.height),r.fillStyle=t,r.fillRect(0,0,n,n),r.translate(n,n),r.fillRect(0,0,n,n),a.toDataURL()):null};t.get=function(e,t,a,r){var i=e+"-"+t+"-"+a+(r?"-server":"");if(n[i])return n[i];var l=o(e,t,a,r);return n[i]=l,l}},6195:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isvalidColorString=t.red=t.getContrastingColor=t.isValidHex=t.toState=t.simpleCheckForValidColor=void 0;var o=r(n(6135)),a=r(n(7021));function r(e){return e&&e.__esModule?e:{default:e}}t.simpleCheckForValidColor=function(e){var t=0,n=0;return(0,o.default)(["r","g","b","a","h","s","l","v"],(function(o){e[o]&&(t+=1,isNaN(e[o])||(n+=1),"s"===o||"l"===o)&&/^\d+%$/.test(e[o])&&(n+=1)})),t===n&&e};var i=t.toState=function(e,t){var n=e.hex?(0,a.default)(e.hex):(0,a.default)(e),o=n.toHsl(),r=n.toHsv(),i=n.toRgb(),l=n.toHex();return 0===o.s&&(o.h=t||0,r.h=t||0),{hsl:o,hex:"000000"===l&&0===i.a?"transparent":"#"+l,rgb:i,hsv:r,oldHue:e.h||t||o.h,source:e.source}};t.isValidHex=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,a.default)(e).isValid()},t.getContrastingColor=function(e){if(!e)return"#fff";var t=i(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}},t.isvalidColorString=function(e,t){var n=e.replace("°","");return(0,a.default)(t+" ("+n+")")._ok}},9278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateChange=function(e,t,n,o){var a=o.clientWidth,r=o.clientHeight,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=i-(o.getBoundingClientRect().left+window.pageXOffset),c=l-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var u=void 0;if(u=c<0?359:c>r?0:360*(-100*c/r+100)/100,n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d=void 0;if(d=s<0?0:s>a?359:100*s/a*360/100,n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null}},4572:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleFocus=void 0;var o,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=(o=n(1609))&&o.__esModule?o:{default:o};function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.handleFocus=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function o(){var e,t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var a=arguments.length,r=Array(a),i=0;i<a;i++)r[i]=arguments[i];return t=n=l(this,(e=o.__proto__||Object.getPrototypeOf(o)).call.apply(e,[this].concat(r))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},l(n,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),r(o,[{key:"render",value:function(){return i.default.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},i.default.createElement(e,a({},this.props,this.state)))}}]),o}(i.default.Component)}},8222:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculateChange=function(e,t,n){var o=n.getBoundingClientRect(),a=o.width,r=o.height,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=i-(n.getBoundingClientRect().left+window.pageXOffset),c=l-(n.getBoundingClientRect().top+window.pageYOffset);s<0?s=0:s>a&&(s=a),c<0?c=0:c>r&&(c=r);var u=s/a,d=1-c/r;return{h:t.h,s:u,v:d,a:t.a,source:"hsv"}}},3456:(e,t,n)=>{"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(1609),i=d(r),l=d(n(5556)),s=d(n(5795)),c=d(n(2558)),u=d(n(311));function d(e){return e&&e.__esModule?e:{default:e}}var p=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.state={initiated:!1},e.onResize=e.onResize.bind(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,null,[{key:"getDomNodeDimensions",value:function(e){var t=e.getBoundingClientRect();return{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}}}]),a(t,[{key:"componentDidMount",value:function(){this.parentNode=s.default.findDOMNode(this).parentNode,this.elementResizeDetector=(0,c.default)({strategy:"scroll",callOnAdd:!1}),this.elementResizeDetector.listenTo(this.parentNode,this.onResize),this.componentIsMounted=!0,this.onResize()}},{key:"componentWillUnmount",value:function(){this.componentIsMounted=!1,this.elementResizeDetector.uninstall(this.parentNode)}},{key:"onResize",value:function(){var e=t.getDomNodeDimensions(this.parentNode);this.componentIsMounted&&this.setState(o({initiated:!0},e))}},{key:"render",value:function(){if((0,u.default)(this.props.children,"Expected children to be one of function or React.Element"),!this.state.initiated)return i.default.createElement("div",null);if("function"==typeof this.props.children){var e=this.props.children(this.state);return e&&r.Children.only(e)}return r.Children.only(i.default.cloneElement(this.props.children,this.state))}}]),t}(r.Component);p.propTypes={children:l.default.oneOfType([l.default.element,l.default.func]).isRequired},t.A=p},1345:(e,t,n)=>{"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function a(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function r(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function i(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,i=null,l=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?i="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(i="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?l="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(l="UNSAFE_componentWillUpdate"),null!==n||null!==i||null!==l){var s=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==i?"\n "+i:"")+(null!==l?"\n "+l:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=a),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=r;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,o)}}return e}n.r(t),n.d(t,{polyfill:()=>i}),o.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0},8006:(e,t,n)=>{"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(1609),i=s(r),l=s(n(5556));function s(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},u=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],d=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},p=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),h=function(){return p?"_"+Math.random().toString(36).substr(2,12):void 0},m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||h()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||h()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(d(e,this.sizer),this.placeHolderSizer&&d(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return p&&e?i.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=o({},this.props.style);t.display||(t.display="inline-block");var n=o({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),a=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}(this.props,[]);return function(e){u.forEach((function(t){return delete e[t]}))}(a),a.className=this.props.inputClassName,a.id=this.state.inputId,a.style=n,i.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),i.default.createElement("input",o({},a,{ref:this.inputRef})),i.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?i.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(r.Component);m.propTypes={className:l.default.string,defaultValue:l.default.any,extraWidth:l.default.oneOfType([l.default.number,l.default.string]),id:l.default.string,injectStyles:l.default.bool,inputClassName:l.default.string,inputRef:l.default.func,inputStyle:l.default.object,minWidth:l.default.oneOfType([l.default.number,l.default.string]),onAutosize:l.default.func,onChange:l.default.func,placeholder:l.default.string,placeholderIsMinWidth:l.default.bool,style:l.default.object,value:l.default.any},m.defaultProps={minWidth:1,injectStyles:!0},t.A=m},8514:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};o.get||o.set?Object.defineProperty(t,n,o):t[n]=e[n]}t.default=e}(n(5556));var o=l(n(2963)),a=l(n(788)),r=l(n(1609)),i=l(n(495));function l(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}n(554);var c=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,o.default)(e,t)}))},u=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,a.default)(e,t)}))},d=function(e){var t,n;function o(){for(var t,n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return(t=e.call.apply(e,[this].concat(o))||this).onEnter=function(e,n){var o=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),c(e,o),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var o=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,o),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var o=t.getClassNames("appear").doneClassName,a=t.getClassNames("enter").doneClassName,r=n?o+" "+a:a;t.removeClasses(e,n?"appear":"enter"),c(e,r),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),c(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),c(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,o="string"==typeof n,a=o?(o&&n?n+"-":"")+e:n[e];return{className:a,activeClassName:o?a+"-active":n[e+"Active"],doneClassName:o?a+"-done":n[e+"Done"]}},t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=o.prototype;return a.removeClasses=function(e,t){var n=this.getClassNames(t),o=n.className,a=n.activeClassName,r=n.doneClassName;o&&u(e,o),a&&u(e,a),r&&u(e,r)},a.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,c(e,t))},a.render=function(){var e=s({},this.props);return delete e.classNames,r.default.createElement(i.default,s({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},o}(r.default.Component);d.defaultProps={classNames:""},d.propTypes={};var p=d;t.default=p,e.exports=t.default},1369:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0,i(n(5556));var o=i(n(1609)),a=n(5795),r=i(n(2312));function i(e){return e&&e.__esModule?e:{default:e}}var l=function(e){var t,n;function i(){for(var t,n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return(t=e.call.apply(e,[this].concat(o))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var l=i.prototype;return l.handleLifecycle=function(e,t,n){var r,i=this.props.children,l=o.default.Children.toArray(i)[t];l.props[e]&&(r=l.props)[e].apply(r,n),this.props[e]&&this.props[e]((0,a.findDOMNode)(this))},l.render=function(){var e=this.props,t=e.children,n=e.in,a=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["children","in"]),i=o.default.Children.toArray(t),l=i[0],s=i[1];return delete a.onEnter,delete a.onEntering,delete a.onEntered,delete a.onExit,delete a.onExiting,delete a.onExited,o.default.createElement(r.default,a,n?o.default.cloneElement(l,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):o.default.cloneElement(s,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},i}(o.default.Component);l.propTypes={};var s=l;t.default=s,e.exports=t.default},495:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};o.get||o.set?Object.defineProperty(t,n,o):t[n]=e[n]}return t.default=e,t}(n(5556)),a=l(n(1609)),r=l(n(5795)),i=n(1345);function l(e){return e&&e.__esModule?e:{default:e}}n(554);var s="unmounted";t.UNMOUNTED=s;var c="exited";t.EXITED=c;var u="entering";t.ENTERING=u;var d="entered";t.ENTERED=d;var p="exiting";t.EXITING=p;var h=function(e){var t,n;function o(t,n){var o;o=e.call(this,t,n)||this;var a,r=n.transitionGroup,i=r&&!r.isMounting?t.enter:t.appear;return o.appearStatus=null,t.in?i?(a=c,o.appearStatus=u):a=d:a=t.unmountOnExit||t.mountOnEnter?s:c,o.state={status:a},o.nextCallback=null,o}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=o.prototype;return i.getChildContext=function(){return{transitionGroup:null}},o.getDerivedStateFromProps=function(e,t){return e.in&&t.status===s?{status:c}:null},i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==u&&n!==d&&(t=u):n!==u&&n!==d||(t=p)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e,t,n,o=this.props.timeout;return e=t=n=o,null!=o&&"number"!=typeof o&&(e=o.exit,t=o.enter,n=void 0!==o.appear?o.appear:t),{exit:e,enter:t,appear:n}},i.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=r.default.findDOMNode(this);t===u?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:s})},i.performEnter=function(e,t){var n=this,o=this.props.enter,a=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,r=this.getTimeouts(),i=a?r.appear:r.enter;t||o?(this.props.onEnter(e,a),this.safeSetState({status:u},(function(){n.props.onEntering(e,a),n.onTransitionEnd(e,i,(function(){n.safeSetState({status:d},(function(){n.props.onEntered(e,a)}))}))}))):this.safeSetState({status:d},(function(){n.props.onEntered(e)}))},i.performExit=function(e){var t=this,n=this.props.exit,o=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:p},(function(){t.props.onExiting(e),t.onTransitionEnd(e,o.exit,(function(){t.safeSetState({status:c},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:c},(function(){t.props.onExited(e)}))},i.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(o){n&&(n=!1,t.nextCallback=null,e(o))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var o=null==t&&!this.props.addEndListener;e&&!o?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},i.render=function(){var e=this.state.status;if(e===s)return null;var t=this.props,n=t.children,o=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["children"]);if(delete o.in,delete o.mountOnEnter,delete o.unmountOnExit,delete o.appear,delete o.enter,delete o.exit,delete o.timeout,delete o.addEndListener,delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,"function"==typeof n)return n(e,o);var r=a.default.Children.only(n);return a.default.cloneElement(r,o)},o}(a.default.Component);function m(){}h.contextTypes={transitionGroup:o.object},h.childContextTypes={transitionGroup:function(){}},h.propTypes={},h.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},h.UNMOUNTED=0,h.EXITED=1,h.ENTERING=2,h.ENTERED=3,h.EXITING=4;var f=(0,i.polyfill)(h);t.default=f},2312:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var o=l(n(5556)),a=l(n(1609)),r=n(1345),i=n(2958);function l(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},s.apply(this,arguments)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},d=function(e){var t,n;function o(t,n){var o,a=(o=e.call(this,t,n)||this).handleExited.bind(c(c(o)));return o.state={handleExited:a,firstRender:!0},o}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=o.prototype;return r.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},r.componentDidMount=function(){this.appeared=!0,this.mounted=!0},r.componentWillUnmount=function(){this.mounted=!1},o.getDerivedStateFromProps=function(e,t){var n=t.children,o=t.handleExited;return{children:t.firstRender?(0,i.getInitialChildMapping)(e,o):(0,i.getNextChildMapping)(e,n,o),firstRender:!1}},r.handleExited=function(e,t){var n=(0,i.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=s({},t.children);return delete n[e.key],{children:n}})))},r.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,["component","childFactory"]),r=u(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r:a.default.createElement(t,o,r)},o}(a.default.Component);d.childContextTypes={transitionGroup:o.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,r.polyfill)(d);t.default=p,e.exports=t.default},9790:(e,t,n)=>{"use strict";var o=l(n(8514)),a=l(n(1369)),r=l(n(2312)),i=l(n(495));function l(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:i.default,TransitionGroup:r.default,ReplaceTransition:a.default,CSSTransition:o.default}},2958:(e,t,n)=>{"use strict";t.__esModule=!0,t.getChildMapping=a,t.mergeChildMappings=r,t.getInitialChildMapping=function(e,t){return a(e.children,(function(n){return(0,o.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:i(n,"appear",e),enter:i(n,"enter",e),exit:i(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var l=a(e.children),s=r(t,l);return Object.keys(s).forEach((function(a){var r=s[a];if((0,o.isValidElement)(r)){var c=a in t,u=a in l,d=t[a],p=(0,o.isValidElement)(d)&&!d.props.in;!u||c&&!p?u||!c||p?u&&c&&(0,o.isValidElement)(d)&&(s[a]=(0,o.cloneElement)(r,{onExited:n.bind(null,r),in:d.props.in,exit:i(r,"exit",e),enter:i(r,"enter",e)})):s[a]=(0,o.cloneElement)(r,{in:!1}):s[a]=(0,o.cloneElement)(r,{onExited:n.bind(null,r),in:!0,exit:i(r,"exit",e),enter:i(r,"enter",e)})}})),s};var o=n(1609);function a(e,t){var n=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,o.isValidElement)(e)?t(e):e}(e)})),n}function r(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var o,a=Object.create(null),r=[];for(var i in e)i in t?r.length&&(a[i]=r,r=[]):r.push(i);var l={};for(var s in t){if(a[s])for(o=0;o<a[s].length;o++){var c=a[s][o];l[a[s][o]]=n(c)}l[s]=n(s)}for(o=0;o<r.length;o++)l[r[o]]=n(r[o]);return l}function i(e,t,n){return null!=n[t]?n[t]:e.props[t]}},554:(e,t,n)=>{"use strict";var o;t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,(o=n(5556))&&o.__esModule,t.timeoutsShape=null,t.classNamesShape=null},6892:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var o,a=(o=n(3215))&&o.__esModule?o:{default:o},r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){return t[e]||{extend:e}}},l=t.autoprefix=function(e){var t={};return(0,a.default)(e,(function(e,n){var o={};(0,a.default)(e,(function(e,t){var n=i[t];n?o=r({},o,n(e)):o[t]=e})),t[n]=o})),t};t.default=l},5268:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var o,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=(o=n(1609))&&o.__esModule?o:{default:o};function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function o(){var n,l,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return l=s=i(this,(n=o.__proto__||Object.getPrototypeOf(o)).call.apply(n,[this].concat(u))),s.state={active:!1},s.handleMouseDown=function(){return s.setState({active:!0})},s.handleMouseUp=function(){return s.setState({active:!1})},s.render=function(){return r.default.createElement(t,{onMouseDown:s.handleMouseDown,onMouseUp:s.handleMouseUp},r.default.createElement(e,a({},s.props,s.state)))},i(s,l)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o}(r.default.Component)};t.default=l},6686:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var o,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=(o=n(1609))&&o.__esModule?o:{default:o};function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function o(){var n,l,s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return l=s=i(this,(n=o.__proto__||Object.getPrototypeOf(o)).call.apply(n,[this].concat(u))),s.state={hover:!1},s.handleMouseOver=function(){return s.setState({hover:!0})},s.handleMouseOut=function(){return s.setState({hover:!1})},s.render=function(){return r.default.createElement(t,{onMouseOver:s.handleMouseOver,onMouseOut:s.handleMouseOut},r.default.createElement(e,a({},s.props,s.state)))},i(s,l)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o}(r.default.Component)};t.default=l},9265:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var o=l(n(5015)),a=l(n(3215)),r=l(n(1331)),i=l(n(5378));function l(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,r.default)(t)?(0,a.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,o.default)(t)&&n.push(t)})),n};t.default=s},8527:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var o=c(n(9265)),a=c(n(6203)),r=c(n(6892)),i=c(n(6686)),l=c(n(5268)),s=c(n(2693));function c(e){return e&&e.__esModule?e:{default:e}}t.hover=i.default,t.handleHover=i.default,t.handleActive=l.default,t.loop=s.default;var u=t.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var l=(0,o.default)(n),s=(0,a.default)(e,l);return(0,r.default)(s)};t.default=u},2693:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={},o=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&o("first-child"),e===t-1&&o("last-child"),(0===e||e%2==0)&&o("even"),1===Math.abs(e%2)&&o("odd"),o("nth-child",e),n}},6203:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var o=i(n(3215)),a=i(n(8055)),r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};function i(e){return e&&e.__esModule?e:{default:e}}var l=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,a.default)(e.default)||{};return t.map((function(t){var a=e[t];return a&&(0,o.default)(a,(function(e,t){n[t]||(n[t]={}),n[t]=r({},n[t],a[t])})),t})),n};t.default=l},8226:e=>{e.exports=function(){"use strict";return function(e){var t="/*|*/",n=t+"}";function o(t){if(t)try{e(t+"}")}catch(e){}}return function(a,r,i,l,s,c,u,d,p,h){switch(a){case 1:if(0===p&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===d)return r+t;break;case 3:switch(d){case 102:case 112:return e(i[0]+r),"";default:return r+(0===h?t:"")}case-2:r.split(n).forEach(o)}}}}()},7021:(e,t,n)=>{var o;!function(a){var r=/^\s+/,i=/\s+$/,l=0,s=a.round,c=a.min,u=a.max,d=a.random;function p(e,t){if(t=t||{},(e=e||"")instanceof p)return e;if(!(this instanceof p))return new p(e,t);var n=function(e){var t,n,o,l={r:0,g:0,b:0},s=1,d=null,p=null,h=null,m=!1,f=!1;return"string"==typeof e&&(e=function(e){e=e.replace(r,"").replace(i,"").toLowerCase();var t,n=!1;if(M[e])e=M[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=U.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=U.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=U.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=U.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=U.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=U.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=U.hex8.exec(e))?{r:P(t[1]),g:P(t[2]),b:P(t[3]),a:V(t[4]),format:n?"name":"hex8"}:(t=U.hex6.exec(e))?{r:P(t[1]),g:P(t[2]),b:P(t[3]),format:n?"name":"hex"}:(t=U.hex4.exec(e))?{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),a:V(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=U.hex3.exec(e))&&{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(W(e.r)&&W(e.g)&&W(e.b)?(t=e.r,n=e.g,o=e.b,l={r:255*R(t,255),g:255*R(n,255),b:255*R(o,255)},m=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):W(e.h)&&W(e.s)&&W(e.v)?(d=L(e.s),p=L(e.v),l=function(e,t,n){e=6*R(e,360),t=R(t,100),n=R(n,100);var o=a.floor(e),r=e-o,i=n*(1-t),l=n*(1-r*t),s=n*(1-(1-r)*t),c=o%6;return{r:255*[n,l,i,i,s,n][c],g:255*[s,n,n,l,i,i][c],b:255*[i,i,s,n,n,l][c]}}(e.h,d,p),m=!0,f="hsv"):W(e.h)&&W(e.s)&&W(e.l)&&(d=L(e.s),h=L(e.l),l=function(e,t,n){var o,a,r;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=R(e,360),t=R(t,100),n=R(n,100),0===t)o=a=r=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;o=i(s,l,e+1/3),a=i(s,l,e),r=i(s,l,e-1/3)}return{r:255*o,g:255*a,b:255*r}}(e.h,d,h),m=!0,f="hsl"),e.hasOwnProperty("a")&&(s=e.a)),s=D(s),{ok:m,format:e.format||f,r:c(255,u(l.r,0)),g:c(255,u(l.g,0)),b:c(255,u(l.b,0)),a:s}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=s(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=n.ok,this._tc_id=l++}function h(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var o,a,r=u(e,t,n),i=c(e,t,n),l=(r+i)/2;if(r==i)o=a=0;else{var s=r-i;switch(a=l>.5?s/(2-r-i):s/(r+i),r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:a,l}}function m(e,t,n){e=R(e,255),t=R(t,255),n=R(n,255);var o,a,r=u(e,t,n),i=c(e,t,n),l=r,s=r-i;if(a=0===r?0:s/r,r==i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:a,v:l}}function f(e,t,n,o){var a=[F(s(e).toString(16)),F(s(t).toString(16)),F(s(n).toString(16))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function b(e,t,n,o){return[F(B(o)),F(s(e).toString(16)),F(s(t).toString(16)),F(s(n).toString(16))].join("")}function g(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.s-=t/100,n.s=I(n.s),p(n)}function v(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.s+=t/100,n.s=I(n.s),p(n)}function k(e){return p(e).desaturate(100)}function y(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.l+=t/100,n.l=I(n.l),p(n)}function E(e,t){t=0===t?0:t||10;var n=p(e).toRgb();return n.r=u(0,c(255,n.r-s(-t/100*255))),n.g=u(0,c(255,n.g-s(-t/100*255))),n.b=u(0,c(255,n.b-s(-t/100*255))),p(n)}function x(e,t){t=0===t?0:t||10;var n=p(e).toHsl();return n.l-=t/100,n.l=I(n.l),p(n)}function _(e,t){var n=p(e).toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,p(n)}function w(e){var t=p(e).toHsl();return t.h=(t.h+180)%360,p(t)}function C(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+120)%360,s:t.s,l:t.l}),p({h:(n+240)%360,s:t.s,l:t.l})]}function S(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+90)%360,s:t.s,l:t.l}),p({h:(n+180)%360,s:t.s,l:t.l}),p({h:(n+270)%360,s:t.s,l:t.l})]}function N(e){var t=p(e).toHsl(),n=t.h;return[p(e),p({h:(n+72)%360,s:t.s,l:t.l}),p({h:(n+216)%360,s:t.s,l:t.l})]}function O(e,t,n){t=t||6,n=n||30;var o=p(e).toHsl(),a=360/n,r=[p(e)];for(o.h=(o.h-(a*t>>1)+720)%360;--t;)o.h=(o.h+a)%360,r.push(p(o));return r}function T(e,t){t=t||6;for(var n=p(e).toHsv(),o=n.h,a=n.s,r=n.v,i=[],l=1/t;t--;)i.push(p({h:o,s:a,v:r})),r=(r+l)%1;return i}p.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,o=this.toRgb();return e=o.r/255,t=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:a.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=D(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=m(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=m(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),o=s(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+o+"%)":"hsva("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),n=s(100*e.s),o=s(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+o+"%)":"hsla("+t+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(e){return f(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,o,a){var r=[F(s(e).toString(16)),F(s(t).toString(16)),F(s(n).toString(16)),F(B(o))];return a&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)&&r[3].charAt(0)==r[3].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0)+r[3].charAt(0):r.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*R(this._r,255))+"%",g:s(100*R(this._g,255))+"%",b:s(100*R(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*R(this._r,255))+"%, "+s(100*R(this._g,255))+"%, "+s(100*R(this._b,255))+"%)":"rgba("+s(100*R(this._r,255))+"%, "+s(100*R(this._g,255))+"%, "+s(100*R(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(A[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+b(this._r,this._g,this._b,this._a),n=t,o=this._gradientType?"GradientType = 1, ":"";if(e){var a=p(e);n="#"+b(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,o=this._a<1&&this._a>=0;return t||!o||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return p(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(E,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(k,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(N,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},p.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]="a"===o?e[o]:L(e[o]));e=n}return p(e,t)},p.equals=function(e,t){return!(!e||!t)&&p(e).toRgbString()==p(t).toRgbString()},p.random=function(){return p.fromRatio({r:d(),g:d(),b:d()})},p.mix=function(e,t,n){n=0===n?0:n||50;var o=p(e).toRgb(),a=p(t).toRgb(),r=n/100;return p({r:(a.r-o.r)*r+o.r,g:(a.g-o.g)*r+o.g,b:(a.b-o.b)*r+o.b,a:(a.a-o.a)*r+o.a})},p.readability=function(e,t){var n=p(e),o=p(t);return(a.max(n.getLuminance(),o.getLuminance())+.05)/(a.min(n.getLuminance(),o.getLuminance())+.05)},p.isReadable=function(e,t,n){var o,a,r,i,l,s=p.readability(e,t);switch(a=!1,(r=n,"AA"!==(i=((r=r||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(l=(r.size||"small").toLowerCase())&&"large"!==l&&(l="small"),o={level:i,size:l}).level+o.size){case"AAsmall":case"AAAlarge":a=s>=4.5;break;case"AAlarge":a=s>=3;break;case"AAAsmall":a=s>=7}return a},p.mostReadable=function(e,t,n){var o,a,r,i,l=null,s=0;a=(n=n||{}).includeFallbackColors,r=n.level,i=n.size;for(var c=0;c<t.length;c++)(o=p.readability(e,t[c]))>s&&(s=o,l=p(t[c]));return p.isReadable(e,l,{level:r,size:i})||!a?l:(n.includeFallbackColors=!1,p.mostReadable(e,["#fff","#000"],n))};var M=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},A=p.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(M);function D(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function I(e){return c(1,u(0,e))}function P(e){return parseInt(e,16)}function F(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function B(e){return a.round(255*parseFloat(e)).toString(16)}function V(e){return P(e)/255}var z,j,H,U=(j="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",H="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+j),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+j),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+j),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!U.CSS_UNIT.exec(e)}e.exports?e.exports=p:void 0===(o=function(){return p}.call(t,n,t,e))||(e.exports=o)}(Math)},5371:(e,t,n)=>{var o;!function(){function a(e,t,n){return e.call.apply(e.bind,arguments)}function r(e,t,n){if(!e)throw Error();if(2<arguments.length){var o=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,o),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function i(e,t,n){return(i=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?a:r).apply(null,arguments)}var l=Date.now||function(){return+new Date};function s(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var c=!!window.FontFace;function u(e,t,n,o){if(t=e.c.createElement(t),n)for(var a in n)n.hasOwnProperty(a)&&("style"==a?t.style.cssText=n[a]:t.setAttribute(a,n[a]));return o&&t.appendChild(e.c.createTextNode(o)),t}function d(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function p(e){e.parentNode&&e.parentNode.removeChild(e)}function h(e,t,n){t=t||[],n=n||[];for(var o=e.className.split(/\s+/),a=0;a<t.length;a+=1){for(var r=!1,i=0;i<o.length;i+=1)if(t[a]===o[i]){r=!0;break}r||o.push(t[a])}for(t=[],a=0;a<o.length;a+=1){for(r=!1,i=0;i<n.length;i+=1)if(o[a]===n[i]){r=!0;break}r||t.push(o[a])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function m(e,t){for(var n=e.className.split(/\s+/),o=0,a=n.length;o<a;o++)if(n[o]==t)return!0;return!1}function f(e,t,n){function o(){l&&a&&r&&(l(i),l=null)}t=u(e,"link",{rel:"stylesheet",href:t,media:"all"});var a=!1,r=!0,i=null,l=n||null;c?(t.onload=function(){a=!0,o()},t.onerror=function(){a=!0,i=Error("Stylesheet failed to load"),o()}):setTimeout((function(){a=!0,o()}),0),d(e,"head",t)}function b(e,t,n,o){var a=e.c.getElementsByTagName("head")[0];if(a){var r=u(e,"script",{src:t}),i=!1;return r.onload=r.onreadystatechange=function(){i||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(i=!0,n&&n(null),r.onload=r.onreadystatechange=null,"HEAD"==r.parentNode.tagName&&a.removeChild(r))},a.appendChild(r),setTimeout((function(){i||(i=!0,n&&n(Error("Script load timeout")))}),o||5e3),r}return null}function g(){this.a=0,this.c=null}function v(e){return e.a++,function(){e.a--,y(e)}}function k(e,t){e.c=t,y(e)}function y(e){0==e.a&&e.c&&(e.c(),e.c=null)}function E(e){this.a=e||"-"}function x(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function _(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var o=e[n].replace(/['"]/g,"");-1!=o.indexOf(" ")||/^\d/.test(o)?t.push("'"+o+"'"):t.push(o)}return t.join(",")}function w(e){return e.a+e.f}function C(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function S(e){var t=4,n="n",o=null;return e&&((o=e.match(/(normal|oblique|italic)/i))&&o[1]&&(n=o[1].substr(0,1).toLowerCase()),(o=e.match(/([1-9]00|normal|bold)/i))&&o[1]&&(/bold/i.test(o[1])?t=7:/[1-9]00/.test(o[1])&&(t=parseInt(o[1].substr(0,1),10)))),n+t}function N(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new E("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function O(e){if(e.g){var t=m(e.f,e.a.c("wf","active")),n=[],o=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),h(e.f,n,o)}T(e,"inactive")}function T(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,w(n)):e.h[t]())}function M(){this.c={}}function A(e,t){this.c=e,this.f=t,this.a=u(this.c,"span",{"aria-hidden":"true"},this.f)}function D(e){d(e.c,"body",e.a)}function R(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+_(e.c)+";font-style:"+C(e)+";font-weight:"+e.f+"00;"}function I(e,t,n,o,a,r){this.g=e,this.j=t,this.a=o,this.c=n,this.f=a||3e3,this.h=r||void 0}function P(e,t,n,o,a,r,i){this.v=e,this.B=t,this.c=n,this.a=o,this.s=i||"BESbswy",this.f={},this.w=a||3e3,this.u=r||null,this.m=this.j=this.h=this.g=null,this.g=new A(this.c,this.s),this.h=new A(this.c,this.s),this.j=new A(this.c,this.s),this.m=new A(this.c,this.s),e=R(e=new x(this.a.c+",serif",w(this.a))),this.g.a.style.cssText=e,e=R(e=new x(this.a.c+",sans-serif",w(this.a))),this.h.a.style.cssText=e,e=R(e=new x("serif",w(this.a))),this.j.a.style.cssText=e,e=R(e=new x("sans-serif",w(this.a))),this.m.a.style.cssText=e,D(this.g),D(this.h),D(this.j),D(this.m)}E.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},I.prototype.start=function(){var e=this.c.o.document,t=this,n=l(),o=new Promise((function(o,a){!function r(){l()-n>=t.f?a():e.fonts.load(function(e){return C(e)+" "+e.f+"00 300px "+_(e.c)}(t.a),t.h).then((function(e){1<=e.length?o():setTimeout(r,25)}),(function(){a()}))}()})),a=null,r=new Promise((function(e,n){a=setTimeout(n,t.f)}));Promise.race([r,o]).then((function(){a&&(clearTimeout(a),a=null),t.g(t.a)}),(function(){t.j(t.a)}))};var F={D:"serif",C:"sans-serif"},L=null;function B(){if(null===L){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return L}function V(e,t,n){for(var o in F)if(F.hasOwnProperty(o)&&t===e.f[F[o]]&&n===e.f[F[o]])return!0;return!1}function z(e){var t,n=e.g.a.offsetWidth,o=e.h.a.offsetWidth;(t=n===e.f.serif&&o===e.f["sans-serif"])||(t=B()&&V(e,n,o)),t?l()-e.A>=e.w?B()&&V(e,n,o)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?j(e,e.v):j(e,e.B):function(e){setTimeout(i((function(){z(this)}),e),50)}(e):j(e,e.v)}function j(e,t){setTimeout(i((function(){p(this.g.a),p(this.h.a),p(this.j.a),p(this.m.a),t(this.a)}),e),0)}function H(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}P.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=l(),z(this)};var U=null;function W(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&h(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),T(e,"active")):O(e.a))}function G(e){this.j=e,this.a=new M,this.h=0,this.f=this.g=!0}function $(e,t,n,o,a){var r=0==--e.h;(e.f||e.g)&&setTimeout((function(){var e=a||null,l=o||{};if(0===n.length&&r)O(t.a);else{t.f+=n.length,r&&(t.j=r);var s,c=[];for(s=0;s<n.length;s++){var u=n[s],d=l[u.c],p=t.a,m=u;if(p.g&&h(p.f,[p.a.c("wf",m.c,w(m).toString(),"loading")]),T(p,"fontloading",m),p=null,null===U)if(window.FontFace){m=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var f=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);U=m?42<parseInt(m[1],10):!f}else U=!1;p=U?new I(i(t.g,t),i(t.h,t),t.c,u,t.s,d):new P(i(t.g,t),i(t.h,t),t.c,u,t.s,e,d),c.push(p)}for(s=0;s<c.length;s++)c[s].start()}}),0)}function q(e,t){this.c=e,this.a=t}function X(e,t){this.c=e,this.a=t}function J(e,t){this.c=e||K,this.a=[],this.f=[],this.g=t||""}H.prototype.g=function(e){var t=this.a;t.g&&h(t.f,[t.a.c("wf",e.c,w(e).toString(),"active")],[t.a.c("wf",e.c,w(e).toString(),"loading"),t.a.c("wf",e.c,w(e).toString(),"inactive")]),T(t,"fontactive",e),this.m=!0,W(this)},H.prototype.h=function(e){var t=this.a;if(t.g){var n=m(t.f,t.a.c("wf",e.c,w(e).toString(),"active")),o=[],a=[t.a.c("wf",e.c,w(e).toString(),"loading")];n||o.push(t.a.c("wf",e.c,w(e).toString(),"inactive")),h(t.f,o,a)}T(t,"fontinactive",e),W(this)},G.prototype.load=function(e){this.c=new s(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var o=[],a=n.timeout;!function(e){e.g&&h(e.f,[e.a.c("wf","loading")]),T(e,"loading")}(t),o=function(e,t,n){var o,a=[];for(o in t)if(t.hasOwnProperty(o)){var r=e.c[o];r&&a.push(r(t[o],n))}return a}(e.a,n,e.c);var r=new H(e.c,t,a);for(e.h=o.length,t=0,n=o.length;t<n;t++)o[t].load((function(t,n,o){$(e,r,t,n,o)}))}(this,new N(this.c,e),e)},q.prototype.load=function(e){function t(){if(r["__mti_fntLst"+o]){var n,a=r["__mti_fntLst"+o](),i=[];if(a)for(var l=0;l<a.length;l++){var s=a[l].fontfamily;null!=a[l].fontStyle&&null!=a[l].fontWeight?(n=a[l].fontStyle+a[l].fontWeight,i.push(new x(s,n))):i.push(new x(s))}e(i)}else setTimeout((function(){t()}),50)}var n=this,o=n.a.projectId,a=n.a.version;if(o){var r=n.c.o;b(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+o+".js"+(a?"?v="+a:""),(function(a){a?e([]):(r["__MonotypeConfiguration__"+o]=function(){return n.a},t())})).id="__MonotypeAPIScript__"+o}else e([])},X.prototype.load=function(e){var t,n,o=this.a.urls||[],a=this.a.families||[],r=this.a.testStrings||{},i=new g;for(t=0,n=o.length;t<n;t++)f(this.c,o[t],v(i));var l=[];for(t=0,n=a.length;t<n;t++)if((o=a[t].split(":"))[1])for(var s=o[1].split(","),c=0;c<s.length;c+=1)l.push(new x(o[0],s[c]));else l.push(new x(o[0]));k(i,(function(){e(l,r)}))};var K="https://fonts.googleapis.com/css";function Y(e){this.f=e,this.a=[],this.c={}}var Z={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},Q={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},ee={i:"i",italic:"i",n:"n",normal:"n"},te=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function ne(e,t){this.c=e,this.a=t}var oe={Arimo:!0,Cousine:!0,Tinos:!0};function ae(e,t){this.c=e,this.a=t}function re(e,t){this.c=e,this.f=t,this.a=[]}ne.prototype.load=function(e){var t=new g,n=this.c,o=new J(this.a.api,this.a.text),a=this.a.families;!function(e,t){for(var n=t.length,o=0;o<n;o++){var a=t[o].split(":");3==a.length&&e.f.push(a.pop());var r="";2==a.length&&""!=a[1]&&(r=":"),e.a.push(a.join(r))}}(o,a);var r=new Y(a);!function(e){for(var t=e.f.length,n=0;n<t;n++){var o=e.f[n].split(":"),a=o[0].replace(/\+/g," "),r=["n4"];if(2<=o.length){var i;if(i=[],l=o[1])for(var l,s=(l=l.split(",")).length,c=0;c<s;c++){var u;if((u=l[c]).match(/^[\w-]+$/))if(null==(d=te.exec(u.toLowerCase())))u="";else{if(u=null==(u=d[2])||""==u?"n":ee[u],null==(d=d[1])||""==d)d="4";else var d=Q[d]||(isNaN(d)?"4":d.substr(0,1));u=[u,d].join("")}else u="";u&&i.push(u)}0<i.length&&(r=i),3==o.length&&(i=[],0<(o=(o=o[2])?o.split(","):i).length&&(o=Z[o[0]])&&(e.c[a]=o))}for(e.c[a]||(o=Z[a])&&(e.c[a]=o),o=0;o<r.length;o+=1)e.a.push(new x(a,r[o]))}}(r),f(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],o=0;o<t;o++)n.push(e.a[o].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(o),v(t)),k(t,(function(){e(r.a,r.c,oe)}))},ae.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?b(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",(function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var o=[],a=0;a<t.length;a+=2)for(var r=t[a],i=t[a+1],l=0;l<i.length;l++)o.push(new x(r,i[l]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}e(o)}}),2e3):e([])},re.prototype.load=function(e){var t=this.f.id,n=this.c.o,o=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var a=0,r=n.fonts.length;a<r;++a){var i=n.fonts[a];o.a.push(new x(i.name,S("font-weight:"+i.weight+";font-style:"+i.style)))}e(o.a)},b(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",(function(t){t&&e([])}))):e([])};var ie=new G(window);ie.a.c.custom=function(e,t){return new X(t,e)},ie.a.c.fontdeck=function(e,t){return new re(t,e)},ie.a.c.monotype=function(e,t){return new q(t,e)},ie.a.c.typekit=function(e,t){return new ae(t,e)},ie.a.c.google=function(e,t){return new ne(t,e)};var le={load:i(ie.load,ie)};void 0===(o=function(){return le}.call(t,n,t,e))||(e.exports=o)}()},1609:e=>{"use strict";e.exports=window.React},5795:e=>{"use strict";e.exports=window.ReactDOM},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var r=Object.create(null);a.r(r);var i={};e=e||[null,t({}),t([]),t(t)];for(var l=2&o&&n;"object"==typeof l&&!~e.indexOf(l);l=t(l))Object.getOwnPropertyNames(l).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,a.d(r,i),r},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};(()=>{"use strict";a.r(r),a.d(r,{AdvancedColorControlPalette:()=>pp,BackgroundControl:()=>Ai,BackgroundSizeControl:()=>vi,BackgroundTypeControl:()=>Ri,BorderColorControls:()=>hp,BorderControl:()=>Os,BoxShadowControl:()=>ni,ColorControlWithStates:()=>no,ColorFields:()=>Un,ColorGroup:()=>Ed,ColorIcons:()=>Gn,ColorPicker:()=>Wn,ColumnDragResizer:()=>Tp,CopyPasteAttributes:()=>Ws,DropShadowControl:()=>mi,DynamicBackgroundControl:()=>ui,DynamicGalleryControl:()=>pi,DynamicImageControl:()=>ai,DynamicInlineReplaceControl:()=>si,DynamicLinkControl:()=>wd,DynamicTextControl:()=>ii,DynamicTextInputControl:()=>qs,FontSizeControl:()=>As,GapSizeControl:()=>js,GenIcon:()=>qd,GradientControl:()=>jl,HeadingLevelIcon:()=>ei,HoverToggleControl:()=>Bs,IconRender:()=>Jd,IconSpanTag:()=>Kd,ImageSizeControl:()=>ki,InlinePopColorControl:()=>io,InlineTypographyControls:()=>op,InputSearch:()=>zd,InspectorControlTabs:()=>Ls,KadenceBlockDefaults:()=>gp,KadenceFocalPicker:()=>Si,KadenceFormConditionals:()=>Qr,KadenceIconPicker:()=>yp,KadenceImageControl:()=>rs,KadenceImageURLInputUI:()=>Rd,KadenceInspectorControls:()=>hs,KadenceMediaPlaceholder:()=>_i,KadencePanelBody:()=>ds,KadencePostSelectTerms:()=>vs,KadenceRadioButtons:()=>wi,KadenceSelectPosts:()=>Wr,KadenceSelectTerms:()=>fs,KadenceSubPanelBody:()=>ps,KadenceVideoControl:()=>ss,KadenceWebfontLoader:()=>Zr,MeasureRangeControl:()=>Kl,MeasurementControls:()=>Qd,MeasurementSingleControl:()=>Zd,ObfuscateTextControl:()=>Sp,OnboardingModal:()=>Mp,OpacityControl:()=>Cs,PopColorControl:()=>Qn,PostSelectorCheckbox:()=>Np,RadioRangeControl:()=>rp,RangeControl:()=>Yd,ResponsiveAlignControls:()=>No,ResponsiveBorderControl:()=>Ts,ResponsiveButtonStyleControlsWithStates:()=>oo,ResponsiveControl:()=>ks,ResponsiveFontSizeControl:()=>Ds,ResponsiveGapSizeControl:()=>Hs,ResponsiveKadenceRadioButtons:()=>ts,ResponsiveMeasureRangeControl:()=>Zl,ResponsiveMeasurementControls:()=>up,ResponsivePopColorControl:()=>to,ResponsiveRadioRangeControls:()=>lp,ResponsiveRangeControls:()=>ip,ResponsiveSelectControl:()=>ys,ResponsiveShadowControl:()=>fp,ResponsiveSingleBorderControl:()=>Ns,ResponsiveSingleRangeControl:()=>cp,ResponsiveUnitControl:()=>Is,SelectChildBlock:()=>Cp,SelectParentBlock:()=>_p,SelectPostFromPostType:()=>Xs,ShadowControl:()=>mp,SingleBorderControl:()=>Ss,SinglePopColorControl:()=>Zn,SmallResponsiveControl:()=>eo,SpacingVisualizer:()=>es,StepControls:()=>_s,SubsectionWrap:()=>cs,TagSelect:()=>Vs,TaxonomySelect:()=>xp,TextHighlight:()=>Bd,TextShadowControl:()=>ap,Tooltip:()=>yd,TwoColumn:()=>xd,TypographyControls:()=>tp,URLInputControl:()=>Wd,URLInputInline:()=>Hd,VerticalAlignmentIcon:()=>ns,WebfontLoader:()=>Kr,fetchSearchResults:()=>Sd});var e=a(1609),t=a.t(e,2),n=a.n(e),o=a(8527),i={},l=function(e,t,n,o){var a=e+"-"+t+"-"+n+(o?"-server":"");if(i[a])return i[a];var r=function(e,t,n,o){if("undefined"==typeof document&&!o)return null;var a=o?new o:document.createElement("canvas");a.width=2*n,a.height=2*n;var r=a.getContext("2d");return r?(r.fillStyle=e,r.fillRect(0,0,a.width,a.height),r.fillStyle=t,r.fillRect(0,0,n,n),r.translate(n,n),r.fillRect(0,0,n,n),a.toDataURL()):null}(e,t,n,o);return i[a]=r,r},s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c=function(t){var a=t.white,r=t.grey,i=t.size,c=t.renderers,u=t.borderRadius,d=t.boxShadow,p=t.children,h=(0,o.default)({default:{grid:{borderRadius:u,boxShadow:d,absolute:"0px 0px 0px 0px",background:"url("+l(a,r,i,c.canvas)+") center left"}}});return(0,e.isValidElement)(p)?n().cloneElement(p,s({},p.props,{style:s({},p.props.style,h.grid)})):n().createElement("div",{style:h.grid})};c.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};const u=c;var d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,r=Array(a),i=0;i<a;i++)r[i]=arguments[i];return n=o=h(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r))),o.handleChange=function(e){var t=function(e,t,n,o,a){var r=a.clientWidth,i=a.clientHeight,l="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,c=l-(a.getBoundingClientRect().left+window.pageXOffset),u=s-(a.getBoundingClientRect().top+window.pageYOffset);if("vertical"===n){var d;if(d=u<0?0:u>i?1:Math.round(100*u/i)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var p;if(o!==(p=c<0?0:c>r?1:Math.round(100*c/r)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null}(e,o.props.hsl,o.props.direction,o.props.a,o.container);t&&"function"==typeof o.props.onChange&&o.props.onChange(t,e)},o.handleMouseDown=function(e){o.handleChange(e),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},o.unbindEventListeners=function(){window.removeEventListener("mousemove",o.handleChange),window.removeEventListener("mouseup",o.handleMouseUp)},h(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),p(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,a=(0,o.default)({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:d({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return n().createElement("div",{style:a.alpha},n().createElement("div",{style:a.checkboard},n().createElement(u,{renderers:this.props.renderers})),n().createElement("div",{style:a.gradient}),n().createElement("div",{style:a.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n().createElement("div",{style:a.pointer},this.props.pointer?n().createElement(this.props.pointer,this.props):n().createElement("div",{style:a.slider}))))}}]),t}(e.PureComponent||e.Component);const f=m;var b=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),g=[38,40],v=1,k=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.handleBlur=function(){n.state.blurValue&&n.setState({value:n.state.blurValue,blurValue:null})},n.handleChange=function(e){n.setUpdatedValue(e.target.value,e)},n.handleKeyDown=function(e){var t,o=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(o)&&(t=e.keyCode,g.indexOf(t)>-1)){var a=n.getArrowOffset(),r=38===e.keyCode?o+a:o-a;n.setUpdatedValue(r,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+v++,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),b(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=(0,o.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return n().createElement("div",{style:t.wrap},n().createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?n().createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(e.PureComponent||e.Component);const y=k;var E=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function x(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var _=function(e){function t(){var e,n,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,r=Array(a),i=0;i<a;i++)r[i]=arguments[i];return n=o=x(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(r))),o.handleChange=function(e){var t=function(e,t,n,o){var a=o.clientWidth,r=o.clientHeight,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=i-(o.getBoundingClientRect().left+window.pageXOffset),c=l-(o.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var u;if(u=c<0?359:c>r?0:360*(-100*c/r+100)/100,n.h!==u)return{h:u,s:n.s,l:n.l,a:n.a,source:"hsl"}}else{var d;if(d=s<0?0:s>a?359:100*s/a*360/100,n.h!==d)return{h:d,s:n.s,l:n.l,a:n.a,source:"hsl"}}return null}(e,o.props.direction,o.props.hsl,o.container);t&&"function"==typeof o.props.onChange&&o.props.onChange(t,e)},o.handleMouseDown=function(e){o.handleChange(e),window.addEventListener("mousemove",o.handleChange),window.addEventListener("mouseup",o.handleMouseUp)},o.handleMouseUp=function(){o.unbindEventListeners()},x(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),E(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,a=void 0===t?"horizontal":t,r=(0,o.default)({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===a});return n().createElement("div",{style:r.hue},n().createElement("div",{className:"hue-"+a,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n().createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),n().createElement("div",{style:r.pointer},this.props.pointer?n().createElement(this.props.pointer,this.props):n().createElement("div",{style:r.slider}))))}}]),t}(e.PureComponent||e.Component);const w=_;var C=a(5556),S=a.n(C),N=a(5364),O=a.n(N),T=function(e){var t=e.zDepth,a=e.radius,r=e.background,i=e.children,l=e.styles,s=void 0===l?{}:l,c=(0,o.default)(O()({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:a,background:r}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},s),{"zDepth-1":1===t});return n().createElement("div",{style:c.wrap},n().createElement("div",{style:c.bg}),n().createElement("div",{style:c.content},i))};T.propTypes={background:S().string,zDepth:S().oneOf([0,1,2,3,4,5]),radius:S().number,styles:S().object},T.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};const M=T;var A=a(7350),D=a.n(A),R=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),I=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleChange=function(e){"function"==typeof n.props.onChange&&n.throttle(n.props.onChange,function(e,t,n){var o=n.getBoundingClientRect(),a=o.width,r=o.height,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=i-(n.getBoundingClientRect().left+window.pageXOffset),c=l-(n.getBoundingClientRect().top+window.pageYOffset);s<0?s=0:s>a&&(s=a),c<0?c=0:c>r&&(c=r);var u=s/a,d=1-c/r;return{h:t.h,s:u,v:d,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=D()((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),R(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},a=t.color,r=t.white,i=t.black,l=t.pointer,s=t.circle,c=(0,o.default)({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:a,white:r,black:i,pointer:l,circle:s}},{custom:!!this.props.style});return n().createElement("div",{style:c.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n().createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),n().createElement("div",{style:c.white,className:"saturation-white"},n().createElement("div",{style:c.black,className:"saturation-black"}),n().createElement("div",{style:c.pointer},this.props.pointer?n().createElement(this.props.pointer,this.props):n().createElement("div",{style:c.circle}))))}}]),t}(e.PureComponent||e.Component);const P=I;var F=a(8221),L=a.n(F),B=a(6135),V=a.n(B),z=a(7021),j=a.n(z),H=function(e){var t=0,n=0;return V()(["r","g","b","a","h","s","l","v"],(function(o){e[o]&&(t+=1,isNaN(e[o])||(n+=1),"s"===o||"l"===o)&&/^\d+%$/.test(e[o])&&(n+=1)})),t===n&&e},U=function(e,t){var n=e.hex?j()(e.hex):j()(e),o=n.toHsl(),a=n.toHsv(),r=n.toRgb(),i=n.toHex();return 0===o.s&&(o.h=t||0,a.h=t||0),{hsl:o,hex:"000000"===i&&0===r.a?"transparent":"#"+i,rgb:r,hsv:a,oldHue:e.h||t||o.h,source:e.source}},W=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&j()(e).isValid()},G=function(e){if(!e)return"#fff";var t=U(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},$=function(e,t){var n=e.replace("°","");return j()(t+" ("+n+")")._ok},q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},X=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();const J=function(t){var o=function(e){function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return t.handleChange=function(e,n){if(H(e)){var o=U(e,e.h||t.state.oldHue);t.setState(o),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,o,n),t.props.onChange&&t.props.onChange(o,n)}},t.handleSwatchHover=function(e,n){if(H(e)){var o=U(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(o,n)}},t.state=q({},U(e.color,0)),t.debounce=L()((function(e,t,n){e(t,n)}),100),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,e),X(o,[{key:"render",value:function(){var e={};return this.props.onSwatchHover&&(e.onSwatchHover=this.handleSwatchHover),n().createElement(t,q({},this.props,this.state,{onChange:this.handleChange},e))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return q({},U(e.color,t.oldHue))}}]),o}(e.PureComponent||e.Component);return o.propTypes=q({},t.propTypes),o.defaultProps=q({},t.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),o};var K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Y=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();function Z(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e};const ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(o){function a(){var e,t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var o=arguments.length,r=Array(o),i=0;i<o;i++)r[i]=arguments[i];return t=n=Z(this,(e=a.__proto__||Object.getPrototypeOf(a)).call.apply(e,[this].concat(r))),n.state={focus:!1},n.handleFocus=function(){return n.setState({focus:!0})},n.handleBlur=function(){return n.setState({focus:!1})},Z(n,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,o),Y(a,[{key:"render",value:function(){return n().createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},n().createElement(e,K({},this.props,this.state)))}}]),a}(n().Component)}((function(e){var t=e.color,a=e.style,r=e.onClick,i=void 0===r?function(){}:r,l=e.onHover,s=e.title,c=void 0===s?t:s,d=e.children,p=e.focus,h=e.focusStyle,m=void 0===h?{}:h,f="transparent"===t,b=(0,o.default)({default:{swatch:Q({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},a,p?m:{})}}),g={};return l&&(g.onMouseOver=function(e){return l(t,e)}),n().createElement("div",Q({style:b.swatch,onClick:function(e){return i(t,e)},title:c,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&i(t,e)}},g),d,f&&n().createElement(u,{borderRadius:b.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))}));var te=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ne=function(e){var t=e.rgb,a=e.hsl,r=e.width,i=e.height,l=e.onChange,s=e.direction,c=e.style,u=e.renderers,d=e.pointer,p=e.className,h=void 0===p?"":p,m=(0,o.default)({default:{picker:{position:"relative",width:r,height:i},alpha:{radius:"2px",style:c}}});return n().createElement("div",{style:m.picker,className:"alpha-picker "+h},n().createElement(f,te({},m.alpha,{rgb:t,hsl:a,pointer:d,renderers:u,onChange:l,direction:s})))};ne.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:function(e){var t=e.direction,a=(0,o.default)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return n().createElement("div",{style:a.picker})}},J(ne);var oe=a(5378),ae=a.n(oe);const re=function(e){var t=e.colors,a=e.onClick,r=e.onSwatchHover,i=(0,o.default)({default:{swatches:{marginRight:"-10px"},swatch:{width:"22px",height:"22px",float:"left",marginRight:"10px",marginBottom:"10px",borderRadius:"4px"},clear:{clear:"both"}}});return n().createElement("div",{style:i.swatches},ae()(t,(function(e){return n().createElement(ee,{key:e,color:e,style:i.swatch,onClick:a,onHover:r,focusStyle:{boxShadow:"0 0 4px "+e}})})),n().createElement("div",{style:i.clear}))};var ie=function(e){var t=e.onChange,a=e.onSwatchHover,r=e.hex,i=e.colors,l=e.width,s=e.triangle,c=e.styles,d=void 0===c?{}:c,p=e.className,h=void 0===p?"":p,m="transparent"===r,f=function(e,n){W(e)&&t({hex:e,source:"hex"},n)},b=(0,o.default)(O()({default:{card:{width:l,background:"#fff",boxShadow:"0 1px rgba(0,0,0,.1)",borderRadius:"6px",position:"relative"},head:{height:"110px",background:r,borderRadius:"6px 6px 0 0",display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},body:{padding:"10px"},label:{fontSize:"18px",color:G(r),position:"relative"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 10px 10px 10px",borderColor:"transparent transparent "+r+" transparent",position:"absolute",top:"-10px",left:"50%",marginLeft:"-10px"},input:{width:"100%",fontSize:"12px",color:"#666",border:"0px",outline:"none",height:"22px",boxShadow:"inset 0 0 0 1px #ddd",borderRadius:"4px",padding:"0 7px",boxSizing:"border-box"}},"hide-triangle":{triangle:{display:"none"}}},d),{"hide-triangle":"hide"===s});return n().createElement("div",{style:b.card,className:"block-picker "+h},n().createElement("div",{style:b.triangle}),n().createElement("div",{style:b.head},m&&n().createElement(u,{borderRadius:"6px 6px 0 0"}),n().createElement("div",{style:b.label},r)),n().createElement("div",{style:b.body},n().createElement(re,{colors:i,onClick:f,onSwatchHover:a}),n().createElement(y,{style:{input:b.input},value:r,onChange:f})))};ie.propTypes={width:S().oneOfType([S().string,S().number]),colors:S().arrayOf(S().string),triangle:S().oneOf(["top","hide"]),styles:S().object},ie.defaultProps={width:170,colors:["#D9E3F0","#F47373","#697689","#37D67A","#2CCCE4","#555555","#dce775","#ff8a65","#ba68c8"],triangle:"top",styles:{}},J(ie);var le="#ffcdd2",se="#e57373",ce="#f44336",ue="#d32f2f",de="#b71c1c",pe="#f8bbd0",he="#f06292",me="#e91e63",fe="#c2185b",be="#880e4f",ge="#e1bee7",ve="#ba68c8",ke="#9c27b0",ye="#7b1fa2",Ee="#4a148c",xe="#d1c4e9",_e="#9575cd",we="#673ab7",Ce="#512da8",Se="#311b92",Ne="#c5cae9",Oe="#7986cb",Te="#3f51b5",Me="#303f9f",Ae="#1a237e",De="#bbdefb",Re="#64b5f6",Ie="#2196f3",Pe="#1976d2",Fe="#0d47a1",Le="#b3e5fc",Be="#4fc3f7",Ve="#03a9f4",ze="#0288d1",je="#01579b",He="#b2ebf2",Ue="#4dd0e1",We="#00bcd4",Ge="#0097a7",$e="#006064",qe="#b2dfdb",Xe="#4db6ac",Je="#009688",Ke="#00796b",Ye="#004d40",Ze="#c8e6c9",Qe="#81c784",et="#4caf50",tt="#388e3c",nt="#dcedc8",ot="#aed581",at="#8bc34a",rt="#689f38",it="#33691e",lt="#f0f4c3",st="#dce775",ct="#cddc39",ut="#afb42b",dt="#827717",pt="#fff9c4",ht="#fff176",mt="#ffeb3b",ft="#fbc02d",bt="#f57f17",gt="#ffecb3",vt="#ffd54f",kt="#ffc107",yt="#ffa000",Et="#ff6f00",xt="#ffe0b2",_t="#ffb74d",wt="#ff9800",Ct="#f57c00",St="#e65100",Nt="#ffccbc",Ot="#ff8a65",Tt="#ff5722",Mt="#e64a19",At="#bf360c",Dt="#d7ccc8",Rt="#a1887f",It="#795548",Pt="#5d4037",Ft="#3e2723",Lt="#cfd8dc",Bt="#90a4ae",Vt="#607d8b",zt="#455a64",jt="#263238",Ht=function(e){var t=e.color,a=e.onClick,r=e.onSwatchHover,i=e.hover,l=e.active,s=e.circleSize,c=e.circleSpacing,u=(0,o.default)({default:{swatch:{width:s,height:s,marginRight:c,marginBottom:c,transform:"scale(1)",transition:"100ms transform ease"},Swatch:{borderRadius:"50%",background:"transparent",boxShadow:"inset 0 0 0 "+(s/2+1)+"px "+t,transition:"100ms box-shadow ease"}},hover:{swatch:{transform:"scale(1.2)"}},active:{Swatch:{boxShadow:"inset 0 0 0 3px "+t}}},{hover:i,active:l});return n().createElement("div",{style:u.swatch},n().createElement(ee,{style:u.Swatch,color:t,onClick:a,onHover:r,focusStyle:{boxShadow:u.Swatch.boxShadow+", 0 0 5px "+t}}))};Ht.defaultProps={circleSize:28,circleSpacing:14};const Ut=(0,o.handleHover)(Ht);var Wt=function(e){var t=e.width,a=e.onChange,r=e.onSwatchHover,i=e.colors,l=e.hex,s=e.circleSize,c=e.styles,u=void 0===c?{}:c,d=e.circleSpacing,p=e.className,h=void 0===p?"":p,m=(0,o.default)(O()({default:{card:{width:t,display:"flex",flexWrap:"wrap",marginRight:-d,marginBottom:-d}}},u)),f=function(e,t){return a({hex:e,source:"hex"},t)};return n().createElement("div",{style:m.card,className:"circle-picker "+h},ae()(i,(function(e){return n().createElement(Ut,{key:e,color:e,onClick:f,onSwatchHover:r,active:l===e.toLowerCase(),circleSize:s,circleSpacing:d})})))};Wt.propTypes={width:S().oneOfType([S().string,S().number]),circleSize:S().number,circleSpacing:S().number,styles:S().object},Wt.defaultProps={width:252,circleSize:28,circleSpacing:14,colors:[ce,me,ke,we,Te,Ie,Ve,We,Je,et,at,ct,mt,kt,wt,Tt,It,Vt],styles:{}},J(Wt);var Gt=a(2216),$t=a.n(Gt),qt=a(4657),Xt=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),Jt=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.toggleViews=function(){"hex"===n.state.view?n.setState({view:"rgb"}):"rgb"===n.state.view?n.setState({view:"hsl"}):"hsl"===n.state.view&&(1===n.props.hsl.a?n.setState({view:"hex"}):n.setState({view:"rgb"}))},n.handleChange=function(e,t){e.hex?W(e.hex)&&n.props.onChange({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?n.props.onChange({r:e.r||n.props.rgb.r,g:e.g||n.props.rgb.g,b:e.b||n.props.rgb.b,source:"rgb"},t):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number($t()(e.s)?n.props.hsl.s:e.s),l:Number($t()(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Xt(t,[{key:"render",value:function(){var e=this,t=(0,o.default)({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),a=void 0;return"hex"===this.state.view?a=n().createElement("div",{style:t.fields,className:"flexbox-fix"},n().createElement("div",{style:t.field},n().createElement(y,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?a=n().createElement("div",{style:t.fields,className:"flexbox-fix"},n().createElement("div",{style:t.field},n().createElement(y,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),n().createElement("div",{style:t.field},n().createElement(y,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),n().createElement("div",{style:t.field},n().createElement(y,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),n().createElement("div",{style:t.alpha},n().createElement(y,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(a=n().createElement("div",{style:t.fields,className:"flexbox-fix"},n().createElement("div",{style:t.field},n().createElement(y,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),n().createElement("div",{style:t.field},n().createElement(y,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),n().createElement("div",{style:t.field},n().createElement(y,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),n().createElement("div",{style:t.alpha},n().createElement(y,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),n().createElement("div",{style:t.wrap,className:"flexbox-fix"},a,n().createElement("div",{style:t.toggle},n().createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},n().createElement(qt.A,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(n().Component);Jt.defaultProps={view:"hex"};const Kt=Jt,Yt=function(){var e=(0,o.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return n().createElement("div",{style:e.picker})},Zt=function(){var e=(0,o.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return n().createElement("div",{style:e.picker})};var Qt=function(e){var t=e.width,a=e.onChange,r=e.disableAlpha,i=e.rgb,l=e.hsl,s=e.hsv,c=e.hex,d=e.renderers,p=e.styles,h=void 0===p?{}:p,m=e.className,b=void 0===m?"":m,g=e.defaultView,v=(0,o.default)(O()({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},h),{disableAlpha:r});return n().createElement("div",{style:v.picker,className:"chrome-picker "+b},n().createElement("div",{style:v.saturation},n().createElement(P,{style:v.Saturation,hsl:l,hsv:s,pointer:Zt,onChange:a})),n().createElement("div",{style:v.body},n().createElement("div",{style:v.controls,className:"flexbox-fix"},n().createElement("div",{style:v.color},n().createElement("div",{style:v.swatch},n().createElement("div",{style:v.active}),n().createElement(u,{renderers:d}))),n().createElement("div",{style:v.toggles},n().createElement("div",{style:v.hue},n().createElement(w,{style:v.Hue,hsl:l,pointer:Yt,onChange:a})),n().createElement("div",{style:v.alpha},n().createElement(f,{style:v.Alpha,rgb:i,hsl:l,pointer:Yt,renderers:d,onChange:a})))),n().createElement(Kt,{rgb:i,hsl:l,hex:c,view:g,onChange:a,disableAlpha:r})))};Qt.propTypes={width:S().oneOfType([S().string,S().number]),disableAlpha:S().bool,styles:S().object,defaultView:S().oneOf(["hex","rgb","hsl"])},Qt.defaultProps={width:225,disableAlpha:!1,styles:{}},J(Qt);const en=function(e){var t=e.color,a=e.onClick,r=void 0===a?function(){}:a,i=e.onSwatchHover,l=e.active,s=(0,o.default)({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:G(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:l,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return n().createElement(ee,{style:s.color,color:t,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},n().createElement("div",{style:s.dot}))},tn=function(e){var t=e.hex,a=e.rgb,r=e.onChange,i=(0,o.default)({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),l=function(e,t){e.r||e.g||e.b?r({r:e.r||a.r,g:e.g||a.g,b:e.b||a.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return n().createElement("div",{style:i.fields,className:"flexbox-fix"},n().createElement("div",{style:i.active}),n().createElement(y,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:t,onChange:l}),n().createElement(y,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:a.r,onChange:l}),n().createElement(y,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:a.g,onChange:l}),n().createElement(y,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:a.b,onChange:l}))};var nn=function(e){var t=e.onChange,a=e.onSwatchHover,r=e.colors,i=e.hex,l=e.rgb,s=e.styles,c=void 0===s?{}:s,u=e.className,d=void 0===u?"":u,p=(0,o.default)(O()({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},c)),h=function(e,n){e.hex?W(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return n().createElement(M,{style:p.Compact,styles:c},n().createElement("div",{style:p.compact,className:"compact-picker "+d},n().createElement("div",null,ae()(r,(function(e){return n().createElement(en,{key:e,color:e,active:e.toLowerCase()===i,onClick:h,onSwatchHover:a})})),n().createElement("div",{style:p.clear})),n().createElement(tn,{hex:i,rgb:l,onChange:h})))};nn.propTypes={colors:S().arrayOf(S().string),styles:S().object},nn.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},J(nn);const on=(0,o.handleHover)((function(e){var t=e.hover,a=e.color,r=e.onClick,i=e.onSwatchHover,l={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},s=(0,o.default)({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:l}},{hover:t});return n().createElement("div",{style:s.swatch},n().createElement(ee,{color:a,onClick:r,onHover:i,focusStyle:l}))}));var an=function(e){var t=e.width,a=e.colors,r=e.onChange,i=e.onSwatchHover,l=e.triangle,s=e.styles,c=void 0===s?{}:s,u=e.className,d=void 0===u?"":u,p=(0,o.default)(O()({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},c),{"hide-triangle":"hide"===l,"top-left-triangle":"top-left"===l,"top-right-triangle":"top-right"===l,"bottom-left-triangle":"bottom-left"===l,"bottom-right-triangle":"bottom-right"===l}),h=function(e,t){return r({hex:e,source:"hex"},t)};return n().createElement("div",{style:p.card,className:"github-picker "+d},n().createElement("div",{style:p.triangleShadow}),n().createElement("div",{style:p.triangle}),ae()(a,(function(e){return n().createElement(on,{color:e,key:e,onClick:h,onSwatchHover:i})})))};an.propTypes={width:S().oneOfType([S().string,S().number]),colors:S().arrayOf(S().string),triangle:S().oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:S().object},an.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},J(an);var rn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},ln=function(e){var t=e.width,a=e.height,r=e.onChange,i=e.hsl,l=e.direction,s=e.pointer,c=e.styles,u=void 0===c?{}:c,d=e.className,p=void 0===d?"":d,h=(0,o.default)(O()({default:{picker:{position:"relative",width:t,height:a},hue:{radius:"2px"}}},u));return n().createElement("div",{style:h.picker,className:"hue-picker "+p},n().createElement(w,rn({},h.hue,{hsl:i,pointer:s,onChange:function(e){return r({a:1,h:e.h,l:.5,s:1})},direction:l})))};ln.propTypes={styles:S().object},ln.defaultProps={width:"316px",height:"16px",direction:"horizontal",pointer:function(e){var t=e.direction,a=(0,o.default)({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return n().createElement("div",{style:a.picker})},styles:{}},J(ln),J((function(e){var t=e.onChange,a=e.hex,r=e.rgb,i=e.styles,l=void 0===i?{}:i,s=e.className,c=void 0===s?"":s,u=(0,o.default)(O()({default:{material:{width:"98px",height:"98px",padding:"16px",fontFamily:"Roboto"},HEXwrap:{position:"relative"},HEXinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"2px solid "+a,outline:"none",height:"30px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},Hex:{style:{}},RGBwrap:{position:"relative"},RGBinput:{width:"100%",marginTop:"12px",fontSize:"15px",color:"#333",padding:"0px",border:"0px",borderBottom:"1px solid #eee",outline:"none",height:"30px"},RGBlabel:{position:"absolute",top:"0px",left:"0px",fontSize:"11px",color:"#999999",textTransform:"capitalize"},split:{display:"flex",marginRight:"-10px",paddingTop:"11px"},third:{flex:"1",paddingRight:"10px"}}},l)),d=function(e,n){e.hex?W(e.hex)&&t({hex:e.hex,source:"hex"},n):(e.r||e.g||e.b)&&t({r:e.r||r.r,g:e.g||r.g,b:e.b||r.b,source:"rgb"},n)};return n().createElement(M,{styles:l},n().createElement("div",{style:u.material,className:"material-picker "+c},n().createElement(y,{style:{wrap:u.HEXwrap,input:u.HEXinput,label:u.HEXlabel},label:"hex",value:a,onChange:d}),n().createElement("div",{style:u.split,className:"flexbox-fix"},n().createElement("div",{style:u.third},n().createElement(y,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"r",value:r.r,onChange:d})),n().createElement("div",{style:u.third},n().createElement(y,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"g",value:r.g,onChange:d})),n().createElement("div",{style:u.third},n().createElement(y,{style:{wrap:u.RGBwrap,input:u.RGBinput,label:u.RGBlabel},label:"b",value:r.b,onChange:d})))))}));const sn=function(e){var t=e.onChange,a=e.rgb,r=e.hsv,i=e.hex,l=(0,o.default)({default:{fields:{paddingTop:"5px",paddingBottom:"9px",width:"80px",position:"relative"},divider:{height:"5px"},RGBwrap:{position:"relative"},RGBinput:{marginLeft:"40%",width:"40%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"5px",fontSize:"13px",paddingLeft:"3px",marginRight:"10px"},RGBlabel:{left:"0px",top:"0px",width:"34px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px",position:"absolute"},HEXwrap:{position:"relative"},HEXinput:{marginLeft:"20%",width:"80%",height:"18px",border:"1px solid #888888",boxShadow:"inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC",marginBottom:"6px",fontSize:"13px",paddingLeft:"3px"},HEXlabel:{position:"absolute",top:"0px",left:"0px",width:"14px",textTransform:"uppercase",fontSize:"13px",height:"18px",lineHeight:"22px"},fieldSymbols:{position:"absolute",top:"5px",right:"-7px",fontSize:"13px"},symbol:{height:"20px",lineHeight:"22px",paddingBottom:"7px"}}}),s=function(e,n){e["#"]?W(e["#"])&&t({hex:e["#"],source:"hex"},n):e.r||e.g||e.b?t({r:e.r||a.r,g:e.g||a.g,b:e.b||a.b,source:"rgb"},n):(e.h||e.s||e.v)&&t({h:e.h||r.h,s:e.s||r.s,v:e.v||r.v,source:"hsv"},n)};return n().createElement("div",{style:l.fields},n().createElement(y,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"h",value:Math.round(r.h),onChange:s}),n().createElement(y,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"s",value:Math.round(100*r.s),onChange:s}),n().createElement(y,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"v",value:Math.round(100*r.v),onChange:s}),n().createElement("div",{style:l.divider}),n().createElement(y,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"r",value:a.r,onChange:s}),n().createElement(y,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"g",value:a.g,onChange:s}),n().createElement(y,{style:{wrap:l.RGBwrap,input:l.RGBinput,label:l.RGBlabel},label:"b",value:a.b,onChange:s}),n().createElement("div",{style:l.divider}),n().createElement(y,{style:{wrap:l.HEXwrap,input:l.HEXinput,label:l.HEXlabel},label:"#",value:i.replace("#",""),onChange:s}),n().createElement("div",{style:l.fieldSymbols},n().createElement("div",{style:l.symbol},"°"),n().createElement("div",{style:l.symbol},"%"),n().createElement("div",{style:l.symbol},"%")))},cn=function(e){var t=e.hsl,a=(0,o.default)({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}},"black-outline":{picker:{boxShadow:"inset 0 0 0 1px #000"}}},{"black-outline":t.l>.5});return n().createElement("div",{style:a.picker})},un=function(){var e=(0,o.default)({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return n().createElement("div",{style:e.pointer},n().createElement("div",{style:e.left},n().createElement("div",{style:e.leftInside})),n().createElement("div",{style:e.right},n().createElement("div",{style:e.rightInside})))},dn=function(e){var t=e.onClick,a=e.label,r=e.children,i=e.active,l=(0,o.default)({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return n().createElement("div",{style:l.button,onClick:t},a||r)},pn=function(e){var t=e.rgb,a=e.currentColor,r=(0,o.default)({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:a,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return n().createElement("div",null,n().createElement("div",{style:r.label},"new"),n().createElement("div",{style:r.swatches},n().createElement("div",{style:r.new}),n().createElement("div",{style:r.current})),n().createElement("div",{style:r.label},"current"))};var hn=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),mn=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.state={currentColor:e.hex},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),hn(t,[{key:"render",value:function(){var e=this.props,t=e.styles,a=void 0===t?{}:t,r=e.className,i=void 0===r?"":r,l=(0,o.default)(O()({default:{picker:{background:"#DCDCDC",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)",boxSizing:"initial",width:"513px"},head:{backgroundImage:"linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)",borderBottom:"1px solid #B1B1B1",boxShadow:"inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)",height:"23px",lineHeight:"24px",borderRadius:"4px 4px 0 0",fontSize:"13px",color:"#4D4D4D",textAlign:"center"},body:{padding:"15px 15px 0",display:"flex"},saturation:{width:"256px",height:"256px",position:"relative",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0",overflow:"hidden"},hue:{position:"relative",height:"256px",width:"19px",marginLeft:"10px",border:"2px solid #B3B3B3",borderBottom:"2px solid #F0F0F0"},controls:{width:"180px",marginLeft:"10px"},top:{display:"flex"},previews:{width:"60px"},actions:{flex:"1",marginLeft:"20px"}}},a));return n().createElement("div",{style:l.picker,className:"photoshop-picker "+i},n().createElement("div",{style:l.head},this.props.header),n().createElement("div",{style:l.body,className:"flexbox-fix"},n().createElement("div",{style:l.saturation},n().createElement(P,{hsl:this.props.hsl,hsv:this.props.hsv,pointer:cn,onChange:this.props.onChange})),n().createElement("div",{style:l.hue},n().createElement(w,{direction:"vertical",hsl:this.props.hsl,pointer:un,onChange:this.props.onChange})),n().createElement("div",{style:l.controls},n().createElement("div",{style:l.top,className:"flexbox-fix"},n().createElement("div",{style:l.previews},n().createElement(pn,{rgb:this.props.rgb,currentColor:this.state.currentColor})),n().createElement("div",{style:l.actions},n().createElement(dn,{label:"OK",onClick:this.props.onAccept,active:!0}),n().createElement(dn,{label:"Cancel",onClick:this.props.onCancel}),n().createElement(sn,{onChange:this.props.onChange,rgb:this.props.rgb,hsv:this.props.hsv,hex:this.props.hex}))))))}}]),t}(n().Component);mn.propTypes={header:S().string,styles:S().object},mn.defaultProps={header:"Color Picker",styles:{}},J(mn);const fn=function(e){var t=e.onChange,a=e.rgb,r=e.hsl,i=e.hex,l=e.disableAlpha,s=(0,o.default)({default:{fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"80%",padding:"4px 10% 3px",border:"none",boxShadow:"inset 0 0 0 1px #ccc",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"}},disableAlpha:{alpha:{display:"none"}}},{disableAlpha:l}),c=function(e,n){e.hex?W(e.hex)&&t({hex:e.hex,source:"hex"},n):e.r||e.g||e.b?t({r:e.r||a.r,g:e.g||a.g,b:e.b||a.b,a:a.a,source:"rgb"},n):e.a&&(e.a<0?e.a=0:e.a>100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},n))};return n().createElement("div",{style:s.fields,className:"flexbox-fix"},n().createElement("div",{style:s.double},n().createElement(y,{style:{input:s.input,label:s.label},label:"hex",value:i.replace("#",""),onChange:c})),n().createElement("div",{style:s.single},n().createElement(y,{style:{input:s.input,label:s.label},label:"r",value:a.r,onChange:c,dragLabel:"true",dragMax:"255"})),n().createElement("div",{style:s.single},n().createElement(y,{style:{input:s.input,label:s.label},label:"g",value:a.g,onChange:c,dragLabel:"true",dragMax:"255"})),n().createElement("div",{style:s.single},n().createElement(y,{style:{input:s.input,label:s.label},label:"b",value:a.b,onChange:c,dragLabel:"true",dragMax:"255"})),n().createElement("div",{style:s.alpha},n().createElement(y,{style:{input:s.input,label:s.label},label:"a",value:Math.round(100*a.a),onChange:c,dragLabel:"true",dragMax:"100"})))};var bn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},gn=function(e){var t=e.colors,a=e.onClick,r=void 0===a?function(){}:a,i=e.onSwatchHover,l=(0,o.default)({default:{colors:{margin:"0 -10px",padding:"10px 0 0 10px",borderTop:"1px solid #eee",display:"flex",flexWrap:"wrap",position:"relative"},swatchWrap:{width:"16px",height:"16px",margin:"0 10px 10px 0"},swatch:{borderRadius:"3px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15)"}},"no-presets":{colors:{display:"none"}}},{"no-presets":!t||!t.length}),s=function(e,t){r({hex:e,source:"hex"},t)};return n().createElement("div",{style:l.colors,className:"flexbox-fix"},t.map((function(e){var t="string"==typeof e?{color:e}:e,o=""+t.color+(t.title||"");return n().createElement("div",{key:o,style:l.swatchWrap},n().createElement(ee,bn({},t,{style:l.swatch,onClick:s,onHover:i,focusStyle:{boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px "+t.color}})))})))};gn.propTypes={colors:S().arrayOf(S().oneOfType([S().string,S().shape({color:S().string,title:S().string})])).isRequired};const vn=gn;var kn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},yn=function(e){var t=e.width,a=e.rgb,r=e.hex,i=e.hsv,l=e.hsl,s=e.onChange,c=e.onSwatchHover,d=e.disableAlpha,p=e.presetColors,h=e.renderers,m=e.styles,b=void 0===m?{}:m,g=e.className,v=void 0===g?"":g,k=(0,o.default)(O()({default:kn({picker:{width:t,padding:"10px 10px 0",boxSizing:"initial",background:"#fff",borderRadius:"4px",boxShadow:"0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)"},saturation:{width:"100%",paddingBottom:"75%",position:"relative",overflow:"hidden"},Saturation:{radius:"3px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},controls:{display:"flex"},sliders:{padding:"4px 0",flex:"1"},color:{width:"24px",height:"24px",position:"relative",marginTop:"4px",marginLeft:"4px",borderRadius:"3px"},activeColor:{absolute:"0px 0px 0px 0px",borderRadius:"2px",background:"rgba("+a.r+","+a.g+","+a.b+","+a.a+")",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},hue:{position:"relative",height:"10px",overflow:"hidden"},Hue:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"},alpha:{position:"relative",height:"10px",marginTop:"4px",overflow:"hidden"},Alpha:{radius:"2px",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}},b),disableAlpha:{color:{height:"10px"},hue:{height:"10px"},alpha:{display:"none"}}},b),{disableAlpha:d});return n().createElement("div",{style:k.picker,className:"sketch-picker "+v},n().createElement("div",{style:k.saturation},n().createElement(P,{style:k.Saturation,hsl:l,hsv:i,onChange:s})),n().createElement("div",{style:k.controls,className:"flexbox-fix"},n().createElement("div",{style:k.sliders},n().createElement("div",{style:k.hue},n().createElement(w,{style:k.Hue,hsl:l,onChange:s})),n().createElement("div",{style:k.alpha},n().createElement(f,{style:k.Alpha,rgb:a,hsl:l,renderers:h,onChange:s}))),n().createElement("div",{style:k.color},n().createElement(u,null),n().createElement("div",{style:k.activeColor}))),n().createElement(fn,{rgb:a,hsl:l,hex:r,onChange:s,disableAlpha:d}),n().createElement(vn,{colors:p,onClick:s,onSwatchHover:c}))};yn.propTypes={disableAlpha:S().bool,width:S().oneOfType([S().string,S().number]),styles:S().object},yn.defaultProps={disableAlpha:!1,width:200,styles:{},presetColors:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},J(yn);const En=function(e){var t=e.hsl,a=e.offset,r=e.onClick,i=void 0===r?function(){}:r,l=e.active,s=e.first,c=e.last,u=(0,o.default)({default:{swatch:{height:"12px",background:"hsl("+t.h+", 50%, "+100*a+"%)",cursor:"pointer"}},first:{swatch:{borderRadius:"2px 0 0 2px"}},last:{swatch:{borderRadius:"0 2px 2px 0"}},active:{swatch:{transform:"scaleY(1.8)",borderRadius:"3.6px/2px"}}},{active:l,first:s,last:c});return n().createElement("div",{style:u.swatch,onClick:function(e){return i({h:t.h,s:.5,l:a,source:"hsl"},e)}})},xn=function(e){var t=e.onClick,a=e.hsl,r=(0,o.default)({default:{swatches:{marginTop:"20px"},swatch:{boxSizing:"border-box",width:"20%",paddingRight:"1px",float:"left"},clear:{clear:"both"}}}),i=.1;return n().createElement("div",{style:r.swatches},n().createElement("div",{style:r.swatch},n().createElement(En,{hsl:a,offset:".80",active:Math.abs(a.l-.8)<i&&Math.abs(a.s-.5)<i,onClick:t,first:!0})),n().createElement("div",{style:r.swatch},n().createElement(En,{hsl:a,offset:".65",active:Math.abs(a.l-.65)<i&&Math.abs(a.s-.5)<i,onClick:t})),n().createElement("div",{style:r.swatch},n().createElement(En,{hsl:a,offset:".50",active:Math.abs(a.l-.5)<i&&Math.abs(a.s-.5)<i,onClick:t})),n().createElement("div",{style:r.swatch},n().createElement(En,{hsl:a,offset:".35",active:Math.abs(a.l-.35)<i&&Math.abs(a.s-.5)<i,onClick:t})),n().createElement("div",{style:r.swatch},n().createElement(En,{hsl:a,offset:".20",active:Math.abs(a.l-.2)<i&&Math.abs(a.s-.5)<i,onClick:t,last:!0})),n().createElement("div",{style:r.clear}))};var wn=function(e){var t=e.hsl,a=e.onChange,r=e.pointer,i=e.styles,l=void 0===i?{}:i,s=e.className,c=void 0===s?"":s,u=(0,o.default)(O()({default:{hue:{height:"12px",position:"relative"},Hue:{radius:"2px"}}},l));return n().createElement("div",{style:u.wrap||{},className:"slider-picker "+c},n().createElement("div",{style:u.hue},n().createElement(w,{style:u.Hue,hsl:t,pointer:r,onChange:a})),n().createElement("div",{style:u.swatches},n().createElement(xn,{hsl:t,onClick:a})))};wn.propTypes={styles:S().object},wn.defaultProps={pointer:function(){var e=(0,o.default)({default:{picker:{width:"14px",height:"14px",borderRadius:"6px",transform:"translate(-7px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return n().createElement("div",{style:e.picker})},styles:{}},J(wn);var Cn=a(748);const Sn=function(e){var t=e.color,a=e.onClick,r=void 0===a?function(){}:a,i=e.onSwatchHover,l=e.first,s=e.last,c=e.active,u=(0,o.default)({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:G(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:l,last:s,active:c,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return n().createElement(ee,{color:t,style:u.color,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},n().createElement("div",{style:u.check},n().createElement(Cn.A,null)))},Nn=function(e){var t=e.onClick,a=e.onSwatchHover,r=e.group,i=e.active,l=(0,o.default)({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return n().createElement("div",{style:l.group},ae()(r,(function(e,o){return n().createElement(Sn,{key:e,color:e,active:e.toLowerCase()===i,first:0===o,last:o===r.length-1,onClick:t,onSwatchHover:a})})))};var On=function(e){var t=e.width,a=e.height,r=e.onChange,i=e.onSwatchHover,l=e.colors,s=e.hex,c=e.styles,u=void 0===c?{}:c,d=e.className,p=void 0===d?"":d,h=(0,o.default)(O()({default:{picker:{width:t,height:a},overflow:{height:a,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},u)),m=function(e,t){return r({hex:e,source:"hex"},t)};return n().createElement("div",{style:h.picker,className:"swatches-picker "+p},n().createElement(M,null,n().createElement("div",{style:h.overflow},n().createElement("div",{style:h.body},ae()(l,(function(e){return n().createElement(Nn,{key:e.toString(),group:e,active:s,onClick:m,onSwatchHover:i})})),n().createElement("div",{style:h.clear})))))};On.propTypes={width:S().oneOfType([S().string,S().number]),height:S().oneOfType([S().string,S().number]),colors:S().arrayOf(S().arrayOf(S().string)),styles:S().object},On.defaultProps={width:320,height:240,colors:[[de,ue,ce,se,le],[be,fe,me,he,pe],[Ee,ye,ke,ve,ge],[Se,Ce,we,_e,xe],[Ae,Me,Te,Oe,Ne],[Fe,Pe,Ie,Re,De],[je,ze,Ve,Be,Le],[$e,Ge,We,Ue,He],[Ye,Ke,Je,Xe,qe],["#194D33",tt,et,Qe,Ze],[it,rt,at,ot,nt],[dt,ut,ct,st,lt],[bt,ft,mt,ht,pt],[Et,yt,kt,vt,gt],[St,Ct,wt,_t,xt],[At,Mt,Tt,Ot,Nt],[Ft,Pt,It,Rt,Dt],[jt,zt,Vt,Bt,Lt],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}},J(On);var Tn=function(e){var t=e.onChange,a=e.onSwatchHover,r=e.hex,i=e.colors,l=e.width,s=e.triangle,c=e.styles,u=void 0===c?{}:c,d=e.className,p=void 0===d?"":d,h=(0,o.default)(O()({default:{card:{width:l,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},u),{"hide-triangle":"hide"===s,"top-left-triangle":"top-left"===s,"top-right-triangle":"top-right"===s}),m=function(e,n){W(e)&&t({hex:e,source:"hex"},n)};return n().createElement("div",{style:h.card,className:"twitter-picker "+p},n().createElement("div",{style:h.triangleShadow}),n().createElement("div",{style:h.triangle}),n().createElement("div",{style:h.body},ae()(i,(function(e,t){return n().createElement(ee,{key:t,color:e,hex:e,style:h.swatch,onClick:m,onHover:a,focusStyle:{boxShadow:"0 0 4px "+e}})})),n().createElement("div",{style:h.hash},"#"),n().createElement(y,{label:null,style:{input:h.input},value:r.replace("#",""),onChange:m}),n().createElement("div",{style:h.clear})))};Tn.propTypes={width:S().oneOfType([S().string,S().number]),triangle:S().oneOf(["hide","top-left","top-right"]),colors:S().arrayOf(S().string),styles:S().object},Tn.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},J(Tn);var Mn=function(e){var t=(0,o.default)({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(100*e.hsl.s)+"%, "+Math.round(100*e.hsl.l)+"%)"}}});return n().createElement("div",{style:t.picker})};Mn.propTypes={hsl:S().shape({h:S().number,s:S().number,l:S().number,a:S().number})},Mn.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};const An=Mn;var Dn=function(e){var t=(0,o.default)({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return n().createElement("div",{style:t.picker})};Dn.propTypes={hsl:S().shape({h:S().number,s:S().number,l:S().number,a:S().number})},Dn.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};const Rn=Dn,In=function(e){var t=e.onChange,a=e.rgb,r=e.hsl,i=e.hex,l=e.hsv,s=function(e,n){if(e.hex)W(e.hex)&&t({hex:e.hex,source:"hex"},n);else if(e.rgb){var o=e.rgb.split(",");$(e.rgb,"rgb")&&t({r:o[0],g:o[1],b:o[2],a:1,source:"rgb"},n)}else if(e.hsv){var a=e.hsv.split(",");$(e.hsv,"hsv")&&(a[2]=a[2].replace("%",""),a[1]=a[1].replace("%",""),a[0]=a[0].replace("°",""),1==a[1]?a[1]=.01:1==a[2]&&(a[2]=.01),t({h:Number(a[0]),s:Number(a[1]),v:Number(a[2]),source:"hsv"},n))}else if(e.hsl){var r=e.hsl.split(",");$(e.hsl,"hsl")&&(r[2]=r[2].replace("%",""),r[1]=r[1].replace("%",""),r[0]=r[0].replace("°",""),1==p[1]?p[1]=.01:1==p[2]&&(p[2]=.01),t({h:Number(r[0]),s:Number(r[1]),v:Number(r[2]),source:"hsl"},n))}},c=(0,o.default)({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),u=a.r+", "+a.g+", "+a.b,d=Math.round(r.h)+"°, "+Math.round(100*r.s)+"%, "+Math.round(100*r.l)+"%",p=Math.round(l.h)+"°, "+Math.round(100*l.s)+"%, "+Math.round(100*l.v)+"%";return n().createElement("div",{style:c.wrap,className:"flexbox-fix"},n().createElement("div",{style:c.fields},n().createElement("div",{style:c.double},n().createElement(y,{style:{input:c.input,label:c.label},label:"hex",value:i,onChange:s})),n().createElement("div",{style:c.column},n().createElement("div",{style:c.single},n().createElement(y,{style:{input:c.input2,label:c.label2},label:"rgb",value:u,onChange:s})),n().createElement("div",{style:c.single},n().createElement(y,{style:{input:c.input2,label:c.label2},label:"hsv",value:p,onChange:s})),n().createElement("div",{style:c.single},n().createElement(y,{style:{input:c.input2,label:c.label2},label:"hsl",value:d,onChange:s})))))};var Pn=function(e){var t=e.width,a=e.onChange,r=e.rgb,i=e.hsl,l=e.hsv,s=e.hex,c=e.header,u=e.styles,d=void 0===u?{}:u,p=e.className,h=void 0===p?"":p,m=(0,o.default)(O()({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},d));return n().createElement("div",{style:m.picker,className:"google-picker "+h},n().createElement("div",{style:m.head},c),n().createElement("div",{style:m.swatch}),n().createElement("div",{style:m.saturation},n().createElement(P,{hsl:i,hsv:l,pointer:An,onChange:a})),n().createElement("div",{style:m.body},n().createElement("div",{style:m.controls,className:"flexbox-fix"},n().createElement("div",{style:m.hue},n().createElement(w,{style:m.Hue,hsl:i,radius:"4px",pointer:Rn,onChange:a}))),n().createElement(In,{rgb:r,hsl:i,hex:s,hsv:l,onChange:a})))};Pn.propTypes={width:S().oneOfType([S().string,S().number]),styles:S().object,header:S().string},Pn.defaultProps={width:652,styles:{},header:"Color picker"},J(Pn);var Fn=a(2825),Ln=a(6617),Bn=a(9537),Vn=a(6195);const zn=window.wp.element,jn=window.wp.components;class Hn extends zn.Component{constructor(e){super(e),this.toggleViews=this.toggleViews.bind(this),this.handleChange=this.handleChange.bind(this),this.state={view:"rgb"}}toggleViews(){"hsl"===this.state.view?this.setState({view:"rgb"}):"rgb"===this.state.view&&this.setState({view:"hsl"})}handleChange(e,t){e.hex&&(0,Vn.isValidHex)(e.hex)?this.props.onChange({hex:e.hex,source:"hex"},t):e.r||e.g||e.b?this.props.onChange({r:e.r||this.props.rgb.r,g:e.g||this.props.rgb.g,b:e.b||this.props.rgb.b,a:this.props.rgb.a,source:"rgb"},t):e.a?(e.a<0?e.a=0:e.a>1&&(e.a=1),this.props.onChange({h:this.props.hsl.h,s:this.props.hsl.s,l:this.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&(e.l=e.l.replace("%","")),this.props.onChange({h:e.h||this.props.hsl.h||0,s:Number(e.s&&e.s/100||this.props.hsl.s||0),l:Number(e.l&&e.l/100||this.props.hsl.l||0),a:Math.round(100*e.a)/100||this.props.rgb.a||1,source:"hsl"},t))}render(){const t={fields:{display:"flex",paddingTop:"4px"},single:{flex:"1",paddingLeft:"6px"},alpha:{flex:"1",paddingLeft:"6px"},double:{flex:"2"},input:{width:"100%",padding:"4px 10% 3px",border:"none",borderRadius:"2px",boxShadow:"rgb(218, 218, 218) 0px 0px 0px 1px inset",fontSize:"11px"},label:{display:"block",textAlign:"center",fontSize:"11px",color:"#222",paddingTop:"3px",paddingBottom:"4px",textTransform:"capitalize"},toggle:{width:"32px",textAlign:"right",position:"relative"}};return(0,e.createElement)("div",{style:t.fields,className:"flexbox-fix"},(0,e.createElement)("div",{style:t.double},(0,e.createElement)(Fn.jc,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex.replace("#",""),onChange:this.handleChange})),"rgb"===this.state.view&&(0,e.createElement)(zn.Fragment,null,(0,e.createElement)("div",{style:t.single},(0,e.createElement)(Fn.jc,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange,dragLabel:"true",dragMax:"255"})),(0,e.createElement)("div",{style:t.single},(0,e.createElement)(Fn.jc,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange,dragLabel:"true",dragMax:"255"})),(0,e.createElement)("div",{style:t.single},(0,e.createElement)(Fn.jc,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange,dragLabel:"true",dragMax:"255"})),(0,e.createElement)("div",{style:t.alpha},(0,e.createElement)(Fn.jc,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))),"hsl"===this.state.view&&(0,e.createElement)(zn.Fragment,null,(0,e.createElement)("div",{style:t.single},(0,e.createElement)(Fn.jc,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange,dragLabel:"true",dragMax:"359"})),(0,e.createElement)("div",{style:t.single},(0,e.createElement)(Fn.jc,{style:{input:t.input,label:t.label},label:"s",value:`${Math.round(100*this.props.hsl.s)}`,onChange:this.handleChange})),(0,e.createElement)("div",{style:t.single},(0,e.createElement)(Fn.jc,{style:{input:t.input,label:t.label},label:"l",value:`${Math.round(100*this.props.hsl.l)}`,onChange:this.handleChange})),(0,e.createElement)("div",{style:t.alpha},(0,e.createElement)(Fn.jc,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange}))),(0,e.createElement)("div",{style:t.toggle},(0,e.createElement)("div",{className:"toggle-icons",style:t.icon,onClick:this.toggleViews,ref:e=>this.icon=e},(0,e.createElement)(jn.Dashicon,{icon:"arrow-up-alt2"}),(0,e.createElement)(jn.Dashicon,{icon:"arrow-down-alt2"}))))}}const Un=Hn,Wn=J((({rgb:t,hex:n,hsv:o,hsl:a,onChange:r,renderers:i})=>{const l={picker:{width:300,position:"relative",marginBottom:10},hue:{height:10,position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"},input:{height:34,border:`1px solid ${n}`,paddingLeft:10},body:{padding:"10px 0"},controls:{display:"flex"},color:{width:"30px",height:"30px",position:"relative",marginTop:"3px",marginLeft:"10px",borderRadius:"50%",overflow:"hidden"},activeColor:{position:"absolute",left:0,right:0,top:0,bottom:0,borderRadius:"50%",background:`rgba(${t.r},${t.g},${t.b},${t.a})`,boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)"},swatch:{width:54,height:38,background:n},sliders:{padding:"4px 0",flex:"1"},saturation:{width:"100%",paddingBottom:"50%",position:"relative",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0",shadow:"inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)"}};return(0,e.createElement)("div",{style:l.picker,className:"kadence-picker"},(0,e.createElement)("div",{style:l.saturation},(0,e.createElement)(Fn.VI,{style:l.Saturation,hsl:a,hsv:o,pointer:Ln.uy,onChange:r})),(0,e.createElement)("div",{style:l.body},(0,e.createElement)("div",{style:l.controls,className:"flexbox-fix"},(0,e.createElement)("div",{style:l.sliders},(0,e.createElement)("div",{style:l.hue},(0,e.createElement)(Fn.RG,{style:l.Hue,hsl:a,onChange:r,pointer:Bn.o$})),(0,e.createElement)("div",{style:l.alpha},(0,e.createElement)(Fn.ry,{style:l.Alpha,rgb:t,hsl:a,renderers:i,pointer:Bn.o$,onChange:r}))),(0,e.createElement)("div",{style:l.color},(0,e.createElement)(Fn.xu,null),(0,e.createElement)("div",{style:l.activeColor})))),(0,e.createElement)(Un,{rgb:t,hsl:a,hex:n,onChange:r}))})),Gn={inherit:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",width:"24",height:"24",strokeLinejoin:"round",strokeMiterlimit:"1.5",clipRule:"evenodd",viewBox:"0 0 24 24"},(0,e.createElement)("path",{fill:"none",stroke:"currentColor",strokeWidth:"1.5",d:"M12.383 26.976l2.01-.941 1.884.538 1.623 1.666-.692.236.281 1.539 1.552 1.35-1.552 2.153",transform:"matrix(.68343 0 0 .68343 -5.086 -1.48)"}),(0,e.createElement)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"1.5",d:"M12.016 24.355l.998-.952M33.573 26.085l-1.636-1.343-1.348-1.248M26.35 27.774l.332.37 1.349.756-.711 2.768 1.274 1.203.989-.449 3.933-6.226",transform:"matrix(.68343 0 0 .68343 -5.086 -1.48)"}),(0,e.createElement)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"1.5",d:"M29.519 9.539c5.298 1.881 9.099 6.977 9.099 12.961 0 7.582-6.102 13.737-13.618 13.737S11.382 30.082 11.382 22.5",transform:"matrix(.68343 0 0 .68343 -5.086 -1.48)"}),(0,e.createElement)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"1.5",d:"M20.684 3.211v9.433h4.179l-6.429 6.429-6.429-6.429h4.179V8.021",transform:"matrix(.68343 0 0 .68343 -5.086 -1.48) translate(-6.686 -1.321) scale(1.55693)"}),(0,e.createElement)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"1.5",d:"M32.994 21.014l.2.205 3.364.329 1.532 2.432M32.931 12.002l-3.219.944-1.054 1.996-.408-.003",transform:"matrix(.68343 0 0 .68343 -5.086 -1.48)"}))},$n=window.kadence.helpers,qn=window.lodash,Xn=window.wp.blockEditor,Jn=window.wp.i18n,Kn=window.wp.data;function Yn(e){let t=100;return e&&(t=100*e),t}function Zn({label:t,alpha:n=!0,opacityValue:o="",opacityUnit:a="",onOpacityChange:r=null,value:i,onChange:l,reload:s,reloaded:c,defaultValue:u,onClassChange:d,onArrayChange:p=null,disableCustomColors:h=!1}){const[m,f]=(0,zn.useState)(!1),[b,g]=(0,zn.useState)("first"),[v,k]=(0,zn.useState)(""),[y,E]=(0,zn.useState)(""!==o?o:1),[x,_]=(0,zn.useState)(!(!i||!i.startsWith("palette"))),w=(!!h||(0,Xn.useSetting)("color.custom"),(0,Xn.useSetting)("color.palette")),C=()=>{f(!0)};s&&(c(!0),setTimeout((()=>{k(""),E(""),_(!1)}),100));const S=100===a?(e=>{let t=1;return e&&(t=e/100),t})(y):y,N=v||i;let O=x&&w&&N&&w[parseInt(N.slice(-1),10)-1]?w[parseInt(N.slice(-1),10)-1].color:N;if(!x&&O&&O.startsWith("var(")&&(O=window.getComputedStyle(document.documentElement).getPropertyValue(i.replace("var(","").split(",")[0].replace(")",""))),O&&O.startsWith("var(")){let e=window.getComputedStyle(document.documentElement).getPropertyValue(O.replace("var(","").replace(" ","").replace(")",""));""===e&&(e=window.getComputedStyle(document.documentElement).getPropertyValue(O.replace("var(","").replace(" ","").split(",")[0].replace(")",""))),O=e}""===O&&(O=u),r&&!x&&1!==Number(void 0!==S&&""!==S?S:1)&&(O=(0,$n.hexToRGBA)(void 0===O?"":O,void 0!==S&&""!==S?S:1));let T=O;if(x&&N)switch(N){case"palette1":T="var(--global-palette1,#2B6CB0)";break;case"palette2":T="var(--global-palette2,#215387)";break;case"palette3":T="var(--global-palette3,#1A202C)";break;case"palette4":T="var(--global-palette4,#2D3748)";break;case"palette5":T="var(--global-palette5,#4A5568)";break;case"palette6":T="var(--global-palette6,#718096)";break;case"palette7":T="var(--global-palette7,#EDF2F7)";break;case"palette8":T="var(--global-palette8,#F7FAFC)";break;case"palette9":T="var(--global-palette9,#ffffff)"}const M=(e,t)=>{let n,o=100===a?100:1;t?n=t:void 0!==e.rgb&&void 0!==e.rgb.a&&1!==e.rgb.a?r?(n="transparent"===e.hex?"#000000":e.hex,o=100===a?Yn(e.rgb.a):e.rgb.a):n="rgba("+e.rgb.r+","+e.rgb.g+","+e.rgb.b+","+e.rgb.a+")":n=void 0!==e.hex?e.hex:e,k(n),E(o),_(!!t),null!==p?p(n,o):(l(n),null!==r&&setTimeout((()=>{r(o)}),50))};return(0,e.createElement)("div",{className:"single-pop-color"},m&&(0,e.createElement)(jn.Popover,{position:"top left",className:"kadence-pop-color-popover",onClose:()=>{!0===m&&f(!1)}},(0,e.createElement)(Wn,{color:O,onChange:e=>(e=>{let t,n=100===a?100:1;void 0!==e.rgb&&void 0!==e.rgb.a&&1!==e.rgb.a?r?(t="transparent"===e.hex?"#000000":e.hex,n=100===a?Yn(e.rgb.a):e.rgb.a):t="rgba("+e.rgb.r+","+e.rgb.g+","+e.rgb.b+","+e.rgb.a+")":t=void 0!==e.hex?e.hex:e,k(t),E(n),_(!1)})(e),onChangeComplete:e=>{M(e,""),d&&d("")}}),w&&(0,e.createElement)("div",{className:"kadence-pop-color-palette-swatches"},(0,qn.map)(w,(({color:t,slug:n,name:o})=>{const a={color:t},r=n.replace("theme-",""),l=r===i||!n.startsWith("theme-palette")&&i===t;return(0,e.createElement)("div",{key:t,className:"kadence-color-palette__item-wrapper"},(0,e.createElement)(jn.Tooltip,{text:o|| // translators: %s: color hex code e.g: "#f00". // translators: %s: color hex code e.g: "#f00". (0,Jn.sprintf)((0,Jn.__)("Color code: %s"),t)},(0,e.createElement)(jn.Button,{type:"button",className:"kadence-color-palette__item "+(l?"is-active":""),style:a,onClick:()=>{n.startsWith("theme-palette")?M(t,r):M(t,!1),d&&d(n)},"aria-label":o? // translators: %s: The name of the color e.g: "vivid red". // translators: %s: The name of the color e.g: "vivid red". (0,Jn.sprintf)((0,Jn.__)("Color: %s","kadence-blocks"),o): // translators: %s: color hex code e.g: "#f00". // translators: %s: color hex code e.g: "#f00". (0,Jn.sprintf)((0,Jn.__)("Color code: %s","kadence-blocks"),t),"aria-pressed":l})),r===i&&(0,e.createElement)(jn.Dashicon,{icon:"admin-site"}),!n.startsWith("theme-palette")&&i===t&&(0,e.createElement)(jn.Dashicon,{icon:"saved"}))})))),m&&(0,e.createElement)(jn.Button,{className:"kadence-pop-color-icon-indicate "+(n?"kadence-has-alpha":"kadence-no-alpha"),onClick:C,showTooltip:!0,label:t},(0,e.createElement)(jn.ColorIndicator,{className:"kadence-pop-color-indicate",colorValue:T}),i&&i.startsWith("palette")&&(0,e.createElement)("span",{className:"color-indicator-icon"},(0,e.createElement)(jn.Dashicon,{icon:"admin-site"}))),!m&&(0,e.createElement)(jn.Button,{className:"kadence-pop-color-icon-indicate "+(n?"kadence-has-alpha":"kadence-no-alpha"),onClick:C,showTooltip:!0,label:t},(0,e.createElement)(jn.ColorIndicator,{className:"kadence-pop-color-indicate",colorValue:T}),i&&i.startsWith("palette")&&(0,e.createElement)("span",{className:"color-indicator-icon"},(0,e.createElement)(jn.Dashicon,{icon:"admin-site"}))))}const Qn=class extends zn.Component{constructor(){super(...arguments),this.state={reload:!1}}render(){let t=!1;const n=this.props.colorDefault?this.props.colorDefault:this.props.default,o=this.props.colorDefault2?this.props.colorDefault2:this.props.default2,a=this.props.colorDefault3?this.props.colorDefault3:this.props.default3,r=this.props.colorValue?this.props.colorValue:this.props.value,i=this.props.colorValue2?this.props.colorValue2:this.props.value2,l=this.props.colorValue3?this.props.colorValue3:this.props.value3,s=this.props.onColorChange?this.props.onColorChange:this.props.onChange,c=this.props.onColorChange2?this.props.onColorChange2:this.props.onChange2,u=this.props.onColorChange3?this.props.onColorChange3:this.props.onChange3;return r&&r!==n&&(t=!0),i&&i!==o&&(t=!0),l&&l!==a&&(t=!0),(0,e.createElement)("div",{className:"components-base-control kadence-pop-color-control"},(0,e.createElement)("div",{className:"kadence-pop-color-container"},this.props.label&&(0,e.createElement)("label",{className:"kadence-beside-label kadence-pop-color-label"},this.props.label),t&&!this.props.hideClear&&(0,e.createElement)(jn.Button,{className:"kadence-pop-color-clear",type:"button",onClick:()=>{s(n||""),this.props.onClassChange&&this.props.onClassChange(""),c&&(c(o||""),this.props.onClassChange2&&this.props.onClassChange2("")),u&&(u(a||""),this.props.onClassChange3&&this.props.onClassChange3("")),this.setState({reload:!0})},isSmall:!0},(0,e.createElement)(jn.Dashicon,{icon:"redo"})),(0,e.createElement)("div",{className:"kadence-pop-color-popovers"},(0,e.createElement)(Zn,{label:this.props.swatchLabel?this.props.swatchLabel:(0,Jn.__)("Select Color","kadence-blocks"),onChange:e=>s(e),onOpacityChange:this.props.onOpacityChange?e=>this.props.onOpacityChange(e):void 0,onArrayChange:this.props.onArrayChange?(e,t)=>this.props.onArrayChange(e,t):void 0,onClassChange:this.props.onClassChange?e=>this.props.onClassChange(e):void 0,value:r,opacityValue:void 0!==this.props?.opacityValue&&""!==this.props?.opacityValue?this.props.opacityValue:void 0,opacityUnit:this.props.opacityUnit?this.props.opacityUnit:void 0,defaultValue:n||"",reload:this.state.reload,reloaded:e=>this.setState({reload:!1})}),c&&(0,e.createElement)(Zn,{label:this.props.swatchLabel2?this.props.swatchLabel2:(0,Jn.__)("Select Color","kadence-blocks"),onChange:e=>c(e),onOpacityChange:this.props.onOpacityChange2?e=>this.props.onOpacityChange2(e):void 0,onArrayChange:this.props.onArrayChange2?(e,t)=>this.props.onArrayChange2(e,t):void 0,onClassChange:this.props.onClassChange2?e=>this.props.onClassChange2(e):void 0,value:i,opacityValue:this.props.opacityValue2?this.props.opacityValue2:void 0,opacityUnit:this.props.opacityUnit2?this.props.opacityUnit2:void 0,defaultValue:o||"",reload:this.state.reload,reloaded:e=>this.setState({reload:!1})}),u&&(0,e.createElement)(Zn,{label:this.props.swatchLabel3?this.props.swatchLabel3:(0,Jn.__)("Select Color","kadence-blocks"),onChange:e=>u(e),onOpacityChange:this.props.onOpacityChange3?e=>this.props.onOpacityChange3(e):void 0,onArrayChange:this.props.onArrayChange3?(e,t)=>this.props.onArrayChange3(e,t):void 0,onClassChange:this.props.onClassChange3?e=>this.props.onClassChange3(e):void 0,value:l,opacityValue:this.props.opacityValue3?this.props.opacityValue3:void 0,opacityUnit:this.props.opacityUnit3?this.props.opacityUnit3:void 0,defaultValue:a||"",reload:this.state.reload,reloaded:e=>this.setState({reload:!1})}))))}};function eo({label:t,desktopChildren:n,tabletChildren:o,mobileChildren:a,hasPadding:r=!1}){const[i,l]=(0,zn.useState)("Desktop"),s=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);s!==i&&l(s);const{setPreviewDeviceType:c}=(0,Kn.useDispatch)("kadenceblocks/data"),u=[{name:"Desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}],d={};return d.Mobile=a,d.Tablet=o,d.Desktop=n,(0,e.createElement)("div",{className:"components-base-control kb-small-responsive-control"+(r?" responsive-title-area-spacing":"")},(0,e.createElement)("div",{className:"kadence-title-bar"},t&&(0,e.createElement)("span",{className:"kadence-control-title"},t),(0,e.createElement)(jn.ButtonGroup,{className:"kb-small-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(u,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===i?" is-active":""}`,isSmall:!0,"aria-pressed":i===t,onClick:()=>{return e=t,c((0,$n.capitalizeFirstLetter)(e)),void l((0,$n.capitalizeFirstLetter)(e));var e}},o))))),(0,e.createElement)("div",{className:"kb-small-measure-control-inner"},d[i]?d[i]:d.Desktop))}function to({label:t,onChange:n,onChange2:o,onChange3:a,onChangeTablet:r,onChange2Tablet:i,onChange3Tablet:l,onChangeMobile:s,onChange2Mobile:c,onChange3Mobile:u,value:d,value2:p,value3:h,mobileValue:m,mobileValue2:f,mobileValue3:b,tabletValue:g,tabletValue2:v,tabletValue3:k,colorDefault:y,colorDefault2:E,colorDefault3:x,colorDefaultTablet:_,colorDefault2Tablet:w,colorDefault3Tablet:C,colorDefaultMobile:S,colorDefault2Mobile:N,colorDefault3Mobile:O}){return(0,e.createElement)(eo,{label:t,desktopChildren:(0,e.createElement)(Qn,{value:d,value2:p,value3:h,onChange:e=>n(e),onChange2:o?e=>o(e):null,onChange3:a?e=>a(e):null,colorDefault:y,colorDefault2:E,colorDefault3:x}),tabletChildren:(0,e.createElement)(Qn,{value:g,value2:v,value3:k,onChange:e=>r(e),onChange2:i?e=>i(e):null,onChange3:l?e=>l(e):null,colorDefault:_,colorDefault2:w,colorDefault3:C}),mobileChildren:(0,e.createElement)(Qn,{value:m,value2:f,value3:b,onChange:e=>s(e),onChange2:c?e=>c(e):null,onChange3:u?e=>u(e):null,colorDefault:S,colorDefault2:N,colorDefault3:O})})}function no({colorBase:t="color",backgroundBase:n="background",colorLabel:o="Color",backgroundLabel:a="Background",size:r="",suffix:i="",includeBackground:l=!0,includeActive:s=!0,setAttributes:c,setMetaAttributes:u,attributes:d}){const p=d[t+i+r],h=d[n+i+r],m=d[t+i+"Hover"+r],f=d[n+i+"Hover"+r],b=d[t+i+"Active"+r],g=d[n+i+"Active"+r],v=(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Qn,{label:o,value:p,default:"",onChange:e=>c({[t+i+r]:e}),key:"normal"}),l&&(0,e.createElement)(Qn,{label:a,value:h,default:"",onChange:e=>c({[n+i+r]:e}),key:"normalb"})),k=(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Qn,{label:o+(0,Jn.__)(" Hover","kadence-blocks"),value:m,default:"",onChange:e=>c({[t+i+"Hover"+r]:e}),key:"hover"}),l&&(0,e.createElement)(Qn,{label:a+(0,Jn.__)(" Hover","kadence-blocks"),value:f,default:"",onChange:e=>c({[n+i+"Hover"+r]:e}),key:"hoverb"})),y=s?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Qn,{label:o+(0,Jn.__)(" Active","kadence-blocks"),value:b,default:"",onChange:e=>c({[t+i+"Active"+r]:e}),key:"active"}),l&&(0,e.createElement)(Qn,{label:a+(0,Jn.__)(" Active","kadence-blocks"),value:g,default:"",onChange:e=>c({[n+i+"Active"+r]:e}),key:"activeb"})):null;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Bs,{normal:v,hover:k,active:y}))}function oo({colorBase:t="color",colorLabel:n=(0,Jn.__)("Color","kadence-blocks"),backgroundBase:o="",backgroundLabel:a=(0,Jn.__)("Background","kadence-blocks"),backgroundTypeBase:r="",backgroundTypeLabel:i=(0,Jn.__)("Type","kadence-blocks"),backgroundGradientBase:l="",backgroundGradientLabel:s=(0,Jn.__)("Gradient","kadence-blocks"),borderBase:c="",borderLabel:u=(0,Jn.__)("Border","kadence-blocks"),borderRadiusBase:d="",borderRadiusUnitBase:p="",borderRadiusLabel:h=(0,Jn.__)("Border Radius","kadence-blocks"),shadowBase:m="",shadowLabel:f=(0,Jn.__)("Box Shadow","kadence-blocks"),includeActive:b=!0,setAttributes:g,setMetaAttribute:v,attributes:k,setActivePreview:y,activePreview:E}){const x=k[t],_=k[t+"Tablet"],w=k[t+"Mobile"],C=k[t+"Hover"],S=k[t+"HoverTablet"],N=k[t+"HoverMobile"],O=k[t+"Active"],T=k[t+"ActiveTablet"],M=k[t+"ActiveMobile"],A=k[r],D=k[r+"Hover"],R=k[r+"Active"],I=k[l],P=k[l+"Hover"],F=k[l+"Active"],L=k[o],B=k[o+"Tablet"],V=k[o+"Mobile"],z=k[o+"Hover"],j=k[o+"HoverTablet"],H=k[o+"HoverMobile"],U=k[o+"Active"],W=k[o+"ActiveTablet"],G=k[o+"ActiveMobile"],$=k[c],q=k[c+"Tablet"],X=k[c+"Mobile"],J=k[c+"Hover"],K=k[c+"HoverTablet"],Y=k[c+"HoverMobile"],Z=k[c+"Active"],Q=k[c+"ActiveTablet"],ee=k[c+"ActiveMobile"],te=k[d],ne=k[d+"Tablet"],oe=k[d+"Mobile"],ae=k[d+"Hover"],re=k[d+"HoverTablet"],ie=k[d+"HoverMobile"],le=k[d+"Active"],se=k[d+"ActiveTablet"],ce=k[d+"ActiveMobile"],ue=k[p],de=k[p+"Hover"],pe=k[p+"Active"],he=k[m],me=k[m+"Hover"],fe=k[m+"Active"],be=(e,t)=>{v?v(t,e):g({[e]:t})},ge=(e,t,n)=>{const o=n[t].map(((t,n)=>(0===n&&(t={...t,...e}),t)));be(t,o)},ve=(0,e.createElement)(e.Fragment,null,(0,e.createElement)(to,{label:n,value:x,tabletValue:_,mobileValue:w,default:"",onChange:e=>be(t,e),onChangeTablet:e=>be(t+"Tablet",e),onChangeMobile:e=>be(t+"Mobile",e),key:"normal"}),o&&r&&l&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ri,{label:i,type:A||"normal",onChange:e=>be(r,e),allowedTypes:["normal","gradient"]}),"gradient"===A&&(0,e.createElement)(jl,{value:I,onChange:e=>be(l,e),gradients:[]}),"normal"===A&&(0,e.createElement)(to,{label:a,value:L,tabletValue:B,mobileValue:V,default:"",onChange:e=>be(o,e),onChangeTablet:e=>be(o+"Tablet",e),onChangeMobile:e=>be(o+"Mobile",e),key:"normalb"})),o&&!r&&(0,e.createElement)(to,{label:a,value:L,tabletValue:B,mobileValue:V,default:"",onChange:e=>be(o,e),onChangeTablet:e=>be(o+"Tablet",e),onChangeMobile:e=>be(o+"Mobile",e),key:"normalb"}),c&&(0,e.createElement)(Ts,{key:"normalborderbase",label:u,value:$,tabletValue:q,mobileValue:X,onChange:e=>be(c,e),onChangeTablet:e=>be(c+"Tablet",e),onChangeMobile:e=>be(c+"Mobile",e)}),d&&(0,e.createElement)(up,{key:"normalborderradiusbase",label:h,value:te,tabletValue:ne,mobileValue:oe,onChange:e=>be(d,e.map(String)),onChangeTablet:e=>be(d+"Tablet",e.map(String)),onChangeMobile:e=>be(d+"Mobile",e.map(String)),min:0,max:"em"===ue||"rem"===ue?24:100,step:"em"===ue||"rem"===ue?.1:1,unit:ue,units:["px","em","rem","%"],onUnit:e=>be(p,e),isBorderRadius:!0,allowEmpty:!0}),m&&(0,e.createElement)(ni,{key:"shadowbase",label:f,enable:void 0===he||void 0===he[0]||void 0===he[0].enable||he[0].enable,color:void 0!==he&&void 0!==he[0]&&void 0!==he[0].color?he[0].color:"#000000",colorDefault:"#000000",onArrayChange:(e,t)=>{ge({color:e,opacity:t},m,k)},opacity:void 0!==he&&void 0!==he[0]&&void 0!==he[0].opacity?he[0].opacity:.2,hOffset:void 0!==he&&void 0!==he[0]&&void 0!==he[0].hOffset?he[0].hOffset:0,vOffset:void 0!==he&&void 0!==he[0]&&void 0!==he[0].vOffset?he[0].vOffset:0,blur:void 0!==he&&void 0!==he[0]&&void 0!==he[0].blur?he[0].blur:14,spread:void 0!==he&&void 0!==he[0]&&void 0!==he[0].spread?he[0].spread:0,inset:void 0!==he&&void 0!==he[0]&&void 0!==he[0].inset&&he[0].inset,onEnableChange:e=>{ge({enable:e},m,k)},onColorChange:e=>{ge({color:e},m,k)},onOpacityChange:e=>{ge({opacity:e},m,k)},onHOffsetChange:e=>{ge({hOffset:e},m,k)},onVOffsetChange:e=>{ge({vOffset:e},m,k)},onBlurChange:e=>{ge({blur:e},m,k)},onSpreadChange:e=>{ge({spread:e},m,k)},onInsetChange:e=>{ge({inset:e},m,k)}})),ke=(0,e.createElement)(e.Fragment,null,(0,e.createElement)(to,{label:n,value:C,tabletValue:S,mobileValue:N,default:"",onChange:e=>be(t+"Hover",e),onChangeTablet:e=>be(t+"HoverTablet",e),onChangeMobile:e=>be(t+"HoverMobile",e),key:"hover"}),o&&r&&l&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ri,{label:i,type:D||"normal",onChange:e=>be(r+"Hover",e),allowedTypes:["normal","gradient"]}),"gradient"===D&&(0,e.createElement)(jl,{value:P,onChange:e=>be(l+"Hover",e),gradients:[]}),"normal"===D&&(0,e.createElement)(to,{label:a,value:z,tabletValue:j,mobileValue:H,default:"",onChange:e=>be(o+"Hover",e),onChangeTablet:e=>be(o+"HoverTablet",e),onChangeMobile:e=>be(o+"HoverMobile",e),key:"hoverb"})),o&&!r&&(0,e.createElement)(to,{label:a,value:z,tabletValue:j,mobileValue:H,default:"",onChange:e=>be(o+"Hover",e),onChangeTablet:e=>be(o+"HoverTablet",e),onChangeMobile:e=>be(o+"HoverMobile",e),key:"hoverb"}),c&&(0,e.createElement)(Ts,{key:"hoverborderbase",label:u,value:J,tabletValue:K,mobileValue:Y,onChange:e=>be(c+"Hover",e),onChangeTablet:e=>be(c+"HoverTablet",e),onChangeMobile:e=>be(c+"HoverMobile",e)}),d&&(0,e.createElement)(up,{key:"hoverborderradiusbase",label:h,value:ae,tabletValue:re,mobileValue:ie,onChange:e=>be(d+"Hover",e.map(String)),onChangeTablet:e=>be(d+"HoverTablet",e.map(String)),onChangeMobile:e=>be(d+"HoverMobile",e.map(String)),min:0,max:"em"===de||"rem"===de?24:100,step:"em"===de||"rem"===de?.1:1,unit:de,units:["px","em","rem","%"],onUnit:e=>be(p+"Hover",e),isBorderRadius:!0,allowEmpty:!0}),m&&(0,e.createElement)(ni,{key:"hovershadowbase",label:f,enable:void 0===me||void 0===me[0]||void 0===me[0].enable||me[0].enable,color:void 0!==me&&void 0!==me[0]&&void 0!==me[0].color?me[0].color:"#000000",colorDefault:"#000000",onArrayChange:(e,t)=>{ge({color:e,opacity:t},m+"Hover",k)},opacity:void 0!==me&&void 0!==me[0]&&void 0!==me[0].opacity?me[0].opacity:.2,hOffset:void 0!==me&&void 0!==me[0]&&void 0!==me[0].hOffset?me[0].hOffset:0,vOffset:void 0!==me&&void 0!==me[0]&&void 0!==me[0].vOffset?me[0].vOffset:0,blur:void 0!==me&&void 0!==me[0]&&void 0!==me[0].blur?me[0].blur:14,spread:void 0!==me&&void 0!==me[0]&&void 0!==me[0].spread?me[0].spread:0,inset:void 0!==me&&void 0!==me[0]&&void 0!==me[0].inset&&me[0].inset,onEnableChange:e=>{ge({enable:e},m+"Hover",k)},onColorChange:e=>{ge({color:e},m+"Hover",k)},onOpacityChange:e=>{ge({opacity:e},m+"Hover",k)},onHOffsetChange:e=>{ge({hOffset:e},m+"Hover",k)},onVOffsetChange:e=>{ge({vOffset:e},m+"Hover",k)},onBlurChange:e=>{ge({blur:e},m+"Hover",k)},onSpreadChange:e=>{ge({spread:e},m+"Hover",k)},onInsetChange:e=>{ge({inset:e},m+"Hover",k)}})),ye=b?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(to,{label:n,value:O,tabletValue:T,mobileValue:M,default:"",onChange:e=>be(t+"Active",e),onChangeTablet:e=>be(t+"ActiveTablet",e),onChangeMobile:e=>be(t+"ActiveMobile",e),key:"active"}),o&&r&&l&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ri,{label:i,type:R||"normal",onChange:e=>be(r+"Active",e),allowedTypes:["normal","gradient"]}),"gradient"===R&&(0,e.createElement)(jl,{value:F,onChange:e=>be(l+"Active",e),gradients:[]}),"normal"===R&&(0,e.createElement)(to,{label:a,value:U,tabletValue:W,mobileValue:G,default:"",onChange:e=>be(o+"Active",e),onChangeTablet:e=>be(o+"ActiveTablet",e),onChangeMobile:e=>be(o+"ActiveMobile",e),key:"activeb"})),o&&!r&&(0,e.createElement)(to,{label:a,value:U,tabletValue:W,mobileValue:G,default:"",onChange:e=>be(o+"Active",e),onChangeTablet:e=>be(o+"ActiveTablet",e),onChangeMobile:e=>be(o+"ActiveMobile",e),key:"activeb"}),c&&(0,e.createElement)(Ts,{key:"activeborderbase",label:u,value:Z,tabletValue:Q,mobileValue:ee,onChange:e=>be(c+"Active",e),onChangeTablet:e=>be(c+"ActiveTablet",e),onChangeMobile:e=>be(c+"ActiveMobile",e)}),d&&(0,e.createElement)(up,{key:"activeborderradiusbase",label:h,value:le,tabletValue:se,mobileValue:ce,onChange:e=>be(d+"Active",e.map(String)),onChangeTablet:e=>be(d+"ActiveTablet",e.map(String)),onChangeMobile:e=>be(d+"ActiveMobile",e.map(String)),min:0,max:"em"===pe||"rem"===pe?24:100,step:"em"===pe||"rem"===pe?.1:1,unit:pe,units:["px","em","rem","%"],onUnit:e=>be(p+"Active",e),isBorderRadius:!0,allowEmpty:!0}),m&&(0,e.createElement)(ni,{key:"activeshadowbase",label:f,enable:void 0===fe||void 0===fe[0]||void 0===fe[0].enable||fe[0].enable,color:void 0!==fe&&void 0!==fe[0]&&void 0!==fe[0].color?fe[0].color:"#000000",colorDefault:"#000000",onArrayChange:(e,t)=>{ge({color:e,opacity:t},m+"Active",k)},opacity:void 0!==fe&&void 0!==fe[0]&&void 0!==fe[0].opacity?fe[0].opacity:.2,hOffset:void 0!==fe&&void 0!==fe[0]&&void 0!==fe[0].hOffset?fe[0].hOffset:0,vOffset:void 0!==fe&&void 0!==fe[0]&&void 0!==fe[0].vOffset?fe[0].vOffset:0,blur:void 0!==fe&&void 0!==fe[0]&&void 0!==fe[0].blur?fe[0].blur:14,spread:void 0!==fe&&void 0!==fe[0]&&void 0!==fe[0].spread?fe[0].spread:0,inset:void 0!==fe&&void 0!==fe[0]&&void 0!==fe[0].inset&&fe[0].inset,onEnableChange:e=>{ge({enable:e},m+"Active",k)},onColorChange:e=>{ge({color:e},m+"Active",k)},onOpacityChange:e=>{ge({opacity:e},m+"Active",k)},onHOffsetChange:e=>{ge({hOffset:e},m+"Active",k)},onVOffsetChange:e=>{ge({vOffset:e},m+"Active",k)},onBlurChange:e=>{ge({blur:e},m+"Active",k)},onSpreadChange:e=>{ge({spread:e},m+"Active",k)},onInsetChange:e=>{ge({inset:e},m+"Active",k)}})):null;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Bs,{normal:ve,hover:ke,active:ye,setActivePreview:y,activePreview:E}))}const ao=window.wp.keycodes,ro=()=>(0,e.createElement)(jn.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,e.createElement)(jn.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"}));function io({label:t,opacityValue:n="",opacityUnit:o="",onOpacityChange:a=null,value:r,onChange:i,reload:l,reloaded:s,defaultValue:c,onClassChange:u,onArrayChange:d=null,disableCustomColors:p=!1}){const[h,m]=(0,zn.useState)(!1),[f,b]=(0,zn.useState)("first"),[g,v]=(0,zn.useState)(""),[k,y]=(0,zn.useState)(""!==n?n:1),[E,x]=(0,zn.useState)(!(!r||!r.startsWith("palette"))),_=(0,Xn.useSetting)("color.palette");l&&(s(!0),setTimeout((()=>{v(""),y(""),x(!1)}),100));const w=100===o?(e=>{let t=1;return e&&(t=e/100),t})(k):k,C=g||r;let S=E&&_&&_[parseInt(C.slice(-1),10)-1]?_[parseInt(C.slice(-1),10)-1].color:C;if(!E&&S&&S.startsWith("var(")&&(S=window.getComputedStyle(document.documentElement).getPropertyValue(r.replace("var(","").split(",")[0].replace(")",""))),S&&S.startsWith("var(")){let e=window.getComputedStyle(document.documentElement).getPropertyValue(S.replace("var(","").replace(" ","").replace(")",""));""===e&&(e=window.getComputedStyle(document.documentElement).getPropertyValue(S.replace("var(","").replace(" ","").split(",")[0].replace(")",""))),S=e}""===S&&(S=c),a&&!E&&1!==Number(void 0!==w&&""!==w?w:1)&&(S=(0,$n.hexToRGBA)(void 0===S?"":S,void 0!==w&&""!==w?w:1));let N=S;if(E&&C)switch(C){case"palette1":N="var(--global-palette1,#2B6CB0)";break;case"palette2":N="var(--global-palette2,#215387)";break;case"palette3":N="var(--global-palette3,#1A202C)";break;case"palette4":N="var(--global-palette4,#2D3748)";break;case"palette5":N="var(--global-palette5,#4A5568)";break;case"palette6":N="var(--global-palette6,#718096)";break;case"palette7":N="var(--global-palette7,#EDF2F7)";break;case"palette8":N="var(--global-palette8,#F7FAFC)";break;case"palette9":N="var(--global-palette9,#ffffff)"}const O=(e,t)=>{let n,r=100===o?100:1;t?n=t:void 0!==e.rgb&&void 0!==e.rgb.a&&1!==e.rgb.a?a?(n="transparent"===e.hex?"#000000":e.hex,r=100===o?unConvertOpacity(e.rgb.a):e.rgb.a):n="rgba("+e.rgb.r+","+e.rgb.g+","+e.rgb.b+","+e.rgb.a+")":n=void 0!==e.hex?e.hex:e,v(n),y(r),x(!!t)},T=(e,t)=>{let n,r=100===o?100:1;t?n=t:void 0!==e.rgb&&void 0!==e.rgb.a&&1!==e.rgb.a?a?(n="transparent"===e.hex?"#000000":e.hex,r=100===o?unConvertOpacity(e.rgb.a):e.rgb.a):n="rgba("+e.rgb.r+","+e.rgb.g+","+e.rgb.b+","+e.rgb.a+")":n=void 0!==e.hex?e.hex:e,v(n),y(r),x(!!t),null!==d?d(n,r):(i(n),null!==a&&setTimeout((()=>{a(r)}),50))};return(0,e.createElement)(jn.Dropdown,{placement:"top",className:"kb-colors-selector components-dropdown-menu components-toolbar new-kadence-advanced-colors",contentClassName:"block-library-colors-selector__popover kt-popover-color kadence-pop-color-popover",renderToggle:({isOpen:n,onToggle:o})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(jn.Button,{className:"components-toolbar__control components-dropdown-menu__toggle kb-colors-selector__toggle",label:t,tooltip:t,icon:(0,e.createElement)("div",{className:"kb-colors-selector__icon-container"},(0,e.createElement)("div",{className:"kb-colors-selector__state-selection",style:{color:S}},(0,e.createElement)(ro,null))),onClick:o,"aria-expanded":n})),renderContent:()=>(0,e.createElement)("div",{className:"inline-color-popup-inner-wrap block-editor-block-toolbar"},"first"===f&&(0,e.createElement)(Wn,{color:S,onChange:e=>O(e,""),onChangeComplete:e=>{T(e,""),u&&u("")}}),"first"!==f&&(0,e.createElement)(Wn,{color:S,onChange:e=>O(e,""),onChangeComplete:e=>{T(e,""),u&&u("")}}),_&&(0,e.createElement)("div",{className:"kadence-pop-color-palette-swatches"},(0,qn.map)(_,(({color:t,slug:n,name:o})=>{const a={color:t},i=n.replace("theme-",""),l=i===r||!n.startsWith("theme-palette")&&r===t;return(0,e.createElement)("div",{key:t,className:"kadence-color-palette__item-wrapper"},(0,e.createElement)(jn.Tooltip,{text:o|| // translators: %s: color hex code e.g: "#f00". // translators: %s: color hex code e.g: "#f00". (0,Jn.sprintf)((0,Jn.__)("Color code: %s"),t)},(0,e.createElement)(jn.Button,{type:"button",className:"kadence-color-palette__item "+(l?"is-active":""),style:a,onClick:()=>{n.startsWith("theme-palette")?T(t,i):T(t,!1),u&&u(n)},"aria-label":o? // translators: %s: The name of the color e.g: "vivid red". // translators: %s: The name of the color e.g: "vivid red". (0,Jn.sprintf)((0,Jn.__)("Color: %s","kadence-blocks"),o): // translators: %s: color hex code e.g: "#f00". // translators: %s: color hex code e.g: "#f00". (0,Jn.sprintf)((0,Jn.__)("Color code: %s","kadence-blocks"),t),"aria-pressed":l})),i===r&&(0,e.createElement)(jn.Dashicon,{icon:"admin-site"}),!n.startsWith("theme-palette")&&r===t&&(0,e.createElement)(jn.Dashicon,{icon:"saved"}))}))))})}const lo=window.wp.primitives,so=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})),co=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})),uo=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})),po=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})),ho=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})),mo=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z"})),fo=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})),bo=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})),go=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})),vo=(0,e.createElement)(jn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(jn.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})),ko=(0,e.createElement)(jn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(jn.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})),yo=(0,e.createElement)(jn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(jn.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})),Eo=(0,e.createElement)(jn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(jn.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})),xo=(0,e.createElement)(jn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(jn.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})),_o=(0,e.createElement)(jn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,e.createElement)(jn.Path,{d:"M8 8v3h32V8H8zm32 29H8v3h32v-3zM17.911 14.318v8h12v-8h-12zM17.983 25.637v8h12v-8h-12z"})),wo=(0,e.createElement)(jn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},(0,e.createElement)(jn.Path,{d:"M8 8v3h32V8H8zm32 29H8v3h32v-3zM17.911 12.605v8h12v-8h-12zM17.993 27.275v8h12v-8h-12z"})),Co=(0,e.createElement)(jn.SVG,{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 48 48"},(0,e.createElement)(jn.Path,{d:"M8 40h3V8H8v32zM37 8v32h3V8h-3z"}),(0,e.createElement)(jn.Path,{d:"M12.605 18.089H20.605V30.089H12.605z"}),(0,e.createElement)(jn.Path,{d:"M27.275 18.007H35.275V30.007H27.275z"})),So=(0,e.createElement)(jn.SVG,{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 48 48"},(0,e.createElement)(jn.Path,{d:"M8 40h3V8H8v32zM37 8v32h3V8h-3z"}),(0,e.createElement)(jn.Path,{d:"M14.318 18.089H22.317999999999998V30.089H14.318z"}),(0,e.createElement)(jn.Path,{d:"M25.637 18.017H33.637V30.017H25.637z"}));function No({label:t,onChange:n,onChangeTablet:o,onChangeMobile:a,mobileValue:r,tabletValue:i,value:l,isCollapsed:s=!1,type:c="textAlign",reverse:u=!1}){const[d,p]=(0,zn.useState)("Desktop"),h=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);h!==d&&p(h);const{setPreviewDeviceType:m}=(0,Kn.useDispatch)("kadenceblocks/data");let f="",b=Xn.AlignmentToolbar;"justify"===c?b=Xn.JustifyToolbar:"vertical"===c?b=Xn.BlockVerticalAlignmentToolbar:"orientation"===c?f=[{icon:so,title:(0,Jn.__)("Horizontal Direction","kadence-blocks"),align:"row"},{icon:co,title:(0,Jn.__)("Vertical Direction","kadence-blocks"),align:"column"},{icon:uo,title:(0,Jn.__)("Horizontal Reverse","kadence-blocks"),align:"row-reverse"},{icon:po,title:(0,Jn.__)("Vertical Reverse","kadence-blocks"),align:"column-reverse"}]:"vertical-column"===c?f=[{icon:yo,title:(0,Jn.__)("Top","kadence-blocks"),align:"top"},{icon:ko,title:(0,Jn.__)("Middle","kadence-blocks"),align:"middle"},{icon:vo,title:(0,Jn.__)("Bottom","kadence-blocks"),align:"bottom"},{icon:Eo,title:(0,Jn.__)("Stretch","kadence-blocks"),align:"stretch"}]:"orientation-column"===c?f=[{icon:co,title:(0,Jn.__)("Vertical Direction","kadence-blocks"),align:"vertical"},{icon:so,title:(0,Jn.__)("Horizontal Direction","kadence-blocks"),align:"horizontal"},{icon:po,title:(0,Jn.__)("Vertical Reverse","kadence-blocks"),align:"vertical-reverse"},{icon:uo,title:(0,Jn.__)("Horizontal Reverse","kadence-blocks"),align:"horizontal-reverse"}]:"justify-align"===c?f=u?[{icon:ho,title:(0,Jn.__)("Start","kadence-blocks"),align:"flex-start"},{icon:mo,title:(0,Jn.__)("Center","kadence-blocks"),align:"center"},{icon:fo,title:(0,Jn.__)("End","kadence-blocks"),align:"flex-end"},{icon:bo,title:(0,Jn.__)("Stretch","kadence-blocks"),align:"stretch"}]:[{icon:fo,title:(0,Jn.__)("Start","kadence-blocks"),align:"flex-start"},{icon:mo,title:(0,Jn.__)("Center","kadence-blocks"),align:"center"},{icon:ho,title:(0,Jn.__)("End","kadence-blocks"),align:"flex-end"},{icon:bo,title:(0,Jn.__)("Stretch","kadence-blocks"),align:"stretch"}]:"justify-column"===c?f=u?[{icon:ho,title:(0,Jn.__)("Start","kadence-blocks"),align:"flex-start"},{icon:mo,title:(0,Jn.__)("Center","kadence-blocks"),align:"center"},{icon:fo,title:(0,Jn.__)("End","kadence-blocks"),align:"flex-end"},{icon:go,title:(0,Jn.__)("Space Between","kadence-blocks"),align:"space-between"},{icon:Co,title:(0,Jn.__)("Space Around","kadence-blocks"),align:"space-around"},{icon:So,title:(0,Jn.__)("Space Evenly","kadence-blocks"),align:"space-evenly"}]:[{icon:fo,title:(0,Jn.__)("Start","kadence-blocks"),align:"flex-start"},{icon:mo,title:(0,Jn.__)("Center","kadence-blocks"),align:"center"},{icon:ho,title:(0,Jn.__)("End","kadence-blocks"),align:"flex-end"},{icon:go,title:(0,Jn.__)("Space Between","kadence-blocks"),align:"space-between"},{icon:Co,title:(0,Jn.__)("Space Around","kadence-blocks"),align:"space-around"},{icon:So,title:(0,Jn.__)("Space Evenly","kadence-blocks"),align:"space-evenly"}]:"justify-vertical"===c&&(f=u?[{icon:vo,title:(0,Jn.__)("Bottom","kadence-blocks"),align:"top"},{icon:ko,title:(0,Jn.__)("Middle","kadence-blocks"),align:"middle"},{icon:yo,title:(0,Jn.__)("Top","kadence-blocks"),align:"bottom"},{icon:xo,title:(0,Jn.__)("Space Between","kadence-blocks"),align:"space-between"},{icon:wo,title:(0,Jn.__)("Space Around","kadence-blocks"),align:"space-around"},{icon:_o,title:(0,Jn.__)("Space Evenly","kadence-blocks"),align:"space-evenly"}]:[{icon:yo,title:(0,Jn.__)("Top","kadence-blocks"),align:"top"},{icon:ko,title:(0,Jn.__)("Middle","kadence-blocks"),align:"middle"},{icon:vo,title:(0,Jn.__)("Bottom","kadence-blocks"),align:"bottom"},{icon:xo,title:(0,Jn.__)("Space Between","kadence-blocks"),align:"space-between"},{icon:wo,title:(0,Jn.__)("Space Around","kadence-blocks"),align:"space-around"},{icon:_o,title:(0,Jn.__)("Space Evenly","kadence-blocks"),align:"space-evenly"}]);const g=[{name:"Desktop",key:"desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",key:"tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}],v={};return v.Mobile=(0,e.createElement)(b,{value:r||"",isCollapsed:s,onChange:e=>a(e),alignmentControls:f||void 0}),v.Tablet=(0,e.createElement)(b,{value:i||"",isCollapsed:s,onChange:e=>o(e),alignmentControls:f||void 0}),v.Desktop=(0,e.createElement)(b,{value:l||"",isCollapsed:s,onChange:e=>n(e),alignmentControls:f||void 0}),[n&&o&&a&&(0,e.createElement)("div",{className:`components-base-control kb-sidebar-alignment kb-responsive-align-control kb-responsive-align-${c}`},(0,e.createElement)("div",{className:"kadence-title-bar"},t&&(0,e.createElement)("span",{className:"kadence-control-title"},t),(0,e.createElement)(jn.ButtonGroup,{className:"kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(g,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===d?" is-active":""}`,isSmall:!0,"aria-pressed":d===t,onClick:()=>{return e=t,m((0,$n.capitalizeFirstLetter)(e)),void p((0,$n.capitalizeFirstLetter)(e));var e}},o))))),(0,e.createElement)("div",{className:"kb-responsive-align-control-inner"},v[d]?v[d]:v.Desktop))]}var Oo=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function To(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((o=e[n])===(a=t[n])||Oo(o)&&Oo(a)))return!1;var o,a;return!0}const Mo=function(e,t){var n;void 0===t&&(t=To);var o,a=[],r=!1;return function(){for(var i=[],l=0;l<arguments.length;l++)i[l]=arguments[l];return r&&n===this&&t(i,a)||(o=e.apply(this,i),r=!0,n=this,a=i),o}},Ao={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,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},Do=function(e){function t(e,o,s,c,p){for(var h,m,f,b,y,x=0,_=0,w=0,C=0,S=0,D=0,I=f=h=0,F=0,L=0,B=0,V=0,z=s.length,j=z-1,H="",U="",W="",G="";F<z;){if(m=s.charCodeAt(F),F===j&&0!==_+C+w+x&&(0!==_&&(m=47===_?10:47),C=w=x=0,z++,j++),0===_+C+w+x){if(F===j&&(0<L&&(H=H.replace(d,"")),0<H.trim().length)){switch(m){case 32:case 9:case 59:case 13:case 10:break;default:H+=s.charAt(F)}m=59}switch(m){case 123:for(h=(H=H.trim()).charCodeAt(0),f=1,V=++F;F<z;){switch(m=s.charCodeAt(F)){case 123:f++;break;case 125:f--;break;case 47:switch(m=s.charCodeAt(F+1)){case 42:case 47:e:{for(I=F+1;I<j;++I)switch(s.charCodeAt(I)){case 47:if(42===m&&42===s.charCodeAt(I-1)&&F+2!==I){F=I+1;break e}break;case 10:if(47===m){F=I+1;break e}}F=I}}break;case 91:m++;case 40:m++;case 34:case 39:for(;F++<j&&s.charCodeAt(F)!==m;);}if(0===f)break;F++}if(f=s.substring(V,F),0===h&&(h=(H=H.replace(u,"").trim()).charCodeAt(0)),64===h){switch(0<L&&(H=H.replace(d,"")),m=H.charCodeAt(1)){case 100:case 109:case 115:case 45:L=o;break;default:L=A}if(V=(f=t(o,L,f,m,p+1)).length,0<R&&(y=l(3,f,L=n(A,H,B),o,O,N,V,m,p,c),H=L.join(""),void 0!==y&&0===(V=(f=y.trim()).length)&&(m=0,f="")),0<V)switch(m){case 115:H=H.replace(E,i);case 100:case 109:case 45:f=H+"{"+f+"}";break;case 107:f=(H=H.replace(g,"$1 $2"))+"{"+f+"}",f=1===M||2===M&&r("@"+f,3)?"@-webkit-"+f+"@"+f:"@"+f;break;default:f=H+f,112===c&&(U+=f,f="")}else f=""}else f=t(o,n(o,H,B),f,c,p+1);W+=f,f=B=L=I=h=0,H="",m=s.charCodeAt(++F);break;case 125:case 59:if(1<(V=(H=(0<L?H.replace(d,""):H).trim()).length))switch(0===I&&(h=H.charCodeAt(0),45===h||96<h&&123>h)&&(V=(H=H.replace(" ",":")).length),0<R&&void 0!==(y=l(1,H,o,e,O,N,U.length,c,p,c))&&0===(V=(H=y.trim()).length)&&(H="\0\0"),h=H.charCodeAt(0),m=H.charCodeAt(1),h){case 0:break;case 64:if(105===m||99===m){G+=H+s.charAt(F);break}default:58!==H.charCodeAt(V-1)&&(U+=a(H,h,m,H.charCodeAt(2)))}B=L=I=h=0,H="",m=s.charCodeAt(++F)}}switch(m){case 13:case 10:47===_?_=0:0===1+h&&107!==c&&0<H.length&&(L=1,H+="\0"),0<R*P&&l(0,H,o,e,O,N,U.length,c,p,c),N=1,O++;break;case 59:case 125:if(0===_+C+w+x){N++;break}default:switch(N++,b=s.charAt(F),m){case 9:case 32:if(0===C+x+_)switch(S){case 44:case 58:case 9:case 32:b="";break;default:32!==m&&(b=" ")}break;case 0:b="\\0";break;case 12:b="\\f";break;case 11:b="\\v";break;case 38:0===C+_+x&&(L=B=1,b="\f"+b);break;case 108:if(0===C+_+x+T&&0<I)switch(F-I){case 2:112===S&&58===s.charCodeAt(F-3)&&(T=S);case 8:111===D&&(T=D)}break;case 58:0===C+_+x&&(I=F);break;case 44:0===_+w+C+x&&(L=1,b+="\r");break;case 34:case 39:0===_&&(C=C===m?0:0===C?m:C);break;case 91:0===C+_+w&&x++;break;case 93:0===C+_+w&&x--;break;case 41:0===C+_+x&&w--;break;case 40:0===C+_+x&&(0===h&&(2*S+3*D==533||(h=1)),w++);break;case 64:0===_+w+C+x+I+f&&(f=1);break;case 42:case 47:if(!(0<C+x+w))switch(_){case 0:switch(2*m+3*s.charCodeAt(F+1)){case 235:_=47;break;case 220:V=F,_=42}break;case 42:47===m&&42===S&&V+2!==F&&(33===s.charCodeAt(V+2)&&(U+=s.substring(V,F+1)),b="",_=0)}}0===_&&(H+=b)}D=S,S=m,F++}if(0<(V=U.length)){if(L=o,0<R&&void 0!==(y=l(2,U,L,e,O,N,V,c,p,c))&&0===(U=y).length)return G+U+W;if(U=L.join(",")+"{"+U+"}",0!=M*T){switch(2!==M||r(U,2)||(T=0),T){case 111:U=U.replace(k,":-moz-$1")+U;break;case 112:U=U.replace(v,"::-webkit-input-$1")+U.replace(v,"::-moz-$1")+U.replace(v,":-ms-input-$1")+U}T=0}}return G+U+W}function n(e,t,n){var a=t.trim().split(f);t=a;var r=a.length,i=e.length;switch(i){case 0:case 1:var l=0;for(e=0===i?"":e[0]+" ";l<r;++l)t[l]=o(e,t[l],n).trim();break;default:var s=l=0;for(t=[];l<r;++l)for(var c=0;c<i;++c)t[s++]=o(e[c]+" ",a[l],n).trim()}return t}function o(e,t,n){var o=t.charCodeAt(0);switch(33>o&&(o=(t=t.trim()).charCodeAt(0)),o){case 38:return t.replace(b,"$1"+e.trim());case 58:return e.trim()+t.replace(b,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(b,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function a(e,t,n,o){var i=e+";",l=2*t+3*n+4*o;if(944===l){e=i.indexOf(":",9)+1;var s=i.substring(e,i.length-1).trim();return s=i.substring(0,e).trim()+s+";",1===M||2===M&&r(s,1)?"-webkit-"+s+s:s}if(0===M||2===M&&!r(i,1))return i;switch(l){case 1015:return 97===i.charCodeAt(10)?"-webkit-"+i+i:i;case 951:return 116===i.charCodeAt(3)?"-webkit-"+i+i:i;case 963:return 110===i.charCodeAt(5)?"-webkit-"+i+i:i;case 1009:if(100!==i.charCodeAt(4))break;case 969:case 942:return"-webkit-"+i+i;case 978:return"-webkit-"+i+"-moz-"+i+i;case 1019:case 983:return"-webkit-"+i+"-moz-"+i+"-ms-"+i+i;case 883:if(45===i.charCodeAt(8))return"-webkit-"+i+i;if(0<i.indexOf("image-set(",11))return i.replace(S,"$1-webkit-$2")+i;break;case 932:if(45===i.charCodeAt(4))switch(i.charCodeAt(5)){case 103:return"-webkit-box-"+i.replace("-grow","")+"-webkit-"+i+"-ms-"+i.replace("grow","positive")+i;case 115:return"-webkit-"+i+"-ms-"+i.replace("shrink","negative")+i;case 98:return"-webkit-"+i+"-ms-"+i.replace("basis","preferred-size")+i}return"-webkit-"+i+"-ms-"+i+i;case 964:return"-webkit-"+i+"-ms-flex-"+i+i;case 1023:if(99!==i.charCodeAt(8))break;return"-webkit-box-pack"+(s=i.substring(i.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+i+"-ms-flex-pack"+s+i;case 1005:return h.test(i)?i.replace(p,":-webkit-")+i.replace(p,":-moz-")+i:i;case 1e3:switch(t=(s=i.substring(13).trim()).indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(t)){case 226:s=i.replace(y,"tb");break;case 232:s=i.replace(y,"tb-rl");break;case 220:s=i.replace(y,"lr");break;default:return i}return"-webkit-"+i+"-ms-"+s+i;case 1017:if(-1===i.indexOf("sticky",9))break;case 975:switch(t=(i=e).length-10,l=(s=(33===i.charCodeAt(t)?i.substring(0,t):i).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(111>s.charCodeAt(8))break;case 115:i=i.replace(s,"-webkit-"+s)+";"+i;break;case 207:case 102:i=i.replace(s,"-webkit-"+(102<l?"inline-":"")+"box")+";"+i.replace(s,"-webkit-"+s)+";"+i.replace(s,"-ms-"+s+"box")+";"+i}return i+";";case 938:if(45===i.charCodeAt(5))switch(i.charCodeAt(6)){case 105:return s=i.replace("-items",""),"-webkit-"+i+"-webkit-box-"+s+"-ms-flex-"+s+i;case 115:return"-webkit-"+i+"-ms-flex-item-"+i.replace(_,"")+i;default:return"-webkit-"+i+"-ms-flex-line-pack"+i.replace("align-content","").replace(_,"")+i}break;case 973:case 989:if(45!==i.charCodeAt(3)||122===i.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?a(e.replace("stretch","fill-available"),t,n,o).replace(":fill-available",":stretch"):i.replace(s,"-webkit-"+s)+i.replace(s,"-moz-"+s.replace("fill-",""))+i;break;case 962:if(i="-webkit-"+i+(102===i.charCodeAt(5)?"-ms-"+i:"")+i,211===n+o&&105===i.charCodeAt(13)&&0<i.indexOf("transform",10))return i.substring(0,i.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+i}return i}function r(e,t){var n=e.indexOf(1===t?":":"{"),o=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),I(2!==t?o:o.replace(w,"$1"),n,t)}function i(e,t){var n=a(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(x," or ($1)").substring(4):"("+t+")"}function l(e,t,n,o,a,r,i,l,s,u){for(var d,p=0,h=t;p<R;++p)switch(d=D[p].call(c,e,h,n,o,a,r,i,l,s,u)){case void 0:case!1:case!0:case null:break;default:h=d}if(h!==t)return h}function s(e){return void 0!==(e=e.prefix)&&(I=null,e?"function"!=typeof e?M=1:(M=2,I=e):M=0),s}function c(e,n){var o=e;if(33>o.charCodeAt(0)&&(o=o.trim()),o=[o],0<R){var a=l(-1,n,o,o,O,N,0,0,0,0);void 0!==a&&"string"==typeof a&&(n=a)}var r=t(A,o,n,0,0);return 0<R&&void 0!==(a=l(-2,r,o,o,O,N,r.length,0,0,0))&&(r=a),T=0,N=O=1,r}var u=/^\0+/g,d=/[\0\r\f]/g,p=/: */g,h=/zoo|gra/,m=/([,: ])(transform)/g,f=/,\r+?/g,b=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,k=/:(read-only)/g,y=/[svh]\w+-[tblr]{2}/,E=/\(\s*(.*)\s*\)/g,x=/([\s\S]*?);/g,_=/-self|flex-/g,w=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,N=1,O=1,T=0,M=1,A=[],D=[],R=0,I=null,P=0;return c.use=function e(t){switch(t){case void 0:case null:R=D.length=0;break;default:switch(t.constructor){case Array:for(var n=0,o=t.length;n<o;++n)e(t[n]);break;case Function:D[R++]=t;break;case Boolean:P=0|!!t}}return e},c.set=s,void 0!==e&&s(e),c};var Ro,Io,Po=a(8226),Fo=a.n(Po),Lo=/[A-Z]|^ms/g,Bo=(Ro=function(e){return e.replace(Lo,"-$&").toLowerCase()},Io={},function(e){return void 0===Io[e]&&(Io[e]=Ro(e)),Io[e]}),Vo=function(e,t){return null==t||"boolean"==typeof t?"":1===Ao[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"},zo=function e(t){for(var n=t.length,o=0,a="";o<n;o++){var r=t[o];if(null!=r){var i=void 0;switch(typeof r){case"boolean":break;case"function":i=e([r()]);break;case"object":if(Array.isArray(r))i=e(r);else for(var l in i="",r)r[l]&&l&&(i&&(i+=" "),i+=l);break;default:i=r}i&&(a&&(a+=" "),a+=i)}}return a},jo="undefined"!=typeof document;function Ho(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var Uo=function(){function e(e){this.isSpeedy=!0,this.tags=[],this.ctr=0,this.opts=e}var t=e.prototype;return t.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=Ho(this.opts),this.injected=!0},t.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},t.insert=function(e,t){if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else{var o=Ho(this.opts);this.tags.push(o),o.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(Ho(this.opts))},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0,this.injected=!1},e}();var Wo=function(e,t){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===t&&(t={});var n,o,a=t.key||"css",r=Fo()((function(e){n+=e,jo&&l.insert(e,c)}));void 0!==t.prefix&&(o={prefix:t.prefix});var i={registered:{},inserted:{},nonce:t.nonce,key:a},l=new Uo(t);jo&&l.inject();var s=new Do(o);s.use(t.stylisPlugins)(r);var c="";function u(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":return void 0!==e.__emotion_styles?e.toString():u.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return m.call(this,e);default:var n=i.registered[e];return!1===t&&void 0!==n?n:e}}var d,p,h=new WeakMap;function m(e){if(h.has(e))return h.get(e);var t="";return Array.isArray(e)?e.forEach((function(e){t+=u.call(this,e,!1)}),this):Object.keys(e).forEach((function(n){"object"!=typeof e[n]?void 0!==i.registered[e[n]]?t+=n+"{"+i.registered[e[n]]+"}":t+=Bo(n)+":"+Vo(n,e[n])+";":Array.isArray(e[n])&&"string"==typeof e[n][0]&&void 0===i.registered[e[n][0]]?e[n].forEach((function(e){t+=Bo(n)+":"+Vo(n,e)+";"})):t+=n+"{"+u.call(this,e[n],!1)+"}"}),this),h.set(e,t),t}var f=/label:\s*([^\s;\n{]+)\s*;/g,b=function(e){var t=!0,n="",o="";null==e||void 0===e.raw?(t=!1,n+=u.call(this,e,!1)):n+=e[0];for(var a=arguments.length,r=new Array(a>1?a-1:0),i=1;i<a;i++)r[i-1]=arguments[i];return r.forEach((function(o,a){n+=u.call(this,o,46===n.charCodeAt(n.length-1)),!0===t&&void 0!==e[a+1]&&(n+=e[a+1])}),this),p=n,n=n.replace(f,(function(e,t){return o+="-"+t,""})),d=function(e,t){return function(e){for(var t,n=e.length,o=0,a=0;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))+((1540483477*(t>>>16)&65535)<<16),o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:o^=(255&e.charCodeAt(a+2))<<16;case 2:o^=(255&e.charCodeAt(a+1))<<8;case 1:o=1540483477*(65535&(o^=255&e.charCodeAt(a)))+((1540483477*(o>>>16)&65535)<<16)}return o=1540483477*(65535&(o^=o>>>13))+((1540483477*(o>>>16)&65535)<<16),((o^=o>>>15)>>>0).toString(36)}(e+t)+t}(n,o),n};function g(e,t){void 0===i.inserted[d]&&(n="",s(e,t),i.inserted[d]=n)}var v=function(){var e=b.apply(this,arguments),t=a+"-"+d;return void 0===i.registered[t]&&(i.registered[t]=p),g("."+t,e),t};function k(e,t){var n="";return t.split(" ").forEach((function(t){void 0!==i.registered[t]?e.push(t):n+=t+" "})),n}function y(e,t){var n=[],o=k(n,e);return n.length<2?e:o+v(n,t)}function E(e){i.inserted[e]=!0}if(jo){var x=document.querySelectorAll("[data-emotion-"+a+"]");Array.prototype.forEach.call(x,(function(e){l.tags[0].parentNode.insertBefore(e,l.tags[0]),e.getAttribute("data-emotion-"+a).split(" ").forEach(E)}))}var _={flush:function(){jo&&(l.flush(),l.inject()),i.inserted={},i.registered={}},hydrate:function(e){e.forEach(E)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return y(zo(t))},merge:y,getRegisteredStyles:k,injectGlobal:function(){g("",b.apply(this,arguments))},keyframes:function(){var e=b.apply(this,arguments),t="animation-"+d;return g("","@keyframes "+t+"{"+e+"}"),t},css:v,sheet:l,caches:i};return e.__SECRET_EMOTION__=_,_}(void 0!==a.g?a.g:{}),Go=(Wo.flush,Wo.hydrate,Wo.cx,Wo.merge,Wo.getRegisteredStyles,Wo.injectGlobal),$o=(Wo.keyframes,Wo.css),qo=(Wo.sheet,Wo.caches,a(5795)),Xo=a(3146),Jo=a.n(Xo),Ko=a(8006),Yo=a(9790);function Zo(e){return Zo="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},Zo(e)}function Qo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ea(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ta(e,t,n){return t&&ea(e.prototype,t),n&&ea(e,n),e}function na(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oa(){return oa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},oa.apply(this,arguments)}function aa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){na(e,t,n[t])}))}return e}function ra(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&la(e,t)}function ia(e){return ia=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ia(e)}function la(e,t){return la=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},la(e,t)}function sa(e,t){if(null==e)return{};var n,o,a=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ca(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ua(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?ca(e):t}function da(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var pa=function(){};function ha(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function ma(e,t,n,o){var a=[t,o];if(n&&e)for(var r in n)n.hasOwnProperty(r)&&n[r]&&a.push("".concat(ha(e,r)));return a.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var fa=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===Zo(e)&&null!==e?[e]:[]};function ba(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ga(e){return ba(e)?window.pageYOffset:e.scrollTop}function va(e,t){ba(e)?window.scrollTo(0,t):e.scrollTop=t}function ka(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:pa,a=ga(e),r=t-a,i=0;!function t(){var l=function(e,t,n,o){return n*((e=e/o-1)*e*e+1)+t}(i+=10,a,r,n);va(e,l),i<n?Jo()(t):o(e)}()}function ya(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Ea=function(e){return"auto"===e?"bottom":e},xa=function(e){function t(){var e,n;Qo(this,t);for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];return na(ca(ca(n=ua(this,(e=ia(t)).call.apply(e,[this].concat(a))))),"state",{maxHeight:n.props.maxMenuHeight,placement:null}),na(ca(ca(n)),"getPlacement",(function(e){var t=n.props,o=t.minMenuHeight,a=t.maxMenuHeight,r=t.menuPlacement,i=t.menuPosition,l=t.menuShouldScrollIntoView,s=t.theme,c=n.context.getPortalPlacement;if(e){var u="fixed"===i,d=function(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,a=e.placement,r=e.shouldScroll,i=e.isFixedPosition,l=e.theme.spacing,s=function(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/,a=document.documentElement;if("fixed"===t.position)return a;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return a}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=s.getBoundingClientRect().height,d=n.getBoundingClientRect(),p=d.bottom,h=d.height,m=d.top,f=n.offsetParent.getBoundingClientRect().top,b=window.innerHeight,g=ga(s),v=parseInt(getComputedStyle(n).marginBottom,10),k=parseInt(getComputedStyle(n).marginTop,10),y=f-k,E=b-m,x=y+g,_=u-g-m,w=p-b+g+v,C=g+m-k,S=160;switch(a){case"auto":case"bottom":if(E>=h)return{placement:"bottom",maxHeight:t};if(_>=h&&!i)return r&&ka(s,w,S),{placement:"bottom",maxHeight:t};if(!i&&_>=o||i&&E>=o)return r&&ka(s,w,S),{placement:"bottom",maxHeight:i?E-v:_-v};if("auto"===a||i){var N=t,O=i?y:x;return O>=o&&(N=Math.min(O-v-l.controlHeight,t)),{placement:"top",maxHeight:N}}if("bottom"===a)return va(s,w),{placement:"bottom",maxHeight:t};break;case"top":if(y>=h)return{placement:"top",maxHeight:t};if(x>=h&&!i)return r&&ka(s,C,S),{placement:"top",maxHeight:t};if(!i&&x>=o||i&&y>=o){var T=t;return(!i&&x>=o||i&&y>=o)&&(T=i?y-k:x-k),r&&ka(s,C,S),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return c}({maxHeight:a,menuEl:e,minHeight:o,placement:r,shouldScroll:l&&!u,isFixedPosition:u,theme:s});c&&c(d),n.setState(d)}})),na(ca(ca(n)),"getUpdatedProps",(function(){var e=n.props.menuPlacement,t=n.state.placement||Ea(e);return aa({},n.props,{placement:t,maxHeight:n.state.maxHeight})})),n}return ra(t,e),ta(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(e.Component);na(xa,"contextTypes",{getPortalPlacement:S().func});var _a=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},wa=_a,Ca=_a,Sa=function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.innerProps;return n().createElement("div",oa({className:a($o(r("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},o)},i),t)};Sa.defaultProps={children:"No options"};var Na=function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.innerProps;return n().createElement("div",oa({className:a($o(r("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},o)},i),t)};Na.defaultProps={children:"Loading..."};var Oa=function(e){function t(){var e,n;Qo(this,t);for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];return na(ca(ca(n=ua(this,(e=ia(t)).call.apply(e,[this].concat(a))))),"state",{placement:null}),na(ca(ca(n)),"getPortalPlacement",(function(e){var t=e.placement;t!==Ea(n.props.menuPlacement)&&n.setState({placement:t})})),n}return ra(t,e),ta(t,[{key:"getChildContext",value:function(){return{getPortalPlacement:this.getPortalPlacement}}},{key:"render",value:function(){var e=this.props,t=e.appendTo,o=e.children,a=e.controlElement,r=e.menuPlacement,i=e.menuPosition,l=e.getStyles,s="fixed"===i;if(!t&&!s||!a)return null;var c=this.state.placement||Ea(r),u=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(a),d=s?0:window.pageYOffset,p={offset:u[c]+d,position:i,rect:u},h=n().createElement("div",{className:$o(l("menuPortal",p))},o);return t?(0,qo.createPortal)(h,t):h}}]),t}(e.Component);na(Oa,"childContextTypes",{getPortalPlacement:S().func});var Ta=Array.isArray,Ma=Object.keys,Aa=Object.prototype.hasOwnProperty;function Da(e,t){if(e===t)return!0;if(e&&t&&"object"==Zo(e)&&"object"==Zo(t)){var n,o,a,r=Ta(e),i=Ta(t);if(r&&i){if((o=e.length)!=t.length)return!1;for(n=o;0!=n--;)if(!Da(e[n],t[n]))return!1;return!0}if(r!=i)return!1;var l=e instanceof Date,s=t instanceof Date;if(l!=s)return!1;if(l&&s)return e.getTime()==t.getTime();var c=e instanceof RegExp,u=t instanceof RegExp;if(c!=u)return!1;if(c&&u)return e.toString()==t.toString();var d=Ma(e);if((o=d.length)!==Ma(t).length)return!1;for(n=o;0!=n--;)if(!Aa.call(t,d[n]))return!1;for(n=o;0!=n--;)if(!("_owner"===(a=d[n])&&e.$$typeof||Da(e[a],t[a])))return!1;return!0}return e!=e&&t!=t}function Ra(e,t){try{return Da(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}var Ia=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],Pa=function(e){for(var t=0;t<Ia.length;t++)e=e.replace(Ia[t].letters,Ia[t].base);return e},Fa=function(e){return e.replace(/^\s+|\s+$/g,"")},La=function(e){return"".concat(e.label," ").concat(e.value)},Ba=function(e){return n().createElement("span",oa({className:$o({label:"a11yText",zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},Va=function(e){function t(){return Qo(this,t),ua(this,ia(t).apply(this,arguments))}return ra(t,e),ta(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),o=(e.emotion,sa(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return n().createElement("input",oa({ref:t},o,{className:$o({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(e.Component),za=function(e){function t(){return Qo(this,t),ua(this,ia(t).apply(this,arguments))}return ra(t,e),ta(t,[{key:"componentDidMount",value:function(){this.props.innerRef((0,qo.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(e.Component),ja=["boxSizing","height","overflow","paddingRight","position"],Ha={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Ua(e){e.preventDefault()}function Wa(e){e.stopPropagation()}function Ga(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function $a(){return"ontouchstart"in window||navigator.maxTouchPoints}var qa=!("undefined"==typeof window||!window.document||!window.document.createElement),Xa=0,Ja=function(e){function t(){var e,n;Qo(this,t);for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];return na(ca(ca(n=ua(this,(e=ia(t)).call.apply(e,[this].concat(a))))),"originalStyles",{}),na(ca(ca(n)),"listenerOptions",{capture:!1,passive:!1}),n}return ra(t,e),ta(t,[{key:"componentDidMount",value:function(){var e=this;if(qa){var t=this.props,n=t.accountForScrollbars,o=t.touchScrollTarget,a=document.body,r=a&&a.style;if(n&&ja.forEach((function(t){var n=r&&r[t];e.originalStyles[t]=n})),n&&Xa<1){var i=parseInt(this.originalStyles.paddingRight,10)||0,l=document.body?document.body.clientWidth:0,s=window.innerWidth-l+i||0;Object.keys(Ha).forEach((function(e){var t=Ha[e];r&&(r[e]=t)})),r&&(r.paddingRight="".concat(s,"px"))}a&&$a()&&(a.addEventListener("touchmove",Ua,this.listenerOptions),o&&(o.addEventListener("touchstart",Ga,this.listenerOptions),o.addEventListener("touchmove",Wa,this.listenerOptions))),Xa+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(qa){var t=this.props,n=t.accountForScrollbars,o=t.touchScrollTarget,a=document.body,r=a&&a.style;Xa=Math.max(Xa-1,0),n&&Xa<1&&ja.forEach((function(t){var n=e.originalStyles[t];r&&(r[t]=n)})),a&&$a()&&(a.removeEventListener("touchmove",Ua,this.listenerOptions),o&&(o.removeEventListener("touchstart",Ga,this.listenerOptions),o.removeEventListener("touchmove",Wa,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}(e.Component);na(Ja,"defaultProps",{accountForScrollbars:!0});var Ka=function(e){function t(){var e,n;Qo(this,t);for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];return na(ca(ca(n=ua(this,(e=ia(t)).call.apply(e,[this].concat(a))))),"state",{touchScrollTarget:null}),na(ca(ca(n)),"getScrollTarget",(function(e){e!==n.state.touchScrollTarget&&n.setState({touchScrollTarget:e})})),na(ca(ca(n)),"blurSelectInput",(function(){document.activeElement&&document.activeElement.blur()})),n}return ra(t,e),ta(t,[{key:"render",value:function(){var e=this.props,t=e.children,o=e.isEnabled,a=this.state.touchScrollTarget;return o?n().createElement("div",null,n().createElement("div",{onClick:this.blurSelectInput,className:$o({position:"fixed",left:0,bottom:0,right:0,top:0})}),n().createElement(za,{innerRef:this.getScrollTarget},t),a?n().createElement(Ja,{touchScrollTarget:a}):null):t}}]),t}(e.PureComponent),Ya=function(e){function t(){var e,n;Qo(this,t);for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];return na(ca(ca(n=ua(this,(e=ia(t)).call.apply(e,[this].concat(a))))),"isBottom",!1),na(ca(ca(n)),"isTop",!1),na(ca(ca(n)),"scrollTarget",void 0),na(ca(ca(n)),"touchStart",void 0),na(ca(ca(n)),"cancelScroll",(function(e){e.preventDefault(),e.stopPropagation()})),na(ca(ca(n)),"handleEventDelta",(function(e,t){var o=n.props,a=o.onBottomArrive,r=o.onBottomLeave,i=o.onTopArrive,l=o.onTopLeave,s=n.scrollTarget,c=s.scrollTop,u=s.scrollHeight,d=s.clientHeight,p=n.scrollTarget,h=t>0,m=u-d-c,f=!1;m>t&&n.isBottom&&(r&&r(e),n.isBottom=!1),h&&n.isTop&&(l&&l(e),n.isTop=!1),h&&t>m?(a&&!n.isBottom&&a(e),p.scrollTop=u,f=!0,n.isBottom=!0):!h&&-t>c&&(i&&!n.isTop&&i(e),p.scrollTop=0,f=!0,n.isTop=!0),f&&n.cancelScroll(e)})),na(ca(ca(n)),"onWheel",(function(e){n.handleEventDelta(e,e.deltaY)})),na(ca(ca(n)),"onTouchStart",(function(e){n.touchStart=e.changedTouches[0].clientY})),na(ca(ca(n)),"onTouchMove",(function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)})),na(ca(ca(n)),"getScrollTarget",(function(e){n.scrollTarget=e})),n}return ra(t,e),ta(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&(e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return n().createElement(za,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(e.Component),Za=function(e){function t(){return Qo(this,t),ua(this,ia(t).apply(this,arguments))}return ra(t,e),ta(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,o=sa(e,["isEnabled"]);return t?n().createElement(Ya,o):this.props.children}}]),t}(e.Component);na(Za,"defaultProps",{isEnabled:!0});var Qa=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,o=t.isMulti,a=t.label,r=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(a||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(o?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},er=function(e,t){var n=t.value,o=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,o?" is disabled. Select another option.":", selected.")}},tr=function(e){return!!e.isDisabled},nr=function(e){function t(){return Qo(this,t),ua(this,ia(t).apply(this,arguments))}return ra(t,e),ta(t,[{key:"render",value:function(){var e=this.props,t=e.children,o=e.className,a=e.cx,r=e.isMulti,i=e.getStyles,l=e.hasValue;return n().createElement("div",{className:a($o(i("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":l},o)},t)}}]),t}(e.Component),or=function(e){var t=e.size,o=sa(e,["size"]);return n().createElement("svg",oa({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:$o({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},o))},ar=function(e){return n().createElement(or,oa({size:20},e),n().createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},rr=function(e){return n().createElement(or,oa({size:20},e),n().createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},ir=function(e){var t=e.isFocused,n=e.theme,o=n.spacing.baseUnit,a=n.colors;return{label:"indicatorContainer",color:t?a.neutral60:a.neutral20,display:"flex",padding:2*o,transition:"color 150ms",":hover":{color:t?a.neutral80:a.neutral40}}},lr=ir,sr=ir,cr="react-select-loading-indicator",ur=!1,dr=function(e){var t=e.color,o=e.delay,a=e.offset;return n().createElement("span",{className:$o({animationDuration:"1s",animationDelay:"".concat(o,"ms"),animationIterationCount:"infinite",animationName:cr,animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:a?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},pr=function(e){var t=e.className,o=e.cx,a=e.getStyles,r=e.innerProps,i=e.isFocused,l=e.isRtl,s=e.theme.colors,c=i?s.neutral80:s.neutral20;return ur||(Go("@keyframes ",cr,"{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),ur=!0),n().createElement("div",oa({},r,{className:o($o(a("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),n().createElement(dr,{color:c,delay:0,offset:l}),n().createElement(dr,{color:c,delay:160,offset:!0}),n().createElement(dr,{color:c,delay:320,offset:!l}))};pr.defaultProps={size:4};var hr=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},mr=function(e){var t=e.children,o=e.innerProps;return n().createElement("div",o,t)},fr=mr,br=mr,gr=function(e){function t(){return Qo(this,t),ua(this,ia(t).apply(this,arguments))}return ra(t,e),ta(t,[{key:"render",value:function(){var e=this.props,t=e.children,o=e.innerProps;return n().createElement("div",o,t||n().createElement(ar,{size:14}))}}]),t}(e.Component),vr=function(e){function t(){return Qo(this,t),ua(this,ia(t).apply(this,arguments))}return ra(t,e),ta(t,[{key:"render",value:function(){var e=this.props,t=e.children,o=e.className,a=e.components,r=e.cx,i=e.data,l=e.getStyles,s=e.innerProps,c=e.isDisabled,u=e.removeProps,d=e.selectProps,p=a.Container,h=a.Label,m=a.Remove,f=aa({className:r($o(l("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":c},o)},s),b={className:r($o(l("multiValueLabel",this.props)),{"multi-value__label":!0},o)},g=aa({className:r($o(l("multiValueRemove",this.props)),{"multi-value__remove":!0},o)},u);return n().createElement(p,{data:i,innerProps:f,selectProps:d},n().createElement(h,{data:i,innerProps:b,selectProps:d},t),n().createElement(m,{data:i,innerProps:g,selectProps:d}))}}]),t}(e.Component);na(vr,"defaultProps",{cropWithEllipsis:!0});var kr={ClearIndicator:function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.innerProps;return n().createElement("div",oa({},i,{className:a($o(r("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},o)}),t||n().createElement(ar,null))},Control:function(e){var t=e.children,o=e.cx,a=e.getStyles,r=e.className,i=e.isDisabled,l=e.isFocused,s=e.innerRef,c=e.innerProps,u=e.menuIsOpen;return n().createElement("div",oa({ref:s,className:o($o(a("control",e)),{control:!0,"control--is-disabled":i,"control--is-focused":l,"control--menu-is-open":u},r)},c),t)},DropdownIndicator:function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.innerProps;return n().createElement("div",oa({},i,{className:a($o(r("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},o)}),t||n().createElement(rr,null))},DownChevron:rr,CrossIcon:ar,Group:function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.Heading,l=e.headingProps,s=e.label,c=e.theme,u=e.selectProps;return n().createElement("div",{className:a($o(r("group",e)),{group:!0},o)},n().createElement(i,oa({},l,{selectProps:u,theme:c,getStyles:r,cx:a}),s),n().createElement("div",null,t))},GroupHeading:function(e){var t=e.className,o=e.cx,a=e.getStyles,r=e.theme,i=(e.selectProps,sa(e,["className","cx","getStyles","theme","selectProps"]));return n().createElement("div",oa({className:o($o(a("groupHeading",aa({theme:r},i))),{"group-heading":!0},t)},i))},IndicatorsContainer:function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles;return n().createElement("div",{className:a($o(r("indicatorsContainer",e)),{indicators:!0},o)},t)},IndicatorSeparator:function(e){var t=e.className,o=e.cx,a=e.getStyles,r=e.innerProps;return n().createElement("span",oa({},r,{className:o($o(a("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,o=e.cx,a=e.getStyles,r=e.innerRef,i=e.isHidden,l=e.isDisabled,s=e.theme,c=(e.selectProps,sa(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return n().createElement("div",{className:$o(a("input",aa({theme:s},c)))},n().createElement(Ko.A,oa({className:o(null,{input:!0},t),inputRef:r,inputStyle:hr(i),disabled:l},c)))},LoadingIndicator:pr,Menu:function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.innerRef,l=e.innerProps,s=a($o(r("menu",e)),{menu:!0},o);return n().createElement("div",oa({className:s},l,{ref:i}),t)},MenuList:function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.isMulti,l=e.innerRef;return n().createElement("div",{className:a($o(r("menuList",e)),{"menu-list":!0,"menu-list--is-multi":i},o),ref:l},t)},MenuPortal:Oa,LoadingMessage:Na,NoOptionsMessage:Sa,MultiValue:vr,MultiValueContainer:fr,MultiValueLabel:br,MultiValueRemove:gr,Option:function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.isDisabled,l=e.isFocused,s=e.isSelected,c=e.innerRef,u=e.innerProps;return n().createElement("div",oa({ref:c,className:a($o(r("option",e)),{option:!0,"option--is-disabled":i,"option--is-focused":l,"option--is-selected":s},o)},u),t)},Placeholder:function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.innerProps;return n().createElement("div",oa({className:a($o(r("placeholder",e)),{placeholder:!0},o)},i),t)},SelectContainer:function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.innerProps,l=e.isDisabled,s=e.isRtl;return n().createElement("div",oa({className:a($o(r("container",e)),{"--is-disabled":l,"--is-rtl":s},o)},i),t)},SingleValue:function(e){var t=e.children,o=e.className,a=e.cx,r=e.getStyles,i=e.isDisabled,l=e.innerProps;return n().createElement("div",oa({className:a($o(r("singleValue",e)),{"single-value":!0,"single-value--is-disabled":i},o)},l),t)},ValueContainer:nr},yr=function(e){return aa({},kr,e.components)},Er={clearIndicator:sr,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,n=e.isFocused,o=e.theme,a=o.colors,r=o.borderRadius,i=o.spacing;return{label:"control",alignItems:"center",backgroundColor:t?a.neutral5:a.neutral0,borderColor:t?a.neutral10:n?a.primary:a.neutral20,borderRadius:r,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(a.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:i.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?a.primary:a.neutral30}}},dropdownIndicator:lr,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,n=e.theme,o=n.spacing.baseUnit,a=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?a.neutral10:a.neutral20,marginBottom:2*o,marginTop:2*o,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,o=n.spacing,a=n.colors;return{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,visibility:t?"hidden":"visible",color:a.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,o=e.theme,a=o.colors,r=o.spacing.baseUnit;return{label:"loadingIndicator",color:t?a.neutral60:a.neutral20,display:"flex",padding:2*r,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Ca,menu:function(e){var t,n=e.placement,o=e.theme,a=o.borderRadius,r=o.spacing,i=o.colors;return na(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),na(t,"backgroundColor",i.neutral0),na(t,"borderRadius",a),na(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),na(t,"marginBottom",r.menuGutter),na(t,"marginTop",r.menuGutter),na(t,"position","absolute"),na(t,"width","100%"),na(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,o=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:o/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,o=t.colors,a=e.cropWithEllipsis;return{borderRadius:n/2,color:o.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:a?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,o=t.borderRadius,a=t.colors;return{alignItems:"center",borderRadius:o/2,backgroundColor:e.isFocused&&a.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}}},noOptionsMessage:wa,option:function(e){var t=e.isDisabled,n=e.isFocused,o=e.isSelected,a=e.theme,r=a.spacing,i=a.colors;return{label:"option",backgroundColor:o?i.primary:n?i.primary25:"transparent",color:t?i.neutral20:o?i.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*r.baseUnit,"px ").concat(3*r.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(o?i.primary:i.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,o=n.spacing,a=n.colors;return{label:"singleValue",color:t?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2,maxWidth:"calc(100% - ".concat(2*o.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"}}},xr={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}},_r={backspaceRemovesValue:!0,blurInputOnSelect:ya(),captureMenuScroll:!ya(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=aa({ignoreCase:!0,ignoreAccents:!0,stringify:La,trim:!0,matchFrom:"any"},undefined),o=n.ignoreCase,a=n.ignoreAccents,r=n.stringify,i=n.trim,l=n.matchFrom,s=i?Fa(t):t,c=i?Fa(r(e)):r(e);return o&&(s=s.toLowerCase(),c=c.toLowerCase()),a&&(s=Pa(s),c=Pa(c)),"start"===l?c.substr(0,s.length)===s:c.indexOf(s)>-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:tr,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},wr=1,Cr=function(e){function t(e){var n;Qo(this,t),na(ca(ca(n=ua(this,ia(t).call(this,e)))),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),na(ca(ca(n)),"blockOptionHover",!1),na(ca(ca(n)),"isComposing",!1),na(ca(ca(n)),"clearFocusValueOnUpdate",!1),na(ca(ca(n)),"commonProps",void 0),na(ca(ca(n)),"components",void 0),na(ca(ca(n)),"hasGroups",!1),na(ca(ca(n)),"initialTouchX",0),na(ca(ca(n)),"initialTouchY",0),na(ca(ca(n)),"inputIsHiddenAfterUpdate",void 0),na(ca(ca(n)),"instancePrefix",""),na(ca(ca(n)),"openAfterFocus",!1),na(ca(ca(n)),"scrollToFocusedOptionOnUpdate",!1),na(ca(ca(n)),"userIsDragging",void 0),na(ca(ca(n)),"controlRef",null),na(ca(ca(n)),"getControlRef",(function(e){n.controlRef=e})),na(ca(ca(n)),"focusedOptionRef",null),na(ca(ca(n)),"getFocusedOptionRef",(function(e){n.focusedOptionRef=e})),na(ca(ca(n)),"menuListRef",null),na(ca(ca(n)),"getMenuListRef",(function(e){n.menuListRef=e})),na(ca(ca(n)),"inputRef",null),na(ca(ca(n)),"getInputRef",(function(e){n.inputRef=e})),na(ca(ca(n)),"cacheComponents",(function(e){n.components=yr({components:e})})),na(ca(ca(n)),"focus",n.focusInput),na(ca(ca(n)),"blur",n.blurInput),na(ca(ca(n)),"onChange",(function(e,t){var o=n.props;(0,o.onChange)(e,aa({},t,{name:o.name}))})),na(ca(ca(n)),"setValue",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",o=arguments.length>2?arguments[2]:void 0,a=n.props,r=a.closeMenuOnSelect,i=a.isMulti;n.onInputChange("",{action:"set-value"}),r&&(n.inputIsHiddenAfterUpdate=!i,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:o})})),na(ca(ca(n)),"selectOption",(function(e){var t=n.props,o=t.blurInputOnSelect,a=t.isMulti,r=n.state.selectValue;if(a)if(n.isOptionSelected(e,r)){var i=n.getOptionValue(e);n.setValue(r.filter((function(e){return n.getOptionValue(e)!==i})),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,r)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(da(r),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,r)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));o&&n.blurInput()})),na(ca(ca(n)),"removeValue",(function(e){var t=n.state.selectValue,o=n.getOptionValue(e);n.onChange(t.filter((function(e){return n.getOptionValue(e)!==o})),{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()})),na(ca(ca(n)),"clearValue",(function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})})),na(ca(ca(n)),"popValue",(function(){var e=n.state.selectValue,t=e[e.length-1];n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(e.slice(0,e.length-1),{action:"pop-value",removedValue:t})})),na(ca(ca(n)),"getOptionLabel",(function(e){return n.props.getOptionLabel(e)})),na(ca(ca(n)),"getOptionValue",(function(e){return n.props.getOptionValue(e)})),na(ca(ca(n)),"getStyles",(function(e,t){var o=Er[e](t);o.boxSizing="border-box";var a=n.props.styles[e];return a?a(o,t):o})),na(ca(ca(n)),"getElementId",(function(e){return"".concat(n.instancePrefix,"-").concat(e)})),na(ca(ca(n)),"getActiveDescendentId",(function(){var e=n.props.menuIsOpen,t=n.state,o=t.menuOptions,a=t.focusedOption;if(a&&e){var r=o.focusable.indexOf(a),i=o.render[r];return i&&i.key}})),na(ca(ca(n)),"announceAriaLiveSelection",(function(e){var t=e.event,o=e.context;n.setState({ariaLiveSelection:er(t,o)})})),na(ca(ca(n)),"announceAriaLiveContext",(function(e){var t=e.event,o=e.context;n.setState({ariaLiveContext:Qa(t,aa({},o,{label:n.props["aria-label"]}))})})),na(ca(ca(n)),"onMenuMouseDown",(function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())})),na(ca(ca(n)),"onMenuMouseMove",(function(e){n.blockOptionHover=!1})),na(ca(ca(n)),"onControlMouseDown",(function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()})),na(ca(ca(n)),"onDropdownIndicatorMouseDown",(function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,o=t.isMulti,a=t.menuIsOpen;n.focusInput(),a?(n.inputIsHiddenAfterUpdate=!o,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}})),na(ca(ca(n)),"onClearIndicatorMouseDown",(function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout((function(){return n.focusInput()})))})),na(ca(ca(n)),"onScroll",(function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&ba(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()})),na(ca(ca(n)),"onCompositionStart",(function(){n.isComposing=!0})),na(ca(ca(n)),"onCompositionEnd",(function(){n.isComposing=!1})),na(ca(ca(n)),"onTouchStart",(function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)})),na(ca(ca(n)),"onTouchMove",(function(e){var t=e.touches.item(0);if(t){var o=Math.abs(t.clientX-n.initialTouchX),a=Math.abs(t.clientY-n.initialTouchY);n.userIsDragging=o>5||a>5}})),na(ca(ca(n)),"onTouchEnd",(function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)})),na(ca(ca(n)),"onControlTouchEnd",(function(e){n.userIsDragging||n.onControlMouseDown(e)})),na(ca(ca(n)),"onClearIndicatorTouchEnd",(function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)})),na(ca(ca(n)),"onDropdownIndicatorTouchEnd",(function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)})),na(ca(ca(n)),"handleInputChange",(function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()})),na(ca(ca(n)),"onInputFocus",(function(e){var t=n.props,o=t.isSearchable,a=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:o,isMulti:a}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1})),na(ca(ca(n)),"onInputBlur",(function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))})),na(ca(ca(n)),"onOptionHover",(function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})})),na(ca(ca(n)),"shouldHideSelectedOptions",(function(){var e=n.props,t=e.hideSelectedOptions,o=e.isMulti;return void 0===t?o:t})),na(ca(ca(n)),"onKeyDown",(function(e){var t=n.props,o=t.isMulti,a=t.backspaceRemovesValue,r=t.escapeClearsValue,i=t.inputValue,l=t.isClearable,s=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,h=n.state,m=h.focusedOption,f=h.focusedValue,b=h.selectValue;if(!(s||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!o||i)return;n.focusValue("previous");break;case"ArrowRight":if(!o||i)return;n.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(f)n.removeValue(f);else{if(!a)return;o?n.popValue():l&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!c||!d||!m||p&&n.isOptionSelected(m,b))return;n.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(c){if(!m)return;if(n.isComposing)return;n.selectOption(m);break}return;case"Escape":c?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):l&&r&&n.clearValue();break;case" ":if(i)return;if(!c){n.openMenu("first");break}if(!m)return;n.selectOption(m);break;case"ArrowUp":c?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":c?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!c)return;n.focusOption("pageup");break;case"PageDown":if(!c)return;n.focusOption("pagedown");break;case"Home":if(!c)return;n.focusOption("first");break;case"End":if(!c)return;n.focusOption("last");break;default:return}e.preventDefault()}}));var o=e.value;n.cacheComponents=Mo(n.cacheComponents,Ra).bind(ca(ca(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++wr);var a=fa(o),r=n.buildMenuOptions(e,a);return n.state.menuOptions=r,n.state.selectValue=a,n}return ra(t,e),ta(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,o=t.value,a=t.inputValue;if(this.cacheComponents(e.components),e.value!==o||e.options!==n||e.inputValue!==a){var r=fa(e.value),i=this.buildMenuOptions(e,r),l=this.getNextFocusedValue(r),s=this.getNextFocusedOption(i.focusable);this.setState({menuOptions:i,selectValue:r,focusedOption:s,focusedValue:l})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,o,a,r,i=this.props,l=i.isDisabled,s=i.menuIsOpen,c=this.state.isFocused;(c&&!l&&e.isDisabled||c&&s&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,o=t.getBoundingClientRect(),a=n.getBoundingClientRect(),r=n.offsetHeight/3,a.bottom+r>o.bottom?va(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+r,t.scrollHeight)):a.top-r<o.top&&va(t,Math.max(n.offsetTop-r,0))),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this.state,n=t.menuOptions,o=t.selectValue,a=t.isFocused,r=this.props.isMulti,i="first"===e?0:n.focusable.length-1;if(!r){var l=n.focusable.indexOf(o[0]);l>-1&&(i=l)}this.scrollToFocusedOptionOnUpdate=!(a&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[i]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,o=t.isSearchable,a=this.state,r=a.selectValue,i=a.focusedValue;if(n){this.setState({focusedOption:null});var l=r.indexOf(i);i||(l=-1,this.announceAriaLiveContext({event:"value"}));var s=r.length-1,c=-1;if(r.length){switch(e){case"previous":c=0===l?0:-1===l?s:l-1;break;case"next":l>-1&&l<s&&(c=l+1)}-1===c&&this.announceAriaLiveContext({event:"input",context:{isSearchable:o,isMulti:n}}),this.setState({inputIsHidden:-1!==c,focusedValue:r[c]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,o=n.focusedOption,a=n.menuOptions.focusable;if(a.length){var r=0,i=a.indexOf(o);o||(i=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?r=i>0?i-1:a.length-1:"down"===e?r=(i+1)%a.length:"pageup"===e?(r=i-t)<0&&(r=0):"pagedown"===e?(r=i+t)>a.length-1&&(r=a.length-1):"last"===e&&(r=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[r],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:tr(a[r])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(xr):aa({},xr,this.props.theme):xr}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,o=this.selectOption,a=this.props,r=a.classNamePrefix,i=a.isMulti,l=a.isRtl,s=a.options,c=this.state.selectValue,u=this.hasValue();return{cx:ma.bind(null,r),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:u,isMulti:i,isRtl:l,options:s,selectOption:o,setValue:n,selectProps:a,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,o=t.selectValue.indexOf(n);if(o>-1){if(e.indexOf(n)>-1)return n;if(o<e.length)return e[o]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var o=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===o}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}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:"buildMenuOptions",value:function(e,t){var n=this,o=e.inputValue,a=void 0===o?"":o,r=e.options,i=function(e,o){var r=n.isOptionDisabled(e,t),i=n.isOptionSelected(e,t),l=n.getOptionLabel(e),s=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&i||!n.filterOption({label:l,value:s,data:e},a))){var c=r?void 0:function(){return n.onOptionHover(e)},u=r?void 0:function(){return n.selectOption(e)},d="".concat(n.getElementId("option"),"-").concat(o);return{innerProps:{id:d,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:e,isDisabled:r,isSelected:i,key:d,label:l,type:"option",value:s}}};return r.reduce((function(e,t,o){if(t.options){n.hasGroups||(n.hasGroups=!0);var a=t.options.map((function(t,n){var a=i(t,"".concat(o,"-").concat(n));return a&&e.focusable.push(t),a})).filter(Boolean);if(a.length){var r="".concat(n.getElementId("group"),"-").concat(o);e.render.push({type:"group",key:r,data:t,options:a})}}else{var l=i(t,"".concat(o));l&&(e.render.push(l),e.focusable.push(t))}return e}),{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,o=e.focusedValue,a=e.focusedOption,r=this.props,i=r.options,l=r.menuIsOpen,s=r.inputValue,c=r.screenReaderStatus,u=o?function(e){var t=e.focusedValue,n=e.selectValue;return"value ".concat((0,e.getOptionLabel)(t)," focused, ").concat(n.indexOf(t)+1," of ").concat(n.length,".")}({focusedValue:o,getOptionLabel:this.getOptionLabel,selectValue:n}):"",d=a&&l?function(e){var t=e.focusedOption,n=e.options;return"option ".concat((0,e.getOptionLabel)(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(n.indexOf(t)+1," of ").concat(n.length,".")}({focusedOption:a,getOptionLabel:this.getOptionLabel,options:i}):"",p=function(e){var t=e.inputValue;return"".concat(e.screenReaderMessage).concat(t?" for search term "+t:"",".")}({inputValue:s,screenReaderMessage:c({count:this.countOptions()})});return"".concat(u," ").concat(d," ").concat(p," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,o=e.isSearchable,a=e.inputId,r=e.inputValue,i=e.tabIndex,l=this.components.Input,s=this.state.inputIsHidden,c=a||this.getElementId("input");if(!o)return n().createElement(Va,{id:c,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:pa,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:i,value:""});var u={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},d=this.commonProps,p=d.cx,h=d.theme,m=d.selectProps;return n().createElement(l,oa({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:c,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:m,spellCheck:"false",tabIndex:i,theme:h,type:"text",value:r},u))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,o=t.MultiValue,a=t.MultiValueContainer,r=t.MultiValueLabel,i=t.MultiValueRemove,l=t.SingleValue,s=t.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,p=u.isDisabled,h=u.isMulti,m=u.inputValue,f=u.placeholder,b=this.state,g=b.selectValue,v=b.focusedValue,k=b.isFocused;if(!this.hasValue()||!d)return m?null:n().createElement(s,oa({},c,{key:"placeholder",isDisabled:p,isFocused:k}),f);if(h){var y=g.map((function(t){var l=t===v;return n().createElement(o,oa({},c,{components:{Container:a,Label:r,Remove:i},isFocused:l,isDisabled:p,key:e.getOptionValue(t),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"))}));return y}if(m)return null;var E=g[0];return n().createElement(l,oa({},c,{data:E,isDisabled:p}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,o=this.props,a=o.isDisabled,r=o.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||a||!this.hasValue()||r)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return n().createElement(e,oa({},t,{innerProps:l,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,o=this.props,a=o.isDisabled,r=o.isLoading,i=this.state.isFocused;return e&&r?n().createElement(e,oa({},t,{innerProps:{"aria-hidden":"true"},isDisabled:a,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,o=e.IndicatorSeparator;if(!t||!o)return null;var a=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused;return n().createElement(o,oa({},a,{isDisabled:r,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return n().createElement(e,oa({},t,{innerProps:r,isDisabled:o,isFocused:a}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,o=t.Group,a=t.GroupHeading,r=t.Menu,i=t.MenuList,l=t.MenuPortal,s=t.LoadingMessage,c=t.NoOptionsMessage,u=t.Option,d=this.commonProps,p=this.state,h=p.focusedOption,m=p.menuOptions,f=this.props,b=f.captureMenuScroll,g=f.inputValue,v=f.isLoading,k=f.loadingMessage,y=f.minMenuHeight,E=f.maxMenuHeight,x=f.menuIsOpen,_=f.menuPlacement,w=f.menuPosition,C=f.menuPortalTarget,S=f.menuShouldBlockScroll,N=f.menuShouldScrollIntoView,O=f.noOptionsMessage,T=f.onMenuScrollToTop,M=f.onMenuScrollToBottom;if(!x)return null;var A,D=function(t){var o=h===t.data;return t.innerRef=o?e.getFocusedOptionRef:void 0,n().createElement(u,oa({},d,t,{isFocused:o}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())A=m.render.map((function(t){if("group"===t.type){t.type;var r=sa(t,["type"]),i="".concat(t.key,"-heading");return n().createElement(o,oa({},d,r,{Heading:a,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return D(e)})))}if("option"===t.type)return D(t)}));else if(v){var R=k({inputValue:g});if(null===R)return null;A=n().createElement(s,d,R)}else{var I=O({inputValue:g});if(null===I)return null;A=n().createElement(c,d,I)}var P={minMenuHeight:y,maxMenuHeight:E,menuPlacement:_,menuPosition:w,menuShouldScrollIntoView:N},F=n().createElement(xa,oa({},d,P),(function(t){var o=t.ref,a=t.placerProps,l=a.placement,s=a.maxHeight;return n().createElement(r,oa({},d,P,{innerRef:o,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:l}),n().createElement(Za,{isEnabled:b,onTopArrive:T,onBottomArrive:M},n().createElement(Ka,{isEnabled:S},n().createElement(i,oa({},d,{innerRef:e.getMenuListRef,isLoading:v,maxHeight:s}),A))))}));return C||"fixed"===w?n().createElement(l,oa({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:_,menuPosition:w}),F):F}},{key:"renderFormField",value:function(){var e=this,t=this.props,o=t.delimiter,a=t.isDisabled,r=t.isMulti,i=t.name,l=this.state.selectValue;if(i&&!a){if(r){if(o){var s=l.map((function(t){return e.getOptionValue(t)})).join(o);return n().createElement("input",{name:i,type:"hidden",value:s})}var c=l.length>0?l.map((function(t,o){return n().createElement("input",{key:"i-".concat(o),name:i,type:"hidden",value:e.getOptionValue(t)})})):n().createElement("input",{name:i,type:"hidden"});return n().createElement("div",null,c)}var u=l[0]?this.getOptionValue(l[0]):"";return n().createElement("input",{name:i,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?n().createElement(Ba,{"aria-live":"assertive"},n().createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),n().createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,o=e.IndicatorsContainer,a=e.SelectContainer,r=e.ValueContainer,i=this.props,l=i.className,s=i.id,c=i.isDisabled,u=i.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return n().createElement(a,oa({},p,{className:l,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),n().createElement(t,oa({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),n().createElement(r,oa({},p,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),n().createElement(o,oa({},p,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(e.Component);na(Cr,"defaultProps",_r);var Sr={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Nr=function(t){var o,a;return a=o=function(e){function o(){var e,t;Qo(this,o);for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return na(ca(ca(t=ua(this,(e=ia(o)).call.apply(e,[this].concat(a))))),"select",void 0),na(ca(ca(t)),"state",{inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue}),na(ca(ca(t)),"onChange",(function(e,n){t.callProp("onChange",e,n),t.setState({value:e})})),na(ca(ca(t)),"onInputChange",(function(e,n){var o=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==o?o:e})})),na(ca(ca(t)),"onMenuOpen",(function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})})),na(ca(ca(t)),"onMenuClose",(function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})})),t}return ra(o,e),ta(o,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,o=new Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return(t=this.props)[e].apply(t,o)}}},{key:"render",value:function(){var e=this,o=this.props,a=(o.defaultInputValue,o.defaultMenuIsOpen,o.defaultValue,sa(o,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return n().createElement(t,oa({},a,{ref:function(t){e.select=t},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),o}(e.Component),na(o,"defaultProps",Sr),a},Or={cacheOptions:!1,defaultOptions:!1,filterOption:null},Tr=function(t){var o,a;return a=o=function(e){function o(e){var t;return Qo(this,o),na(ca(ca(t=ua(this,ia(o).call(this)))),"select",void 0),na(ca(ca(t)),"lastRequest",void 0),na(ca(ca(t)),"mounted",!1),na(ca(ca(t)),"optionsCache",{}),na(ca(ca(t)),"handleInputChange",(function(e,n){var o=t.props,a=o.cacheOptions,r=function(e,t,n){if(n){var o=n(e,t);if("string"==typeof o)return o}return e}(e,n,o.onInputChange);if(!r)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(a&&t.optionsCache[r])t.setState({inputValue:r,loadedInputValue:r,loadedOptions:t.optionsCache[r],isLoading:!1,passEmptyOptions:!1});else{var i=t.lastRequest={};t.setState({inputValue:r,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},(function(){t.loadOptions(r,(function(e){t.mounted&&(e&&(t.optionsCache[r]=e),i===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:r,loadedOptions:e||[],passEmptyOptions:!1})))}))}))}return r})),t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:void 0!==e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return ra(o,e),ta(o,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,(function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}}))}},{key:"componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var o=n(e,t);o&&"function"==typeof o.then&&o.then(t,(function(){return t()}))}},{key:"render",value:function(){var e=this,o=this.props,a=(o.loadOptions,sa(o,["loadOptions"])),r=this.state,i=r.defaultOptions,l=r.inputValue,s=r.isLoading,c=r.loadedInputValue,u=r.loadedOptions,d=r.passEmptyOptions?[]:l&&c?u:i||[];return n().createElement(t,oa({},a,{ref:function(t){e.select=t},options:d,isLoading:s,onInputChange:this.handleInputChange}))}}]),o}(e.Component),na(o,"defaultProps",Or),a},Mr=(Tr(Nr(Cr)),function(){var e=arguments.length>1?arguments[1]:void 0,t=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase(),n=String(e.value).toLowerCase(),o=String(e.label).toLowerCase();return n===t||o===t}),Ar=aa({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some((function(t){return Mr(e,t)}))||n.some((function(t){return Mr(e,t)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),Dr=function(t){var o,a;return a=o=function(e){function o(e){var t;Qo(this,o),na(ca(ca(t=ua(this,ia(o).call(this,e)))),"select",void 0),na(ca(ca(t)),"onChange",(function(e,n){var o=t.props,a=o.getNewOptionData,r=o.inputValue,i=o.isMulti,l=o.onChange,s=o.onCreateOption,c=o.value;if("select-option"!==n.action)return l(e,n);var u=t.state.newOption,d=Array.isArray(e)?e:[e];if(d[d.length-1]!==u)l(e,n);else if(s)s(r);else{var p=a(r,r);l(i?[].concat(da(fa(c)),[p]):p,{action:"create-option"})}}));var n=e.options||[];return t.state={newOption:void 0,options:n},t}return ra(o,e),ta(o,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,o=e.formatCreateLabel,a=e.getNewOptionData,r=e.inputValue,i=e.isLoading,l=e.isValidNewOption,s=e.value,c=e.options||[],u=this.state.newOption;u=l(r,fa(s),c)?a(r,o(r)):void 0,this.setState({newOption:u,options:!t&&i||!u?c:"first"===n?[u].concat(da(c)):[].concat(da(c),[u])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var e=this,o=oa({},this.props),a=this.state.options;return n().createElement(t,oa({},o,{ref:function(t){e.select=t},options:a,onChange:this.onChange}))}}]),o}(e.Component),na(o,"defaultProps",Ar),a},Rr=(Nr(Dr(Cr)),Tr(Nr(Dr(Cr))),function(e){var t=e.component,o=e.duration,a=void 0===o?1:o,r=e.in,i=(e.onExited,sa(e,["component","duration","in","onExited"])),l={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(a,"ms")},exiting:{opacity:0},exited:{opacity:0}};return n().createElement(Yo.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:r,timeout:a},(function(e){var o={style:aa({},l[e])};return n().createElement(t,oa({innerProps:o},i))}))}),Ir=function(e){function t(){var e,n;Qo(this,t);for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];return na(ca(ca(n=ua(this,(e=ia(t)).call.apply(e,[this].concat(a))))),"duration",260),na(ca(ca(n)),"rafID",void 0),na(ca(ca(n)),"state",{width:"auto"}),na(ca(ca(n)),"transition",{exiting:{width:0,transition:"width ".concat(n.duration,"ms ease-out")},exited:{width:0}}),na(ca(ca(n)),"getWidth",(function(e){e&&isNaN(n.state.width)&&(n.rafID=window.requestAnimationFrame((function(){var t=e.getBoundingClientRect().width;n.setState({width:t})})))})),na(ca(ca(n)),"getStyle",(function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}})),na(ca(ca(n)),"getTransition",(function(e){return n.transition[e]})),n}return ra(t,e),ta(t,[{key:"componentWillUnmount",value:function(){this.rafID&&window.cancelAnimationFrame(this.rafID)}},{key:"render",value:function(){var e=this,t=this.props,o=t.children,a=t.in,r=this.state.width;return n().createElement(Yo.Transition,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:a,timeout:this.duration},(function(t){var a=aa({},e.getStyle(r),e.getTransition(t));return n().createElement("div",{ref:e.getWidth,style:a},o)}))}}]),t}(e.Component),Pr=function(e){return function(t){var o=t.in,a=t.onExited,r=sa(t,["in","onExited"]);return n().createElement(Ir,{in:o,onExited:a},n().createElement(e,oa({cropWithEllipsis:o},r)))}},Fr=function(e){return function(t){return n().createElement(Rr,oa({component:e,duration:t.isMulti?260:1},t))}},Lr=function(e){return function(t){return n().createElement(Rr,oa({component:e},t))}},Br=function(e){return function(t){return n().createElement(Yo.TransitionGroup,oa({component:e},t))}},Vr=function(){var e,t=yr({components:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}),o=t.Input,a=t.MultiValue,r=t.Placeholder,i=t.SingleValue,l=t.ValueContainer,s=sa(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return aa({Input:(e=o,function(t){t.in,t.onExited,t.appear,t.enter,t.exit;var o=sa(t,["in","onExited","appear","enter","exit"]);return n().createElement(e,o)}),MultiValue:Pr(a),Placeholder:Fr(r),SingleValue:Lr(i),ValueContainer:Br(l)},s)},zr=Vr();zr.Input,zr.MultiValue,zr.Placeholder,zr.SingleValue,zr.ValueContainer,Mo(Vr,Ra);const jr=Nr(Cr),Hr=window.wp.url;class Ur extends zn.Component{constructor(){super(...arguments),this.state={options:[],isLoading:!1,page:1,hasMore:!1}}componentDidMount(){this.fetchPostAbortController=new AbortController,this.fetchTerms()}componentWillUnmount(){this.fetchPostAbortController&&this.fetchPostAbortController.abort()}fetchTerms(){const{restBase:e}=this.props,{page:t,options:n,search:o}=this.state,a={page:t,per_page:10};o&&o.length>=3&&(a.search=o),this.setState({isLoading:!0}),(0,$n.fetchJson)({path:(0,Hr.addQueryArgs)(`${e}/`,a),signal:this.fetchPostAbortController.signal}).then((([e,o])=>{const a=(0,qn.uniqBy)([...n,...e.map((e=>({value:e.id,label:e.title.rendered})))],"value");this.setState({options:a,hasMore:parseInt(o["x-wp-totalpages"],10)>t,isLoading:!1})}))}fetchMoreTerms(){const{page:e,hasMore:t,isLoading:n}=this.state;t&&!n&&this.setState({page:e+1},(()=>this.fetchTerms()))}updateSearch(e){e.length>=3&&this.setState({search:e,page:1},(()=>this.fetchTerms()))}handleChange(e){const{onChange:t}=this.props;this.setState({search:null,page:1}),t(e)}render(){return(0,e.createElement)("div",{className:"term-select-form-row"},(0,e.createElement)("label",{htmlFor:this.props.fieldId,className:"screen-reader-text"},this.props.placeholder),(0,e.createElement)(jr,{value:this.props.value,onChange:e=>this.handleChange(e),id:this.props.fieldId,options:this.state.options,isMulti:this.props.allowMulti,classNamePrefix:"kt-tax-select",isLoading:this.state.isLoading,onMenuScrollToBottom:()=>this.fetchMoreTerms(),onInputChange:e=>this.updateSearch(e),maxMenuHeight:300,placeholder:this.props.placeholder}))}}Ur.propTypes={fieldId:S().string.isRequired,label:S().string.isRequired,restBase:S().string.isRequired,onChange:S().func.isRequired};const Wr=Ur;var Gr=a(5371),$r=a.n(Gr);const qr=window.wp.compose;if(void 0===Xr)var Xr=[];class Jr extends zn.Component{constructor(){super(...arguments),this.handleLoading=this.handleLoading.bind(this),this.handleActive=this.handleActive.bind(this),this.handleInactive=this.handleInactive.bind(this),this.loadFonts=this.loadFonts.bind(this),this.state={status:void 0,mounted:!1}}addFont(e){Xr.includes(e)||Xr.push(e)}handleLoading(){this.setState({status:"loading"})}handleActive(){this.setState({status:"active"})}handleInactive(){this.setState({status:"inactive"})}loadFonts(){this.state.mounted&&(Xr.includes(this.props.config.google.families[0])||($r().load({...this.props.config,loading:this.handleLoading,active:this.handleActive,inactive:this.handleInactive,context:frames["editor-canvas"]}),this.addFont(this.props.config.google.families[0])))}componentDidMount(){Xr=[],this.setState({mounted:!0,device:this.props.getPreviewDevice}),this.loadFonts()}componentDidUpdate(e,t){const{onStatus:n,config:o,getPreviewDevice:a}=this.props;t.status!==this.state.status&&n(this.state.status),this.state.device!==a?(Xr=[],this.setState({device:a}),this.loadFonts()):e.config!==o&&this.loadFonts()}componentWillUnmount(){this.setState({mounted:!1})}render(){const{children:e}=this.props;return e||null}}Jr.propTypes={config:S().object.isRequired,children:S().element,onStatus:S().func.isRequired},Jr.defaultProps={onStatus:()=>{}};const Kr=(0,qr.compose)([(0,Kn.withSelect)((e=>({getPreviewDevice:e("kadenceblocks/data").getPreviewDeviceType()})))])(Jr),Yr={inactive:"inactive",active:"active",loading:"loading"};function Zr({typography:e,clientId:t,id:n,children:o}){const[a,r]=(0,zn.useState)(void 0),{addWebFont:i}=(0,Kn.useDispatch)("kadenceblocks/data"),[l,s]=(0,zn.useState)("desktop"),{previewDevice:c,isUniqueFont:u}=(0,Kn.useSelect)((e=>({isUniqueFont:(t,n)=>e("kadenceblocks/data").isUniqueFont(t,n),previewDevice:e("kadenceblocks/data").getPreviewDeviceType()})),[]),d={google:{families:[e[0].family+(e?.[0]?.variant?":"+e[0].variant:"")]}},p=()=>{setTimeout((()=>{void 0!==d?.google?.families?.[0]&&u(d?.google?.families?.[0],frames["editor-canvas"]?"Desktop":"iframe")&&($r().load({...d,loading:h,active:m,inactive:f,context:frames["editor-canvas"]}),i(d?.google?.families?.[0],frames["editor-canvas"]?"Desktop":"iframe"))}),50)};(0,zn.useEffect)((()=>{s(c)}),[]),(0,zn.useEffect)((()=>{l!==c&&(s(c),p())}),[c]),(0,zn.useEffect)((()=>{p()}),[d]);const h=()=>{r(Yr.loading)},m=()=>{r(Yr.active)},f=()=>{r(Yr.inactive)};return o||null}const Qr=(0,jn.withFilters)("kadence.FormConditionals")((function(t){return(0,e.createElement)(e.Fragment,null)}));function ei({level:t,isPressed:n=!1}){const o={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z",h1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",h2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",h3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",h4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",h5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",h6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z",p:"M18.3 4H9.9v-.1l-.9.2c-2.3.4-4 2.4-4 4.8s1.7 4.4 4 4.8l.7.1V20h1.5V5.5h2.9V20h1.5V5.5h2.7V4z",span:"M.067 10.841l1.461-.092c.032.237.096.418.193.542.158.202.384.302.678.302.219 0 .388-.051.507-.154a.465.465 0 00.178-.358.454.454 0 00-.17-.345c-.113-.102-.375-.198-.786-.289-.674-.151-1.154-.352-1.441-.603a1.214 1.214 0 01-.434-.959c0-.255.074-.497.222-.724.148-.227.371-.405.668-.535.297-.13.705-.195 1.222-.195.635 0 1.119.118 1.453.354.333.236.531.612.594 1.127l-1.447.085c-.038-.224-.119-.387-.242-.488-.123-.102-.293-.153-.51-.153-.179 0-.313.038-.404.114a.346.346 0 00-.135.276c0 .079.037.15.112.213.072.066.244.127.515.183.671.145 1.152.291 1.442.439.29.148.502.332.634.551a1.4 1.4 0 01.198.736c0 .318-.088.612-.264.881a1.66 1.66 0 01-.739.612c-.317.139-.715.208-1.197.208-.845 0-1.43-.162-1.755-.488-.326-.325-.51-.739-.553-1.24zm5.274-3.326h2.552c.556 0 .973.133 1.249.397.277.264.416.641.416 1.129 0 .501-.151.893-.453 1.176-.301.282-.762.424-1.381.424h-.841v1.844H5.341v-4.97zm9.84 0h1.434l1.871 2.749V7.515h1.447v4.97h-1.447l-1.861-2.729v2.729h-1.444v-4.97zm-2.352 4.149H11.08l-.241.821H9.27l1.867-4.97h1.675l1.867 4.97h-1.606l-.244-.821zm-.322-1.074l-.55-1.786-.545 1.786h1.095zm-5.624-.956h.377c.296 0 .503-.051.623-.154a.498.498 0 00.18-.395.553.553 0 00-.156-.397c-.104-.108-.299-.162-.586-.162h-.438v1.108z",div:"M.035 6.184h3.504c.691 0 1.249.094 1.674.281.425.187.776.456 1.054.807.278.35.479.758.604 1.223.125.465.187.958.187 1.479 0 .816-.092 1.448-.278 1.898a3.136 3.136 0 01-.773 1.129c-.33.304-.684.506-1.062.607a5.464 5.464 0 01-1.406.208H.035V6.184zm8.356 0h2.364v7.632H8.391V6.184zm3.301 0h2.468l1.718 5.492 1.692-5.492h2.395l-2.832 7.632h-2.557l-2.884-7.632zM2.394 7.912v4.17h.578c.492 0 .843-.054 1.051-.164.208-.109.372-.3.49-.572.118-.273.177-.714.177-1.325 0-.809-.132-1.362-.396-1.661-.264-.298-.701-.448-1.312-.448h-.588z"};return o.hasOwnProperty(t)?(0,e.createElement)(jn.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:n},(0,e.createElement)(jn.Path,{d:o[t]})):null}class ti extends zn.Component{constructor(e,t=!0,n,o,a,r,i,l,s,c,u,d,p,h,m,f,b,g){super(...arguments)}render(){return(0,e.createElement)("div",{className:"components-base-control kt-box-shadow-container"},this.props.label&&(0,e.createElement)("div",{className:"kt-box-shadow-label"},(0,e.createElement)("h2",{className:"kt-beside-color-label"},this.props.label),this.props.onEnableChange&&(0,e.createElement)(jn.ToggleControl,{checked:this.props.enable,onChange:e=>this.props.onEnableChange(e)})),this.props.enable&&(0,e.createElement)("div",{className:"kt-inner-sub-section"},(0,e.createElement)("div",{className:"kt-inner-sub-section-row"},(0,e.createElement)("div",{className:"kt-box-color-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("Color")),(0,e.createElement)(Qn,{value:this.props.color?this.props.color:this.props.colorDefault,default:this.props.colorDefault,onChange:e=>this.props.onColorChange(e),opacityValue:this.props.opacity,onOpacityChange:e=>this.props.onOpacityChange(e),onArrayChange:this.props.onArrayChange?(e,t)=>this.props.onArrayChange(e,t):void 0})),(0,e.createElement)("div",{className:"kt-box-x-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("X")),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==this.props.hOffset?this.props.hOffset:"",onChange:e=>this.props.onHOffsetChange(Number(e.target.value)),min:-200,max:200,step:1,type:"number",className:"components-text-control__input"})))),(0,e.createElement)("div",{className:"kt-box-y-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("Y")),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==this.props.vOffset?this.props.vOffset:"",onChange:e=>this.props.onVOffsetChange(Number(e.target.value)),min:-200,max:200,step:1,type:"number",className:"components-text-control__input"})))),(0,e.createElement)("div",{className:"kt-box-blur-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("Blur")),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==this.props.blur?this.props.blur:"",onChange:e=>this.props.onBlurChange(Number(e.target.value)),min:0,max:200,step:1,type:"number",className:"components-text-control__input"})))),(0,e.createElement)("div",{className:"kt-box-spread-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("Spread")),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==this.props.spread?this.props.spread:"",onChange:e=>this.props.onSpreadChange(Number(e.target.value)),min:-200,max:200,step:1,type:"number",className:"components-text-control__input"}))))),this.props.onInsetChange&&(0,e.createElement)("div",{className:"kt-box-inset-settings"},(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Inset"),checked:this.props.inset,onChange:e=>this.props.onInsetChange(e)}))))}}const ni=ti;class oi extends zn.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.state={open:!1},this.popRef=(0,zn.createRef)(),this.debouncedToggle=(0,qn.debounce)(this.toggle.bind(this),100)}toggle(){this.setState({open:!this.state.open})}render(){const{open:t}=this.state;let n={};return n.dynamic=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M4 5.002s.003-.095.213-.288c.245-.225.671-.483 1.306-.73C7.018 3.399 9.34 3 12 3s4.982.399 6.482.984c.634.247 1.061.505 1.306.73.205.189.212.281.212.288 0 .003-.007.095-.213.284-.245.225-.671.483-1.306.73C16.982 6.601 14.66 7 12 7s-4.982-.399-6.482-.984c-.634-.247-1.061-.505-1.306-.73C4.004 5.094 4 5.002 4 5.002zm16 9.53v4.471a.779.779 0 01-.217.291c-.245.225-.671.482-1.303.728-1.495.582-3.809.978-6.48.978s-4.985-.396-6.48-.978c-.633-.246-1.058-.503-1.303-.728a.865.865 0 01-.199-.242l-.006-4.514c.248.126.51.242.782.348C6.591 15.585 9.171 16 12 16s5.409-.415 7.206-1.114c.277-.108.543-.225.794-.354zm0-7.005v4.476a.779.779 0 01-.217.291c-.245.225-.671.482-1.303.728-1.495.582-3.809.978-6.48.978s-4.985-.396-6.48-.978c-.633-.246-1.058-.503-1.303-.728a.865.865 0 01-.199-.242 1.109 1.109 0 00-.009-.117l-.005-4.407c.248.128.513.244.788.352C6.593 8.582 9.18 9 12 9s5.407-.418 7.208-1.12A8.69 8.69 0 0020 7.527zM2 5v14c0 .058.002.116.007.174.057.665.425 1.197.857 1.594.498.457 1.175.824 1.93 1.118C6.591 22.585 9.171 23 12 23s5.409-.415 7.206-1.114c.755-.294 1.432-.661 1.93-1.118.432-.397.8-.929.857-1.594.005-.058.007-.116.007-.174V5c0-.056-.002-.112-.007-.168-.055-.664-.422-1.195-.852-1.59-.498-.459-1.177-.827-1.933-1.122C17.407 1.418 14.82 1 12 1s-5.407.418-7.208 1.12c-.756.295-1.435.664-1.933 1.122-.43.395-.797.927-.852 1.59A1.887 1.887 0 002 5z"})),(0,e.createElement)("div",{className:"kb-dynamic-image-sidebar-wrap kb-dynamic-background-sidebar-wrap"},(0,e.createElement)(jn.Button,{className:"kb-dynamic-image-sidebar kb-dynamic-background-sidebar",isTertiary:!0,icon:n.dynamic,onClick:()=>this.debouncedToggle(),isPressed:t,"aria-haspopup":"true","aria-expanded":t,label:(0,Jn.__)("Dynamic Image","kadence-blocks"),showTooltip:!0}),t&&(0,e.createElement)(jn.Popover,{className:"kb-dynamic-popover",position:"bottom left",onClick:()=>{},expandOnMobile:!0,onClose:()=>this.debouncedToggle(),ref:this.popRef},(0,e.createElement)("div",{className:"kb-dynamic-popover-inner-wrap"},(0,e.createElement)("div",{className:"kb-pro-notice"},(0,e.createElement)("h2",null,(0,Jn.__)("Dynamic Image","kadence-blocks")," "),(0,e.createElement)("p",null,(0,Jn.__)("Create dynamic sites by populating images from various sources.","kadence-blocks")," "),(0,e.createElement)(jn.ExternalLink,{href:"https://www.kadencewp.com/kadence-blocks/pro/?utm_source=in-app&utm_medium=kadence-blocks&utm_campaign=dynamic-content"},(0,Jn.__)("Upgrade to Pro","kadence-blocks"))))))}}const ai=(0,jn.withFilters)("kadence.ImageDynamicControl")(oi);class ri extends zn.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.state={open:!1},this.popRef=(0,zn.createRef)(),this.debouncedToggle=(0,qn.debounce)(this.toggle.bind(this),100)}toggle(){this.setState({open:!this.state.open})}render(){const{open:t}=this.state;let n={};return n.dynamic=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M4 5.002s.003-.095.213-.288c.245-.225.671-.483 1.306-.73C7.018 3.399 9.34 3 12 3s4.982.399 6.482.984c.634.247 1.061.505 1.306.73.205.189.212.281.212.288 0 .003-.007.095-.213.284-.245.225-.671.483-1.306.73C16.982 6.601 14.66 7 12 7s-4.982-.399-6.482-.984c-.634-.247-1.061-.505-1.306-.73C4.004 5.094 4 5.002 4 5.002zm16 9.53v4.471a.779.779 0 01-.217.291c-.245.225-.671.482-1.303.728-1.495.582-3.809.978-6.48.978s-4.985-.396-6.48-.978c-.633-.246-1.058-.503-1.303-.728a.865.865 0 01-.199-.242l-.006-4.514c.248.126.51.242.782.348C6.591 15.585 9.171 16 12 16s5.409-.415 7.206-1.114c.277-.108.543-.225.794-.354zm0-7.005v4.476a.779.779 0 01-.217.291c-.245.225-.671.482-1.303.728-1.495.582-3.809.978-6.48.978s-4.985-.396-6.48-.978c-.633-.246-1.058-.503-1.303-.728a.865.865 0 01-.199-.242 1.109 1.109 0 00-.009-.117l-.005-4.407c.248.128.513.244.788.352C6.593 8.582 9.18 9 12 9s5.407-.418 7.208-1.12A8.69 8.69 0 0020 7.527zM2 5v14c0 .058.002.116.007.174.057.665.425 1.197.857 1.594.498.457 1.175.824 1.93 1.118C6.591 22.585 9.171 23 12 23s5.409-.415 7.206-1.114c.755-.294 1.432-.661 1.93-1.118.432-.397.8-.929.857-1.594.005-.058.007-.116.007-.174V5c0-.056-.002-.112-.007-.168-.055-.664-.422-1.195-.852-1.59-.498-.459-1.177-.827-1.933-1.122C17.407 1.418 14.82 1 12 1s-5.407.418-7.208 1.12c-.756.295-1.435.664-1.933 1.122-.43.395-.797.927-.852 1.59A1.887 1.887 0 002 5z"})),(0,e.createElement)(jn.ToolbarGroup,{group:"dynamic-text"},(0,e.createElement)(jn.ToolbarButton,{className:"kb-dynamic-menu",icon:n.dynamic,onClick:()=>this.debouncedToggle(),isPressed:!1,"aria-haspopup":"true","aria-expanded":t,label:(0,Jn.__)("Dynamic Content","kadence-blocks"),showTooltip:!0}),t&&(0,e.createElement)(jn.Popover,{className:"kb-dynamic-popover",position:"bottom left",onClick:()=>{},expandOnMobile:!0,onClose:()=>this.debouncedToggle(),ref:this.popRef},(0,e.createElement)("div",{className:"kb-dynamic-popover-inner-wrap"},(0,e.createElement)("div",{className:"kb-pro-notice"},(0,e.createElement)("h2",null,(0,Jn.__)("Dynamic Content","kadence-blocks")," "),(0,e.createElement)("p",null,(0,Jn.__)("Create dynamic sites by populating content from various sources.","kadence-blocks")," "),(0,e.createElement)(jn.ExternalLink,{href:"https://www.kadencewp.com/kadence-blocks/pro/?utm_source=in-app&utm_medium=kadence-blocks&utm_campaign=dynamic-content"},(0,Jn.__)("Upgrade to Pro","kadence-blocks"))))))}}const ii=(0,jn.withFilters)("kadence.TextDynamicControl")(ri);class li extends zn.Component{constructor(){super(...arguments)}render(){}}const si=(0,jn.withFilters)("kadence.InlineReplaceDynamicControl")(li);class ci extends zn.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.state={open:!1},this.popRef=(0,zn.createRef)(),this.debouncedToggle=(0,qn.debounce)(this.toggle.bind(this),100)}toggle(){this.setState({open:!this.state.open})}render(){const{open:t}=this.state;let n={};return n.dynamic=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M4 5.002s.003-.095.213-.288c.245-.225.671-.483 1.306-.73C7.018 3.399 9.34 3 12 3s4.982.399 6.482.984c.634.247 1.061.505 1.306.73.205.189.212.281.212.288 0 .003-.007.095-.213.284-.245.225-.671.483-1.306.73C16.982 6.601 14.66 7 12 7s-4.982-.399-6.482-.984c-.634-.247-1.061-.505-1.306-.73C4.004 5.094 4 5.002 4 5.002zm16 9.53v4.471a.779.779 0 01-.217.291c-.245.225-.671.482-1.303.728-1.495.582-3.809.978-6.48.978s-4.985-.396-6.48-.978c-.633-.246-1.058-.503-1.303-.728a.865.865 0 01-.199-.242l-.006-4.514c.248.126.51.242.782.348C6.591 15.585 9.171 16 12 16s5.409-.415 7.206-1.114c.277-.108.543-.225.794-.354zm0-7.005v4.476a.779.779 0 01-.217.291c-.245.225-.671.482-1.303.728-1.495.582-3.809.978-6.48.978s-4.985-.396-6.48-.978c-.633-.246-1.058-.503-1.303-.728a.865.865 0 01-.199-.242 1.109 1.109 0 00-.009-.117l-.005-4.407c.248.128.513.244.788.352C6.593 8.582 9.18 9 12 9s5.407-.418 7.208-1.12A8.69 8.69 0 0020 7.527zM2 5v14c0 .058.002.116.007.174.057.665.425 1.197.857 1.594.498.457 1.175.824 1.93 1.118C6.591 22.585 9.171 23 12 23s5.409-.415 7.206-1.114c.755-.294 1.432-.661 1.93-1.118.432-.397.8-.929.857-1.594.005-.058.007-.116.007-.174V5c0-.056-.002-.112-.007-.168-.055-.664-.422-1.195-.852-1.59-.498-.459-1.177-.827-1.933-1.122C17.407 1.418 14.82 1 12 1s-5.407.418-7.208 1.12c-.756.295-1.435.664-1.933 1.122-.43.395-.797.927-.852 1.59A1.887 1.887 0 002 5z"})),(0,e.createElement)("div",{className:"kb-dynamic-background-sidebar-wrap"},(0,e.createElement)(jn.Button,{className:"kb-dynamic-background-sidebar",isTertiary:!0,icon:n.dynamic,onClick:()=>this.debouncedToggle(),isPressed:t,"aria-haspopup":"true","aria-expanded":t,label:(0,Jn.__)("Dynamic Background Image","kadence-blocks"),showTooltip:!0}),t&&(0,e.createElement)(jn.Popover,{className:"kb-dynamic-popover",position:"bottom left",onClick:()=>{},expandOnMobile:!0,onClose:()=>this.debouncedToggle(),ref:this.popRef},(0,e.createElement)("div",{className:"kb-dynamic-popover-inner-wrap"},(0,e.createElement)("div",{className:"kb-pro-notice"},(0,e.createElement)("h2",null,(0,Jn.__)("Dynamic Background Image","kadence-blocks")," "),(0,e.createElement)("p",null,(0,Jn.__)("Create dynamic sites by populating background images from various sources.","kadence-blocks")," "),(0,e.createElement)(jn.ExternalLink,{href:"https://www.kadencewp.com/kadence-blocks/pro/?utm_source=in-app&utm_medium=kadence-blocks&utm_campaign=dynamic-content"},(0,Jn.__)("Upgrade to Pro","kadence-blocks"))))))}}const ui=(0,jn.withFilters)("kadence.BackgroundDynamicControl")(ci);class di extends zn.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.state={open:!1},this.popRef=(0,zn.createRef)(),this.debouncedToggle=(0,qn.debounce)(this.toggle.bind(this),100)}toggle(){this.setState({open:!this.state.open})}render(){const{open:t}=this.state;let n={};return n.dynamic=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M4 5.002s.003-.095.213-.288c.245-.225.671-.483 1.306-.73C7.018 3.399 9.34 3 12 3s4.982.399 6.482.984c.634.247 1.061.505 1.306.73.205.189.212.281.212.288 0 .003-.007.095-.213.284-.245.225-.671.483-1.306.73C16.982 6.601 14.66 7 12 7s-4.982-.399-6.482-.984c-.634-.247-1.061-.505-1.306-.73C4.004 5.094 4 5.002 4 5.002zm16 9.53v4.471a.779.779 0 01-.217.291c-.245.225-.671.482-1.303.728-1.495.582-3.809.978-6.48.978s-4.985-.396-6.48-.978c-.633-.246-1.058-.503-1.303-.728a.865.865 0 01-.199-.242l-.006-4.514c.248.126.51.242.782.348C6.591 15.585 9.171 16 12 16s5.409-.415 7.206-1.114c.277-.108.543-.225.794-.354zm0-7.005v4.476a.779.779 0 01-.217.291c-.245.225-.671.482-1.303.728-1.495.582-3.809.978-6.48.978s-4.985-.396-6.48-.978c-.633-.246-1.058-.503-1.303-.728a.865.865 0 01-.199-.242 1.109 1.109 0 00-.009-.117l-.005-4.407c.248.128.513.244.788.352C6.593 8.582 9.18 9 12 9s5.407-.418 7.208-1.12A8.69 8.69 0 0020 7.527zM2 5v14c0 .058.002.116.007.174.057.665.425 1.197.857 1.594.498.457 1.175.824 1.93 1.118C6.591 22.585 9.171 23 12 23s5.409-.415 7.206-1.114c.755-.294 1.432-.661 1.93-1.118.432-.397.8-.929.857-1.594.005-.058.007-.116.007-.174V5c0-.056-.002-.112-.007-.168-.055-.664-.422-1.195-.852-1.59-.498-.459-1.177-.827-1.933-1.122C17.407 1.418 14.82 1 12 1s-5.407.418-7.208 1.12c-.756.295-1.435.664-1.933 1.122-.43.395-.797.927-.852 1.59A1.887 1.887 0 002 5z"})),(0,e.createElement)("div",{className:"kb-dynamic-image-sidebar-wrap kb-dynamic-gallery-sidebar-wrap"},(0,e.createElement)(jn.Button,{className:"kb-dynamic-image-sidebar kb-dynamic-gallery-sidebar",isTertiary:!0,icon:n.dynamic,onClick:()=>this.debouncedToggle(),isPressed:t,"aria-haspopup":"true","aria-expanded":t,label:(0,Jn.__)("Dynamic Gallery","kadence-blocks"),showTooltip:!0}),t&&(0,e.createElement)(jn.Popover,{className:"kb-dynamic-popover",position:"bottom left",onClick:()=>{},expandOnMobile:!0,onClose:()=>this.debouncedToggle(),ref:this.popRef},(0,e.createElement)("div",{className:"kb-dynamic-popover-inner-wrap"},(0,e.createElement)("div",{className:"kb-pro-notice"},(0,e.createElement)("h2",null,(0,Jn.__)("Dynamic Gallery","kadence-blocks")," "),(0,e.createElement)("p",null,(0,Jn.__)("Create dynamic sites by populating images from various sources.","kadence-blocks")," "),(0,e.createElement)(jn.ExternalLink,{href:"https://www.kadencewp.com/kadence-blocks/pro/?utm_source=in-app&utm_medium=kadence-blocks&utm_campaign=dynamic-content"},(0,Jn.__)("Upgrade to Pro","kadence-blocks"))))))}}const pi=(0,jn.withFilters)("kadence.GalleryDynamicControl")(di);class hi extends zn.Component{constructor(e,t=!0,n,o,a,r,i,l,s,c,u,d,p,h){super(...arguments)}render(){return(0,e.createElement)("div",{className:"components-base-control kt-box-shadow-container"},this.props.label&&(0,e.createElement)("div",{className:"kt-box-shadow-label"},(0,e.createElement)("h2",{className:"kt-beside-color-label"},this.props.label),this.props.onEnableChange&&(0,e.createElement)(jn.ToggleControl,{checked:this.props.enable,onChange:e=>this.props.onEnableChange(e)})),this.props.enable&&(0,e.createElement)("div",{className:"kt-inner-sub-section"},(0,e.createElement)("div",{className:"kt-inner-sub-section-row"},(0,e.createElement)("div",{className:"kt-box-color-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("Color")),(0,e.createElement)(Qn,{value:this.props.color?this.props.color:this.props.colorDefault,default:this.props.colorDefault,onChange:e=>this.props.onColorChange(e),opacityValue:this.props.opacity,onOpacityChange:e=>this.props.onOpacityChange(e),onArrayChange:this.props.onArrayChange?(e,t)=>this.props.onArrayChange(e,t):void 0})),(0,e.createElement)("div",{className:"kt-box-x-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("X")),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==this.props.hOffset?this.props.hOffset:"",onChange:e=>this.props.onHOffsetChange(Number(e.target.value)),min:-200,max:200,step:1,type:"number",className:"components-text-control__input"})))),(0,e.createElement)("div",{className:"kt-box-y-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("Y")),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==this.props.vOffset?this.props.vOffset:"",onChange:e=>this.props.onVOffsetChange(Number(e.target.value)),min:-200,max:200,step:1,type:"number",className:"components-text-control__input"})))),(0,e.createElement)("div",{className:"kt-box-blur-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("Blur")),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==this.props.blur?this.props.blur:"",onChange:e=>this.props.onBlurChange(Number(e.target.value)),min:0,max:200,step:1,type:"number",className:"components-text-control__input"})))))))}}const mi=hi;var fi=a(2485),bi=a.n(fi);const gi=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z"}));function vi({label:t,value:n,onChange:o,options:a=[{value:"cover",label:(0,Jn.__)("Cover","kadence-blocks")},{value:"contain",label:(0,Jn.__)("Contain","kadence-blocks")},{value:"auto",label:(0,Jn.__)("Auto","kadence-blocks")}],allowCustom:r=!0}){const i=`inspector-background-size-control-${(0,qr.useInstanceId)(vi)}`,[l,s]=(0,zn.useState)(!1);(0,zn.useEffect)((()=>{s(function(e,t){return!!t&&!!e&&!e.find((e=>e.value===t))}(a,n))}),[]);let c="auto",u="auto";const d=n.split(" ");return void 0!==d[0]&&(c=void 0!==d[0]&&d[0]?d[0]:"auto",u=void 0!==d[1]&&d[1]?d[1]:"auto"),(0,e.createElement)("div",{className:"components-base-control kadence-background-size-control"},t&&(0,e.createElement)("label",{htmlFor:i,className:"kadence-radio-control-label components-background-size-control__label"},t),!l&&(0,e.createElement)("div",{className:"kadence-controls-content"},(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control"},a.map(((t,a)=>(0,e.createElement)(jn.Button,{key:`${t.label}-${t.value}-${a}`,className:"kadence-radio-item radio-"+t.value,icon:void 0!==t.icon?t.icon:void 0,"aria-pressed":n===t.value,variant:n===t.value?"primary":"tertiary",onClick:()=>{o(t.value)}},t.label))),r&&(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Set custom size","kadence-blocks"),icon:gi,onClick:()=>s(!0),isPressed:!1,variant:"tertiary"}))),l&&(0,e.createElement)("div",{className:"kadence-controls-content"},(0,e.createElement)(jn.__experimentalUnitControl,{labelPosition:"top",label:(0,Jn.__)("Width","kadence-blocks"),max:4e3,min:0,units:[{value:"%",label:"%"},{value:"px",label:"px"}],value:c,onChange:e=>{const t=n.split(" ");let a="auto";void 0!==t[0]&&(a=void 0!==t[1]&&t[1]?t[1]:"auto"),o(e+" "+a)},className:"kb-background-size-custom-input",placeholder:"auto"}),(0,e.createElement)(jn.__experimentalUnitControl,{labelPosition:"top",label:(0,Jn.__)("Height","kadence-blocks"),max:4e3,min:0,value:u,units:[{value:"%",label:"%"},{value:"px",label:"px"}],onChange:e=>{const t=n.split(" ");let a="auto";void 0!==t[0]&&(a=void 0!==t[0]&&t[0]?t[0]:"auto"),o(a+" "+e)},className:"kb-background-size-custom-input",placeholder:"auto"}),r&&(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control kadence-small-radio-container"},(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Use size preset","kadence-blocks"),icon:gi,onClick:()=>s(!1),isPressed:!0,variant:"primary"}))))}const ki=t=>{const[n,o]=(0,zn.useState)({}),{label:a,id:r,url:i,slug:l,onChange:s,fullSelection:c=!0,selectByValue:u=!0}=t,{image:d}=(0,Kn.useSelect)((e=>{const{getMedia:t}=e("core");return{image:r?t(r,{context:"view"}):null}}),[r]);return(0,zn.useEffect)((()=>{o(void 0===c||!0===c?(()=>{if(d){const e=void 0!==d.media_details.sizes?d.media_details.sizes:[],t=Object.keys(e).map((e=>({slug:e,name:e})));return(0,qn.compact)((0,qn.map)(t,(({name:e,slug:t})=>{if("image/svg+xml"===(0,qn.get)(d,["mime_type"]))return null;const n=(0,qn.get)(d,["media_details","sizes",t,"source_url"]);if(!n)return null;const o=(0,qn.get)(d,["media_details","sizes",t,"width"]);if(!o)return null;const a=(0,qn.get)(d,["media_details","sizes",t,"height"]);return a?{value:n,label:e+" ("+o+"x"+a+")",slug:t,width:o,height:a}:null})))}return null})():(()=>{if(d){const e=void 0!==d.media_details.sizes?d.media_details.sizes:[],t=[];for(let n=0;n<Object.keys(e).length;n++){const o=Object.keys(e)[n];"thumbnail"!==o&&"medium"!==o&&"medium_large"!==o&&"large"!==o&&"full"!==o||t.push({slug:o,name:o})}return(0,qn.compact)((0,qn.map)(t,(({name:e,slug:t})=>{if("image/svg+xml"===(0,qn.get)(d,["mime_type"]))return null;const n=(0,qn.get)(d,["media_details","sizes",t,"source_url"]);if(!n)return null;const o=(0,qn.get)(d,["media_details","sizes",t,"width"]);if(!o)return null;const a=(0,qn.get)(d,["media_details","sizes",t,"height"]);return a?{value:n,label:e+("full"===t?"":" ("+o+"x"+a+")"),slug:t,width:o,height:a}:null})))}return null})())}),[d]),(0,e.createElement)("div",{className:"components-base-control kb-image-size-container"},!(0,qn.isEmpty)(n)&&(void 0===u||!0===u)&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"kb-image-size-title"},a),(0,e.createElement)("div",{className:"kb-image-size-select-form-row"},(0,e.createElement)(jr,{options:n,value:n.filter((({value:e})=>e===i)),isMulti:!1,maxMenuHeight:250,isClearable:!1,placeholder:"",onChange:s}))),!(0,qn.isEmpty)(n)&&!1===u&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h2",{className:"kb-image-size-title"},a),(0,e.createElement)("div",{className:"kb-image-size-select-form-row"},(0,e.createElement)(jr,{options:n,value:n.filter((e=>e.slug===l)),isMulti:!1,maxMenuHeight:250,isClearable:!1,placeholder:"",onChange:s}))))},yi=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,zn.createElement)(lo.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"})),Ei=({src:t,onChange:n,onSubmit:o,onClose:a})=>(0,e.createElement)(Xn.URLPopover,{onClose:a},(0,e.createElement)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:o},(0,e.createElement)("input",{className:"block-editor-media-placeholder__url-input-field",type:"url","aria-label":(0,Jn.__)("URL","kadence-blocks"),placeholder:(0,Jn.__)("Paste or type URL","kadence-blocks"),onChange:n,value:t}),(0,e.createElement)(jn.Button,{className:"block-editor-media-placeholder__url-input-submit-button",icon:yi,label:(0,Jn.__)("Apply","kadence-blocks"),type:"submit"})));class xi extends zn.Component{constructor(){super(...arguments),this.state={src:"",isURLInputVisible:!1},this.onChangeSrc=this.onChangeSrc.bind(this),this.onSubmitSrc=this.onSubmitSrc.bind(this),this.onUpload=this.onUpload.bind(this),this.onFilesUpload=this.onFilesUpload.bind(this),this.openURLInput=this.openURLInput.bind(this),this.closeURLInput=this.closeURLInput.bind(this)}onlyAllowsImages(){const{allowedTypes:e}=this.props;return!!e&&(0,qn.every)(e,(e=>"image"===e||(0,qn.startsWith)(e,"image/")))}componentDidMount(){this.setState({src:(0,qn.get)(this.props.value,["src"],"")})}componentDidUpdate(e){(0,qn.get)(e.value,["src"],"")!==(0,qn.get)(this.props.value,["src"],"")&&this.setState({src:(0,qn.get)(this.props.value,["src"],"")})}onChangeSrc(e){this.setState({src:e.target.value})}onSubmitSrc(e){e.preventDefault(),this.state.src&&this.props.onSelectURL&&(this.props.onSelectURL(this.state.src),this.closeURLInput())}onUpload(e){this.onFilesUpload(e.target.files)}onFilesUpload(e){const{addToGallery:t,allowedTypes:n,mediaUpload:o,multiple:a,onError:r,onSelect:i,onFilesPreUpload:l=qn.noop}=this.props;let s;if(l(e),a)if(t){let e=[];s=t=>{const n=(this.props.value||[]).filter((t=>t.id?!e.some((({id:e})=>Number(e)===Number(t.id))):!e.some((({urlSlug:e})=>t.url.includes(e)))));i(n.concat(t)),e=t.map((e=>{const t=e.url.lastIndexOf("."),n=e.url.slice(0,t);return{id:e.id,urlSlug:n}}))}}else s=i;else s=([e])=>i(e);o({allowedTypes:n,filesList:e,onFileChange:s,onError:r})}openURLInput(){this.setState({isURLInputVisible:!0})}closeURLInput(){this.setState({isURLInputVisible:!1})}renderPlaceholder(t,n){const{allowedTypes:o=[],className:a,icon:r,isAppender:i,labels:l={},onDoubleClick:s,mediaPreview:c,notices:u,onSelectURL:d,mediaUpload:p,children:h}=this.props;let m=l.instructions,f=l.title;if(p||d||(m=(0,Jn.__)("To edit this block, you need permission to upload media.","kadence-blocks")),void 0===m||void 0===f){const e=1===o.length,t=e&&"audio"===o[0],n=e&&"image"===o[0],a=e&&"video"===o[0];void 0===m&&p&&(m=(0,Jn.__)("Upload a media file or pick one from your media library.","kadence-blocks"),t?m=(0,Jn.__)("Upload an audio file, pick one from your media library, or add one with a URL.","kadence-blocks"):n?m=(0,Jn.__)("Upload an image file, pick one from your media library, or add one with a URL.","kadence-blocks"):a&&(m=(0,Jn.__)("Upload a video file, pick one from your media library, or add one with a URL.","kadence-blocks")))}const b=bi()("block-editor-media-placeholder",a,{"is-appender":i});return(0,e.createElement)(jn.Placeholder,{icon:r,label:f||void 0,instructions:m,className:b,notices:u,onClick:n,onDoubleClick:s,preview:c},t,h)}renderDropZone(){const{disableDropZone:t,onHTMLDrop:n=qn.noop}=this.props;return t?null:(0,e.createElement)(jn.DropZone,{onFilesDrop:this.onFilesUpload,onHTMLDrop:n})}renderCancelLink(){const{onCancel:t}=this.props;return t&&(0,e.createElement)(jn.Button,{className:"block-editor-media-placeholder__cancel-button",title:(0,Jn.__)("Cancel","kadence-blocks"),isLink:!0,onClick:t},(0,Jn.__)("Cancel","kadence-blocks"))}renderUrlSelectionUI(){const{onSelectURL:t}=this.props;if(!t)return null;const{isURLInputVisible:n,src:o}=this.state;return(0,e.createElement)("div",{className:"block-editor-media-placeholder__url-input-container"},(0,e.createElement)(jn.Button,{className:"block-editor-media-placeholder__button",onClick:this.openURLInput,isPressed:n,isTertiary:!0},(0,Jn.__)("Insert from URL","kadence-blocks")),n&&(0,e.createElement)(Ei,{src:o,onChange:this.onChangeSrc,onSubmit:this.onSubmitSrc,onClose:this.closeURLInput}))}renderDynamicSelectionUI(){const{dynamicControl:t}=this.props;return t?(0,e.createElement)("div",{className:"block-editor-media-placeholder__dynamic-input-container"},t):null}renderMediaUploadChecked(){const{selectLabel:t=(0,Jn.__)("Select Image","kadence-blocks"),selectIcon:n,accept:o,addToGallery:a,allowedTypes:r=[],isAppender:i,mediaUpload:l,multiple:s=!1,onSelect:c,value:u={}}=this.props,d=(0,e.createElement)(Xn.MediaUpload,{addToGallery:a,gallery:s&&this.onlyAllowsImages(),multiple:s,onSelect:c,allowedTypes:r,value:(0,qn.isArray)(u)?u.map((({id:e})=>e)):u.id,render:({open:o})=>(0,e.createElement)(jn.Button,{isPrimary:!0,icon:n||void 0,onClick:e=>{e.stopPropagation(),o()}},t)});if(l&&i)return(0,e.createElement)(zn.Fragment,null,this.renderDropZone(),(0,e.createElement)(jn.FormFileUpload,{onChange:this.onUpload,accept:o,multiple:s,render:({openFileDialog:t})=>{const n=(0,e.createElement)(zn.Fragment,null,d,this.renderUrlSelectionUI(),this.renderCancelLink(),this.renderDynamicSelectionUI());return this.renderPlaceholder(n,t)}}));if(l){const t=(0,e.createElement)(zn.Fragment,null,this.renderDropZone(),d,this.renderUrlSelectionUI(),this.renderCancelLink(),this.renderDynamicSelectionUI());return this.renderPlaceholder(t)}return this.renderPlaceholder(d)}render(){const{disableMediaButtons:t,dropZoneUIOnly:n}=this.props;return n||t?(0,e.createElement)(Xn.MediaUploadCheck,null,this.renderDropZone()):(0,e.createElement)(Xn.MediaUploadCheck,{fallback:this.renderPlaceholder(this.renderUrlSelectionUI())},this.renderMediaUploadChecked())}}const _i=(0,Kn.withSelect)((e=>{const{getSettings:t}=e("core/block-editor");return{mediaUpload:t().mediaUpload}}))(xi);function wi({label:t,value:n,onChange:o,options:a=[],className:r,hideLabel:i=!1,wrap:l=!1,allowClear:s=!1,help:c="",...u}){const d=`inspector-radio-control-${(0,qr.useInstanceId)(wi)}`;return(0,e.createElement)("div",{className:"components-base-control kadence-radio-buttons-wrap"+(r?" "+r:"")},t&&(0,e.createElement)("div",{className:"kadence-component__header"},(0,e.createElement)("label",{htmlFor:d,className:"kadence-radio-control-label components-radio-control__label kadence-component__header__title"},t)),(0,e.createElement)(jn.ButtonGroup,{id:d,className:"kadence-radio-container-control"+(l?" kadence-radio-control-flexwrap":"")},a.map(((t,a)=>(0,e.createElement)(jn.Button,{key:`${t.label}-${t.value}-${a}`,isTertiary:n!==t.value,className:`kadence-radio-item radio-${t.value}${i?" radio-no-label":""}${void 0!==t?.isDisabled&&t.isDisabled?" kb-disabled-btn":""}`,isPrimary:n===t.value,icon:void 0!==t.icon?t.icon:void 0,iconSize:void 0!==t.icon&&void 0!==t.iconSize?t.iconSize:void 0,"aria-pressed":n===t.value,onClick:()=>{void 0!==t?.isDisabled&&t.isDisabled||(s&&t.value===n?o(""):o(t.value))},label:i?t.label:t?.tooltip},!i&&t.label)))),""!=c&&(0,e.createElement)("p",{class:"kt-blocks-component-help components-base-control__help"},c))}class Ci extends zn.Component{constructor(){super(...arguments),this.onPositionChange=this.onPositionChange.bind(this),this.convertPosition=this.convertPosition.bind(this),this.state={position:null}}convertPosition(e){if(!e)return{x:.5,y:.5};let t=.5,n=.5;const o=e.split(" ");if(o&&o[0])switch(o[0]){case"left":t=0;break;case"right":t=1;break;case"center":t=.5;break;default:t=parseInt(o[0],10)/100}if(o&&o[1])switch(o[1]){case"top":n=0;break;case"bottom":n=1;break;case"center":n=.5;break;default:n=parseInt(o[1],10)/100}return{x:t,y:n}}onPositionChange(e){let t;this.setState({position:e}),e&&void 0!==e.x&&""!==e.x&&(t=100*e.x+"% "+100*e.y+"%"),this.props.onChange(t)}render(){const t=this.state.position?this.state.position:this.convertPosition(this.props.value);return(0,e.createElement)(jn.FocalPointPicker,{url:this.props.url,value:t,onChange:e=>this.onPositionChange(e)})}}const Si=Ci,Ni=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M2 12C2 6.44444 6.44444 2 12 2C17.5556 2 22 6.44444 22 12C22 17.5556 17.5556 22 12 22C6.44444 22 2 17.5556 2 12ZM13 11V7H11V11H7V13H11V17H13V13H17V11H13Z"})),Oi=(0,zn.createElement)(lo.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,zn.createElement)(lo.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})),Ti=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Mi=["image"],Ai=t=>{const{label:n,hasImage:o,onSaveImage:a,onRemoveImage:r,onSaveURL:i,onSavePosition:l,onSaveSize:s,onSaveRepeat:c,onSaveAttachment:u,disableMediaButtons:d,imageURL:p,imageID:h,imagePosition:m,imageSize:f,imageRepeat:b,imageAttachment:g,imageAttachmentParallax:v=!1,imageAttachmentFixed:k=!0,inlineImage:y,onSaveInlineImage:E,dynamicAttribute:x="",attributes:_}=t;let w=[{value:"scroll",label:(0,Jn.__)("Scroll","kadence-blocks")}];return k&&w.push({value:"fixed",label:(0,Jn.__)("Fixed","kadence-blocks")}),v&&w.push({value:"parallax",label:(0,Jn.__)("Parallax","kadence-blocks")}),(0,e.createElement)("div",{className:"components-base-control kadence-image-background-control"},!o&&(0,e.createElement)(zn.Fragment,null,n&&(0,e.createElement)("div",{className:"components-kadence-image-background__label"},n),(0,e.createElement)(_i,{labels:"",selectIcon:Ni,selectLabel:(0,Jn.__)("Select Image","kadence-blocks"),onSelect:e=>a(e),onSelectURL:e=>i(e),accept:"image/*",className:"kadence-image-upload",allowedTypes:Mi,disableMediaButtons:d,dynamicControl:x&&kadence_blocks_params.dynamic_enabled?(0,e.createElement)(ui,{...t}):void 0})),o&&(0,e.createElement)(zn.Fragment,null,n&&(0,e.createElement)("div",{className:"components-kadence-image-background__label"},n),x&&kadence_blocks_params.dynamic_enabled&&_.kadenceDynamic&&_.kadenceDynamic[x]&&_.kadenceDynamic[x].enable?(0,e.createElement)("div",{className:"kb-dynamic-background-sidebar-top"},(0,e.createElement)(ui,{startOpen:!_.kadenceDynamic[x].field,...t})):(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(Xn.MediaUpload,{onSelect:e=>a(e),type:"image",value:h||"",render:({open:t})=>(0,e.createElement)(jn.Button,{className:"components-button components-icon-button kt-cta-upload-btn",onClick:t,icon:Oi},(0,Jn.__)("Edit Image","kadence-blocks"))}),(0,e.createElement)(jn.Button,{icon:Ti,label:(0,Jn.__)("Remove Image","kadence-blocks"),className:"components-button components-icon-button kt-remove-img kt-cta-upload-btn",onClick:()=>r()}),x&&kadence_blocks_params.dynamic_enabled&&(0,e.createElement)(ui,{...t})),(0,e.createElement)(Si,{url:p||"",value:m||"center center",onChange:e=>l(e)}),h&&(0,e.createElement)(ki,{label:(0,Jn.__)("Image File Size","kadence-blocks"),id:h,url:p,onChange:e=>{a({id:h,url:e.value})}}),(0,e.createElement)(vi,{label:(0,Jn.__)("Background Image Size","kadence-blocks"),value:f||"cover",options:[{value:"cover",label:(0,Jn.__)("Cover","kadence-blocks")},{value:"contain",label:(0,Jn.__)("Contain","kadence-blocks")},{value:"auto",label:(0,Jn.__)("Auto","kadence-blocks")}],onChange:e=>s(e)}),"cover"!==(f||"cover")&&(0,e.createElement)(wi,{label:(0,Jn.__)("Background Image Repeat","kadence-blocks"),value:b||"no-repeat",options:[{value:"no-repeat",label:(0,Jn.__)("No Repeat","kadence-blocks")},{value:"repeat",label:(0,Jn.__)("Repeat","kadence-blocks")},{value:"repeat-x",label:(0,Jn.__)("Repeat-x","kadence-blocks")},{value:"repeat-y",label:(0,Jn.__)("Repeat-y","kadence-blocks")}],onChange:e=>c(e)}),(0,e.createElement)(wi,{label:(0,Jn.__)("Background Image Attachment","kadence-blocks"),value:g||"scroll",options:w,onChange:e=>u(e)}),"fixed"===(g||"scroll")&&(0,e.createElement)("p",{className:"kb-sidebar-help"},(0,Jn.__)("Note: Attachment Fixed work only on desktop.","kadence-blocks")),E&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Force Background Image inline?","kadence-blocks"),checked:void 0!==y&&y,onChange:e=>E(e)})))},Di=window.kadence.icons;function Ri({label:t,type:n,onChange:o,allowedTypes:a=null,types:r=null}){const i=[{key:"normal",title:(0,Jn.__)("Classic","kadence-blocks"),icon:Di.brush},{key:"gradient",title:(0,Jn.__)("Gradient","kadence-blocks"),icon:Di.gradient},{key:"slider",title:(0,Jn.__)("Slider","kadence-blocks"),icon:Di.slider},{key:"video",title:(0,Jn.__)("Video","kadence-blocks"),icon:Di.video}],l=a||["normal","gradient","slider","video"],s=r||i,c=`inspector-background-type-control-${(0,qr.useInstanceId)(Ri)}`;return(0,e.createElement)("div",{className:"components-base-control kadence-background-type-control"},(0,e.createElement)("div",{className:"kadence-background-type-container"},t&&(0,e.createElement)("label",{htmlFor:c,className:"kadence-beside-label components-background-type-control__label"},t),(0,e.createElement)(jn.ButtonGroup,{id:c,className:"kadence-background-type-radio-container"},s.map((({key:t,title:a,icon:r},i)=>{if(l.includes(t))return(0,e.createElement)(jn.Button,{key:t,label:a,onClick:()=>o(t),isTertiary:t!==n,isPrimary:t===n,className:"kadence-radio-item"+(t===n?" radio-is-active":""),"aria-pressed":t===n,icon:r})})))))}var Ii={grad:.9,turn:360,rad:360/(2*Math.PI)},Pi=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Fi=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Li=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Bi=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Vi=function(e){return{r:Li(e.r,0,255),g:Li(e.g,0,255),b:Li(e.b,0,255),a:Li(e.a)}},zi=function(e){return{r:Fi(e.r),g:Fi(e.g),b:Fi(e.b),a:Fi(e.a,3)}},ji=/^#([0-9a-f]{3,8})$/i,Hi=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Ui=function(e){var t=e.r,n=e.g,o=e.b,a=e.a,r=Math.max(t,n,o),i=r-Math.min(t,n,o),l=i?r===t?(n-o)/i:r===n?2+(o-t)/i:4+(t-n)/i:0;return{h:60*(l<0?l+6:l),s:r?i/r*100:0,v:r/255*100,a}},Wi=function(e){var t=e.h,n=e.s,o=e.v,a=e.a;t=t/360*6,n/=100,o/=100;var r=Math.floor(t),i=o*(1-n),l=o*(1-(t-r)*n),s=o*(1-(1-t+r)*n),c=r%6;return{r:255*[o,l,i,i,s,o][c],g:255*[s,o,o,l,i,i][c],b:255*[i,i,s,o,o,l][c],a}},Gi=function(e){return{h:Bi(e.h),s:Li(e.s,0,100),l:Li(e.l,0,100),a:Li(e.a)}},$i=function(e){return{h:Fi(e.h),s:Fi(e.s),l:Fi(e.l),a:Fi(e.a,3)}},qi=function(e){return Wi((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},Xi=function(e){return{h:(t=Ui(e)).h,s:(a=(200-(n=t.s))*(o=t.v)/100)>0&&a<200?n*o/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,o,a},Ji=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ki=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yi=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zi=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Qi={string:[[function(e){var t=ji.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?Fi(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?Fi(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Yi.exec(e)||Zi.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Vi({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=Ji.exec(e)||Ki.exec(e);if(!t)return null;var n,o,a=Gi({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(Ii[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return qi(a)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,a=e.a,r=void 0===a?1:a;return Pi(t)&&Pi(n)&&Pi(o)?Vi({r:Number(t),g:Number(n),b:Number(o),a:Number(r)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,a=e.a,r=void 0===a?1:a;if(!Pi(t)||!Pi(n)||!Pi(o))return null;var i=Gi({h:Number(t),s:Number(n),l:Number(o),a:Number(r)});return qi(i)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,a=e.a,r=void 0===a?1:a;if(!Pi(t)||!Pi(n)||!Pi(o))return null;var i=function(e){return{h:Bi(e.h),s:Li(e.s,0,100),v:Li(e.v,0,100),a:Li(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(r)});return Wi(i)},"hsv"]]},el=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},tl=function(e,t){var n=Xi(e);return{h:n.h,s:Li(n.s+100*t,0,100),l:n.l,a:n.a}},nl=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},ol=function(e,t){var n=Xi(e);return{h:n.h,s:n.s,l:Li(n.l+100*t,0,100),a:n.a}},al=function(){function e(e){this.parsed=function(e){return"string"==typeof e?el(e.trim(),Qi.string):"object"==typeof e&&null!==e?el(e,Qi.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Fi(nl(this.rgba),2)},e.prototype.isDark=function(){return nl(this.rgba)<.5},e.prototype.isLight=function(){return nl(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=zi(this.rgba)).r,n=e.g,o=e.b,r=(a=e.a)<1?Hi(Fi(255*a)):"","#"+Hi(t)+Hi(n)+Hi(o)+r;var e,t,n,o,a,r},e.prototype.toRgb=function(){return zi(this.rgba)},e.prototype.toRgbString=function(){return t=(e=zi(this.rgba)).r,n=e.g,o=e.b,(a=e.a)<1?"rgba("+t+", "+n+", "+o+", "+a+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,a},e.prototype.toHsl=function(){return $i(Xi(this.rgba))},e.prototype.toHslString=function(){return t=(e=$i(Xi(this.rgba))).h,n=e.s,o=e.l,(a=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+a+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,a},e.prototype.toHsv=function(){return e=Ui(this.rgba),{h:Fi(e.h),s:Fi(e.s),v:Fi(e.v),a:Fi(e.a,3)};var e},e.prototype.invert=function(){return rl({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),rl(tl(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),rl(tl(this.rgba,-e))},e.prototype.grayscale=function(){return rl(tl(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),rl(ol(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),rl(ol(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?rl({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Fi(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Xi(this.rgba);return"number"==typeof e?rl({h:e,s:t.s,l:t.l,a:t.a}):Fi(t.h)},e.prototype.isEqual=function(e){return this.toHex()===rl(e).toHex()},e}(),rl=function(e){return e instanceof al?e:new al(e)};const il=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"})),ll=10,sl=ll;function cl(e){return Math.max(0,Math.min(100,e))}function ul(e,t,n){const o=e.findIndex((e=>e.position>t)),a={color:n,position:t},r=e.slice();return r.splice(o-1,0,a),r}function dl(e,t,n){const o=e.slice();return o[t]=n,o}function pl(e,t,n){return function(e,t,n,o=0){const a=e[t].position,r=Math.min(a,n),i=Math.max(a,n);return e.some((({position:e},a)=>a!==t&&(Math.abs(e-n)<o||r<e&&e<i)))}(e,t,n)?e:dl(e,t,{...e[t],position:n})}function hl(e,t,n){return dl(e,t,{...e[t],color:n})}function ml(e,t,n){const o=e.findIndex((e=>e.position===t));return hl(e,o,n)}function fl(e,t){if(!t)return;const{x:n,width:o}=t.getBoundingClientRect(),a=e-n;return Math.round(cl(100*a/o))}function bl(t){const{renderContent:n,renderToggle:o,className:a,contentClassName:r,expandOnMobile:i,headerTitle:l,focusOnMount:s,position:c,popoverProps:u,onClose:d,onToggle:p,style:h}=t,[m,f]=(0,zn.useState)(null),b=(0,zn.useRef)(),[g,v]=function(e,t){const[n,o]=(0,zn.useState)(!1);return[n,e=>{o(e),t&&t(e)}]}(0,p);function k(){d&&d(),v(!1)}(0,zn.useEffect)((()=>()=>{p&&g&&p(!1)}),[p,g]);const y={isOpen:g,onToggle:function(){v(!g)},onClose:k},E=!!(u?.anchor||u?.anchorRef||u?.getAnchorRect||u?.anchorRect);return(0,e.createElement)("div",{className:bi()("components-dropdown",a),ref:(0,qr.useMergeRefs)([f,b]),tabIndex:"-1",style:h},o(y),g&&(0,e.createElement)(jn.Popover,{position:c,onClose:k,onFocusOutside:function(){const{ownerDocument:e}=b.current,t=e.activeElement.closest('[role="dialog"]');b.current.contains(e.activeElement)||t&&!t.contains(b.current)||k()},expandOnMobile:i,headerTitle:l,focusOnMount:s,offset:13,anchor:E?void 0:m,...u,className:bi()("components-dropdown__content",u?u.className:void 0,r)},n(y)))}function gl({isRenderedInSidebar:t,popoverProps:n,...o}){const a=(0,zn.useMemo)((()=>({shift:!0,...t?{placement:"left-start",offset:34}:{placement:"bottom",offset:8},...n})),[t,n]);return(0,e.createElement)(bl,{contentClassName:"components-color-palette__custom-color-dropdown-content kadence-pop-color-popover",popoverProps:a,...o})}function vl({isOpen:t,position:n,color:o,...a}){const r=`components-custom-gradient-picker__control-point-button-description-${(0,qr.useInstanceId)(vl)}`;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(jn.Button,{"aria-label":(0,Jn.sprintf)( // translators: %1$s: gradient position e.g: 70, %2$s: gradient color code e.g: rgb(52,121,151). // translators: %1$s: gradient position e.g: 70, %2$s: gradient color code e.g: rgb(52,121,151). (0,Jn.__)("Gradient control point at position %1$s%% with color code %2$s."),n,o),"aria-describedby":r,"aria-haspopup":"true","aria-expanded":t,className:bi()("components-custom-gradient-picker__control-point-button",{"is-active":t}),...a}),(0,e.createElement)(jn.VisuallyHidden,{id:r},(0,Jn.__)("Use your left or right arrow keys or drag and drop with the mouse to change the gradient position. Press the button to change the color or remove the control point.")))}function kl({isRenderedInSidebar:t,className:n,...o}){const a=(0,zn.useMemo)((()=>({placement:"bottom",offset:8})),[]),r=bi()("components-custom-gradient-picker__control-point-dropdown",n);return(0,e.createElement)(gl,{isRenderedInSidebar:t,popoverProps:a,className:r,...o})}function yl(e,t){if(!e)return"";if(!t)return e;if(e.startsWith("var(--global-")){const n=t.find((t=>t.value===e));if(n)return n.color;let o=e.replace("var(--global-","");o=o.substring(0,8),o="theme-"+o;const a=t.find((e=>e.slug===o));if(a&&!a.color.startsWith("var("))return a.color;let r=window.getComputedStyle(document.documentElement).getPropertyValue(e.replace("var(","").replace(" ","").replace(")",""));if(""===r&&(r=window.getComputedStyle(document.documentElement).getPropertyValue(e.replace("var(","").replace(" ","").split(",")[0].replace(")",""))),r)return r}else if(e.startsWith("var(")){let t=window.getComputedStyle(document.documentElement).getPropertyValue(e.replace("var(","").replace(" ","").replace(")",""));if(""===t&&(t=window.getComputedStyle(document.documentElement).getPropertyValue(e.replace("var(","").replace(" ","").split(",")[0].replace(")",""))),t)return t}return e}function El({disableRemove:t,gradientPickerDomRef:n,ignoreMarkerPosition:o,value:a,onChange:r,onStartControlPointChange:i,onStopControlPointChange:l,isRenderedInSidebar:s}){const c=(0,zn.useRef)(),u=e=>{const t=fl(e.clientX,n.current),{initialPosition:o,index:i,significantMoveHappened:l}=c.current;!l&&Math.abs(o-t)>=5&&(c.current.significantMoveHappened=!0),r(pl(a,i,t))},d=()=>{window&&window.removeEventListener&&c.current&&c.current.listenersActivated&&(window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",d),l(),c.current.listenersActivated=!1)},p=(0,zn.useRef)();p.current=d,(0,zn.useEffect)((()=>()=>{p.current()}),[]);const h=!(0,Xn.useSetting)("color.custom"),m=(0,Xn.useSetting)("color.palette");return a.map(((n,p)=>{const f=n?.position,b=yl(n.color,m);return o!==f&&(0,e.createElement)(kl,{isRenderedInSidebar:s,key:p,onClose:l,renderToggle:({isOpen:t,onToggle:o})=>(0,e.createElement)(vl,{key:p,onClick:()=>{c.current&&c.current.significantMoveHappened||(t?l():i(),o())},onMouseDown:()=>{window&&window.addEventListener&&(c.current={initialPosition:f,index:p,significantMoveHappened:!1,listenersActivated:!0},i(),window.addEventListener("mousemove",u),window.addEventListener("mouseup",d))},onKeyDown:e=>{"ArrowLeft"===e.code?(e.stopPropagation(),r(pl(a,p,cl(n.position-sl)))):"ArrowRight"===e.code&&(e.stopPropagation(),r(pl(a,p,cl(n.position+sl))))},isOpen:t,position:n.position,color:n.color}),renderContent:({onClose:o})=>(0,e.createElement)("div",{className:"kadence-pop-gradient-color-picker"},!h&&(0,e.createElement)(Wn,{color:b,onChange:e=>{r(hl(a,p,rl(e.rgb).toRgbString()))},onChangeComplete:e=>{r(hl(a,p,rl(e.rgb).toRgbString()))}}),m&&(0,e.createElement)("div",{className:"kadence-pop-color-palette-swatches"},(0,qn.map)(m,(({color:t,slug:o,name:i})=>{const l={color:t},s=o.replace("theme-",""),c=o.startsWith("theme-palette")&&t===n.color||o.startsWith("theme-palette")&&b===t,u=!o.startsWith("theme-palette")&&t.startsWith("var(")&&(b===t||t===n.color);return(0,e.createElement)("div",{key:t,className:"kadence-color-palette__item-wrapper"},(0,e.createElement)(jn.Tooltip,{text:i|| // translators: %s: color hex code e.g: "#f00". // translators: %s: color hex code e.g: "#f00". (0,Jn.sprintf)((0,Jn.__)("Color code: %s"),t)},(0,e.createElement)(jn.Button,{type:"button",className:"kadence-color-palette__item "+(c||u?"is-active":""),style:l,onClick:()=>{o.startsWith("theme-palette")&&!t.startsWith("var(")?r(hl(a,p,"var(--global-"+s+","+t+")")):t.startsWith("var(")?r(hl(a,p,t)):r(hl(a,p,rl(t).toRgbString()))},"aria-label":i? // translators: %s: The name of the color e.g: "vivid red". // translators: %s: The name of the color e.g: "vivid red". (0,Jn.sprintf)((0,Jn.__)("Color: %s","kadence-blocks"),i): // translators: %s: color hex code e.g: "#f00". // translators: %s: color hex code e.g: "#f00". (0,Jn.sprintf)((0,Jn.__)("Color code: %s","kadence-blocks"),t),"aria-pressed":c||u})),c&&(0,e.createElement)(jn.Dashicon,{icon:"admin-site"}),!o.startsWith("theme-palette")&&b===t&&(0,e.createElement)(jn.Dashicon,{icon:"saved"}))}))),void 0!==n?.position&&(0,e.createElement)(jn.__experimentalNumberControl,{label:(0,Jn.__)("Control Point Position %","kadence-blocks"),value:n.position,onChange:e=>{r(pl(a,p,cl(parseFloat(e))))},min:0,step:.01,max:100,style:{paddingBottom:"10px"}}),!t&&a.length>2&&(0,e.createElement)(jn.__experimentalHStack,{className:"components-custom-gradient-picker__remove-control-point-wrapper",alignment:"center"},(0,e.createElement)(jn.Button,{onClick:()=>{r(function(e,t){return e.filter(((e,n)=>n!==t))}(a,p)),o()},variant:"link"},(0,Jn.__)("Remove Control Point")))),style:{left:`${n.position}%`,transform:"translateX( -50% )"}})}))}El.InsertPoint=function({value:t,onChange:n,onOpenInserter:o,onCloseInserter:a,insertPosition:r,isRenderedInSidebar:i}){const[l,s]=(0,zn.useState)(!1),c=!(0,Xn.useSetting)("color.custom"),u=(0,Xn.useSetting)("color.palette"),[d,p]=(0,zn.useState)(""),h=yl(d,u);return(0,e.createElement)(kl,{isRenderedInSidebar:i,className:"components-custom-gradient-picker__inserter",onClose:()=>{a()},renderToggle:({isOpen:t,onToggle:n})=>(0,e.createElement)(jn.Button,{"aria-expanded":t,"aria-haspopup":"true",onClick:()=>{t?a():(s(!1),o()),n()},className:"components-custom-gradient-picker__insert-point-dropdown",icon:il}),renderContent:()=>(0,e.createElement)("div",{className:"kadence-pop-gradient-color-picker"},!c&&(0,e.createElement)(Wn,{color:h,onChange:e=>{p(rl(e.rgb).toRgbString()),l?n(ml(t,r,rl(e.rgb).toRgbString())):(n(ul(t,r,rl(e.rgb).toRgbString())),s(!0))},onChangeComplete:e=>{p(rl(e.rgb).toRgbString()),l?n(ml(t,r,rl(e.rgb).toRgbString())):(n(ul(t,r,rl(e.rgb).toRgbString())),s(!0))}}),u&&(0,e.createElement)("div",{className:"kadence-pop-color-palette-swatches"},(0,qn.map)(u,(({color:o,slug:a,name:i})=>{const c={color:o},u=a.replace("theme-",""),m=a.startsWith("theme-palette")&&o===d||a.startsWith("theme-palette")&&h===o,f=!a.startsWith("theme-palette")&&o.startsWith("var(")&&d===o;return(0,e.createElement)("div",{key:o,className:"kadence-color-palette__item-wrapper"},(0,e.createElement)(jn.Tooltip,{text:i|| // translators: %s: color hex code e.g: "#f00". // translators: %s: color hex code e.g: "#f00". (0,Jn.sprintf)((0,Jn.__)("Color code: %s"),o)},(0,e.createElement)(jn.Button,{type:"button",className:"kadence-color-palette__item "+(m||f?"is-active":""),style:c,onClick:()=>{p(rl(o).toRgbString()),a.startsWith("theme-palette")&&!o.startsWith("var(")?l?n(ml(t,r,"var(--global-"+u+","+o+")")):(n(ul(t,r,"var(--global-"+u+","+o+")")),s(!0)):o.startsWith("var(")?(p(o),l?n(ml(t,r,o)):(n(ul(t,r,o)),s(!0))):l?n(ml(t,r,rl(o).toRgbString())):(n(ul(t,r,rl(o).toRgbString())),s(!0))},"aria-label":i? // translators: %s: The name of the color e.g: "vivid red". // translators: %s: The name of the color e.g: "vivid red". (0,Jn.sprintf)((0,Jn.__)("Color: %s","kadence-blocks"),i): // translators: %s: color hex code e.g: "#f00". // translators: %s: color hex code e.g: "#f00". (0,Jn.sprintf)((0,Jn.__)("Color code: %s","kadence-blocks"),o)})),m&&(0,e.createElement)(jn.Dashicon,{icon:"admin-site"}),!a.startsWith("theme-palette")&&d===o&&(0,e.createElement)(jn.Dashicon,{icon:"saved"}))})))),style:null!==r?{left:`${r}%`,transform:"translateX( -50% )"}:void 0})};const xl=El;function _l(e,t){switch(t.type){case"MOVE_INSERTER":if("IDLE"===e.id||"MOVING_INSERTER"===e.id)return{id:"MOVING_INSERTER",insertPosition:t.insertPosition};break;case"STOP_INSERTER_MOVE":if("MOVING_INSERTER"===e.id)return{id:"IDLE"};break;case"OPEN_INSERTER":if("MOVING_INSERTER"===e.id)return{id:"INSERTING_CONTROL_POINT",insertPosition:e.insertPosition};break;case"CLOSE_INSERTER":if("INSERTING_CONTROL_POINT"===e.id)return{id:"IDLE"};break;case"START_CONTROL_CHANGE":if("IDLE"===e.id)return{id:"MOVING_CONTROL_POINT"};break;case"STOP_CONTROL_CHANGE":if("MOVING_CONTROL_POINT"===e.id)return{id:"IDLE"}}return e}const wl={id:"IDLE"};function Cl({background:t,hasGradient:n,value:o,onChange:a,disableInserter:r=!1,isRenderedInSidebar:i}){const l=(0,zn.useRef)(),[s,c]=(0,zn.useReducer)(_l,wl),u=e=>{const t=fl(e.clientX,l.current);(0,qn.some)(o,(({position:e})=>Math.abs(t-e)<ll))?"MOVING_INSERTER"===s.id&&c({type:"STOP_INSERTER_MOVE"}):c({type:"MOVE_INSERTER",insertPosition:t})},d="MOVING_INSERTER"===s.id,p="INSERTING_CONTROL_POINT"===s.id;return(0,e.createElement)("div",{className:bi()("components-custom-gradient-picker__gradient-bar",{"has-gradient":n}),onMouseEnter:u,onMouseMove:u,style:{background:t},onMouseLeave:()=>{c({type:"STOP_INSERTER_MOVE"})}},(0,e.createElement)("div",{ref:l,className:"components-custom-gradient-picker__markers-container"},!r&&(d||p)&&(0,e.createElement)(xl.InsertPoint,{isRenderedInSidebar:i,insertPosition:s.insertPosition,value:o,onChange:a,onOpenInserter:()=>{c({type:"OPEN_INSERTER"})},onCloseInserter:()=>{c({type:"CLOSE_INSERTER"})}}),(0,e.createElement)(xl,{isRenderedInSidebar:i,disableRemove:r,gradientPickerDomRef:l,ignoreMarkerPosition:p?s.insertPosition:void 0,value:o,onChange:a,onStartControlPointChange:()=>{c({type:"START_CONTROL_CHANGE"})},onStopControlPointChange:()=>{c({type:"STOP_CONTROL_CHANGE"})}})))}var Sl=a(9942);const Nl="linear-gradient(135deg, rgb(6, 147, 227) 0%, rgb(20, 39, 109) 100%)",Ol={type:"angular",value:90},Tl=[{type:"shape",value:"ellipse",at:{type:"position",value:{x:{type:"position-keyword",value:"center"},y:{type:"position-keyword",value:"center"}}}}],Ml=[{value:"linear-gradient",label:(0,Jn.__)("Linear","kadence-blocks")},{value:"radial-gradient",label:(0,Jn.__)("Radial","kadence-blocks")}],Al=[{value:"center top",label:(0,Jn.__)("Center Top","kadence-blocks")},{value:"center center",label:(0,Jn.__)("Center Center","kadence-blocks")},{value:"center bottom",label:(0,Jn.__)("Center Bottom","kadence-blocks")},{value:"left top",label:(0,Jn.__)("Left Top","kadence-blocks")},{value:"left center",label:(0,Jn.__)("Left Center","kadence-blocks")},{value:"left bottom",label:(0,Jn.__)("Left Bottom","kadence-blocks")},{value:"right top",label:(0,Jn.__)("Right Top","kadence-blocks")},{value:"right center",label:(0,Jn.__)("Right Center","kadence-blocks")},{value:"right bottom",label:(0,Jn.__)("Right Bottom","kadence-blocks")}],Dl={top:0,"top right":45,"right top":45,right:90,"right bottom":135,"bottom right":135,bottom:180,"bottom left":225,"left bottom":225,left:270,"top left":315,"left top":315};function Rl({type:e,value:t,length:n}){return`${function({type:e,value:t}){return"literal"===e?t:"hex"===e?`#${t}`:`${e}(${t.join(",")})`}({type:e,value:t})} ${function(e){if(!e)return"";const{value:t,type:n}=e;return`${t}${n}`}(n)}`}function Il({type:e,orientation:t,colorStops:n}){const o=function(e,t){if("radial-gradient"===e){if(!t||!t[0]||"shape"!==t[0].type)return;return"%"===t[0].at.value.x.type?`${t[0].value} at ${t[0].at.value.x.value}% ${t[0].at.value.y.value}%`:`${t[0].value} at ${t[0].at.value.x.value} ${t[0].at.value.y.value}`}if(t&&"angular"===t.type)return`${t.value}deg`}(e,t);return`${e}(${[o,...n.sort(((e,t)=>{var n,o;return(null!==(n=e?.length?.value)&&void 0!==n?n:0)-(null!==(o=t?.length?.value)&&void 0!==o?o:0)})).map(Rl)].filter(Boolean).join(",")})`}function Pl(e){return void 0===e.length||"%"!==e.length.type}function Fl(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;case"rgb":case"rgba":return`${e.type}(${e.value.join(",")})`;default:return"transparent"}}const Ll=({gradientAST:t,hasGradient:n,onChange:o})=>{var a;const r=null!==(a=t?.orientation?.value)&&void 0!==a?a:180;return(0,e.createElement)(jn.AnglePickerControl,{__nextHasNoMarginBottom:!0,onChange:e=>{o(Il({...t,orientation:{type:"angular",value:e}}))},labelPosition:"top",value:n?r:""})},Bl=({gradientAST:t,hasGradient:n,onChange:o})=>{const{type:a}=t;return(0,e.createElement)(jn.SelectControl,{className:"components-custom-gradient-picker__type-picker kadence-select-large",label:(0,Jn.__)("Type"),labelPosition:"top",onChange:e=>{"linear-gradient"===e&&o(Il({...t,orientation:Ol,type:"linear-gradient"})),"radial-gradient"===e&&o(Il({...t,orientation:Tl,type:"radial-gradient"}))},options:Ml,value:n&&a})},Vl=({gradientAST:t,hasGradient:n,onChange:o})=>{let a="center center",r="50%",i="50%",l="position-keyword";t?.orientation&&t?.orientation[0]?.at?.value?.x?.value&&(l=t.orientation[0].at.value.x.type,"position-keyword"!==l?(a=t.orientation[0].at.value.x.value+"% "+t.orientation[0].at.value.y.value+"%",r=t.orientation[0].at.value.x.value+"%",i=t.orientation[0].at.value.y.value+"%"):a=t.orientation[0].at.value.x.value+" "+t.orientation[0].at.value.y.value);const s=e=>{const n=a.split(" ");let r="%"===e?50:"center",i="%"===e?50:"center";if(n[0])switch(n[0]){case"left":r=0;break;case"right":r="100";break;case"center":r=50;break;case 0:i="left";break;case 100:i="right";break;case 50:i="center"}if(n[1])switch(n[1]){case"top":i=0;break;case"bottom":i=100;break;case"center":i=50;break;case 0:i="top";break;case 100:i="bottom";break;case 50:i="center"}o(Il({...t,orientation:[{type:"shape",value:t.orientation[0].value,at:{type:"position",value:{x:{type:e,value:r},y:{type:e,value:i}}}}]}))};if(n)return(0,e.createElement)("div",{className:"components-base-control kadence-gradient-position-control"},(0,e.createElement)(jn.Flex,{justify:"space-between",className:"kadence-gradient-position_header"},(0,e.createElement)(jn.FlexItem,null,(0,e.createElement)("label",{className:"kadence-gradient-position__label"},(0,Jn.__)("Position","kadence-blocks")))),"position-keyword"===l&&(0,e.createElement)("div",{className:"kadence-controls-content"},(0,e.createElement)(jn.SelectControl,{className:"components-custom-gradient-picker__position-picker",onChange:e=>{const n=e.split(" ");o(Il({...t,orientation:[{type:"shape",value:t.orientation[0].value,at:{type:"position",value:{x:{type:"position-keyword",value:void 0!==n[0]&&n[0]?n[0]:"center"},y:{type:"position-keyword",value:void 0!==n[1]&&n[1]?n[1]:"center"}}}}]}))},options:Al,value:a}),(0,e.createElement)(jn.Button,{className:"kadence-control-toggle-advanced only-icon",label:(0,Jn.__)("Set custom position","kadence-blocks"),icon:gi,onClick:()=>s("%"),isPressed:!1,isTertiary:!0})),"position-keyword"!==l&&(0,e.createElement)("div",{className:"kadence-controls-content"},(0,e.createElement)(jn.__experimentalUnitControl,{labelPosition:"left",label:(0,Jn.__)("Left","kadence-blocks"),max:100,min:0,units:[{value:"%",label:"%"}],value:r,onChange:e=>{o(Il({...t,orientation:[{type:"shape",value:t.orientation[0].value,at:{type:"position",value:{x:{type:"%",value:parseInt(e,10)},y:t.orientation[0].at.value.y}}}]}))}}),(0,e.createElement)(jn.__experimentalUnitControl,{labelPosition:"left",label:(0,Jn.__)("Top","kadence-blocks"),max:100,min:0,value:i,units:[{value:"%",label:"%"}],onChange:e=>{o(Il({...t,orientation:[{type:"shape",value:t.orientation[0].value,at:{type:"position",value:{x:t.orientation[0].at.value.x,y:{type:"%",value:parseInt(e,10)}}}}]}))}}),(0,e.createElement)(jn.Button,{className:"kadence-control-toggle-advanced only-icon",label:(0,Jn.__)("Set standard position","kadence-blocks"),icon:gi,onClick:()=>s("position-keyword"),isPrimary:!0,isPressed:!0})))},zl=({gradientAST:t,hasGradient:n,onChange:o})=>{let a="ellipse";return t?.orientation&&t?.orientation[0]?.type&&"shape"===t?.orientation[0]?.type&&t?.orientation[0]?.value&&(a=t?.orientation&&t?.orientation[0]?.value),(0,e.createElement)(jn.SelectControl,{className:"components-custom-gradient-picker__shape-picker kadence-select-large",label:(0,Jn.__)("Shape","kadence-blocks"),labelPosition:"top",onChange:e=>{o(Il({...t,orientation:[{type:"shape",value:e,at:t.orientation[0].at}]}))},options:[{value:"ellipse",label:(0,Jn.__)("Ellipse","kadence-blocks")},{value:"circle",label:(0,Jn.__)("Circle","kadence-blocks")}],value:n&&a})};function jl({value:t,onChange:n,isRenderedInSidebar:o=!0}){const a=function(e){let t;try{t=Sl.parse(e)[0],t.value=e}catch(e){t=Sl.parse(Nl)[0],t.value=Nl}if("directional"===t.orientation?.type&&(t.orientation.type="angular",t.orientation.value=Dl[t.orientation.value].toString()),t.colorStops.some(Pl)){const{colorStops:e}=t,n=100/(e.length-1);e.forEach(((e,t)=>{e.length={value:n*t,type:"%"}})),t.value=Il(t)}return t}(t),r=function(e){return Il({type:"linear-gradient",orientation:Ol,colorStops:e.colorStops})}(a),i=a.value!==Nl,l=a.colorStops.map((e=>({color:Fl(e),position:parseInt(e.length.value)})));return(0,e.createElement)("div",{className:"components-base-control components-custom-gradient-picker kadence-gradient-control"},(0,e.createElement)(Cl,{isRenderedInSidebar:o,background:r,hasGradient:i,value:l,onChange:e=>{n(Il(function(e,t){return{...e,colorStops:t.map((({position:e,color:t})=>{if(t.startsWith("var("))return{length:{type:"%",value:e?.toString()},type:"literal",value:t};const{r:n,g:o,b:a,a:r}=rl(t).toRgb();return{length:{type:"%",value:e?.toString()},type:r<1?"rgba":"rgb",value:r<1?[n,o,a,r]:[n,o,a]}}))}}(a,e)))}}),(0,e.createElement)(jn.Flex,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,e.createElement)("div",{className:"components-custom-gradient-picker__item components-custom-gradient-picker-type"},(0,e.createElement)(Bl,{gradientAST:a,hasGradient:i,onChange:n})),"linear-gradient"===a.type&&(0,e.createElement)("div",{className:"components-custom-gradient-picker__item components-custom-gradient-picker-angle"},(0,e.createElement)(Ll,{gradientAST:a,hasGradient:i,onChange:n})),"radial-gradient"===a.type&&(0,e.createElement)("div",{className:"components-custom-gradient-picker__item components-custom-gradient-picker-shape"},(0,e.createElement)(zl,{gradientAST:a,hasGradient:i,onChange:n}))),"radial-gradient"===a.type&&(0,e.createElement)(jn.Flex,{gap:3,className:"components-custom-gradient-picker__ui-line"},(0,e.createElement)("div",{className:"components-custom-gradient-picker__item components-custom-gradient-picker-position"},(0,e.createElement)(Vl,{gradientAST:a,hasGradient:i,onChange:n}))))}const Hl=[{value:"0",label:(0,Jn.__)("None","kadence-blocks"),size:0,name:(0,Jn.__)("None","kadence-blocks")},{value:"xxs",output:"var(--global-kb-spacing-xxs, 0.5rem)",size:8,label:(0,Jn.__)("XXS","kadence-blocks"),name:(0,Jn.__)("2X Small","kadence-blocks")},{value:"xs",output:"var(--global-kb-spacing-xs, 1rem)",size:16,label:(0,Jn.__)("XS","kadence-blocks"),name:(0,Jn.__)("X Small","kadence-blocks")},{value:"sm",output:"var(--global-kb-spacing-sm, 1.5rem)",size:24,label:(0,Jn.__)("SM","kadence-blocks"),name:(0,Jn.__)("Small","kadence-blocks")},{value:"md",output:"var(--global-kb-spacing-md, 2rem)",size:32,label:(0,Jn.__)("MD","kadence-blocks"),name:(0,Jn.__)("Medium","kadence-blocks")},{value:"lg",output:"var(--global-kb-spacing-lg, 3rem)",size:48,label:(0,Jn.__)("LG","kadence-blocks"),name:(0,Jn.__)("Large","kadence-blocks")},{value:"xl",output:"var(--global-kb-spacing-xl, 4rem)",size:64,label:(0,Jn.__)("XL","kadence-blocks"),name:(0,Jn.__)("X Large","kadence-blocks")},{value:"xxl",output:"var(--global-kb-spacing-xxl, 5rem)",size:80,label:(0,Jn.__)("XXL","kadence-blocks"),name:(0,Jn.__)("2X Large","kadence-blocks")},{value:"3xl",output:"var(--global-kb-spacing-3xl, 6.5rem)",size:104,label:(0,Jn.__)("3XL","kadence-blocks"),name:(0,Jn.__)("3X Large","kadence-blocks")},{value:"4xl",output:"var(--global-kb-spacing-4xl, 8rem)",size:128,label:(0,Jn.__)("4XL","kadence-blocks"),name:(0,Jn.__)("4X Large","kadence-blocks")},{value:"5xl",output:"var(--global-kb-spacing-5xl, 10rem)",size:160,label:(0,Jn.__)("5XL","kadence-blocks"),name:(0,Jn.__)("5X Large","kadence-blocks")}];function Ul(e,t){if(!t)return;if(!e)return;if("0"===t||"default"===t)return 0;return e.findIndex((e=>e.value===t))||void 0}function Wl({label:t,onChange:n,value:o="",placeholder:a="",className:r="",options:i=Hl,step:l=1,max:s=200,min:c=0,beforeIcon:u="",help:d="",defaultValue:p=0,unit:h="",onUnit:m,units:f=["px","em","rem"],disableCustomSizes:b=!1,customControl:g=!1,setCustomControl:v=null,isPopover:k=!1,isSingle:y=!1,parentLabel:E=null,onMouseOver:x,onMouseOut:_,allowAuto:w=!1}){const[C,S]=(0,zn.useState)(!1),[N,O]=(0,zn.useState)(!1),T=JSON.parse(JSON.stringify(i));T.push({value:"ss-auto",output:"var(--global-kb-spacing-auto, auto)",label:(0,Jn.__)("Auto","kadence-blocks"),size:0,name:(0,Jn.__)("Auto","kadence-blocks")}),(0,zn.useEffect)((()=>{S(function(e,t){return!!t&&!!e&&!e.find((e=>e.value===t))}(T,o))}),[]);const M=v?g:C,A=v||S,D=i.map(((e,t)=>({value:t,label:void 0}))),R=f.map((e=>({value:e,label:e}))),I=M?Number(o):Ul(T,o),P=M?Number(a):Ul(T,a),F=T[I]?.label?T[I]?.label:(0,Jn.__)("Unset","kadence-blocks"),L=T[I]?.name?T[I]?.name+" "+T[I]?.size+"px":(0,Jn.__)("Unset","kadence-blocks"),B=E?E+" ":"";let V=t;y?V=L:t&&B&&(V=B+t+" "+F);const z=(0,e.createElement)(e.Fragment,null,(0,e.createElement)(jn.RangeControl,{label:V||void 0,className:"components-spacing-sizes-control__range-control",beforeIcon:u,value:"ss-auto"==o?"":I,onChange:e=>{var t;n(void 0===e?p:void 0===(t=e)?"":0===parseInt(t,10)?"0":`${i[t]?.value}`)},min:0,max:i.length-1,marks:D,step:1,help:d,withInputField:!1,"aria-valuenow":I,"aria-valuetext":i[I]?.label,renderTooltipContent:e=>T[e]?.label,initialPosition:p||0,allowReset:!!y,hideLabelFromVision:!k&&!y,onMouseOver:x,onMouseOut:_,onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===o&&n("0")}}),!b&&(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Set custom size","kadence-blocks"),icon:gi,onClick:()=>A(!0),isPressed:!1,isTertiary:!0}));return[n&&(0,e.createElement)("div",{className:"components-base-control component-spacing-sizes-control kadence-single-measure-range-control"+(r?" "+r:"")},!v&&t&&(0,e.createElement)(jn.Flex,{justify:"space-between",className:"kadence-radio-range__header"},(0,e.createElement)(jn.FlexItem,null,(0,e.createElement)("label",{className:"components-base-control__label"},t))),!M&&(0,e.createElement)("div",{className:"kadence-controls-content"},k&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(jn.Button,{className:"kadence-popover-spacing-btn",disabled:!(!o||"auto"!=o),tabIndex:"-1",onClick:o&&"auto"==o?"":function(){O(!N)},onMouseOver:x,onMouseOut:_},E&&t&&(0,e.createElement)("span",{className:"kadence-placement-label"},t),(0,e.createElement)("span",{className:"kadence-spacing-btn-val"},T[I]?.label,!T[I]?.label&&(0,e.createElement)("span",{className:"kadence-spacing-btn-placeholder"},T?.[P]?.label?T?.[P]?.label:a))),N&&(0,e.createElement)(jn.Popover,{onClose:function(){O(!1)},className:"kadence-range-popover-settings"},(0,e.createElement)("div",{className:"kadence-range-popover-settings-inner"},z,w&&(0,e.createElement)(jn.Button,{className:"custom-auto-button",variant:"secondary",isSmall:!0,text:(0,Jn.__)("Auto","kadence-blocks"),onClick:()=>n("ss-auto"),isPressed:!(!o||"ss-auto"!=o)}),(0,e.createElement)(jn.Button,{className:"custom-reset-button",variant:"secondary",isSmall:!0,text:(0,Jn.__)("Reset","kadence-blocks"),onClick:()=>n("")})))),!k&&(0,e.createElement)(e.Fragment,null,z)),M&&(0,e.createElement)("div",{className:"kadence-controls-content kadence-single-unit-control"},(0,e.createElement)(jn.__experimentalUnitControl,{label:E&&t?t:void 0,labelPosition:"top",min:c,max:s,disabled:!(!o||"auto"!=o),step:l,units:R,value:o,placeholder:a||void 0,disableUnits:!0,onChange:e=>(e=>{const t=isNaN(parseFloat(e))?void 0:parseFloat(e);n(t)})(e),onMouseOver:x,onMouseOut:_}),!E&&(0,e.createElement)("div",{className:"kadence-measure-control-select-wrapper"},(0,e.createElement)("select",{className:"kadence-measure-control-select components-unit-control__select",onChange:e=>{m(e.target.value)},value:h},f.map((t=>(0,e.createElement)("option",{value:t,selected:h===t||void 0,key:t},t))))),!b&&(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control"},(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Use size preset","kadence-blocks"),icon:gi,isPrimary:!0,onClick:()=>A(!1),isPressed:!0}))))]}Di.pxIcon,Di.emIcon,Di.remIcon,Di.vhIcon,Di.vwIcon,Di.percentIcon;const Gl=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})),$l=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z"}));function ql(e,t){return!(!t||!e||!(void 0===t[0]||""!==t[0]||void 0===t[1]||""!==t[1]&&"auto"!==t[1]||void 0===t[2]||""!==t[2]||void 0===t[3]||""!==t[3]&&"auto"!==t[3])||(void 0!==t[0]&&""!==t[0]?e.find((e=>e.value===t[0])):void 0!==t[1]&&""!==t[1]&&"auto"!==t[1]?e.find((e=>e.value===t[1])):void 0!==t[2]&&""!==t[2]?e.find((e=>e.value===t[2])):void 0!==t[3]&&""!==t[3]&&"auto"!==t[3]?e.find((e=>e.value===t[3])):e.find((e=>e.value===t))))}function Xl(e,t,n){if(!t)return"";if(!e)return"";if("0"===t)return 0;if("px"!==n)return"";const o=e.find((e=>e.value===t));return o?o.size:""}function Jl(e,t,n){if(!t)return"";if(!e)return"";if(0===t)return"0";if("px"!==n)return"";const o=e.find((e=>e.size.toString()===t.toString()));return o?o.value:""}function Kl({label:t,onChange:n,onControl:o,value:a="",className:r="",options:i=Hl,step:l=1,max:s=200,min:c=0,beforeIcon:u="",help:d="",placeholder:p=["","","",""],defaultValue:h=["","","",""],control:m="individual",unit:f="",onUnit:b,units:g=["px","em","rem"],disableCustomSizes:v=!1,isBorderRadius:k=!1,firstIcon:y=Di.outlineTopIcon,secondIcon:E=Di.outlineRightIcon,thirdIcon:x=Di.outlineBottomIcon,fourthIcon:_=Di.outlineLeftIcon,linkIcon:w=Gl,unlinkIcon:C=$l,customControl:S=!1,setCustomControl:N=null,parentLabel:O=null,reset:T,onMouseOver:M,onMouseOut:A,allowAuto:D=!1}){const R={first:k?Di.topLeftIcon:y,second:k?Di.topRightIcon:E,third:k?Di.bottomRightIcon:x,fourth:k?Di.bottomLeftIcon:_,link:k?Di.radiusLinkedIcon:w,unlink:k?Di.radiusIndividualIcon:C},[I,P]=(0,zn.useState)(!1),[F,L]=(0,zn.useState)(m),B=JSON.parse(JSON.stringify(i));B.push({value:"ss-auto",output:"var(--global-kb-spacing-auto, auto)",label:(0,Jn.__)("Auto","kadence-blocks"),size:0,name:(0,Jn.__)("Auto","kadence-blocks")}),(0,zn.useEffect)((()=>{P(ql(B,a))}),[]);const V=N?S:I,z=N||P,j=o?m:F,H=o||L;return[n&&(0,e.createElement)("div",{className:"components-base-control component-spacing-sizes-control kadence-measure-range-control "+(r?" "+r:"")},t&&(0,e.createElement)(jn.Flex,{justify:"space-between",className:"kadence-component__header kadence-radio-range__header"},t&&(0,e.createElement)("div",{className:"kadence-component__header__title kadence-radio-range__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),T&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(h,a),icon:undo,onClick:()=>{"function"==typeof T?T():n(h)}}))),!v&&(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:V?(0,Jn.__)("Use size preset","kadence-blocks"):(0,Jn.__)("Set custom size","kadence-blocks"),icon:gi,isSmall:!0,onClick:()=>{if(V){const e=[Jl(i,a?a[0]:"",f),Jl(i,a?a[1]:"",f),Jl(i,a?a[2]:"",f),Jl(i,a?a[3]:"",f)];n(e)}else{const e=[Xl(i,a?a[0]:"",f),Xl(i,a?a[1]:"",f),Xl(i,a?a[2]:"",f),Xl(i,a?a[3]:"",f)];n(e)}z(!V)},isPressed:!!V,isTertiary:!V}),H&&(0,e.createElement)(jn.Button,{isSmall:!0,className:"kadence-radio-item radio-custom is-single only-icon",label:"individual"!==j?(0,Jn.__)("Individual","kadence-blocks"):(0,Jn.__)("Linked","kadence-blocks"),icon:"individual"!==j?R.link:R.unlink,onClick:()=>H("individual"!==j?"individual":"linked"),isPressed:"individual"!==j,isTertiary:"individual"===j})),(0,e.createElement)("div",{className:"kadence-controls-content"},"individual"!==j&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Wl,{value:a?a[0]:"",onChange:e=>n([e,e,e,e]),className:"kb-measure-input-all-inputs",min:c,max:s,options:i,step:l,help:d,unit:f,units:g,onUnit:b,defaultValue:h[0],placeholder:p?.[0]?p?.[0]:"",allowReset:!1,disableCustomSizes:!0,setCustomControl:z,customControl:V,isPopover:!1,isSingle:!0,onMouseOver:M,onMouseOut:A,allowAuto:D})),"individual"===j&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Wl,{parentLabel:O||t,label:(0,Jn.__)("Top","kadence-blocks"),className:"kb-measure-box-top",value:a?a[0]:"",onChange:e=>{n([e,a&&void 0!==a[1]?a[1]:"",a&&void 0!==a[2]?a[2]:"",a&&void 0!==a[3]?a[3]:""])},min:c,max:s,options:i,step:l,help:d,unit:f,units:g,onUnit:b,defaultValue:h[0],placeholder:p?.[0]?p?.[0]:"",allowReset:!1,disableCustomSizes:!0,setCustomControl:z,customControl:V,isPopover:!0,onMouseOver:M,onMouseOut:A,allowAuto:D}),(0,e.createElement)(Wl,{parentLabel:O||t,label:(0,Jn.__)("Right","kadence-blocks"),className:"kb-measure-box-right",value:a?a[1]:"",onChange:e=>n([a&&void 0!==a[0]?a[0]:"",e,a&&void 0!==a[2]?a[2]:"",a&&void 0!==a[3]?a[3]:""]),min:c,max:s,options:i,step:l,help:d,unit:f,units:g,onUnit:b,defaultValue:h[1],placeholder:p?.[1]?p?.[1]:"",allowReset:!1,disableCustomSizes:!0,setCustomControl:z,customControl:V,isPopover:!0,onMouseOver:M,onMouseOut:A,allowAuto:D}),(0,e.createElement)(Wl,{parentLabel:O||t,label:(0,Jn.__)("Bottom","kadence-blocks"),className:"kb-measure-box-bottom",value:a?a[2]:"",onChange:e=>n([a&&void 0!==a[0]?a[0]:"",a&&void 0!==a[1]?a[1]:"",e,a&&void 0!==a[3]?a[3]:""]),min:c,max:s,options:i,step:l,help:d,unit:f,units:g,onUnit:b,defaultValue:h[2],placeholder:p?.[2]?p?.[2]:"",allowReset:!1,disableCustomSizes:!0,setCustomControl:z,customControl:V,isPopover:!0,onMouseOver:M,onMouseOut:A,allowAuto:D}),(0,e.createElement)(Wl,{parentLabel:O||t,label:(0,Jn.__)("Left","kadence-blocks"),className:"kb-measure-box-left",value:a?a[3]:"",onChange:e=>n([a&&void 0!==a[0]?a[0]:"",a&&void 0!==a[1]?a[1]:"",a&&void 0!==a[2]?a[2]:"",e]),min:c,max:s,options:i,step:l,help:d,unit:f,units:g,onUnit:b,defaultValue:h[3],placeholder:p?.[3]?p?.[3]:"",allowReset:!1,disableCustomSizes:!0,setCustomControl:z,customControl:V,isPopover:!0,onMouseOver:M,onMouseOut:A,allowAuto:D}),V&&(0,e.createElement)("div",{className:"kadence-units kadence-measure-control-select-wrapper"},(0,e.createElement)("select",{className:"kadence-measure-control-select components-unit-control__select",onChange:e=>{b(e.target.value)},value:f,disabled:1===g.length},g.map((t=>(0,e.createElement)("option",{value:t,selected:f===t||void 0,key:t},t))))))))]}const Yl=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));function Zl({label:t,subLabel:n,onChange:o,onChangeTablet:a,onChangeMobile:r,mobileValue:i,tabletValue:l,value:s,onControl:c,control:u="individual",options:d=Hl,step:p=1,max:h=100,min:m=0,unit:f="",onUnit:b,showUnit:g=!1,units:v=["px","em","rem"],isBorderRadius:k=!1,disableCustomSizes:y=!1,firstIcon:E=Di.outlineTopIcon,secondIcon:x=Di.outlineRightIcon,thirdIcon:_=Di.outlineBottomIcon,fourthIcon:w=Di.outlineLeftIcon,linkIcon:C=Gl,unlinkIcon:S=$l,deskDefault:N=["","","",""],tabletDefault:O=["","","",""],mobileDefault:T=["","","",""],ghostDefault:M=["","","",""],reset:A=!0,setCustomControl:D=null,onMouseOver:R,onMouseOut:I,allowAuto:P=!1}){const F=(0,zn.useRef)(),L={first:k?topLeftIcon:E,second:k?topRightIcon:x,third:k?bottomRightIcon:_,fourth:k?bottomLeftIcon:w,link:k?radiusLinkedIcon:C,unlink:k?radiusIndividualIcon:S},[B,V]=(0,zn.useState)(!1),[z,j]=(0,zn.useState)(u),H=D?customControl:B,U=D||V,W=JSON.parse(JSON.stringify(d));W.push({value:"ss-auto",output:"var(--global-kb-spacing-auto, auto)",label:(0,Jn.__)("Auto","kadence-blocks"),size:0,name:(0,Jn.__)("Auto","kadence-blocks")});const G=e=>{let t=[];return t=H?[Jl(d,e?e[0]:"",f),Jl(d,e?e[1]:"",f),Jl(d,e?e[2]:"",f),Jl(d,e?e[3]:"",f)]:[Xl(d,e?e[0]:"",f),Xl(d,e?e[1]:"",f),Xl(d,e?e[2]:"",f),Xl(d,e?e[3]:"",f)],t},$=c?u:z,q=c||j,[X,J]=(0,zn.useState)("Desktop"),K=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);K!==X&&J(K),(0,zn.useEffect)((()=>{let e=s;"Tablet"==K?e=l:"Mobile"==K&&(e=i),V(ql(W,e))}),[K]);const{setPreviewDeviceType:Y}=(0,Kn.useDispatch)("kadenceblocks/data"),Z=[{name:"Desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}];let Q=s||["","","",""];"Tablet"===X?Q=l||["","","",""]:"Mobile"===X&&(Q=i||["","","",""]);let ee=l?JSON.parse(JSON.stringify(l)):["","","",""];ee?.[0]||(ee[0]=s?.[0]?s[0]:""),ee?.[1]||(ee[1]=s?.[1]?s[1]:""),ee?.[2]||(ee[2]=s?.[2]?s[2]:""),ee?.[3]||(ee[3]=s?.[3]?s[3]:"");const te={};te.Mobile=(0,e.createElement)(Kl,{key:2,className:"measure-mobile-size",parentLabel:t,label:n?(0,Jn.__)("Mobile:","kadence-blocks")+n:void 0,value:i||["","","",""],placeholder:ee,onChange:e=>r((0,$n.clearNonMatchingValues)(i,e)),control:$,onControl:e=>q(e),setCustomControl:U,customControl:H,options:d,defaultValue:T,min:m,max:h,step:p,unit:f,onUnit:b||void 0,showUnit:!0,units:[f],isBorderRadius:k,firstIcon:E,secondIcon:x,thirdIcon:_,fourthIcon:w,linkIcon:C,unlinkIcon:S,onMouseOver:R,onMouseOut:I,allowAuto:P}),te.Tablet=(0,e.createElement)(Kl,{key:1,className:"measure-tablet-size",parentLabel:t,label:n?(0,Jn.__)("Tablet:","kadence-blocks")+n:void 0,value:l||["","","",""],placeholder:s||["","","",""],onChange:e=>a((0,$n.clearNonMatchingValues)(l,e)),control:$,onControl:e=>q(e),setCustomControl:U,customControl:H,options:d,defaultValue:O,min:m,max:h,step:p,unit:f,onUnit:b||void 0,showUnit:!0,units:[f],isBorderRadius:k,firstIcon:E,secondIcon:x,thirdIcon:_,fourthIcon:w,linkIcon:C,unlinkIcon:S,onMouseOver:R,onMouseOut:I,allowAuto:P}),te.Desktop=(0,e.createElement)(Kl,{key:0,className:"measure-desktop-size",parentLabel:t,label:n||void 0,value:s||["","","",""],placeholder:M||["","","",""],onChange:e=>o((0,$n.clearNonMatchingValues)(s,e)),control:$,onControl:e=>q(e),setCustomControl:U,customControl:H,options:d,defaultValue:N,min:m,max:h,step:p,unit:f,onUnit:b||void 0,showUnit:g,units:v,isBorderRadius:k,firstIcon:E,secondIcon:x,thirdIcon:_,fourthIcon:w,linkIcon:C,unlinkIcon:S,onMouseOver:R,onMouseOut:I,allowAuto:P});let ne=N;return"Mobile"===X?ne=T:"Mobile"===X&&(ne=O),[o&&a&&r&&(0,e.createElement)("div",{ref:F,className:"components-base-control kb-responsive-measure-control kadence-measure-range-control"},(0,e.createElement)(jn.Flex,{justify:"space-between",className:"kadence-title-bar kadence-component__header kadence-measure-range__header kadence-radio-range__header"},t&&(0,e.createElement)("div",{className:"kadence-component__header__title kadence-radio-range__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),!0===A&&("linked"!==$||"linked"===$&&!0===H)&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(ne,Q),icon:Yl,onClick:()=>{"Tablet"===X?a(O):"Mobile"===X?r(T):o(N)}}))),(0,e.createElement)(jn.ButtonGroup,{className:"kb-responsive-options kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(Z,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===X?" is-active":""}`,isSmall:!0,"aria-pressed":X===t,onClick:()=>{return e=t,Y((0,$n.capitalizeFirstLetter)(e)),void J((0,$n.capitalizeFirstLetter)(e));var e}},o)))),!y&&!n&&(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:H?(0,Jn.__)("Use size preset","kadence-blocks"):(0,Jn.__)("Set custom size","kadence-blocks"),icon:gi,isSmall:!0,onClick:()=>{(()=>{if("Mobile"==X){const e=G(i);(0,$n.objectSameFill)(i,e)&&r(e)}else if("Tablet"==X){const e=G(l);(0,$n.objectSameFill)(l,e)&&a(e)}else{const e=G(s);(0,$n.objectSameFill)(s,e)&&o(e)}})(),U(!H)},isPressed:!!H,isTertiary:!H}),q&&!n&&(0,e.createElement)(jn.Button,{isSmall:!0,className:"kadence-radio-item radio-custom is-single only-icon",label:"individual"!==$?(0,Jn.__)("Individual","kadence-blocks"):(0,Jn.__)("Linked","kadence-blocks"),icon:"individual"!==$?L.link:L.unlink,onClick:()=>q("individual"!==$?"individual":"linked"),isPressed:"individual"!==$,isTertiary:"individual"===$})),(0,e.createElement)("div",{className:"kb-responsive-measure-control-inner"},te[X]?te[X]:te.Desktop))]}const Ql=window.wp.isShallowEqual;function es({style:t,type:n="inside",spacing:o,forceShow:a=!1,forceHide:r=!1,offset:i=!0}){const l=o[0],s=o[1],c=o[2],u=o[3],d=(0,zn.useMemo)((()=>{if("outside"===n){const e=l?l:0,t=s?s:0,n=c?c:0,o=u?u:0;return{borderTopWidth:e,borderRightWidth:t,borderBottomWidth:n,borderLeftWidth:o,top:i&&e?`calc(${e} * -1)`:0,right:i&&t?`calc(${t} * -1)`:0,bottom:i&&n?`calc(${n} * -1)`:0,left:i&&o?`calc(${o} * -1)`:0}}if("outsideVertical"===n){const e=l?l:0,t=c?c:0;return{borderTopWidth:e,borderRightWidth:s?s:0,borderBottomWidth:t,borderLeftWidth:u?u:0,top:i&&e?`calc(${e} * -1)`:0,bottom:i&&t?`calc(${t} * -1)`:0}}return{borderTopWidth:l?l:0,borderRightWidth:s?s:0,borderBottomWidth:c?c:0,borderLeftWidth:u?u:0,marginLeft:t?.marginLeft?t.marginLeft:0,marginRight:t?.marginRight?t.marginRight:0}}),[o]),[p,h]=(0,zn.useState)(!1),m=(0,zn.useRef)(o),f=(0,zn.useRef)(),b=()=>{f.current&&window.clearTimeout(f.current)};return(0,zn.useMemo)((()=>(r&&(m.current=o),(0,Ql.isShallowEqualArrays)(o,m.current)||a||r||(h(!0),m.current=o,b(),f.current=setTimeout((()=>{h(!1)}),400)),()=>b())),[o,a,r]),!p&&!a||r?null:(0,e.createElement)("div",{className:`kb__spacing-visualizer-wrap kb__spacing_visualizer-type-${n}`,style:t},(0,e.createElement)("div",{className:"kb__spacing-visualizer",style:d}))}function ts({label:t,className:n,hideLabel:o=!1,wrap:a=!1,allowClear:r=!1,help:i="",onChange:l,onChangeTablet:s,onChangeMobile:c,value:u,mobileValue:d,tabletValue:p,options:h=[],tabletOptions:m=h,mobileOptions:f=m,...b}){return(0,e.createElement)(eo,{label:t,desktopChildren:(0,e.createElement)(wi,{value:u,options:h,onChange:l,hideLabel:o,help:i,wrap:a,allowClear:r}),tabletChildren:(0,e.createElement)(wi,{value:p,options:m,onChange:s,hideLabel:o,help:i,wrap:a,allowClear:!0}),mobileChildren:(0,e.createElement)(wi,{value:d,options:f,onChange:c,hideLabel:o,help:i,wrap:a,allowClear:!0})})}function ns({value:t,isPressed:n=!1}){const o={top:"M19.5 19.5H.5V.5h19v19zM1.607 18.392h16.786V1.608H1.607v16.784zM17.178 2.888H2.822v3.275h14.356V2.888z",middle:"M19.5 19.482H.5V.5h19v18.982zM1.607 18.375h16.786V1.607H1.607v16.768zm15.571-10.02H2.822v3.272h14.356V8.355z",bottom:"M19.518 19.5H.5V.5h19.018v19zm-17.91-1.108H18.41V1.608H1.608v16.784zm15.586-4.739H2.824v3.275h14.37v-3.275z"};return o.hasOwnProperty(t)?(0,e.createElement)(jn.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",isPressed:n},(0,e.createElement)(jn.Path,{d:o[t]})):null}const os=["image"];class as extends zn.Component{constructor(){super(...arguments)}render(){const{label:t,hasImage:n,onSaveImage:o,onRemoveImage:a,disableMediaButtons:r,imageURL:i,imageID:l,kadenceDynamic:s,dynamicAttribute:c=""}=this.props;return(0,e.createElement)("div",{className:"kadence-image-media-control kadence-image-background-control"},!n&&(0,e.createElement)(zn.Fragment,null,t&&(0,e.createElement)("div",{className:"components-kadence-image-background__label"},t),(0,e.createElement)(_i,{labels:"",selectIcon:Ni,selectLabel:(0,Jn.__)("Select Image","kadence-blocks"),onSelect:e=>o(e),accept:"image/*",className:"kadence-image-upload",allowedTypes:os,disableMediaButtons:r,dynamicControl:c&&kadence_blocks_params.dynamic_enabled?(0,e.createElement)(ai,{...this.props}):void 0})),n&&(0,e.createElement)(zn.Fragment,null,t&&(0,e.createElement)("div",{className:"components-kadence-image-background__label"},t),c&&kadence_blocks_params.dynamic_enabled&&s&&s[c]&&s[c].enable?(0,e.createElement)("div",{className:"kb-dynamic-background-sidebar-top"},(0,e.createElement)(ai,{startOpen:!s[c].field,...this.props})):(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(Xn.MediaUpload,{onSelect:e=>o(e),type:"image",value:l||"",render:({open:t})=>(0,e.createElement)(jn.Button,{className:"components-button components-icon-button kt-cta-upload-btn kb-sidebar-image",style:{backgroundImage:'url("'+i+'")',backgroundSize:"cover"},onClick:t,icon:Oi},(0,Jn.__)("Edit Image","kadence-blocks"))}),(0,e.createElement)(jn.Button,{icon:Ti,label:(0,Jn.__)("Remove Image","kadence-blocks"),className:"components-button components-icon-button kt-remove-img kt-cta-upload-btn",onClick:()=>a()}),c&&kadence_blocks_params.dynamic_enabled&&(0,e.createElement)(ai,{...this.props}))))}}const rs=as,is=["video"];class ls extends zn.Component{constructor(){super(...arguments)}render(){const{label:t,hasVideo:n,onSaveVideo:o,onRemoveVideo:a,disableMediaButtons:r,videoURL:i,videoID:l}=this.props;return(0,e.createElement)("div",{className:"components-base-control kadence-image-media-control kadence-image-background-control kadence-video-background-control"},!n&&(0,e.createElement)(zn.Fragment,null,t&&(0,e.createElement)("div",{className:"components-kadence-video-background__label"},t),(0,e.createElement)(_i,{labels:"",selectIcon:Ni,selectLabel:(0,Jn.__)("Select Video","kadence-blocks"),onSelect:e=>o(e),accept:"video/*",className:"kadence-image-upload",allowedTypes:is,disableMediaButtons:r})),n&&(0,e.createElement)(zn.Fragment,null,t&&(0,e.createElement)("div",{className:"components-kadence-video-background__label"},t),(0,e.createElement)("div",{className:"components-kadence-video-btns"},(0,e.createElement)(Xn.MediaUpload,{onSelect:e=>o(e),type:"video",value:l||"",render:({open:t})=>(0,e.createElement)(jn.Button,{className:"components-button components-icon-button kb-cta-upload-btn kb-video-edit",onClick:t,icon:Di.video},(0,Jn.__)("Edit Video","kadence-blocks"))}),(0,e.createElement)(jn.Button,{icon:Ti,label:(0,Jn.__)("Remove Image","kadence-blocks"),className:"components-button components-icon-button kb-remove-video kb-cta-upload-btn",onClick:()=>a()}))))}}const ss=ls;function cs({label:t,className:n,children:o}){return(0,e.createElement)("div",{className:"components-base-control kadence-subsection-wrap"+(n?" "+n:"")},t&&(0,e.createElement)("h2",{className:"subsection-wrap-title"},t),(0,e.createElement)("div",{className:"kt-inner-subsection"},o))}const us=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",style:{paddingTop:"1px"}},(0,e.createElement)("rect",{width:"20",height:"16",fill:"#0073e6",rx:"3",ry:"3"}),(0,e.createElement)("text",{x:"50%",y:"57%",fontSize:"9",textAnchor:"middle",color:"#fff"},"Pro")),ds=(0,qr.compose)([(0,Kn.withSelect)(((e,t)=>{const n=void 0===t.initialOpen||t.initialOpen,o=(0,qn.get)(t,["index"],"");return{isOpened:e("kadenceblocks/data").isEditorPanelOpened(t.panelName+o+e("core/block-editor").getSelectedBlockClientId(),n)}})),(0,Kn.withDispatch)(((e,t,{select:n})=>{const{getSelectedBlockClientId:o}=n("core/block-editor"),a=void 0===t.initialOpen||t.initialOpen,r=(0,qn.get)(t,["index"],"");return{toggleOpened:()=>{e("kadenceblocks/data").toggleEditorPanelOpened(t.panelName+r+o(),a)}}}))])((function({children:t,title:n,initialOpen:o=!0,isOpened:a,toggleOpened:r,className:i="",icon:l="",buttonProps:s={},blockSlug:c=!1,index:u=!1,proTag:d=!1,panelName:p}){return!1===c||(0,$n.showSettings)(p,c)?(d&&(s.icon=us,s.iconPosition="right"),(0,e.createElement)(jn.PanelBody,{title:n,initialOpen:o,onToggle:r,opened:a,className:i,icon:l,buttonProps:s},t)):null}));function ps({children:t,title:n}){return(0,e.createElement)("div",{className:"kb-sub-panel"},n&&(0,e.createElement)("h2",{className:"kb-sub-panel-title"},n),(0,e.createElement)("div",{className:"kb-inner-sub-panel"},t))}const hs=function({children:t,blockSlug:n=!1,settingSlug:o="allSettings"}){return!1===n||(0,$n.showSettings)(o,n)?(0,e.createElement)(Xn.InspectorControls,null,t):null};class ms extends zn.Component{constructor(){super(...arguments),this.state={options:[],isLoading:!1,page:1,hasMore:!1}}componentDidMount(){this.fetchPostAbortController=new AbortController,this.fetchTerms()}componentWillUnmount(){this.fetchPostAbortController&&this.fetchPostAbortController.abort()}fetchTerms(){const{restBase:e}=this.props,{page:t,options:n,search:o}=this.state,a={page:t,per_page:10};o&&o.length>=3&&(a.search=o),this.setState({isLoading:!0}),(0,$n.fetchJson)({path:(0,Hr.addQueryArgs)(`${e}/`,a),signal:this.fetchPostAbortController.signal}).then((([e,o])=>{const a=(0,qn.uniqBy)([...n,...e.map((e=>({value:e.id,label:e.name})))],"value");this.setState({options:a,hasMore:parseInt(o["x-wp-totalpages"],10)>t,isLoading:!1})}))}fetchMoreTerms(){const{page:e,hasMore:t,isLoading:n}=this.state;t&&!n&&this.setState({page:e+1},(()=>this.fetchTerms()))}updateSearch(e){e.length>=3&&this.setState({search:e,page:1},(()=>this.fetchTerms()))}handleChange(e){const{onChange:t}=this.props;this.setState({search:null,page:1}),t(e)}render(){return(0,e.createElement)("div",{className:"term-select-form-row"},(0,e.createElement)("label",{htmlFor:this.props.fieldId,className:"screen-reader-text"},this.props.placeholder),(0,e.createElement)(jr,{value:this.props.value,onChange:e=>this.handleChange(e),id:this.props.fieldId,options:this.state.options,isMulti:!0,classNamePrefix:"kt-tax-select",isLoading:this.state.isLoading,onMenuScrollToBottom:()=>this.fetchMoreTerms(),onInputChange:e=>this.updateSearch(e),maxMenuHeight:300,placeholder:this.props.placeholder}))}}ms.propTypes={fieldId:S().string.isRequired,label:S().string.isRequired,restBase:S().string.isRequired,onChange:S().func.isRequired};const fs=ms,bs=window.wp.apiFetch;var gs=a.n(bs);function vs({value:t,onChange:n,source:o,isMulti:a=!1}){const[r,i]=(0,zn.useState)(!0),[l,s]=(0,zn.useState)([]),[c,u]=(0,zn.useState)(1),[d,p]=(0,zn.useState)(!1),h=t;return(0,zn.useEffect)((()=>{if(o&&void 0!==window.kadence_blocks_params.taxonomies[o]&&window.kadence_blocks_params.taxonomies[o])s(Array.from(window.kadence_blocks_params.taxonomies[o])),i(!1);else{const e={source:o,page:c,per_page:50};i(!0),gs()({path:(0,Hr.addQueryArgs)(window.kadence_blocks_params.termEndpoint,e)}).then((e=>{e?(s(e),window.kadence_blocks_params.taxonomies[o]=e):(s([]),window.kadence_blocks_params.taxonomies[o]=[]),i(!1)})).catch((()=>{i(!1),s([]),window.kadence_blocks_params.taxonomies[o]=[]}))}}),[o]),r?(0,e.createElement)(jn.Spinner,null):(0,e.createElement)("div",{className:"kb-inner-term-select-wrap"},(0,e.createElement)(jr,{options:l,className:"kb-dynamic-select",classNamePrefix:"kbp",value:a?t:""!==t?l.filter((({value:e})=>e===h)):"",isMulti:a,isSearchable:!0,isClearable:!0,menuPortalTarget:document.body,styles:{menuPortal:e=>({...e,zIndex:99999999})},maxMenuHeight:200,placeholder:(0,Jn.__)("Select Term","kadence-blocks"),onChange:e=>{n(e?a?e:e.value:"")}}))}function ks({desktopChildren:t,tabletChildren:n,mobileChildren:o}){const[a,r]=(0,zn.useState)("Desktop"),i=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);i!==a&&r(i);const{setPreviewDeviceType:l}=(0,Kn.useDispatch)("kadenceblocks/data"),s=[{name:"Desktop",key:"desktop",label:(0,Jn.__)("Desktop","kadence-blocks"),title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",key:"tablet",label:(0,Jn.__)("Tablet","kadence-blocks"),title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",label:(0,Jn.__)("Mobile","kadence-blocks"),title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}],c={};return c.Mobile=o,c.Tablet=n,c.Desktop=t,(0,e.createElement)("div",{className:"components-base-control kt-inspect-tabs kb-responsive-control"},(0,e.createElement)("div",{className:"kadence-title-bar"},(0,e.createElement)(jn.ButtonGroup,{className:"components-tab-panel__tabs","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(s,(({name:t,key:n,title:o,itemClass:i,label:s})=>(0,e.createElement)(jn.Button,{key:n,className:`components-tab-panel__tabs-item ${i}${t===a?" active-tab":""}`,"aria-pressed":a===t,"aria-label":s,onClick:()=>{return e=t,l((0,$n.capitalizeFirstLetter)(e)),void r((0,$n.capitalizeFirstLetter)(e));var e}},o))))),(0,e.createElement)("div",{className:"kb-responsive-control-inner"},c[a]?c[a]:c.Desktop))}function ys({label:t,onChange:n,onChangeTablet:o,onChangeMobile:a,value:r,mobileValue:i,tabletValue:l,options:s,tabletOptions:c=s,mobileOptions:u=c,help:d}){return(0,e.createElement)(eo,{label:t,desktopChildren:(0,e.createElement)(jn.SelectControl,{value:r,options:s,onChange:e=>n(e),help:d}),tabletChildren:(0,e.createElement)(jn.SelectControl,{value:l,options:c,onChange:e=>o(e),help:d}),mobileChildren:(0,e.createElement)(jn.SelectControl,{value:i,options:u,onChange:e=>a(e),help:d})})}const Es=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})),xs=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"}));function _s({label:t,value:n,onChange:o,min:a,max:r,step:i=1}){return[o&&(0,e.createElement)("div",{className:"components-base-control"},(0,e.createElement)("p",{className:"components-base-control__label"},t),(0,e.createElement)("div",{className:"components-base-control__field kb-flex-center kb-step-control"},(0,e.createElement)(jn.Button,{className:"kb-step-btn",icon:Es,isSecondary:!0,onClick:()=>{n>a&&o(n-i)}}),(0,e.createElement)("input",{className:"components-step-control__number",type:"number",onChange:e=>o(Number(e.target.value)),"aria-label":t,value:n,min:a,max:r,step:i}),(0,e.createElement)(jn.Button,{className:"kb-step-btn",isSecondary:!0,icon:xs,onClick:()=>{n<r&&o(n+i)}})))]}class ws extends zn.Component{constructor(e,t,n){super(...arguments),this.state={isVisible:!1}}render(){const t=()=>{this.setState({isVisible:!1})};let n={};return n.opacity=(0,e.createElement)("svg",{width:"20px",height:"20px",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"1.414"},(0,e.createElement)("g",{fillRule:"nonzero"},(0,e.createElement)("path",{d:"M14.043,7.612c2.23,2.178 2.23,5.726 0,7.904c-1.081,1.055 -2.515,1.638 -4.042,1.638c-1.527,0 -2.964,-0.583 -4.042,-1.638c-1.08,-1.056 -1.674,-2.46 -1.674,-3.952c0,-1.492 0.594,-2.896 1.676,-3.956l4.04,-4.026l4.038,4.026c0.002,0.002 0.004,0.002 0.004,0.004Z",fill:"url(#_Linear1)"}),(0,e.createElement)("path",{d:"M15.595,6.066c3.082,3.013 3.082,7.917 -0.002,10.931c-1.493,1.461 -3.479,2.265 -5.591,2.265c-2.112,0 -4.097,-0.804 -5.593,-2.265c-1.493,-1.46 -2.315,-3.402 -2.315,-5.467c0,-2.065 0.822,-4.007 2.315,-5.466l5.176,-5.162c0.221,-0.219 0.614,-0.219 0.833,0l5.177,5.164Zm-0.826,10.124c2.629,-2.568 2.629,-6.751 0,-9.32c0,-0.002 -0.003,-0.002 -0.005,-0.004l-4.762,-4.749l-4.764,4.749c-1.276,1.249 -1.976,2.905 -1.976,4.664c0,1.76 0.7,3.416 1.974,4.66c1.272,1.245 2.966,1.932 4.766,1.932c1.801,0 3.493,-0.687 4.767,-1.932Z"})),(0,e.createElement)("defs",null,(0,e.createElement)("linearGradient",{id:"_Linear1",x2:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(11.4305 0 0 13.5721 4.285 10.368)"},(0,e.createElement)("stop",{offset:"0"}),(0,e.createElement)("stop",{offset:"0.5",stopOpacity:"0.749"}),(0,e.createElement)("stop",{offset:"1",stopOpacity:"0"})))),(0,e.createElement)("div",{className:"kt-popover-container"},this.state.isVisible&&(0,e.createElement)(jn.Popover,{position:"top left",className:"kt-popover-opacity",onClose:t},(0,e.createElement)(jn.RangeControl,{label:this.props.label,value:this.props.value,onChange:this.props.onChanged,min:0,max:1,step:.01})),(0,e.createElement)(jn.Tooltip,{text:this.props.label},!this.state.isVisible&&(0,e.createElement)(jn.Button,{className:"kt-opacity-icon",isSecondary:!0,onClick:()=>{this.setState({isVisible:!0})}},n.opacity),this.state.isVisible&&(0,e.createElement)(jn.Button,{className:"kt-opacity-icon",isSecondary:!0,onClick:t},n.opacity)))}}const Cs=ws;function Ss({label:t,onChange:n,value:o="",className:a="",step:r=1,max:i=200,min:l=0,unit:s="px",onUnit:c,units:u=["px","em","rem"],styles:d=["solid","dashed","dotted","double"],defaultLinked:p=!0}){const h=(0,qr.useInstanceId)(Ss),m=o?.[1]||"solid",f=e=>{const t=o;t[0]=e,n(t)},b=o?.[0]||"",g=void 0!==o?.[2]&&""!==o?.[2]?o[2]:"",v={solid:(0,e.createElement)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 20 20"},(0,e.createElement)("path",{d:"M18.988 11.478V8.522H1.012v2.956h17.976z"})),dashed:(0,e.createElement)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 20 20"},(0,e.createElement)("path",{d:"M12.512 11.478V8.522H7.488v2.956h5.024zM14.004 8.522v2.956h4.984V8.522h-4.984zM1.012 8.522v2.956H6.05V8.522H1.012z"})),dotted:(0,e.createElement)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 20 20"},(0,e.createElement)("circle",{cx:"2.503",cy:"10",r:"1.487"}),(0,e.createElement)("circle",{cx:"17.486",cy:"10",r:"1.487"}),(0,e.createElement)("circle",{cx:"12.447",cy:"10",r:"1.487"}),(0,e.createElement)("circle",{cx:"7.455",cy:"10",r:"1.487"})),double:(0,e.createElement)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 20 20"},(0,e.createElement)("path",{d:"M1.02 6.561v2.957h17.968V6.561H1.02zM1.012 10.586v2.956H18.98v-2.956H1.012z"}))},k={solid:(0,Jn.__)("Solid","kadence-blocks"),dashed:(0,Jn.__)("Dashed","kadence-blocks"),dotted:(0,Jn.__)("Dotted","kadence-blocks"),double:(0,Jn.__)("Double","kadence-blocks")},y=u.map((e=>({value:e,label:e})));return[n&&(0,e.createElement)("div",{className:`components-base-control kadence-single-border-control kadence-single-border-control${h}${a?" "+a:""}`},t&&(0,e.createElement)(jn.Flex,{justify:"space-between",className:"kadence-border-control__header"},(0,e.createElement)(jn.FlexItem,null,(0,e.createElement)("label",{className:"components-base-control__label"},t))),(0,e.createElement)("div",{className:"kadence-single-border-control-wrap"},(0,e.createElement)(Qn,{value:b,default:"",hideClear:!0,onChange:e=>f(e)}),(0,e.createElement)(jn.DropdownMenu,{className:"border-control-style-select",icon:v[m],label:(0,Jn.__)("Border Style","kadence-blocks"),popoverProps:{className:"border-control-style-select__popover",placement:"bottom"}},(({onClose:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(jn.MenuGroup,null,d.map((a=>(0,e.createElement)(jn.MenuItem,{icon:v[a],onClick:()=>{t(),(e=>{const t=o;t[1]=e,n(t)})(a)},label:k[a]}))))))),(0,e.createElement)("div",{className:"kadence-controls-content kadence-single-unit-control"},(0,e.createElement)(jn.__experimentalUnitControl,{min:l,max:i,step:r,units:y,value:g,disableUnits:!0,onChange:e=>(e=>{const t=isNaN(parseFloat(e))?"":parseFloat(e),a=o;a[2]=t,n(a)})(e)}),(0,e.createElement)("div",{className:"kadence-measure-control-select-wrapper"},(0,e.createElement)("select",{className:"kadence-measure-control-select components-unit-control__select",onChange:e=>{c(e.target.value)},disabled:1===u.length},u.map((t=>(0,e.createElement)("option",{value:t,selected:s===t||void 0,key:t},t))))))))]}function Ns({label:t,onChange:n,onChangeTablet:o,onChangeMobile:a,onControl:r,value:i="",tabletValue:l="",mobileValue:s="",control:c="individual",units:u=["px","em","rem"],firstIcon:d=Di.outlineTopIcon,secondIcon:p=Di.outlineRightIcon,thirdIcon:h=Di.outlineBottomIcon,fourthIcon:m=Di.outlineLeftIcon,linkIcon:f=Gl,unlinkIcon:b=$l,styles:g=["solid","dashed","dotted","double"],deskDefault:v={top:["","",""],right:["","",""],bottom:["","",""],left:["","",""],unit:"px"},tabletDefault:k={top:["","",""],right:["","",""],bottom:["","",""],left:["","",""],unit:""},mobileDefault:y={top:["","",""],right:["","",""],bottom:["","",""],left:["","",""],unit:""},reset:E=!0,defaultLinked:x=!0}){const _=(0,qr.useInstanceId)(Ns),w=i?.[0]||v,C=l?.[0]||k,S=s?.[0]||y,[N,O]=(0,zn.useState)(c),[T,M]=(0,zn.useState)("Desktop"),A=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);A!==T&&M(A),(0,zn.useEffect)((()=>{S&&(0,qn.isEqual)(w.unit,S?.unit)&&(S.unit="",z("","unit")),C&&(0,qn.isEqual)(w.unit,C?.unit)&&(C.unit="",V("","unit"))}),[]);const{setPreviewDeviceType:D}=(0,Kn.useDispatch)("kadenceblocks/data"),R=[{name:"Desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}];let I=w;"Tablet"===T?I=C:"Mobile"===T&&(I=S);const P={},F=S?.unit?S.unit:w?.unit?w.unit:"px",L=C?.unit?C.unit:w?.unit?w.unit:"px",B=(e,t)=>{var o=JSON.parse(JSON.stringify(i));o[0][t]=e,n(o)},V=(e,t)=>{var n=JSON.parse(JSON.stringify(l));n[0][t]=e,o(n)},z=(e,t)=>{var n=JSON.parse(JSON.stringify(s));n[0][t]=e,a(n)};P.Mobile=(0,e.createElement)(Ss,{key:"mobile"+_,value:S?.bottom?JSON.parse(JSON.stringify(S?.bottom)):void 0,unit:S?.unit?JSON.parse(JSON.stringify(S?.unit)):"px",onChange:e=>z(e,"bottom"),onUnit:e=>z(e,"unit"),defaultValue:y?.bottom,styles:g,units:[F],firstIcon:d,secondIcon:p,thirdIcon:h,fourthIcon:m}),P.Tablet=(0,e.createElement)(Ss,{key:"tablet"+_,value:C?.bottom?JSON.parse(JSON.stringify(C?.bottom)):void 0,unit:C?.unit?JSON.parse(JSON.stringify(C?.unit)):"px",onChange:e=>V(e,"bottom"),onUnit:e=>V(e,"unit"),defaultValue:k?.bottom,styles:g,units:[L],firstIcon:d,secondIcon:p,thirdIcon:h,fourthIcon:m}),P.Desktop=(0,e.createElement)(Ss,{key:"desktop"+_,value:w?.bottom?JSON.parse(JSON.stringify(w?.bottom)):void 0,unit:w?.unit?JSON.parse(JSON.stringify(w?.unit)):"px",onChange:e=>B(e,"bottom"),onUnit:e=>B(e,"unit"),defaultValue:v?.bottom,styles:g,units:u,firstIcon:d,secondIcon:p,thirdIcon:h,fourthIcon:m});let j=v;return"Mobile"===T?j=y:"Mobile"===T&&(j=k),[n&&o&&a&&(0,e.createElement)("div",{className:`components-base-control kb-responsive-border-control kadence-border-box-control kadence-border-box-control${_}`},(0,e.createElement)("div",{className:"kadence-border-control__header kadence-component__header"},t&&(0,e.createElement)("div",{className:"kadence-component__header__title kadence-radio-range__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),E&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(j,I),icon:Yl,onClick:()=>{"Tablet"===T?o([k]):"Mobile"===T?a([y]):n([v])}}))),(0,e.createElement)(jn.ButtonGroup,{className:"kb-responsive-options kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(R,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===T?" is-active":""}`,isSmall:!0,"aria-pressed":T===t,onClick:()=>{return e=t,D((0,$n.capitalizeFirstLetter)(e)),void M((0,$n.capitalizeFirstLetter)(e));var e}},o))))),(0,e.createElement)("div",{className:"kb-responsive-border-control-inner"},P[T]?P[T]:P.Desktop))]}function Os({label:t,onChange:n,onControl:o,value:a="",className:r="",help:i="",defaultValue:l={top:{color:"",style:"solid",width:""},right:{color:"",style:"solid",width:""},bottom:{color:"",style:"solid",width:""},left:{color:"",style:"solid",width:""},unit:""},control:s="individual",units:c=["px","em","rem"],firstIcon:u=Di.outlineTopIcon,secondIcon:d=Di.outlineRightIcon,thirdIcon:p=Di.outlineBottomIcon,fourthIcon:h=Di.outlineLeftIcon,linkIcon:m=Gl,unlinkIcon:f=$l,styles:b=["solid","dashed","dotted","double"],reset:g}){const v=(0,qr.useInstanceId)(Os),[k,y]=(0,zn.useState)(s),E=o?s:k,x=o||y,_={first:u,second:d,third:p,fourth:h,link:m,unlink:f},w=(0,zn.useRef)(),C=a?.[0]||l,S="px"!==C.unit?.1:1,N="px"!==C.unit&&""!==C.unit?12:200,O=(e,t)=>{C[t]=e;const o=JSON.parse(JSON.stringify(C));n([o])},T=e=>{C.unit=e;const t=JSON.parse(JSON.stringify(C));n([t])};return[n&&(0,e.createElement)("div",{ref:w,className:`components-base-control kadence-border-control kadence-border-control${v}${r?" "+r:""}`},t&&(0,e.createElement)("div",{className:"kadence-border-control__header"},t&&(0,e.createElement)("div",{className:"kadence-border-control__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),g&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(l,a),icon:undo,onClick:()=>{"function"==typeof g?g():n([l])}}))),x&&(0,e.createElement)(jn.Button,{className:"kadence-radio-item border-control-toggle is-single only-icon",label:"individual"!==E?(0,Jn.__)("Individual","kadence-blocks"):(0,Jn.__)("Linked","kadence-blocks"),icon:"individual"!==E?_.link:_.unlink,onClick:()=>x("individual"!==E?"individual":"linked"),isPressed:"individual"!==E,isTertiary:"individual"===E})),(0,e.createElement)("div",{className:"kadence-controls-content"},"individual"!==E&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Ss,{value:C?.top||["","",""],onChange:e=>(e=>{C.top=e,C.bottom=e,C.right=e,C.left=e;const t=JSON.parse(JSON.stringify(C));n([t])})(e),min:0,max:N,step:S,help:i,styles:b,unit:C?.unit||"px",units:c,onUnit:e=>T(e),defaultValue:l.top,allowReset:!1})),"individual"===E&&(0,e.createElement)("div",{className:"kadence-border-controls-grid-wrap"},(0,e.createElement)("div",{className:"kadence-border-control-grid-visualizer",style:{borderTopColor:C?.top?.[0]?(0,$n.KadenceColorOutput)(C?.top?.[0]):void 0,borderTopStyle:C?.top?.[1]||void 0,borderTopWidth:C?.top?.[2]?"clamp( 1px, "+C?.top?.[2]+C?.unit+", 10px )":void 0,borderRightColor:C?.right?.[0]?(0,$n.KadenceColorOutput)(C?.right?.[0]):void 0,borderRightStyle:C?.right?.[1]||void 0,borderRightWidth:C?.right?.[2]?"clamp( 1px, "+C?.right?.[2]+C?.unit+", 10px )":void 0,borderBottomColor:C?.bottom?.[0]?(0,$n.KadenceColorOutput)(C?.bottom?.[0]):void 0,borderBottomStyle:C?.bottom?.[1]||void 0,borderBottomWidth:C?.bottom?.[2]?"clamp( 1px, "+C?.bottom?.[2]+C?.unit+", 10px )":void 0,borderLeftColor:C?.left?.[0]?(0,$n.KadenceColorOutput)(C?.left?.[0]):void 0,borderLeftStyle:C?.left?.[1]||void 0,borderLeftWidth:C?.left?.[2]?"clamp( 1px, "+C?.left?.[2]+C?.unit+", 10px )":void 0}}),(0,e.createElement)(Ss,{value:C?.top||["","",""],onChange:e=>O(e,"top"),min:0,max:N,step:S,help:i,styles:b,unit:C?.unit||"px",units:c,onUnit:e=>T(e),defaultValue:l.top,allowReset:!1}),(0,e.createElement)(Ss,{value:C?.left||["","",""],onChange:e=>O(e,"left"),min:0,max:N,step:S,help:i,styles:b,unit:C?.unit||"px",units:c,onUnit:e=>T(e),defaultValue:l.left,allowReset:!1}),(0,e.createElement)(Ss,{value:C?.right||["","",""],onChange:e=>O(e,"right"),min:0,max:N,step:S,help:i,styles:b,unit:C?.unit||"px",units:c,onUnit:e=>T(e),defaultValue:l.right,allowReset:!1}),(0,e.createElement)(Ss,{value:C?.bottom||["","",""],onChange:e=>O(e,"bottom"),min:0,max:N,step:S,help:i,styles:b,unit:C?.unit||"px",units:c,onUnit:e=>T(e),defaultValue:l.bottom,allowReset:!1}))))]}function Ts({label:t,onChange:n,onChangeTablet:o,onChangeMobile:a,onControl:r,mobileValue:i="",tabletValue:l="",value:s="",control:c="individual",units:u=["px","em","rem"],firstIcon:d=Di.outlineTopIcon,secondIcon:p=Di.outlineRightIcon,thirdIcon:h=Di.outlineBottomIcon,fourthIcon:m=Di.outlineLeftIcon,linkIcon:f=Gl,unlinkIcon:b=$l,styles:g=["solid","dashed","dotted","double"],deskDefault:v={top:["","",""],right:["","",""],bottom:["","",""],left:["","",""],unit:"px"},tabletDefault:k={top:["","",""],right:["","",""],bottom:["","",""],left:["","",""],unit:""},mobileDefault:y={top:["","",""],right:["","",""],bottom:["","",""],left:["","",""],unit:""},reset:E=!0,defaultLinked:x=!0}){const _=(0,qr.useInstanceId)(Ts),w={first:d,second:p,third:h,fourth:m,link:f,unlink:b},[C,S]=(0,zn.useState)(c),N=r?c:C,O=r||S,[T,M]=(0,zn.useState)("Desktop"),A=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);A!==T&&M(A),(0,zn.useEffect)((()=>{x&&("Mobile"===A?(0,qn.isEqual)(i?.[0]?.top,i?.[0]?.bottom)&&(0,qn.isEqual)(i?.[0]?.top,i?.[0]?.bottom)&&(0,qn.isEqual)(i?.[0]?.top,i?.[0]?.right)&&(0,qn.isEqual)(i?.[0]?.top,i?.[0]?.left)&&O("linked"):"Tablet"===A?(0,qn.isEqual)(l?.[0]?.top,l?.[0]?.bottom)&&(0,qn.isEqual)(l?.[0]?.top,l?.[0]?.bottom)&&(0,qn.isEqual)(l?.[0]?.top,l?.[0]?.right)&&(0,qn.isEqual)(l?.[0]?.top,l?.[0]?.left)&&O("linked"):(0,qn.isEqual)(s?.[0]?.top,s?.[0]?.bottom)&&(0,qn.isEqual)(s?.[0]?.top,s?.[0]?.bottom)&&(0,qn.isEqual)(s?.[0]?.top,s?.[0]?.right)&&(0,qn.isEqual)(s?.[0]?.top,s?.[0]?.left)&&O("linked")),i&&(0,qn.isEqual)(s?.[0]?.unit,i?.[0]?.unit)&&(i[0].unit="",a(i)),l&&(0,qn.isEqual)(s?.[0]?.unit,l?.[0]?.unit)&&(l[0].unit="",o(l))}),[]);const{setPreviewDeviceType:D}=(0,Kn.useDispatch)("kadenceblocks/data"),R=[{name:"Desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}];let I=s?.[0]?s[0]:v;"Tablet"===T?I=l?.[0]?l[0]:k:"Mobile"===T&&(I=i?.[0]?i[0]:y);const P={},F=i?.[0]?.unit?i[0].unit:s?.[0]?.unit?s[0].unit:"px",L=l?.[0]?.unit?l[0].unit:s?.[0]?.unit?s[0].unit:"px";P.Mobile=(0,e.createElement)(Os,{key:"mobile"+_,value:i?JSON.parse(JSON.stringify(i)):void 0,onChange:e=>a(e),control:N,onControl:e=>O(e),defaultValue:y,styles:g,units:[F],firstIcon:d,secondIcon:p,thirdIcon:h,fourthIcon:m,linkIcon:f,unlinkIcon:b}),P.Tablet=(0,e.createElement)(Os,{key:"tablet"+_,value:l?JSON.parse(JSON.stringify(l)):void 0,onChange:e=>o(e),control:N,onControl:e=>O(e),defaultValue:k,styles:g,units:[L],firstIcon:d,secondIcon:p,thirdIcon:h,fourthIcon:m,linkIcon:f,unlinkIcon:b}),P.Desktop=(0,e.createElement)(Os,{key:"desktop"+_,value:s?JSON.parse(JSON.stringify(s)):void 0,onChange:e=>n(e),control:N,onControl:e=>O(e),defaultValue:v,styles:g,units:u,firstIcon:d,secondIcon:p,thirdIcon:h,fourthIcon:m,linkIcon:f,unlinkIcon:b});let B=v;return"Mobile"===T?B=y:"Mobile"===T&&(B=k),[n&&o&&a&&(0,e.createElement)("div",{className:`components-base-control kb-responsive-border-control kadence-border-box-control kadence-border-box-control${_}`},(0,e.createElement)("div",{className:"kadence-border-control__header kadence-component__header"},t&&(0,e.createElement)("div",{className:"kadence-component__header__title kadence-radio-range__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),E&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(B,I),icon:Yl,onClick:()=>{"Tablet"===T?o([k]):"Mobile"===T?a([y]):n([v])}}))),(0,e.createElement)(jn.ButtonGroup,{className:"kb-responsive-options kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(R,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===T?" is-active":""}`,isSmall:!0,"aria-pressed":T===t,onClick:()=>{return e=t,D((0,$n.capitalizeFirstLetter)(e)),void M((0,$n.capitalizeFirstLetter)(e));var e}},o)))),O&&(0,e.createElement)(jn.Button,{isSmall:!0,className:"kadence-radio-item border-control-toggle is-single only-icon",label:"individual"!==N?(0,Jn.__)("Individual","kadence-blocks"):(0,Jn.__)("Linked","kadence-blocks"),icon:"individual"!==N?w.link:w.unlink,onClick:()=>O("individual"!==N?"individual":"linked"),isPressed:"individual"!==N,isTertiary:"individual"===N})),(0,e.createElement)("div",{className:"kb-responsive-border-control-inner"},P[T]?P[T]:P.Desktop))]}function Ms(e,t){if(!t)return"";if(!e)return"";if("0"===t)return 0;const n=e.find((e=>e.value===t));return n?n.size:""}function As({label:t,onChange:n,value:o="",className:a="",options:r=$n.FONT_SIZES_MAP,step:i=1,max:l=200,min:s=0,defaultValue:c="",unit:u="px",onUnit:d,units:p=["px","em","rem"],disableCustomSizes:h=!1,customControl:m=!1,setCustomControl:f=null,parentLabel:b=null,reset:g=!0,radio:v=!0,preventUnitSelection:k=!1}){const[y,E]=(0,zn.useState)(!1);(0,zn.useEffect)((()=>{E(function(e,t){return!!t&&!!e&&!e.find((e=>e.value===t))}(r,o))}),[]);const x=f?m:y,_=f||E,w=p.map((e=>({value:e,label:e}))),C=x?o:function(e,t){if(!t)return"";if(!e)return"";if("0"===t)return 0;const n=e.find((e=>e.value===t));return n?n.value:""}(r,o),S=[{value:"",output:"",size:"",label:(0,Jn.__)("Inherit","kadence-blocks"),name:(0,Jn.__)("Inherit","kadence-blocks")},...r];return[n&&(0,e.createElement)("div",{className:"components-base-control component-font-size-control kadence-font-size-control"+(a?" "+a:"")},!f&&t&&(0,e.createElement)("div",{className:"kadence-font-size-control__header kadence-component__header"},(0,e.createElement)("div",{className:"kadence-component__header__title kadence-radio-range__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),g&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(c,o),icon:Yl,onClick:()=>{"function"==typeof g?g():n(c)}})))),!x&&v&&(0,e.createElement)("div",{className:"kadence-controls-content"},(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control"},r.map(((t,o)=>(0,e.createElement)(jn.Button,{key:`${t.label}-${t.value}-${o}`,isTertiary:C!==t.value,className:"kadence-radio-item radio-"+t.value,isPrimary:C===t.value,icon:void 0!==t.icon?t.icon:void 0,"aria-pressed":C===t.value,onClick:()=>{C==t.value&&""==c?n(""):n(t.value)}},t.label))),!h&&(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Set custom size","kadence-blocks"),icon:gi,onClick:()=>{C&&"px"===u&&n(Ms(r,C)),_(!0)},isPressed:!1,isTertiary:!0}))),!x&&!v&&(0,e.createElement)("div",{className:"kadence-controls-content kadence-font-size-select-control-wrap"},(0,e.createElement)(jn.SelectControl,{className:"kadence-font-size-select-control",value:C,options:S,onChange:e=>{n(C==e&&""==c?"":e)}}),!h&&(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control"},(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Set custom size","kadence-blocks"),icon:gi,onClick:()=>{C&&"px"===u&&n(Ms(r,C)),_(!0)},isPressed:!1,isTertiary:!0}))),x&&(0,e.createElement)("div",{className:"kadence-controls-content kadence-single-unit-control"},(0,e.createElement)(jn.__experimentalUnitControl,{label:b&&t?t:void 0,labelPosition:"top",min:s,max:l,step:i,units:w,value:o,disableUnits:!0,onChange:e=>(e=>{const t=isNaN(parseFloat(e))?void 0:parseFloat(e);n(t)})(e)}),(0,e.createElement)("div",{className:"kadence-measure-control-select-wrapper"},(0,e.createElement)("select",{className:"kadence-measure-control-select components-unit-control__select",onChange:e=>{d(e.target.value)},value:u,disabled:!!k},!k&&p.map((t=>(0,e.createElement)("option",{value:t,selected:u===t||void 0,key:t},t))),k&&(0,e.createElement)("option",{value:u,selected:!0,key:u},""===u?"-":u))),!h&&(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control"},(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Use size preset","kadence-blocks"),icon:gi,isPrimary:!0,onClick:()=>{o&&"px"===u&&n(function(e,t){if(!t)return"";if(!e)return"";if("0"===t)return"";const n=e.find((e=>e.size===t));return n?n.value:""}(r,o)),_(!1)},isPressed:!0}))))]}function Ds({label:t,onChange:n,onChangeTablet:o,onChangeMobile:a,mobileValue:r,tabletValue:i,value:l,units:s=["px","em","rem"],onUnit:c,options:u=$n.FONT_SIZES_MAP,step:d=1,max:p=200,min:h=0,unit:m="px",defaultValue:f=["","",""],reset:b=!0,radio:g=!0,compressedDevice:v=!1}){const k=(0,zn.useRef)(),[y,E]=(0,zn.useState)("Desktop"),x=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);x!==y&&E(x);const{setPreviewDeviceType:_}=(0,Kn.useDispatch)("kadenceblocks/data"),w=e=>{_((0,$n.capitalizeFirstLetter)(e)),E((0,$n.capitalizeFirstLetter)(e))},C=[{name:"Desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}],S=[l,i,r],N={};N.Mobile=(0,e.createElement)(As,{value:r||void 0,onChange:e=>a(e),options:u,onUnit:c,defaultValue:f[2],units:s,step:d,max:p,min:h,unit:m,radio:g,preventUnitSelection:!0}),N.Tablet=(0,e.createElement)(As,{value:i||void 0,onChange:e=>o(e),options:u,onUnit:c,defaultValue:f[1],units:s,step:d,max:p,min:h,unit:m,radio:g,preventUnitSelection:!0}),N.Desktop=(0,e.createElement)(As,{value:l||void 0,onChange:e=>n(e),options:u,onUnit:c,defaultValue:f[0],units:s,step:d,max:p,min:h,unit:m,radio:g});const O={Desktop:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),Tablet:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),Mobile:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"})};return[n&&o&&a&&(0,e.createElement)("div",{ref:k,className:"components-base-control kb-responsive-font-size-control kadence-font-size-control"},(0,e.createElement)("div",{className:"kadence-font-size-control__header kadence-component__header"},t&&(0,e.createElement)("div",{className:"kadence-component__header__title kadence-font-size__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),b&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(f,S),icon:Yl,onClick:()=>{"function"==typeof b?b():"Mobile"===y?a(f[2]):"Tablet"===y?o(f[1]):n(f[0])}}))),!v&&(0,e.createElement)(jn.ButtonGroup,{className:"kb-responsive-options kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(C,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===y?" is-active":""}`,isSmall:!0,"aria-pressed":y===t,onClick:()=>w(t)},o)))),v&&(0,e.createElement)(jn.DropdownMenu,{className:"kb-responsive-options-dropdown",icon:O[y]?O[y]:O.Desktop,label:(0,Jn.__)("Target Device","kadence-blocks"),controls:C.map((e=>{return[{title:(t=e).name,icon:t.title,isActive:y===t.name,onClick:()=>{w(t.name)}}];var t}))})),(0,e.createElement)("div",{className:"kb-responsive-border-control-inner"},N[y]?N[y]:N.Desktop))]}function Rs({label:t,onChange:n,value:o="",className:a="",step:r=1,max:i=200,min:l=0,defaultValue:s="",unit:c="",onUnit:u,units:d=["px","em","rem"],parentLabel:p=null,reset:h=!0,preventUnitSelection:m=!1}){const f=d.map((e=>({value:e,label:e})));return[n&&(0,e.createElement)("div",{className:"components-base-control component-font-size-control kadence-font-size-control"+(a?" "+a:"")},t&&(0,e.createElement)("div",{className:"kadence-font-size-control__header kadence-component__header"},(0,e.createElement)("div",{className:"kadence-component__header__title kadence-radio-range__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),h&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(s,o),icon:Yl,onClick:()=>{"function"==typeof h?h():n(s)}})))),(0,e.createElement)("div",{className:"kadence-controls-content kadence-single-unit-control"},(0,e.createElement)(jn.__experimentalUnitControl,{label:p&&t?t:void 0,labelPosition:"top",min:l,max:i,step:r,units:f,value:o,disableUnits:!0,onChange:e=>(e=>{const t=isNaN(parseFloat(e))?void 0:parseFloat(e);n(t)})(e)}),(0,e.createElement)("div",{className:"kadence-measure-control-select-wrapper"},(0,e.createElement)("select",{className:"kadence-measure-control-select components-unit-control__select",onChange:e=>{"-"===e.target.value?u(""):u(e.target.value)},value:c,disabled:!!m},d.map((t=>m?c===t&&(0,e.createElement)("option",{value:t,selected:c===t||""===c&&"-"===t||void 0,key:t},t):(0,e.createElement)("option",{value:t,selected:c===t||""===c&&"-"===t||void 0,key:t},t)))))))]}function Is({label:t,onChange:n,onChangeTablet:o,onChangeMobile:a,mobileValue:r,tabletValue:i,value:l,units:s=["px","em","rem"],onUnit:c,step:u=1,max:d=200,min:p=0,unit:h="",defaultValue:m=["","",""],compressedDevice:f=!1,reset:b=!0}){const g=(0,zn.useRef)(),[v,k]=(0,zn.useState)("Desktop"),y=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);y!==v&&k(y);const{setPreviewDeviceType:E}=(0,Kn.useDispatch)("kadenceblocks/data"),x=e=>{E((0,$n.capitalizeFirstLetter)(e)),k((0,$n.capitalizeFirstLetter)(e))},_=[{name:"Desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}],w={Desktop:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),Tablet:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),Mobile:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"})},C=[l,i,r],S={};return S.Mobile=(0,e.createElement)(Rs,{value:r||void 0,onChange:e=>a(e),onUnit:c,defaultValue:m[2],units:s,step:u,max:d,min:p,unit:h,preventUnitSelection:!0}),S.Tablet=(0,e.createElement)(Rs,{value:i||void 0,onChange:e=>o(e),onUnit:c,defaultValue:m[1],units:s,step:u,max:d,min:p,unit:h,preventUnitSelection:!0}),S.Desktop=(0,e.createElement)(Rs,{value:l||void 0,onChange:e=>n(e),onUnit:c,defaultValue:m[0],units:s,step:u,max:d,min:p,unit:h}),[n&&o&&a&&(0,e.createElement)("div",{ref:g,className:"components-base-control kb-responsive-unit-control kadence-unit-control"},(0,e.createElement)("div",{className:"kadence-unit-control__header kadence-component__header"},t&&(0,e.createElement)("div",{className:"kadence-component__header__title kadence-unit__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),b&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(m,C),icon:Yl,onClick:()=>{"function"==typeof b?b():"Mobile"===v?a(m[2]):"Tablet"===v?o(m[1]):n(m[0])}}))),!f&&(0,e.createElement)(jn.ButtonGroup,{className:"kb-responsive-options kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(_,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===v?" is-active":""}`,isSmall:!0,"aria-pressed":v===t,onClick:()=>x(t)},o)))),f&&(0,e.createElement)(jn.DropdownMenu,{className:"kb-responsive-options-dropdown",icon:w[v]?w[v]:w.Desktop,label:(0,Jn.__)("Target Device","kadence-blocks"),controls:_.map((e=>{return[{title:(t=e).name,icon:t.title,isActive:v===t.name,onClick:()=>{x(t.name)}}];var t}))})),(0,e.createElement)("div",{className:"kb-responsive-border-control-inner"},S[v]?S[v]:S.Desktop))]}const Ps=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})),Fs=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})),Ls=(0,qr.compose)([(0,Kn.withSelect)(((e,t)=>{const n=void 0!==t.initialOpen?t.initialOpen:"general";return{openedTab:e("kadenceblocks/data").getOpenSidebarTabKey(t.panelName+e("core/block-editor").getSelectedBlockClientId(),n)}})),(0,Kn.withDispatch)(((e,t,{select:n})=>{const{getSelectedBlockClientId:o}=n("core/block-editor");return{toggleOpened:n=>{e("kadenceblocks/data").switchEditorTabOpened(t.panelName+o(),n)}}}))])((function({allowedTabs:t=null,activeTab:n,setActiveTab:o,openedTab:a,toggleOpened:r,tabs:i=null}){const l=[{key:"general",title:(0,Jn.__)("General","kadence-blocks"),icon:Ps},{key:"style",title:(0,Jn.__)("Style","kadence-blocks"),icon:Fs},{key:"advanced",title:(0,Jn.__)("Advanced","kadence-blocks"),icon:gi}],s=t||["general","style","advanced"],c=i||l,u=(0,zn.createRef)();let d;return(0,zn.useEffect)((()=>{d=u.current.closest(".components-panel")})),n!==a&&o(a),(0,zn.useEffect)((()=>{var e;return e=n,d&&(d.setAttribute("data-kadence-hide-advanced","advanced"!==e),d.setAttribute("data-kadence-active-tab",e)),()=>{if(d){const e=d.querySelector(".kadence-blocks-inspector-tabs");e&&null!==e||(d.removeAttribute("data-kadence-hide-advanced"),d.removeAttribute("data-kadence-active-tab"))}}}),[n]),(0,e.createElement)("div",{className:"kadence-blocks-inspector-tabs",ref:u},c.map((({key:t,title:a,icon:i},l)=>{if(s.includes(t))return(0,e.createElement)("button",{key:t,"aria-label":a+" "+(0,Jn.__)("tab","kadence-blocks"),onClick:()=>(e=>{r(e),o(e)})(t),className:bi()({"is-active":t===n})},(0,e.createElement)(jn.Icon,{icon:i})," ",a)})))}));function Bs({label:t=(0,Jn.__)("Hover Styles","kadence-blocks"),activeLabel:n=(0,Jn.__)("Active Styles","kadence-blocks"),initial:o="normal",hoverTab:a=(0,Jn.__)("Hover","kadence-blocks"),normalTab:r=(0,Jn.__)("Normal","kadence-blocks"),activeTab:i=(0,Jn.__)("Active","kadence-blocks"),active:l,hover:s,normal:c,className:u="",icon:d=Di.hoverToggle,activeIcon:p=Di.click,tabUI:h=!0,setActivePreview:m,activePreview:f}){const[b,g]=(0,zn.useState)("hover"===o),[v,k]=(0,zn.useState)("active"===o);var y=[{name:"normal",title:r,className:"kt-normal-tab"}];return s&&y.push({name:"hover",title:a,className:"kt-hover-tab"}),l&&y.push({name:"active",title:i,className:"kt-active-tab"}),h?[(0,e.createElement)("div",{className:"components-base-control kb-hover-toggle-control-tab-ui kb-hover-toggle-control"+(u?" "+u:"")},(0,e.createElement)(jn.TabPanel,{className:"kt-inspect-tabs kt-hover-tabs",activeClass:"active-tab",tabs:y},(t=>{if(t.name)return"hover"===t.name?(0,e.createElement)(e.Fragment,null,s):"active"===t.name?(0,e.createElement)(e.Fragment,null,m&&(0,e.createElement)(jn.Button,{className:"kb-hover-toggle-active-preview",isPressed:f,text:f?(0,Jn.__)("Hide Active State","kadence-blocks"):(0,Jn.__)("Preview Active State","kadence-blocks"),onClick:()=>{m(!f)},variant:"secondary"}),l):(0,e.createElement)(e.Fragment,null,c)})))]:[(0,e.createElement)("div",{className:"components-base-control kb-hover-toggle-control"+(u?" "+u:"")},(0,e.createElement)("div",{className:"kb-hover-toggle-control-toggle"},s&&(0,e.createElement)(jn.Button,{className:"kb-hover-toggle-btn "+($n.isRTL?"is-rtl":""),isPrimary:b,icon:d,"aria-pressed":b,label:t,onClick:()=>{k(!1),g(!b)}}),l&&(0,e.createElement)(jn.Button,{className:"kb-active-toggle-btn "+($n.isRTL?"is-rtl":""),isPrimary:v,icon:p,"aria-pressed":v,label:n,onClick:()=>{g(!1),k(!v)}})),(0,e.createElement)("div",{className:"kb-hover-toggle-area"},b&&(0,e.createElement)("div",{className:"kb-hover-control-wrap"},s),v&&(0,e.createElement)("div",{className:"kb-active-control-wrap"},l),!b&&!v&&(0,e.createElement)(e.Fragment,null,c)))]}function Vs({label:t,onChange:n,value:o="",className:a="",isCollapsed:r=!1,ariaLabel:i=(0,Jn.__)("Change HTML Tag","kadence-blocks"),reset:l=!1,headingOnly:s=!1,tagLowLevel:c=1,tagHighLevel:u=7}){const d="span"!==o&&"div"!==o&&"p"!==o?o:2,p="span"===o||"div"===o||"p"===o?o:"heading",h=[[{icon:(0,e.createElement)(ei,{level:1,isPressed:!(1!==d||!p||"heading"!==p)}),title:(0,Jn.__)("Heading 1","kadence-blocks"),isActive:!(1!==d||!p||"heading"!==p),onClick:()=>n(1)}],[{icon:(0,e.createElement)(ei,{level:2,isPressed:!(2!==d||!p||"heading"!==p)}),title:(0,Jn.__)("Heading 2","kadence-blocks"),isActive:!(2!==d||!p||"heading"!==p),onClick:()=>n(2)}],[{icon:(0,e.createElement)(ei,{level:3,isPressed:!(3!==d||!p||"heading"!==p)}),title:(0,Jn.__)("Heading 3","kadence-blocks"),isActive:!(3!==d||!p||"heading"!==p),onClick:()=>n(3)}],[{icon:(0,e.createElement)(ei,{level:4,isPressed:!(4!==d||!p||"heading"!==p)}),title:(0,Jn.__)("Heading 4","kadence-blocks"),isActive:!(4!==d||!p||"heading"!==p),onClick:()=>n(4)}],[{icon:(0,e.createElement)(ei,{level:5,isPressed:!(5!==d||!p||"heading"!==p)}),title:(0,Jn.__)("Heading 5","kadence-blocks"),isActive:!(5!==d||!p||"heading"!==p),onClick:()=>n(5)}],[{icon:(0,e.createElement)(ei,{level:6,isPressed:!(6!==d||!p||"heading"!==p)}),title:(0,Jn.__)("Heading 6","kadence-blocks"),isActive:!(6!==d||!p||"heading"!==p),onClick:()=>n(6)}],[{icon:(0,e.createElement)(ei,{level:"p",isPressed:!(!p||"p"!==p)}),title:(0,Jn.__)("Paragraph","kadence-blocks"),isActive:!(!p||"p"!==p),onClick:()=>n("p")}],[{icon:(0,e.createElement)(ei,{level:"span",isPressed:!(!p||"span"!==p)}),title:(0,Jn.__)("Span","kadence-blocks"),isActive:!(!p||"span"!==p),onClick:()=>n("span")}],[{icon:(0,e.createElement)(ei,{level:"div",isPressed:!(!p||"div"!==p)}),title:(0,Jn.__)("div","kadence-blocks"),isActive:!(!p||"div"!==p),onClick:()=>n("div")}]],m=(0,qn.range)(c,u).map((t=>[{icon:(0,e.createElement)(ei,{level:t,isPressed:!(t!==d||!p||"heading"!==p)}),title:sprintf(/* translators: %d: heading level e.g: "1", "2", "3" */ /* translators: %d: heading level e.g: "1", "2", "3" */ (0,Jn.__)("Heading %d","kadence-blocks"),t),isActive:!(t!==d||!p||"heading"!==p),onClick:()=>n(t)}])),f=r?ToolbarDropdownMenu:jn.ToolbarGroup;return[n&&(0,e.createElement)("div",{className:"kb-tag-level-control components-base-control"+(a?" "+a:"")},t&&(0,e.createElement)("div",{className:"kadence-component__header kadence-tag-select__header"},t&&(0,e.createElement)("div",{className:"kadence-component__header__title kadence-tag-select__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),l&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!isEqual(defaultValue,o),icon:undo,onClick:()=>onReset()})))),(0,e.createElement)("div",{className:"kadence-controls-content kb-tag-select-control-inner"},(0,e.createElement)(f,{isCollapsed:r,label:i,controls:s?m:h})))]}function zs(e,t){if(!t)return"";if(!e)return"";if("0"===t)return 0;const n=e.find((e=>e.value===t));return n?n.size:""}function js({label:t,onChange:n,value:o="",className:a="",options:r=$n.GAP_SIZES_MAP,step:i=1,max:l=200,min:s=0,defaultValue:c="",unit:u="px",onUnit:d,units:p=["px","em","rem"],disableCustomSizes:h=!1,customControl:m=!1,setCustomControl:f=null,parentLabel:b=null,reset:g=!0,radio:v=!0}){const[k,y]=(0,zn.useState)(!1);(0,zn.useEffect)((()=>{y(function(e,t){return!!t&&!!e&&!e.find((e=>e.value===t))}(r,o))}),[]);const E=f?m:k,x=f||y,_=p.map((e=>({value:e,label:e}))),w=E?o:function(e,t){if(!t)return"";if(!e)return"";if("0"===t)return 0;const n=e.find((e=>e.value===t));return n?n.value:""}(r,o),C=[{value:"",output:"",size:"",label:(0,Jn.__)("Inherit","kadence-blocks"),name:(0,Jn.__)("Inherit","kadence-blocks")},...r];return[n&&(0,e.createElement)("div",{className:"components-base-control component-gap-size-control kadence-gap-size-control"+(a?" "+a:"")},!f&&t&&(0,e.createElement)("div",{className:"kadence-gap-size-control__header kadence-component__header"},(0,e.createElement)("div",{className:"kadence-component__header__title kadence-radio-range__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),g&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(c,o),icon:Yl,onClick:()=>{"function"==typeof g?g():n(c)}})))),!E&&v&&(0,e.createElement)("div",{className:"kadence-controls-content"},(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control"},r.map(((t,o)=>(0,e.createElement)(jn.Button,{key:`${t.label}-${t.value}-${o}`,isTertiary:w!==t.value,className:"kadence-radio-item radio-"+t.value,isPrimary:w===t.value,icon:void 0!==t.icon?t.icon:void 0,"aria-pressed":w===t.value,onClick:()=>{w==t.value&&""==c?n(""):n(t.value)}},t.label))),!h&&(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Set custom size","kadence-blocks"),icon:gi,onClick:()=>{w&&"px"===u&&n(zs(r,w)),x(!0)},isPressed:!1,isTertiary:!0}))),!E&&!v&&(0,e.createElement)("div",{className:"kadence-controls-content kadence-gap-size-select-control-wrap"},(0,e.createElement)(jn.SelectControl,{className:"kadence-gap-size-select-control",value:w,options:C,onChange:e=>{n(w==e&&""==c?"":e)}}),!h&&(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control"},(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Set custom size","kadence-blocks"),icon:gi,onClick:()=>{w&&"px"===u&&n(zs(r,w)),x(!0)},isPressed:!1,isTertiary:!0}))),E&&(0,e.createElement)("div",{className:"kadence-controls-content kadence-single-unit-control"},(0,e.createElement)(jn.__experimentalUnitControl,{label:b&&t?t:void 0,labelPosition:"top",min:s,max:l,step:i,units:_,value:o,disableUnits:!0,onChange:e=>(e=>{const t=isNaN(parseFloat(e))?void 0:parseFloat(e);n(t)})(e)}),(0,e.createElement)("div",{className:"kadence-measure-control-select-wrapper"},(0,e.createElement)("select",{className:"kadence-measure-control-select components-unit-control__select",onChange:e=>{d(e.target.value)},value:u},p.map((t=>(0,e.createElement)("option",{value:t,selected:u===t||void 0,key:t},t))))),!h&&(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control"},(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Use size preset","kadence-blocks"),icon:gi,isPrimary:!0,onClick:()=>{o&&"px"===u&&n(function(e,t){if(!t)return"";if(!e)return"";if("0"===t)return"";const n=e.find((e=>e.size===t));return n?n.value:""}(r,o)),x(!1)},isPressed:!0}))))]}function Hs({label:t,onChange:n,onChangeTablet:o,onChangeMobile:a,mobileValue:r,tabletValue:i,value:l,units:s=["px","em","rem"],onUnit:c,options:u=$n.GAP_SIZES_MAP,step:d=1,max:p=200,min:h=0,unit:m="px",defaultValue:f=["","",""],reset:b=!0,radio:g=!0,compressedDevice:v=!1}){const k=(0,zn.useRef)(),[y,E]=(0,zn.useState)("Desktop"),x=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);x!==y&&E(x);const{setPreviewDeviceType:_}=(0,Kn.useDispatch)("kadenceblocks/data"),w=e=>{_((0,$n.capitalizeFirstLetter)(e)),E((0,$n.capitalizeFirstLetter)(e))},C=[{name:"Desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}],S=[l,i,r],N={};N.Mobile=(0,e.createElement)(js,{value:r||void 0,onChange:e=>a(e),options:u,onUnit:c,defaultValue:f[2],units:s,step:d,max:p,min:h,unit:m,radio:g}),N.Tablet=(0,e.createElement)(js,{value:i||void 0,onChange:e=>o(e),options:u,onUnit:c,defaultValue:f[1],units:s,step:d,max:p,min:h,unit:m,radio:g}),N.Desktop=(0,e.createElement)(js,{value:l||void 0,onChange:e=>n(e),options:u,onUnit:c,defaultValue:f[0],units:s,step:d,max:p,min:h,unit:m,radio:g});const O={Desktop:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),Tablet:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),Mobile:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"})};return[n&&o&&a&&(0,e.createElement)("div",{ref:k,className:"components-base-control kb-responsive-gap-size-control kadence-gap-size-control"},(0,e.createElement)("div",{className:"kadence-gap-size-control__header kadence-component__header"},t&&(0,e.createElement)("div",{className:"kadence-component__header__title kadence-gap-size__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),b&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(f,S),icon:Yl,onClick:()=>{"function"==typeof b?b():"Mobile"===y?a(f[2]):"Tablet"===y?o(f[1]):n(f[0])}}))),!v&&(0,e.createElement)(jn.ButtonGroup,{className:"kb-responsive-options kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(C,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===y?" is-active":""}`,isSmall:!0,"aria-pressed":y===t,onClick:()=>w(t)},o)))),v&&(0,e.createElement)(jn.DropdownMenu,{className:"kb-responsive-options-dropdown",icon:O[y]?O[y]:O.Desktop,label:(0,Jn.__)("Target Device","kadence-blocks"),controls:C.map((e=>{return[{title:(t=e).name,icon:t.title,isActive:y===t.name,onClick:()=>{w(t.name)}}];var t}))})),(0,e.createElement)("div",{className:"kb-responsive-border-control-inner"},N[y]?N[y]:N.Desktop))]}Di.pxIcon,Di.emIcon,Di.remIcon,Di.vhIcon,Di.vwIcon,Di.percentIcon;const{localStorage:Us}=window;function Ws({attributes:t,defaultAttributes:n={},blockSlug:o,excludedAttrs:a=[],preventMultiple:r=[],onPaste:i}){const l=o+"-style",s=JSON.parse(Us.getItem(l)),c=()=>{Us.setItem(l,JSON.stringify((0,$n.getTransferableAttributes)(t,n,a,r)))},u=()=>{const e=JSON.parse(Us.getItem(l));e&&i(e)};return(0,e.createElement)(jn.ToolbarDropdownMenu,{className:"components-toolbar kb-copy-paste-attributes",icon:Di.copyStyles,label:(0,Jn.__)("Copy/Paste Styles","kadence-blocks"),popoverProps:{className:"kb-copy-paste-attributes__popover"}},(({onClose:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(jn.MenuGroup,null,(0,e.createElement)(jn.MenuItem,{icon:Di.copy,onClick:(0,qn.flow)(t,c),label:(0,Jn.__)("Copy Styles","kadence-blocks")},(0,Jn.__)("Copy Styles","kadence-blocks")),(0,e.createElement)(jn.MenuItem,{icon:Di.paste,onClick:(0,qn.flow)(t,u),disabled:!s,label:(0,Jn.__)("Paste Styles","kadence-blocks")},(0,Jn.__)("Paste Styles","kadence-blocks"))))))}const Gs=window.wp.hooks,$s=(0,jn.withFilters)("kadence.FormInputDynamicControl")((function(){const[t,n]=(0,zn.useState)(),[o,a]=(0,zn.useState)(!1),r=(0,qn.debounce)((()=>{a(!o)}),100);return(0,e.createElement)("div",{className:"kb-dynamic-form-input-sidebar-wrap"},(0,e.createElement)(jn.Button,{className:"kb-dynamic-form-input-sidebar",icon:Di.dynamic,onClick:()=>r(),ref:n,isPressed:o,"aria-haspopup":"true","aria-expanded":o,label:(0,Jn.__)("Dynamic Content","kadence-blocks"),showTooltip:!0}),o&&(0,e.createElement)(jn.Popover,{headerTitle:(0,Jn.__)("Select Dynamic Source","kadence-blocks"),noArrow:!1,onClose:r,placement:"bottom-end",anchor:t,className:"kb-dynamic-popover"},(0,e.createElement)("div",{className:"kb-dynamic-popover-inner-wrap"},(0,e.createElement)("div",{className:"kb-pro-notice"},(0,e.createElement)("h2",null,(0,Jn.__)("Dynamic Content","kadence-blocks")," "),(0,e.createElement)("p",null,(0,Jn.__)("Create dynamic sites by populating content from various sources.","kadence-blocks")," "),(0,e.createElement)(jn.ExternalLink,{href:"https://www.kadencewp.com/kadence-blocks/pro/?utm_source=in-app&utm_medium=kadence-blocks&utm_campaign=dynamic-content"},(0,Jn.__)("Upgrade to Pro","kadence-blocks"))))))}));function qs({value:t,onChange:n,label:o,className:a,reset:r,defaultValue:i="",dynamicAttribute:l,isSelected:s,attributes:c,setAttributes:u,name:d,clientId:p,context:h}){const m=(0,qr.useInstanceId)(qs),{kadenceDynamic:f}=c,b=void 0!==f&&void 0!==f[l]&&void 0!==f[l].enable&&""!==f[l].enable&&f[l].enable;return(0,e.createElement)("div",{className:`components-base-control kadence-form-input-control kadence-form-input-control${m}${a?" "+a:""}`},o&&(0,e.createElement)("div",{className:"kadence-form-input-control__header"},o&&(0,e.createElement)("div",{className:"kadence-form-input-control__title"},(0,e.createElement)("label",{className:"components-base-control__label"},o),r&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!!(0,qn.isEqual)(i,t),icon:undo,onClick:()=>{"function"==typeof r?r():n(i)}})))),(0,e.createElement)("div",{className:"kadence-controls-content"},b&&(0,e.createElement)("div",{className:"kadence-form-input-control__dynamic__label"},(0,Gs.applyFilters)("kadence.formInputDisplay",t,c,l)),!b&&(0,e.createElement)(jn.TextControl,{label:"",value:t,onChange:e=>n(e)}),(0,e.createElement)($s,{dynamicAttribute:l,isSelected:s,attributes:c,setAttributes:u,name:d,clientId:p,context:h})))}function Xs(t){const{label:n,onChange:o,value:a,postType:r="post",hideLabelFromVision:i=!1,overrideLabel:l=null}=t,{posts:s}=(0,Kn.useSelect)((e=>({posts:e("core").getEntityRecords("postType",r,{per_page:-1,orderby:"title",order:"asc"})})),[r]),c=[...(s||[]).map((e=>({label:null!==l&&a===e.id?l:Js(e.title.raw),value:e.id})))];return!(a&&c.some((e=>e.value===a)))&&a&&c.push({label:null!==l?l:(0,Jn.__)("Unknown Selection","kadence-blocks"),value:a}),(0,e.createElement)(jn.SelectControl,{label:n,options:c,onChange:o,value:a,hideLabelFromVision:i})}function Js(e){const t=(e=e||"").replace(/<!--[\s\S]*?(-->|$)/g,"").replace(/<(script|style)[^>]*>[\s\S]*?(<\/\1>|$)/gi,"").replace(/<\/?[a-z][\s\S]*?(>|$)/gi,"");return t!==e?Js(t):t}function Ks(e){return Qs(e)?(e.nodeName||"").toLowerCase():"#document"}function Ys(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Zs(e){var t;return null==(t=(Qs(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Qs(e){return e instanceof Node||e instanceof Ys(e).Node}function ec(e){return e instanceof Element||e instanceof Ys(e).Element}function tc(e){return e instanceof HTMLElement||e instanceof Ys(e).HTMLElement}function nc(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Ys(e).ShadowRoot)}function oc(e){const{overflow:t,overflowX:n,overflowY:o,display:a}=sc(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(a)}function ac(e){return["table","td","th"].includes(Ks(e))}function rc(e){const t=ic(),n=sc(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function ic(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function lc(e){return["html","body","#document"].includes(Ks(e))}function sc(e){return Ys(e).getComputedStyle(e)}function cc(e){return ec(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function uc(e){if("html"===Ks(e))return e;const t=e.assignedSlot||e.parentNode||nc(e)&&e.host||Zs(e);return nc(t)?t.host:t}function dc(e){const t=uc(e);return lc(t)?e.ownerDocument?e.ownerDocument.body:e.body:tc(t)&&oc(t)?t:dc(t)}function pc(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=dc(e),r=a===(null==(o=e.ownerDocument)?void 0:o.body),i=Ys(a);return r?t.concat(i,i.visualViewport||[],oc(a)?a:[],i.frameElement&&n?pc(i.frameElement):[]):t.concat(a,pc(a,[],n))}function hc(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function mc(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&nc(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function fc(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function bc(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function gc(){return/apple/i.test(navigator.vendor)}function vc(){const e=/android/i;return e.test(fc())||e.test(bc())}function kc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function yc(e){return(null==e?void 0:e.ownerDocument)||document}function Ec(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function xc(e){return"composedPath"in e?e.composedPath()[0]:e.target}const _c="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";const wc=Math.min,Cc=Math.max,Sc=Math.round,Nc=Math.floor,Oc=e=>({x:e,y:e}),Tc={left:"right",right:"left",bottom:"top",top:"bottom"},Mc={start:"end",end:"start"};function Ac(e,t,n){return Cc(e,wc(t,n))}function Dc(e,t){return"function"==typeof e?e(t):e}function Rc(e){return e.split("-")[0]}function Ic(e){return e.split("-")[1]}function Pc(e){return"x"===e?"y":"x"}function Fc(e){return"y"===e?"height":"width"}function Lc(e){return["top","bottom"].includes(Rc(e))?"y":"x"}function Bc(e){return Pc(Lc(e))}function Vc(e){return e.replace(/start|end/g,(e=>Mc[e]))}function zc(e){return e.replace(/left|right|bottom|top/g,(e=>Tc[e]))}function jc(e){const{x:t,y:n,width:o,height:a}=e;return{width:o,height:a,top:n,left:t,right:t+o,bottom:n+a,x:t,y:n}}function Hc(e,t,n){let{reference:o,floating:a}=e;const r=Lc(t),i=Bc(t),l=Fc(i),s=Rc(t),c="y"===r,u=o.x+o.width/2-a.width/2,d=o.y+o.height/2-a.height/2,p=o[l]/2-a[l]/2;let h;switch(s){case"top":h={x:u,y:o.y-a.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-a.width,y:d};break;default:h={x:o.x,y:o.y}}switch(Ic(t)){case"start":h[i]-=p*(n&&c?-1:1);break;case"end":h[i]+=p*(n&&c?-1:1)}return h}async function Uc(e,t){var n;void 0===t&&(t={});const{x:o,y:a,platform:r,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Dc(t,e),m=function(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}(h),f=l[p?"floating"===d?"reference":"floating":d],b=jc(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(f)))||n?f:f.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),g="floating"===d?{x:o,y:a,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==r.getOffsetParent?void 0:r.getOffsetParent(l.floating)),k=await(null==r.isElement?void 0:r.isElement(v))&&await(null==r.getScale?void 0:r.getScale(v))||{x:1,y:1},y=jc(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:v,strategy:s}):g);return{top:(b.top-y.top+m.top)/k.y,bottom:(y.bottom-b.bottom+m.bottom)/k.y,left:(b.left-y.left+m.left)/k.x,right:(y.right-b.right+m.right)/k.x}}function Wc(e){const t=sc(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const a=tc(e),r=a?e.offsetWidth:n,i=a?e.offsetHeight:o,l=Sc(n)!==r||Sc(o)!==i;return l&&(n=r,o=i),{width:n,height:o,$:l}}function Gc(e){return ec(e)?e:e.contextElement}function $c(e){const t=Gc(e);if(!tc(t))return Oc(1);const n=t.getBoundingClientRect(),{width:o,height:a,$:r}=Wc(t);let i=(r?Sc(n.width):n.width)/o,l=(r?Sc(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const qc=Oc(0);function Xc(e){const t=Ys(e);return ic()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:qc}function Jc(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),r=Gc(e);let i=Oc(1);t&&(o?ec(o)&&(i=$c(o)):i=$c(e));const l=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ys(e))&&t}(r,n,o)?Xc(r):Oc(0);let s=(a.left+l.x)/i.x,c=(a.top+l.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(r){const e=Ys(r),t=o&&ec(o)?Ys(o):o;let n=e,a=n.frameElement;for(;a&&o&&t!==n;){const e=$c(a),t=a.getBoundingClientRect(),o=sc(a),r=t.left+(a.clientLeft+parseFloat(o.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(o.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,d*=e.y,s+=r,c+=i,n=Ys(a),a=n.frameElement}}return jc({width:u,height:d,x:s,y:c})}const Kc=[":popover-open",":modal"];function Yc(e){return Kc.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Zc(e){return Jc(Zs(e)).left+cc(e).scrollLeft}function Qc(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=Ys(e),o=Zs(e),a=n.visualViewport;let r=o.clientWidth,i=o.clientHeight,l=0,s=0;if(a){r=a.width,i=a.height;const e=ic();(!e||e&&"fixed"===t)&&(l=a.offsetLeft,s=a.offsetTop)}return{width:r,height:i,x:l,y:s}}(e,n);else if("document"===t)o=function(e){const t=Zs(e),n=cc(e),o=e.ownerDocument.body,a=Cc(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=Cc(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+Zc(e);const l=-n.scrollTop;return"rtl"===sc(o).direction&&(i+=Cc(t.clientWidth,o.clientWidth)-a),{width:a,height:r,x:i,y:l}}(Zs(e));else if(ec(t))o=function(e,t){const n=Jc(e,!0,"fixed"===t),o=n.top+e.clientTop,a=n.left+e.clientLeft,r=tc(e)?$c(e):Oc(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:a*r.x,y:o*r.y}}(t,n);else{const n=Xc(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return jc(o)}function eu(e,t){const n=uc(e);return!(n===t||!ec(n)||lc(n))&&("fixed"===sc(n).position||eu(n,t))}function tu(e,t,n){const o=tc(t),a=Zs(t),r="fixed"===n,i=Jc(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const s=Oc(0);if(o||!o&&!r)if(("body"!==Ks(t)||oc(a))&&(l=cc(t)),o){const e=Jc(t,!0,r,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=Zc(a));return{x:i.left+l.scrollLeft-s.x,y:i.top+l.scrollTop-s.y,width:i.width,height:i.height}}function nu(e){return"static"===sc(e).position}function ou(e,t){return tc(e)&&"fixed"!==sc(e).position?t?t(e):e.offsetParent:null}function au(e,t){const n=Ys(e);if(Yc(e))return n;if(!tc(e)){let t=uc(e);for(;t&&!lc(t);){if(ec(t)&&!nu(t))return t;t=uc(t)}return n}let o=ou(e,t);for(;o&&ac(o)&&nu(o);)o=ou(o,t);return o&&lc(o)&&nu(o)&&!rc(o)?n:o||function(e){let t=uc(e);for(;tc(t)&&!lc(t);){if(rc(t))return t;t=uc(t)}return null}(e)||n}const ru={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:a}=e;const r="fixed"===a,i=Zs(o),l=!!t&&Yc(t.floating);if(o===i||l&&r)return n;let s={scrollLeft:0,scrollTop:0},c=Oc(1);const u=Oc(0),d=tc(o);if((d||!d&&!r)&&(("body"!==Ks(o)||oc(i))&&(s=cc(o)),tc(o))){const e=Jc(o);c=$c(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x,y:n.y*c.y-s.scrollTop*c.y+u.y}},getDocumentElement:Zs,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:a}=e;const r=[..."clippingAncestors"===n?Yc(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let o=pc(e,[],!1).filter((e=>ec(e)&&"body"!==Ks(e))),a=null;const r="fixed"===sc(e).position;let i=r?uc(e):e;for(;ec(i)&&!lc(i);){const t=sc(i),n=rc(i);n||"fixed"!==t.position||(a=null),(r?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||oc(i)&&!n&&eu(e,i))?o=o.filter((e=>e!==i)):a=t,i=uc(i)}return t.set(e,o),o}(t,this._c):[].concat(n),o],i=r[0],l=r.reduce(((e,n)=>{const o=Qc(t,n,a);return e.top=Cc(o.top,e.top),e.right=wc(o.right,e.right),e.bottom=wc(o.bottom,e.bottom),e.left=Cc(o.left,e.left),e}),Qc(t,i,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:au,getElementRects:async function(e){const t=this.getOffsetParent||au,n=this.getDimensions,o=await n(e.floating);return{reference:tu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Wc(e);return{width:t,height:n}},getScale:$c,isElement:ec,isRTL:function(e){return"rtl"===sc(e).direction}};function iu(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=o,c=Gc(e),u=a||r?[...c?pc(c):[],...pc(t)]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),r&&e.addEventListener("resize",n)}));const d=c&&l?function(e,t){let n,o=null;const a=Zs(e);function r(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),r();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(l||t(),!d||!p)return;const h={rootMargin:-Nc(u)+"px "+-Nc(a.clientWidth-(c+d))+"px "+-Nc(a.clientHeight-(u+p))+"px "+-Nc(c)+"px",threshold:Cc(0,wc(1,s))||1};let m=!0;function f(e){const t=e[0].intersectionRatio;if(t!==s){if(!m)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}m=!1}try{o=new IntersectionObserver(f,{...h,root:a.ownerDocument})}catch(e){o=new IntersectionObserver(f,h)}o.observe(e)}(!0),r}(c,n):null;let p,h=-1,m=null;i&&(m=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!s&&m.observe(c),m.observe(t));let f=s?Jc(e):null;return s&&function t(){const o=Jc(e);!f||o.x===f.x&&o.y===f.y&&o.width===f.width&&o.height===f.height||n(),f=o,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),r&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(p)}}const lu=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:a,y:r,placement:i,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:o,elements:a}=e,r=await(null==o.isRTL?void 0:o.isRTL(a.floating)),i=Rc(n),l=Ic(n),s="y"===Lc(n),c=["left","top"].includes(i)?-1:1,u=r&&s?-1:1,d=Dc(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&"number"==typeof m&&(h="end"===l?-1*m:m),s?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(o=l.arrow)&&o.alignmentOffset?{}:{x:a+s.x,y:r+s.y,data:{...s,placement:i}}}}},su=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:a}=t,{mainAxis:r=!0,crossAxis:i=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=Dc(e,t),c={x:n,y:o},u=await Uc(t,s),d=Lc(Rc(a)),p=Pc(d);let h=c[p],m=c[d];if(r){const e="y"===p?"bottom":"right";h=Ac(h+u["y"===p?"top":"left"],h,h-u[e])}if(i){const e="y"===d?"bottom":"right";m=Ac(m+u["y"===d?"top":"left"],m,m-u[e])}const f=l.fn({...t,[p]:h,[d]:m});return{...f,data:{x:f.x-n,y:f.y-o}}}}},cu=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:a,middlewareData:r,rects:i,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...b}=Dc(e,t);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const g=Rc(a),v=Rc(l)===l,k=await(null==s.isRTL?void 0:s.isRTL(c.floating)),y=p||(v||!f?[zc(l)]:function(e){const t=zc(e);return[Vc(e),t,Vc(t)]}(l));p||"none"===m||y.push(...function(e,t,n,o){const a=Ic(e);let r=function(e,t,n){const o=["left","right"],a=["right","left"],r=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:o:t?o:a;case"left":case"right":return t?r:i;default:return[]}}(Rc(e),"start"===n,o);return a&&(r=r.map((e=>e+"-"+a)),t&&(r=r.concat(r.map(Vc)))),r}(l,f,m,k));const E=[l,...y],x=await Uc(t,b),_=[];let w=(null==(o=r.flip)?void 0:o.overflows)||[];if(u&&_.push(x[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=Ic(e),a=Bc(e),r=Fc(a);let i="x"===a?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[r]>t.floating[r]&&(i=zc(i)),[i,zc(i)]}(a,i,k);_.push(x[e[0]],x[e[1]])}if(w=[...w,{placement:a,overflows:_}],!_.every((e=>e<=0))){var C,S;const e=((null==(C=r.flip)?void 0:C.index)||0)+1,t=E[e];if(t)return{data:{index:e,overflows:w},reset:{placement:t}};let n=null==(S=w.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:S.placement;if(!n)switch(h){case"bestFit":{var N;const e=null==(N=w.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=l}if(a!==n)return{reset:{placement:n}}}return{}}}},uu=(e,t,n)=>{const o=new Map,a={platform:ru,...n},r={...a.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:a="absolute",middleware:r=[],platform:i}=n,l=r.filter(Boolean),s=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=Hc(c,o,s),p=o,h={},m=0;for(let n=0;n<l.length;n++){const{name:r,fn:f}=l[n],{x:b,y:g,data:v,reset:k}=await f({x:u,y:d,initialPlacement:o,placement:p,strategy:a,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});u=null!=b?b:u,d=null!=g?g:d,h={...h,[r]:{...h[r],...v}},k&&m<=50&&(m++,"object"==typeof k&&(k.placement&&(p=k.placement),k.rects&&(c=!0===k.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):k.rects),({x:u,y:d}=Hc(c,p,s))),n=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:r})};var du="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function pu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,o,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;0!=o--;)if(!pu(e[o],t[o]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(o=n;0!=o--;)if(!{}.hasOwnProperty.call(t,a[o]))return!1;for(o=n;0!=o--;){const n=a[o];if(!("_owner"===n&&e.$$typeof||pu(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function hu(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mu(e,t){const n=hu(e);return Math.round(t*n)/n}function fu(t){const n=e.useRef(t);return du((()=>{n.current=t})),n}const bu=(e,t)=>({...lu(e),options:[e,t]}),gu=(e,t)=>({...su(e),options:[e,t]}),vu=(e,t)=>({...cu(e),options:[e,t]});var ku=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),yu="undefined"==typeof Element,Eu=yu?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,xu=!yu&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},_u=function e(t,n){var o;void 0===n&&(n=!0);var a=null==t||null===(o=t.getAttribute)||void 0===o?void 0:o.call(t,"inert");return""===a||"true"===a||n&&t&&e(t.parentNode)},wu=function e(t,n,o){for(var a=[],r=Array.from(t);r.length;){var i=r.shift();if(!_u(i,!1))if("SLOT"===i.tagName){var l=i.assignedElements(),s=e(l.length?l:i.children,!0,o);o.flatten?a.push.apply(a,s):a.push({scopeParent:i,candidates:s})}else{Eu.call(i,ku)&&o.filter(i)&&(n||!t.includes(i))&&a.push(i);var c=i.shadowRoot||"function"==typeof o.getShadowRoot&&o.getShadowRoot(i),u=!_u(c,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(c&&u){var d=e(!0===c?i.children:c.children,!0,o);o.flatten?a.push.apply(a,d):a.push({scopeParent:i,candidates:d})}else r.unshift.apply(r,i.children)}}return a},Cu=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Su=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Cu(e)?0:e.tabIndex},Nu=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ou=function(e){return"INPUT"===e.tagName},Tu=function(e){var t=e.getBoundingClientRect(),n=t.width,o=t.height;return 0===n&&0===o},Mu=function(e,t){return!(t.disabled||_u(t)||function(e){return Ou(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,o=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var a=Eu.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Eu.call(a,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Tu(e)}else{if("function"==typeof o){for(var r=e;e;){var i=e.parentElement,l=xu(e);if(i&&!i.shadowRoot&&!0===o(i))return Tu(e);e=e.assignedSlot?e.assignedSlot:i||l===e.ownerDocument?i:l.host}e=r}if(function(e){var t,n,o,a,r=e&&xu(e),i=null===(t=r)||void 0===t?void 0:t.host,l=!1;if(r&&r!==e)for(l=!!(null!==(n=i)&&void 0!==n&&null!==(o=n.ownerDocument)&&void 0!==o&&o.contains(i)||null!=e&&null!==(a=e.ownerDocument)&&void 0!==a&&a.contains(e));!l&&i;){var s,c,u;l=!(null===(c=i=null===(s=r=xu(i))||void 0===s?void 0:s.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(i))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var o=t.children.item(n);if("LEGEND"===o.tagName)return!!Eu.call(t,"fieldset[disabled] *")||!o.contains(e)}return!0}t=t.parentElement}return!1}(t))},Au=function(e,t){return!(function(e){return function(e){return Ou(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||xu(e),o=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=o(window.CSS.escape(e.name));else try{t=o(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var a=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!a||a===e}(e)}(t)||Su(t)<0||!Mu(e,t))},Du=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Ru=function e(t){var n=[],o=[];return t.forEach((function(t,a){var r=!!t.scopeParent,i=r?t.scopeParent:t,l=function(e,t){var n=Su(e);return n<0&&t&&!Cu(e)?0:n}(i,r),s=r?e(t.candidates):i;0===l?r?n.push.apply(n,s):n.push(i):o.push({documentOrder:a,tabIndex:l,item:t,isScope:r,content:s})})),o.sort(Nu).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},Iu=function(e,t){var n;return n=(t=t||{}).getShadowRoot?wu([e],t.includeContainer,{filter:Au.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Du}):function(e,t,n){if(_u(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(ku));return t&&Eu.call(e,ku)&&o.unshift(e),o.filter(n)}(e,t.includeContainer,Au.bind(null,t)),Ru(n)};const Pu={...t},Fu=Pu.useInsertionEffect||(e=>e());function Lu(t){const n=e.useRef((()=>{}));return Fu((()=>{n.current=t})),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return null==n.current?void 0:n.current(...t)}),[])}var Bu="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function Vu(){return Vu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Vu.apply(this,arguments)}let zu=!1,ju=0;const Hu=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ju++,Uu=Pu.useId||function(){const[t,n]=e.useState((()=>zu?Hu():void 0));return Bu((()=>{null==t&&n(Hu())}),[]),e.useEffect((()=>{zu=!0}),[]),t};const Wu=e.createContext(null),Gu=e.createContext(null),$u=()=>{var t;return(null==(t=e.useContext(Wu))?void 0:t.id)||null},qu=()=>e.useContext(Gu);function Xu(e){return"data-floating-ui-"+e}function Ju(t){const n=(0,e.useRef)(t);return Bu((()=>{n.current=t})),n}const Ku=Xu("safe-polygon");function Yu(e,t,n){return n&&!kc(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function Zu(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),o=n;for(;o.length;)o=e.filter((e=>{var t;return null==(t=o)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(o);return n}const Qu=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ed(e,t){const n=Iu(e,Qu());"prev"===t&&n.reverse();const o=n.indexOf(hc(yc(e)));return n.slice(o+1)[0]}function td(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!mc(n,o)}function nd(e){Iu(e,Qu()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function od(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const ad={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function rd(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const id=e.forwardRef((function(t,n){const[o,a]=e.useState();Bu((()=>(gc()&&a("button"),document.addEventListener("keydown",rd),()=>{document.removeEventListener("keydown",rd)})),[]);const r={ref:n,tabIndex:0,role:o,"aria-hidden":!o||void 0,[Xu("focus-guard")]:"",style:ad};return e.createElement("span",Vu({},t,r))})),ld=e.createContext(null),sd=Xu("portal");function cd(t){const{children:n,id:o,root:a=null,preserveTabOrder:r=!0}=t,i=function(t){void 0===t&&(t={});const{id:n,root:o}=t,a=Uu(),r=ud(),[i,l]=e.useState(null),s=e.useRef(null);return Bu((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{s.current=null}))}),[i]),Bu((()=>{if(!a)return;if(s.current)return;const e=n?document.getElementById(n):null;if(!e)return;const t=document.createElement("div");t.id=a,t.setAttribute(sd,""),e.appendChild(t),s.current=t,l(t)}),[n,a]),Bu((()=>{if(!a)return;if(s.current)return;let e=o||(null==r?void 0:r.portalNode);e&&!ec(e)&&(e=e.current),e=e||document.body;let t=null;n&&(t=document.createElement("div"),t.id=n,e.appendChild(t));const i=document.createElement("div");i.id=a,i.setAttribute(sd,""),e=t||e,e.appendChild(i),s.current=i,l(i)}),[n,o,a,r]),i}({id:o,root:a}),[l,s]=e.useState(null),c=e.useRef(null),u=e.useRef(null),d=e.useRef(null),p=e.useRef(null),h=!!l&&!l.modal&&l.open&&r&&!(!a&&!i);return e.useEffect((()=>{if(i&&r&&(null==l||!l.modal))return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&td(e)&&("focusin"===e.type?od:nd)(i)}}),[i,r,null==l?void 0:l.modal]),e.createElement(ld.Provider,{value:e.useMemo((()=>({preserveTabOrder:r,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:p,portalNode:i,setFocusManagerState:s})),[r,i])},h&&i&&e.createElement(id,{"data-type":"outside",ref:c,onFocus:e=>{if(td(e,i)){var t;null==(t=d.current)||t.focus()}else{const e=ed(document.body,"prev")||(null==l?void 0:l.refs.domReference.current);null==e||e.focus()}}}),h&&i&&e.createElement("span",{"aria-owns":i.id,style:ad}),i&&(0,qo.createPortal)(n,i),h&&i&&e.createElement(id,{"data-type":"outside",ref:u,onFocus:e=>{if(td(e,i)){var t;null==(t=p.current)||t.focus()}else{const t=ed(document.body,"next")||(null==l?void 0:l.refs.domReference.current);null==t||t.focus(),(null==l?void 0:l.closeOnFocusOut)&&(null==l||l.onOpenChange(!1,e.nativeEvent))}}}))}const ud=()=>e.useContext(ld),dd={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},pd={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},hd=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function md(t){void 0===t&&(t={});const{nodeId:n}=t,o=function(t){const{open:n=!1,onOpenChange:o,elements:a}=t,r=Uu(),i=e.useRef({}),[l]=e.useState((()=>function(){const e=new Map;return{emit(t,n){var o;null==(o=e.get(t))||o.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var o;e.set(t,(null==(o=e.get(t))?void 0:o.filter((e=>e!==n)))||[])}}}())),s=null!=$u(),[c,u]=e.useState(a.reference),d=Lu(((e,t,n)=>{i.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:n,nested:s}),null==o||o(e,t,n)})),p=e.useMemo((()=>({setPositionReference:u})),[]),h=e.useMemo((()=>({reference:c||a.reference||null,floating:a.floating||null,domReference:a.reference})),[c,a.reference,a.floating]);return e.useMemo((()=>({dataRef:i,open:n,onOpenChange:d,elements:h,events:l,floatingId:r,refs:p})),[n,d,h,l,r,p])}({...t,elements:{reference:null,floating:null,...t.elements}}),a=t.rootContext||o,r=a.elements,[i,l]=e.useState(null),[s,c]=e.useState(null),u=(null==r?void 0:r.reference)||i,d=e.useRef(null),p=qu();Bu((()=>{u&&(d.current=u)}),[u]);const h=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:r,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=t,[d,p]=e.useState({x:0,y:0,strategy:o,placement:n,middlewareData:{},isPositioned:!1}),[h,m]=e.useState(a);pu(h,a)||m(a);const[f,b]=e.useState(null),[g,v]=e.useState(null),k=e.useCallback((e=>{e!==_.current&&(_.current=e,b(e))}),[]),y=e.useCallback((e=>{e!==w.current&&(w.current=e,v(e))}),[]),E=i||f,x=l||g,_=e.useRef(null),w=e.useRef(null),C=e.useRef(d),S=null!=c,N=fu(c),O=fu(r),T=e.useCallback((()=>{if(!_.current||!w.current)return;const e={placement:n,strategy:o,middleware:h};O.current&&(e.platform=O.current),uu(_.current,w.current,e).then((e=>{const t={...e,isPositioned:!0};M.current&&!pu(C.current,t)&&(C.current=t,qo.flushSync((()=>{p(t)})))}))}),[h,n,o,O]);du((()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,p((e=>({...e,isPositioned:!1}))))}),[u]);const M=e.useRef(!1);du((()=>(M.current=!0,()=>{M.current=!1})),[]),du((()=>{if(E&&(_.current=E),x&&(w.current=x),E&&x){if(N.current)return N.current(E,x,T);T()}}),[E,x,T,N,S]);const A=e.useMemo((()=>({reference:_,floating:w,setReference:k,setFloating:y})),[k,y]),D=e.useMemo((()=>({reference:E,floating:x})),[E,x]),R=e.useMemo((()=>{const e={position:o,left:0,top:0};if(!D.floating)return e;const t=mu(D.floating,d.x),n=mu(D.floating,d.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...hu(D.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:n}}),[o,s,D.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:T,refs:A,elements:D,floatingStyles:R})),[d,T,A,D,R])}({...t,elements:{...r,...s&&{reference:s}}}),m=e.useCallback((e=>{const t=ec(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),h.refs.setReference(t)}),[h.refs]),f=e.useCallback((e=>{(ec(e)||null===e)&&(d.current=e,l(e)),(ec(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!ec(e))&&h.refs.setReference(e)}),[h.refs]),b=e.useMemo((()=>({...h.refs,setReference:f,setPositionReference:m,domReference:d})),[h.refs,f,m]),g=e.useMemo((()=>({...h.elements,domReference:u})),[h.elements,u]),v=e.useMemo((()=>({...h,...a,refs:b,elements:g,nodeId:n})),[h,b,g,n,a]);return Bu((()=>{a.dataRef.current.floatingContext=v;const e=null==p?void 0:p.nodesRef.current.find((e=>e.id===n));e&&(e.context=v)})),e.useMemo((()=>({...h,context:v,refs:b,elements:g})),[h,b,g,v])}function fd(t,n){void 0===n&&(n={});const{open:o,onOpenChange:a,events:r,dataRef:i,elements:{domReference:l}}=t,{enabled:s=!0,visibleOnly:c=!0}=n,u=e.useRef(!1),d=e.useRef(),p=e.useRef(!0);return e.useEffect((()=>{if(!s)return;const e=Ys(l);function t(){!o&&tc(l)&&l===hc(yc(l))&&(u.current=!0)}function n(){p.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",n,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",n,!0)}}),[l,o,s]),e.useEffect((()=>{if(s)return r.on("openchange",e),()=>{r.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(u.current=!0)}}),[r,s]),e.useEffect((()=>()=>{clearTimeout(d.current)}),[]),e.useMemo((()=>s?{reference:{onPointerDown(e){(function(e){return!bc().includes("jsdom/")&&(!vc()&&0===e.width&&0===e.height||vc()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)})(e.nativeEvent)||(p.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=xc(e.nativeEvent);if(c&&ec(t))try{if(gc()&&fc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints)throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!p.current&&(!tc(n=t)||!n.matches(_c)))return}var n;a(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,n=ec(t)&&t.hasAttribute(Xu("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout((()=>{var o;const r=hc(l?l.ownerDocument:document);(t||r!==l)&&(mc(null==(o=i.current.floatingContext)?void 0:o.refs.floating.current,r)||mc(l,r)||n||a(!1,e.nativeEvent,"focus"))}))}}}:{}),[s,c,i,l,a])}const bd="active",gd="selected";function vd(e,t,n){const o=new Map,a="item"===n;let r=e;if(a&&e){const{[bd]:t,[gd]:__,...n}=e;r=n}return{..."floating"===n&&{tabIndex:-1},...r,...t.map((t=>{const o=t?t[n]:null;return"function"==typeof o?e?o(e):null:o})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,r]=t;var i;a&&[bd,gd].includes(n)||(0===n.indexOf("on")?(o.has(n)||o.set(n,[]),"function"==typeof r&&(null==(i=o.get(n))||i.push(r),e[n]=function(){for(var e,t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return null==(e=o.get(n))?void 0:e.map((e=>e(...a))).find((e=>void 0!==e))})):e[n]=r)})),e):e),{})}}const kd=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function yd({children:t,text:n,className:o,TagName:a="span",placement:r="top"}){if(!n)return(0,e.createElement)(a,{className:"tooltip-ref-wrap"+(o?" "+o:"")},t);const[i,l]=(0,zn.useState)(!1);let s=r;switch(r){case"auto":s="top";break;case"auto-start":s="top-start";break;case"auto-end":s="top-end"}const{refs:c,floatingStyles:u,context:d}=md({open:i,onOpenChange:l,placement:s,whileElementsMounted:iu,middleware:[bu(5),vu({fallbackAxisSideDirection:"start"}),gu()]}),p=function(t,n){void 0===n&&(n={});const{open:o,onOpenChange:a,dataRef:r,events:i,elements:{domReference:l,floating:s}}=t,{enabled:c=!0,delay:u=0,handleClose:d=null,mouseOnly:p=!1,restMs:h=0,move:m=!0}=n,f=qu(),b=$u(),g=Ju(d),v=Ju(u),k=e.useRef(),y=e.useRef(-1),E=e.useRef(),x=e.useRef(-1),_=e.useRef(!0),w=e.useRef(!1),C=e.useRef((()=>{})),S=e.useCallback((()=>{var e;const t=null==(e=r.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[r]);e.useEffect((()=>{if(c)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(y.current),clearTimeout(x.current),_.current=!0)}}),[c,i]),e.useEffect((()=>{if(!c||!g.current||!o)return;function e(e){S()&&a(!1,e,"hover")}const t=yc(s).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[s,o,a,c,g,S]);const N=e.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=Yu(v.current,"close",k.current);o&&!E.current?(clearTimeout(y.current),y.current=window.setTimeout((()=>a(!1,e,n)),o)):t&&(clearTimeout(y.current),a(!1,e,n))}),[v,a]),O=Lu((()=>{C.current(),E.current=void 0})),T=Lu((()=>{if(w.current){const e=yc(s).body;e.style.pointerEvents="",e.removeAttribute(Ku),w.current=!1}}));return e.useEffect((()=>{if(c&&ec(l)){const e=l;return o&&e.addEventListener("mouseleave",i),null==s||s.addEventListener("mouseleave",i),m&&e.addEventListener("mousemove",t,{once:!0}),e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",n),()=>{o&&e.removeEventListener("mouseleave",i),null==s||s.removeEventListener("mouseleave",i),m&&e.removeEventListener("mousemove",t),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",n)}}function e(){return!!r.current.openEvent&&["click","mousedown"].includes(r.current.openEvent.type)}function t(e){if(clearTimeout(y.current),_.current=!1,p&&!kc(k.current)||h>0&&!Yu(v.current,"open"))return;const t=Yu(v.current,"open",k.current);t?y.current=window.setTimeout((()=>{a(!0,e,"hover")}),t):a(!0,e,"hover")}function n(t){if(e())return;C.current();const n=yc(s);if(clearTimeout(x.current),g.current&&r.current.floatingContext){o||clearTimeout(y.current),E.current=g.current({...r.current.floatingContext,tree:f,x:t.clientX,y:t.clientY,onClose(){T(),O(),N(t,!0,"safe-polygon")}});const e=E.current;return n.addEventListener("mousemove",e),void(C.current=()=>{n.removeEventListener("mousemove",e)})}("touch"!==k.current||!mc(s,t.relatedTarget))&&N(t)}function i(t){e()||r.current.floatingContext&&(null==g.current||g.current({...r.current.floatingContext,tree:f,x:t.clientX,y:t.clientY,onClose(){T(),O(),N(t)}})(t))}}),[l,s,c,t,p,h,m,N,O,T,a,o,f,v,g,r]),Bu((()=>{var e;if(c&&o&&null!=(e=g.current)&&e.__options.blockPointerEvents&&S()){const e=yc(s).body;if(e.setAttribute(Ku,""),e.style.pointerEvents="none",w.current=!0,ec(l)&&s){var t;const e=l,n=null==f||null==(t=f.nodesRef.current.find((e=>e.id===b)))||null==(t=t.context)?void 0:t.elements.floating;return n&&(n.style.pointerEvents=""),e.style.pointerEvents="auto",s.style.pointerEvents="auto",()=>{e.style.pointerEvents="",s.style.pointerEvents=""}}}}),[c,o,b,s,l,f,g,S]),Bu((()=>{o||(k.current=void 0,O(),T())}),[o,O,T]),e.useEffect((()=>()=>{O(),clearTimeout(y.current),clearTimeout(x.current),T()}),[c,l,O,T]),e.useMemo((()=>{if(!c)return{};function e(e){k.current=e.pointerType}return{reference:{onPointerDown:e,onPointerEnter:e,onMouseMove(e){function t(){_.current||a(!0,e.nativeEvent,"hover")}p&&!kc(k.current)||o||0===h||(clearTimeout(x.current),"touch"===k.current?t():x.current=window.setTimeout(t,h))}},floating:{onMouseEnter(){clearTimeout(y.current)},onMouseLeave(e){N(e.nativeEvent,!1)}}}}),[c,p,o,h,a,N])}(d,{move:!1}),h=fd(d),m=function(t,n){void 0===n&&(n={});const{open:o,onOpenChange:a,elements:{reference:r,domReference:i,floating:l},dataRef:s}=t,{enabled:c=!0,escapeKey:u=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:f=!1,bubbles:b,capture:g}=n,v=qu(),k=Lu("function"==typeof d?d:()=>!1),y="function"==typeof d?k:d,E=e.useRef(!1),x=e.useRef(!1),{escapeKey:_,outsidePress:w}=hd(b),{escapeKey:C,outsidePress:S}=hd(g),N=Lu((e=>{var t;if(!o||!c||!u||"Escape"!==e.key)return;const n=null==(t=s.current.floatingContext)?void 0:t.nodeId,r=v?Zu(v.nodesRef.current,n):[];if(!_&&(e.stopPropagation(),r.length>0)){let e=!0;if(r.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}a(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),O=Lu((e=>{var t;const n=()=>{var t;N(e),null==(t=xc(e))||t.removeEventListener("keydown",n)};null==(t=xc(e))||t.addEventListener("keydown",n)})),T=Lu((e=>{var t;const n=E.current;E.current=!1;const o=x.current;if(x.current=!1,"click"===p&&o)return;if(n)return;if("function"==typeof y&&!y(e))return;const r=xc(e),c="["+Xu("inert")+"]",u=yc(l).querySelectorAll(c);let d=ec(r)?r:null;for(;d&&!lc(d);){const e=uc(d);if(lc(e)||!ec(e))break;d=e}if(u.length&&ec(r)&&!r.matches("html,body")&&!mc(r,l)&&Array.from(u).every((e=>!mc(d,e))))return;if(tc(r)&&l){const t=r.clientWidth>0&&r.scrollWidth>r.clientWidth,n=r.clientHeight>0&&r.scrollHeight>r.clientHeight;let o=n&&e.offsetX>r.clientWidth;if(n&&"rtl"===sc(r).direction&&(o=e.offsetX<=r.offsetWidth-r.clientWidth),o||t&&e.offsetY>r.clientHeight)return}const h=null==(t=s.current.floatingContext)?void 0:t.nodeId,m=v&&Zu(v.nodesRef.current,h).some((t=>{var n;return Ec(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Ec(e,l)||Ec(e,i)||m)return;const f=v?Zu(v.nodesRef.current,h):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}a(!1,e,"outside-press")})),M=Lu((e=>{var t;const n=()=>{var t;T(e),null==(t=xc(e))||t.removeEventListener(p,n)};null==(t=xc(e))||t.addEventListener(p,n)}));return e.useEffect((()=>{if(!o||!c)return;function e(e){a(!1,e,"ancestor-scroll")}s.current.__escapeKeyBubbles=_,s.current.__outsidePressBubbles=w;const t=yc(l);u&&t.addEventListener("keydown",C?O:N,C),y&&t.addEventListener(p,S?M:T,S);let n=[];return f&&(ec(i)&&(n=pc(i)),ec(l)&&(n=n.concat(pc(l))),!ec(r)&&r&&r.contextElement&&(n=n.concat(pc(r.contextElement)))),n=n.filter((e=>{var n;return e!==(null==(n=t.defaultView)?void 0:n.visualViewport)})),n.forEach((t=>{t.addEventListener("scroll",e,{passive:!0})})),()=>{u&&t.removeEventListener("keydown",C?O:N,C),y&&t.removeEventListener(p,S?M:T,S),n.forEach((t=>{t.removeEventListener("scroll",e)}))}}),[s,l,i,r,u,y,p,o,a,f,c,_,w,N,C,O,T,S,M]),e.useEffect((()=>{E.current=!1}),[y,p]),e.useMemo((()=>c?{reference:{onKeyDown:N,[dd[m]]:e=>{h&&a(!1,e.nativeEvent,"reference-press")}},floating:{onKeyDown:N,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[pd[p]]:()=>{E.current=!0}}}:{}),[c,h,p,m,a,N])}(d),f=function(t,n){var o;void 0===n&&(n={});const{open:a,floatingId:r}=t,{enabled:i=!0,role:l="dialog"}=n,s=null!=(o=kd.get(l))?o:l,c=Uu(),u=null!=$u();return e.useMemo((()=>{if(!i)return{};const e={id:r,...s&&{role:s}};return"tooltip"===s||"label"===l?{reference:{["aria-"+("label"===l?"labelledby":"describedby")]:a?r:void 0},floating:e}:{reference:{"aria-expanded":a?"true":"false","aria-haspopup":"alertdialog"===s?"dialog":s,"aria-controls":a?r:void 0,..."listbox"===s&&{role:"combobox"},..."menu"===s&&{id:c},..."menu"===s&&u&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}},floating:{...e,..."menu"===s&&{"aria-labelledby":c}},item(e){let{active:t,selected:n}=e;const o={role:"option",...t&&{id:r+"-option"}};switch(l){case"select":return{...o,"aria-selected":t&&n};case"combobox":return{...o,...t&&{"aria-selected":!0}}}return{}}}}),[i,l,s,a,r,c,u])}(d,{role:"tooltip"}),{getReferenceProps:b,getFloatingProps:g}=function(t){void 0===t&&(t=[]);const n=t,o=e.useCallback((e=>vd(e,t,"reference")),n),a=e.useCallback((e=>vd(e,t,"floating")),n),r=e.useCallback((e=>vd(e,t,"item")),t.map((e=>null==e?void 0:e.item)));return e.useMemo((()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:r})),[o,a,r])}([p,h,m,f]);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a,{className:"tooltip-ref-wrap tooltip-ref-has-tip"+(o?" "+o:""),ref:c.setReference,...b()},t),(0,e.createElement)(cd,null,i&&(0,e.createElement)("div",{className:"kb-floating-tooltip",ref:c.setFloating,style:u,...g(),"data-placement":s},(0,e.createElement)("span",{className:"kb-tooltip-content",dangerouslySetInnerHTML:{__html:(v=n,k="<br><b><i><u><p><ol><ul><li><strong><small>",k=(((k||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join(""),v.replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,"").replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,(function(e,t){return k.indexOf("<"+t.toLowerCase()+">")>-1?e:""})))}}),(0,e.createElement)("span",{className:"kb-tooltip-arrow"}))));var v,k}function Ed({children:t}){return(0,e.createElement)("div",{className:"components-base-control kadence-color-group"},t)}function xd({children:t}){return(0,e.createElement)("div",{className:"components-base-control kadence-two-column-group"},t)}class _d extends zn.Component{constructor(){super(...arguments),this.toggle=this.toggle.bind(this),this.state={open:!1},this.popRef=(0,zn.createRef)(),this.debouncedToggle=(0,qn.debounce)(this.toggle.bind(this),100)}toggle(){this.setState({open:!this.state.open})}render(){const{open:t}=this.state;let n={};return n.dynamic=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M4 5.002s.003-.095.213-.288c.245-.225.671-.483 1.306-.73C7.018 3.399 9.34 3 12 3s4.982.399 6.482.984c.634.247 1.061.505 1.306.73.205.189.212.281.212.288 0 .003-.007.095-.213.284-.245.225-.671.483-1.306.73C16.982 6.601 14.66 7 12 7s-4.982-.399-6.482-.984c-.634-.247-1.061-.505-1.306-.73C4.004 5.094 4 5.002 4 5.002zm16 9.53v4.471a.779.779 0 01-.217.291c-.245.225-.671.482-1.303.728-1.495.582-3.809.978-6.48.978s-4.985-.396-6.48-.978c-.633-.246-1.058-.503-1.303-.728a.865.865 0 01-.199-.242l-.006-4.514c.248.126.51.242.782.348C6.591 15.585 9.171 16 12 16s5.409-.415 7.206-1.114c.277-.108.543-.225.794-.354zm0-7.005v4.476a.779.779 0 01-.217.291c-.245.225-.671.482-1.303.728-1.495.582-3.809.978-6.48.978s-4.985-.396-6.48-.978c-.633-.246-1.058-.503-1.303-.728a.865.865 0 01-.199-.242 1.109 1.109 0 00-.009-.117l-.005-4.407c.248.128.513.244.788.352C6.593 8.582 9.18 9 12 9s5.407-.418 7.208-1.12A8.69 8.69 0 0020 7.527zM2 5v14c0 .058.002.116.007.174.057.665.425 1.197.857 1.594.498.457 1.175.824 1.93 1.118C6.591 22.585 9.171 23 12 23s5.409-.415 7.206-1.114c.755-.294 1.432-.661 1.93-1.118.432-.397.8-.929.857-1.594.005-.058.007-.116.007-.174V5c0-.056-.002-.112-.007-.168-.055-.664-.422-1.195-.852-1.59-.498-.459-1.177-.827-1.933-1.122C17.407 1.418 14.82 1 12 1s-5.407.418-7.208 1.12c-.756.295-1.435.664-1.933 1.122-.43.395-.797.927-.852 1.59A1.887 1.887 0 002 5z"})),(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(jn.Button,{className:"kb-dynamic-url-sidebar",icon:n.dynamic,onClick:()=>this.debouncedToggle(),isPressed:!1,"aria-haspopup":"true","aria-expanded":t,label:(0,Jn.__)("Dynamic Link","kadence-blocks"),showTooltip:!0}),t&&(0,e.createElement)(jn.Popover,{className:"kb-dynamic-popover",position:"bottom left",onClick:()=>{},expandOnMobile:!0,onClose:()=>this.debouncedToggle(),ref:this.popRef},(0,e.createElement)("div",{className:"kb-dynamic-popover-inner-wrap"},(0,e.createElement)("div",{className:"kb-pro-notice"},(0,e.createElement)("h2",null,(0,Jn.__)("Dynamic links","kadence-blocks")," "),(0,e.createElement)("p",null,(0,Jn.__)("Create dynamic sites by populating links from various sources.","kadence-blocks")," "),(0,e.createElement)(jn.ExternalLink,{href:"https://www.kadencewp.com/kadence-blocks/pro/?utm_source=in-app&utm_medium=kadence-blocks&utm_campaign=dynamic-content"},(0,Jn.__)("Upgrade to Pro","kadence-blocks"))))))}}const wd=(0,jn.withFilters)("kadence.URLInputDynamicControl")(_d),Cd=window.wp.htmlEntities;function Sd(e){const t=[];return t.push(gs()({path:(0,Hr.addQueryArgs)("/wp/v2/search",{search:e,per_page:20,type:"post"})}).catch((()=>[]))),Promise.all(t).then((e=>(0,qn.map)((0,qn.flatten)(e).slice(0,20),(e=>({id:e.id,url:e.url,title:(0,Cd.decodeEntities)(e.title)||(0,Jn.__)("(no title)"),type:e.subtype||e.type})))))}const Nd=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),Od="none",Td="custom",Md="media",Ad="attachment",Dd=(0,e.createElement)(jn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(jn.Path,{d:"M0,0h24v24H0V0z",fill:"none"}),(0,e.createElement)(jn.Path,{d:"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z"}),(0,e.createElement)(jn.Path,{d:"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z"})),Rd=({linkDestination:t="none",onChangeUrl:n,url:o,mediaType:a="image",mediaUrl:r,mediaLink:i,onChangeAttribute:l,onChangeLinkDestination:s,additionalControls:c=!0,opensInNewTab:u,onChangeTarget:d,linkNoFollow:p,onChangeFollow:h,linkSponsored:m,onChangeSponsored:f,linkDownload:b,onChangeDownload:g,linkTitle:v,onChangeTitle:k,onChangeLinkClass:y,linkClass:E,changeTargetType:x=!1})=>{const[_,w]=(0,zn.useState)(!1),C=(0,zn.useCallback)((()=>{w(!0)})),[S,N]=(0,zn.useState)(!1),[O,T]=(0,zn.useState)(null),M=(0,zn.useRef)(null),A=(0,zn.useCallback)((()=>{t!==Md&&t!==Ad||T(""),N(!0)})),D=(0,zn.useCallback)((()=>{N(!1)})),R=(0,zn.useCallback)((()=>{T(null),D(),w(!1)})),I=(0,zn.useCallback)((()=>e=>{const t=M.current;t&&t.contains(e.target)||(w(!1),T(null),D())})),P=(0,zn.useCallback)((()=>e=>{if(O){const e=L().find((e=>e.url===O))?.linkDestination||Td;l?l({link:O,linkDestination:e}):(n(O),s&&s(e))}D(),T(null),e.preventDefault()})),F=(0,zn.useCallback)((()=>{l?l({link:"",linkDestination:Od}):(n(""),s&&s(Od))})),L=()=>{const t=[{linkDestination:Md,title:(0,Jn.__)("Media File"),url:"image"===a?r:void 0,icon:Dd}];return"image"===a&&i&&t.push({linkDestination:Ad,title:(0,Jn.__)("Attachment Page"),url:"image"===a?i:void 0,icon:(0,e.createElement)(jn.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)(jn.Path,{d:"M0 0h24v24H0V0z",fill:"none"}),(0,e.createElement)(jn.Path,{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z"}))}),t},B=e=>{d(e)},V=(0,e.createElement)(e.Fragment,null,d&&(0,e.createElement)(e.Fragment,null,x&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(SelectControl,{label:(0,Jn.__)("Link Target","kadence-blocks"),value:u,options:[{value:"_self",label:(0,Jn.__)("Same Tab/Window","kadence-blocks")},{value:"_blank",label:(0,Jn.__)("Open in New Tab","kadence-blocks")},{value:"video",label:(0,Jn.__)("Video Popup","kadence-blocks")}],onChange:B}),"video"===u&&(0,e.createElement)("p",null,(0,Jn.__)("NOTE: Video popup only works with youtube and vimeo links.","kadence-blocks"))),!x&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Open in New Tab","kadence-blocks"),onChange:B,checked:u})),h&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("No Follow","kadence-blocks"),onChange:e=>{h(e)},checked:p}),f&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Sponsored","kadence-blocks"),onChange:e=>{f(e)},checked:m}),g&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Download","kadence-blocks"),onChange:e=>{g(e)},checked:b}),k&&(0,e.createElement)(jn.TextControl,{label:(0,Jn.__)("Title","kadence-blocks"),onChange:e=>{k(e)},value:v}),y&&(0,e.createElement)(jn.TextControl,{label:(0,Jn.__)("Link CSS Class","kadence-blocks"),onChange:e=>{y(e)},value:E})),z=null!==O?O:o,j=((0,qn.find)(L(),["linkDestination",t])||{}).title;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(jn.ToolbarButton,{icon:Gl,className:"components-toolbar__control",label:o?(0,Jn.__)("Edit link"):(0,Jn.__)("Insert link"),"aria-expanded":_,onClick:C}),_&&(0,e.createElement)(Xn.URLPopover,{onFocusOutside:I(),onClose:R,renderSettings:()=>c?V:"",additionalControls:!z&&(0,e.createElement)(jn.NavigableMenu,null,(0,qn.map)(L(),(t=>(0,e.createElement)(jn.MenuItem,{key:t.linkDestination,icon:t.icon,onClick:()=>{T(null),(e=>{const t=L();let o;o=e?((0,qn.find)(t,(t=>t.url===e))||{linkDestination:Td}).linkDestination:Od,l?l({linkDestination:o,link:e}):(n(e),s&&s(o))})(t.url),D()}},t.title))))},(!o||S)&&(0,e.createElement)(Xn.URLPopover.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:z,onChangeInputValue:T,onSubmit:P(),autocompleteRef:M}),o&&!S&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Xn.URLPopover.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:o,onEditLinkClick:A,urlLabel:j}),(0,e.createElement)(jn.Button,{icon:Nd,label:(0,Jn.__)("Remove link"),onClick:F}))))},Id=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),Pd=(0,zn.createElement)(lo.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,zn.createElement)(lo.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"})),Fd=(0,zn.createElement)(lo.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,zn.createElement)(lo.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),Ld=(0,zn.createElement)(lo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,zn.createElement)(lo.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),Bd=({text:t="",highlight:n=""})=>{const o=n.trim();if(!o)return t;const a=new RegExp(`(${(0,qn.escapeRegExp)(o)})`,"gi");return(0,zn.createInterpolateElement)(t.replace(a,"<mark>$&</mark>"),{mark:(0,e.createElement)("mark",null)})};class Vd extends zn.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectPost=this.selectPost.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.autocompleteRef=e.autocompleteRef||(0,zn.createRef)(),this.inputRef=(0,zn.createRef)(),this.updateSuggestions=(0,qn.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.isUpdatingSuggestions=!1,this.state={search:"",suggestions:[],showSuggestions:!1,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:"",isEditing:!1}}updateSuggestions(e=""){this.setState({selectedSuggestion:null,loading:!0});const t=Sd(e);t.then((e=>{this.suggestionsRequest===t&&this.setState({suggestions:e,loading:!1,showSuggestions:!!e.length})})).catch((()=>{this.suggestionsRequest===t&&this.setState({loading:!1})})),this.suggestionsRequest=t}onChange(e){const t=e.target.value;this.setState({search:t}),this.updateSuggestions(t.trim())}onFocus(){const{suggestions:e,search:t}=this.state;!t||this.loading||e&&e.length||this.updateSuggestions(t.trim())}onKeyDown(e){const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:a}=this.state;if(!t||!o.length||a){switch(e.keyCode){case ao.UP:0!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(0,0));break;case ao.DOWN:this.state.search.length!==e.target.selectionStart&&(e.stopPropagation(),e.preventDefault(),e.target.setSelectionRange(this.state.search.length,this.state.search.length))}return}const r=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case ao.UP:{e.stopPropagation(),e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case ao.DOWN:{e.stopPropagation(),e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case ao.TAB:null!==this.state.selectedSuggestion&&(this.selectPost(r),this.props.speak((0,Jn.__)("Link selected.")));break;case ao.ENTER:null!==this.state.selectedSuggestion&&(e.stopPropagation(),this.selectPost(r))}}selectPost(e){this.props.onChange(e.url,e),this.setState({isEditing:!1,selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectPost(e)}render(){return(0,e.createElement)(zn.Fragment,null,this.renderControl(),this.renderSuggestions(),this.renderSettings())}renderSettings(){const{isSettingsExpanded:t,additionalControls:n,advancedOptions:o}=this.props;return(0,e.createElement)(zn.Fragment,null,n&&t&&(0,e.createElement)("div",{className:"kb-link-control-additional-controls"},o))}renderControl(){const{label:t,className:n,isFullWidth:o,instanceId:a,placeholder:r=(0,Jn.__)("Paste URL or type to search","kadence-blocks"),url:i="",attributes:l,dynamicAttribute:s="",isSettingsExpanded:c,additionalControls:u,advancedOptions:d,onExpandSettings:p,allowClear:h}=this.props,{loading:m,showSuggestions:f,selectedSuggestion:b,suggestionsListboxId:g=`block-editor-url-input-suggestions-${a}`,suggestionOptionIdPrefix:v=`block-editor-url-input-suggestion-${a}`,isEditing:k}=this.state,y={id:`url-input-control-${a}`,className:"kb-search-selection-name"},E={value:this.state.search||i,required:!0,className:"kb-search-selection-input",type:"text",onChange:this.onChange,onFocus:this.onFocus,placeholder:r,onKeyDown:this.onKeyDown,role:"combobox","aria-label":(0,Jn.__)("URL Input or Search","kadence-blocks"),"aria-expanded":f,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":null!==b?`${v}-${b}`:void 0,ref:this.inputRef};return(0,e.createElement)(zn.Fragment,null,(0,e.createElement)("div",{className:"kb-side-link-control-inner-row"},i&&!k&&(0,e.createElement)("div",{className:"kb-search-selection-name"},(0,Gs.applyFilters)("kadence.linkDisplay",(0,e.createElement)(zn.Fragment,null,(0,e.createElement)("div",{className:"block-editor-url-popover__link-viewer block-editor-format-toolbar__link-container-content"},i?(0,e.createElement)(jn.ExternalLink,{href:i},(0,Hr.filterURLForDisplay)((0,Hr.safeDecodeURI)(i))):(0,e.createElement)("span",null),(0,e.createElement)(jn.Button,{icon:Id,label:(0,Jn.__)("Edit","kadence-blocks"),onClick:()=>{this.state.search&&this.updateSuggestions(this.state.search),this.setState({isEditing:!0})}}))),this.props.attributes,s,void 0,this.props.context)),(!i||k)&&(0,e.createElement)(jn.BaseControl,{...y},(0,e.createElement)("div",{className:"kb-search-url-input"},(0,e.createElement)("input",{...E})),m&&(0,e.createElement)(jn.Spinner,null),h&&!this.state.search&&i&&(0,e.createElement)(jn.Button,{className:"kb-search-url-clear",icon:Pd,label:(0,Jn.__)("Clear","kadence-blocks"),onClick:()=>{this.props.onChange("",""),this.setState({isEditing:!1,selectedSuggestion:null,showSuggestions:!1})}}),(0,e.createElement)(jn.Button,{className:"kb-search-url-submit",icon:yi,label:(0,Jn.__)("Submit","kadence-blocks"),onClick:()=>{this.props.onChange(this.state.search||i,""),this.setState({isEditing:!1,selectedSuggestion:null,showSuggestions:!1})}})),s&&kadence_blocks_params.dynamic_enabled&&(0,e.createElement)(wd,{...this.props}),u&&(0,e.createElement)(jn.Button,{className:"kb-link-settings-toggle",icon:Fd,label:(0,Jn.__)("Link settings","kadence-blocks"),onClick:p,"aria-expanded":c})))}renderSuggestions(){const{className:t}=this.props,{showSuggestions:n,suggestions:o,selectedSuggestion:a,suggestionsListboxId:r,suggestionOptionIdPrefix:i,loading:l,search:s}=this.state,c={id:r,ref:this.autocompleteRef,role:"listbox"},u=["url","mailto","tel","internal"],d=(e,t)=>({role:"option",tabIndex:"-1",id:`${i}-${t}`,"aria-selected":t===a});return n&&o.length?(0,e.createElement)("div",{className:"kb-search-selection-list"},(0,e.createElement)("div",{...c,className:bi()("kb-search-selection-suggestions",`${t}__suggestions`)},o.map(((t,n)=>(0,e.createElement)(jn.Button,{...d(0,n),key:t.id,className:bi()("kb-search-selection-suggestion",{"is-selected":n===a}),onClick:()=>this.handleOnClick(t)},u.includes(t.type.toLowerCase())&&(0,e.createElement)(Icon,{className:"block-editor-link-control__search-item-icon",icon:Ld}),(0,e.createElement)("span",{className:"kb-search-selection-search-item-header"},(0,e.createElement)("span",{className:"kb-search-selection-search-item-title"},(0,e.createElement)(Bd,{text:t.title,highlight:s})),(0,e.createElement)("span",{"aria-hidden":!u.includes(t.type.toLowerCase()),className:"kb-search-selection-search-item-info"},!u.includes(t.type.toLowerCase())&&((0,Hr.filterURLForDisplay)((0,Hr.safeDecodeURI)(t.url))||""),u.includes(t.type.toLowerCase())&&(0,Jn.__)("Press ENTER to add this link"))),(0,e.createElement)("span",{className:"kb-search-selection-search-item-type"},"post_tag"===t.type?"tag":t.type)))))):null}}const zd=(0,qr.compose)(qr.withSafeTimeout,qr.withInstanceId)(Vd);class jd extends zn.Component{constructor(){super(...arguments),this.state={isEditingLink:!1,isSettingsExpanded:!1,urlInput:null}}render(){const{label:t,onChangeUrl:n,url:o,additionalControls:a=!0,opensInNewTab:r,onChangeTarget:i,linkNoFollow:l,onChangeFollow:s,linkSponsored:c,onChangeSponsored:u,linkDownload:d,onChangeDownload:p,linkTitle:h,onChangeTitle:m,changeTargetType:f=!1,allowClear:b=!1,dynamicAttribute:g=""}=this.props,{urlInput:v,isEditingLink:k,isSettingsExpanded:y}=this.state,E=e=>{i(e)},x=(0,e.createElement)(zn.Fragment,null,i&&(0,e.createElement)(zn.Fragment,null,f&&(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(jn.SelectControl,{label:(0,Jn.__)("Link Target","kadence-blocks"),value:r,options:[{value:"_self",label:(0,Jn.__)("Same Tab/Window","kadence-blocks")},{value:"_blank",label:(0,Jn.__)("Open in New Tab","kadence-blocks")},{value:"video",label:(0,Jn.__)("Video Popup","kadence-blocks")}],onChange:E}),"video"===r&&(0,e.createElement)("p",null,(0,Jn.__)("NOTE: Video popup only works with youtube and vimeo links.","kadence-blocks"))),!f&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Open in New Tab","kadence-blocks"),onChange:E,checked:r})),s&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("No Follow","kadence-blocks"),onChange:e=>{s(e)},checked:l}),u&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Sponsored","kadence-blocks"),onChange:e=>{u(e)},checked:c}),p&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Download","kadence-blocks"),onChange:e=>{p(e)},checked:d}),m&&(0,e.createElement)(jn.TextControl,{label:(0,Jn.__)("Title","kadence-blocks"),onChange:e=>{m(e)},value:h})),_=null!==v?v:o;return(0,e.createElement)(jn.Popover,{className:"kb-popover-link-popover",position:"bottom center"},(0,e.createElement)("div",{className:"components-base-control kb-popover-link-control kb-side-link-control"+(g&&kadence_blocks_params.dynamic_enabled?" has-dynamic-support":"")},(0,e.createElement)(zd,{url:_,onChange:e=>(e=>{n(e)})(e),attributes:this.props.attributes,dynamicAttribute:g,additionalControls:a,advancedOptions:x,isSettingsExpanded:y,onExpandSettings:()=>{this.setState({isSettingsExpanded:!y})},allowClear:b,...this.props})))}}const Hd=jd;class Ud extends zn.Component{constructor(){super(...arguments),this.state={isEditingLink:!1,isSettingsExpanded:!1,urlInput:null}}render(){const{label:t,onChangeUrl:n,url:o,additionalControls:a=!0,opensInNewTab:r,onChangeTarget:i,linkNoFollow:l,onChangeFollow:s,linkSponsored:c,onChangeSponsored:u,linkDownload:d,onChangeDownload:p,linkTitle:h,onChangeTitle:m,onChangeLinkClass:f,linkClass:b,changeTargetType:g=!1,allowClear:v=!1,dynamicAttribute:k=""}=this.props,{urlInput:y,isEditingLink:E,isSettingsExpanded:x}=this.state,_=e=>{i(e)},w=(0,e.createElement)(zn.Fragment,null,i&&(0,e.createElement)(zn.Fragment,null,g&&(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(jn.SelectControl,{label:(0,Jn.__)("Link Target","kadence-blocks"),value:r,options:[{value:"_self",label:(0,Jn.__)("Same Tab/Window","kadence-blocks")},{value:"_blank",label:(0,Jn.__)("Open in New Tab","kadence-blocks")},{value:"video",label:(0,Jn.__)("Video Popup","kadence-blocks")}],onChange:_}),"video"===r&&(0,e.createElement)("p",null,(0,Jn.__)("NOTE: Video popup only works with youtube and vimeo links.","kadence-blocks"))),!g&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Open in New Tab","kadence-blocks"),onChange:_,checked:r})),s&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("No Follow","kadence-blocks"),onChange:e=>{s(e)},checked:l}),u&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Sponsored","kadence-blocks"),onChange:e=>{u(e)},checked:c}),p&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Download","kadence-blocks"),onChange:e=>{p(e)},checked:d}),m&&(0,e.createElement)(jn.TextControl,{label:(0,Jn.__)("Title","kadence-blocks"),onChange:e=>{m(e)},value:h}),f&&(0,e.createElement)(jn.TextControl,{label:(0,Jn.__)("Link CSS Class","kadence-blocks"),onChange:e=>{f(e)},value:b}));return(0,e.createElement)("div",{className:"components-base-control kb-side-link-control"+(k&&kadence_blocks_params.dynamic_enabled?" has-dynamic-support":"")},t&&(0,e.createElement)("label",{className:"components-base-control__label"},t),(0,e.createElement)(zd,{url:o,onChange:e=>(e=>{n(e)})(e),attributes:this.props.attributes,dynamicAttribute:k,additionalControls:a,advancedOptions:w,isSettingsExpanded:x,onExpandSettings:()=>{this.setState({isSettingsExpanded:!x})},allowClear:v,...this.props}))}}const Wd=Ud,Gd=e=>e.map(((e,t)=>{const{nE:n,aBs:o,children:a=null}=e,r=Object.keys(o).filter((e=>"fill"!==e&&"stroke"!==e&&"none"!==o[e])).reduce(((e,t)=>(e[t]=o[t],e)),{});let i={};return"none"===o.fill&&o.stroke&&(i={fill:"none",stroke:"currentColor"}),(0,zn.createElement)(n,{key:t,...r,...i},null===a?a:Gd(a))})),$d=e=>{const{style:t,className:n,icon:o,name:a,htmltag:r,...i}=e,l=a.substring(0,2),s=a.substring(0,3),c=!(!l||"fe"!=l),u=c?"none":"currentColor",d=c?e.strokeWidth:void 0,p=c?"currentColor":void 0,h=c?"round":void 0,m=c?"round":void 0,f=e.ariaHidden?"true":void 0,b=r||"div",g=!(!e.icon||!e.icon.vB)&&e.icon.vB.split(" ");return(0,zn.createElement)(b,{style:{display:"inline-flex",justifyContent:"center",alignItems:"center",...t},className:`${n} ${0===e.size?"kb-icon-transparent":""}`},(0,zn.createElement)("svg",{style:{display:"inline-block",verticalAlign:"middle"},viewBox:e.icon?e.icon.vB:"0 0 24 24",height:0===e.size?"24":e.size,width:0===e.size?"24":e.size,fill:u,stroke:p,xmlns:e.xmlns,preserveAspectRatio:s&&"fas"!==s&&"fe_"!==s&&"ic_"!==s&&g&&(void 0!==g[0]&&0!==g[0]||void 0!==g[1]&&0!==g[1])?"xMinYMin meet":void 0,"stroke-width":d,"stroke-linecap":h,"stroke-linejoin":m,"aria-hidden":f},e.title?(0,zn.createElement)("title",null,e.title):null,e.icon&&Gd(e.icon.cD)))};$d.defaultProps={size:24,xmlns:"http://www.w3.org/2000/svg",strokeWidth:2,htmltag:"div"},$d.propTypes={icon:S().object.isRequired,size:S().oneOfType([S().number,S().string]),style:S().object,className:S().string};const qd=$d;class Xd extends zn.Component{constructor(){super(...arguments),this.updateIcons=this.updateIcons.bind(this),this.getCustomSvg=this.getCustomSvg.bind(this),this.state={iconOptions:void 0,isLoading:!1,customSvg:""}}componentDidMount(){const e={...kadence_blocks_params_ico.icons,...kadence_blocks_params_fa.icons};this.setState({iconOptions:(0,Gs.applyFilters)("kadence.icon_options",e)}),this.props.name.startsWith("kb-custom")&&this.getCustomSvg(this.props.name.replace("kb-custom-",""))}componentDidUpdate(e,t,n){this.props.name!==e.name&&this.props.name.startsWith("kb-custom")&&this.getCustomSvg(this.props.name.replace("kb-custom-",""))}getCustomSvg=async e=>{try{const t=localStorage.getItem(`kb-custom-${e}`);if(t)return void this.setState({customSvg:JSON.parse(t)});this.setState({isLoading:!0});const n=await(async e=>{const t=await fetch(kadence_blocks_params.rest_url+`wp/v2/kadence_custom_svg/${e}`,{method:"GET"});if(!t.ok)throw new Error("Network response was not ok");return t.json()})(e);if(n){const t=n.content.rendered.replace("<p>","").replace("</p>","").replace(/“/g,'"').replace(/”/g,'"').replace(/„/g,'"').replace(/″/g,'"'),o=JSON.parse(t);localStorage.setItem(`kb-custom-${e}`,JSON.stringify(o)),this.setState({customSvg:o})}else this.setState({customSvg:""})}catch(e){this.setState({customSvg:""}),console.error("Failed to fetch custom SVGs:",e)}this.setState({isLoading:!1})};updateIcons(){const e={...kadence_blocks_params_ico.icons,...kadence_blocks_params_fa.icons};return(0,Gs.applyFilters)("kadence.icon_options",e)}render(){const{name:t}=this.props;let{iconOptions:n,isLoading:o,customSvg:a}=this.state;return n||(n=this.updateIcons()),t.startsWith("kb-custom")&&o?(0,e.createElement)(jn.Spinner,null):t.startsWith("kb-custom")&&""!==a?(0,e.createElement)(qd,{name:t,icon:a,...this.props}):(0,e.createElement)(qd,{name:t,icon:n[t],...this.props})}}const Jd=Xd;function Kd({name:t,title:n,extraClass:o,strokeWidth:a=!1,tooltipID:r="",tooltipPlacement:i=""}){return(0,e.createElement)("span",{"data-name":t,"data-stroke":a||void 0,"data-title":n?n.replace(/ /g,"_"):void 0,"data-class":o?o.replace(/ /g,"_"):void 0,"data-tooltip-id":r||void 0,"data-tooltip-placement":r&&i?i:void 0,className:"kadence-dynamic-icon"})}function Yd({label:t,onChange:n,value:o="",defaultValue:a="",className:r="",step:i=1,max:l=100,min:s=0,beforeIcon:c="",help:u="",unit:d="",onUnit:p,showUnit:h=!1,lockUnits:m=!1,units:f=["px","em","rem"],reset:b,initialPosition:g}){return[n&&(0,e.createElement)("div",{className:"components-base-control kadence-range-control"+(r?" "+r:"")},(0,e.createElement)("div",{className:"kadence-title-bar"},t&&(0,e.createElement)("span",{className:"kadence-control-title"},t,b&&(0,e.createElement)(jn.Button,{className:"is-reset is-single",isSmall:!0,disabled:(0,qn.isEqual)(o,a),icon:Yl,onClick:()=>{"function"==typeof b?b():n(a)}}))),(0,e.createElement)("div",{className:"kadence-controls-content"},(0,e.createElement)("div",{className:"kadence-range-control-inner"},(0,e.createElement)(jn.RangeControl,{className:"kadence-range-control-range",beforeIcon:c,value:o,onChange:e=>n(e),min:s,max:l,step:i,help:u,allowReset:!0,initialPosition:g})),(p||h)&&(0,e.createElement)("div",{className:"kadence-units kadence-measure-control-select-wrapper"},(0,e.createElement)("select",{className:"kadence-measure-control-select components-unit-control__select",onChange:e=>{p&&p(e.target.value)},value:d,disabled:1===f.length||m},f.map(((t,n)=>(0,e.createElement)("option",{value:t,key:n},t)))))))]}function Zd({label:t,placement:n="top",measurement:o,onChange:a,step:r=1,max:i=100,min:l=0,icon:s,unit:c="",allowEmpty:u=!1,className:d="",preset:p=""}){const[h,m]=function(){const[e,t]=(0,zn.useState)(!1);return[e,e=>{t(e)}]}();return(0,e.createElement)("div",{className:`measure-input-wrap measure-input-${n}`},(0,e.createElement)("div",{className:"input-setting-toggle"},(0,e.createElement)(jn.Button,{isSmall:!0,className:"input-setting-toggle-btn",disabled:!(!o||"auto"!=o),tabIndex:"-1",onClick:o&&"auto"==o?"":function(){m(!h)}},t),h&&(0,e.createElement)(jn.Popover,{onClose:function(){m(!1)},className:"kadence-range-popover-settings"},(0,e.createElement)(Yd,{beforeIcon:s,value:void 0!==o?o:"",onChange:e=>a(e?parseFloat(e):e),min:l,max:i,step:r}),""!==c||p&&Array.isArray(p)&&p.length>1&&(0,e.createElement)(jn.ButtonGroup,{className:"kb-preset-size-options","aria-label":(0,Jn.__)("Choose a Preset Size","kadence-blocks")},(0,qn.map)(p&&Array.isArray(p)&&p.length>1?p:{px:[0,10,20,40,60,80,100,140,160,200],em:[0,.5,1,1.5,2,2.5,3,3.5,4,4.5],rem:[0,.5,1,1.5,2,2.5,3,3.5,4,4.5],"%":[0,2,5,8,10,20,30,40,50,60],vh:[0,2,5,8,10,20,30,40,50,60],vw:[0,2,5,8,10,20,30,40,50,60]}[c],(t=>(0,e.createElement)(jn.Button,{key:t,className:"kb-preset-sizes",isSmall:!0,onClick:()=>a(parseFloat(t))},t)))))),(0,e.createElement)(jn.TextControl,{label:t,hideLabelFromVision:!0,type:"number",className:"measure-inputs",disabled:!(!o||"auto"!=o),placeholder:o&&"auto"==o?(0,Jn.__)("auto","kadence-blocks"):void 0,value:void 0!==o?o:"",onChange:e=>a(e?Number(e):e),min:l,max:i,step:r}),(0,e.createElement)("span",{className:"measure-label"},s))}function Qd({label:t,measurement:n,control:o="individual",onChange:a,onControl:r=!1,step:i=1,max:l=100,min:s=0,firstIcon:c=Di.outlineTopIcon,secondIcon:u=Di.outlineRightIcon,thirdIcon:d=Di.outlineBottomIcon,fourthIcon:p=Di.outlineLeftIcon,linkIcon:h=Gl,unlinkIcon:m=$l,isBorderRadius:f=!1,unit:b="",onUnit:g,showUnit:v=!1,units:k=["px","em","rem"],allowEmpty:y=!1,key:E,className:x="",reset:_,preset:w=""}){const C={first:f?Di.topLeftIcon:c,second:f?Di.topRightIcon:u,third:f?Di.bottomRightIcon:d,fourth:f?Di.bottomLeftIcon:p,link:f?Di.radiusLinkedIcon:h,unlink:f?Di.radiusIndividualIcon:m},S=n||["","","",""],N=y?"":0,[O,T]=(0,zn.useState)(o),M=r?o:O,A=r||T;return(0,e.createElement)(zn.Fragment,null,a&&(0,e.createElement)("div",{key:E,className:`components-base-control kb-measure-control ${C.first!==Di.outlineTopIcon?"kb-measure-corners-control":"kb-measure-sides-control"}${""!==x?" "+x:""}`},t&&(0,e.createElement)("div",{className:"kadence-component__header kadence-title-bar"},t&&(0,e.createElement)("div",{className:"kadence-component__header__title kadence-measure-control__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),_&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!(!(0,qn.isEqual)(["","","",""],S)&&!(0,qn.isEqual)(["","auto","","auto"],S)),icon:Yl,onClick:()=>{"function"==typeof _?_():a(["","","",""])}}))),A&&(0,e.createElement)(jn.Button,{isSmall:!0,className:"kadence-radio-item kadence-control-toggle radio-custom is-single only-icon",label:"individual"!==M?(0,Jn.__)("Individual","kadence-blocks"):(0,Jn.__)("Linked","kadence-blocks"),icon:"individual"!==M?h:m,onClick:()=>A("individual"!==M?"individual":"linked"),isPressed:"individual"!==M,isTertiary:"individual"===M})),(0,e.createElement)("div",{className:"kadence-controls-content"},"individual"!==M&&(0,e.createElement)(Yd,{value:n?n[0]:"",onChange:e=>a([e,e,e,e]),min:s,max:l,step:i}),"individual"===M&&(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(Zd,{placement:"top",label:(0,Jn.__)("Top","kadence-blocks"),measurement:n?n[0]:"",onChange:e=>a([e?Number(e):e,n&&void 0!==n[1]&&""!==n[1]?n[1]:N,n&&void 0!==n[2]&&""!==n[2]?n[2]:N,n&&void 0!==n[3]&&""!==n[3]?n[3]:N]),min:s,max:l,step:i,icon:C.first,unit:b,allowEmpty:y,preset:w}),(0,e.createElement)(Zd,{placement:"right",label:(0,Jn.__)("Right","kadence-blocks"),measurement:n?n[1]:"",onChange:e=>a([n&&void 0!==n[0]&&""!==n[0]?n[0]:N,e?Number(e):e,n&&void 0!==n[2]&&""!==n[2]?n[2]:N,n&&void 0!==n[3]&&""!==n[3]?n[3]:N]),min:s,max:l,step:i,icon:C.second,unit:b,allowEmpty:y,preset:w}),(0,e.createElement)(Zd,{placement:"bottom",label:(0,Jn.__)("Bottom","kadence-blocks"),measurement:n?n[2]:"",onChange:e=>a([n&&void 0!==n[0]&&""!==n[0]?n[0]:N,n&&void 0!==n[1]&&""!==n[1]?n[1]:N,e?Number(e):e,n&&void 0!==n[3]&&""!==n[3]?n[3]:N]),min:s,max:l,step:i,icon:C.third,unit:b,allowEmpty:y,preset:w}),(0,e.createElement)(Zd,{placement:"left",label:(0,Jn.__)("Left","kadence-blocks"),measurement:n?n[3]:"",onChange:e=>a([n&&void 0!==n[0]&&""!==n[0]?n[0]:N,n&&void 0!==n[1]&&""!==n[1]?n[1]:N,n&&void 0!==n[2]&&""!==n[2]?n[2]:N,e?Number(e):e]),min:s,max:l,step:i,icon:C.fourth,unit:b,allowEmpty:y,preset:w})),(g||v)&&(0,e.createElement)("div",{className:"kadence-measure-control-select-wrapper"},(0,e.createElement)("select",{className:"kadence-measure-control-select components-unit-control__select",onChange:e=>{g&&g(e.target.value)},value:b},k.map((t=>(0,e.createElement)("option",{value:t,selected:b===t||void 0,key:t},t))))))))}class ep extends zn.Component{constructor(){super(...arguments),this.state={typographyOptions:[],typographySelectOptions:[],typographyWeights:[],typographyStyles:[],typographySubsets:""}}componentDidMount(){const e="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.g_font_names?kadence_blocks_params.g_font_names.map((e=>({label:e,value:e,google:!0}))):{};let t=[{type:"group",label:(0,Jn.__)("Standard Fonts","kadence-blocks"),options:[{label:"System Default",value:'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',google:!1},{label:"Arial, Helvetica, sans-serif",value:"Arial, Helvetica, sans-serif",google:!1},{label:'"Arial Black", Gadget, sans-serif',value:'"Arial Black", Gadget, sans-serif',google:!1},{label:"Helvetica, sans-serif",value:"Helvetica, sans-serif",google:!1},{label:'"Comic Sans MS", cursive, sans-serif',value:'"Comic Sans MS", cursive, sans-serif',google:!1},{label:"Impact, Charcoal, sans-serif",value:"Impact, Charcoal, sans-serif",google:!1},{label:'"Lucida Sans Unicode", "Lucida Grande", sans-serif',value:'"Lucida Sans Unicode", "Lucida Grande", sans-serif',google:!1},{label:"Tahoma, Geneva, sans-serif",value:"Tahoma, Geneva, sans-serif",google:!1},{label:'"Trebuchet MS", Helvetica, sans-serif',value:'"Trebuchet MS", Helvetica, sans-serif',google:!1},{label:"Verdana, Geneva, sans-serif",value:"Verdana, Geneva, sans-serif",google:!1},{label:"Georgia, serif",value:"Georgia, serif",google:!1},{label:'"Palatino Linotype", "Book Antiqua", Palatino, serif',value:'"Palatino Linotype", "Book Antiqua", Palatino, serif',google:!1},{label:'"Times New Roman", Times, serif',value:'"Times New Roman", Times, serif',google:!1},{label:"Courier, monospace",value:"Courier, monospace",google:!1},{label:'"Lucida Console", Monaco, monospace',value:'"Lucida Console", Monaco, monospace',google:!1}]},{type:"group",label:(0,Jn.__)("Google Fonts","kadence-blocks"),options:e}];if("undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.c_fonts){const e=[];Object.keys(kadence_blocks_params.c_fonts).forEach((function(t){const n=kadence_blocks_params.c_fonts[t].name,o=[];Object.keys(kadence_blocks_params.c_fonts[t].weights).forEach((function(e){o.push({value:kadence_blocks_params.c_fonts[t].weights[e],label:kadence_blocks_params.c_fonts[t].weights[e]})}));const a=[];Object.keys(kadence_blocks_params.c_fonts[t].styles).forEach((function(e){a.push({value:kadence_blocks_params.c_fonts[t].weights[e],label:kadence_blocks_params.c_fonts[t].weights[e]})})),e.push({label:n,value:n,google:!1,weights:o,styles:a})})),t=[{type:"group",label:(0,Jn.__)("Custom Fonts","kadence-blocks"),options:e}].concat(t)}if("undefined"!=typeof kadence_blocks_params&&kadence_blocks_params?.isKadenceT){const e=[{label:"Inherit Heading Font Family",value:"var( --global-heading-font-family, inherit )",google:!1},{label:"Inherit Body Font Family",value:"var( --global-body-font-family, inherit )",google:!1}];t=[{type:"group",label:(0,Jn.__)("Theme Global Fonts","kadence-blocks"),options:e}].concat(t)}let n=(0,Gs.applyFilters)("kadence.typography_options",t),o=[].concat.apply([],n.map((e=>e.options)));const a=kadence_blocks_params.configuration?JSON.parse(kadence_blocks_params.configuration):[];void 0!==a["kadence/typography"]&&"object"==typeof a["kadence/typography"]&&(void 0===a["kadence/typography"].showAll||a["kadence/typography"].showAll||(n=a["kadence/typography"].choiceArray,o=a["kadence/typography"].choiceArray)),this.setState({typographyOptions:n}),this.setState({typographySelectOptions:o}),this.setTypographyOptions(o)}componentDidUpdate(e){this.props.fontFamily!==e.fontFamily&&this.setTypographyOptions(this.state.typographySelectOptions)}setTypographyOptions(e){let t=[{value:"inherit",label:(0,Jn.__)("Inherit","kadence-blocks")},{value:"400",label:(0,Jn.__)("Normal","kadence-blocks")},{value:"bold",label:(0,Jn.__)("Bold","kadence-blocks")}];const n=[{value:"inherit",label:(0,Jn.__)("Inherit","kadence-blocks")},{value:"100",label:(0,Jn.__)("Thin 100","kadence-blocks")},{value:"200",label:(0,Jn.__)("Extra-Light 200","kadence-blocks")},{value:"300",label:(0,Jn.__)("Light 300","kadence-blocks")},{value:"400",label:(0,Jn.__)("Regular","kadence-blocks")},{value:"500",label:(0,Jn.__)("Medium 500","kadence-blocks")},{value:"600",label:(0,Jn.__)("Semi-Bold 600","kadence-blocks")},{value:"700",label:(0,Jn.__)("Bold 700","kadence-blocks")},{value:"800",label:(0,Jn.__)("Extra-Bold 800","kadence-blocks")},{value:"900",label:(0,Jn.__)("Ultra-Bold 900","kadence-blocks")}],o=!("undefined"==typeof kadence_blocks_params||!kadence_blocks_params.isKadenceT),a="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.headingWeights?kadence_blocks_params.headingWeights:[],r="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.bodyWeights?kadence_blocks_params.bodyWeights:[],i="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.buttonWeights?kadence_blocks_params.buttonWeights:[];o&&"heading"===this.props.fontGroup&&a&&Array.isArray(a)&&a.length&&(t=a),o&&"body"===this.props.fontGroup&&r&&Array.isArray(r)&&r.length&&(t=r),o&&"button"===this.props.fontGroup&&i&&Array.isArray(i)&&i.length&&(t=i);const l=[{value:"normal",label:(0,Jn.__)("Normal","kadence-blocks")},{value:"italic",label:(0,Jn.__)("Italic","kadence-blocks")}],s=e?e.filter((({value:e})=>e===this.props.fontFamily)):"";let c=t,u=l,d="";s&&s[0]&&(void 0!==s[0].weights&&(c=s[0].weights),void 0!==s[0].styles&&(u=s[0].styles)),'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'===this.props.fontFamily?c=n:"var( --global-heading-font-family, inherit )"===this.props.fontFamily?c=a:"var( --global-body-font-family, inherit )"===this.props.fontFamily?c=r:this.props.googleFont&&this.props.fontFamily&&"undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.g_fonts&&kadence_blocks_params.g_fonts[this.props.fontFamily]&&(c=kadence_blocks_params.g_fonts[this.props.fontFamily].w.map((e=>({label:(0,$n.capitalizeFirstLetter)(e),value:e}))),u=kadence_blocks_params.g_fonts[this.props.fontFamily].i.map((e=>({label:(0,$n.capitalizeFirstLetter)(e),value:e}))),d=kadence_blocks_params.g_fonts[this.props.fontFamily].s.map((e=>({label:(0,$n.capitalizeFirstLetter)(e),value:e})))),this.setState({typographyWeights:c}),this.setState({typographyStyles:u}),this.setState({typographySubsets:d}),this.setState({fontFamilyValue:s})}render(){const{tagLevel:t,label:n,htmlTag:o="heading",tagLowLevel:a=1,tagHighLevel:r=7,lineHeight:i,lineHeightType:l="",fontSize:s,fontSizeType:c="px",googleFont:u,loadGoogleFont:d,fontFamily:p,fontVariant:h,fontWeight:m,fontStyle:f,fontSubset:b,letterSpacing:g,margin:v,marginControl:k,padding:y,paddingControl:E,onTagLevel:x,onTagLevelHTML:_,onLineHeight:w,onFontSize:C,onFontFamily:S,onFontVariant:N,onFontWeight:O,onFontStyle:T,onFontSubset:M,onFontChange:A,onFontArrayChange:D,onLoadGoogleFont:R,onGoogleFont:I,onLetterSpacing:P,onFontSizeType:F,onLineHeightType:L,onPadding:B,onPaddingControl:V,onMargin:z,onMarginControl:j,loadItalic:H,onLoadItalic:U,textTransform:W,onTextTransform:G,reLetterSpacing:$=!1,letterSpacingType:q="px",otherTags:X=[],onLetterSpacingType:J,reset:K,defaultValue:Y={size:["","",""],sizeType:"px",lineHeight:["","",""],lineType:"px",letterSpacing:["","",""],letterType:"px",textTransform:"",family:"",google:!1,style:"",weight:"",variant:"",subset:"",loadGoogle:!0}}=this.props,{controlSize:Z,typographySelectOptions:Q,typographyOptions:ee,typographySubsets:te,typographyStyles:ne,typographyWeights:oe,fontFamilyValue:ae}=this.state,re={size:s,sizeType:c,lineHeight:i,lineType:l,letterSpacing:g,letterType:q,textTransform:W,family:p,google:u,style:f,weight:m,variant:h,subset:b,loadGoogle:d},ie=(0,qn.range)(a,r).map((n=>[{icon:(0,e.createElement)(ei,{level:n,isPressed:!(1!==t||!o||"heading"!==o)}),title:(0,Jn.sprintf)(/* translators: %d: heading level e.g: "1", "2", "3" */ /* translators: %d: heading level e.g: "1", "2", "3" */ (0,Jn.__)("Heading %d","kadence-blocks"),n),isActive:!(n!==t||!o||"heading"!==o),onClick:()=>_(n,"heading")}]));X.p&&ie.push([{icon:(0,e.createElement)(ei,{level:"p",isPressed:!(!o||"p"!==o)}),title:(0,Jn.__)("Paragraph","kadence-blocks"),isActive:!(!o||"p"!==o),onClick:()=>_(2,"p")}]),X.span&&ie.push([{icon:(0,e.createElement)(ei,{level:"span",isPressed:!(!o||"span"!==o)}),title:(0,Jn.__)("Span","kadence-blocks"),isActive:!(!o||"span"!==o),onClick:()=>_(2,"span")}]),X.div&&ie.push([{icon:(0,e.createElement)(ei,{level:"div",isPressed:!(!o||"div"!==o)}),title:(0,Jn.__)("Div","kadence-blocks"),isActive:!(!o||"div"!==o),onClick:()=>_(2,"div")}]);const le=()=>{D?D({google:!1,family:"",variant:"",weight:"inherit",style:"normal",subset:""}):(I(!1),S(""),N(""),O("inherit"),T("normal"),M(""))},se=[{value:"none",label:(0,Jn.__)("-","kadence-blocks"),tooltip:(0,Jn.__)("None","kadence-blocks")},{value:"uppercase",label:(0,Jn.__)("AB","kadence-blocks"),tooltip:(0,Jn.__)("Uppercase","kadence-blocks")},{value:"lowercase",label:(0,Jn.__)("ab","kadence-blocks"),tooltip:(0,Jn.__)("Lowercase","kadence-blocks")},{value:"capitalize",label:(0,Jn.__)("Ab","kadence-blocks"),tooltip:(0,Jn.__)("Capitalize","kadence-blocks")}],ce="px"!==c?120:3e3,ue="px"!==c?.001:1,de="px"!==l?.2:5,pe="px"!==l?120:3e3,he="px"!==l?.001:1,me=oe.some((function(e){return"regular"===e.value}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"components-base-control kb-typography-control"},n&&(0,e.createElement)("div",{className:"kadence-title-bar kadence-component__header"},(0,e.createElement)("label",{className:"kadence-heading-fontfamily-title components-typography-control__label kadence-component__header__title"},n)),(0,e.createElement)("div",{className:"kadence-title-bar"},n&&(0,e.createElement)("h2",{className:"kt-heading-fontfamily-title"},n),K&&(0,e.createElement)(Button,{className:"is-reset is-single",isSmall:!0,disabled:!!isEqual(re,Y),icon:undo,onClick:()=>{"function"==typeof K?K():D(Y)}})),x&&(0,e.createElement)(e.Fragment,null,_&&(0,e.createElement)(Vs,{label:(0,Jn.__)("HTML Tag","kadence-blocks"),value:"heading"===o?t:o,onChange:e=>{"div"===e||"p"===e||"span"===e?_(2,e):_(e,"heading")}}),!_&&(0,e.createElement)(Vs,{label:(0,Jn.__)("HTML Tag","kadence-blocks"),value:t,headingOnly:!0,tagHighLevel:r,tagLowLevel:a,onChange:e=>{x(e)}})),C&&F&&(0,e.createElement)(Ds,{label:(0,Jn.__)("Font Size","kadence-blocks"),value:s&&void 0!==s[0]?s[0]:"",onChange:e=>C([e,s&&void 0!==s[1]?s[1]:"",s&&void 0!==s[2]?s[2]:""]),tabletValue:s&&void 0!==s[1]?s[1]:"",onChangeTablet:e=>C([s&&void 0!==s[0]?s[0]:"",e,s&&void 0!==s[2]?s[2]:""]),mobileValue:s&&void 0!==s[2]?s[2]:"",onChangeMobile:e=>C([s&&void 0!==s[0]?s[0]:"",s&&void 0!==s[1]?s[1]:"",e]),min:0,max:ce,step:ue,unit:c||"px",onUnit:e=>F(e),units:["px","em","rem","vw"]}),!G&&w&&L&&(0,e.createElement)(Is,{label:(0,Jn.__)("Line Height","kadence-blocks"),value:i&&void 0!==i[0]?i[0]:"",onChange:e=>w([e,i&&void 0!==i[1]?i[1]:"",i&&void 0!==i[2]?i[2]:""]),tabletValue:i&&void 0!==i[1]?i[1]:"",onChangeTablet:e=>w([i&&void 0!==i[0]?i[0]:"",e,i&&void 0!==i[2]?i[2]:""]),mobileValue:i&&void 0!==i[2]?i[2]:"",onChangeMobile:e=>w([i&&void 0!==i[0]?i[0]:"",i&&void 0!==i[1]?i[1]:"",e]),min:de,max:pe,step:he,unit:l||"-",onUnit:e=>L(e),units:["-","px","em","rem"]}),G&&w&&L&&(0,e.createElement)(xd,{className:"kb-font-settings"},(0,e.createElement)(Is,{label:(0,Jn.__)("Line Height","kadence-blocks"),value:i&&void 0!==i[0]?i[0]:"",onChange:e=>w([e,i&&void 0!==i[1]?i[1]:"",i&&void 0!==i[2]?i[2]:""]),tabletValue:i&&void 0!==i[1]?i[1]:"",onChangeTablet:e=>w([i&&void 0!==i[0]?i[0]:"",e,i&&void 0!==i[2]?i[2]:""]),mobileValue:i&&void 0!==i[2]?i[2]:"",onChangeMobile:e=>w([i&&void 0!==i[0]?i[0]:"",i&&void 0!==i[1]?i[1]:"",e]),min:de,max:pe,step:he,unit:l||"-",onUnit:e=>L(e),units:["-","px","em","rem"],compressedDevice:!0}),(0,e.createElement)(wi,{label:(0,Jn.__)("Letter Case","kadence-blocks"),value:W,options:se,className:"kb-letter-case",allowClear:!0,onChange:e=>G(e)})),G&&(!w||!L)&&(0,e.createElement)(wi,{label:(0,Jn.__)("Letter Case","kadence-blocks"),value:W,options:se,className:"kb-letter-case",allowClear:!0,onChange:e=>G(e)}),S&&le&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"components-base-control"},(0,e.createElement)("div",{className:"kadence-component__header kadence-title-bar"},(0,e.createElement)("label",{className:"kadence-control-title kadence-component__header__title"},(0,Jn.__)("Font Family","kadence-blocks"))),(0,e.createElement)("div",{className:"typography-family-select-form-row"},(0,e.createElement)(jr,{options:ee,value:ae,classNamePrefix:"kb-react-select",isMulti:!1,maxMenuHeight:300,isClearable:!0,placeholder:(0,Jn.__)("Select a font family","kadence-blocks"),onChange:e=>{if(null===e)le();else{let t,n,o;e.google?(t="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.g_fonts&&!kadence_blocks_params.g_fonts[e.value].v.includes("regular")?kadence_blocks_params.g_fonts[e.value].v[0]:"regular",n="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.g_fonts&&!kadence_blocks_params.g_fonts[e.value].w.includes("regular")?kadence_blocks_params.g_fonts[e.value].w[0]:"400",o="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.g_fonts&&kadence_blocks_params.g_fonts[e.value].s.length>1?"latin":""):(o="",t="",n=void 0!==e.weights?.[0]?.value?e.weights[0].value:"inherit"),D?D({google:e.google,family:e.value,variant:t,weight:n,style:"normal",subset:o}):(A(e),N(t),O(n),T("normal"),M(o))}},styles:{control:(e,t)=>({...e,borderColor:"rgb(30, 30, 30)",borderRadius:"2px",":hover":{borderColor:"rgb(30, 30, 30)"}})}}))),O&&(0,e.createElement)(jn.SelectControl,{label:(0,Jn.__)("Font Weight","kadence-blocks"),value:"400"===m&&me?"regular":m,options:oe,onChange:e=>{if(u){let t;t="italic"===f?"regular"===e?"italic":e+"italic":e,D?D({variant:t,weight:"regular"===e?"400":e}):(N(t),O("regular"===e?"400":e))}else D?D({variant:"",weight:"regular"===e?"400":e}):(N(""),O("regular"===e?"400":e))},className:"kb-select-style"}),p&&T&&(0,e.createElement)(jn.SelectControl,{label:(0,Jn.__)("Font Style","kadence-blocks"),value:f,options:ne,onChange:e=>{if(u){let t;t="italic"===e?m&&"regular"!==m?m+"italic":"italic":m||"regular",D?D({variant:t,style:e}):(N(t),T(e))}else D?D({variant:"",style:e}):(N(""),T(e))},className:"kb-select-style"}),p&&u&&R&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Load Google Font on Frontend","kadence-blocks"),checked:d,onChange:R}),p&&u&&d&&T&&"normal"===f&&U&&void 0!==ne[1]&&void 0!==ne[1].value&&"italic"===ne[1].value&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Load Italic Styles Also","kadence-blocks"),checked:H,onChange:U}),P&&$&&(0,e.createElement)(Is,{label:(0,Jn.__)("Letter Spacing","kadence-blocks"),value:void 0!==$&&void 0!==$[0]?$[0]:"",onChange:e=>P([e,void 0!==$&&void 0!==$[1]?$[1]:"",void 0!==$&&void 0!==$[2]?$[2]:""]),tabletValue:void 0!==$&&void 0!==$[1]?$[1]:"",onChangeTablet:e=>P([void 0!==$&&void 0!==$[0]?$[0]:"",e,void 0!==$&&void 0!==$[2]?$[2]:""]),mobileValue:void 0!==$&&void 0!==$[2]?$[2]:"",onChangeMobile:e=>P([void 0!==$&&void 0!==$[0]?$[0]:"",void 0!==$&&void 0!==$[1]?$[1]:"",e]),min:-5,max:25,step:J&&"px"===J?.1:.01,unit:J?q:"px",onUnit:e=>J(e),units:J?["px","em","rem"]:["px"]}),P&&!$&&(0,e.createElement)(Yd,{label:(0,Jn.__)("Letter Spacing","kadence-blocks"),value:void 0!==g?g:"",defaultValue:0,onChange:e=>P(e),min:-5,max:25,step:.1,reset:!0})),B&&V&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Qd,{label:(0,Jn.__)("Padding (px)","kadence-blocks"),measurement:y||"",control:E,onChange:e=>B(e),onControl:e=>V(e),min:0,max:100,step:1,allowEmpty:!1,reset:()=>B([0,0,0,0])})),z&&j&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(Qd,{label:(0,Jn.__)("Margin (px)","kadence-blocks"),measurement:v||"",control:k,onChange:e=>z(e),onControl:e=>j(e),min:-100,max:100,step:1,allowEmpty:!1,reset:()=>z([0,0,0,0])}))))}}const tp=ep;class np extends zn.Component{constructor(){super(...arguments),this.state={controlSize:"desk",typographyOptions:[],typographySelectOptions:[],typographyWeights:[],typographyStyles:[],typographySubsets:""}}componentDidMount(){let e=[{type:"group",label:"Standard Fonts",options:[{label:"System Default",value:'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',google:!1},{label:"Arial, Helvetica, sans-serif",value:"Arial, Helvetica, sans-serif",google:!1},{label:'"Arial Black", Gadget, sans-serif',value:'"Arial Black", Gadget, sans-serif',google:!1},{label:"Helvetica, sans-serif",value:"Helvetica, sans-serif",google:!1},{label:'"Comic Sans MS", cursive, sans-serif',value:'"Comic Sans MS", cursive, sans-serif',google:!1},{label:"Impact, Charcoal, sans-serif",value:"Impact, Charcoal, sans-serif",google:!1},{label:'"Lucida Sans Unicode", "Lucida Grande", sans-serif',value:'"Lucida Sans Unicode", "Lucida Grande", sans-serif',google:!1},{label:"Tahoma, Geneva, sans-serif",value:"Tahoma, Geneva, sans-serif",google:!1},{label:'"Trebuchet MS", Helvetica, sans-serif',value:'"Trebuchet MS", Helvetica, sans-serif',google:!1},{label:"Verdana, Geneva, sans-serif",value:"Verdana, Geneva, sans-serif",google:!1},{label:"Georgia, serif",value:"Georgia, serif",google:!1},{label:'"Palatino Linotype", "Book Antiqua", Palatino, serif',value:'"Palatino Linotype", "Book Antiqua", Palatino, serif',google:!1},{label:'"Times New Roman", Times, serif',value:'"Times New Roman", Times, serif',google:!1},{label:"Courier, monospace",value:"Courier, monospace",google:!1},{label:'"Lucida Console", Monaco, monospace',value:'"Lucida Console", Monaco, monospace',google:!1}]},{type:"group",label:"Google Fonts",options:"undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.g_font_names?kadence_blocks_params.g_font_names.map((e=>({label:e,value:e,google:!0}))):{}}];if("undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.c_fonts){const t=[];Object.keys(kadence_blocks_params.c_fonts).forEach((function(e){const n=kadence_blocks_params.c_fonts[e].name,o=[];Object.keys(kadence_blocks_params.c_fonts[e].weights).forEach((function(t){o.push({value:kadence_blocks_params.c_fonts[e].weights[t],label:kadence_blocks_params.c_fonts[e].weights[t]})}));const a=[];Object.keys(kadence_blocks_params.c_fonts[e].styles).forEach((function(t){a.push({value:kadence_blocks_params.c_fonts[e].weights[t],label:kadence_blocks_params.c_fonts[e].weights[t]})})),t.push({label:n,value:n,google:!1,weights:o,styles:a})})),e=[{type:"group",label:(0,Jn.__)("Custom Fonts","kadence-blocks"),options:t}].concat(e)}if("undefined"!=typeof kadence_blocks_params&&kadence_blocks_params?.isKadenceT){const t=[{label:"Inherit Heading Font Family",value:"var( --global-heading-font-family, inherit )",google:!1},{label:"Inherit Body Font Family",value:"var( --global-body-font-family, inherit )",google:!1}];e=[{type:"group",label:(0,Jn.__)("Theme Global Fonts","kadence-blocks"),options:t}].concat(e)}let t=(0,Gs.applyFilters)("kadence.typography_options",e),n=[].concat.apply([],t.map((e=>e.options)));const o=kadence_blocks_params.configuration?JSON.parse(kadence_blocks_params.configuration):[];void 0!==o["kadence/typography"]&&"object"==typeof o["kadence/typography"]&&(void 0===o["kadence/typography"].showAll||o["kadence/typography"].showAll||(t=o["kadence/typography"].choiceArray,n=o["kadence/typography"].choiceArray)),this.setState({typographyOptions:t}),this.setState({typographySelectOptions:n}),this.setTypographyOptions(n)}componentDidUpdate(e){this.props.fontFamily!==e.fontFamily&&this.setTypographyOptions(this.state.typographySelectOptions)}setTypographyOptions(e){let t=[{value:"inherit",label:(0,Jn.__)("Inherit","kadence-blocks")},{value:"400",label:(0,Jn.__)("Normal","kadence-blocks")},{value:"bold",label:(0,Jn.__)("Bold","kadence-blocks")}];const n=[{value:"inherit",label:(0,Jn.__)("Inherit","kadence-blocks")},{value:"100",label:(0,Jn.__)("Thin 100","kadence-blocks")},{value:"200",label:(0,Jn.__)("Extra-Light 200","kadence-blocks")},{value:"300",label:(0,Jn.__)("Light 300","kadence-blocks")},{value:"400",label:(0,Jn.__)("Regular","kadence-blocks")},{value:"500",label:(0,Jn.__)("Medium 500","kadence-blocks")},{value:"600",label:(0,Jn.__)("Semi-Bold 600","kadence-blocks")},{value:"700",label:(0,Jn.__)("Bold 700","kadence-blocks")},{value:"800",label:(0,Jn.__)("Extra-Bold 800","kadence-blocks")},{value:"900",label:(0,Jn.__)("Ultra-Bold 900","kadence-blocks")}],o=[{value:"normal",label:(0,Jn.__)("Normal","kadence-blocks")},{value:"italic",label:(0,Jn.__)("Italic","kadence-blocks")}],a=!("undefined"==typeof kadence_blocks_params||!kadence_blocks_params.isKadenceT),r="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.headingWeights?kadence_blocks_params.headingWeights:[],i="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.bodyWeights?kadence_blocks_params.bodyWeights:[],l="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.buttonWeights?kadence_blocks_params.buttonWeights:[];a&&"heading"===this.props.fontGroup&&r&&Array.isArray(r)&&r.length&&(t=r),a&&"body"===this.props.fontGroup&&i&&Array.isArray(i)&&i.length&&(t=i),a&&"button"===this.props.fontGroup&&l&&Array.isArray(l)&&l.length&&(t=l);const s=e?e.filter((({value:e})=>e===this.props.fontFamily)):"";let c=t,u=o,d="";s&&s[0]&&(void 0!==s[0].weights&&(c=s[0].weights),void 0!==s[0].styles&&(u=s[0].styles)),'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'===this.props.fontFamily?c=n:"var( --global-heading-font-family, inherit )"===this.props.fontFamily?c=r:"var( --global-body-font-family, inherit )"===this.props.fontFamily?c=i:this.props.googleFont&&this.props.fontFamily&&"undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.g_fonts&&kadence_blocks_params.g_fonts[this.props.fontFamily]&&(c=kadence_blocks_params.g_fonts[this.props.fontFamily].w.map((e=>({label:(0,$n.capitalizeFirstLetter)(e),value:e}))),u=kadence_blocks_params.g_fonts[this.props.fontFamily].i.map((e=>({label:(0,$n.capitalizeFirstLetter)(e),value:e}))),d=kadence_blocks_params.g_fonts[this.props.fontFamily].s.map((e=>({label:(0,$n.capitalizeFirstLetter)(e),value:e})))),this.setState({typographyWeights:c}),this.setState({typographyStyles:u}),this.setState({typographySubsets:d}),this.setState({fontFamilyValue:s})}render(){const{uniqueID:t,lineHeight:n,lineHeightType:o,fontSize:a,fontSizeType:r,googleFont:i,loadGoogleFont:l,fontFamily:s,fontVariant:c,fontWeight:u,fontStyle:d,fontSubset:p,letterSpacing:h,onLineHeight:m,onFontSize:f,onFontFamily:b,onFontVariant:g,onFontWeight:v,onFontStyle:k,onFontSubset:y,onFontChange:E,onFontArrayChange:x,onLoadGoogleFont:_,onGoogleFont:w,onLetterSpacing:C,onFontSizeType:S,onLineHeightType:N,textTransform:O,onTextTransform:T,fontSizeArray:M,tabSize:A,tabLineHeight:D,onTabLineHeight:R,onTabSize:I,mobileSize:P,mobileLineHeight:F,onMobileLineHeight:L,onMobileSize:B}=this.props,{controlSize:V,typographySelectOptions:z,typographyOptions:j,typographySubsets:H,typographyStyles:U,typographyWeights:W,fontFamilyValue:G}=this.state,$=((0,Jn.__)("Desktop"),(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),(0,Jn.__)("Tablet"),(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),(0,Jn.__)("Mobile"),(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),e=>{const t=Number(e.target.value);C(""!==t?t>15?15:t<-5?-5:t:void 0)}),q=e=>{if(null===e)X();else{let t,n,o;e.google?(t="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.g_fonts&&!kadence_blocks_params.g_fonts[e.value].v.includes("regular")?kadence_blocks_params.g_fonts[e.value].v[0]:"regular",n="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.g_fonts&&!kadence_blocks_params.g_fonts[e.value].w.includes("regular")?kadence_blocks_params.g_fonts[e.value].w[0]:"400",o="undefined"!=typeof kadence_blocks_params&&kadence_blocks_params.g_fonts&&kadence_blocks_params.g_fonts[e.value].s.length>1?"latin":""):(o="",t="",n="inherit"),x?x({google:e.google,family:e.value,variant:t,weight:n,style:"normal",subset:o}):(E(e),g(t),v(n),k("normal"),y(o))}},X=()=>{x?x({google:!1,family:"",variant:"",weight:"inherit",style:"normal",subset:""}):(w(!1),b(""),g(""),v("inherit"),k("normal"),y(""))},J=e=>{if(i){let t;t="italic"===d?"regular"===e?"italic":e+"italic":e,x?x({variant:t,weight:"regular"===e?"400":e}):(g(t),v("regular"===e?"400":e))}else x?x({variant:"",weight:"regular"===e?"400":e}):(g(""),v("regular"===e?"400":e))},K=e=>{if(i){let t;t="italic"===e?u&&"regular"!==u?u+"italic":"italic":u||"regular",x?x({variant:t,style:e}):(g(t),k(e))}else x?x({variant:"",style:e}):(g(""),k(e))},Y=[{value:"none",label:"None"},{value:"capitalize",label:"Capitalize"},{value:"uppercase",label:"Uppercase"},{value:"lowercase",label:"Lowercase"}],Z=W.some((function(e){return"regular"===e.value}));let Q={};return Q.fontfamily=(0,e.createElement)("svg",{width:"16px",height:"16px",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"1.414"},(0,e.createElement)("path",{d:"M39.939,7.124l0,-3.751l-11.251,0l0,3.751l3.75,0l0,33.752l-3.75,0l0,3.751l11.251,0l0,-3.751l-3.751,0l0,-33.752l3.751,0Zm-11.251,4.391c0,-0.195 -0.366,-0.429 -0.6,-0.596c-1.033,-0.771 -2.175,-1.273 -3.443,-1.506c-1.268,-0.234 -2.747,-0.35 -4.45,-0.35c-1.234,0 -2.501,0.195 -3.797,0.592c-1.297,0.396 -2.4,0.876 -3.311,1.446c-1.056,0.667 -1.911,1.429 -2.569,2.278c-0.658,0.852 -0.988,1.744 -0.988,2.676c0,0.893 0.238,1.697 0.714,2.417c0.476,0.72 1.221,1.078 2.233,1.078c1.135,0 2.022,-0.292 2.661,-0.883c0.639,-0.585 0.958,-1.234 0.958,-1.944c0,-0.668 -0.097,-1.397 -0.289,-2.189c-0.195,-0.789 -0.288,-1.387 -0.288,-1.792c0.324,-0.345 0.887,-0.674 1.687,-0.989c0.799,-0.315 1.667,-0.47 2.599,-0.47c1.358,0 2.406,0.277 3.147,0.834c0.74,0.559 1.312,1.212 1.717,1.962c0.364,0.669 0.269,2.186 0.269,2.186l0,4.472c0,0.527 -2.545,1.257 -5.333,2.189c-2.789,0.931 -4.484,1.569 -5.397,1.914c-0.728,0.285 -1.429,0.666 -2.261,1.14c-0.831,0.478 -1.463,1.018 -1.971,1.628c-0.649,0.729 -1.116,1.549 -1.44,2.46c-0.325,0.911 -0.475,1.944 -0.475,3.101c0,2.23 0.73,4.034 2.179,5.412c1.448,1.376 3.3,2.068 5.549,2.068c2.128,0 3.947,-0.834 5.456,-1.603c1.514,-0.774 2.928,-1.92 4.244,-3.795l0.184,0c0.264,1.875 0.851,2.946 1.792,3.686l1.223,0.064l0,-27.486Zm-3.259,22.286c-0.75,0.955 -1.673,1.78 -2.766,2.483c-1.095,0.699 -2.363,1.052 -3.801,1.052c-1.359,0 -2.477,-0.396 -3.358,-1.191c-0.883,-0.791 -1.322,-2.029 -1.322,-3.712c0,-1.3 0.292,-2.425 0.883,-3.368c0.585,-0.947 1.388,-1.763 2.398,-2.453c1.118,-0.733 2.322,-1.341 3.619,-1.83c1.296,-0.488 2.622,-0.934 4.347,-1.438l0,10.457Z",fill:"#0e9cd1",fillRule:"nonzero"})),(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(jn.Dropdown,{className:"kt-popover-font-family-container components-dropdown-menu components-toolbar",contentClassName:"kt-popover-font-family",placement:"top",renderToggle:({isOpen:t,onToggle:n})=>(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(jn.Button,{className:"components-dropdown-menu__toggle kt-font-family-icon",label:(0,Jn.__)("Typography Settings"),tooltip:(0,Jn.__)("Typography Settings"),icon:Q.fontfamily,onClick:n,"aria-expanded":t},(0,e.createElement)("span",{className:"components-dropdown-menu__indicator"}))),renderContent:()=>(0,e.createElement)(zn.Fragment,null,b&&(0,e.createElement)(zn.Fragment,null,(0,e.createElement)("h2",{className:"kt-heading-fontfamily-title"},(0,Jn.__)("Font Family")),(0,e.createElement)("div",{className:"typography-family-select-form-row block-editor-block-toolbar"},(0,e.createElement)(jr,{options:j,className:"kt-inline-typography-select",classNamePrefix:"kt-typography",value:G,isMulti:!1,isSearchable:!0,isClearable:!0,maxMenuHeight:200,placeholder:(0,Jn.__)("Default"),onChange:q}))),(0,e.createElement)("div",{className:"typography-row-settings"},v&&(0,e.createElement)(jn.SelectControl,{label:(0,Jn.__)("Weight","kadence-blocks"),value:"400"===u&&Z?"regular":u,options:W,onChange:J}),T&&(0,e.createElement)(jn.SelectControl,{label:(0,Jn.__)("Transform"),value:O,options:Y,onChange:e=>T(e)}),s&&k&&(0,e.createElement)(jn.SelectControl,{label:(0,Jn.__)("Style"),value:d,options:U,onChange:K})),(0,e.createElement)("div",{className:"typography-row-settings"},C&&(0,e.createElement)("div",{className:"kt-type-input-wrap"},(0,e.createElement)("div",{className:"components-base-control kt-typography-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("label",{className:"components-base-control__label",htmlFor:`kt-inline-spacing${t}`},(0,Jn.__)("Spacing")),(0,e.createElement)("input",{id:`kt-inline-spacing${t}`,value:void 0!==h?h:"",onChange:$,min:-5,max:15,step:.1,type:"number",className:"components-text-control__input"}))),(0,e.createElement)("span",{className:"kt-unit"},(0,Jn.__)("px"))),s&&i&&y&&(0,e.createElement)(jn.SelectControl,{label:(0,Jn.__)("Subset"),value:p,options:H,onChange:e=>y(e)}),s&&i&&_&&(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Load Font"),checked:l,onChange:_})),(0,e.createElement)("div",{className:"typography-row-settings typography-size-row-settings"},f&&S&&!M&&(0,e.createElement)("div",{className:"kt-size-input-wrap"},f&&(0,e.createElement)("div",{className:"kt-type-size-input-wrap"},(0,e.createElement)(Ds,{label:(0,Jn.__)("Size","kadence-blocks"),value:a||"",onChange:e=>f(e),tabletValue:A||"",onChangeTablet:e=>onTabletSize(e),mobileValue:P||"",onChangeMobile:e=>B(e),min:0,max:"px"!==r?12:300,step:"px"!==r?.001:1,unit:r||"px",onUnit:e=>S(e),units:["px","em","rem","vw"],radio:!1,compressedDevice:!0}))),m&&N&&!M&&(0,e.createElement)("div",{className:"kt-size-input-wrap"},(0,e.createElement)("div",{className:"kt-type-size-input-wrap"},(0,e.createElement)(Is,{label:(0,Jn.__)("Height","kadence-blocks"),value:n||"",onChange:e=>m(e),tabletValue:D||"",onChangeTablet:e=>R(e),mobileValue:F||"",onChangeMobile:e=>L(e),min:0,max:"px"===o?300:12,step:"px"===o?1:.1,unit:o||"",onUnit:e=>N(e),units:["-","px","em","rem"],compressedDevice:!0})))))}))}}const op=np,ap=({label:t,enable:n=!0,color:o,colorDefault:a,blur:r,hOffset:i,vOffset:l,onColorChange:s,onBlurChange:c,onHOffsetChange:u,onVOffsetChange:d,onEnableChange:p})=>(0,e.createElement)("div",{className:"kb-text-shadow-container components-base-control"},t&&(0,e.createElement)("div",{className:"kt-box-shadow-label"},(0,e.createElement)("h2",{className:"kt-beside-color-label"},t),p&&(0,e.createElement)(jn.ToggleControl,{checked:n,onChange:e=>p(e)})),n&&(0,e.createElement)("div",{className:"kt-inner-sub-section"},(0,e.createElement)("div",{className:"kt-inner-sub-section-row"},(0,e.createElement)("div",{className:"kt-box-color-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("Color","kadence-blocks")),(0,e.createElement)(Qn,{value:o||a,default:a,onChange:e=>s(e)})),(0,e.createElement)("div",{className:"kt-box-x-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},"X"),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==i?i:"",onChange:e=>u(Number(e.target.value)),min:-200,max:200,step:1,type:"number",className:"components-text-control__input"})))),(0,e.createElement)("div",{className:"kt-box-y-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},"Y"),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==l?l:"",onChange:e=>d(Number(e.target.value)),min:-200,max:200,step:1,type:"number",className:"components-text-control__input"})))),(0,e.createElement)("div",{className:"kt-box-blur-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},"Blur"),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==r?r:"",onChange:e=>c(Number(e.target.value)),min:0,max:200,step:1,type:"number",className:"components-text-control__input"})))))));function rp({label:t,onChange:n,value:o="",className:a="",options:r=[],step:i=1,max:l=100,min:s=0,beforeIcon:c="",help:u="",defaultValue:d="",unit:p="",onUnit:h,showUnit:m=!1,units:f=["px","em","rem"],disableCustomSizes:b=!1}){const g=o.value?o.value:"",v=o.size?o.size:"";return[n&&(0,e.createElement)("div",{className:"components-base-control kadence-radio-range-control kadence-range-control"+(a?" "+a:"")},t&&(0,e.createElement)(jn.Flex,{justify:"space-between",className:"kadence-radio-range__header"},(0,e.createElement)(jn.FlexItem,null,(0,e.createElement)("label",{className:"components-base-control__label"},t))),"custom"!==g&&(0,e.createElement)("div",{className:"kadence-controls-content"},(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control"},r.map(((t,o)=>(0,e.createElement)(jn.Button,{key:`${t.label}-${t.value}-${o}`,isTertiary:g!==t.value,className:"kadence-radio-item radio-"+t.value,isPrimary:g===t.value,icon:void 0!==t.icon?t.icon:void 0,"aria-pressed":g===t.value,onClick:()=>{g==t.value&&""==d?n("",""):n(t.value,t.size)}},t.label))),!b&&(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Set custom size","kadence-blocks"),icon:gi,onClick:()=>n("custom",v),isPressed:!1,isTertiary:!0}))),"custom"===g&&(0,e.createElement)("div",{className:"kadence-controls-content"},(0,e.createElement)("div",{className:"kadence-range-control-inner"},(0,e.createElement)(jn.RangeControl,{className:"kadence-range-control-range",beforeIcon:c,value:v,onChange:e=>n("custom",e),min:s,max:l,step:i,help:u,allowReset:!0})),(h||m)&&(0,e.createElement)("div",{className:"kadence-units kadence-measure-control-select-wrapper"},(0,e.createElement)("select",{className:"kadence-measure-control-select components-unit-control__select",onChange:e=>{h&&h(e.target.value)},value:p,disabled:1===f.length},f.map(((t,n)=>(0,e.createElement)("option",{value:t,key:n},t))))),!b&&(0,e.createElement)(jn.ButtonGroup,{className:"kadence-radio-container-control"},(0,e.createElement)(jn.Button,{className:"kadence-radio-item radio-custom only-icon",label:(0,Jn.__)("Use size preset","kadence-blocks"),icon:gi,isPrimary:!0,onClick:()=>n(d,v),isPressed:!0}))))]}function ip({label:t,onChange:n,onChangeTablet:o,onChangeMobile:a,mobileValue:r,tabletValue:i,value:l,defaultValue:s="",defaultTablet:c="",defaultMobile:u="",step:d=1,max:p=100,min:h=0,unit:m="",onUnit:f,allowResponsiveUnitChange:b=!1,showUnit:g=!1,units:v=["px","em","rem"],allowEmpty:k=!0,className:y="",initialPosition:E,reset:x}){const[_,w]=(0,zn.useState)("Desktop"),C=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);C!==_&&w(C);const{setPreviewDeviceType:S}=(0,Kn.useDispatch)("kadenceblocks/data"),N=[{name:"Desktop",key:"desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",key:"tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}],O={};return O.Mobile=(0,e.createElement)(Yd,{value:void 0!==r?r:"",onChange:e=>a(e),min:h,max:p,step:d,unit:m,onUnit:f,showUnit:g,units:v,lockUnits:!b,initialPosition:E}),O.Tablet=(0,e.createElement)(Yd,{value:void 0!==i?i:"",onChange:e=>o(e),min:h,max:p,step:d,unit:m,onUnit:f,showUnit:g,units:v,lockUnits:!b,initialPosition:E}),O.Desktop=(0,e.createElement)(Yd,{value:void 0!==l?l:"",onChange:e=>n(e),min:h,max:p,step:d,unit:m,onUnit:f,showUnit:g,units:v,initialPosition:E}),[n&&o&&a&&(0,e.createElement)("div",{className:"components-base-control kb-responsive-range-control"+(""!==y?" "+y:"")},(0,e.createElement)("div",{className:"kadence-title-bar"},t&&(0,e.createElement)("span",{className:"kadence-control-title"},t,x&&(0,e.createElement)(jn.Button,{className:"is-reset is-single",isSmall:!0,disabled:(0,qn.isEqual)(l,s)&&(0,qn.isEqual)(i,c)&&(0,qn.isEqual)(r,u),icon:Yl,onClick:()=>{"function"==typeof x?x():"Tablet"===_?o(c):"Mobile"===_?a(u):n(s)}})),(0,e.createElement)(jn.ButtonGroup,{className:"kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(N,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===_?" is-active":""}`,isSmall:!0,"aria-pressed":_===t,onClick:()=>{return e=t,S((0,$n.capitalizeFirstLetter)(e)),void w((0,$n.capitalizeFirstLetter)(e));var e}},o))))),O[_]?O[_]:O.Desktop)]}function lp({label:t,onChange:n,onChangeTablet:o,onChangeMobile:a,mobileValue:r,tabletValue:i,value:l,options:s=[],step:c=1,max:u=100,min:d=0,unit:p="",onUnit:h,defaultValue:m="default",defaultTablet:f="",defaultMobile:b="",showUnit:g=!1,units:v=["px","em","rem"],allowEmpty:k=!0,className:y="",disableCustomSizes:E=!1,reset:x}){const[_,w]=(0,zn.useState)("Desktop"),C=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);C!==_&&w(C);const{setPreviewDeviceType:S}=(0,Kn.useDispatch)("kadenceblocks/data"),N=[{name:"Desktop",key:"desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",key:"tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}],O={};return O.Mobile=(0,e.createElement)(rp,{value:void 0!==r?r:"",onChange:(e,t)=>a(e,t),options:s,defaultValue:b,min:d,max:u,step:c,unit:p,onUnit:h,showUnit:g,units:v,disableCustomSizes:E}),O.Tablet=(0,e.createElement)(rp,{value:void 0!==i?i:"",onChange:(e,t)=>o(e,t),options:s,defaultValue:f,min:d,max:u,step:c,unit:p,onUnit:h,showUnit:g,units:v,disableCustomSizes:E}),O.Desktop=(0,e.createElement)(rp,{value:void 0!==l?l:"",onChange:(e,t)=>n(e,t),options:s,defaultValue:m,min:d,max:u,step:c,unit:p,onUnit:h,showUnit:g,units:v,disableCustomSizes:E}),[n&&o&&a&&(0,e.createElement)("div",{className:"components-base-control kb-responsive-radio-range-control"+(""!==y?" "+y:"")},(0,e.createElement)("div",{className:"kadence-title-bar"},t&&(0,e.createElement)("span",{className:"kadence-control-title"},t),x&&(0,e.createElement)(jn.Button,{className:"is-reset is-single",isSmall:!0,disabled:(0,qn.isEqual)(l,m)&&(0,qn.isEqual)(i,f)&&(0,qn.isEqual)(r,b),icon:Yl,onClick:()=>{"function"==typeof x?x():"Tablet"===_?o(f):"Mobile"===_?a(b):n(m)}}),(0,e.createElement)(jn.ButtonGroup,{className:"kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(N,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===_?" is-active":""}`,isSmall:!0,"aria-pressed":_===t,onClick:()=>{return e=t,S((0,$n.capitalizeFirstLetter)(e)),void w((0,$n.capitalizeFirstLetter)(e));var e}},o))))),O[_]?O[_]:O.Desktop)]}Di.pxIcon,Di.emIcon,Di.remIcon,Di.vhIcon,Di.vwIcon,Di.percentIcon;let sp={px:Di.pxIcon,em:Di.emIcon,rem:Di.remIcon,vh:Di.vhIcon,vw:Di.vwIcon,percent:Di.percentIcon};function cp({device:t="device",onChange:n,value:o,step:a=1,max:r=100,min:i=0,unit:l="",onUnit:s,showUnit:c=!1,units:u=["px","em","rem"],lockUnits:d=!1,className:p=""}){return[n&&(0,e.createElement)("div",{className:"kadence-controls-content kb-responsive-range-control-inner"+(""!==p?" "+p:"")},(0,e.createElement)(Yd,{value:void 0!==o?o:"",onChange:e=>n(e),min:i,max:r,step:a}),(s||c)&&(0,e.createElement)("div",{className:"kadence-units"},1===u.length||d?(0,e.createElement)(jn.Button,{className:"is-active is-single",isSmall:!0,disabled:!0},"%"===l?sp.percent:sp[l]):(0,e.createElement)(jn.DropdownMenu,{icon:"%"===l?sp.percent:sp[l],label:(0,Jn.__)("Select a Unit","kadence-blocks"),controls:u.map((e=>{return[{icon:"%"===(t=e)?sp.percent:sp[t],isActive:l===t,onClick:()=>{s(t)}}];var t})),className:"kadence-units-group",popoverProps:{className:"kadence-units-popover"}})))]}function up({label:t,subLabel:n,onChange:o,onChangeTablet:a,onChangeMobile:r,mobileValue:i,tabletValue:l,value:s,onChangeControl:c=!1,control:u="individual",step:d=1,max:p=100,min:h=0,unit:m="",onUnit:f,showUnit:b=!1,units:g=["px","em","rem"],allowEmpty:v=!0,preset:k="",isBorderRadius:y=!1,firstIcon:E=Di.outlineTopIcon,secondIcon:x=Di.outlineRightIcon,thirdIcon:_=Di.outlineBottomIcon,fourthIcon:w=Di.outlineLeftIcon,linkIcon:C=Gl,unlinkIcon:S=$l,reset:N=!0}){const O=(0,zn.useRef)(),[T,M]=(0,zn.useState)(u),A=c?u:T,D=c||M,R=!!v,[I,P]=(0,zn.useState)("Desktop"),F=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);F!==I&&P(F);const{setPreviewDeviceType:L}=(0,Kn.useDispatch)("kadenceblocks/data"),B=[{name:"Desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}];let V=s||["","","",""];"Tablet"===I?V=l||["","","",""]:"Mobile"===I&&(V=i||["","","",""]);const z={};return z.Mobile=(0,e.createElement)(Qd,{key:2,className:"measure-mobile-size",label:n?(0,Jn.__)("Mobile:","kadence-blocks")+n:void 0,measurement:i||["","","",""],control:A,onChange:e=>r(e),onControl:e=>D(e),min:h,max:p,step:d,allowEmpty:R,unit:m,showUnit:!0,units:[m],preset:k,isBorderRadius:y,firstIcon:E,secondIcon:x,thirdIcon:_,fourthIcon:w,linkIcon:C,unlinkIcon:S}),z.Tablet=(0,e.createElement)(Qd,{key:1,className:"measure-tablet-size",label:n?(0,Jn.__)("Tablet:","kadence-blocks")+n:void 0,measurement:l||["","","",""],control:A,onChange:e=>a(e),onControl:e=>D(e),min:h,max:p,step:d,allowEmpty:R,unit:m,showUnit:!0,units:[m],preset:k,isBorderRadius:y,firstIcon:E,secondIcon:x,thirdIcon:_,fourthIcon:w,linkIcon:C,unlinkIcon:S}),z.Desktop=(0,e.createElement)(Qd,{key:0,className:"measure-desktop-size",label:n||void 0,measurement:s||["","","",""],control:A,onChange:e=>o(e),onControl:e=>D(e),min:h,max:p,step:d,allowEmpty:R,unit:m,onUnit:f||void 0,showUnit:b,units:g,preset:k,isBorderRadius:y,firstIcon:E,secondIcon:x,thirdIcon:_,fourthIcon:w,linkIcon:C,unlinkIcon:S}),[o&&a&&r&&(0,e.createElement)("div",{ref:O,className:"components-base-control kb-responsive-measure-control"},(0,e.createElement)("div",{className:"kadence-component__header kadence-title-bar"},t&&(0,e.createElement)("div",{className:"kadence-component__header__title kadence-title-bar kadence-measure-control__title"},(0,e.createElement)("label",{className:"components-base-control__label"},t),N&&(0,e.createElement)("div",{className:"title-reset-wrap"},(0,e.createElement)(jn.Button,{className:"is-reset is-single",label:"reset",isSmall:!0,disabled:!(!(0,qn.isEqual)(["","","",""],V)&&!(0,qn.isEqual)(["","auto","","auto"],V)),icon:Yl,onClick:()=>{"Tablet"===I?a(["","","",""]):"Mobile"===I?r(["","","",""]):o(["","","",""])}}))),(0,e.createElement)(jn.ButtonGroup,{className:"kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(B,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===I?" is-active":""}`,isSmall:!0,"aria-pressed":I===t,onClick:()=>{return e=t,L((0,$n.capitalizeFirstLetter)(e)),void P((0,$n.capitalizeFirstLetter)(e));var e}},o)))),D&&(0,e.createElement)(jn.Button,{isSmall:!0,className:"kadence-radio-item kadence-control-toggle radio-custom is-single only-icon",label:"individual"!==A?(0,Jn.__)("Individual","kadence-blocks"):(0,Jn.__)("Linked","kadence-blocks"),icon:"individual"!==A?C:S,onClick:()=>D("individual"!==A?"individual":"linked"),isPressed:"individual"!==A,isTertiary:"individual"===A})),(0,e.createElement)("div",{className:"kb-responsive-measure-control-inner"},z[I]?z[I]:z.Desktop))]}class dp extends zn.Component{constructor(e,t,n){super(...arguments),this.state={isVisible:!1,color:"",name:""}}componentDidMount(){this.setState({color:this.props.colorValue}),this.setState({name:this.props.nameValue})}render(){const t=()=>{!0===this.state.isVisible&&(this.setState({isVisible:!1}),this.props.onSave(this.state.color,this.state.name))},n=e=>{this.setState({color:e})};return(0,e.createElement)("div",{className:"kt-advanced-color-settings-container"},this.state.isVisible&&(0,e.createElement)(jn.Popover,{position:"top left",className:"kt-popover-color",onClose:t},(0,e.createElement)(jn.ColorPicker,{color:void 0===this.state.color||""===this.state.color?this.props.colorValue:this.state.color,onChangeComplete:e=>n(e.hex),disableAlpha:!0}),(0,e.createElement)(jn.TextControl,{label:(0,Jn.__)("Name:"),value:void 0===this.state.name||""===this.state.name?this.props.nameValue:this.state.name,onChange:e=>this.setState({name:e})})),this.state.isVisible&&(0,e.createElement)(jn.Tooltip,{text:(0,Jn.__)("Edit Color")},(0,e.createElement)(jn.Button,{className:"kt-color-icon-indicate",onClick:t},(0,e.createElement)(jn.ColorIndicator,{className:"kt-advanced-color-indicate",colorValue:"transparent"===this.state.color||void 0===this.state.color||""===this.state.color?this.props.colorDefault:this.state.color}))),!this.state.isVisible&&(0,e.createElement)(jn.Tooltip,{text:(0,Jn.__)("Edit Color")},(0,e.createElement)(jn.Button,{className:"kt-color-icon-indicate",onClick:()=>{this.setState({isVisible:!0})}},(0,e.createElement)(jn.ColorIndicator,{className:"kt-advanced-color-indicate",colorValue:"transparent"===this.state.color||void 0===this.state.color||""===this.state.color?this.props.colorDefault:this.state.color}))))}}const pp=dp;function hp({label:t,swatchLabel:n="",value:o,onChange:a,defaultColor:r="",value2:i,swatchLabel2:l="",onChange2:s,defaultColor2:c="",value3:u,swatchLabel3:d="",onChange3:p,defaultColor3:h="",control:m,onControl:f,firstIcon:b=Di.outlineTopIcon,secondIcon:g=Di.outlineRightIcon,thirdIcon:v=Di.outlineBottomIcon,fourthIcon:k=Di.outlineLeftIcon,linkIcon:y=Di.linkedIcon,unlinkIcon:E=Di.individualIcon,className:x="",reset:_=!1}){const w={first:b,second:g,third:v,fourth:k,link:y,unlink:E},[C,S]=(0,zn.useState)("individual"),N=m||C,O=f||S,T=(0,zn.useRef)();return(0,e.createElement)("div",{ref:T,className:"components-base-control kb-border-color-control "+(""!==x?" "+x:"")},(0,e.createElement)("div",{className:"kadence-title-bar"},t&&(0,e.createElement)("span",{className:"kadence-control-title"},t),O&&(0,e.createElement)("div",{className:"kadence-units kadence-locked"},"individual"!==N?(0,e.createElement)(jn.Tooltip,{text:(0,Jn.__)("Individual","kadence-blocks")},(0,e.createElement)(jn.Button,{className:"is-single",isSmall:!0,onClick:()=>O("individual")},w.link)):(0,e.createElement)(jn.Tooltip,{text:(0,Jn.__)("Linked","kadence-blocks")},(0,e.createElement)(jn.Button,{className:"is-single",isSmall:!0,onClick:()=>O("linked")},w.unlink)))),(0,e.createElement)("div",{className:"kadence-controls-content-border"},"individual"!==N&&(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(Qn,{label:w.link,swatchLabel:n||"",value:o&&o[0]?o[0]:"",default:r||"",onChange:e=>a([e,e,e,e]),swatchLabel2:l||"",value2:i&&i[0]?i[0]:"",default2:c||"",onChange2:s?e=>s([e,e,e,e]):void 0,swatchLabel3:d||"",value3:u&&u[0]?u[0]:"",default3:h||"",onChange3:p?e=>p([e,e,e,e]):void 0})),"individual"===N&&(0,e.createElement)("div",{className:"kt-border-color-array-control"},(0,e.createElement)(Qn,{label:b,swatchLabel:n||"",value:o&&o[0]?o[0]:"",default:r||"",onChange:e=>a([e,o[1],o[2],o[3]]),swatchLabel2:l||"",value2:i&&i[0]?i[0]:"",default2:c||"",onChange2:s?e=>s([e,i[1],i[2],i[3]]):void 0,value3:u&&u[0]?u[0]:"",swatchLabel3:d||"",default3:h||"",onChange3:p?e=>p([e,u[1],u[2],u[3]]):void 0}),(0,e.createElement)(Qn,{label:g,value:o&&o[1]?o[1]:"",swatchLabel:n||"",default:r||"",onChange:e=>a([o[0],e,o[2],o[3]]),swatchLabel2:l||"",value2:i&&i[1]?i[1]:"",default2:c||"",onChange2:s?e=>s([i[0],e,i[2],i[3]]):void 0,value3:u&&u[1]?u[1]:"",swatchLabel3:d||"",default3:h||"",onChange3:p?e=>p([u[0],e,u[2],u[3]]):void 0}),(0,e.createElement)(Qn,{label:v,value:o&&o[2]?o[2]:"",swatchLabel:n||"",default:r||"",onChange:e=>a([o[0],o[1],e,o[3]]),value2:i&&i[2]?i[2]:"",swatchLabel2:l||"",default2:c||"",onChange2:s?e=>s([i[0],i[1],e,i[3]]):void 0,value3:u&&u[2]?u[2]:"",swatchLabel3:d||"",default3:h||"",onChange3:p?e=>p([u[0],u[1],e,u[3]]):void 0}),(0,e.createElement)(Qn,{label:k,value:o&&o[3]?o[3]:"",swatchLabel:n||"",default:r||"",onChange:e=>a([o[0],o[1],o[2],e]),value2:i&&i[3]?i[3]:"",swatchLabel2:l||"",default2:c||"",onChange2:s?e=>s([i[0],i[1],i[2],e]):void 0,value3:u&&u[3]?u[3]:"",swatchLabel3:d||"",default3:h||"",onChange3:p?e=>p([u[0],u[1],u[2],e]):void 0}))))}const mp=({label:t,enable:n=!0,color:o,colorDefault:a,opacity:r,blur:i,spread:l,hOffset:s,vOffset:c,inset:u,onColorChange:d,onOpacityChange:p,onBlurChange:h,onHOffsetChange:m,onVOffsetChange:f,onEnableChange:b,onSpreadChange:g,onInsetChange:v,shadowType:k,onArrayChange:y})=>(0,e.createElement)("div",{className:"kb-shadow-container components-base-control"},t&&(0,e.createElement)("div",{className:"kt-box-shadow-label"},(0,e.createElement)("h2",{className:"kt-beside-color-label"},t)),(0,e.createElement)("div",{className:"kt-inner-sub-section"},(0,e.createElement)("div",{className:"kt-inner-sub-section-row"},(0,e.createElement)("div",{className:"kt-box-color-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("Color","kadence-blocks")),(0,e.createElement)(Qn,{value:o||a,default:a,onChange:e=>d(e),opacityValue:r,onOpacityChange:e=>p(e),onArrayChange:y?(e,t)=>y(e,t):void 0})),(0,e.createElement)("div",{className:"kt-box-x-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},"X"),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==s?s:"",onChange:e=>m(Number(e.target.value)),min:-200,max:200,step:1,type:"number",className:"components-text-control__input"})))),(0,e.createElement)("div",{className:"kt-box-y-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},"Y"),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==c?c:"",onChange:e=>f(Number(e.target.value)),min:-200,max:200,step:1,type:"number",className:"components-text-control__input"})))),(0,e.createElement)("div",{className:"kt-box-blur-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},"Blur"),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==i?i:"",onChange:e=>h(Number(e.target.value)),min:0,max:200,step:1,type:"number",className:"components-text-control__input"})))),"box"===k&&(0,e.createElement)("div",{className:"kt-box-spread-settings kt-box-shadow-subset"},(0,e.createElement)("p",{className:"kt-box-shadow-title"},(0,Jn.__)("Spread")),(0,e.createElement)("div",{className:"components-base-control kt-boxshadow-number-input"},(0,e.createElement)("div",{className:"components-base-control__field"},(0,e.createElement)("input",{value:void 0!==l?l:"",onChange:e=>g(Number(e.target.value)),min:-200,max:200,step:1,type:"number",className:"components-text-control__input"}))))),"box"===k&&v&&(0,e.createElement)("div",{className:"kt-box-inset-settings"},(0,e.createElement)(jn.ToggleControl,{label:(0,Jn.__)("Inset"),checked:u,onChange:e=>v(e)}))));function fp({label:t,enable:n=!0,color:o,colorDefault:a,opacity:r,blur:i,spread:l,inset:s,hOffset:c,vOffset:u,onColorChange:d,onOpacityChange:p,onBlurChange:h,onHOffsetChange:m,onVOffsetChange:f,onEnableChange:b,onSpreadChange:g,onInsetChange:v,className:k="",shadowType:y,onArrayChange:E,reset:x=!0}){const[_,w]=(0,zn.useState)("Desktop"),C=(0,Kn.useSelect)((e=>e("kadenceblocks/data").getPreviewDeviceType()),[]);C!==_&&w(C);const{setPreviewDeviceType:S}=(0,Kn.useDispatch)("kadenceblocks/data"),N=[{name:"Desktop",key:"desktop",title:(0,e.createElement)(jn.Dashicon,{icon:"desktop"}),itemClass:"kb-desk-tab"},{name:"Tablet",key:"tablet",title:(0,e.createElement)(jn.Dashicon,{icon:"tablet"}),itemClass:"kb-tablet-tab"},{name:"Mobile",key:"mobile",title:(0,e.createElement)(jn.Dashicon,{icon:"smartphone"}),itemClass:"kb-mobile-tab"}],O={};return O.Mobile=(0,e.createElement)(mp,{key:"mobile-text-shadow-control",label:(0,Jn.__)("Shadow","kadence-blocks"),enable:n,color:o,colorDefault:a,opacity:r,hOffset:c,vOffset:u,blur:i,spread:l,onEnableChange:b,onColorChange:d,onOpacityChange:p,onHOffsetChange:m,onVOffsetChange:f,onBlurChange:h,onSpreadChange:g,shadowType:y,inset:s,onInsetChange:v,onArrayChange:E}),O.Tablet=(0,e.createElement)(mp,{key:"tablet-text-shadow-control",label:(0,Jn.__)("Shadow","kadence-blocks"),enable:n,color:o,colorDefault:a,opacity:r,hOffset:c,vOffset:u,blur:i,spread:l,onEnableChange:b,onColorChange:d,onOpacityChange:p,onHOffsetChange:m,onVOffsetChange:f,onBlurChange:h,onSpreadChange:g,shadowType:y,inset:s,onInsetChange:v,onArrayChange:E}),O.Desktop=(0,e.createElement)(mp,{key:"desktop-text-shadow-control",label:(0,Jn.__)("Shadow","kadence-blocks"),enable:n,color:o,opacity:r,colorDefault:a,hOffset:c,vOffset:u,blur:i,spread:l,onEnableChange:b,onColorChange:d,onOpacityChange:p,onHOffsetChange:m,onVOffsetChange:f,onBlurChange:h,onSpreadChange:g,shadowType:y,inset:s,onInsetChange:v,onArrayChange:E}),[b&&(0,e.createElement)("div",{className:"components-base-control kb-responsive-range-control"+(""!==k?" "+k:"")},(0,e.createElement)("div",{className:"kadence-title-bar"},t&&(0,e.createElement)("span",{className:"kadence-control-title"},t,x&&(0,e.createElement)(jn.Button,{className:"is-reset is-single",isSmall:!0,disabled:!1===n,icon:Yl,onClick:()=>{"function"==typeof x?x():b("reset")}})),(0,e.createElement)(jn.ButtonGroup,{className:"kb-measure-responsive-options","aria-label":(0,Jn.__)("Device","kadence-blocks")},(0,qn.map)(N,(({name:t,key:n,title:o,itemClass:a})=>(0,e.createElement)(jn.Button,{key:n,className:`kb-responsive-btn ${a}${t===_?" is-active":""}`,isSmall:!0,"aria-pressed":_===t,onClick:()=>{return e=t,S((0,$n.capitalizeFirstLetter)(e)),void w((0,$n.capitalizeFirstLetter)(e));var e}},o))))),O[_]?O[_]:O.Desktop)]}const bp=window.wp.notices;function gp({attributes:t,defaultAttributes:n={},blockSlug:o,excludedAttrs:a=[],preventMultiple:r=[]}){const[i,l]=(0,zn.useState)(kadence_blocks_params.userrole?kadence_blocks_params.userrole:"admin");if("admin"!==i)return null;const{createErrorNotice:s,createSuccessNotice:c}=(0,Kn.useDispatch)(bp.store),[u,d]=(0,zn.useState)(!1),[p,h]=(0,zn.useState)(!1),[m,f]=(0,zn.useState)(!1),b=(0,$n.SafeParseJSON)((0,qn.get)(kadence_blocks_params,["configuration"],{}),!0),g=(0,qn.get)(b,o,{}),[v,k]=(0,zn.useState)(g),y=0!==Object.keys(g).length;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(ds,{title:(0,Jn.__)("Block Defaults","kadence-blocks"),initialOpen:!1,panelName:`kb-${o}-defaults`},(0,Jn.__)("This will set the current block attributes as the default styles for this block type.","kadence-blocks")," ",(0,Jn.__)("This will not modify any blocks that have already been created.","kadence-blocks")," ",(0,Jn.__)("Block content is not included.","kadence-blocks")," ",(0,e.createElement)("br",null),(0,e.createElement)("br",null),(0,e.createElement)(jn.Button,{isPrimary:!0,onClick:()=>h(!0)},(0,Jn.__)(" Save as default","kadence-blocks")),y&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("br",null),(0,e.createElement)("br",null),(0,e.createElement)("a",{href:"#",onClick:()=>f(!0)},(0,Jn.__)("Modify attributes","kadence-blocks")),(0,e.createElement)("a",{href:"#",style:{color:"red",float:"right"},onClick:()=>d(!0)},(0,Jn.__)("Reset defaults","kadence-blocks")))),(0,e.createElement)(jn.__experimentalConfirmDialog,{isOpen:u,onConfirm:()=>(()=>{let e=kadence_blocks_params.configuration?(0,$n.SafeParseJSON)(kadence_blocks_params.configuration,!0):{};e=(0,qn.omit)(e,o),gs()({path:"/wp/v2/settings",method:"POST",data:{kadence_blocks_config_blocks:JSON.stringify(e)}}).then((()=>{c((0,Jn.__)("Block default saved","kadence-blocks"),{type:"snackbar"}),d(!1),kadence_blocks_params.configuration=JSON.stringify(e),k({})}))})(),onCancel:()=>d(!1)},(0,Jn.__)("Are you sure you'd like to reset this blocks default attributes?","kadence-blocks")),(0,e.createElement)(jn.__experimentalConfirmDialog,{isOpen:p,onConfirm:()=>(()=>{const e=(0,$n.getTransferableAttributes)(t,n,a,r),i=kadence_blocks_params.configuration?(0,$n.SafeParseJSON)(kadence_blocks_params.configuration,!0):{};i[o]=e,gs()({path:"/wp/v2/settings",method:"POST",data:{kadence_blocks_config_blocks:JSON.stringify(i)}}).then((()=>{c((0,Jn.__)("Block default saved","kadence-blocks"),{type:"snackbar"}),h(!1),kadence_blocks_params.configuration=JSON.stringify(i),k(e)}))})(),onCancel:()=>h(!1)},(0,Jn.__)("Are you sure you'd like to save this as the blocks default attributes?","kadence-blocks")),m?(0,e.createElement)(jn.Modal,{className:"kt-block-defaults-modal",title:(0,Jn.__)("Modify Block Defaults","kadence-blocks"),onRequestClose:()=>{k(g),f(!1)}},Object.keys(v).map(((t,n)=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{key:n,style:{marginBottom:"10px"}},(0,e.createElement)(jn.Button,{onClick:()=>k((0,qn.omit)(v,t))},(0,e.createElement)("span",{className:"dashicons dashicons-trash"})),(0,e.createElement)("span",{style:{verticalAlign:"super"}},t))))),(0,e.createElement)("div",{className:"kb-modal-footer"},(0,e.createElement)(jn.Button,{className:"kt-defaults-save",isDestructive:!0,disabled:!1,onClick:()=>{k(g),f(!1)}},(0,Jn.__)("Cancel","kadence-blocks")),(0,e.createElement)(jn.Button,{className:"kt-defaults-save",isPrimary:!0,onClick:()=>{(()=>{const e=kadence_blocks_params.configuration?(0,$n.SafeParseJSON)(kadence_blocks_params.configuration,!0):{};e[o]=v,gs()({path:"/wp/v2/settings",method:"POST",data:{kadence_blocks_config_blocks:JSON.stringify(e)}}).then((()=>{c((0,Jn.__)("Block default saved","kadence-blocks"),{type:"snackbar"}),kadence_blocks_params.configuration=JSON.stringify(e)}))})(),f(!1)}},(0,Jn.__)("Save","kadence-blocks")))):null)}function vp({isOpen:t,setIsOpen:n,callback:o}){const[a,r]=(0,zn.useState)("upload"),[i,l]=(0,zn.useState)(""),[s,c]=(0,zn.useState)(""),[u,d]=(0,zn.useState)(null),[p,h]=(0,zn.useState)(""),{createSuccessNotice:m}=(0,Kn.useDispatch)(bp.store);return(0,e.createElement)(e.Fragment,null,t&&(0,e.createElement)(jn.Modal,{title:(0,Jn.__)("Add an SVG"),className:"upload-svg-modal",size:"medium",onRequestClose:()=>n(!1)},(0,e.createElement)("div",{className:"modal-body"},(0,e.createElement)("div",{className:"security-notice"},(0,e.createElement)("h4",null,(0,Jn.__)("Important: SVG Safety","kadence-blocks")),(0,e.createElement)("p",null,(0,Jn.__)("SVGs can contain malicious code. For your security, we suggest sanitizing your files before uploading.","kadence-blocks")," ",(0,e.createElement)("a",{href:"https://www.kadencewp.com/help-center/?post_type=docs&p=8510"},(0,Jn.__)("Learn more about SVG security and supported SVG formatting.","kadence-blocks")))),""!==s&&(0,e.createElement)("div",{className:"error-message"},s),"upload"===a&&(0,e.createElement)("div",{className:"drag-drop-container"},(0,e.createElement)(jn.TextControl,{placeholder:(0,Jn.__)("Title your SVG","kadence-blocks"),value:p,onChange:e=>h(e)}),(0,e.createElement)(jn.FormFileUpload,{accept:"image/svg+xml",onChange:e=>{d(e.currentTarget.files),""===p&&h((0,qn.get)(e.currentTarget.files,["0","name"],"").replace(".svg",""))},render:({openFileDialog:t})=>(0,e.createElement)("div",{onClick:t,className:"drag-drop-target",style:{position:"relative"}},(0,e.createElement)(jn.DropZone,{label:(0,Jn.__)("Upload SVG","kadence-blocks"),onFilesDrop:e=>{d(e),""===p&&h((0,qn.get)(e,["0","name"],"").replace(".svg",""))}}),null===u||0===u.length?(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,Jn.__)("Select a file or drop it here","kadence-blocks")),(0,e.createElement)("p",null,(0,Jn.__)("SVG dimensions: 24px by 24px","kadence-blocks"))):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("h3",null,(0,Jn.__)("File Selected","kadence-blocks")),(0,e.createElement)("p",null,(0,qn.get)(u,["0","name"],""))),(0,e.createElement)(jn.Button,{isPrimary:!0},null===u?(0,Jn.__)("Select a file","kadence-blocks"):(0,Jn.__)("Change file","kadence-blocks")))}),(0,e.createElement)(jn.Button,{type:"link",onClick:()=>{r("paste"),d(null)}},(0,Jn.__)("Paste an SVG","kadence-blocks"))),"paste"===a&&(0,e.createElement)("div",{className:"paste-container"},(0,e.createElement)("h3",null,(0,Jn.__)("Paste your SVG","kadence-blocks")),(0,e.createElement)(jn.TextControl,{placeholder:(0,Jn.__)("Title your SVG","kadence-blocks"),value:p,onChange:e=>h(e)}),(0,e.createElement)(jn.TextareaControl,{value:i,onChange:e=>l(e)}),(0,e.createElement)(jn.Button,{type:"link",onClick:()=>{r("upload"),l("")}},(0,Jn.__)("Upload an SVG","kadence-blocks")))),(0,e.createElement)("div",{className:"footer"},(0,e.createElement)(jn.Button,{isSecondary:!0,onClick:()=>n(!1)},(0,Jn.__)("Cancel","kadence-blocks")),(0,e.createElement)(jn.Button,{isPrimary:!0,onClick:()=>{!function(){const e=new FileReader;let t;if("upload"==(null!==u?"upload":"paste")){if(!u||0===u.length)return void c((0,Jn.__)("No file selected","kadence-blocks"));if(t=u[0],"image/svg+xml"!==t.type)return void c((0,Jn.__)("The selected file is not an SVG","kadence-blocks"))}else{if(!i.trim())return void c((0,Jn.__)("No SVG content pasted","kadence-blocks"));t=new Blob([i],{type:"image/svg+xml"})}e.onload=function(e){const t=e.target.result;""!==t&&gs()({path:"/kb-custom-svg/v1/manage",data:{file:t,title:p},method:"POST"}).then((e=>{(0,qn.has)(e,"value")&&(0,qn.has)(e,"label")?(m((0,Jn.__)("SVG Saved.","kadence-blocks"),{type:"snackbar"}),o(e.value),n(!1)):(0,qn.has)(e,"error")&&(0,qn.has)(e,"message")?c(e.message):c((0,Jn.__)("An error occurred when uploading your file","kadence-blocks"))}))},e.readAsText(t)}()}},(0,Jn.__)("Add","kadence-blocks")))))}function kp({isOpen:t,setIsOpen:n,id:o,callback:a}){const{createSuccessNotice:r,createErrorNotice:i}=(0,Kn.useDispatch)(bp.store),l=()=>{i((0,Jn.__)("There was an error deleting the SVG.","kadence-blocks"),{type:"snackbar"})};return(0,e.createElement)(e.Fragment,null,t&&null!==o&&(0,e.createElement)(jn.Modal,{title:(0,Jn.__)("Delete SVG"),onRequestClose:()=>n(!1)},(0,e.createElement)(jn.Button,{isSecondary:!0,onClick:()=>n(!1)},(0,Jn.__)("Cancel","kadence-blocks")),(0,e.createElement)(jn.Button,{isDestructive:!0,onClick:()=>{(e=>{gs()({path:`/wp/v2/kadence_custom_svg/${e}`,method:"DELETE"}).then((e=>{(0,qn.get)(e,"id",!1)?(r((0,Jn.__)("SVG Deleted.","kadence-blocks"),{type:"snackbar"}),a()):(0,qn.has)(e,"error")&&(0,qn.has)(e,"message")?(console.log(e.message),l()):(console.log("An error occurred when delete your svg"),l())})).catch((e=>{console.log(e),l()}))})(o),n(!1)}},(0,Jn.__)("Delete","kadence-blocks"))))}function yp({value:t,onChange:n,label:o,placeholder:a=(0,Jn.__)("Select Icon","kadence-blocks"),showSearch:r=!0,renderFunc:i=null,className:l,theme:s="default",allowClear:c=!1,icons:u=null}){const[d,p]=(0,zn.useState)(),[h,m]=(0,zn.useState)(!1),[f,b]=(0,zn.useState)(""),[g,v]=(0,zn.useState)("all"),[k,y]=(0,zn.useState)(!1),[E,x]=(0,zn.useState)(!1),[_,w]=(0,zn.useState)(null),[C,S]=(0,zn.useState)(!1),[N,O]=(0,zn.useState)([]),[T,M]=(0,zn.useState)(!1),A=!(!kadence_blocks_params.pro||"true"!==kadence_blocks_params.pro),D=window?.kbpData?(0,qn.get)(window.kbpData,["pVersion"],"1.0.0"):"1.0.0",R=(0,$n.compareVersions)(D,"2.4.0")>=0,I=(0,qn.debounce)((()=>{m(!h)}),100),P=async(e=!1)=>{if(e||A&&R&&!1===C&&!T){try{M(!0);const t=await Ep(e);if(t.length>0){const e=t.map((e=>e.id.toString())),n={};t.forEach((e=>{n[e.id.toString()]=e.title.rendered.toLowerCase()})),!(0,qn.isEqual)(e,C)&&e.length>0&&(S(e),O(n))}else S([])}catch(e){S([]),console.error("Failed to fetch custom SVGs (picker):",e)}M(!1)}};(0,zn.useEffect)((()=>{P()}));const F=(0,Jn.__)("My Icons","kadence-blocks"),L=(0,zn.useMemo)((()=>{if(u){const e=u.map((e=>({value:e,label:e})));return C.length>0?{[F]:C,...e}:A&&R?{[F]:["placeholder"],...e}:e}const e=(0,Gs.applyFilters)("kadence.icon_options_names",kadence_blocks_params.icon_names);return C.length>0?{[F]:C,...e}:A&&R?{[F]:["placeholder"],...e}:e}),[kadence_blocks_params.icon_names,u,C]),B=(0,zn.useMemo)((()=>(0,Gs.applyFilters)("kadence.icon_options",{...kadence_blocks_params_ico.icons,...kadence_blocks_params_fa.icons})),[kadence_blocks_params_ico.icons,kadence_blocks_params_fa.icons,C]),V=(0,zn.useMemo)((()=>{let e=Object.keys(L).map(((e,t)=>({value:t,label:e})));return[{value:"all",label:(0,Jn.__)("Show All","kadence-blocks")},...e]}),[kadence_blocks_params.icon_names,L]),z=(0,zn.useCallback)((t=>t.startsWith("kb-custom")?(0,e.createElement)(Jd,{className:`kt-svg-icon-single-${t}`,name:t}):(0,e.createElement)(qd,{className:`kt-svg-icon-single-${t}`,name:t,icon:B[t]})),[B]),j=i||z,H=(0,zn.useMemo)((()=>{let e={};if(!u){const t=f.toLowerCase();Object.keys(L).map(((n,o)=>{"all"!==g&&o!==parseInt(g)||L[n].map(((a,r)=>{const i=a.toLowerCase();if(""===f||i.includes(t)||0===o&&(0,qn.has)(N,i.toString())&&N[i.toString()].includes(t))return e={...e,[o]:{label:n,icons:{...e[o]?.icons,[a]:B[a]}}},a}))}))}return e}),[f,g,L]);return(0,e.createElement)("div",{className:"kadence-icon-picker"},(0,e.createElement)(vp,{isOpen:k,setIsOpen:y,callback:e=>{n("kb-custom-"+e.toString()),P(!0)}}),(0,e.createElement)(kp,{isOpen:E,setIsOpen:x,id:_,callback:()=>{P(!0),w(null)}}),(0,e.createElement)("div",{className:`kadence-icon-picker-selection kadence-icon-picker-theme-${s||"default"}${l?" "+l:""}`},o&&(0,e.createElement)("div",{className:"kadence-icon-picker__title"},(0,e.createElement)("label",{className:"components-base-control__label"},o)),(0,e.createElement)("div",{className:"kadence-icon-picker-toggle-wrap"},(0,e.createElement)("button",{onClick:()=>I(),ref:p,className:"kadence-icon-picker-link kadence-icon-picker-selection-toggle"},(0,e.createElement)("span",{className:"kadence-icon-picker-selection-value"+(t?"":" kadence-icon-picker-placeholder")},t?j(t):a),(0,e.createElement)("span",{className:"kadence-icon-picker-selection-arrow"},(0,e.createElement)(jn.Icon,{icon:Fd}))),t&&c&&(0,e.createElement)("button",{className:"kadence-icon-picker-clear",onClick:()=>{n(""),m(!1)}},(0,e.createElement)(jn.Icon,{icon:Ti})))),h&&(0,e.createElement)(jn.Popover,{headerTitle:(0,Jn.__)("Select Icon","kadence-blocks"),noArrow:!1,onClose:I,placement:"bottom-end",anchor:d,className:`kadence-icon-picker-pop-selection kadence-icon-picker-pop-theme-${s||"default"}`},(0,e.createElement)("div",{className:"kadence-icon-picker-container"},r&&(0,e.createElement)("div",{className:"kadence-icon-picker-search"},(0,e.createElement)(jn.TextControl,{label:(0,Jn.__)("Search Icons","kadence-blocks"),hideLabelFromVision:!0,value:f,placeholder:(0,Jn.__)("Search Icons","kadence-blocks"),onChange:e=>b(e)}),(0,e.createElement)(jn.SelectControl,{label:(0,Jn.__)("Filter Icons","kadence-blocks"),hideLabelFromVision:!0,value:g,options:V,onChange:v})),(0,e.createElement)("div",{className:"kadence-icon-picker-content"+(r?" has-search":"")},u&&(0,e.createElement)("div",{className:"kadence-icon-grid-wrap"},u.map((t=>(0,e.createElement)("button",{className:"kadence-icon-picker-link",onClick:()=>{n(t),I()}},j(t))))),!u&&(0,e.createElement)(e.Fragment,null,0===Object.keys(H).length&&(0,e.createElement)("div",{style:{padding:"15px"}},(0,e.createElement)("p",null,(0,Jn.__)("No icons found","kadence-blocks"))),Object.keys(H).map((t=>(0,e.createElement)(jn.PanelBody,{title:H[t].label,key:t},(0,e.createElement)("div",{className:"kadence-icon-grid-wrap"},H[t].label===F&&""===f&&R&&A&&(0,e.createElement)("button",{className:"kadence-icon-picker-link add-custom-svg",onClick:()=>{y(!0),I()}},(0,e.createElement)(jn.Icon,{icon:il})),Object.keys(H[t].icons).map((o=>{if(H[t].label===F){if("placeholder"===o)return;return(0,e.createElement)("div",{className:"kb-custom-svg"},A&&R&&(0,e.createElement)("div",{className:"custom-svg-delete",onClick:()=>{w(o),x(!0)}},(0,e.createElement)(jn.Icon,{icon:Ti,size:20})),(0,e.createElement)("button",{className:"kadence-icon-picker-link",key:H[t].label+o,onClick:()=>{n("kb-custom-"+o),I()}},j("kb-custom-"+o)))}return(0,e.createElement)("button",{className:"kadence-icon-picker-link",key:H[t].label+o,onClick:()=>{n(o),I()}},j(o))})))))))))))}const Ep=async(e=!1)=>{const t={per_page:100};e&&(t.cache_bust=(new Date).getTime());const n=new URLSearchParams(t),o=await fetch(kadence_blocks_params.rest_url+`wp/v2/kadence_custom_svg?${n.toString()}`,{method:"GET"});if(!o.ok)throw new Error("Network response was not ok");return o.json()};function xp({label:t,value:n,onChange:o,source:a,contextPost:r=null,className:i=null,termIsMulti:l=!1,taxOnly:s=!1,termIsOptional:c=!1}){const u=`inspector-taxonomy-select-control-${(0,qr.useInstanceId)(xp)}`,[d,p]=(0,zn.useState)(!0),[h,m]=(0,zn.useState)([]);let f="";f=s||c&&"string"==typeof n?n:(0,qn.isArrayLike)(n)&&(0,qn.has)(n,[0,"value"])&&!(0,qn.isEmpty)(n)?n[0].value.split("|"):n&&!(0,qn.isEmpty)(n)?n.split("|"):[""];const[b,g]=(0,zn.useState)("object"==typeof f?f[0]:f);return(0,zn.useEffect)((()=>{let e=a||r;if(wp.data.select("core/editor")&&!e)if(kadence_blocks_params.isKadenceE&&kadenceElementParams.previewPostID){const t=(0,$n.tryParseJSON)(kadenceElementParams.previewPostID);e=t&&t.id?t.id:""}else e=wp.data.select("core/editor").getCurrentPostId();const t={source:e};p(!0),gs()({path:(0,Hr.addQueryArgs)(window.kadence_blocks_params.taxonomiesEndpoint,t)}).then((e=>{m(e||[]),p(!1)})).catch((()=>{p(!1),m([])}))}),[a]),d?(0,e.createElement)(jn.Spinner,null):(0,e.createElement)("div",{className:"components-base-control kb-taxonomy-select-control"+(i?" "+i:"")},t&&(0,e.createElement)("label",{htmlFor:u,className:"components-taxonomy-select-control__label kb-dynamic-components-label"},t),(0,e.createElement)(jr,{options:h,id:u,className:"kb-dynamic-select",classNamePrefix:"kbp",value:""!==b?h.filter((({value:e})=>e===b)):"",isMulti:!1,isSearchable:!0,isClearable:!0,menuPortalTarget:document.body,styles:{menuPortal:e=>({...e,zIndex:99999999})},maxMenuHeight:200,placeholder:(0,Jn.__)("Select Taxonomy","kadence-blocks"),onChange:e=>{s||c?e?(g(e.value),o(e.value)):(g(""),o("")):g(e?e.value:"")}}),""!==b&&!s&&(0,e.createElement)(vs,{source:b,value:n,isMulti:l,onChange:e=>{e&&!(0,qn.isEmpty)(e)?o(e):o(c&&b?b:"")}}))}function _p({clientId:t,label:n=null,parentSlug:o=null}){const{selectBlock:a}=(0,Kn.useDispatch)(Xn.store),{firstParentClientId:r}=(0,Kn.useSelect)((e=>{const{getBlockParents:n,getBlockParentsByBlockName:a}=e(Xn.store);let r,i;return i=null!==o?a(t,o):n(t),r=i[i.length-1],{firstParentClientId:r}}),[]);if(void 0===r)return null;const i=(0,Xn.useBlockDisplayInformation)(r);return(0,e.createElement)("div",{className:"kadence-blocks-block-parent-selector",key:r},(0,e.createElement)(jn.Button,{className:"kadence-blocks-block-parent-selector__button",onClick:()=>a(r),icon:(0,e.createElement)(Xn.BlockIcon,{icon:i?.icon})},n||(0,Jn.__)("View Parent Block Settings","kadence-blocks")))}function Cp({clientId:t,label:n=null,childSlug:o=null}){const{selectBlock:a}=(0,Kn.useDispatch)(Xn.store),{childClientId:r}=(0,Kn.useSelect)((e=>{const{getBlocksByClientId:n,getBlock:a}=e(Xn.store),r=(e,t)=>{const n=a(e);if(!n)return null;for(const e of n.innerBlocks){if(e.name===t)return e.clientId;const n=r(e.clientId,t);if(n)return n}return null};let i;if(null!==o)i=r(t,o);else{const e=n(t)[0]?.innerBlocks[0]||null;i=e?.clientId}return{childClientId:i}}),[t,o]);if(void 0===r)return null;const i=(0,Xn.useBlockDisplayInformation)(r);return(0,e.createElement)("div",{className:"kadence-blocks-block-child-selector",key:r},(0,e.createElement)(jn.Button,{className:"kadence-blocks-block-child-selector__button",onClick:()=>a(r),icon:(0,e.createElement)(Xn.BlockIcon,{icon:i?.icon})},n||(0,Jn.__)("View Child Block Settings","kadence-blocks")))}function Sp({label:t,onChange:n,isSaving:o,value:a="",placeholder:r=null,className:i="",obfuscate:l=!0,help:s=""}){const[c,u]=(0,zn.useState)(""),d=`inspector-obfuscate-text-control-${(0,qr.useInstanceId)(Sp)}`;return[n&&(0,e.createElement)("div",{className:"components-base-control kadence-obfuscate-text-control"+(i?" "+i:"")},t&&(0,e.createElement)("label",{htmlFor:d,className:"components-background-obfuscate-text-control__label"},t),(0,e.createElement)("div",{className:"kadence-obfuscate-text-control-inner"},!a&&(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(jn.TextControl,{id:d,value:c,placeholder:r,onChange:e=>u(e)}),(0,e.createElement)(jn.Button,{isPrimary:!0,isSmall:!0,className:"kb-obfuscate-save",onClick:()=>n(c),disabled:""===c},(0,Jn.__)("Save","kadence-blocks"),o?(0,e.createElement)(jn.Spinner,null):"")),a&&l&&(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(jn.TextControl,{id:d,value:"***************************",readOnly:!0}),(0,e.createElement)(jn.Button,{isSecondary:!0,isSmall:!0,className:"kb-obfuscate-save",onClick:()=>n("")},(0,Jn.__)("Remove","kadence-blocks"),o?(0,e.createElement)(jn.Spinner,null):"")),a&&!l&&(0,e.createElement)(zn.Fragment,null,(0,e.createElement)(jn.TextControl,{id:d,value:a,readOnly:!0}),(0,e.createElement)(jn.Button,{isSecondary:!0,isSmall:!0,className:"kb-obfuscate-save",onClick:()=>n("")},(0,Jn.__)("Clear","kadence-blocks"),o?(0,e.createElement)(jn.Spinner,null):""))))]}function Np({postType:t="posts",title:n="",onSelect:o,initialOpen:a=!0,useForceState:r=!1,forceOpen:i=!1,onPanelBodyToggle:l}){const s=""===n?(0,Jn.__)("Posts","kadence-blocks"):n,[c,u]=(0,zn.useState)([]),[d,p]=(0,zn.useState)(!0),[h,m]=(0,zn.useState)(!1),[f,b]=(0,zn.useState)(1),[g,v]=(0,zn.useState)([]),[k,y]=(0,zn.useState)([]),[E,x]=(0,zn.useState)(!1),[_,w]=(0,zn.useState)(""),[C,S]=(0,zn.useState)("recent"),N=(0,zn.useRef)(null),O=(0,zn.useRef)(null);function T(e){return"post"===e?"posts":"page"===e?"pages":e}(0,zn.useEffect)((()=>{M()}),[C,f]),(0,zn.useEffect)((()=>{const e=()=>{const e=N.current;e.scrollTop+e.clientHeight+25>=e.scrollHeight&&"search"!==C&&(d||h||!E||(b(f+1),m(!0)))},t=N.current;return t&&t.addEventListener("scroll",e),()=>{t&&t.removeEventListener("scroll",e)}}),[d,h]);const M=(e="standard",n="")=>{h||p(!0);const o={per_page:30,page:f};"search"===e?o.search=n:"categories"!==t&&"product_cat"!==t&&(o.orderby="all"===C?"title":"date",o.order="all"===C?"asc":"desc"),gs()({path:(0,Hr.addQueryArgs)(`/wp/v2/${T(t)}`,o),parse:!1}).then((t=>{t.json().then((n=>{h?v((e=>[...e,...n])):"search"===e?y(n):v(n),p(!1),m(!1);const o=t.headers.get("X-WP-TotalPages");x(o>f)}))})).catch((()=>{h||(v([]),y([])),p(!1),m(!1)}))},A=()=>{c.length===g.length?u([]):u(g)},D=(0,zn.useMemo)((()=>(0,qn.debounce)((e=>{M("search",e)}),300)),[]),R=(0,zn.useCallback)((e=>{w(e),D(e)}),[D]),I=(n=null)=>{const o=n||g;return(0,e.createElement)("div",null,(0,e.createElement)("div",{ref:N,className:"posts-container"},o.map((n=>(0,e.createElement)("div",{key:n.id},(0,e.createElement)(jn.CheckboxControl,{label:(0,Cd.decodeEntities)("categories"===t||"product_cat"===t?n?.name:n?.title?.rendered),checked:c.some((e=>e.id===n.id)),onChange:()=>(e=>{u((t=>t.some((t=>t.id===e.id))?t.filter((t=>t.id!==e.id)):[...t,e]))})(n)})))),h&&(0,e.createElement)("div",null,(0,e.createElement)(jn.Spinner,null))),(0,e.createElement)("div",{style:{marginTop:"10px"}},(0,e.createElement)(jn.CheckboxControl,{label:(0,Jn.__)("Select All","kadence-blocks"),checked:c.length===g.length,indeterminate:c.length>0&&c.length<g.length,onChange:A})))},P={};return r?P.opened=i:P.initialOpen=a,l&&(P.onToggle=l),(0,e.createElement)(jn.PanelBody,{className:"kb-post-selector-checkbox",title:s,...P},(0,e.createElement)(jn.TabPanel,{className:"tab-panel",activeClass:"active-tab",onSelect:e=>{C!==e&&(S(e),w(""),u([]),b(1))},tabs:[{name:"recent",title:(0,Jn.__)("Recent","kadence-blocks"),className:"tab-one"},{name:"all",title:(0,Jn.__)("All","kadence-blocks"),className:"all-tab"},{name:"search",title:(0,Jn.__)("Search","kadence-blocks"),className:"search-tab"}]},(t=>(0,e.createElement)("div",{className:"tab-content-container"},(0,e.createElement)("div",{className:"tab-content"},"recent"===t.name||"all"===t.name?(0,e.createElement)(e.Fragment,null,d?(0,e.createElement)(jn.Spinner,null):I()):(0,e.createElement)("div",{className:"search-container"},(0,e.createElement)(jn.TextControl,{ref:O,value:_,onChange:e=>R(e),placeholder:(0,Jn.__)("Search posts...","kadence-blocks")}),(0,e.createElement)(e.Fragment,null,d?(0,e.createElement)(jn.Spinner,null):I(k))))))),(0,e.createElement)(jn.Button,{isPrimary:!0,onClick:()=>{o(c),u([])}},(0,Jn.__)("Add to Menu","kadence-blocks")))}(0,Jn.__)("None","kadence-blocks"),(0,Jn.__)("None","kadence-blocks"),(0,Jn.__)("XXS","kadence-blocks"),(0,Jn.__)("2X Small","kadence-blocks"),(0,Jn.__)("XS","kadence-blocks"),(0,Jn.__)("X Small","kadence-blocks"),(0,Jn.__)("SM","kadence-blocks"),(0,Jn.__)("Small","kadence-blocks"),(0,Jn.__)("MD","kadence-blocks"),(0,Jn.__)("Medium","kadence-blocks"),(0,Jn.__)("LG","kadence-blocks"),(0,Jn.__)("Large","kadence-blocks"),(0,Jn.__)("XL","kadence-blocks"),(0,Jn.__)("X Large","kadence-blocks"),(0,Jn.__)("XXL","kadence-blocks"),(0,Jn.__)("2X Large","kadence-blocks"),(0,Jn.__)("3XL","kadence-blocks"),(0,Jn.__)("3X Large","kadence-blocks"),(0,Jn.__)("4XL","kadence-blocks"),(0,Jn.__)("4X Large","kadence-blocks"),(0,Jn.__)("5XL","kadence-blocks"),(0,Jn.__)("5X Large","kadence-blocks");var Op=a(3456);function Tp(t){const{attributes:n,setAttributes:o,previewDevice:a,columns:r,columnWidths:i,columnGap:l,columnsUnlocked:s,onColumnsUnlocked:c,onResize:u,onResizeStop:d,onResizeTablet:p,onResizeStopTablet:h,onResizeMobile:m,onResizeStopMobile:f,active:b}=t,{uniqueID:g,columnGutter:v,customGutter:k,gutterType:y}=n,E=(0,$n.getPreviewSize)(a,i,i,i),x=(e,t,n)=>{const o=w(e,t,n);f&&"Mobile"==a?f(o):h&&"Tablet"==a?h(o):d(o)},_=(e,t,n)=>{const o=w(e,t,n);m&&"Mobile"==a?m(o):p&&"Tablet"==a?p(o):u(o)},w=(e,t,n)=>{let o,a,i;const l=n.style.width,c=parseInt(n.dataset?.column),u=E[c],d=c+1,p=E[d],h=0==c?0:E.slice(0,c).reduce(((e,t)=>e+t),0);s?(o=Math.round(10*parseFloat(l))/10-h,a=o-(u||10),i=Math.round(10*Math.abs((p||10)-a))/10):(o=5*Math.round(parseInt(l)/5)-h,a=o-(u||10),i=5*Math.round(Math.abs((p||10)-a)/5));var m=[...E];if(m[c]=o,m[d]=i,r>2){m=m.map((e=>s?Math.round(10*parseFloat(e))/10:5*Math.round(parseInt(e)/5)));const e=m.reduce(((e,t)=>e+t),0),t=100-e,n=c==r-2?0:m.length-1;m[n]=m[n]+t}return m},C=bi()({"kt-resizeable-column-container":!0,[`kt-resizeable-column-container${g}`]:g,"kt-resizeable-column-inactive":!b});return(0,e.createElement)("div",{className:C},(0,e.createElement)(Op.A,null,(({width:t})=>(0,e.createElement)(e.Fragment,null,(t=>{var n=[];for(let o=0;o<r-1;o++){const a=E?.[o],i=E?.[o+1],u=0==o?0:E.slice(0,o).reduce(((e,t)=>e+t),0),d=10,p="calc((((("+l+" * "+(r-1)+")) / "+r+") * "+-1*(o+1)+") + ( ("+l+" * "+o+") + ("+l+" / 2 ) ) )",h=(0,e.createElement)(jn.ResizableBox,{className:"editor-row-column__resizer",size:{width:u+a+"%"},style:{left:p},minWidth:u+d+"%",maxWidth:u+a+i-d+"%",enable:{right:!$n.isRTL,left:!!$n.isRTL},handleClasses:{right:"components-resizable-box__handle components-resizable-box__handle-right",left:"components-resizable-box__handle components-resizable-box__handle-left"},handleWrapperClass:"editor-row-controls-container",grid:s?[t/1e3,1]:[t/20,1],onResize:_,onResizeStop:x,axis:"x","data-column":o},(0,e.createElement)("span",{className:"editor-row-controls-container kadence-resize-extra-controls"},s&&(0,e.createElement)(jn.Tooltip,{text:(0,Jn.__)("Switch to 5% step resizing","kadence-blocks")},(0,e.createElement)(jn.Button,{className:"kt-fluid-grid-btn",isSmall:!0,onClick:()=>c(!1)},(0,e.createElement)("svg",{viewBox:"0 0 20 20",width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"1.414"},(0,e.createElement)("path",{d:"M4.217,10.611l0,2.7l-3.31,-3.311l3.31,-3.311l0,2.7l11.566,0l0,-2.7l3.31,3.311l-3.31,3.311l0,-2.7l-11.566,0Z"})))),!s&&(0,e.createElement)(jn.Tooltip,{text:(0,Jn.__)("Switch to fluid resizing","kadence-blocks")},(0,e.createElement)(jn.Button,{className:"kt-fluid-grid-btn",isSmall:!0,onClick:()=>c(!0)},(0,e.createElement)("svg",{viewBox:"0 0 20 20",width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"1.5"},(0,e.createElement)("path",{d:"M13.967,10.611l0.001,-1.222l1.815,0l0,-2.7l3.31,3.311l-3.31,3.311l0,-2.7l-1.816,0Z"}),(0,e.createElement)("path",{d:"M8.918,10.611l-0.022,-1.222l2.15,0l-0.031,1.222l-2.097,0Z"}),(0,e.createElement)("path",{d:"M4.217,10.611l0,2.7l-3.31,-3.311l3.31,-3.311l0,2.7l1.693,0l-0.028,1.222l-1.665,0Z"}),(0,e.createElement)("circle",{cx:"12.427",cy:"9.997",r:"1.419",fill:"none",stroke:"#0085ba"}),(0,e.createElement)("circle",{cx:"7.456",cy:"9.997",r:"1.419",fill:"none",stroke:"#0085ba"})))),(0,e.createElement)("span",{id:`left-column-width-${o}`,className:"left-column-width-size column-width-size-handle"},a+"%"),(0,e.createElement)("span",{id:`right-column-width-${o}`,className:"right-column-width-size column-width-size-handle"},i+"%")));n.push(h)}return n})(t)))))}const Mp=({steps:t,isOpen:n,onRequestClose:o,onSubmit:a})=>{const[r,i]=(0,zn.useState)(0),[l,s]=(0,zn.useState)({meta:{isValid:!0}}),c=()=>{r<t.length-1&&i(r+1)},u=()=>{r>0&&i(r-1)},d=()=>{delete l.meta,a(l),o({complete:!0})};if((0,zn.useEffect)((()=>{Number.isInteger(l?.meta?.exitAndCallbackStep)&&l?.meta?.exitAndCallbackStep===r&&d()}),[l,r]),(0,zn.useEffect)((()=>{const e=document.getElementsByClassName("has-scrolled-content");for(let t=0;t<e.length;t++)e[t].scrollTo(0,0)}),[r]),n)return(0,e.createElement)(jn.Modal,{className:"kadence-onboarding-modal",isDismissible:!1,__experimentalHideHeader:!0,size:"fill",onRequestClose:o},(0,e.createElement)("div",{className:"header",style:t[r]?.containerData?.headerStyle},(0,e.createElement)("img",{src:kadence_blocks_params.kadenceBlocksUrl+"/includes/settings/img/kadence-logo.png",alt:"Kadence Blocks"}),(0,e.createElement)("div",{className:"close",onClick:()=>{delete l.meta,o({complete:!1})}},(0,e.createElement)(jn.Dashicon,{icon:"no-alt"}))),(0,e.createElement)("div",{key:r},React.createElement(t[r].component,{data:l,componentData:t[r].componentData,onChange:e=>(e=>{s((t=>({...t,...e})))})(e),handleNextStep:c,handlePreviousStep:u,handleFinish:d})),(0,e.createElement)("div",{className:"footer"},(0,e.createElement)("div",{className:"back"},(0,e.createElement)(jn.Button,{onClick:u,icon:"arrow-left-alt",disabled:0===r},(0,Jn.__)("Back","kadence-blocks"))),(0,e.createElement)("div",{className:"step-indicator"},t[r]?.hideSteps?null:t.map(((t,n)=>t?.hideSteps?null:(0,e.createElement)("div",{key:n,className:"step "+(n===r?"active":"")},(0,e.createElement)("div",{className:"number"},t.visualNumber),(0,Jn.__)(t.name,"kadence-blocks"))))),(0,e.createElement)("div",{className:"next"},r<t.length-1?(0,e.createElement)(jn.Button,{isPrimary:!0,disabled:!l.meta.isValid,onClick:c},l.meta?.nextText?l.meta.nextText:(0,Jn.__)("Next","kadence-blocks")):(0,e.createElement)(jn.Button,{isPrimary:!0,onClick:d},(0,Jn.__)("Finish","kadence-blocks")))))}})(),(this.kadence=this.kadence||{}).components=r})();