File "admin-kadence-home.js"
Full Path: /home/magiggjm/magistvandroids.com/wp-content/plugins/kadence-blocks/dist/admin-kadence-home.js
File size: 307.04 KB
MIME-type: text/plain
Charset: utf-8
(()=>{var e={220:(e,t,n)=>{"use strict";var r=n(6305),o=n(4994);t.A=void 0;var i=o(n(4634)),a=o(n(6305)),s=r(n(1609)),l=o(n(9893)),c=n(790);function u(){}s.default.createElement;var d={contain:"react-Slidy--contain",cover:"react-Slidy--cover",fullHeight:"react-Slidy--fullHeight",fullWidth:"react-Slidy--fullWidth"};t.A=function(e){var t=e.ArrowLeft,r=e.ArrowRight,o=e.children,p=e.classNameBase,f=void 0===p?"react-Slidy":p,h=e.doAfterDestroy,m=void 0===h?u:h,g=e.doAfterInit,b=void 0===g?u:g,v=e.doAfterSlide,y=void 0===v?u:v,_=e.doBeforeSlide,w=void 0===_?u:_,k=e.imageObjectFit,x=e.infiniteLoop,S=void 0!==x&&x,O=e.itemsToPreload,j=void 0===O?1:O,C=e.initialSlide,I=void 0===C?0:C,E=e.ease,P=void 0===E?"ease":E,A=e.lazyLoadSlider,T=void 0===A||A,L=e.lazyLoadConfig,N=void 0===L?{offset:150}:L,R=e.keyboardNavigation,D=void 0!==R&&R,M=e.numOfSlides,F=void 0===M?1:M,V=e.sanitize,H=void 0===V||V,z=e.slide,B=void 0===z?0:z,U=e.slideSpeed,q=void 0===U?500:U,$=e.showArrows,W=void 0===$||$,G=e.useFullHeight,K=void 0!==G&&G,Y=e.useFullWidth,Z=void 0===Y||Y,J=(0,s.useState)(!T),Q=J[0],X=J[1],ee=(0,s.useRef)(null);(0,s.useEffect)(function(){var e;if(T){var t=function(){var t=N.offset,n=void 0===t?0:t;(e=new window.IntersectionObserver(te,{rootMargin:n+"px 0px 0px"})).observe(ee.current)};"IntersectionObserver"in window?t():Promise.resolve().then(function(){return(0,a.default)(n(5127))}).then(t)}return function(){return e&&e.disconnect()}},[]);var te=function(e,t){var n=e[0];(n.isIntersecting||n.intersectionRatio>0)&&(t.unobserve(n.target),X(!0))},ne=Math.min(F,s.default.Children.count(o)),re=[f,K&&d.fullHeight,Z&&d.fullWidth,k&&d[k]].filter(Boolean).join(" "),oe={ArrowLeft:t,ArrowRight:r,children:o,classNameBase:f,doAfterDestroy:m,doAfterInit:b,doAfterSlide:y,doBeforeSlide:w,ease:P,infiniteLoop:S,initialSlide:I,itemsToPreload:j,keyboardNavigation:D,numOfSlides:F,showArrows:W,slide:B,slideSpeed:q};return(0,c.jsx)("div",{className:re,ref:ee,children:Q&&(0,c.jsx)(l.default,(0,i.default)({},oe,{numOfSlides:H?ne:F,children:o}))})}},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},1609:e=>{"use strict";e.exports=window.React},3072:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case m:case l:return e;default:return t}}case o:return t}}}function k(e){return w(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=p,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return k(e)||w(e)===u},t.isConcurrentMode=k,t.isContextConsumer=function(e){return w(e)===c},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===s||e===a||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===v||e.$$typeof===y||e.$$typeof===_||e.$$typeof===b)},t.typeOf=w},3404:(e,t,n)=>{"use strict";e.exports=n(3072)},3738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4146:(e,t,n)=>{"use strict";var r=n(3404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),g=0;g<a.length;++g){var b=a[g];if(!(i[b]||r&&r[b]||m&&m[b]||s&&s[b])){var v=p(n,b);try{c(t,b,v)}catch(e){}}}}return t}},4634:e=>{function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4994:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},5127:()=>{!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=window.document,t=[],n=null,r=null;i.prototype.THROTTLE_TIMEOUT=100,i.prototype.POLL_INTERVAL=null,i.prototype.USE_MUTATION_OBSERVER=!0,i._setupCrossOriginUpdater=function(){return n||(n=function(e,n){r=e&&n?d(e,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},t.forEach(function(e){e._checkForIntersections()})}),n},i._resetCrossOriginUpdater=function(){n=null,r=null},i.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},i.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},i.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},i.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},i.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},i.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},i.prototype._monitorIntersections=function(t){var n=t.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(t)){var r=this._checkForIntersections,o=null,i=null;if(this.POLL_INTERVAL?o=n.setInterval(r,this.POLL_INTERVAL):(a(n,"resize",r,!0),a(t,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(i=new n.MutationObserver(r)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push(function(){var e=t.defaultView;e&&(o&&e.clearInterval(o),s(e,"resize",r,!0)),s(t,"scroll",r,!0),i&&i.disconnect()}),t!=(this.root&&this.root.ownerDocument||e)){var l=h(t);l&&this._monitorIntersections(l.ownerDocument)}}},i.prototype._unmonitorIntersections=function(t){var n=this._monitoringDocuments.indexOf(t);if(-1!=n){var r=this.root&&this.root.ownerDocument||e,o=this._observationTargets.some(function(e){var n=e.element.ownerDocument;if(n==t)return!0;for(;n&&n!=r;){var o=h(n);if((n=o&&o.ownerDocument)==t)return!0}return!1});if(!o){var i=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),i(),t!=r){var a=h(t);a&&this._unmonitorIntersections(a.ownerDocument)}}}},i.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t<e.length;t++)e[t]()},i.prototype._checkForIntersections=function(){if(this.root||!n||r){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(r){var i=r.element,a=c(i),s=this._rootContainsTarget(i),l=r.entry,u=e&&s&&this._computeTargetAndRootIntersection(i,a,t),d=r.entry=new o({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:a,rootBounds:n&&!this.root?null:t,intersectionRect:u});l?e&&s?this._hasCrossedThreshold(l,d)&&this._queuedEntries.push(d):l&&l.isIntersecting&&this._queuedEntries.push(d):this._queuedEntries.push(d)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},i.prototype._computeTargetAndRootIntersection=function(t,o,i){if("none"!=window.getComputedStyle(t).display){for(var a=o,s=f(t),u=!1;!u&&s;){var p=null,h=1==s.nodeType?window.getComputedStyle(s):{};if("none"==h.display)return null;if(s==this.root||9==s.nodeType)if(u=!0,s==this.root||s==e)n&&!this.root?!r||0==r.width&&0==r.height?(s=null,p=null,a=null):p=r:p=i;else{var m=f(s),g=m&&c(m),b=m&&this._computeTargetAndRootIntersection(m,g,i);g&&b?(s=m,p=d(g,b)):(s=null,a=null)}else{var v=s.ownerDocument;s!=v.body&&s!=v.documentElement&&"visible"!=h.overflow&&(p=c(s))}if(p&&(a=l(p,a)),!a)break;s=s&&f(s)}return a}},i.prototype._getRootRect=function(){var t;if(this.root)t=c(this.root);else{var n=e.documentElement,r=e.body;t={top:0,left:0,right:n.clientWidth||r.clientWidth,width:n.clientWidth||r.clientWidth,bottom:n.clientHeight||r.clientHeight,height:n.clientHeight||r.clientHeight}}return this._expandRectByRootMargin(t)},i.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100}),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},i.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==r)for(var o=0;o<this.thresholds.length;o++){var i=this.thresholds[o];if(i==n||i==r||i<n!=i<r)return!0}},i.prototype._rootIsInDom=function(){return!this.root||p(e,this.root)},i.prototype._rootContainsTarget=function(t){return p(this.root||e,t)&&(!this.root||this.root.ownerDocument==t.ownerDocument)},i.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},i.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=i,window.IntersectionObserverEntry=o}function o(e){this.time=e.time,this.target=e.target,this.rootBounds=u(e.rootBounds),this.boundingClientRect=u(e.boundingClientRect),this.intersectionRect=u(e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,r=this.intersectionRect,o=r.width*r.height;this.intersectionRatio=n?Number((o/n).toFixed(4)):this.isIntersecting?1:0}function i(e,t){var n,r,o,i=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(i.root&&1!=i.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,o=null,function(){o||(o=setTimeout(function(){n(),o=null},r))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(i.rootMargin),this.thresholds=this._initThresholds(i.threshold),this.root=i.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function a(e,t,n,r){"function"==typeof e.addEventListener?e.addEventListener(t,n,r||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function s(e,t,n,r){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,r||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function l(e,t){var n=Math.max(e.top,t.top),r=Math.min(e.bottom,t.bottom),o=Math.max(e.left,t.left),i=Math.min(e.right,t.right),a=i-o,s=r-n;return a>=0&&s>=0&&{top:n,bottom:r,left:o,right:i,width:a,height:s}||null}function c(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function u(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function d(e,t){var n=t.top-e.top,r=t.left-e.left;return{top:n,left:r,height:t.height,width:t.width,bottom:n+t.height,right:r+t.width}}function p(e,t){for(var n=t;n;){if(n==e)return!0;n=f(n)}return!1}function f(t){var n=t.parentNode;return 9==t.nodeType&&t!=e?h(t):n&&11==n.nodeType&&n.host?n.host:n&&n.assignedSlot?n.assignedSlot.parentNode:n}function h(e){try{return e.defaultView&&e.defaultView.frameElement||null}catch(e){return null}}}()},6305:(e,t,n)=>{var r=n(3738).default;function o(t,n){if("function"==typeof WeakMap)var i=new WeakMap,a=new WeakMap;return(e.exports=o=function(e,t){if(!t&&e&&e.__esModule)return e;var n,o,s={__proto__:null,default:e};if(null===e||"object"!=r(e)&&"function"!=typeof e)return s;if(n=t?a:i){if(n.has(e))return n.get(e);n.set(e,s)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((o=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(o.get||o.set)?n(s,l,o):s[l]=e[l]);return s},e.exports.__esModule=!0,e.exports.default=e.exports)(t,n)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},6942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},7529:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.translate=s,t.infiniteIndex=l,t.clampNumber=c,t.default=function(e,t){var d=t.doAfterSlide,p=t.doBeforeSlide,f=t.ease,h=t.infiniteLoop,m=t.initialSlide,g=t.numOfSlides,b=t.onNext,v=t.onPrev,y=t.slidesDOMEl,_=t.slideSpeed,w=t.items;if(null!==e){var k=m,x=!1,S=!1,O=0,j=0,C=0,I=0;return y.addEventListener(o,A),e.addEventListener("touchstart",T,a),e.addEventListener("touchmove",L,a),e.addEventListener("touchend",N,a),0!==k&&E(0),{clean:function(){return function(e){for(;e.childElementCount>1;)null!==e&&e.removeChild(e.lastChild);return!0}(y)},destroy:function(){e.removeEventListener("touchstart",T,a),e.removeEventListener("touchmove",L,a),e.removeEventListener("touchend",N,a),y.removeEventListener(o,A)},goTo:R,next:function(e){e.preventDefault(),e.stopPropagation(),P(!0)},prev:function(e){e.preventDefault(),e.stopPropagation(),P(!1)},slide:P,updateItems:function(e){w=e}}}function E(e,t,n){void 0===t&&(t=""),void 0===n&&(n=0);var r=100/g;y.style.cssText=function(e,t,n,r,o){return""+(""!==t?"transition-timing-function: "+t+";":"")+(e?"transition-duration: "+e+"ms;":"")+"transform: "+s(n,r,o)+";"}(e,t,k,n,r)}function P(e){var t=k+1*(!0===e?1:-1);h&&(t=l(t,w)),R(t=c(t,0,w-1))}function A(){!0===S&&(E(0),S=!1)}function T(e){var t=u(e);x=void 0,C=t.pageX,I=t.pageY}function L(e){if(!(e.touches.length>1||e.scale&&1!==e.scale)){var t=u(e);O=t.pageX-C,j=t.pageY-I,void 0!==x?x||(e.preventDefault(),E(0,n,-1*O)):(x=i(O)<i(j))||(document.ontouchmove=function(e){return e.preventDefault()})}}function N(){if(document.ontouchmove=function(){return!0},!x){var e=i(O)>r,t=O<0;!0===e&&!1==(!1===t&&0===k||!0===t&&k===w-1)?P(t):E(_,n)}O=j=C=I=0}function R(e){e!==k&&(e<=w&&(p({currentSlide:k,nextSlide:e}),e>k?b(e):v(e),k=e),E(_,f),y.addEventListener(o,function e(t){d({currentSlide:k}),t.currentTarget.removeEventListener(t.type,e)}))}};var n="linear",r=50,o="transitionend",i=Math.abs,a={passive:!1};function s(e,t,n){void 0===n&&(n=100);var r=e*n*-1;return"translate3d("+(t?"calc("+r+"% - "+t+"px)":r+"%")+", 0, 0)"}function l(e,t){return e<0?t-1:e>=t?0:e}function c(e,t,n){return Math.min(Math.max(e,t),n)}function u(e){return e.targetTouches?e.targetTouches[0]:e.touches[0]}},9893:(e,t,n)=>{"use strict";var r=n(6305),o=n(4994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.ArrowLeft,n=e.ArrowRight,r=e.children,o=e.classNameBase,d=e.doAfterDestroy,p=e.doAfterInit,f=e.doAfterSlide,h=e.doBeforeSlide,m=e.ease,g=e.infiniteLoop,b=e.initialSlide,v=e.itemsToPreload,y=e.keyboardNavigation,_=e.numOfSlides,w=e.showArrows,k=e.slide,x=e.slideSpeed,S=(0,a.useState)({goTo:c,next:c,prev:c,updateItems:c}),O=S[0],j=S[1],C=(0,a.useState)(b),I=C[0],E=C[1],P=(0,a.useState)(b),A=P[0],T=P[1],L=(0,a.useRef)(null),N=(0,a.useRef)(null),R=function(e){return Array.isArray(e)?e:[e]}(r);(0,a.useEffect)(function(){k!==I&&O.goTo(k)},[k]),(0,a.useEffect)(function(){var e,t=(0,s.default)(L.current,{ease:m,doAfterSlide:f,doBeforeSlide:h,numOfSlides:_,slideSpeed:x,infiniteLoop:g,slidesDOMEl:N.current,initialSlide:I,items:R.length,onNext:function(e){return E(e),e>A&&T(e),e},onPrev:function(e){return E(e),e}});return j(t),p(),y&&(e=function(e){39===e.keyCode?t.next(e):37===e.keyCode&&t.prev(e)},document.addEventListener("keydown",e)),function(){!function(e,t){e&&e.clean()&&e.destroy(),t()}(t,d),y&&document.removeEventListener("keydown",e)}},[]),(0,a.useEffect)(function(){O&&O.updateItems(R.length)});var D,M,F=function(e){var t=e.index,n=e.maxIndex,r=e.items,o=e.itemsToPreload,i=e.numOfSlides,a=Math.max(o,i);if(t>=r.length-i){var s=r.length>i?r.slice(0,i-1):[];return[].concat(r.slice(0,n+a),s)}return r.slice(0,n+a)}({index:I,maxIndex:A,items:R,itemsToPreload:v,numOfSlides:_}),V=function(e){return R.length>_&&O.next(e)};return(0,l.jsxs)(l.Fragment,{children:[w&&(0,l.jsxs)(l.Fragment,{children:[(D={disabled:0===I&&!g,onClick:function(e){return O.prev(e)}},M=o+"-arrow "+o+"-arrowLeft",t?(0,l.jsx)(t,(0,i.default)({},D,{className:M})):(0,l.jsx)("span",(0,i.default)({"aria-label":"Previous",className:M+" "+o+"-prev",role:"button"},D))),function(){var e={disabled:(R.length<=_||I===R.length-1)&&!g,onClick:V},t=o+"-arrow "+o+"-arrowRight";return n?(0,l.jsx)(n,(0,i.default)({},e,{className:t})):(0,l.jsx)("span",(0,i.default)({"aria-label":"Next",className:t+" "+o+"-next",role:"button"},e))}()]}),(0,l.jsx)("div",{ref:L,children:(0,l.jsx)("ul",{ref:N,children:F.map(u(_))})})]})};var i=o(n(4634)),a=r(n(1609)),s=o(n(7529)),l=n(790);function c(e){}a.default.createElement;var u=function(e){return function(t,n){var r=1!==e?{width:100/e+"%"}:{};return(0,l.jsx)("li",{style:r,children:t},n)}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{"use strict";const e=window.wp.element,t=window.wp.i18n,r=window.kadence.helpers,o=window.wp.primitives;var i=n(790);const a=(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(o.Path,{fillRule:"evenodd",d:"M19.75 11H21V8.667L19.875 4H4.125L3 8.667V11h1.25v8.75h15.5V11zm-1.5 0H5.75v7.25H10V13h4v5.25h4.25V11zm-5.5-5.5h2.067l.486 3.24.028.76H12.75v-4zm-3.567 0h2.067v4H8.669l.028-.76.486-3.24zm7.615 3.1l-.464-3.1h2.36l.806 3.345V9.5h-2.668l-.034-.9zM7.666 5.5h-2.36L4.5 8.845V9.5h2.668l.034-.9.464-3.1z",clipRule:"evenodd"})}),s=(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(o.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"})}),l=(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(o.Path,{d:"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z"})}),c=n.p+"images/business-bg.9ea001c0.jpg",u=n.p+"images/education-bg.0ddd9432.jpg",d=n.p+"images/spa-bg.daf6c29b.jpg",p=n.p+"images/taxes-bg.fe6cba5c.jpg",f=[{value:"NEUTRAL",label:(0,t.__)("Neutral","kadence-blocks")},{value:"PROFESSIONAL",label:(0,t.__)("Professional","kadence-blocks")},{value:"FRIENDLY",label:(0,t.__)("Friendly","kadence-blocks")},{value:"INFORMATIVE",label:(0,t.__)("Informative","kadence-blocks")},{value:"ENGAGING",label:(0,t.__)("Engaging","kadence-blocks")},{value:"TRUSTWORTHY",label:(0,t.__)("Trustworthy","kadence-blocks")},{value:"CONVERSATIONAL",label:(0,t.__)("Conversational","kadence-blocks")},{value:"PERSUASIVE",label:(0,t.__)("Persuasive","kadence-blocks")},{value:"UPBEAT",label:(0,t.__)("Upbeat","kadence-blocks")},{value:"FUNNY",label:(0,t.__)("Funny","kadence-blocks")},{value:"INSPIRATIONAL",label:(0,t.__)("Inspirational","kadence-blocks")}],h="INDIVIDUAL",m=[{value:"COMPANY",label:(0,t.__)("A Company","kadence-blocks")},{value:h,label:(0,t.__)("An Individual","kadence-blocks")},{value:"ORGANIZATION",label:(0,t.__)("An Organization","kadence-blocks")}],g=[{value:"hr-HR",label:(0,t.__)("Croatian (Croatia)","kadence-blocks")},{value:"cs-CZ",label:(0,t.__)("Czech","kadence-blocks")},{value:"da-DK",label:(0,t.__)("Danish (Denmark)","kadence-blocks")},{value:"nl-BE",label:(0,t.__)("Dutch (Belgium)","kadence-blocks")},{value:"nl-N",label:(0,t.__)("Dutch (Netherlands)","kadence-blocks")},{value:"en-AU",label:(0,t.__)("English (Australia)","kadence-blocks")},{value:"en-CA",label:(0,t.__)("English (Canada)","kadence-blocks")},{value:"en-IN",label:(0,t.__)("English (India)","kadence-blocks")},{value:"en-NZ",label:(0,t.__)("English (New Zealand)","kadence-blocks")},{value:"en-GB",label:(0,t.__)("English (UK)","kadence-blocks")},{value:"en-US",label:(0,t.__)("English (US)","kadence-blocks")},{value:"et-EE",label:(0,t.__)("Estonian (Estonia)","kadence-blocks")},{value:"fi-FI",label:(0,t.__)("Finnish","kadence-blocks")},{value:"fr-BE",label:(0,t.__)("French (Belgium)","kadence-blocks")},{value:"fr-CA",label:(0,t.__)("French (Canada)","kadence-blocks")},{value:"fr-FR",label:(0,t.__)("French (France)","kadence-blocks")},{value:"de-AT",label:(0,t.__)("German (Austria)","kadence-blocks")},{value:"de-BE",label:(0,t.__)("German (Belgium)","kadence-blocks")},{value:"de-DE",label:(0,t.__)("German (Germany)","kadence-blocks")},{value:"de-CH",label:(0,t.__)("German (Switzerland)","kadence-blocks")},{value:"hu-HU",label:(0,t.__)("Hungarian","kadence-blocks")},{value:"it-IT",label:(0,t.__)("Italian (Italy)","kadence-blocks")},{value:"pt-BR",label:(0,t.__)("Portuguese (Brazil)","kadence-blocks")},{value:"pt-PT",label:(0,t.__)("Portuguese (Portugal)","kadence-blocks")},{value:"pl-PL",label:(0,t.__)("Polish (Poland)","kadence-blocks")},{value:"sk-SK",label:(0,t.__)("Slovak (Slovakia)","kadence-blocks")},{value:"es-AR",label:(0,t.__)("Spanish (Argentina)","kadence-blocks")},{value:"es-CO",label:(0,t.__)("Spanish (Colombia)","kadence-blocks")},{value:"es-419",label:(0,t.__)("Spanish (Latin America)","kadence-blocks")},{value:"es-MX",label:(0,t.__)("Spanish (Mexico)","kadence-blocks")},{value:"es-ES",label:(0,t.__)("Spanish (Spain)","kadence-blocks")},{value:"sv-SE",label:(0,t.__)("Swedish (Sweden)","kadence-blocks")},{value:"tr-TR",label:(0,t.__)("Turkish","kadence-blocks")}],b={COMPANY:{label:(0,t.__)("Company Name","kadence-blocks"),placeholder:(0,t.__)("Your Company","kadence-blocks")},INDIVIDUAL:{label:(0,t.__)("Name","kadence-blocks"),placeholder:(0,t.__)("Your Name","kadence-blocks")},ORGANIZATION:{label:(0,t.__)("Organization Name","kadence-blocks"),placeholder:(0,t.__)("Your Organization","kadence-blocks")}},v=[{label:(0,t.__)("I want to sell products","kadence-starter-templates"),description:(0,t.__)("Get example woocommerce content and see layouts that work better for online stores.","kadence-starter-templates"),icon:"cart",value:"ecommerce"},{label:(0,t.__)("I want to receive donations","kadence-starter-templates"),description:(0,t.__)("See layouts that work better for non-profits.","kadence-starter-templates"),icon:"share-alt",value:"donations"},{label:(0,t.__)("I want to display events","kadence-starter-templates"),description:(0,t.__)("Get example events content and see layouts that work better for showcasing events.","kadence-starter-templates"),icon:"calendar-alt",value:"events"},{label:(0,t.__)("I want to offer courses","kadence-starter-templates"),description:(0,t.__)("See layouts that work better for learning management.","kadence-starter-templates"),icon:"welcome-learn-more",value:"courses"},{label:(0,t.__)("I want to sell tickets to events","kadence-starter-templates"),description:(0,t.__)("See layouts that work better for ticket sales.","kadence-starter-templates"),icon:"tickets-alt",value:"tickets"},{label:(0,t.__)("I want to generate leads","kadence-starter-templates"),description:(0,t.__)("See layouts that work better for getting new leads.","kadence-starter-templates"),icon:"chart-bar",value:"landing"},{label:(0,t.__)("I want to display my services","kadence-starter-templates"),description:(0,t.__)("See layouts that work better for service sites.","kadence-starter-templates"),icon:"businessperson",value:"services"},{label:(0,t.__)("I want to offer a membership","kadence-starter-templates"),description:(0,t.__)("See layouts that work better for membership sites.","kadence-starter-templates"),icon:"money",value:"membership"},{label:(0,t.__)("I want to write blog posts","kadence-starter-templates"),description:(0,t.__)("See layouts that work better for bloggers.","kadence-starter-templates"),icon:"welcome-write-blog",value:"blogging"},{label:(0,t.__)("I want to book appointments","kadence-starter-templates"),description:(0,t.__)("See layouts that work better for bookings.","kadence-starter-templates"),icon:"edit-page",value:"booking"},{label:(0,t.__)("I want to display my photography","kadence-starter-templates"),description:(0,t.__)("See layouts that work better for photographers.","kadence-starter-templates"),icon:"camera",value:"photography"},{label:(0,t.__)("I want to promote my podcast","kadence-starter-templates"),description:(0,t.__)("See layouts that work better for podcasters.","kadence-starter-templates"),icon:"microphone",value:"podcasting"}],y="Business Address",_="Service Area",w="Online Only",k=[{icon:a,text:(0,t.__)("Business Address","kadence-blocks"),value:y,help:(0,t.__)("E.g.: 1234 Street #1, Chicago, IL 60076, USA","kadence-blocks"),placeholder:(0,t.__)("Street Adress, City, State, Zipcode, Country","kadence-blocks")},{icon:s,text:(0,t.__)("Service Area","kadence-blocks"),value:_,help:(0,t.__)("E.g.: Chicago, USA","kadence-blocks"),placeholder:(0,t.__)("District, City, State, Zipcode, Country","kadence-blocks")},{icon:l,text:(0,t.__)("Online Only","kadence-blocks"),value:w,help:"",placeholder:""}],x={initial:{color:"#757575",message:(0,t.__)("The more detail you add, the better.","kadence-blocks")},weak:{color:"#DF3416",message:(0,t.__)("For better, more accurate copy enter a bit more content.","kadence-blocks")},medium:{color:"#B35F00",message:(0,t.__)("This is a great start. Try adding a bit more information to your description.","kadence-blocks")},strong:{color:"#1B8F6D",message:(0,t.__)("Excellent work! Want to add more? Keep going! More info means better content.","kadence-blocks")},enough:{color:"#1B8F6D",message:(0,t.__)("Excellent work! You have added enough information.","kadence-blocks")},less:{color:"#B35F00",message:(0,t.__)("ok, you've added a lot of information. Try removing some to get better results.","kadence-blocks")},muchLess:{color:"#DF3416",message:(0,t.__)("You've added too much information. Remove some to move forward.","kadence-blocks")}},S=[d,c,p,u],O={INDIVIDUAL:["What is your core offering or skill?","Tell your story. Be sure to feature your expertise and standout skills.","Describe your process, services, or products you offer.","What makes you stand out? Highlight your competitive edge and the value you bring?","Do you have work and recognitions to highlight?","What is the action you want visitors to take?"],COMPANY:["What is your core offering or business purpose?","What products and services do your offer?","Describe your team and/or brand story.","Highlight relevant numbers or statistics that support your value or impact.","What makes you stand out in your industry? Highlight your competitive edge and the value you bring.","List any notable partnerships.","What is the action you want visitors to take?"],ORGANIZATION:["What is your organization's purpose? How does your history and mission support that?","Describe your team and/or brand story.","Highlight relevant numbers or statistics that support your value or impact.","Do you offer any services or products?","List any notable partnerships.","What is the action you want visitors to take?"]},j="loading",C="notFound",I="error",E="success",P="allAdded",A={isComplete:!1,firstTime:!0,isSubmitted:!1,context:"kadence",currentPageIndex:0,companyName:"",entityType:h,locationType:"",locationInput:"",location:"",industry:"",missionStatement:"",keywords:[],tone:"NEUTRAL",privacyAgreement:!1,photoLibrary:"aiGenerated",photoCollectionChanged:!1,featuredImages:[],backgroundImages:[],customCollections:[{label:(0,t.__)("My Images","kadence-blocks"),value:"my-images",galleries:[{name:"featured",isLocal:!0,images:[]},{name:"background",isLocal:!0,images:[]}]}],saving:!1,saveError:!1,verticals:[],suggestedKeywords:[],suggestedKeywordsState:"",imageSearchQuery:"",lang:"",goals:[]},T=(0,e.createContext)();function L(e,t){switch(t.type){case"SET_CURRENT_PAGE_INDEX":return{...e,currentPageIndex:t.payload};case"SET_COMPANY_NAME":return{...e,companyName:t.payload};case"SET_LANG":return{...e,lang:t.payload};case"SET_SITE_GOALS":return{...e,goals:t.payload};case"SET_ENTITY_TYPE":return{...e,entityType:t.payload};case"SET_LOCATION":return{...e,location:t.payload};case"SET_LOCATION_INPUT":return{...e,locationInput:t.payload};case"SET_LOCATION_TYPE":return{...e,locationType:t.payload};case"SET_INDUSTRY":return{...e,industry:t.payload};case"SET_MISSION_STATEMENT":return{...e,missionStatement:t.payload};case"SET_KEYWORDS":return{...e,keywords:t.payload};case"SET_TONE":return{...e,tone:t.payload};case"SET_PRIVACY_AGREEMENT":return{...e,privacyAgreement:!e.privacyAgreement};case"SET_PHOTO_LIBRARY":return{...e,photoLibrary:t.payload};case"SET_PHOTO_LIBRARY_CHANGED":return{...e,photoCollectionChanged:t.payload};case"SET_FEATURED_IMAGES":return{...e,featuredImages:t.payload};case"SET_BACKGROUND_IMAGES":return{...e,backgroundImages:t.payload};case"SET_CUSTOM_COLLECTIONS":return{...e,customCollections:t.payload};case"SET_FEATURED_PREVIEW":return{...e,featuredImage:t.payload};case"SET_BACKGROUND_PREVIEW":return{...e,backgroundImage:t.payload};case"SET_SAVING":return{...e,saving:t.payload};case"SET_IMAGE_SEARCH_QUERY":return{...e,imageSearchQuery:t.payload};case"SET_SUGGESTED_KEYWORDS":return{...e,suggestedKeywords:t.payload};case"SET_SUGGESTED_KEYWORDS_STATE":return{...e,suggestedKeywordsState:t.payload};default:return e}}function N(e){return{...A,...e}}function R(t){const[n,r]=(0,e.useReducer)(L,t.value,N),o={state:n,dispatch:r};return(0,i.jsx)(T.Provider,{value:o,children:t.children})}function D(){const t=(0,e.useContext)(T);if(void 0===t)throw new Error("useKadenceAi must be used with KadenceAiProvider");return t}function M(e){let t;const n=`algolia-client-js-${e.key}`;function r(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(r().getItem(n)||"{}")}function i(e){r().setItem(n,JSON.stringify(e))}return{get:(t,n,r={miss:()=>Promise.resolve()})=>Promise.resolve().then(()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,n=o(),r=Object.fromEntries(Object.entries(n).filter(([,e])=>void 0!==e.timestamp));i(r),t&&i(Object.fromEntries(Object.entries(r).filter(([,e])=>{const n=(new Date).getTime();return!(e.timestamp+t<n)})))}(),o()[JSON.stringify(t)])).then(e=>Promise.all([e?e.value:n(),void 0!==e])).then(([e,t])=>Promise.all([e,t||r.miss(e)])).then(([e])=>e),set:(e,t)=>Promise.resolve().then(()=>{const i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},r().setItem(n,JSON.stringify(i)),t}),delete:e=>Promise.resolve().then(()=>{const t=o();delete t[JSON.stringify(e)],r().setItem(n,JSON.stringify(t))}),clear:()=>Promise.resolve().then(()=>{r().removeItem(n)})}}function F(e){const t=[...e.caches],n=t.shift();return void 0===n?{get:(e,t,n={miss:()=>Promise.resolve()})=>t().then(e=>Promise.all([e,n.miss(e)])).then(([e])=>e),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,r,o={miss:()=>Promise.resolve()})=>n.get(e,r,o).catch(()=>F({caches:t}).get(e,r,o)),set:(e,r)=>n.set(e,r).catch(()=>F({caches:t}).set(e,r)),delete:e=>n.delete(e).catch(()=>F({caches:t}).delete(e)),clear:()=>n.clear().catch(()=>F({caches:t}).clear())}}function V(e={serializable:!0}){let t={};return{get(n,r,o={miss:()=>Promise.resolve()}){const i=JSON.stringify(n);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);const a=r();return a.then(e=>o.miss(e)).then(()=>a)},set:(n,r)=>(t[JSON.stringify(n)]=e.serializable?JSON.stringify(r):r,Promise.resolve(r)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}function H({algoliaAgents:e,client:t,version:n}){const r=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const n=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(n)&&(t.value=`${t.value}${n}`),t}};return t}(n).add({segment:t,version:n});return e.forEach(e=>r.add(e)),r}var z=12e4;function B(e,t="up"){const n=Date.now();return{...e,status:t,lastUpdate:n,isUp:function(){return"up"===t||Date.now()-n>z},isTimedOut:function(){return"timed out"===t&&Date.now()-n<=z}}}var U=class extends Error{name="AlgoliaError";constructor(e,t){super(e),t&&(this.name=t)}},q=class extends U{stackTrace;constructor(e,t,n){super(e,n),this.stackTrace=t}},$=class extends q{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}},W=class extends q{status;constructor(e,t,n,r="ApiError"){super(e,n,r),this.status=t}},G=class extends U{response;constructor(e,t){super(e,"DeserializationError"),this.response=t}},K=class extends W{error;constructor(e,t,n,r){super(e,t,r,"DetailedApiError"),this.error=n}};function Y(e,t,n){const r=(o=n,Object.keys(o).filter(e=>void 0!==o[e]).sort().map(e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(o[e])?o[e].join(","):o[e]).replace(/\+/g,"%20")}`).join("&"));var o;let i=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return r.length&&(i+=`?${r}`),i}function Z(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}var J="5.32.0";function Q(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let n=e.length-1;n>0;n--){const r=Math.floor(Math.random()*(n+1)),o=e[n];t[n]=e[r],t[r]=o}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function X(e,t){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];n&&clearTimeout(n),n=setTimeout(function(){return e.apply(void 0,o)},t)}}function ee(e){return e!==Object(e)}function te(e,t){if(e===t)return!0;if(ee(e)||ee(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];if(!(o in t))return!1;if(!te(e[o],t[o]))return!1}return!0}var ne=function(){};function re(e){var t=e.item,n=e.items,r=void 0===n?[]:n;return{index:t.__autocomplete_indexName,items:[t],positions:[1+r.findIndex(function(e){return e.objectID===t.objectID})],queryID:t.__autocomplete_queryID,algoliaSource:["autocomplete"]}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ie=["items"],ae=["items"];function se(e){return se="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},se(e)}function le(e){return function(e){if(Array.isArray(e))return ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ce(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ue(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach(function(t){fe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fe(e,t,n){return(t=function(e){var t=function(e){if("object"!==se(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===se(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(e){return e.map(function(e){var t=e.items,n=ue(e,ie);return pe(pe({},n),{},{objectIDs:(null==t?void 0:t.map(function(e){return e.objectID}))||n.objectIDs})})}function me(e){var t,n,r,o=(t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,_x,i,a=[],_n=!0,s=!1;try{if(_x=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;_n=!1}else for(;!(_n=(r=_x.call(n)).done)&&(a.push(r.value),a.length!==t);_n=!0);}catch(e){s=!0,o=e}finally{try{if(!_n&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((e.version||"").split(".").map(Number),2),n=t[0],r=t[1],n>=3||2===n&&r>=4||1===n&&r>=10);function i(t,n,r){if(o&&void 0!==r){var i=r[0].__autocomplete_algoliaCredentials,a={"X-Algolia-Application-Id":i.appId,"X-Algolia-API-Key":i.apiKey};e.apply(void 0,[t].concat(le(n),[{headers:a}]))}else e.apply(void 0,[t].concat(le(n)))}return{init:function(t,n){e("init",{appId:t,apiKey:n})},setAuthenticatedUserToken:function(t){e("setAuthenticatedUserToken",t)},setUserToken:function(t){e("setUserToken",t)},clickedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&i("clickedObjectIDsAfterSearch",he(t),t[0].items)},clickedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&i("clickedObjectIDs",he(t),t[0].items)},clickedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["clickedFilters"].concat(n))},convertedObjectIDsAfterSearch:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&i("convertedObjectIDsAfterSearch",he(t),t[0].items)},convertedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&i("convertedObjectIDs",he(t),t[0].items)},convertedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["convertedFilters"].concat(n))},viewedObjectIDs:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.length>0&&t.reduce(function(e,t){var n=t.items,r=ue(t,ae);return[].concat(le(e),le(function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,n=[],r=0;r<e.objectIDs.length;r+=t)n.push(pe(pe({},e),{},{objectIDs:e.objectIDs.slice(r,r+t)}));return n}(pe(pe({},r),{},{objectIDs:(null==n?void 0:n.map(function(e){return e.objectID}))||r.objectIDs})).map(function(e){return{items:n,payload:e}})))},[]).forEach(function(e){var t=e.items;return i("viewedObjectIDs",[e.payload],t)})},viewedFilters:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.length>0&&e.apply(void 0,["viewedFilters"].concat(n))}}}function ge(e){var t=e.items.reduce(function(e,t){var n;return e[t.__autocomplete_indexName]=(null!==(n=e[t.__autocomplete_indexName])&&void 0!==n?n:[]).concat(t),e},{});return Object.keys(t).map(function(e){return{index:e,items:t[e],algoliaSource:["autocomplete"]}})}function be(e){return e.objectID&&e.__autocomplete_indexName&&e.__autocomplete_queryID}function ve(e){return ve="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},ve(e)}function ye(e){return function(e){if(Array.isArray(e))return _e(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_e(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach(function(t){xe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xe(e,t,n){return(t=function(e){var t=function(e){if("object"!==ve(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ve(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Se="2.15.0",Oe="https://cdn.jsdelivr.net/npm/search-insights@".concat(Se,"/dist/search-insights.min.js"),je=X(function(e){var t=e.onItemsChange,n=e.items,r=e.insights,o=e.state;t({insights:r,insightsEvents:ge({items:n}).map(function(e){return ke({eventName:"Items Viewed"},e)}),state:o})},400);function Ce(e){var t=function(e){return ke({onItemsChange:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.viewedObjectIDs.apply(t,ye(n.map(function(e){return ke(ke({},e),{},{algoliaSource:Ie(e.algoliaSource,r.context)})})))},onSelect:function(e){var t=e.insights,n=e.insightsEvents,r=e.state;t.clickedObjectIDsAfterSearch.apply(t,ye(n.map(function(e){return ke(ke({},e),{},{algoliaSource:Ie(e.algoliaSource,r.context)})})))},onActive:ne,__autocomplete_clickAnalytics:!0},e)}(e),n=t.insightsClient,r=t.insightsInitParams,o=t.onItemsChange,i=t.onSelect,a=t.onActive,s=t.__autocomplete_clickAnalytics,l=n;if(n||"undefined"!=typeof window&&function(e){var t=e.window,n=t.AlgoliaAnalyticsObject||"aa";"string"==typeof n&&(l=t[n]),l||(t.AlgoliaAnalyticsObject=n,t[n]||(t[n]=function(){t[n].queue||(t[n].queue=[]);for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];t[n].queue.push(r)}),t[n].version=Se,l=t[n],function(e){var t="[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete";try{var n=e.document.createElement("script");n.async=!0,n.src=Oe,n.onerror=function(){console.error(t)},document.body.appendChild(n)}catch(e){console.error(t)}}(t))}({window}),!l)return{};r&&l("init",ke({partial:!0},r));var c=me(l),u={current:[]},d=X(function(e){var t=e.state;if(t.isOpen){var n=t.collections.reduce(function(e,t){return[].concat(ye(e),ye(t.items))},[]).filter(be);te(u.current.map(function(e){return e.objectID}),n.map(function(e){return e.objectID}))||(u.current=n,n.length>0&&je({onItemsChange:o,items:n,insights:c,state:t}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(e){var t=e.setContext,n=e.onSelect,r=e.onActive;function o(e){t({algoliaInsightsPlugin:{__algoliaSearchParameters:ke(ke({},s?{clickAnalytics:!0}:{}),e?{userToken:Ee(e)}:{}),insights:c}})}l("addAlgoliaAgent","insights-plugin"),o(),l("onUserTokenChange",function(e){o(e)}),l("getUserToken",null,function(e,t){o(t)}),n(function(e){var t=e.item,n=e.state,r=e.event,o=e.source;be(t)&&i({state:n,event:r,insights:c,item:t,insightsEvents:[ke({eventName:"Item Selected"},re({item:t,items:o.getItems().filter(be)}))]})}),r(function(e){var t=e.item,n=e.source,r=e.state,o=e.event;be(t)&&a({state:r,event:o,insights:c,item:t,insightsEvents:[ke({eventName:"Item Active"},re({item:t,items:n.getItems().filter(be)}))]})})},onStateChange:function(e){var t=e.state;d({state:t})},__autocomplete_pluginOptions:e}}function Ie(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(ye(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),["autocomplete-internal"],ye(null!==(e=t.algoliaInsightsPlugin)&&void 0!==e&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function Ee(e){return"number"==typeof e?e.toString():e}var Pe,Ae=!0;function Te(e){return Te="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},Te(e)}function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ne(e,t,n){return(t=function(e){var t=function(e){if("object"!==Te(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Te(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e){return e.reduce(function(e,t){return e.concat(t)},[])}function De(e){return De="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},De(e)}function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(n),!0).forEach(function(t){Ve(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ve(e,t,n){return(t=function(e){var t=function(e){if("object"!==De(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===De(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(e){return 0===e.collections.length?0:e.collections.reduce(function(e,t){return e+t.items.length},0)}var ze=0;function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach(function(t){qe(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qe(e,t,n){return(t=function(e){var t=function(e){if("object"!==$e(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==$e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===$e(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}function We(e){return We="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},We(e)}function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach(function(t){Ze(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ze(e,t,n){return(t=function(e){var t=function(e){if("object"!==We(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==We(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===We(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e,t){var n,r="undefined"!=typeof window?window:{},o=e.plugins||[];return Ye(Ye({debug:!1,openOnFocus:!1,enterKeyHint:void 0,ignoreCompositionEvents:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,insights:void 0,environment:r,shouldPanelOpen:function(e){return He(e.state)>0},reshape:function(e){return e.sources}},e),{},{id:null!==(n=e.id)&&void 0!==n?n:"autocomplete-".concat(ze++),plugins:o,initialState:Ye({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},e.initialState),onStateChange:function(t){var n;null===(n=e.onStateChange)||void 0===n||n.call(e,t),o.forEach(function(e){var n;return null===(n=e.onStateChange)||void 0===n?void 0:n.call(e,t)})},onSubmit:function(t){var n;null===(n=e.onSubmit)||void 0===n||n.call(e,t),o.forEach(function(e){var n;return null===(n=e.onSubmit)||void 0===n?void 0:n.call(e,t)})},onReset:function(t){var n;null===(n=e.onReset)||void 0===n||n.call(e,t),o.forEach(function(e){var n;return null===(n=e.onReset)||void 0===n?void 0:n.call(e,t)})},getSources:function(n){return Promise.all([].concat((r=o.map(function(e){return e.getSources}),function(e){if(Array.isArray(e))return Ge(e)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ge(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[e.getSources]).filter(Boolean).map(function(e){return function(e,t){var n=[];return Promise.resolve(e(t)).then(function(e){return Array.isArray(e),Promise.all(e.filter(function(e){return Boolean(e)}).map(function(e){if(e.sourceId,n.includes(e.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(e.sourceId)," is not unique."));n.push(e.sourceId);var t={getItemInputValue:function(e){return e.state.query},getItemUrl:function(){},onSelect:function(e){(0,e.setIsOpen)(!1)},onActive:ne,onResolve:ne};Object.keys(t).forEach(function(e){t[e].__default=!0});var r=Ue(Ue({},t),e);return Promise.resolve(r)}))})}(e,n)})).then(function(e){return Re(e)}).then(function(e){return e.map(function(e){return Ye(Ye({},e),{},{onSelect:function(n){e.onSelect(n),t.forEach(function(e){var t;return null===(t=e.onSelect)||void 0===t?void 0:t.call(e,n)})},onActive:function(n){e.onActive(n),t.forEach(function(e){var t;return null===(t=e.onActive)||void 0===t?void 0:t.call(e,n)})},onResolve:function(n){e.onResolve(n),t.forEach(function(e){var t;return null===(t=e.onResolve)||void 0===t?void 0:t.call(e,n)})}})})});var r},navigator:Ye({navigate:function(e){var t=e.itemUrl;r.location.assign(t)},navigateNewTab:function(e){var t=e.itemUrl,n=r.open(t,"_blank","noopener");null==n||n.focus()},navigateNewWindow:function(e){var t=e.itemUrl;r.open(t,"_blank","noopener")}},e.navigator)})}function Qe(e){return Qe="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},Qe(e)}function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function et(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(n),!0).forEach(function(t){tt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tt(e,t,n){return(t=function(e){var t=function(e){if("object"!==Qe(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Qe(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e){return nt="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},nt(e)}function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach(function(t){it(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function it(e,t,n){return(t=function(e){var t=function(e){if("object"!==nt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===nt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function at(e){return function(e){if(Array.isArray(e))return st(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return st(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?st(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lt(e){return Boolean(e.execute)}function ct(e){var t=e.reduce(function(e,t){if(!lt(t))return e.push(t),e;var n=t.searchClient,r=t.execute,o=t.requesterId,i=t.requests,a=e.find(function(e){return lt(t)&<(e)&&e.searchClient===n&&Boolean(o)&&e.requesterId===o});if(a){var s;(s=a.items).push.apply(s,at(i))}else{var l={execute:r,requesterId:o,items:i,searchClient:n};e.push(l)}return e},[]),n=t.map(function(e){if(!lt(e))return Promise.resolve(e);var t=e,n=t.execute,r=t.items;return n({searchClient:t.searchClient,requests:r})});return Promise.all(n).then(function(e){return Re(e)})}function ut(e,t){var n=t;return{then:function(t,r){return ut(e.then(ft(t,n,e),ft(r,n,e)),n)},catch:function(t){return ut(e.catch(ft(t,n,e)),n)},finally:function(t){return t&&n.onCancelList.push(t),ut(e.finally(ft(t&&function(){return n.onCancelList=[],t()},n,e)),n)},cancel:function(){n.isCanceled=!0;var e=n.onCancelList;n.onCancelList=[],e.forEach(function(e){e()})},isCanceled:function(){return!0===n.isCanceled}}}function dt(e){return ut(new Promise(function(t,n){return e(t,n)}),{isCanceled:!1,onCancelList:[]})}function pt(e){return ut(e,{isCanceled:!1,onCancelList:[]})}function ft(e,t,n){return e?function(n){return t.isCanceled?n:e(n)}:n}function ht(e){var t=function(e){var t=e.collections.map(function(e){return e.items.length}).reduce(function(e,t,n){var r=(e[n-1]||0)+t;return e.push(r),e},[]),n=t.reduce(function(t,n){return n<=e.activeItemId?t+1:t},0);return e.collections[n]}(e);if(!t)return null;var n=t.items[function(e){for(var t=e.state,n=e.collection,r=!1,o=0,i=0;!1===r;){var a=t.collections[o];if(a===n){r=!0;break}i+=a.items.length,o++}return t.activeItemId-i}({state:e,collection:t})],r=t.source;return{item:n,itemInputValue:r.getItemInputValue({item:n,state:e}),itemUrl:r.getItemUrl({item:n,state:e}),source:r}}function mt(e){return mt="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},mt(e)}dt.resolve=function(e){return pt(Promise.resolve(e))},dt.reject=function(e){return pt(Promise.reject(e))};var gt=["event","nextState","props","query","refresh","store"];function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach(function(t){yt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yt(e,t,n){return(t=function(e){var t=function(e){if("object"!==mt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==mt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===mt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _t,wt,kt,xt=null,St=(_t=-1,wt=-1,kt=void 0,function(e){var t=++_t;return Promise.resolve(e).then(function(e){return kt&&t<wt?kt:(wt=t,kt=e,e)})});function Ot(e){var t=e.event,n=e.nextState,r=void 0===n?{}:n,o=e.props,i=e.query,a=e.refresh,s=e.store,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,gt);xt&&o.environment.clearTimeout(xt);var c=l.setCollections,u=l.setIsOpen,d=l.setQuery,p=l.setActiveItemId,f=l.setStatus,h=l.setContext;if(d(i),p(o.defaultActiveItemId),!i&&!1===o.openOnFocus){var m,g=s.getState().collections.map(function(e){return vt(vt({},e),{},{items:[]})});f("idle"),c(g),u(null!==(m=r.isOpen)&&void 0!==m?m:o.shouldPanelOpen({state:s.getState()}));var b=pt(St(g).then(function(){return Promise.resolve()}));return s.pendingRequests.add(b)}f("loading"),xt=o.environment.setTimeout(function(){f("stalled")},o.stallThreshold);var v=pt(St(o.getSources(vt({query:i,refresh:a,state:s.getState()},l)).then(function(e){return Promise.all(e.map(function(e){return Promise.resolve(e.getItems(vt({query:i,refresh:a,state:s.getState()},l))).then(function(t){return function(e,t,n){if(o=e,Boolean(null==o?void 0:o.execute)){var r="algolia"===e.requesterId?Object.assign.apply(Object,[{}].concat(at(Object.keys(n.context).map(function(e){var t;return null===(t=n.context[e])||void 0===t?void 0:t.__algoliaSearchParameters})))):{};return ot(ot({},e),{},{requests:e.queries.map(function(n){return{query:"algolia"===e.requesterId?ot(ot({},n),{},{params:ot(ot({},r),n.params)}):n,sourceId:t,transformResponse:e.transformResponse}})})}var o;return{items:e,sourceId:t}}(t,e.sourceId,s.getState())})})).then(ct).then(function(t){var n,r=t.some(function(e){return t=e.items,!Array.isArray(t)&&Boolean(null==t?void 0:t._automaticInsights);var t});return r&&h({algoliaInsightsPlugin:vt(vt({},(null===(n=s.getState().context)||void 0===n?void 0:n.algoliaInsightsPlugin)||{}),{},{__automaticInsights:r})}),function(e,t,n){return t.map(function(t){var r,o=e.filter(function(e){return e.sourceId===t.sourceId}),i=o.map(function(e){return e.items}),a=o[0].transformResponse,s=a?a({results:r=i,hits:r.map(function(e){return e.hits}).filter(Boolean),facetHits:r.map(function(e){var t;return null===(t=e.facetHits)||void 0===t?void 0:t.map(function(e){return{label:e.value,count:e.count,_highlightResult:{label:{value:e.highlighted}}}})}).filter(Boolean)}):i;return t.onResolve({source:t,results:i,items:s,state:n.getState()}),Array.isArray(s),s.every(Boolean),'The `getItems` function from source "'.concat(t.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),".\n\nDid you forget to return items?\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems"),{source:t,items:s}})}(t,e,s)}).then(function(e){return function(e){var t=e.props,n=e.state,r=e.collections.reduce(function(e,t){return et(et({},e),{},tt({},t.source.sourceId,et(et({},t.source),{},{getItems:function(){return Re(t.items)}})))},{}),o=t.plugins.reduce(function(e,t){return t.reshape?t.reshape(e):e},{sourcesBySourceId:r,state:n}).sourcesBySourceId;return Re(t.reshape({sourcesBySourceId:o,sources:Object.values(o),state:n})).filter(Boolean).map(function(e){return{source:e,items:e.getItems()}})}({collections:e,props:o,state:s.getState()})})}))).then(function(e){var n;f("idle"),c(e);var d=o.shouldPanelOpen({state:s.getState()});u(null!==(n=r.isOpen)&&void 0!==n?n:o.openOnFocus&&!i&&d||d);var p=ht(s.getState());if(null!==s.getState().activeItemId&&p){var h=p.item,m=p.itemInputValue,g=p.itemUrl,b=p.source;b.onActive(vt({event:t,item:h,itemInputValue:m,itemUrl:g,refresh:a,source:b,state:s.getState()},l))}}).finally(function(){f("idle"),xt&&o.environment.clearTimeout(xt)});return s.pendingRequests.add(v)}function jt(e,t,n){return[e,null==n?void 0:n.sourceId,t].filter(Boolean).join("-").replace(/\s/g,"")}function Ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var It=function(e,t){var n,r=!1,o=[],i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e);try{for(i.s();!(n=i.n()).done;){var a,s,l,c=null===(a=n.value.__autocomplete_pluginOptions)||void 0===a||null===(s=(l=a).awaitSubmit)||void 0===s?void 0:s.call(l);if("number"==typeof c)o.push(c);else if(!0===c){r=!0;break}}}catch(e){i.e(e)}finally{i.f()}return r?t.wait():o.length>0?t.wait(Math.max.apply(Math,o)):void 0};function Et(e){return Et="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},Et(e)}var Pt=["event","props","refresh","store"];function At(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?At(Object(n),!0).forEach(function(t){Lt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):At(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lt(e,t,n){return(t=function(e){var t=function(e){if("object"!==Et(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Et(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Et(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nt=/((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;function Rt(e){return e.nativeEvent||e}function Dt(e){return Dt="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},Dt(e)}var Mt=["props","refresh","store"],Ft=["inputElement","formElement","panelElement"],Vt=["inputElement"],Ht=["inputElement","maxLength"],zt=["source"],Bt=["item","source"];function Ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(n),!0).forEach(function(t){$t(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $t(e,t,n){return(t=function(e){var t=function(e){if("object"!==Dt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Dt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Gt(e){var t=e.props,n=e.refresh,r=e.store,o=Wt(e,Mt);return{getEnvironmentProps:function(e){var n=e.inputElement,o=e.formElement,i=e.panelElement;function a(e){!r.getState().isOpen&&r.pendingRequests.isEmpty()||e.target===n||!1===[o,i].some(function(t){return(n=t)===(r=e.target)||n.contains(r);var n,r})&&(r.dispatch("blur",null),t.debug||r.pendingRequests.cancelAll())}return qt({onTouchStart:a,onMouseDown:a,onTouchMove:function(e){!1!==r.getState().isOpen&&n===t.environment.document.activeElement&&e.target!==n&&n.blur()}},Wt(e,Ft))},getRootProps:function(e){return qt({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-controls":r.getState().isOpen?r.getState().collections.map(function(e){var n=e.source;return jt(t.id,"list",n)}).join(" "):void 0,"aria-labelledby":jt(t.id,"label")},e)},getFormProps:function(e){e.inputElement;var i=Wt(e,Vt),a=function(i){var a;t.onSubmit(qt({event:i,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),null===(a=e.inputElement)||void 0===a||a.blur()};return qt({action:"",noValidate:!0,role:"search",onSubmit:function(e){e.preventDefault();var n=It(t.plugins,r.pendingRequests);void 0!==n?n.then(function(){return a(e)}):a(e)},onReset:function(i){var a;i.preventDefault(),t.onReset(qt({event:i,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),null===(a=e.inputElement)||void 0===a||a.focus()}},i)},getLabelProps:function(e){return qt({htmlFor:jt(t.id,"input"),id:jt(t.id,"label")},e)},getInputProps:function(e){var i;function a(e){(t.openOnFocus||Boolean(r.getState().query))&&Ot(qt({event:e,props:t,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var s,l=e||{},c=(l.inputElement,l.maxLength),u=void 0===c?512:c,d=Wt(l,Ht),p=ht(r.getState()),f=(s=(null===(i=t.environment.navigator)||void 0===i?void 0:i.userAgent)||"",Boolean(s&&s.match(Nt))),h=t.enterKeyHint||(null!=p&&p.itemUrl&&!f?"go":"search");return qt({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&null!==r.getState().activeItemId?jt(t.id,"item-".concat(r.getState().activeItemId),null==p?void 0:p.source):void 0,"aria-controls":r.getState().isOpen?r.getState().collections.filter(function(e){return e.items.length>0}).map(function(e){var n=e.source;return jt(t.id,"list",n)}).join(" "):void 0,"aria-labelledby":jt(t.id,"label"),value:r.getState().completion||r.getState().query,id:jt(t.id,"input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:h,spellCheck:"false",autoFocus:t.autoFocus,placeholder:t.placeholder,maxLength:u,type:"search",onChange:function(e){var i=e.currentTarget.value;t.ignoreCompositionEvents&&Rt(e).isComposing?o.setQuery(i):Ot(qt({event:e,props:t,query:i.slice(0,u),refresh:n,store:r},o))},onCompositionEnd:function(e){Ot(qt({event:e,props:t,query:e.currentTarget.value.slice(0,u),refresh:n,store:r},o))},onKeyDown:function(e){Rt(e).isComposing||function(e){var t=e.event,n=e.props,r=e.refresh,o=e.store,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Pt);if("ArrowUp"===t.key||"ArrowDown"===t.key){var a=function(){var e=ht(o.getState()),t=n.environment.document.getElementById(jt(n.id,"item-".concat(o.getState().activeItemId),null==e?void 0:e.source));t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t.scrollIntoView(!1))},s=function(){var e=ht(o.getState());if(null!==o.getState().activeItemId&&e){var n=e.item,a=e.itemInputValue,s=e.itemUrl,l=e.source;l.onActive(Tt({event:t,item:n,itemInputValue:a,itemUrl:s,refresh:r,source:l,state:o.getState()},i))}};t.preventDefault(),!1===o.getState().isOpen&&(n.openOnFocus||Boolean(o.getState().query))?Ot(Tt({event:t,props:n,query:o.getState().query,refresh:r,store:o},i)).then(function(){o.dispatch(t.key,{nextActiveItemId:n.defaultActiveItemId}),s(),setTimeout(a,0)}):(o.dispatch(t.key,{}),s(),a())}else if("Escape"===t.key)t.preventDefault(),o.dispatch(t.key,null),o.pendingRequests.cancelAll();else if("Tab"===t.key)o.dispatch("blur",null),o.pendingRequests.cancelAll();else if("Enter"===t.key){if(null===o.getState().activeItemId||o.getState().collections.every(function(e){return 0===e.items.length})){var l=It(n.plugins,o.pendingRequests);return void(void 0!==l?l.then(o.pendingRequests.cancelAll):n.debug||o.pendingRequests.cancelAll())}t.preventDefault();var c=ht(o.getState()),u=c.item,d=c.itemInputValue,p=c.itemUrl,f=c.source;if(t.metaKey||t.ctrlKey)void 0!==p&&(f.onSelect(Tt({event:t,item:u,itemInputValue:d,itemUrl:p,refresh:r,source:f,state:o.getState()},i)),n.navigator.navigateNewTab({itemUrl:p,item:u,state:o.getState()}));else if(t.shiftKey)void 0!==p&&(f.onSelect(Tt({event:t,item:u,itemInputValue:d,itemUrl:p,refresh:r,source:f,state:o.getState()},i)),n.navigator.navigateNewWindow({itemUrl:p,item:u,state:o.getState()}));else if(t.altKey);else{if(void 0!==p)return f.onSelect(Tt({event:t,item:u,itemInputValue:d,itemUrl:p,refresh:r,source:f,state:o.getState()},i)),void n.navigator.navigate({itemUrl:p,item:u,state:o.getState()});Ot(Tt({event:t,nextState:{isOpen:!1},props:n,query:d,refresh:r,store:o},i)).then(function(){f.onSelect(Tt({event:t,item:u,itemInputValue:d,itemUrl:p,refresh:r,source:f,state:o.getState()},i))})}}}(qt({event:e,props:t,refresh:n,store:r},o))},onFocus:a,onBlur:ne,onClick:function(n){e.inputElement!==t.environment.document.activeElement||r.getState().isOpen||a(n)}},d)},getPanelProps:function(e){return qt({onMouseDown:function(e){e.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},e)},getListProps:function(e){var n=e||{},r=n.source,o=Wt(n,zt);return qt({role:"listbox","aria-labelledby":jt(t.id,"label"),id:jt(t.id,"list",r)},o)},getItemProps:function(e){var i=e.item,a=e.source,s=Wt(e,Bt);return qt({id:jt(t.id,"item-".concat(i.__autocomplete_id),a),role:"option","aria-selected":r.getState().activeItemId===i.__autocomplete_id,onMouseMove:function(e){if(i.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",i.__autocomplete_id);var t=ht(r.getState());if(null!==r.getState().activeItemId&&t){var a=t.item,s=t.itemInputValue,l=t.itemUrl,c=t.source;c.onActive(qt({event:e,item:a,itemInputValue:s,itemUrl:l,refresh:n,source:c,state:r.getState()},o))}}},onMouseDown:function(e){e.preventDefault()},onClick:function(e){var s=a.getItemInputValue({item:i,state:r.getState()}),l=a.getItemUrl({item:i,state:r.getState()});(l?Promise.resolve():Ot(qt({event:e,nextState:{isOpen:!1},props:t,query:s,refresh:n,store:r},o))).then(function(){a.onSelect(qt({event:e,item:i,itemInputValue:s,itemUrl:l,refresh:n,source:a,state:r.getState()},o))})}},s)}}}var Kt=[{segment:"autocomplete-core",version:"1.19.2"}];function Yt(e){return Yt="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},Yt(e)}function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(n),!0).forEach(function(t){Qt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qt(e,t,n){return(t=function(e){var t=function(e){if("object"!==Yt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Yt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xt(e){var t,n,r,o,i=e.plugins,a=e.options,s=null===(t=((null===(n=a.__autocomplete_metadata)||void 0===n?void 0:n.userAgents)||[])[0])||void 0===t?void 0:t.segment,l=s?Qt({},s,Object.keys((null===(r=a.__autocomplete_metadata)||void 0===r?void 0:r.options)||{})):{};return{plugins:i.map(function(e){return{name:e.name,options:Object.keys(e.__autocomplete_pluginOptions||[])}}),options:Jt({"autocomplete-core":Object.keys(a)},l),ua:Kt.concat((null===(o=a.__autocomplete_metadata)||void 0===o?void 0:o.userAgents)||[])}}function en(e){var t,n=e.state;return!1===n.isOpen||null===n.activeItemId?null:(null===(t=ht(n))||void 0===t?void 0:t.itemInputValue)||null}function tn(e,t,n,r){if(!n)return null;if(e<0&&(null===t||null!==r&&0===t))return n+e;var o=(null===t?-1:t)+e;return o<=-1||o>=n?null===r?null:0:o}function nn(e){return nn="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},nn(e)}function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rn(Object(n),!0).forEach(function(t){an(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function an(e,t,n){return(t=function(e){var t=function(e){if("object"!==nn(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===nn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var sn=function(e,t){switch(t.type){case"setActiveItemId":case"mousemove":return on(on({},e),{},{activeItemId:t.payload});case"setQuery":return on(on({},e),{},{query:t.payload,completion:null});case"setCollections":return on(on({},e),{},{collections:t.payload});case"setIsOpen":return on(on({},e),{},{isOpen:t.payload});case"setStatus":return on(on({},e),{},{status:t.payload});case"setContext":return on(on({},e),{},{context:on(on({},e.context),t.payload)});case"ArrowDown":var n=on(on({},e),{},{activeItemId:t.payload.hasOwnProperty("nextActiveItemId")?t.payload.nextActiveItemId:tn(1,e.activeItemId,He(e),t.props.defaultActiveItemId)});return on(on({},n),{},{completion:en({state:n})});case"ArrowUp":var r=on(on({},e),{},{activeItemId:tn(-1,e.activeItemId,He(e),t.props.defaultActiveItemId)});return on(on({},r),{},{completion:en({state:r})});case"Escape":return e.isOpen?on(on({},e),{},{activeItemId:null,isOpen:!1,completion:null}):on(on({},e),{},{activeItemId:null,query:"",status:"idle",collections:[]});case"submit":return on(on({},e),{},{activeItemId:null,isOpen:!1,status:"idle"});case"reset":return on(on({},e),{},{activeItemId:!0===t.props.openOnFocus?t.props.defaultActiveItemId:null,status:"idle",completion:null,query:""});case"focus":return on(on({},e),{},{activeItemId:t.props.defaultActiveItemId,isOpen:(t.props.openOnFocus||Boolean(e.query))&&t.props.shouldPanelOpen({state:e})});case"blur":return t.props.debug?e:on(on({},e),{},{isOpen:!1,activeItemId:null});case"mouseleave":return on(on({},e),{},{activeItemId:t.props.defaultActiveItemId});default:return"The reducer action ".concat(JSON.stringify(t.type)," is not supported."),e}};function ln(e){return ln="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},ln(e)}function cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cn(Object(n),!0).forEach(function(t){dn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dn(e,t,n){return(t=function(e){var t=function(e){if("object"!==ln(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ln(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e){var t=[],n=Je(e,t),r=function(e,t,n){var r,o=t.initialState;return{getState:function(){return o},dispatch:function(r,i){var a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach(function(t){Ne(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},o);o=e(o,{type:r,props:t,payload:i}),n({state:o,prevState:a})},pendingRequests:(r=[],{add:function(e){return r.push(e),e.finally(function(){r=r.filter(function(t){return t!==e})})},cancelAll:function(){r.forEach(function(e){return e.cancel()})},isEmpty:function(){return 0===r.length},wait:function(e){return Ae?(Ae=!1,Pe=e?Promise.race([Promise.all(r),new Promise(function(t){return setTimeout(t,e)})]):Promise.all(r),Pe.then(function(){Ae=!0})):Pe}})}}(sn,n,function(e){var t,r,i=e.prevState,c=e.state;if(n.onStateChange(un({prevState:i,state:c,refresh:a,navigator:n.navigator},o)),!l()&&null!==(t=c.context)&&void 0!==t&&null!==(r=t.algoliaInsightsPlugin)&&void 0!==r&&r.__automaticInsights&&!1!==n.insights){var u=Ce({__autocomplete_clickAnalytics:!1});n.plugins.push(u),s([u])}}),o=function(e){var t=e.store;return{setActiveItemId:function(e){t.dispatch("setActiveItemId",e)},setQuery:function(e){t.dispatch("setQuery",e)},setCollections:function(e){var n=0,r=e.map(function(e){return Fe(Fe({},e),{},{items:Re(e.items).map(function(e){return Fe(Fe({},e),{},{__autocomplete_id:n++})})})});t.dispatch("setCollections",r)},setIsOpen:function(e){t.dispatch("setIsOpen",e)},setStatus:function(e){t.dispatch("setStatus",e)},setContext:function(e){t.dispatch("setContext",e)}}}({store:r}),i=Gt(un({props:n,refresh:a,store:r,navigator:n.navigator},o));function a(){return Ot(un({event:new Event("input"),nextState:{isOpen:r.getState().isOpen},props:n,navigator:n.navigator,query:r.getState().query,refresh:a,store:r},o))}function s(e){e.forEach(function(e){var r;return null===(r=e.subscribe)||void 0===r?void 0:r.call(e,un(un({},o),{},{navigator:n.navigator,refresh:a,onSelect:function(e){t.push({onSelect:e})},onActive:function(e){t.push({onActive:e})},onResolve:function(e){t.push({onResolve:e})}}))})}function l(){return n.plugins.some(function(e){return"aa.algoliaInsightsPlugin"===e.name})}if(n.insights&&!l()){var c="boolean"==typeof n.insights?{}:n.insights;n.plugins.push(Ce(c))}return s(n.plugins),function(e){var t,n,r=e.metadata,o=e.environment;if(null===(t=o.navigator)||void 0===t||null===(n=t.userAgent)||void 0===n?void 0:n.includes("Algolia Crawler")){var i=o.document.createElement("meta"),a=o.document.querySelector("head");i.name="algolia:metadata",setTimeout(function(){i.content=JSON.stringify(r),a.appendChild(i)},0)}}({metadata:Xt({plugins:n.plugins,options:e}),environment:n.environment}),un(un({refresh:a,navigator:n.navigator},i),o)}function fn(e){return fn="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},fn(e)}var hn=["params"];function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach(function(t){bn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bn(e,t,n){return(t=function(e){var t=function(e){if("object"!==fn(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==fn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===fn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vn(e){return function(e){if(Array.isArray(e))return yn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return yn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yn(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wn(e){return wn="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},wn(e)}function kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kn(Object(n),!0).forEach(function(t){Sn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sn(e,t,n){return(t=function(e){var t=function(e){if("object"!==wn(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==wn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===wn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var On=function(){function e(e){return function(e){var t=e.searchClient,n=e.queries,r=e.userAgents,o=void 0===r?[]:r;"function"==typeof t.addAlgoliaAgent&&[].concat(vn(Kt),vn(o)).forEach(function(e){var n=e.segment,r=e.version;t.addAlgoliaAgent(n,r)});var i=function(e){var t=e.transporter||{},n=t.headers||t.baseHeaders||{},r=t.queryParameters||t.baseQueryParameters||{},o="x-algolia-application-id",i="x-algolia-api-key";return{appId:n[o]||r[o],apiKey:n[i]||r[i]}}(t),a=i.appId,s=i.apiKey;return Boolean(a),Boolean(s),t.search(n.map(function(e){var t=e.params;return gn(gn({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,hn)),{},{params:gn({hitsPerPage:5,highlightPreTag:"__aa-highlight__",highlightPostTag:"__/aa-highlight__"},t)})})).then(function(e){return e.results.map(function(e,t){var r;return gn(gn({},e),{},{hits:null===(r=e.hits)||void 0===r?void 0:r.map(function(r){return gn(gn({},r),{},{__autocomplete_indexName:e.index||n[t].indexName,__autocomplete_queryID:e.queryID,__autocomplete_algoliaCredentials:{appId:a,apiKey:s}})})})})})}({searchClient:e.searchClient,queries:e.requests.map(function(e){return e.query})}).then(function(t){return t.map(function(t,n){var r=e.requests[n];return{items:t,sourceId:r.sourceId,transformResponse:r.transformResponse}})})}return function(t){return function(n){return xn(xn({requesterId:"algolia",execute:e},t),n)}}}();function jn(e){return jn="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},jn(e)}const Cn=(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(o.Path,{d:"M13 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z"})}),In=(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(o.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"})}),En=window.wp.components,Pn=function({appId:e,apiKey:t,authMode:n,algoliaAgents:r,...o}){const i=function(e,t,n="WithinHeaders"){const r={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===n?r:{},queryParameters:()=>"WithinQueryParameters"===n?r:{}}}(e,t,n),a=function({hosts:e,hostsCache:t,baseHeaders:n,logger:r,baseQueryParameters:o,algoliaAgent:i,timeouts:a,requester:s,requestsCache:l,responsesCache:c}){async function u(l,c,u=!0){const d=[],p=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const n=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(n)}(l,c),f=function(e,t,n){const r={Accept:"application/json",...e,...t,...n},o={};return Object.keys(r).forEach(e=>{const t=r[e];o[e.toLowerCase()]=t}),o}(n,l.headers,c.headers),h="GET"===l.method?{...l.data,...c.data}:{},m={...o,...l.queryParameters,...h};if(i.value&&(m["x-algolia-agent"]=i.value),c&&c.queryParameters)for(const e of Object.keys(c.queryParameters))c.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(c.queryParameters[e])?m[e]=c.queryParameters[e].toString():m[e]=c.queryParameters[e];let g=0;const b=async(e,n)=>{const o=e.pop();if(void 0===o)throw new $(function(e){return e.map(e=>Z(e))}(d));const i={...a,...c.timeouts},h={data:p,headers:f,method:l.method,url:Y(o,l.path,m),connectTimeout:n(g,i.connect),responseTimeout:n(g,u?i.read:i.write)},v=t=>{const n={request:h,response:t,host:o,triesLeft:e.length};return d.push(n),n},y=await s.send(h);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0===~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(y)){const i=v(y);return y.isTimedOut&&g++,r.info("Retryable failure",Z(i)),await t.set(o,B(o,y.isTimedOut?"timed out":"down")),b(e,n)}if(function({status:e}){return 2==~~(e/100)}(y))return function(e){try{return JSON.parse(e.content)}catch(t){throw new G(t.message,e)}}(y);throw v(y),function({content:e,status:t},n){try{const r=JSON.parse(e);return"error"in r?new K(r.message,t,r.error,n):new W(r.message,t,n)}catch{}return new W(e,t,n)}(y,d)},v=e.filter(e=>"readWrite"===e.accept||(u?"read"===e.accept:"write"===e.accept)),y=await async function(e){const n=await Promise.all(e.map(e=>t.get(e,()=>Promise.resolve(B(e))))),r=n.filter(e=>e.isUp()),o=n.filter(e=>e.isTimedOut()),i=[...r,...o];return{hosts:i.length>0?i:e,getTimeout:(e,t)=>(0===o.length&&0===e?1:o.length+3+e)*t}}(v);return b([...y.hosts].reverse(),y.getTimeout)}return{hostsCache:t,requester:s,timeouts:a,logger:r,algoliaAgent:i,baseHeaders:n,baseQueryParameters:o,hosts:e,request:function(e,t={}){const r=e.useReadTransporter||"GET"===e.method;if(!r)return u(e,t,r);const i=()=>u(e,t);if(!0!==(t.cacheable||e.cacheable))return i();const a={request:e,requestOptions:t,transporter:{queryParameters:o,headers:n}};return c.get(a,()=>l.get(a,()=>l.set(a,i()).then(e=>Promise.all([l.delete(a),e]),e=>Promise.all([l.delete(a),Promise.reject(e)])).then(([e,t])=>t)),{miss:e=>c.set(a,e)})},requestsCache:l,responsesCache:c}}({hosts:Q(e),...o,algoliaAgent:H({algoliaAgents:r,client:"Lite",version:J}),baseHeaders:{"content-type":"text/plain",...i.headers(),...o.baseHeaders},baseQueryParameters:{...i.queryParameters(),...o.baseQueryParameters}});return{transporter:a,appId:e,apiKey:t,clearCache:()=>Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then(()=>{}),get _ua(){return a.algoliaAgent.value},addAlgoliaAgent(e,t){a.algoliaAgent.add({segment:e,version:t})},setClientApiKey({apiKey:e}){n&&"WithinHeaders"!==n?a.baseQueryParameters["x-algolia-api-key"]=e:a.baseHeaders["x-algolia-api-key"]=e},searchForHits(e,t){return this.search(e,t)},searchForFacets(e,t){return this.search(e,t)},customPost({path:e,parameters:t,body:n},r){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const o={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:n||{}};return a.request(o,r)},getRecommendations(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const n={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return a.request(n,t)},search(e,t){if(e&&Array.isArray(e)){const t={requests:e.map(({params:e,...t})=>"facet"===t.type?{...t,...e,type:"facet"}:{...t,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})};e=t}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const n={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return a.request(n,t)}}}({appId:An="A3VQNQXTF3",apiKey:"1490aefba5f869d86cc5e27099af3306",timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:(e,t)=>Promise.resolve(),info:(e,t)=>Promise.resolve(),error:(e,t)=>Promise.resolve()},requester:{send:function(e){return new Promise(t=>{let n=new XMLHttpRequest;n.open(e.method,e.url,!0),Object.keys(e.headers).forEach(t=>n.setRequestHeader(t,e.headers[t]));let r,o=(e,r)=>setTimeout(()=>{n.abort(),t({status:0,content:r,isTimedOut:!0})},e),i=o(e.connectTimeout,"Connection timeout");n.onreadystatechange=()=>{n.readyState>n.OPENED&&void 0===r&&(clearTimeout(i),r=o(e.responseTimeout,"Socket timeout"))},n.onerror=()=>{0===n.status&&(clearTimeout(i),clearTimeout(r),t({content:n.responseText||"Network request failed",status:n.status,isTimedOut:!1}))},n.onload=()=>{clearTimeout(i),clearTimeout(r),t({content:n.responseText,status:n.status,isTimedOut:!1})},n.send(e.data)})}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:V(),requestsCache:V({serializable:!1}),hostsCache:F({caches:[M({key:`${J}-${An}`}),V()]})});var An;function Tn(n){const[r,o]=(0,e.useState)({}),[a,s]=(0,e.useState)(!0),[l,c]=(0,e.useState)(!0),[u,d]=(0,e.useState)(""),p=(0,e.useRef)(null),f=(0,e.useRef)(null),h=(0,e.useRef)(null),m=(0,e.useRef)(null);(0,e.useEffect)(()=>{o(e=>({...e,query:n.currentValue}))},[]),(0,e.useEffect)(()=>{d(n.currentValue)},[n.currentValue]),(0,e.useEffect)(()=>{function e(e){p.current&&!p.current.contains(e.target)&&g.setIsOpen(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[p]),(0,e.useEffect)(()=>{s(function(){const{query:e,collections:t}=r;return(""===u||u!==e)&&(!(!e||""===e.trim())&&(!function(){const{collections:e,query:t}=r;return!(!Array.isArray(e)||!Array.isArray(e[0]?.items))&&!!e[0].items.filter(e=>e.name.toLowerCase()===t.toLowerCase()).length}()&&!(!l&&e&&t?.[0]?.items&&0===t[0].items.length)))}())},[r.query,r.collections]),(0,e.useEffect)(()=>{const e=document.querySelector(".components-modal__frame.stellarwp").getBoundingClientRect(),t=m.current.getBoundingClientRect().bottom+180>e.bottom?"top":"bottom";if(r.isOpen){const e=document.querySelector(".aa-PanelWrapper"),n=e.clientHeight;"top"===t&&(e.style.top=`-${56+n}px`)}},[r.isOpen]);const g=(0,e.useMemo)(()=>pn({onStateChange({state:e}){o(e)},getSources:()=>[{sourceId:"industries",getItemInputValue:({item:e})=>e.query,getItems({query:e}){return jn((t={searchClient:Pn,queries:[{indexName:"ai_modal_industries",query:e,params:{hitsPerPage:8,highlightPreTag:"<mark>",highlightPostTag:"</mark>"}}]}).searchClient),On({transformResponse:function(e){return e.hits}})(t);var t},onSelect:e=>{n.onSelect(e.item.name),e.setQuery(e.item.name),c(!1)}}],openOnFocus:!1,...n}),[]);return(0,i.jsxs)("div",{ref:p,className:"stellarwp-autocomplete-control",children:[n.label?(0,i.jsx)("label",{className:"components-input-control__label",children:n.label}):null,(0,i.jsx)("div",{className:"components-input-control__container",children:(0,i.jsxs)("div",{className:"aa-Autocomplete",...g.getRootProps({}),children:[(0,i.jsxs)("form",{className:"aa-Form",ref:f,...g.getFormProps({inputElement:h.current}),children:[(0,i.jsx)("div",{className:"aa-InputWrapperPrefix",children:(0,i.jsx)(En.Button,{className:"aa-SubmitButton",icon:Cn,type:"submit",title:(0,t.__)("Submit","kadence-blocks")})}),(0,i.jsx)("div",{className:"aa-InputWrapper",children:(0,i.jsx)("input",{className:"aa-Input",ref:h,...g.getInputProps({}),onKeyDown:function(){c(!0)}})}),(0,i.jsx)("div",{className:"aa-InputWrapperSuffix",children:r.query&&(0,i.jsx)(En.Button,{className:"aa-ClearButton",onClick:function(){n.onSelect(""),g.setQuery(""),g.refresh(),h.current.focus(),c(!0)},icon:In})})]}),(0,i.jsx)("div",{ref:m,className:["aa-Panel","stalled"===r.status&&"aa-Panel--stalled"].filter(Boolean).join(" "),...g.getPanelProps({}),children:(r.isOpen||a)&&(0,i.jsxs)("div",{className:"aa-PanelWrapper",children:[r.collections&&r.collections.map((e,t)=>{const{source:n,items:r}=e;return(0,i.jsx)("div",{className:"aa-Source",children:r.length>0&&(0,i.jsx)("ul",{className:"aa-List",...g.getListProps(),children:r.map(e=>(0,i.jsx)("li",{className:"aa-Item",...g.getItemProps({item:e,source:n}),dangerouslySetInnerHTML:{__html:e?._highlightResult?.name?.value?e._highlightResult.name.value:e.name}},e.objectID))})},`source-${t}`)}),a&&(0,i.jsx)(En.Button,{className:"aa-ItemCreate",text:`+ ${(0,t.__)("Add","kadence-blocks")}: "${r.query}"`,onClick:function(){n.onSelect(r.query),o(e=>({...e,isOpen:!1})),c(!0),s(!1)}})]})})]})})]})}function Ln(e){const{className:t="",...n}=e;return(0,i.jsx)(En.Button,{className:`stellarwp ${t}`,...n})}var Nn=n(6942),Rn=n.n(Nn);function Dn(e){const{onDelete:n,text:r,className:o}=e,a=Rn()("stellarwp","chip",o,{"has-icon":n});let s=null;return n&&(s=(0,i.jsx)(En.Button,{icon:"no-alt",label:(0,t.__)("Delete Selection","kadence-blocks"),isSmall:!0,onClick:function(e){n&&n(e)}})),(0,i.jsxs)("div",{className:a,children:[r&&(0,i.jsx)("span",{children:r}),s]})}function Mn(){return(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,i.jsx)("path",{d:"M4.37491 3.2665L5.83324 4.08317L5.01658 2.62484L5.83324 1.1665L4.37491 1.98317L2.91658 1.1665L3.73325 2.62484L2.91658 4.08317L4.37491 3.2665ZM11.3749 8.98317L9.91658 8.1665L10.7332 9.62484L9.91658 11.0832L11.3749 10.2665L12.8332 11.0832L12.0166 9.62484L12.8332 8.1665L11.3749 8.98317ZM12.8332 1.1665L11.3749 1.98317L9.91658 1.1665L10.7332 2.62484L9.91658 4.08317L11.3749 3.2665L12.8332 4.08317L12.0166 2.62484L12.8332 1.1665ZM8.38241 4.25234C8.15491 4.02484 7.78741 4.02484 7.55991 4.25234L0.752412 11.0598C0.524912 11.2873 0.524912 11.6548 0.752412 11.8823L2.11741 13.2473C2.34491 13.4748 2.71241 13.4748 2.93991 13.2473L9.74158 6.44567C9.96908 6.21817 9.96908 5.85067 9.74158 5.62317L8.38241 4.25234ZM7.78158 7.45484L6.54491 6.21817L7.96825 4.79484L9.20491 6.0315L7.78158 7.45484Z",fill:"black"})})}function Fn(){return(0,i.jsx)(o.SVG,{width:"37",height:"28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.884 27.9986H18.946C18.0865 27.9986 17.3888 27.3007 17.3888 26.4412C17.3888 25.5819 18.0865 24.884 18.946 24.884H24.1313C24.9405 24.8285 25.5806 24.1537 25.5806 23.3307C25.5806 22.4711 24.8828 21.7735 24.0233 21.7735H20.2322V21.7732H15.9094C15.0511 21.7732 14.3543 21.0765 14.3543 20.2182C14.3543 19.3599 15.0511 18.663 15.9094 18.663H16.8888L16.8868 18.661H18.3429C19.2008 18.661 19.8974 17.9646 19.8974 17.1067C19.8974 16.2488 19.2008 15.5525 18.3429 15.5525H14.6805V15.5511H7.00023C6.14238 15.5511 5.44581 14.8545 5.44581 13.9965C5.44581 13.1386 6.14238 12.442 7.00023 12.442H14.6805V12.4377H17.6876C18.5447 12.4377 19.2405 11.7418 19.2405 10.8846C19.2405 10.0274 18.5447 9.33155 17.6876 9.33155H17.0022L17.0023 9.33127H13.8087C12.9504 9.33127 12.2538 8.63444 12.2538 7.77632C12.2538 6.91786 12.9504 6.22103 13.8087 6.22103H21.183C21.2199 6.22103 21.2562 6.22227 21.2923 6.22475H23.9282C24.7875 6.22475 25.4853 5.52707 25.4853 4.66756C25.4853 3.80817 24.7875 3.11051 23.9282 3.11051H20.0535C19.247 3.05199 18.6102 2.37846 18.6102 1.55731C18.6102 0.697791 19.3078 2.94949e-10 20.1674 2.94949e-10H26.2711C26.2778 2.94949e-10 26.2844 -1.12778e-06 26.2916 0.000136145H33.4883L20.8783 13.7713L36.1306 28H26.9253L26.9231 27.9979C26.9102 27.9985 26.8972 27.9986 26.884 27.9986ZM11.9428 24.884C12.7993 24.884 13.4946 25.5793 13.4946 26.4357C13.4946 27.2922 12.7993 27.9874 11.9428 27.9874H6.24843C5.39208 27.9874 4.69675 27.2922 4.69675 26.4357C4.69675 25.5793 5.39208 24.884 6.24843 24.884H11.9428ZM9.68846 18.663C10.5474 18.663 11.2448 19.3603 11.2448 20.2195C11.2448 21.0783 10.5474 21.7758 9.68846 21.7758C8.82933 21.7758 8.13199 21.0783 8.13199 20.2195C8.13199 19.3603 8.82933 18.663 9.68846 18.663ZM1.55636 12.442C2.41547 12.442 3.11285 13.1393 3.11285 13.9984C3.11285 14.8574 2.41547 15.5548 1.55636 15.5548C0.697378 15.5548 0 14.8574 0 13.9984C0 13.1393 0.697378 12.442 1.55636 12.442ZM7.58797 6.22103C8.44693 6.22103 9.14443 6.91842 9.14443 7.7775C9.14443 8.63652 8.44693 9.33374 7.58797 9.33374C6.729 9.33374 6.0315 8.63652 6.0315 7.7775C6.0315 6.91842 6.729 6.22103 7.58797 6.22103ZM13.1696 2.94949e-10C14.0261 2.94949e-10 14.7213 0.695322 14.7213 1.55169C14.7213 2.4082 14.0261 3.10353 13.1696 3.10353H9.5702C8.71383 3.10353 8.01846 2.4082 8.01846 1.55169C8.01846 0.695322 8.71366 2.94949e-10 9.5702 2.94949e-10H13.1696Z",fill:"#0073E6"})})}function Vn(){return(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:(0,i.jsx)("path",{d:"M5.25003 9.43241L2.81753 6.99991L1.9892 7.82241L5.25003 11.0832L12.25 4.08324L11.4275 3.26074L5.25003 9.43241Z",fill:"#0073E6"})})}function Hn(){return(0,i.jsxs)(o.SVG,{width:"12",height:"12",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:[(0,i.jsx)("style",{children:"\n .spinner_qM83 { animation: spinner_8HQG 1.05s infinite; }\n .spinner_oXPr { animation-delay: 0.1s; }\n .spinner_ZTLf { animation-delay: 0.2s; }\n\t\t\t\t@keyframes spinner_8HQG {\n\t\t\t\t\t0%, 57.14% {\n\t\t\t\t\t\tanimation-timing-function: cubic-bezier(0.33, 0.66, 0.66, 1);\n\t\t\t\t\t\ttransform: translate(0);\n\t\t\t\t\t}\n\t\t\t\t\t28.57% {\n\t\t\t\t\t\tanimation-timing-function: cubic-bezier(0.33, 0, 0.66, 0.33);\n\t\t\t\t\t\ttransform: translateY(-3px);\n\t\t\t\t\t}\n\t\t\t\t\t100% {\n\t\t\t\t\t\ttransform: translate(0);\n\t\t\t\t\t}\n\t\t\t\t}\n "}),(0,i.jsx)("circle",{className:"spinner_qM83",cx:"2",cy:"6",r:"1"}),(0,i.jsx)("circle",{className:"spinner_qM83 spinner_oXPr",cx:"6",cy:"6",r:"1"}),(0,i.jsx)("circle",{className:"spinner_qM83 spinner_ZTLf",cx:"10",cy:"6",r:"1"})]})}function zn(){return(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"12",viewBox:"0 0 14 12",fill:"none",children:(0,i.jsx)("path",{d:"M5.06667 7.71667L5.90132 5.90132L7.71667 5.06667L5.90132 4.23202L5.06667 2.41667L4.23202 4.23202L2.41667 5.06667L4.23202 5.90132L5.06667 7.71667ZM5.06667 10.1333L3.48333 6.65L0 5.06667L3.48333 3.48333L5.06667 0L6.65 3.48333L10.1333 5.06667L6.65 6.65L5.06667 10.1333ZM10.8 12L10.0167 10.25L8.26667 9.46667L10.0167 8.66667L10.8 6.93333L11.6 8.66667L13.3333 9.46667L11.6 10.25L10.8 12Z",fill:"#0073E6"})})}function Bn(){return(0,i.jsx)(o.SVG,{width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M8.00008 3C4.66675 3 1.82008 5.07333 0.666748 8C1.82008 10.9267 4.66675 13 8.00008 13C11.3334 13 14.1801 10.9267 15.3334 8C14.1801 5.07333 11.3334 3 8.00008 3ZM8.00008 11.3333C6.16008 11.3333 4.66675 9.84 4.66675 8C4.66675 6.16 6.16008 4.66667 8.00008 4.66667C9.84008 4.66667 11.3334 6.16 11.3334 8C11.3334 9.84 9.84008 11.3333 8.00008 11.3333ZM8.00008 6C6.89341 6 6.00008 6.89333 6.00008 8C6.00008 9.10667 6.89341 10 8.00008 10C9.10675 10 10.0001 9.10667 10.0001 8C10.0001 6.89333 9.10675 6 8.00008 6Z",fill:"black"})})}function Un(){return(0,i.jsx)(o.SVG,{width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M7.99996 4.66667C9.83996 4.66667 11.3333 6.16 11.3333 8C11.3333 8.43333 11.2466 8.84 11.0933 9.22L13.04 11.1667C14.0466 10.3267 14.84 9.24 15.3266 8C14.1733 5.07333 11.3266 3 7.99329 3C7.05996 3 6.16663 3.16667 5.33996 3.46667L6.77996 4.90667C7.15996 4.75333 7.56663 4.66667 7.99996 4.66667ZM1.33329 2.84667L3.15996 4.67333C2.05329 5.53333 1.18663 6.68 0.666626 8C1.81996 10.9267 4.66663 13 7.99996 13C9.03329 13 10.02 12.8 10.92 12.44L11.2 12.72L13.1533 14.6667L14 13.82L2.17996 2L1.33329 2.84667ZM5.01996 6.53333L6.05329 7.56667C6.01996 7.70667 5.99996 7.85333 5.99996 8C5.99996 9.10667 6.89329 10 7.99996 10C8.14663 10 8.29329 9.98 8.43329 9.94667L9.46663 10.98C9.01996 11.2 8.52663 11.3333 7.99996 11.3333C6.15996 11.3333 4.66663 9.84 4.66663 8C4.66663 7.47333 4.79996 6.98 5.01996 6.53333ZM7.89329 6.01333L9.99329 8.11333L10.0066 8.00667C10.0066 6.9 9.11329 6.00667 8.00663 6.00667L7.89329 6.01333Z",fill:"black"})})}function qn(n){const{id:r,tags:o,maxTags:a,selectedTags:s,suggestedKeywords:l,suggestedKeywordsState:c,children:u,placeholder:d,onSuggestedKeywordAdded:p,onTryAgain:f,onTagDeleted:h,...m}=n,g=r?`inspector-chips-input-control-${r}`:"",[b,v]=(0,e.useState)(""),[y,_]=(0,e.useState)();function w(){const e=b.replace(",","").trim(),t=[...o];0!==e.length&&(-1===t.indexOf(e)?(t.push(e),s(t),v("")):v(""))}return(0,i.jsxs)(En.BaseControl,{className:"stellarwp-chips-input",id:g,...m,children:[(0,i.jsxs)("div",{className:"stellarwp-chips-input__control",onClick:()=>y&&y.focus(),children:[Array.isArray(o)&&o.map((e,t)=>(0,i.jsx)(Dn,{text:e,className:"chip--blue",onDelete:()=>function(e){const t=[...o];t.splice(t.indexOf(e),1),s(t),h(e)}(e)},t)),Array.isArray(o)&&o.length<a&&(0,i.jsx)("input",{id:g,ref:_,className:"stellarwp-chips-input__input",type:"text",value:b,onKeyUp:function(e){const t="Enter"===e.key,n=","===e.key;(t||n)&&(e.preventDefault(),w())},onBlur:function(e){e.preventDefault(),w()},onChange:e=>{var t;" "!==(t=e.target.value)&&","!==t&&v(t)},placeholder:d&&o.length<a?d:""})]}),c!==P&&(0,i.jsx)("div",{className:"stellarwp-chips-input__suggestions",children:(()=>{switch(c){case j:return(0,i.jsxs)("div",{className:"stellarwp-chips-input__suggestions-loading",children:[(0,i.jsx)(En.Icon,{icon:zn}),(0,t.__)("Kadence is looking for Keyword Suggestions","kadence-blocks"),(0,i.jsx)(En.Icon,{icon:Hn})]});case E:return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"stellarwp-chips-input__suggestions-title",children:(0,t.__)("Suggested Keywords","kadence-blocks")}),(0,i.jsx)("ul",{className:"stellarwp-chips-input__suggestions-list",children:l.map((e,t)=>(0,i.jsx)("li",{className:"stellarwp-chips-input__suggestions-list-item",children:(0,i.jsx)("button",{onClick:()=>function(e){if(o.length>=a)return;const t=[...o];t.push(e),s(t),v(""),p(e)}(e),className:"stellarwp-chips-input__suggestions-button",children:e})},`${e}`))})]});case C:return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"stellarwp-chips-input__suggestions-title",children:(0,t.__)("We couldn’t find any good Keywords.","kadence-blocks")}),(0,i.jsx)("div",{className:"stellarwp-chips-input__suggestions-description",children:(0,t.__)("No worries, you can add your own keywords. Make sure to use words that directly relate to your website's content and what you do. The more the better.","kadence-blocks")})]});case I:return(0,i.jsxs)(En.Flex,{children:[(0,i.jsx)(En.FlexItem,{children:(0,i.jsx)("div",{className:"stellarwp-chips-input__suggestions-title",children:(0,t.__)("Oops! Something went wrong.","kadence-blocks")})}),(0,i.jsx)(En.FlexItem,{children:(0,i.jsx)(En.Button,{onClick:f,variant:"link",className:"stellarwp-chips-input__suggestions-try-button",children:(0,t.__)("Try again.","kadence-blocks")})})]});default:return(0,i.jsx)(i.Fragment,{})}})()})]})}function $n(){return $n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$n.apply(null,arguments)}var Wn=n(1609);function Gn(e){return Gn="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},Gn(e)}function Kn(e){var t=function(e){if("object"!=Gn(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gn(t)?t:t+""}function Yn(e,t,n){return(t=Kn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zn(Object(n),!0).forEach(function(t){Yn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kn(r.key),r)}}function Xn(e,t){return Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xn(e,t)}function er(e){return er=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},er(e)}function tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tr=function(){return!!e})()}function nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rr(e,t){if(e){if("string"==typeof e)return nr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nr(e,t):void 0}}function or(e){return function(e){if(Array.isArray(e))return nr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||rr(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ir=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(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("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];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]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),ar=Math.abs,sr=String.fromCharCode,lr=Object.assign;function cr(e){return e.trim()}function ur(e,t,n){return e.replace(t,n)}function dr(e,t){return e.indexOf(t)}function pr(e,t){return 0|e.charCodeAt(t)}function fr(e,t,n){return e.slice(t,n)}function hr(e){return e.length}function mr(e){return e.length}function gr(e,t){return t.push(e),e}var br=1,vr=1,yr=0,_r=0,wr=0,kr="";function xr(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:br,column:vr,length:a,return:""}}function Sr(e,t){return lr(xr("",null,null,"",null,null,0),e,{length:-e.length},t)}function Or(){return wr=_r>0?pr(kr,--_r):0,vr--,10===wr&&(vr=1,br--),wr}function jr(){return wr=_r<yr?pr(kr,_r++):0,vr++,10===wr&&(vr=1,br++),wr}function Cr(){return pr(kr,_r)}function Ir(){return _r}function Er(e,t){return fr(kr,e,t)}function Pr(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ar(e){return br=vr=1,yr=hr(kr=e),_r=0,[]}function Tr(e){return kr="",e}function Lr(e){return cr(Er(_r-1,Dr(91===e?e+2:40===e?e+1:e)))}function Nr(e){for(;(wr=Cr())&&wr<33;)jr();return Pr(e)>2||Pr(wr)>3?"":" "}function Rr(e,t){for(;--t&&jr()&&!(wr<48||wr>102||wr>57&&wr<65||wr>70&&wr<97););return Er(e,Ir()+(t<6&&32==Cr()&&32==jr()))}function Dr(e){for(;jr();)switch(wr){case e:return _r;case 34:case 39:34!==e&&39!==e&&Dr(wr);break;case 40:41===e&&Dr(e);break;case 92:jr()}return _r}function Mr(e,t){for(;jr()&&e+wr!==57&&(e+wr!==84||47!==Cr()););return"/*"+Er(t,_r-1)+"*"+sr(47===e?e:jr())}function Fr(e){for(;!Pr(Cr());)jr();return Er(e,_r)}var Vr="-ms-",Hr="-moz-",zr="-webkit-",Br="comm",Ur="rule",qr="decl",$r="@keyframes";function Wr(e,t){for(var n="",r=mr(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Gr(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case qr:return e.return=e.return||e.value;case Br:return"";case $r:return e.return=e.value+"{"+Wr(e.children,r)+"}";case Ur:e.value=e.props.join(",")}return hr(n=Wr(e.children,r))?e.return=e.value+"{"+n+"}":""}function Kr(e){return Tr(Yr("",null,null,null,[""],e=Ar(e),0,[0],e))}function Yr(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,m=1,g=1,b=1,v=0,y="",_=o,w=i,k=r,x=y;g;)switch(h=v,v=jr()){case 40:if(108!=h&&58==pr(x,d-1)){-1!=dr(x+=ur(Lr(v),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:x+=Lr(v);break;case 9:case 10:case 13:case 32:x+=Nr(h);break;case 92:x+=Rr(Ir()-1,7);continue;case 47:switch(Cr()){case 42:case 47:gr(Jr(Mr(jr(),Ir()),t,n),l);break;default:x+="/"}break;case 123*m:s[c++]=hr(x)*b;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==b&&(x=ur(x,/\f/g,"")),f>0&&hr(x)-d&&gr(f>32?Qr(x+";",r,n,d-1):Qr(ur(x," ","")+";",r,n,d-2),l);break;case 59:x+=";";default:if(gr(k=Zr(x,t,n,c,u,o,s,y,_=[],w=[],d),i),123===v)if(0===u)Yr(x,t,k,k,_,i,d,s,w);else switch(99===p&&110===pr(x,3)?100:p){case 100:case 108:case 109:case 115:Yr(e,k,k,r&&gr(Zr(e,k,k,0,0,o,s,y,o,_=[],d),w),o,w,d,s,r?_:w);break;default:Yr(x,k,k,k,[""],w,0,s,w)}}c=u=f=0,m=b=1,y=x="",d=a;break;case 58:d=1+hr(x),f=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==Or())continue;switch(x+=sr(v),v*m){case 38:b=u>0?1:(x+="\f",-1);break;case 44:s[c++]=(hr(x)-1)*b,b=1;break;case 64:45===Cr()&&(x+=Lr(jr())),p=Cr(),u=d=hr(y=x+=Fr(Ir())),v++;break;case 45:45===h&&2==hr(x)&&(m=0)}}return i}function Zr(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],f=mr(p),h=0,m=0,g=0;h<r;++h)for(var b=0,v=fr(e,d+1,d=ar(m=a[h])),y=e;b<f;++b)(y=cr(m>0?p[b]+" "+v:ur(v,/&\f/g,p[b])))&&(l[g++]=y);return xr(e,t,n,0===o?Ur:s,l,c,u)}function Jr(e,t,n){return xr(e,t,n,Br,sr(wr),fr(e,2,-2),0)}function Qr(e,t,n,r){return xr(e,t,n,qr,fr(e,0,r),fr(e,r+1,-1),r)}var Xr=function(e,t,n){for(var r=0,o=0;r=o,o=Cr(),38===r&&12===o&&(t[n]=1),!Pr(o);)jr();return Er(e,_r)},eo=new WeakMap,to=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||eo.get(n))&&!r){eo.set(e,!0);for(var o=[],i=function(e,t){return Tr(function(e,t){var n=-1,r=44;do{switch(Pr(r)){case 0:38===r&&12===Cr()&&(t[n]=1),e[n]+=Xr(_r-1,t,n);break;case 2:e[n]+=Lr(r);break;case 4:if(44===r){e[++n]=58===Cr()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=sr(r)}}while(r=jr());return e}(Ar(e),t))}(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},no=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ro(e,t){switch(function(e,t){return 45^pr(e,0)?(((t<<2^pr(e,0))<<2^pr(e,1))<<2^pr(e,2))<<2^pr(e,3):0}(e,t)){case 5103:return zr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return zr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return zr+e+Hr+e+Vr+e+e;case 6828:case 4268:return zr+e+Vr+e+e;case 6165:return zr+e+Vr+"flex-"+e+e;case 5187:return zr+e+ur(e,/(\w+).+(:[^]+)/,zr+"box-$1$2"+Vr+"flex-$1$2")+e;case 5443:return zr+e+Vr+"flex-item-"+ur(e,/flex-|-self/,"")+e;case 4675:return zr+e+Vr+"flex-line-pack"+ur(e,/align-content|flex-|-self/,"")+e;case 5548:return zr+e+Vr+ur(e,"shrink","negative")+e;case 5292:return zr+e+Vr+ur(e,"basis","preferred-size")+e;case 6060:return zr+"box-"+ur(e,"-grow","")+zr+e+Vr+ur(e,"grow","positive")+e;case 4554:return zr+ur(e,/([^-])(transform)/g,"$1"+zr+"$2")+e;case 6187:return ur(ur(ur(e,/(zoom-|grab)/,zr+"$1"),/(image-set)/,zr+"$1"),e,"")+e;case 5495:case 3959:return ur(e,/(image-set\([^]*)/,zr+"$1$`$1");case 4968:return ur(ur(e,/(.+:)(flex-)?(.*)/,zr+"box-pack:$3"+Vr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+zr+e+e;case 4095:case 3583:case 4068:case 2532:return ur(e,/(.+)-inline(.+)/,zr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(hr(e)-1-t>6)switch(pr(e,t+1)){case 109:if(45!==pr(e,t+4))break;case 102:return ur(e,/(.+:)(.+)-([^]+)/,"$1"+zr+"$2-$3$1"+Hr+(108==pr(e,t+3)?"$3":"$2-$3"))+e;case 115:return~dr(e,"stretch")?ro(ur(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==pr(e,t+1))break;case 6444:switch(pr(e,hr(e)-3-(~dr(e,"!important")&&10))){case 107:return ur(e,":",":"+zr)+e;case 101:return ur(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+zr+(45===pr(e,14)?"inline-":"")+"box$3$1"+zr+"$2$3$1"+Vr+"$2box$3")+e}break;case 5936:switch(pr(e,t+11)){case 114:return zr+e+Vr+ur(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return zr+e+Vr+ur(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return zr+e+Vr+ur(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return zr+e+Vr+e+e}return e}var oo=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case qr:e.return=ro(e.value,e.length);break;case $r:return Wr([Sr(e,{value:ur(e.value,"@","@"+zr)})],r);case Ur:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Wr([Sr(e,{props:[ur(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Wr([Sr(e,{props:[ur(t,/:(plac\w+)/,":"+zr+"input-$1")]}),Sr(e,{props:[ur(t,/:(plac\w+)/,":-moz-$1")]}),Sr(e,{props:[ur(t,/:(plac\w+)/,Vr+"input-$1")]})],r)}return""})}}],io=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||oo,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c,u,d,p=[Gr,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(c=[to,no].concat(i,p),u=mr(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,function(e){Wr(Kr(e),f)}(e?e+"{"+t.styles+"}":t.styles),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new ir({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return h.sheet.hydrate(s),h},ao=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},so={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale: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};function lo(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var co=/[A-Z]|^ms/g,uo=/_EMO_([^_]+?)_([^]*?)_EMO_/g,po=function(e){return 45===e.charCodeAt(1)},fo=function(e){return null!=e&&"boolean"!=typeof e},ho=lo(function(e){return po(e)?e:e.replace(co,"-$&").toLowerCase()}),mo=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(uo,function(e,t,n){return bo={name:t,styles:n,next:bo},t})}return 1===so[e]||po(e)||"number"!=typeof t||0===t?t:t+"px"};function go(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return bo={name:o.name,styles:o.styles,next:bo},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)bo={name:a.name,styles:a.styles,next:bo},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=go(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":fo(s)&&(r+=ho(i)+":"+mo(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=go(e,t,a);switch(i){case"animation":case"animationName":r+=ho(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var c=0;c<a.length;c++)fo(a[c])&&(r+=ho(i)+":"+mo(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=bo,l=n(e);return bo=s,go(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var bo,vo=/label:\s*([^\s;{]+)\s*(;|$)/g;function yo(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";bo=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=go(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=go(n,t,e[a]),r&&(o+=i[a]);vo.lastIndex=0;for(var s,l="";null!==(s=vo.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:bo}}var _o,wo,ko=!!Wn.useInsertionEffect&&Wn.useInsertionEffect,xo=ko||function(e){return e()},So=(ko||Wn.useLayoutEffect,Wn.createContext("undefined"!=typeof HTMLElement?io({key:"css"}):null)),Oo=(So.Provider,function(e){return(0,Wn.forwardRef)(function(t,n){var r=(0,Wn.useContext)(So);return e(t,r,n)})}),jo=Wn.createContext({}),Co={}.hasOwnProperty,Io="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Eo=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ao(t,n,r),xo(function(){return function(e,t,n){ao(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)}),null},Po=Oo(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[Io],i=[r],a="";"string"==typeof e.className?a=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=yo(i,void 0,Wn.useContext(jo));a+=t.key+"-"+s.name;var l={};for(var c in e)Co.call(e,c)&&"css"!==c&&c!==Io&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),Wn.createElement(Wn.Fragment,null,Wn.createElement(Eo,{cache:t,serialized:s,isStringTag:"string"==typeof o}),Wn.createElement(o,l))}),Ao=Po,To=(n(4146),function(e,t){var n=arguments;if(null==t||!Co.call(t,"css"))return Wn.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=Ao,o[1]=function(e,t){var n={};for(var r in t)Co.call(t,r)&&(n[r]=t[r]);return n[Io]=e,n}(e,t);for(var i=2;i<r;i++)o[i]=n[i];return Wn.createElement.apply(null,o)});function Lo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return yo(t)}function No(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||rr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ro(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}_o=To||(To={}),wo||(wo=_o.JSX||(_o.JSX={}));const Do=window.ReactDOM,Mo=Math.min,Fo=Math.max,Vo=Math.round,Ho=Math.floor,zo=e=>({x:e,y:e});function Bo(){return"undefined"!=typeof window}function Uo(e){return Wo(e)?(e.nodeName||"").toLowerCase():"#document"}function qo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function $o(e){var t;return null==(t=(Wo(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Wo(e){return!!Bo()&&(e instanceof Node||e instanceof qo(e).Node)}function Go(e){return!!Bo()&&(e instanceof Element||e instanceof qo(e).Element)}function Ko(e){return!!Bo()&&(e instanceof HTMLElement||e instanceof qo(e).HTMLElement)}function Yo(e){return!(!Bo()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof qo(e).ShadowRoot)}const Zo=new Set(["inline","contents"]);function Jo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Xo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Zo.has(o)}const Qo=new Set(["html","body","#document"]);function Xo(e){return qo(e).getComputedStyle(e)}function ei(e){const t=function(e){if("html"===Uo(e))return e;const t=e.assignedSlot||e.parentNode||Yo(e)&&e.host||$o(e);return Yo(t)?t.host:t}(e);return function(e){return Qo.has(Uo(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ko(t)&&Jo(t)?t:ei(t)}function ti(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ei(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=qo(o);if(i){const e=ni(a);return t.concat(a,a.visualViewport||[],Jo(o)?o:[],e&&n?ti(e):[])}return t.concat(o,ti(o,[],n))}function ni(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ri(e){return Go(e)?e:e.contextElement}function oi(e){const t=ri(e);if(!Ko(t))return zo(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=Xo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ko(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Vo(n)!==i||Vo(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?Vo(n.width):n.width)/r,s=(i?Vo(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ii=zo(0);function ai(e){const t=qo(e);return"undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ii}function si(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ri(e);let a=zo(1);t&&(r?Go(r)&&(a=oi(r)):a=oi(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==qo(e))&&t}(i,n,r)?ai(i):zo(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=qo(i),t=r&&Go(r)?qo(r):r;let n=e,o=ni(n);for(;o&&r&&t!==n;){const e=oi(o),t=o.getBoundingClientRect(),r=Xo(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=qo(o),o=ni(n)}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:u,height:d,x:l,y:c})}function li(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}var ci=Wn.useLayoutEffect,ui=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],di=function(){};function pi(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function fi(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(pi(e,a)));return i.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var hi=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===Gn(e)&&null!==e?[e]:[];var t},mi=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,Jn({},Ro(e,ui))},gi=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function bi(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function vi(e){return bi(e)?window.pageYOffset:e.scrollTop}function yi(e,t){bi(e)?window.scrollTo(0,t):e.scrollTop=t}function _i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:di,o=vi(e),i=t-o,a=0;!function t(){var s,l=i*((s=(s=a+=10)/n-1)*s*s+1)+o;yi(e,l),a<n?window.requestAnimationFrame(t):r(e)}()}function wi(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?yi(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&yi(e,Math.max(t.offsetTop-o,0))}function ki(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var xi=!1,Si={get passive(){return xi=!0}},Oi="undefined"!=typeof window?window:{};Oi.addEventListener&&Oi.removeEventListener&&(Oi.addEventListener("p",di,Si),Oi.removeEventListener("p",di,!1));var ji=xi;function Ci(e){return null!=e}function Ii(e,t,n){return e?t:n}var Ei=["children","innerProps"],Pi=["children","innerProps"];var Ai,Ti,Li,Ni=function(e){return"auto"===e?"bottom":e},Ri=(0,Wn.createContext)(null),Di=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,l=((0,Wn.useContext)(Ri)||{}).setPortalPlacement,c=(0,Wn.useRef)(null),u=No((0,Wn.useState)(r),2),d=u[0],p=u[1],f=No((0,Wn.useState)(null),2),h=f[0],m=f[1],g=s.spacing.controlHeight;return ci(function(){var e=c.current;if(e){var t="fixed"===i,s=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,h=p.height,m=p.top,g=n.offsetParent.getBoundingClientRect().top,b=a||bi(u=l)?window.innerHeight:u.clientHeight,v=vi(l),y=parseInt(getComputedStyle(n).marginBottom,10),_=parseInt(getComputedStyle(n).marginTop,10),w=g-_,k=b-m,x=w+v,S=d-v-m,O=f-b+v+y,j=v+m-_,C=160;switch(o){case"auto":case"bottom":if(k>=h)return{placement:"bottom",maxHeight:t};if(S>=h&&!a)return i&&_i(l,O,C),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&k>=r)return i&&_i(l,O,C),{placement:"bottom",maxHeight:a?k-y:S-y};if("auto"===o||a){var I=t,E=a?w:x;return E>=r&&(I=Math.min(E-y-s,t)),{placement:"top",maxHeight:I}}if("bottom"===o)return i&&yi(l,O),{placement:"bottom",maxHeight:t};break;case"top":if(w>=h)return{placement:"top",maxHeight:t};if(x>=h&&!a)return i&&_i(l,j,C),{placement:"top",maxHeight:t};if(!a&&x>=r||a&&w>=r){var P=t;return(!a&&x>=r||a&&w>=r)&&(P=a?w-_:x-_),i&&_i(l,j,C),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:g});p(s.maxHeight),m(s.placement),null==l||l(s.placement)}},[r,o,i,a,n,l,g]),t({ref:c,placerProps:Jn(Jn({},e),{},{placement:h||Ni(o),maxHeight:d})})},Mi=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return Jn({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Fi=Mi,Vi=Mi,Hi=["size"],zi=["innerProps","isRtl","size"],Bi={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Ui=function(e){var t=e.size,n=Ro(e,Hi);return To("svg",$n({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Bi},n))},qi=function(e){return To(Ui,$n({size:20},e),To("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"}))},$i=function(e){return To(Ui,$n({size:20},e),To("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"}))},Wi=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return Jn({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},Gi=Wi,Ki=Wi,Yi=function(){var e=Lo.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Ai||(Ti=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Li||(Li=Ti.slice(0)),Ai=Object.freeze(Object.defineProperties(Ti,{raw:{value:Object.freeze(Li)}})))),Zi=function(e){var t=e.delay,n=e.offset;return To("span",{css:Lo({animation:"".concat(Yi," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Ji=["data"],Qi=["innerRef","isDisabled","isHidden","inputClassName"],Xi={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},ea={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Jn({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Xi)},ta=function(e){return Jn({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Xi)},na=function(e){var t=e.children,n=e.innerProps;return To("div",n,t)},ra={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return To("div",$n({},gi(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||To(qi,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return To("div",$n({ref:o},gi(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return To("div",$n({},gi(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||To($i,null))},DownChevron:$i,CrossIcon:qi,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return To("div",$n({},gi(e,"group",{group:!0}),s),To(i,$n({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),To("div",null,t))},GroupHeading:function(e){var t=mi(e);t.data;var n=Ro(t,Ji);return To("div",$n({},gi(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return To("div",$n({},gi(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return To("span",$n({},t,gi(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=mi(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=Ro(r,Qi);return To("div",$n({},gi(e,"input",{"input-container":!0}),{"data-value":n||""}),To("input",$n({className:t({input:!0},s),ref:o,style:ta(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=Ro(e,zi);return To("div",$n({},gi(Jn(Jn({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),To(Zi,{delay:0,offset:n}),To(Zi,{delay:160,offset:!0}),To(Zi,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return To("div",$n({},gi(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return To("div",$n({},gi(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=(0,Wn.useRef)(null),l=(0,Wn.useRef)(null),c=No((0,Wn.useState)(Ni(i)),2),u=c[0],d=c[1],p=(0,Wn.useMemo)(function(){return{setPortalPlacement:d}},[]),f=No((0,Wn.useState)(null),2),h=f[0],m=f[1],g=(0,Wn.useCallback)(function(){if(r){var e=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}}(r),t="fixed"===a?0:window.pageYOffset,n=e[u]+t;n===(null==h?void 0:h.offset)&&e.left===(null==h?void 0:h.rect.left)&&e.width===(null==h?void 0:h.rect.width)||m({offset:n,rect:e})}},[r,a,u,null==h?void 0:h.offset,null==h?void 0:h.rect.left,null==h?void 0:h.rect.width]);ci(function(){g()},[g]);var b=(0,Wn.useCallback)(function(){"function"==typeof l.current&&(l.current(),l.current=null),r&&s.current&&(l.current=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=ri(e),u=o||i?[...c?ti(c):[],...ti(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=$o(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-Ho(d)+"px "+-Ho(o.clientWidth-(u+p))+"px "+-Ho(o.clientHeight-(d+f))+"px "+-Ho(u)+"px",threshold:Fo(0,Mo(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||li(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let m=l?si(e):null;return l&&function t(){const r=si(e);m&&!li(m,r)&&n(),m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}(r,s.current,g,{elementResize:"ResizeObserver"in window}))},[r,g]);ci(function(){b()},[b]);var v=(0,Wn.useCallback)(function(e){s.current=e,b()},[b]);if(!t&&"fixed"!==a||!h)return null;var y=To("div",$n({ref:v},gi(Jn(Jn({},e),{},{offset:h.offset,position:a,rect:h.rect}),"menuPortal",{"menu-portal":!0}),o),n);return To(Ri.Provider,{value:p},t?(0,Do.createPortal)(y,t):y)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=Ro(e,Pi);return To("div",$n({},gi(Jn(Jn({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=Ro(e,Ei);return To("div",$n({},gi(Jn(Jn({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return To(l,{data:r,innerProps:Jn(Jn({},gi(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},To(c,{data:r,innerProps:Jn({},gi(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),To(u,{data:r,innerProps:Jn(Jn({},gi(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},MultiValueContainer:na,MultiValueLabel:na,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return To("div",$n({role:"button"},n),t||To(qi,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return To("div",$n({},gi(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return To("div",$n({},gi(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return To("div",$n({},gi(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return To("div",$n({},gi(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return To("div",$n({},gi(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},oa=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ia(e,t){return e===t||!(!oa(e)||!oa(t))}function aa(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ia(e[n],t[n]))return!1;return!0}for(var sa={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},la=function(e){return To("span",$n({css:sa},e))},ca={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" 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";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},ua=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,l=e.id,c=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,p=s.inputValue,f=s.isMulti,h=s.isOptionDisabled,m=s.isSearchable,g=s.menuIsOpen,b=s.options,v=s.screenReaderStatus,y=s.tabSelectsValue,_=s.isLoading,w=s["aria-label"],k=s["aria-live"],x=(0,Wn.useMemo)(function(){return Jn(Jn({},ca),u||{})},[u]),S=(0,Wn.useMemo)(function(){var e,n="";if(t&&x.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?d(c):"",p=o||s||void 0,f=p?p.map(d):[],m=Jn({isDisabled:c&&h(c,a),label:u,labels:f},t);n=x.onChange(m)}return n},[t,x,h,a,d]),O=(0,Wn.useMemo)(function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&x.onFocus){var s={focused:t,label:d(t),isDisabled:h(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:c};e=x.onFocus(s)}return e},[n,r,d,h,x,o,a,c]),j=(0,Wn.useMemo)(function(){var e="";if(g&&b.length&&!_&&x.onFilter){var t=v({count:o.length});e=x.onFilter({inputValue:p,resultsMessage:t})}return e},[o,p,g,x,b,v,_]),C="initial-input-focus"===(null==t?void 0:t.action),I=(0,Wn.useMemo)(function(){var e="";if(x.guidance){var t=r?"value":g?"menu":"input";e=x.guidance({"aria-label":w,context:t,isDisabled:n&&h(n,a),isMulti:f,isSearchable:m,tabSelectsValue:y,isInitialFocus:C})}return e},[w,n,r,f,h,m,g,x,a,y,C]),E=To(Wn.Fragment,null,To("span",{id:"aria-selection"},S),To("span",{id:"aria-focused"},O),To("span",{id:"aria-results"},j),To("span",{id:"aria-guidance"},I));return To(Wn.Fragment,null,To(la,{id:l},C&&E),To(la,{"aria-live":k,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!C&&E))},da=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],pa=new RegExp("["+da.map(function(e){return e.letters}).join("")+"]","g"),fa={},ha=0;ha<da.length;ha++)for(var ma=da[ha],ga=0;ga<ma.letters.length;ga++)fa[ma.letters[ga]]=ma.base;var ba=function(e){return e.replace(pa,function(e){return fa[e]})},va=function(e,t){void 0===t&&(t=aa);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(ba),ya=function(e){return e.replace(/^\s+|\s+$/g,"")},_a=function(e){return"".concat(e.label," ").concat(e.value)},wa=["innerRef"];function ka(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(e){var t=No(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=No(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(Ro(e,wa),"onExited","in","enter","exit","appear");return To("input",$n({ref:t},n,{css:Lo({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var xa=["boxSizing","height","overflow","paddingRight","position"],Sa={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Oa(e){e.cancelable&&e.preventDefault()}function ja(e){e.stopPropagation()}function Ca(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Ia(){return"ontouchstart"in window||navigator.maxTouchPoints}var Ea=!("undefined"==typeof window||!window.document||!window.document.createElement),Pa=0,Aa={capture:!1,passive:!1},Ta=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},La={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Na(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=(0,Wn.useRef)(!1),s=(0,Wn.useRef)(!1),l=(0,Wn.useRef)(0),c=(0,Wn.useRef)(null),u=(0,Wn.useCallback)(function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,p=l.clientHeight,f=c.current,h=t>0,m=d-p-u,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&s.current&&(i&&i(e),s.current=!1),h&&t>m?(n&&!a.current&&n(e),f.scrollTop=d,g=!0,a.current=!0):!h&&-t>u&&(o&&!s.current&&o(e),f.scrollTop=0,g=!0,s.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,r,o,i]),d=(0,Wn.useCallback)(function(e){u(e,e.deltaY)},[u]),p=(0,Wn.useCallback)(function(e){l.current=e.changedTouches[0].clientY},[]),f=(0,Wn.useCallback)(function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)},[u]),h=(0,Wn.useCallback)(function(e){if(e){var t=!!ji&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",f,t)}},[f,p,d]),m=(0,Wn.useCallback)(function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",f,!1))},[f,p,d]);return(0,Wn.useEffect)(function(){if(t){var e=c.current;return h(e),function(){m(e)}}},[t,h,m]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,Wn.useRef)({}),i=(0,Wn.useRef)(null),a=(0,Wn.useCallback)(function(e){if(Ea){var t=document.body,n=t&&t.style;if(r&&xa.forEach(function(e){var t=n&&n[e];o.current[e]=t}),r&&Pa<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(Sa).forEach(function(e){var t=Sa[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&Ia()&&(t.addEventListener("touchmove",Oa,Aa),e&&(e.addEventListener("touchstart",Ca,Aa),e.addEventListener("touchmove",ja,Aa))),Pa+=1}},[r]),s=(0,Wn.useCallback)(function(e){if(Ea){var t=document.body,n=t&&t.style;Pa=Math.max(Pa-1,0),r&&Pa<1&&xa.forEach(function(e){var t=o.current[e];n&&(n[e]=t)}),t&&Ia()&&(t.removeEventListener("touchmove",Oa,Aa),e&&(e.removeEventListener("touchstart",Ca,Aa),e.removeEventListener("touchmove",ja,Aa)))}},[r]);return(0,Wn.useEffect)(function(){if(t){var e=i.current;return a(e),function(){s(e)}}},[t,a,s]),function(e){i.current=e}}({isEnabled:n});return To(Wn.Fragment,null,n&&To("div",{onClick:Ta,css:La}),t(function(e){o(e),i(e)}))}var Ra={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Da=function(e){var t=e.name,n=e.onFocus;return To("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Ra,value:"",onChange:function(){}})};function Ma(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Fa(){return Ma(/^Mac/i)}var Va=function(e){return e.label},Ha=function(e){return e.value},za={clearIndicator:Ki,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return Jn({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:Gi,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return Jn({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return Jn({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return Jn(Jn({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},ea),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return Jn({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:Vi,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return Jn((Yn(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),Yn(n,"position","absolute"),Yn(n,"width","100%"),Yn(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return Jn({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return Jn({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return Jn({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return Jn({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Fi,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return Jn({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return Jn({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return Jn({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return Jn({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},Ba={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}},Ua={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ki(),captureMenuScroll:!ki(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=Jn({ignoreCase:!0,ignoreAccents:!0,stringify:_a,trim:!0,matchFrom:"any"},undefined),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?ya(t):t,c=a?ya(i(e)):i(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=va(l),c=ba(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:Va,getOptionValue:Ha,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function qa(e,t,n,r){return{type:"option",data:t,isDisabled:Qa(e,t,n),isSelected:Xa(e,t,n),label:Za(e,t),value:Ja(e,t),index:r}}function $a(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return qa(e,n,t,r)}).filter(function(t){return Ka(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=qa(e,n,t,r);return Ka(e,i)?i:void 0}).filter(Ci)}function Wa(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,or(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function Ga(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,or(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function Ka(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!ts(e)||!i)&&es(e,{label:a,value:s,data:o},r)}var Ya=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},Za=function(e,t){return e.getOptionLabel(t)},Ja=function(e,t){return e.getOptionValue(t)};function Qa(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Xa(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Ja(e,t);return n.some(function(t){return Ja(e,t)===r})}function es(e,t,n){return!e.filterOption||e.filterOption(t,n)}var ts=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ns=1,rs=function(e){!function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xn(e,t)}(n,e);var t=function(e){var t=tr();return function(){var n,r=er(e);if(t){var o=er(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==Gn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter(function(e){return r.getOptionValue(e)!==c}),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(or(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter(function(e){return r.getOptionValue(e)!==o}),a=Ii(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(Ii(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=Ii(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return Ya(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return Ga($a(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return fi.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return Za(r.props,e)},r.getOptionValue=function(e){return Ja(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=za[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,Jn(Jn({},ra),e.components);var e},r.buildCategorizedOptions=function(){return $a(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Wa(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:Jn({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&bi(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return ts(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,h=f.focusedOption,m=f.focusedValue,g=f.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!h||p&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++ns),r.state.selectValue=hi(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=Ya(o,i[a])}return r}return function(e,t,n){t&&Qn(e.prototype,t),n&&Qn(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{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(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&wi(this.menuListRef,this.focusedOptionRef),(Fa()||Ma(/^iPhone/i)||Ma(/^iPad/i)||Fa()&&navigator.maxTouchPoints>1)&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(wi(this.menuListRef,this.focusedOptionRef),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(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),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,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Ba):Jn(Jn({},Ba),this.props.theme):Ba}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Qa(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Xa(this.props,e,t)}},{key:"filterOption",value:function(e,t){return es(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=e.form,s=e.menuIsOpen,l=e.required,c=this.getComponents().Input,u=this.state,d=u.inputIsHidden,p=u.ariaSelection,f=this.commonProps,h=r||this.getElementId("input"),m=Jn(Jn(Jn({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?Wn.createElement(c,$n({},f,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:o},m)):Wn.createElement(ka,$n({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:di,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,f=c.inputValue,h=c.placeholder,m=this.state,g=m.selectValue,b=m.focusedValue,v=m.isFocused;if(!this.hasValue()||!u)return f?null:Wn.createElement(s,$n({},l,{key:"placeholder",isDisabled:d,isFocused:v,innerProps:{id:this.getElementId("placeholder")}}),h);if(p)return g.map(function(t,a){var s=t===b,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return Wn.createElement(n,$n({},l,{components:{Container:r,Label:o,Remove:i},isFocused:s,isDisabled:d,key:c,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(f)return null;var y=g[0];return Wn.createElement(a,$n({},l,{data:y,isDisabled:d}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Wn.createElement(e,$n({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;return e&&o?Wn.createElement(e,$n({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return Wn.createElement(n,$n({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Wn.createElement(e,$n({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,p=this.props,f=p.captureMenuScroll,h=p.inputValue,m=p.isLoading,g=p.loadingMessage,b=p.minMenuHeight,v=p.maxMenuHeight,y=p.menuIsOpen,_=p.menuPlacement,w=p.menuPosition,k=p.menuPortalTarget,x=p.menuShouldBlockScroll,S=p.menuShouldScrollIntoView,O=p.noOptionsMessage,j=p.onMenuScrollToTop,C=p.onMenuScrollToBottom;if(!y)return null;var I,E=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,p=d===o,f=i?void 0:function(){return e.onOptionHover(o)},h=i?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),g={id:m,onClick:h,onMouseMove:f,onMouseOver:f,tabIndex:-1,role:"option","aria-selected":e.state.isAppleDevice?void 0:a};return Wn.createElement(c,$n({},u,{innerProps:g,data:o,isDisabled:i,isSelected:a,key:m,label:s,type:r,value:l,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())I=this.getCategorizedOptions().map(function(t){if("group"===t.type){var o=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return Wn.createElement(n,$n({},u,{key:s,data:o,options:i,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return E(e,"".concat(a,"-").concat(e.index))}))}if("option"===t.type)return E(t,"".concat(t.index))});else if(m){var P=g({inputValue:h});if(null===P)return null;I=Wn.createElement(s,u,P)}else{var A=O({inputValue:h});if(null===A)return null;I=Wn.createElement(l,u,A)}var T={minMenuHeight:b,maxMenuHeight:v,menuPlacement:_,menuPosition:w,menuShouldScrollIntoView:S},L=Wn.createElement(Di,$n({},u,T),function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return Wn.createElement(o,$n({},u,T,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:m,placement:a}),Wn.createElement(Na,{captureEnabled:f,onTopArrive:j,onBottomArrive:C,lockEnabled:x},function(t){return Wn.createElement(i,$n({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:m,maxHeight:s,focusedOption:d}),I)}))});return k||"fixed"===w?Wn.createElement(a,$n({},u,{appendTo:k,controlElement:this.controlRef,menuPlacement:_,menuPosition:w}),L):L}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!r)return Wn.createElement(Da,{name:i,onFocus:this.onValueInputFocus});if(i&&!r){if(o){if(n){var l=s.map(function(t){return e.getOptionValue(t)}).join(n);return Wn.createElement("input",{name:i,type:"hidden",value:l})}var c=s.length>0?s.map(function(t,n){return Wn.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):Wn.createElement("input",{name:i,type:"hidden",value:""});return Wn.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return Wn.createElement("input",{name:i,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return Wn.createElement(ua,$n({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,c=i.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return Wn.createElement(r,$n({},d,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),Wn.createElement(t,$n({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),Wn.createElement(o,$n({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),Wn.createElement(n,$n({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,h=hi(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var g=d?function(e,t){return Wa($a(e,t))}(e,h):[],b=d?Ga($a(e,h),"".concat(l,"-option")):[],v=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:h,focusedOption:y,focusedOptionId:Ya(b,y),focusableOptionsWithIds:b,focusedValue:v,clearFocusValueOnUpdate:!1}}var _=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,k=a&&s;return a&&!k&&(w={value:Ii(f,h,h[0]||null),options:h,action:"initial-input-focus"},k=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),Jn(Jn(Jn({},m),_),{},{prevProps:e,ariaSelection:w,prevWasFocused:k})}}]),n}(Wn.Component);rs.defaultProps=Ua;var os=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function is(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,p=e.onMenuOpen,f=e.value,h=Ro(e,os),m=No((0,Wn.useState)(void 0!==s?s:n),2),g=m[0],b=m[1],v=No((0,Wn.useState)(void 0!==l?l:o),2),y=v[0],_=v[1],w=No((0,Wn.useState)(void 0!==f?f:a),2),k=w[0],x=w[1],S=(0,Wn.useCallback)(function(e,t){"function"==typeof c&&c(e,t),x(e)},[c]),O=(0,Wn.useCallback)(function(e,t){var n;"function"==typeof u&&(n=u(e,t)),b(void 0!==n?n:e)},[u]),j=(0,Wn.useCallback)(function(){"function"==typeof p&&p(),_(!0)},[p]),C=(0,Wn.useCallback)(function(){"function"==typeof d&&d(),_(!1)},[d]),I=void 0!==s?s:g,E=void 0!==l?l:y,P=void 0!==f?f:k;return Jn(Jn({},h),{},{inputValue:I,menuIsOpen:E,onChange:S,onInputChange:O,onMenuClose:C,onMenuOpen:j,value:P})}var as=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],ss=function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=String(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase(),r=String(t.getOptionValue(e)).toLowerCase(),o=String(t.getOptionLabel(e)).toLowerCase();return r===n||o===n},ls={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n,r){return!(!e||t.some(function(t){return ss(e,t,r)})||n.some(function(t){return ss(e,t,r)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}},cs=(0,Wn.forwardRef)(function(e,t){var n=function(e){var t=e.allowCreateWhileLoading,n=void 0!==t&&t,r=e.createOptionPosition,o=void 0===r?"last":r,i=e.formatCreateLabel,a=void 0===i?ls.formatCreateLabel:i,s=e.isValidNewOption,l=void 0===s?ls.isValidNewOption:s,c=e.getNewOptionData,u=void 0===c?ls.getNewOptionData:c,d=e.onCreateOption,p=e.options,f=void 0===p?[]:p,h=e.onChange,m=Ro(e,as),g=m.getOptionValue,b=void 0===g?Ha:g,v=m.getOptionLabel,y=void 0===v?Va:v,_=m.inputValue,w=m.isLoading,k=m.isMulti,x=m.value,S=m.name,O=(0,Wn.useMemo)(function(){return l(_,hi(x),f,{getOptionValue:b,getOptionLabel:y})?u(_,a(_)):void 0},[a,u,y,b,_,l,f,x]),j=(0,Wn.useMemo)(function(){return!n&&w||!O?f:"first"===o?[O].concat(or(f)):[].concat(or(f),[O])},[n,o,w,O,f]),C=(0,Wn.useCallback)(function(e,t){if("select-option"!==t.action)return h(e,t);var n=Array.isArray(e)?e:[e];if(n[n.length-1]!==O)h(e,t);else if(d)d(_);else{var r=u(_,_),o={action:"create-option",name:S,option:r};h(Ii(k,[].concat(or(hi(x)),[r]),r),o)}},[u,_,k,S,O,d,h,x]);return Jn(Jn({},m),{},{options:j,onChange:C})}(is(e));return Wn.createElement(rs,$n({ref:t},n))}),us=cs;function ds(e){const{headline:t,content:n,children:r}=e,o=Rn()("form-section","stellarwp","stellarwp-body",{"has-children":r});return(0,i.jsxs)("div",{className:o,children:[t?(0,i.jsx)("h2",{className:"form-section__headline stellarwp-h2",children:t}):null,n?(0,i.jsx)("p",{className:"form-section__content stellarwp-small stellarwp-disabled",children:n}):null,r||null]})}function ps(e){const{icon:t,text:n="",value:r="",selected:o,onClick:a=()=>{}}=e,s=Rn()("location-select-card",{"is-selected":o});return(0,i.jsxs)(En.Card,{className:s,as:"button",size:"small",isRounded:!0,onClick:()=>a(r),children:[(0,i.jsx)(En.CardHeader,{children:t?(0,i.jsx)(En.Icon,{icon:t}):null}),(0,i.jsx)(En.CardBody,{children:n})]})}function fs(e){const{label:t,locations:n=[],selected:r,onChange:o=()=>{}}=e;return(0,i.jsxs)(En.Flex,{className:"location-select-control",direction:"column",children:[t?(0,i.jsx)("label",{className:"location-select-control__label",children:t}):null,(0,i.jsx)(En.Flex,{className:"location-select-control__group",align:"initial",children:n&&n.map(e=>(0,i.jsx)(En.FlexBlock,{children:(0,i.jsx)(ps,{selected:r===e.value,icon:e.icon,text:e.text,value:e.value,onClick:o})}))})]})}(0,e.forwardRef)(function(e,t){const{maxMenuHeight:n,menuPlacement:r,label:o,options:a,value:s,prefix:l,...c}=e,u=Rn()("components-input-control__container",{"has-prefix":!!l});return(0,i.jsxs)("div",{className:"stellarwp components-creatable-control",children:[o?(0,i.jsx)("label",{className:"components-input-control__label",children:o}):null,(0,i.jsxs)("div",{className:u,ref:t,children:[l||null,(0,i.jsx)(us,{classNamePrefix:"stellarwp-creatable",maxMenuHeight:n,menuPlacement:r,styles:{control:(e,t)=>({...e,fontSize:16,boxShadow:"none",borderColor:t.isFocused?"#000000":"#DFDFDF"}),valueContainer:e=>({...e,paddingLeft:l?35:8}),menu:e=>({...e,fontSize:16}),indicatorsContainer:e=>({...e,color:"#000000"})},isClearable:!0,options:a,value:s,...c})]})]})});const hs={featuredTitle:(0,t.__)("Featured Images","kadence-blocks"),featuredDescription:(0,t.__)("Featured images are meant to draw attention, they are used to represent the content on your website.","kadence-blocks"),backgroundTitle:(0,t.__)("Background Images","kadence-blocks"),backgroundDescription:(0,t.__)("Background images are meant to enhance the overall look and feel, styling the background of sections in your website.","kadence-blocks")},ms={wrapper:{boxSizing:"border-box",maxWidth:1e3,margin:"auto"}};function gs({loading:e,featured:t,background:n,updateCollection:r}){const o=e=>t=>{r(e,t)};return(0,i.jsx)("div",{className:"stellarwp-body",style:ms.wrapper,children:(0,i.jsxs)(En.Flex,{align:"top",gap:"5",children:[(0,i.jsx)(En.FlexBlock,{children:(0,i.jsx)($s,{loading:e,photos:t?.images,isLocal:t?.isLocal,collectionLink:t?.pexelLink,title:hs.featuredTitle,description:hs.featuredDescription,updateCollection:o(0)})}),(0,i.jsx)(En.FlexBlock,{children:(0,i.jsx)($s,{loading:e,photos:n?.images,isLocal:n?.isLocal,collectionLink:n?.pexelLink,title:hs.backgroundTitle,description:hs.backgroundDescription,updateCollection:o(1)})})]})})}function bs(t){const{styles:n={},value:r,message:o,color:a}=t,[s,l]=(0,e.useState)({}),c={};return(0,e.useEffect)(()=>{const e=r-100;l(t=>({...t,backgroundColor:a||"blue",transform:`translateX(${e}%)`}))},[r,a,o]),void 0!==r&&(c["aria-valuenow"]=Math.round(r),c["aria-valuemin"]=0,c["aria-valuemax"]=100),(0,i.jsxs)("div",{className:"stellarwp-progress-bar",style:n,children:[(0,i.jsx)("div",{className:"stellarwp-progress-bar__wrap",...c,children:(0,i.jsx)("span",{className:"stellarwp-progress-bar__bar",style:s})}),o?(0,i.jsx)("span",{className:"stellarwp-progress-bar__message",style:{color:a||"inherit"},children:o}):null]})}var vs=(0,Wn.forwardRef)(function(e,t){var n=is(e);return Wn.createElement(rs,$n({ref:t},n))});const ys=(0,e.forwardRef)(function(e,t){const{maxMenuHeight:n,menuPlacement:r,menuPosition:o="absolute",isClearable:a,label:s,options:l,value:c,horizontal:u,...d}=e;return(0,i.jsxs)("div",{className:"stellarwp components-select-control "+(u?"input-control-horizontal":""),children:[s?(0,i.jsx)("label",{className:"components-input-control__label",children:s}):null,(0,i.jsx)("div",{className:"components-input-control__container",ref:t,children:(0,i.jsx)(vs,{classNamePrefix:"stellarwp-select",maxMenuHeight:n,menuPlacement:r,menuPosition:o,styles:{control:(e,t)=>({...e,fontSize:16,boxShadow:"none",borderColor:t.isFocused?"#000000":"#DFDFDF",width:"100%"}),valueContainer:e=>({...e,paddingLeft:16}),menu:e=>({...e,fontSize:16}),indicatorsContainer:e=>({...e,color:"#000000"})},isClearable:a,options:l,value:c,...d})})]})});var _s=n(220);function ws({icon:e,...t}){return(0,i.jsx)("button",{...t,children:(0,i.jsx)("span",{role:"img","aria-label":"Arrow",children:(0,i.jsx)(En.Dashicon,{icon:e})})})}function ks(e){return(0,i.jsx)(ws,{...e,icon:"arrow-left-alt2"})}function xs(e){return(0,i.jsx)(ws,{...e,icon:"arrow-right-alt2"})}function Ss(e){const{slides:t=[],text:n,backgroundImage:r,doAfterSlide:o=()=>{},doBeforeSlide:a=()=>{}}=e;if(!t.length)return;const s=Rn()("stellarwp-slider",{"has-background":r});return(0,i.jsxs)("div",{className:s,style:{backgroundImage:`url(${r})`},children:[n?(0,i.jsx)("span",{className:"stellarwp-slider__text",align:"center",children:n}):null,(0,i.jsx)(_s.A,{infiniteLoop:!0,ArrowLeft:ks,ArrowRight:xs,doAfterSlide:o,doBeforeSlide:a,children:t.map(e=>e)})]})}function Os(e){return(0,i.jsx)(En.TextControl,{className:"stellarwp",...e})}const js=(0,e.forwardRef)(function(e,t){return(0,i.jsx)("div",{ref:t,children:(0,i.jsx)(En.TextareaControl,{className:"stellarwp",...e})})});function Cs(n){const{progressBarProps:r,value:o,initialHeight:a=300,aiLoading:s,aiSuggestion:l,onUndo:c,onAccept:u,...d}=n,[p,f]=(0,e.useState)(null);return(0,e.useEffect)(()=>{p&&function(e){if(e){const t=e.querySelector("textarea");t.style.height="0px";const n=t.scrollHeight>a?t.scrollHeight:a;t.style.height=n+"px"}}(p)},[p,o]),(0,i.jsxs)("div",{className:"stellarwp-textarea-progress "+(l?"stellarwp-textarea-progress--suggestion-active":""),children:[(0,i.jsx)(js,{ref:f,...d,value:l||o}),!(l||s)&&(0,i.jsxs)("div",{className:"stellarwp-ai-about-character-limits",children:[o.length,"/1000"]}),!l&&(0,i.jsx)(bs,{...r}),(l||s)&&(0,i.jsxs)(En.Flex,{className:"stellarwp-textarea-progress__actions",children:[s&&(0,i.jsx)(En.FlexItem,{children:(0,i.jsxs)(En.__experimentalView,{className:"stellarwp-textarea-progress__ai-loading",children:[(0,i.jsx)(En.Icon,{icon:zn}),`${(0,t.__)("Kadence AI is writing","kadence-blocks")}`,(0,i.jsx)(En.Icon,{icon:Hn})]})}),l&&!s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(En.FlexItem,{children:(0,i.jsx)(En.Button,{className:"stellarwp-textarea-progress__undo-button",variant:"link",onClick:c,children:`${(0,t.__)("Undo","kadence-blocks")}`})}),(0,i.jsx)(En.FlexItem,{children:(0,i.jsx)(En.Button,{className:"stellarwp-textarea-progress__approve-button",icon:Vn,variant:"link",onClick:u,children:`${(0,t.__)("Use This Copy","kadence-blocks")}`})})]})]})]})}function Is(e){const{label:t,description:n}=e;return(0,i.jsxs)("div",{className:"tone-select__option",children:[(0,i.jsxs)("b",{children:[t,"."]}),n?` ${n}`:null]})}(0,e.forwardRef)(function(e,t){const{maxMenuHeight:n,menuPlacement:r,options:o=[],value:a,...s}=e;if(o.length)return(0,i.jsx)("div",{ref:t,children:(0,i.jsx)(vs,{maxMenuHeight:n,menuPlacement:r,classNamePrefix:"stellarwp-tone",value:a,options:o,getOptionLabel:e=>(0,i.jsx)(Is,{...e}),...s})})});const Es=window.wp.dom;function Ps(e){const{pageNumber:t,isComplete:n=!1}=e,r=Rn()("stellarwp","step-count",{"is-complete":n}),o=n?(0,i.jsx)(En.Icon,{icon:"saved"}):t;return(0,i.jsx)("span",{className:r,children:o})}const As=window.wp.apiFetch;var Ts=n.n(As);function Ls(){const[t,n]=(0,e.useState)(!1),[r,o]=(0,e.useState)(!1);return{loading:t,error:r,saveAiWizardData:async function(e){n(!0),o(!1);try{if(await Ts()({path:"/wp/v2/settings",method:"POST",data:{kadence_blocks_prophecy:JSON.stringify(e)}}))return n(!1),!0}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),n(!1),o(!0),!1}},getAiWizardData:async function(){n(!0),o(!1);try{const e=await Ts()({path:"/wp/v2/settings",method:"GET"});if(e&&(n(!1),e?.kadence_blocks_prophecy))return e.kadence_blocks_prophecy}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),n(!1),o(!0),{}}}}}function Ns({className:n,contentLabel:r,logo:o,backButtonText:a=(0,t.__)("Back","kadence-blocks"),forwardButtonText:s=(0,t.__)("Next","kadence-blocks"),backButtonDisabled:l=!1,forwardButtonDisabled:c=!1,onPageChange:u=()=>{},onClose:d=()=>{},onPrimaryClick:p=()=>{},primaryButtonText:f=(0,t.__)("Save","kadence-blocks"),primaryButtonDisabled:h=!1,onSecondaryClick:m,secondaryButtonText:g,credits:b="",photographyOnly:v,pages:y=[],isFullScreen:_=!1}){const w=(0,e.useRef)(null),[k,x]=(0,e.useState)(0),[S,O]=(0,e.useState)(new Set),{saveAiWizardData:j}=Ls();(0,e.useEffect)(()=>{u&&u(k),w.current&&Es.focus.tabbable.find(w.current)[0]?.focus()},[k]);const C=y&&y?.[k]?.id?y[k].id:`page-${k}`,I=k>0,E=k<y.length-1,P=e=>S.has(e),{state:A,dispatch:T}=D();return 0===y.length?null:(0,i.jsxs)(En.Modal,{title:o,className:Rn()("components-guide","stellarwp",n,C,{"is-fullscreen":_}),contentLabel:r,onRequestClose:d,ref:w,children:[(0,i.jsx)("div",{className:"components-guide__container",children:(0,i.jsxs)("div",{className:"components-guide__page",children:[y[k].image,y[k].content]})}),(0,i.jsxs)("div",{className:"components-guide__footer",children:[I&&(0,i.jsx)(Ln,{className:"components-wizard__back-button",disabled:l,onClick:()=>{I&&x(k-1)},children:a}),y.length>1&&(0,i.jsx)("ul",{className:"components-guide__page-control","aria-label":(0,t.__)("Guide controls","kadence-blocks"),children:y.map((e,n)=>{return(0,i.jsx)("li",{"aria-current":n===k?"step":void 0,children:(0,i.jsx)(Ln,{className:Rn()("wizard-step",{"is-complete":P(n),"is-current":n===k}),disabled:(r=n,r>S.size||null),icon:(0,i.jsx)(Ps,{pageNumber:n+1,isComplete:P(n),isSelected:n===k}),"aria-label":(0,t.sprintf)(/* translators: 1: current page number 2: total number of pages */ /* translators: 1: current page number 2: total number of pages */
(0,t.__)("Page %1$d of %2$d","kadence-blocks"),n+1,y.length),text:e.step,onClick:()=>x(n)},n)},n);var r})}),E&&(0,i.jsx)(Ln,{variant:"primary",className:"components-wizard__forward-button",disabled:c,onClick:async function(){if(!E)return;T({type:"SET_SAVING",payload:!0});const{firstTime:e,saving:t,saveError:n,...r}=A;await j({firstTime:!1,...r})&&(T({type:"SET_SAVING",payload:!1}),x(k+1),O(e=>{const t=new Set(e.values());return t.add(k),t}))},children:s}),!E&&(0,i.jsxs)("div",{className:"components-wizard__finish-button-container",children:[m&&"function"==typeof m?(0,i.jsx)(Ln,{variant:"link",className:"components-wizard__secondary-button",onClick:m,children:g||""}):null,v&&(0,i.jsx)(Ln,{variant:"primary",className:"components-wizard__primary-button",disabled:h,onClick:p,children:f}),!v&&(0,i.jsx)("div",{className:"kt-generate-wrap",children:(0,i.jsx)(Ln,{variant:"primary",className:"components-wizard__primary-button",disabled:h,onClick:p,children:f+" "+(0,t.__)("(70 Credits)","kadence-blocks")})})]})]})]})}const Rs=window.wp.data,Ds=[],Ms=()=>{const{wp:e}=window;return e.media.view.MediaFrame.Select.extend({featuredImageToolbar(t){this.createSelectToolbar(t,{text:e.media.view.l10n.setFeaturedImage,state:this.options.state})},editState(){const t=this.state("featured-image").get("selection"),n=new e.media.view.EditImage({model:t.single(),controller:this}).render();this.content.set(n),n.loadEditor()},createStates:function(){this.on("toolbar:create:featured-image",this.featuredImageToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new e.media.controller.FeaturedImage,new e.media.controller.EditImage({model:this.options.editImage})])}})},Fs=()=>{const{wp:e}=window;return e.media.view.MediaFrame.Post.extend({galleryToolbar(){const n=this.state().get("editing");this.toolbar.set(new e.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:n?(0,t.__)("Update Collection","kadence-blocks"):(0,t.__)("Create Collection","kadence-blocks"),priority:80,requires:{library:!0},click(){const e=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},galleryEditToolbar(){const n=this.state().get("editing");this.toolbar.set(new e.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:n?(0,t.__)("Update Collection","kadence-blocks"):(0,t.__)("Add to Collection","kadence-blocks"),priority:80,requires:{library:!0},click(){const e=this.controller,t=e.state();e.close(),t.trigger("update",t.get("library")),e.setState(e.options.state),e.reset()}}}}))},galleryAddToolbar(){this.toolbar.set(new e.media.view.Toolbar({controller:this,items:{insert:{style:"primary",text:(0,t.__)("Add to Collection","kadence-blocks"),priority:80,requires:{selection:!0},click(){const e=this.controller,t=e.state();e.state("gallery-edit").get("library").add(t.get("selection").models),t.trigger("reset"),e.setState("gallery-edit"),this.controller.modal.focusManager.focus()}}}}))},editState(){const t=this.state("gallery").get("selection"),n=new e.media.view.EditImage({model:t.single(),controller:this}).render();this.content.set(n),n.loadEditor()},createStates:function(){this.on("toolbar:create:main-gallery",this.galleryToolbar,this),this.on("toolbar:create:gallery-add",this.galleryAddToolbar,this),this.on("toolbar:create:gallery-edit",this.galleryEditToolbar,this),this.on("content:render:edit-image",this.editState,this),this.states.add([new e.media.controller.Library({id:"gallery",title:(0,t.__)("Create Collection","kadence-blocks"),priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:e.media.query({type:"image",...this.options.library})}),new e.media.controller.EditImage({model:this.options.editImage}),new e.media.controller.GalleryEdit({title:(0,t.__)("Edit Collection","kadence-blocks"),library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new e.media.controller.GalleryAdd({title:(0,t.__)("Add to Collection","kadence-blocks")})])}})},Vs=e=>["sizes","mime","type","subtype","id","url","alt","link","caption"].reduce((t,n)=>(e?.hasOwnProperty(n)&&(t[n]=e[n]),t),{}),Hs=e=>{const{wp:t}=window;return t.media.query({order:"ASC",orderby:"post__in",post__in:e,posts_per_page:-1,query:!0,type:"image"})};class zs extends e.Component{constructor({allowedTypes:e,gallery:n=!1,unstableFeaturedImageFlow:r=!1,modalClass:o,multiple:i=!1,title:a=(0,t.__)("Select or Upload Media")}){super(...arguments),this.openModal=this.openModal.bind(this),this.onOpen=this.onOpen.bind(this),this.onSelect=this.onSelect.bind(this),this.onUpdate=this.onUpdate.bind(this),this.onClose=this.onClose.bind(this);const{wp:s}=window;if(n)this.buildAndSetGalleryFrame();else{const t={title:a,multiple:i};e&&(t.library={type:e}),this.frame=s.media(t)}o&&this.frame.$el.addClass(o),r&&this.buildAndSetFeatureImageFrame(),this.initializeListeners()}initializeListeners(){this.frame.on("select",this.onSelect),this.frame.on("update",this.onUpdate),this.frame.on("open",this.onOpen),this.frame.on("close",this.onClose)}buildAndSetGalleryFrame(){const{addToGallery:e=!1,allowedTypes:t,multiple:n=!1,value:r=Ds}=this.props;if(r===this.lastGalleryValue)return;const{wp:o}=window;let i;this.lastGalleryValue=r,this.frame&&this.frame.remove(),i=e?"gallery-library":r&&r.length?"gallery-edit":"gallery",this.GalleryDetailsMediaFrame||(this.GalleryDetailsMediaFrame=Fs());const a=Hs(r),s=new o.media.model.Selection(a.models,{props:a.props.toJSON(),multiple:n});this.frame=new this.GalleryDetailsMediaFrame({mimeType:t,state:i,multiple:n,selection:s,editing:!(!r||!r.length)}),o.media.frame=this.frame,this.initializeListeners()}buildAndSetFeatureImageFrame(){const{wp:e}=window,t=Ms(),n=Hs(this.props.value),r=new e.media.model.Selection(n.models,{props:n.props.toJSON()});this.frame=new t({mimeType:this.props.allowedTypes,state:"featured-image",multiple:this.props.multiple,selection:r,editing:!!this.props.value}),e.media.frame=this.frame}componentWillUnmount(){this.frame.remove()}onUpdate(e){const{onSelect:t,multiple:n=!1}=this.props,r=this.frame.state(),o=e||r.get("selection");o&&o.models.length&&t(n?o.models.map(e=>Vs(e.toJSON())):Vs(o.models[0].toJSON()))}onSelect(){const{onSelect:e,multiple:t=!1}=this.props,n=this.frame.state().get("selection").toJSON();e(t?n:n[0])}onOpen(){const{wp:e}=window,{value:t}=this.props;if(this.updateCollection(),this.props.mode&&this.frame.content.mode(this.props.mode),!(Array.isArray(t)?t?.length:t))return;const n=this.props.gallery,r=this.frame.state().get("selection"),o=Array.isArray(t)?t:[t];n||o.forEach(t=>{r.add(e.media.attachment(t))});const i=Hs(o);i.more().done(function(){n&&i?.models?.length&&r.add(i.models)})}onClose(){const{onClose:e}=this.props;e&&e()}updateCollection(){const e=this.frame.content.get();if(e&&e.collection){const t=e.collection;t.toArray().forEach(e=>e.trigger("destroy",e)),t.mirroring._hasMore=!0,t.more()}}openModal(){this.props.gallery&&this.buildAndSetGalleryFrame(),this.frame.open()}render(){return this.props.render({open:this.openModal})}}const Bs=zs,Us={wrapper:{boxSizing:"border-box",width:"100%",padding:32,paddingBottom:"16px",marginLeft:"auto",marginRight:"auto",border:"1px solid #DFDFDF",borderRadius:"4px",display:"flex",flexDirection:"column",gap:"24px"},gridWrapper:{maxHeight:"318px",height:"500px",overflow:"hidden",overflowY:"auto",marginRight:"-8px",paddingRight:"9px",position:"relative"},loading:{position:"absolute",inset:"0 0 0 0",backgroundColor:"rgba(255,255,255,0.95)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1},grid:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr 1fr",gap:"16px"},square:{position:"relative",width:"100%",height:"100%",backgroundColor:"#fcfcfc",backgroundSize:"cover",aspectRatio:"1/1"},placeholder:{background:"#F5F5F5",height:"100%",width:"100%",zIndex:2},img:{objectFit:"cover",objectPosition:"center",width:"100%",position:"relative",zIndex:2,aspectRatio:"1/1"},linkWrapper:{paddingTop:16,textAlign:"center",borderTop:"1px solid #DFDFDF"},contentWrapper:{gap:8,textAlign:"center"},title:{fontSize:"14px",fontWeight:600},description:{fontSize:"14px",marginTop:"8px"},importWrapper:{position:"relative",marginBottom:"-24px"},importNotice:{position:"absolute",top:"0",width:"100%",height:"318px",backgroundColor:"rgba(255,255,255,0.9)",display:"flex",fontSize:"18px",alignItems:"center",justifyContent:"center",zIndex:11},spinner:{marginRight:"8px",marginLeft:"8px",marginTop:"4px",marginBottom:"4px"}},qs=["image"];function $s({photos:n,loading:r,isLocal:o,collectionLink:a,title:s,description:l,updateCollection:c}){const u=function(t){const[n,r]=(0,e.useState)();return(0,e.useEffect)(()=>{if(!t)return void r([]);const e=t.length;if(e<12){const n=12-e,o=[...t,...Array.from(Array(n)).map((e,t)=>({alt:`placeholder${t+1}`}))];r(o)}else r(t)},[t]),n}(n),[d,p]=(0,e.useState)(!1),[f,h]=(0,e.useState)([]),[m,g]=(0,e.useState)([]);return(0,e.useEffect)(()=>{if(n){const e=[];n.forEach(function(t){e.push(t.id)}),g(e)}else g([])},[n]),(0,i.jsxs)("div",{style:Us.wrapper,children:[(0,i.jsxs)("div",{style:Us.contentWrapper,children:[(0,i.jsxs)("div",{style:Us.title,children:[s," "]}),(0,i.jsx)("div",{style:Us.description,children:l})]}),(0,i.jsxs)("div",{style:Us.importWrapper,className:"kb-images-custom-import",children:[r&&(0,i.jsxs)("div",{style:Us.importNotice,className:"kb-importing-information",children:[(0,i.jsx)(En.Spinner,{style:Us.spinner})," ",(0,t.__)("Loading…","kadence-blocks")]}),d&&(0,i.jsxs)("div",{style:Us.importNotice,className:"kb-importing-information",children:[(0,i.jsx)(En.Spinner,{style:Us.spinner})," ",(0,t.__)("Importing Images…","kadence-blocks")]})]}),(0,i.jsx)("div",{style:Us.gridWrapper,className:"kb-images-custom-scroll-bar",children:(0,i.jsx)("div",{style:Us.grid,children:u&&u.length>0?u.map((e,t)=>(0,i.jsxs)(En.FlexBlock,{style:Us.square,children:[(0,i.jsx)(En.FlexBlock,{className:"loading-behind-image",style:Us.loading,children:(0,i.jsx)(En.Spinner,{})}),e?.sizes?(0,i.jsx)("img",{style:Us.img,alt:e.alt,src:e?.sizes?.[0]?.src?e.sizes[0].src:e?.url}):(0,i.jsx)(En.FlexBlock,{style:{...Us.square,...Us.placeholder}},e.alt)]},t)):Array.from("123456789ABC").map(e=>(0,i.jsx)(En.FlexBlock,{style:{...Us.square,...Us.placeholder}},e))})}),(0,i.jsx)(En.Flex,{children:(0,i.jsx)(En.FlexBlock,{style:Us.linkWrapper,children:(0,i.jsx)(Bs,{onSelect:e=>function(e){const t=e.map(e=>({id:e.id,post_id:e.id,alt:e.alt||e.name,url:e?.sizes?.large?.url||e?.sizes?.full?.url,sizes:[{name:"thumbnail",src:e?.sizes?.thumbnail?.url||e?.sizes?.large?.url||e?.sizes?.full?.url}]}));c(t)}(e),allowedTypes:qs,multiple:!0,gallery:!0,title:"Edit Collection",value:m,render:({open:e})=>(0,i.jsx)(Ln,{variant:"link",disabled:d,text:(0,t.__)("Edit Collection","kadence-blocks"),onClick:()=>function(e){d||(!o&&n?.length>0?async function(e){p(!0);const t=await async function(e){try{return await Ts()({path:"/kb-design-library/v1/process_images",method:"POST",data:{images:e}})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),!1}}(n);if(!1!==t){const n=[];t.forEach(function(e){n.push(e.id)}),g(n),setTimeout(function(){e(),p(!1)},100)}else p(!1)}(e):e())}(e),style:{fontSize:"14px"}})})})})]})}const Ws=(0,e.forwardRef)(function({icon:t,size:n=24,...r},o){return(0,e.cloneElement)(t,{width:n,height:n,...r,ref:o})}),Gs=(0,i.jsx)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(o.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),Ks=(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(o.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),Ys=({onComplete:t,onCancel:n})=>{const[r,o]=(0,e.useState)(null);return(0,i.jsxs)("div",{className:"advanced-select-menu__input",children:[(0,i.jsx)("input",{className:"advanced-select-menu__input-item",onChange:e=>o(e.target.value),onKeyDown:function(e){e.stopPropagation(),"Enter"===e.key&&t(r)},placeholder:"Rename this collection",autoFocus:!0,onClick:function(e){e.stopPropagation()}}),(0,i.jsxs)("div",{className:"advanced-select-menu__option-item__actions is-edit",children:[(0,i.jsx)(Ln,{size:"small",variant:"link",onClick:n,children:"Cancel"}),(0,i.jsx)(Ln,{size:"small",variant:"primary",onClick:function(e){e.stopPropagation(),t(r)},children:"Save"})]})]})},Zs=(0,i.jsx)("svg",{viewBox:"0 0 18 18",fill:"none",children:(0,i.jsx)("path",{d:"M2.25 12.9374V15.7499H5.0625L13.3575 7.45492L10.545 4.64242L2.25 12.9374ZM15.5325 5.27992C15.825 4.98742 15.825 4.51492 15.5325 4.22242L13.7775 2.46742C13.485 2.17492 13.0125 2.17492 12.72 2.46742L11.3475 3.83992L14.16 6.65242L15.5325 5.27992Z",fill:"currentColor"})}),Js=(0,i.jsx)("svg",{viewBox:"0 0 18 18",fill:"none",children:(0,i.jsx)("path",{d:"M4.5 14.25C4.5 15.075 5.175 15.75 6 15.75H12C12.825 15.75 13.5 15.075 13.5 14.25V5.25H4.5V14.25ZM6 6.75H12V14.25H6V6.75ZM11.625 3L10.875 2.25H7.125L6.375 3H3.75V4.5H14.25V3H11.625Z",fill:"currentColor"})}),Qs=(0,i.jsx)("svg",{viewBox:"0 0 18 16",fill:"none",children:(0,i.jsx)("path",{d:"M6.99984 10.1458L8.04315 7.87665L10.3123 6.83333L8.04315 5.79002L6.99984 3.52083L5.95653 5.79002L3.68734 6.83333L5.95653 7.87665L6.99984 10.1458ZM6.99984 13.1667L5.02067 8.8125L0.666504 6.83333L5.02067 4.85417L6.99984 0.5L8.979 4.85417L13.3332 6.83333L8.979 8.8125L6.99984 13.1667ZM14.1665 15.5L13.1873 13.3125L10.9998 12.3333L13.1873 11.3333L14.1665 9.16667L15.1665 11.3333L17.3332 12.3333L15.1665 13.3125L14.1665 15.5Z",fill:"currentColor"})}),Xs=({option:t,onOptionSelect:n,isActive:r,doNotClose:o})=>{const[a,s]=(0,e.useState)("default"),{updateRecord:l,deleteRecord:c}=(0,e.useContext)(tl);(0,e.useEffect)(()=>{o("default"!==a)},[a]);const u=e=>t=>{t.stopPropagation(),s(e)};return(0,i.jsxs)("div",{className:`advanced-select-menu__option-item${r?" is-active":""}${t.useActions?" use-actions":""}`,children:["edit"!==a&&(0,i.jsxs)("div",{className:"advanced-select-menu__option-item__label",onClick:e=>n(t),children:["aiGenerated"===t.value&&(0,i.jsx)(Ws,{icon:Qs,size:17}),t.label]}),"default"===a&&t.useActions&&(0,i.jsxs)("div",{className:"advanced-select-menu__option-item__actions is-icons",children:[(0,i.jsx)(Ws,{icon:Zs,size:17,onClick:u("edit")}),(0,i.jsx)(Ws,{icon:Js,size:17,onClick:u("delete")})]}),"edit"===a&&(0,i.jsx)(Ys,{onComplete:function(e){l(e||t.label,t.value),s("default")},onCancel:u("default")}),"delete"===a&&(0,i.jsxs)("div",{className:"advanced-select-menu__option-item__actions is-delete",children:[(0,i.jsx)(Ln,{size:"small",variant:"link",onClick:u("default"),children:"Cancel"}),(0,i.jsx)(Ln,{size:"small",isDestructive:!0,onClick:function(e){e.stopPropagation(),c(t.value),s("default")},children:"Delete Collection"})]})]})},el=function(n){const{width:r,options:o,onSelect:a,value:s,allowClose:l}=n,{createRecord:c}=(0,e.useContext)(tl),[u,d]=(0,e.useState)([]),[p,f]=(0,e.useState)(!1);(0,e.useEffect)(()=>{o&&o.length>0&&d(o.reduce((e,t)=>t.options&&0!==t.options.length?[...e,t]:e,[]))},[o]);const h=e=>t=>{t.stopPropagation(),f(e)};function m(e){a(e)}return(0,i.jsxs)("div",{className:"stellarwp advanced-select-menu",style:{width:r},children:[p?(0,i.jsx)("div",{className:"advanced-select-menu__create-input",children:(0,i.jsx)(Ys,{onComplete:function(e){c(e),f(!1)},onCancel:h(!1)})}):(0,i.jsxs)(Ln,{className:"advanced-select-menu__create",onClick:h(!0),children:[(0,t.__)("Make My Own Collection","kadence-blocks"),(0,i.jsx)(Ws,{icon:Ks,size:20})]}),u&&u.length>0&&u.map(e=>(0,i.jsxs)("div",{className:"advanced-select-menu__option-wrapper",children:[(0,i.jsx)("div",{className:"advanced-select-menu__option-category",children:e.label}),e.options.map(e=>(0,i.jsx)(Xs,{option:e,onOptionSelect:m,isActive:s===e.value,doNotClose:e=>l(!e)},e.value))]},e.label))]})},tl=(0,e.createContext)({}),nl=(0,e.forwardRef)(function(t,n){const{value:r,label:o,options:a,onChange:s,createRecord:l,updateRecord:c,deleteRecord:u}=t,[d,p]=(0,e.useState)("auto"),[f,h]=(0,e.useState)(!1),[m,g]=(0,e.useState)(!0),b=(0,e.useRef)();function v(e){e.stopPropagation(),b?.current&&e?.target&&!b.current.contains(e.target)&&m&&h(!1)}function y(){}return(0,e.useEffect)(()=>{b&&b.current&&p(b.current.clientWidth-32+"px")},[b]),(0,e.useEffect)(()=>(document.addEventListener("click",v),()=>{document.removeEventListener("click",v)}),[m]),(0,i.jsx)(tl.Provider,{value:{createRecord:l,updateRecord:c,deleteRecord:u},children:(0,i.jsxs)("div",{className:"stellarwp components-advanced-select",ref:n,children:[o&&(0,i.jsx)("label",{className:"components-input-control__label",children:o}),(0,i.jsx)("div",{className:"stellarwp-advancedSelect",ref:b,children:(0,i.jsxs)(Ln,{className:f?"is-open":"",onClick:()=>h(!f),children:[(0,i.jsxs)("div",{className:"stellarwp-advancedSelect__button-content",children:[(0,i.jsx)("div",{className:"stellarwp-advancedSelect__button-label",children:r?.label}),(0,i.jsx)("div",{className:"stellarwp-advancedSelect__button-icon",children:(0,i.jsx)(Ws,{size:25,icon:Gs})})]}),f&&(0,i.jsx)(En.Popover,{placement:"bottom-start",offset:8,animate:!1,className:"stellarwp-advancedSelect__content",onClose:y,onFocusOutside:y,children:(0,i.jsx)(el,{width:d,options:a,onSelect:s,value:r?.value,allowClose:g})})]})})]})})});function rl({items:n=[],selectedItems:r=[],onChange:o}){const[a,s]=(0,e.useState)(n);return(0,e.useEffect)(()=>{s(n)},[n]),(0,i.jsx)("div",{className:"ai-wizard-button-list",children:(0,i.jsx)(En.ButtonGroup,{className:"ai-wizard-button-list_wrapper",children:a.map(e=>(0,i.jsxs)("div",{className:"ai-wizard-button-list_item_wrap",children:[(0,i.jsxs)(Ln,{className:"ai-wizard-button-list_item"+(r.includes(e.value)?" is-selected":""),onClick:t=>function(e){const t=[...r],n=t.indexOf(e);-1!==n?t.splice(n,1):t.push(e),o(t)}(e.value),children:[(0,i.jsx)("div",{className:"ai-wizard-button-list_item-icon",children:(0,i.jsx)(En.Icon,{icon:e.icon})}),(0,i.jsxs)("div",{className:"ai-wizard-button-list_item-content",children:[(0,i.jsx)("div",{className:"ai-wizard-button-list_item-title-area",children:(0,i.jsx)("div",{className:"ai-wizard-button-list_item-title",children:e.label})}),e.description&&(0,i.jsx)("div",{className:"ai-wizard-button-list_item-description",children:e.description})]}),(0,i.jsxs)("div",{className:"ai-wizard-button-list_item-active",children:[(0,i.jsx)(En.Icon,{icon:"saved"}),r.length>1&&r[0]===e.value&&(0,i.jsx)("div",{className:"ai-wizard-button-list_item-primary",children:(0,t.__)("Primary","kadence-starter-templates")})]})]}),r.includes(e.value)&&r.length>1&&r[0]!==e.value&&(0,i.jsx)(Ln,{className:"ai-wizard-button-list_item-make-primary",onClick:t=>function(e){const t=[...r],n=t.indexOf(e);if(-1!==n){const[e]=t.splice(n,1);t.unshift(e),console.log("return selected",a.filter(e=>t.includes(e.value))),o(t)}}(e.value),children:(0,t.__)("Make Primary","kadence-starter-templates")})]}))})})}const ol=n.p+"images/ai-modal-intro.f66e5f62.png",il={background:{height:"100%",background:"linear-gradient(90deg, rgba(0, 115, 230, 0) 0, rgba(0, 115, 230, 0) 60%, #0073E6 99.44%)"},headline:{maxWidth:420},content:{maxWidth:480,marginLeft:32},imageWrapper:{overflow:"hidden"},image:{maxHeight:"60vh",borderRadius:8}},al=(0,t.__)("Elevate Your Website Creation: Design Library + Kadence AI","kadence-blocks"),sl=(0,t.__)("Introducing Kadence AI, our AI-powered engine for creating websites.","kadence-blocks"),ll=(0,t.__)("Forget about learning AI - just tell us about yourself, and let Kadence AI take care of the rest. Say goodbye to blank screen anxiety. Welcome effective content that represents your brand.","kadence-blocks");function cl(){return(0,i.jsx)(En.Flex,{style:il.background,children:(0,i.jsxs)(En.Flex,{gap:22.5,children:[(0,i.jsx)(En.FlexBlock,{children:(0,i.jsx)(En.Flex,{className:"inner",justify:"end",children:(0,i.jsxs)(En.FlexBlock,{style:il.content,className:"stellarwp-body",children:[(0,i.jsx)("h1",{className:"stellarwp-h1",style:il.headline,children:al}),(0,i.jsx)("p",{children:sl}),(0,i.jsx)("p",{children:ll})]})})}),(0,i.jsx)(En.FlexBlock,{style:il.imageWrapper,children:(0,i.jsx)("img",{src:ol,style:il.image})})]})})}function ul({children:e}){if(e)return(0,i.jsx)(En.Card,{isBorderless:!0,size:"large",className:"slide-card",children:(0,i.jsx)(En.CardBody,{children:e})})}function dl({headline:e,content:t}){return(0,i.jsxs)("div",{className:"slide-card-row",children:[e?(0,i.jsx)("p",{className:"slide-card-row__headline",children:(0,i.jsx)("b",{children:e})}):null,t?(0,i.jsx)("div",{className:"slide-card-row__content",children:t}):null]})}function pl(){return(0,i.jsx)(ul,{children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"6",children:[(0,i.jsx)(dl,{headline:(0,t.__)("I am","kadence-blocks"),content:(0,t.__)("An Organization","kadence-blocks")}),(0,i.jsx)(dl,{headline:(0,t.__)("Organization Name","kadence-blocks"),content:(0,t.__)("Education 4All","kadence-blocks")}),(0,i.jsx)(dl,{headline:(0,t.__)("Where are you based?","kadence-blocks"),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("b",{children:[(0,t.__)("Service Area","kadence-blocks"),": "]}),(0,t.__)("Latin America","kadence-blocks")]})}),(0,i.jsx)(dl,{headline:(0,t.__)("What industry are you in?","kadence-blocks"),content:(0,t.__)("Charity","kadence-blocks")})]})})}function fl(){return(0,i.jsx)(ul,{children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"6",children:[(0,i.jsx)(dl,{headline:(0,t.__)("I am","kadence-blocks"),content:(0,t.__)("A company","kadence-blocks")}),(0,i.jsx)(dl,{headline:(0,t.__)("Company Name","kadence-blocks"),content:(0,t.__)("Healing Touch","kadence-blocks")}),(0,i.jsx)(dl,{headline:(0,t.__)("Where are you based?","kadence-blocks"),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("b",{children:[(0,t.__)("Business Address","kadence-blocks"),": "]}),(0,t.__)("123 Some St., Seattle, Washington","kadence-blocks")]})}),(0,i.jsx)(dl,{headline:(0,t.__)("What industry are you in?","kadence-blocks"),content:(0,t.__)("Spa","kadence-blocks")})]})})}function hl(){return(0,i.jsx)(ul,{children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"6",children:[(0,i.jsx)(dl,{headline:(0,t.__)("I am","kadence-blocks"),content:(0,t.__)("A company","kadence-blocks")}),(0,i.jsx)(dl,{headline:(0,t.__)("Company Name","kadence-blocks"),content:(0,t.__)("Prospera","kadence-blocks")}),(0,i.jsx)(dl,{headline:(0,t.__)("Where are you based?","kadence-blocks"),content:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("b",{children:(0,t.__)("Online Only","kadence-blocks")})})}),(0,i.jsx)(dl,{headline:(0,t.__)("What industry are you in?","kadence-blocks"),content:(0,t.__)("Professional Services","kadence-blocks")})]})})}function ml(){return(0,i.jsx)(ul,{children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"6",children:[(0,i.jsx)(dl,{headline:(0,t.__)("I am","kadence-blocks"),content:(0,t.__)("An Individual","kadence-blocks")}),(0,i.jsx)(dl,{headline:(0,t.__)("Your Name","kadence-blocks"),content:(0,t.__)("Spencer Sharp","kadence-blocks")}),(0,i.jsx)(dl,{headline:(0,t.__)("Where are you based?","kadence-blocks"),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("b",{children:[(0,t.__)("Service Area","kadence-blocks"),": "]}),(0,t.__)("USA","kadence-blocks")]})}),(0,i.jsx)(dl,{headline:(0,t.__)("What industry are you in?","kadence-blocks"),content:(0,t.__)("Coaching","kadence-blocks")})]})})}const gl={container:{height:"100%"},leftContent:{maxWidth:640,marginInline:"auto"},rightContent:{marginRight:32,height:"100%",display:"flex",flexDirection:"column"},formWrapper:{maxWidth:504,paddingRight:32,paddingLeft:32},inputError:{fontSize:11,color:"red"}},bl=(0,t.__)("Your Information","kadence-blocks"),vl=(0,t.__)("Please provide detailed information about yourself, your company, or your organization to enhance the quality of our results.","kadence-blocks");function yl(){const[n,r]=(0,e.useState)(null),[o,a]=(0,e.useState)(""),[s,l]=(0,e.useState)(0),{state:c,dispatch:u}=D(),{companyName:d,entityType:p,locationInput:f,lang:h,locationType:v,industry:x}=c;function O(e){return p&&b?.[p]?.[e]?b[p][e]:"..."}return(0,e.useEffect)(()=>{const e=m.filter(e=>e.value===p);e.length&&r(e[0])},[p]),(0,e.useEffect)(()=>{const e=g.filter(e=>e.value===h);if(e.length)a(e[0]);else{const e=g.filter(e=>"en-US"===e.value);e.length&&a(e[0])}},[h]),(0,e.useEffect)(()=>{switch(v){case y:return void u({type:"SET_LOCATION",payload:`${y}: ${f}`});case _:u({type:"SET_LOCATION",payload:`${_}: ${f}`})}},[f,v]),(0,i.jsxs)(En.Flex,{gap:0,align:"normal",style:gl.container,children:[(0,i.jsx)(En.FlexBlock,{style:{alignSelf:"center"},children:(0,i.jsx)(En.Flex,{justify:"center",style:gl.leftContent,children:(0,i.jsxs)(En.FlexBlock,{style:gl.formWrapper,className:"stellarwp-body",children:[(0,i.jsx)(ds,{headline:(0,i.jsxs)("span",{className:"has-beta-pill",children:[(0,t.__)("Your Sites's Language","kadence-blocks")," ",(0,i.jsx)("span",{className:"beta-pill",children:"Beta"})]}),content:(0,t.__)("Select your preferred language for AI-generated content on your site. Note: AI content quality varies by language due to available training data; English is best supported.","kadence-blocks"),children:(0,i.jsx)(En.__experimentalVStack,{spacing:4,style:{margin:"0 auto 30px"},children:(0,i.jsx)(ys,{label:"",value:o,onChange:function(e){u({type:"SET_LANG",payload:e.value})},options:g})})}),(0,i.jsx)(ds,{headline:bl,content:vl,children:(0,i.jsxs)(En.__experimentalVStack,{spacing:4,style:{margin:"0 auto"},children:[(0,i.jsx)(ys,{label:(0,t.__)("I am","kadence-blocks"),value:n,onChange:function(e){u({type:"SET_ENTITY_TYPE",payload:e.value})},options:m}),(0,i.jsx)(Os,{label:O("label"),autoFocus:!0,placeholder:O("placeholder"),value:d,onChange:e=>{e&&e.length>75&&(e=e.substring(0,75)),u({type:"SET_COMPANY_NAME",payload:e})}}),(0,i.jsx)(fs,{label:(0,t.__)("Where are you based?","kadence-blocks"),locations:k,selected:v,onChange:function(e){e===w&&(u({type:"SET_LOCATION",payload:w}),u({type:"SET_LOCATION_TYPE",payload:w})),u({type:"SET_LOCATION_TYPE",payload:e})}}),v&&v!==w?(0,i.jsx)(Os,{label:"Location",placeholder:function(){if(v!==w){const e=k.filter(e=>e.value===v);return e.length&&e[0]?.placeholder?e[0].placeholder:"..."}return"..."}(),value:f,onChange:e=>{e&&e.length>140&&(e=e.substring(0,140)),u({type:"SET_LOCATION_INPUT",payload:e})},help:function(){if(v!==w){const e=k.filter(e=>e.value===v);return e.length&&e[0]?.help?e[0].help:""}return""}()}):null,(0,i.jsx)(Tn,{label:(0,t.__)("What Industry are you in?","kadence-blocks"),placeholder:(0,t.__)("Find your industry","kadence-blocks"),detachedMediaQuery:"none",onSelect:function(e){e&&e.length>75&&(e=e.substring(0,75)),u({type:"SET_INDUSTRY",payload:e})},currentValue:x||"",initialState:{isOpen:!1,query:x||"",params:{hitsPerPage:8,highlightPreTag:"<mark>",highlightPostTag:"</mark>"}}})]})})]})})}),(0,i.jsx)(En.FlexBlock,{display:"flex",children:(0,i.jsx)(En.Flex,{justify:"center",children:(0,i.jsx)(En.FlexBlock,{style:gl.rightContent,children:(0,i.jsx)(Ss,{backgroundImage:S[s],text:(0,t.__)("Not sure where to start? Here's some real life examples!","kadence-blocks"),doBeforeSlide:e=>l(e.nextSlide),slides:[(0,i.jsx)(fl,{}),(0,i.jsx)(ml,{}),(0,i.jsx)(hl,{}),(0,i.jsx)(pl,{})]})})})})]})}const _l=["Education 4All is a non-profit organization dedicated to providing \n underprivileged children with access to quality education.","Through initiatives like school infrastructure development, teacher \n training, curriculum development, and learning resource provision, we empower \n children, their families, and communities.","Our mission is to break the cycle of poverty by equipping children with the \n tools they need for a brighter future and fostering sustainable development."];function wl(){return(0,i.jsx)(ul,{children:(0,i.jsx)(dl,{headline:(0,t.__)("Tell us about your organization","kadence-blocks"),content:_l.map((e,t)=>(0,i.jsx)("p",{children:e},t))})})}const kl=["Healing Touch is a leading massage therapy business renowned \n for our personalized, holistic treatments offered in a tranquil environment.","Our team of highly skilled therapists seamlessly blends various techniques to \n cater to the unique needs of each individual, offering effective relief from \n tension, pain, and stress.","Our services encompass a wide range of offerings, including Swedish, deep \n tissue, hot stone, and prenatal massage, along with complementary treatments \n like reflexology, acupuncture, and energy work.","With an unwavering commitment to excellence and promoting relaxation, we are \n dedicated to helping our valued clients restore vitality and achieve a \n profound state of deep relaxation."];function xl(){return(0,i.jsx)(ul,{children:(0,i.jsx)(dl,{headline:(0,t.__)("Tell us about your business","kadence-blocks"),content:kl.map((e,t)=>(0,i.jsx)("p",{children:e},t))})})}const Sl=["Prospera is a trusted bookkeeping and accounting services company dedicated \n to helping businesses thrive financially.","We specialize in comprehensive bookkeeping, accurate financial reporting, \n tax preparation, and strategic financial planning.","Our tailored solutions cater to small and medium-sized enterprises, entrepreneurs, and professionals, providing them \n with the unique value of expertise, accuracy, and timely insights.","With Prospera, businesses gain the financial clarity and support they need to make \n informed decisions and achieve long-term prosperity."];function Ol(){return(0,i.jsx)(ul,{children:(0,i.jsx)(dl,{headline:(0,t.__)("Tell us about your business","kadence-blocks"),content:Sl.map((e,t)=>(0,i.jsx)("p",{children:e},t))})})}const jl=["I'm Spencer Sharp, a business coach who is genuinely committed to helping \n entrepreneurs and professionals build businesses they are passionate about \n and lead fulfilling lives.","With practical solutions and personalized guidance, I provide the support \n you need to achieve your goals.","Together, we'll work on creating systems for organization, clarity, and \n growth.","I'll empower you to become a strong leader, take control of your finances, \n and develop effective strategies for marketing, lead conversion, and \n customer fulfillment.","I’ll be your guide on this journey to success, ensuring that your business \n thrives while you live a rewarding life."];function Cl(){return(0,i.jsx)(ul,{children:(0,i.jsx)(dl,{headline:(0,t.__)("Tell us about yourself","kadence-blocks"),content:jl.map((e,t)=>(0,i.jsx)("p",{children:e},t))})})}const Il={container:{height:"100%"},leftContent:{maxWidth:640,marginInline:"auto"},rightContent:{marginRight:32,height:"100%",display:"flex",flexDirection:"column"},formWrapper:{maxWidth:504,paddingRight:32,paddingLeft:32},textareaWrapper:{position:"relative"},tooltip:{position:"absolute",top:16,left:"100%",borderRadius:"0px 4px 4px 0px",padding:12,backgroundColor:"#FAFAFA",width:200,zIndex:1,title:{fontSize:12,fontWeight:600},content:{fontSize:11,lineHeight:"14px",letterSpacing:-.2,listStyle:"disc",paddingLeft:14}}},El=(0,t.__)("Craft a brief description that explains who you are, your primary attributes and highlight what differentiates you.","kadence-blocks"),Pl={COMPANY:` ${(0,t.__)("business","kadence-blocks")}`,INDIVIDUAL:(0,t.__)("self","kadence-blocks"),ORGANIZATION:` ${(0,t.__)("organization","kadence-blocks")}`};function Al(){const[n,r]=(0,e.useState)(),[o,a]=(0,e.useState)(0),[s,l]=(0,e.useState)(0),[c,u]=(0,e.useState)(!1),[d,p]=(0,e.useState)(""),[f,m]=(0,e.useState)(!1),[b,v]=(0,e.useState)(""),{state:y,dispatch:_}=D(),{missionStatement:w,entityType:k,lang:j,companyName:C}=y,I=(0,t.sprintf)(
// translators: %s: entity type
// translators: %s: entity type
(0,t.__)("Tell us about your %s","kadence-blocks"),Pl[k]),E=g.filter(e=>e.value===(j||"en-US")),P=(0,t.sprintf)(
// translators: %s: language
// translators: %s: language
(0,t.__)("This should be written in %s.","kadence-blocks"),E?.[0]?.label?E[0].label:"your site language"),{getMissionStatement:A}={getMissionStatement:async function(e,t){try{const n=new URL(window.location.href),r=window?.kadence_blocks_params?.proData?.domain?window.kadence_blocks_params.proData.domain:n.hostname;let o=window?.kadence_blocks_params?.proData?.api_key?window.kadence_blocks_params.proData.api_key:"";o||(o=window?.kadenceHomeParams?.apiKey?window.kadenceHomeParams.apiKey:"");let i=window?.kadence_blocks_params?.site_name?window.kadence_blocks_params.site_name:"";i||(i=window?.kadenceHomeParams?.site_name?window.kadenceHomeParams.site_name:"");let a=window?.kadence_blocks_params?.pSlug?window.kadence_blocks_params.pSlug:"";a||(a=window?.kadenceHomeParams?.pSlug?window.kadenceHomeParams.pSlug:"");let s=window?.kadence_blocks_params?.pVersion?window.kadence_blocks_params.pVersion:"";s||(s=window?.kadenceHomeParams?.pVersion?window.kadenceHomeParams.pVersion:"");const l={domain:r,key:o,site_name:i,product_slug:a,product_version:s},c=await fetch("https://content.startertemplatecloud.com/wp-json/prophecy/v1/proxy/intake/improve-mission-statement",{method:"POST",headers:{"Content-Type":"application/json","X-Prophecy-Token":btoa(JSON.stringify(l))},body:JSON.stringify({text:e,lang:t||"en-US",stream:!0})});if(200!==c?.status){if(424===c?.status)return Promise.reject("license");const e=c?.message?c.message:c;return Promise.reject(e)}return c.body}catch(e){const t=e?.message?e.message:e;return Promise.reject(t)}}};return(0,e.useEffect)(()=>{const e=Math.round(w.length/300*100);0==e&&r("initial"),e<50&&e>0&&r("weak"),e>=50&&e<100&&r("medium"),e>=100&&e<200&&r("strong"),e>=200&&e<400&&r("enough"),e>=400&&e<500&&r("less"),e>=500&&r("muchLess"),a(e)},[w]),(0,i.jsxs)(En.Flex,{gap:0,align:"normal",style:Il.container,children:[(0,i.jsx)(En.FlexBlock,{style:{alignSelf:"center"},children:(0,i.jsx)(En.Flex,{justify:"center",style:Il.leftContent,children:(0,i.jsx)(En.FlexBlock,{style:Il.formWrapper,className:"stellarwp-body",children:(0,i.jsxs)(ds,{headline:I,content:j&&"en-US"!==j?P+" "+El:El,children:[(0,i.jsxs)(En.__experimentalView,{style:Il.textareaWrapper,children:[(0,i.jsx)(Cs,{hideLabelFromVision:!0,label:I,placeholder:k===h?(0,t.sprintf)(
// translators: %s: company or individual name
// translators: %s: company or individual name
(0,t.__)("I am %s, a…","kadence-blocks"),C):(0,t.sprintf)(
// translators: %s: company or individual name
// translators: %s: company or individual name
(0,t.__)("%s is a…","kadence-blocks"),C),value:w,onChange:e=>{_({type:"SET_MISSION_STATEMENT",payload:e}),_({type:"SET_IMAGE_SEARCH_QUERY",payload:""})},progressBarProps:{value:o>=100?100:o,color:x?.[n]?.color?x[n].color:"red",message:x?.[n]?.message?x[n].message:""},disabled:d,aiLoading:f,aiSuggestion:d,onUndo:()=>p(""),onAccept:()=>{_({type:"SET_MISSION_STATEMENT",payload:d}),p("")}}),c&&(0,i.jsxs)(En.__experimentalVStack,{style:Il.tooltip,children:[(0,i.jsx)(En.__experimentalText,{style:Il.tooltip.title,children:(0,t.__)("Thought Starters","kadence-blocks")}),O[k].length>0&&(0,i.jsx)("ul",{style:Il.tooltip.content,children:O[k].map(e=>(0,i.jsx)("li",{children:e},e))})]})]}),!d&&!f&&(0,i.jsxs)(i.Fragment,{children:[b&&(0,i.jsx)("div",{className:"stellarwp-ai-error-text",children:(0,i.jsx)("div",{className:"stellarwp-ai-error-content",children:"license"===b?(0,t.__)("Error, license key invalid."):(0,t.__)("Error, AI improve failed, please try again.")})}),(0,i.jsxs)(En.Flex,{justify:"space-between",children:[(0,i.jsx)(En.FlexItem,{children:o>=100&&o<400&&(0,i.jsx)(Ln,{className:"stellarwp-ai-improve-button",icon:Mn,onClick:()=>{return e=w,m(!0),v(""),void A(e,j).then(e=>{const t=e.getReader();t.read().then(function e({done:n,value:r}){if(n)return void m(!1);const o=function(e){const t=(new TextDecoder).decode(e).split("\n"),n={content:""};return t.forEach(e=>{const t=e.indexOf(":");if(-1!==t){const r=e.slice(0,t).trim(),o=e.slice(t+1).trim();if("data"===r&&"content"!==o)try{const e=JSON.parse(o);e.content&&(n.content+=e.content)}catch(e){console.error("Error parsing JSON data:",e)}}}),n}(r);return o?.content&&p(e=>e+o.content),t.read().then(e)}),m(!1)}).catch(e=>{v("license"===e?"license":"error"),console.log(e),m(!1)});var e},children:(0,t.__)("Improve with AI","kadence-blocks")})}),(0,i.jsx)(En.FlexItem,{children:(0,i.jsx)(Ln,{size:"small",className:"stellarwp-show-tips-button",icon:c?Un:Bn,iconPosition:"right",onClick:()=>u(e=>!e),children:c?(0,t.__)("Hide Tips","kadence-blocks"):(0,t.__)("Show Tips","kadence-blocks")})})]})]})]})})})}),(0,i.jsx)(En.FlexBlock,{display:"flex",children:(0,i.jsx)(En.Flex,{justify:"center",children:(0,i.jsx)(En.FlexBlock,{style:Il.rightContent,children:(0,i.jsx)(Ss,{backgroundImage:S[s],text:(0,t.__)("Not sure where to start? Here's some real life examples!","kadence-blocks"),doBeforeSlide:e=>l(e.nextSlide),slides:[(0,i.jsx)(xl,{}),(0,i.jsx)(Cl,{}),(0,i.jsx)(Ol,{}),(0,i.jsx)(wl,{})]})})})})]})}const Tl=window.wp.url;function Ll({tone:e,headline:n,content:r}){return(0,i.jsxs)("div",{className:"slide-card-row--tone",children:[e?(0,i.jsx)(Dn,{text:`${(0,t.__)("Tone","kadence-blocks")}: ${e}`}):null,n?(0,i.jsx)("p",{className:"slide-card-row__headline",children:n}):null,r?(0,i.jsx)("p",{className:"slide-card-row__content",children:r}):null]})}function Nl(){return(0,i.jsx)(ul,{children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"6",children:[(0,i.jsx)(Ll,{tone:(0,t.__)("Professional","kadence-blocks"),headline:(0,t.__)("Elevate Your Well-being with Healing Touch's Expert Care","kadence-blocks"),content:(0,t.__)('"Experience the pinnacle of wellness and rejuvenation as our skilled therapists provide you with expert care and tailored massage therapy at Healing Touch."',"kadence-blocks")}),(0,i.jsx)(Ll,{tone:(0,t.__)("Friendly","kadence-blocks"),headline:(0,t.__)("Welcome to Your Personal Oasis","kadence-blocks"),content:(0,t.__)('"Immerse yourself in the ultimate relaxation experience at Healing Touch, where our friendly team of skilled therapists will whisk you away to a serene sanctuary of bliss and rejuvenation."',"kadence-blocks")}),(0,i.jsx)(Ll,{tone:(0,t.__)("Informative","kadence-blocks"),headline:(0,t.__)("Discover the Secrets of Blissful Wellness","kadence-blocks"),content:(0,t.__)('"Experience the transformative power of professional massage therapy and unlock a world of relaxation, pain relief, and enhanced well-being at Healing Touch."',"kadence-blocks")})]})})}function Rl(){return(0,i.jsx)(ul,{children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"6",children:[(0,i.jsx)(Ll,{tone:(0,t.__)("Engaging","kadence-blocks"),headline:(0,t.__)("Unleash Your Inner Bliss with Healing Touch","kadence-blocks"),content:(0,t.__)('"Discover a transformative sanctuary where your senses will awaken, your spirit will rejuvenate, and your well-being will flourish. Experience the power of Healing Touch today."',"kadence-blocks")}),(0,i.jsx)(Ll,{tone:(0,t.__)("Trustworthy","kadence-blocks"),headline:(0,t.__)("Your Path to Trusted Wellness Begins at Healing Touch","kadence-blocks"),content:(0,t.__)('"Experience the highest standard of care and expertise as our dedicated team guides you on your journey to holistic well-being at Healing Touch."',"kadence-blocks")}),(0,i.jsx)(Ll,{tone:(0,t.__)("Conversational","kadence-blocks"),headline:(0,t.__)("Let's Find Your Perfect Massage Experience at Healing Touch","kadence-blocks"),content:(0,t.__)('"Ready to discover the ultimate relaxation? Let us guide you in finding the perfect massage tailored to your unique needs at Healing Touch."',"kadence-blocks")})]})})}function Dl(){return(0,i.jsx)(ul,{children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"6",children:[(0,i.jsx)(Ll,{tone:(0,t.__)("Persuasive","kadence-blocks"),headline:(0,t.__)("Embrace the Power of Healing Touch for Unparalleled Relaxation","kadence-blocks"),content:(0,t.__)('"Immerse yourself in a world of relaxation, rejuvenation, and renewed vitality with Healing Touch\'s expert massage therapy, tailored to revitalize your mind, body, and spirit."',"kadence-blocks")}),(0,i.jsx)(Ll,{tone:(0,t.__)("Upbeat","kadence-blocks"),headline:(0,t.__)("Elevate Your Senses, Renew Your Spirit","kadence-blocks"),content:(0,t.__)('"Step into a world of pure bliss and let our expert therapists at Healing Touch Spa uplift your spirits and rejuvenate your body with our invigorating massage therapies."',"kadence-blocks")}),(0,i.jsx)(Ll,{tone:(0,t.__)("Funny","kadence-blocks"),headline:(0,t.__)("Knead a Laugh? Healing Touch Puts the 'Ahh' in Spa-tacular Massages!","kadence-blocks"),content:(0,t.__)('"Get ready to unwind, untangle, and unleash your inner noodle with Healing Touch\'s hilariously heavenly massages!"',"kadence-blocks")})]})})}function Ml(){return(0,i.jsx)(ul,{children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"6",children:[(0,i.jsx)(Ll,{tone:(0,t.__)("Inspirational","kadence-blocks"),headline:(0,t.__)("Ignite Your Inner Spark, Transform Your Life at Healing","kadence-blocks"),content:(0,t.__)("“Embrace the power of self-care and unlock your body's innate healing potential, as our skilled practitioners rejuvenate your mind, body, and spirit with transformative therapies.\"","kadence-blocks")}),(0,i.jsx)(Ll,{tone:(0,t.__)("Neutral","kadence-blocks"),headline:(0,t.__)("Discover the Essence of Healing Touch at Healing Touch Spa","kadence-blocks"),content:(0,t.__)('"Experience a range of therapeutic treatments and indulge in a serene atmosphere, where you can unwind and rejuvenate your body and mind."',"kadence-blocks")})]})})}const{getSuggestedKeywords:Fl}={getSuggestedKeywords:async function({name:e,entity_type:t,industry:n,location:o,lang:i,description:a}){try{const s=await Ts()({path:"/kb-design-library/v1/get_keywords",method:"POST",data:{name:e,entity_type:t?.toLowerCase(),industry:n,location:o,description:a,lang:i||"en-US",count:10}}),l=(0,r.SafeParseJSON)(s,!1);return Promise.resolve(l?.keywords)}catch(e){const t=e?.message?e.message:e;return Promise.reject(t)}}},{getImageSearchQuery:Vl}={getImageSearchQuery:async function({name:e,entity_type:t,industry:n,location:o,description:i}){try{const a=await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get_search_query"),method:"POST",data:{name:e,entity_type:t?.toLowerCase(),industry:n,location:o,description:i}}),s=(0,r.SafeParseJSON)(a,!1);return Promise.resolve(s)}catch(e){const t=e?.message?e.message:e;return Promise.reject(t)}}},Hl={container:{height:"100%"},leftContent:{maxWidth:640,marginInline:"auto"},rightContent:{marginRight:32,height:"100%",display:"flex",flexDirection:"column"},formWrapper:{maxWidth:504,paddingRight:32,paddingLeft:32},helperText:{fontSize:12},keywordsLength:{good:"green",poor:"red"}};function zl(){const{state:n,dispatch:r}=D(),{companyName:o,entityType:a,industry:s,keywords:l,location:c,missionStatement:u,suggestedKeywords:d,suggestedKeywordsState:p,tone:h,lang:m,imageSearchQuery:g}=n,[b,v]=(0,e.useState)(null),[y,_]=(0,e.useState)(null),[w,k]=(0,e.useState)(null),[x,O]=(0,e.useState)(null),[A,T]=(0,e.useState)(),{menuHeight:L,menuPlacement:N}=function(t,n){const[r,o]=(0,e.useState)(300),[i,a]=(0,e.useState)("auto");return(0,e.useEffect)(()=>{function e(){if(t&&n){const e=t.getBoundingClientRect(),r=n.getBoundingClientRect(),i=e.bottom-(r.bottom+30),s=i<150?"top":"auto";a(s),o("top"===s?300:i)}}return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[t,n]),{menuPlacement:i,menuHeight:r}}(w,x);function R(){r({type:"SET_SUGGESTED_KEYWORDS_STATE",payload:j}),Fl({name:o,entity_type:a,industry:s,location:c,lang:m,description:u}).then(e=>{T(e),r({type:"SET_SUGGESTED_KEYWORDS",payload:e}),r({type:"SET_SUGGESTED_KEYWORDS_STATE",payload:e?.length?E:C})}).catch(()=>{r({type:"SET_SUGGESTED_KEYWORDS_STATE",payload:I})})}return(0,e.useEffect)(()=>{l.length>0&&l.length<5?v("poor"):l.length>=5&&v("good")},[l]),(0,e.useEffect)(()=>{const e=f.filter(e=>e.value===h);e.length&&_(e[0])},[h]),(0,e.useEffect)(()=>{R(),g||Vl({name:o,entity_type:a,industry:s,location:c,description:u}).then(e=>{console.log("Image Search AI Terms"),console.log(e),e?.query&&r({type:"SET_IMAGE_SEARCH_QUERY",payload:e.query})}).catch(()=>{console.log("error")})},[]),(0,i.jsxs)(En.Flex,{gap:0,align:"normal",style:Hl.container,ref:k,children:[(0,i.jsx)(En.FlexBlock,{style:{alignSelf:"center"},children:(0,i.jsx)(En.Flex,{justify:"center",style:Hl.leftContent,children:(0,i.jsx)(En.FlexBlock,{style:Hl.formWrapper,className:"stellarwp-body",children:(0,i.jsxs)(En.__experimentalVStack,{spacing:"8",style:{margin:"0 auto"},children:[(0,i.jsx)(ds,{headline:(0,t.__)("Add some keywords","kadence-blocks"),content:(0,t.__)("Keywords assist the AI in identifying the most relevant topics to write about.","kadence-blocks"),children:(0,i.jsx)(qn,{id:"2",label:(0,t.__)("Keywords","kadence-blocks"),hideLabelFromVision:!0,placeholder:(0,t.__)("Add Keyword…","kadence-blocks"),tags:l,maxTags:10,selectedTags:e=>r({type:"SET_KEYWORDS",payload:e}),suggestedKeywords:d,suggestedKeywordsState:p,onSuggestedKeywordAdded:function(e){const t=d.filter(t=>t!==e);r({type:"SET_SUGGESTED_KEYWORDS",payload:t}),0===t.length&&r({type:"SET_SUGGESTED_KEYWORDS_STATE",payload:P})},onTryAgain:R,onTagDeleted:function(e){A?.includes(e)&&r({type:"SET_SUGGESTED_KEYWORDS",payload:[...d,e]})},help:(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(En.Flex,{align:"flex-start",as:"span",style:Hl.helperText,children:[(0,i.jsx)(En.FlexBlock,{as:"span",children:(0,t.__)("Separate with commas or the Enter key. Enter between 5 and 10 keywords","kadence-blocks")}),(0,i.jsx)(En.FlexItem,{as:"span",style:{color:b&&Hl.keywordsLength.hasOwnProperty(b)?Hl.keywordsLength[b]:"inherit"},children:`${l.length}/10`})]})})})}),(0,i.jsx)(ds,{headline:(0,t.__)("Choose your tone","kadence-blocks"),content:(0,t.__)("The tone allows the AI to reflect your personality in its communication style. Select a tone that closely aligns with your own.","kadence-blocks"),children:(0,i.jsx)(ys,{ref:O,maxMenuHeight:L,menuPlacement:N,options:f,value:y,onChange:e=>r({type:"SET_TONE",payload:e.value})})})]})})})}),(0,i.jsx)(En.FlexBlock,{display:"flex",children:(0,i.jsx)(En.Flex,{justify:"center",children:(0,i.jsx)(En.FlexBlock,{style:Hl.rightContent,children:(0,i.jsx)(Ss,{backgroundImage:S[0],text:(0,t.__)("Not sure where to start? Here's some real life examples!","kadence-blocks"),slides:[(0,i.jsx)(Nl,{}),(0,i.jsx)(Rl,{}),(0,i.jsx)(Dl,{}),(0,i.jsx)(Ml,{})]})})})})]})}const Bl={container:{height:"100%"},leftContent:{maxWidth:940,marginInline:"auto"},rightContent:{marginRight:32,height:"100%",display:"flex",flexDirection:"column"},formWrapper:{paddingRight:32,paddingLeft:32},textareaWrapper:{position:"relative"},image:{borderRadius:"20px",background:`url(${p}) no-repeat center center`,height:"100%",backgroundSize:"cover"}};function Ul(){const{state:n,dispatch:r}=D(),[o,a]=(0,e.useState)([]);return(0,e.useEffect)(()=>{const e=[];Object.keys(v).map(t=>{e.push({id:t,label:v[t].label,value:v[t].value,icon:v[t].icon,description:v[t]?.description?v[t].description:"",isIncluded:n.goals.includes(v[t].value),isPrimary:n.goals.includes(v[t].value)&&n.goals[0]===v[t].value})}),a(e)},[]),(0,i.jsxs)(En.Flex,{gap:0,align:"normal",style:Bl.container,children:[(0,i.jsx)(En.FlexBlock,{style:{alignSelf:"center",flex:"3 1 0%"},children:(0,i.jsx)(En.Flex,{justify:"center",style:Bl.leftContent,children:(0,i.jsx)(En.FlexBlock,{style:Bl.formWrapper,className:"stellarwp-body",children:(0,i.jsx)(ds,{headline:(0,i.jsxs)("span",{className:"has-beta-pill",children:[(0,t.__)("What are the goals of this site?","kadence-blocks")," ",(0,i.jsx)("span",{className:"beta-pill",children:"Beta"})]}),content:(0,t.__)("Select all that apply, it is ok to select none. This will be used to help determine content to show for your specific site. NOTE: This is in early stages and has minimal effects currently, but is improving.","kadence-blocks"),children:(0,i.jsx)(En.__experimentalView,{style:Bl.textareaWrapper,children:(0,i.jsx)(En.__experimentalVStack,{children:v.length>0&&(0,i.jsx)(rl,{onChange:function(e){r({type:"SET_SITE_GOALS",payload:e})},items:o,selectedItems:n.goals})})})})})})}),(0,i.jsx)(En.FlexBlock,{display:"flex",style:{flex:"2 1 0%"},children:(0,i.jsx)(En.Flex,{justify:"center",children:(0,i.jsx)(En.FlexBlock,{style:Bl.rightContent,children:(0,i.jsx)("div",{style:Bl.image})})})})]})}function ql(){const{state:{customCollections:n,imageSearchQuery:o},dispatch:i}=D(),{loading:a,verticals:s,getPreMadeCollectionByIndustry:l}=function(){const[n,o]=(0,e.useState)(!0),[i,a]=(0,e.useState)([]),[s,l]=(0,e.useState)([]);return(0,e.useEffect)(()=>{o(!0),async function(){try{let e=[];const t=await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get_image_collections")}),n=(0,r.SafeParseJSON)(t,!1);n?.data?.collections&&(e=n.data.collections,a(e),sessionStorage.setItem("kadence_ai_collections",JSON.stringify(e)))}catch(e){const t=e?.message?e.message:e;console.log(`ERROR: ${t}`)}finally{o(!1)}}(),async function(){for(let e=0;e<3;e++)try{const e=await Ts()({path:"/kb-design-library/v1/get_verticals"}),n=(0,r.SafeParseJSON)(e,!1);if(n&&n?.data){let e=n.data.reduce((e,t)=>[...e,...t.sub_verticals.map(e=>({label:e,value:e}))],[]);e.sort(function(e,t){return e.label<t.label?-1:e.label>t.label?1:0}),e=e.filter(e=>"Other"!==e.value),e.unshift({label:(0,t.__)("AI Search Collection","kadence-blocks"),value:"aiGenerated",galleries:[{name:"featured",images:[]},{name:"background",images:[]}]}),l(e),sessionStorage.setItem("kadence_ai_verticals",JSON.stringify(e));break}}catch(e){const t=e?.message?e.message:e;console.log(`ERROR: ${t}`)}o(!1)}()},[]),{loading:n,verticals:s,getPreMadeCollectionByIndustry:async function(e,t=""){const n=Array.isArray(e)?e:[e];try{const o=await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get_images",{industries:n,industry:t,image_type:"JPEG",image_sizes:kadenceExtensionImagePicker.image_sizes})}),a=(0,r.SafeParseJSON)(o,!1);return a&&a?.data?"aiGenerated"===e?[{name:"featured",images:a?.data?.images.slice(0,12)},{name:"background",images:a?.data?.images.slice(12,24)}]:a.data.map(e=>{const t=i.find(t=>t.collection_slug===e.collection_slug);return{name:e.collection_slug,images:e.images,pexelLink:t?.collection_url||""}}):[]}catch(e){const t=e?.message?e.message:e;console.log(`ERROR: ${t}`)}}}}(),[c,u]=(0,e.useState)(!0),[d,p]=(0,e.useState)();return(0,e.useEffect)(()=>{u(!0),function(){if(n)p(n);else{const e=[{label:(0,t.__)("My Images","kadence-blocks"),value:"my-collections",galleries:[{name:"featured",isLocal:!0,images:[]},{name:"background",isLocal:!0,images:[]}]}];p(e)}u(!1)}()},[]),{loading:!(!c&&!a),preMadeCollections:s,wordpressCollections:d,getCollectionGalleries:async function(e){if(e&&d){if(d&&d.length>0){const t=d.find(t=>t.value===e);if(t)return t.galleries}return await l(e,o)}},updateGalleries:function(e,t){if(!e)return{};let n={};const r=d.findIndex(t=>t.value===e);if(r>-1){const e=[...d];return e[r].galleries=t,i({type:"SET_CUSTOM_COLLECTIONS",payload:e}),p(e),e[r].value}const o=s.find(t=>t.value===e),a=d.reduce((t,n)=>n.createdFrom===e&&n.version>t?n.version:t,0);n={label:`${o.label} (Edited${a>0?` ${a+1}`:""})`,value:`${e}_${a}_${(new Date).getTime().toString().slice(-6)}`,createdFrom:e,version:a+1,galleries:t};const l=[n,...d];return i({type:"SET_CUSTOM_COLLECTIONS",payload:l}),p(l),n.value},createCollection:function(e,t){if(!e)return{};const n={label:e,value:`${e.replace(/ /g,"")}_0_${(new Date).getTime().toString().slice(-6)}`,createdFrom:null,version:0,galleries:t},r=[n,...d];return i({type:"SET_CUSTOM_COLLECTIONS",payload:r}),p(r),n.value},updateCollectionName:function(e,t){if(!t||!e)return"";const n=d.findIndex(e=>e.value===t);if(-1===n)return"";const r=[...d];return r[n].label=e,i({type:"SET_CUSTOM_COLLECTIONS",payload:r}),p(r),r[n].value},deleteCollection:function(e){if(!e)return;const t=d.findIndex(t=>t.value===e);if(-1===t)return;const n=[...d];n.splice(t,1),i({type:"SET_CUSTOM_COLLECTIONS",payload:n}),p(n)}}}const $l={topSection:{borderBottom:"1px solid #DFDFDF",marginBottom:"40px",paddingBottom:"24px",position:"relative"},selectWrapper:{maxWidth:500},selectControl:{width:"100%",textAlign:"center"},alignCenter:{alignItems:"center"}};function Wl(n){const{photographyOnly:r}=n,{state:{photoLibrary:o,imageSearchQuery:a},dispatch:s}=D(),{preMadeCollections:l,wordpressCollections:c,getCollectionGalleries:u,updateGalleries:d,createCollection:p,updateCollectionName:f,deleteCollection:h}=ql(),[m,g]=(0,e.useState)([]),[b,v]=(0,e.useState)(!1),[y,_]=(0,e.useState)([{},{}]),[w,k]=(0,e.useState)(!1),[x,S]=(0,e.useState)(""),[O,j]=(0,e.useState)(!1),[C,I]=(0,e.useState)();async function E(e=null){if(b)return;v(!0);const t=await u(e||o);t&&_(t),v(!1)}function P(e){let t=e;e?.value&&(t=e.value),t!==o?(s({type:"SET_PHOTO_LIBRARY",payload:t}),s({type:"SET_PHOTO_LIBRARY_CHANGED",payload:!0}),_([{},{}]),E(t)):(s({type:"SET_PHOTO_LIBRARY_CHANGED",payload:!1}),E(t))}(0,e.useEffect)(()=>{s({type:"SET_PHOTO_LIBRARY_CHANGED",payload:!1})},[]),(0,e.useEffect)(()=>{l&&c&&(g([{label:(0,t.__)("My Collections","kadence-blocks"),options:c.map(e=>({label:e.label,value:e.value,useActions:!0}))},{label:"Premade Collections",options:l.map(e=>({label:e.label,value:e.value,useActions:!1}))}]),E())},[l,c]),(0,e.useEffect)(()=>{l&&c&&E()},[a]);const A=o&&l&&l.filter(e=>e.value===o);return(0,i.jsxs)("div",{className:"stellarwp-ai-photography-library",children:[(0,i.jsx)(En.Flex,{justify:"center",style:$l.topSection,children:(0,i.jsx)(En.FlexBlock,{style:$l.selectWrapper,children:(0,i.jsx)(En.Flex,{className:"stellarwp-ai-photography-library__selection",direction:"row",children:(0,i.jsx)(nl,{label:(0,t.__)("Use Images From:","kadence-blocks"),options:m||[],value:m?.length>0?function(e,t){for(const n of e){const e=n.options.find(e=>e.value===t);if(e)return e}return null}(m,o):"",onChange:e=>{P(e.value)},createRecord:function(e){P(p(e,[{name:"featured",images:[]},{name:"background",images:[]}]))},updateRecord:function(e,t){const n=f(e,t);o===n&&P(n)},deleteRecord:function(e){o===e&&P(m[1].options[0]),h(e)}})})})}),"aiGenerated"!==o&&(0,i.jsxs)(i.Fragment,{children:[A&&(0,i.jsxs)("div",{className:"kb-photography-explained-wrap",children:[(0,i.jsx)("p",{children:(0,t.__)("Fine-tune your collection by selecting 'Edit Collection' below.","kadence-blocks")}),(0,i.jsx)("p",{children:(0,t.__)("or -","kadence-blocks")}),(0,i.jsx)("p",{children:(0,t.__)("Kickstart your collection with the 'AI Search Collection' or create your own from scratch using the drop-down menu above.","kadence-blocks")})]}),!A&&(0,i.jsxs)("div",{className:"kb-photography-explained-wrap",children:[(0,i.jsx)("p",{children:(0,t.__)("Fine-tune your collection by selecting 'Edit Collection' below.","kadence-blocks")}),(0,i.jsx)("p",{children:(0,t.__)("or -","kadence-blocks")}),(0,i.jsx)("p",{children:(0,t.__)("Kickstart your collection with the 'AI Search Collection' or explore our pre-made collections using the drop-down menu above.","kadence-blocks")})]})]}),"aiGenerated"===o&&(0,i.jsxs)("div",{className:"kb-photography-explained-wrap ai-generated-search-edit-wrap",children:[(0,i.jsxs)("p",{className:"ai-generated-search-edit-text",children:[!r&&(0,t.__)("Ta-Da! We searched the Pexels Image Library to find royalty-free images for your site.","kadence-blocks"),!r&&(0,i.jsx)("br",{}),(0,t.__)("You can adjust search terms by clicking","kadence-blocks"),(0,i.jsx)(En.Button,{variant:"link",disabled:w,ref:I,text:(0,t.__)("Edit AI Search Query","kadence-blocks"),onClick:()=>k(!0),style:{fontSize:"14px"}}),(0,t.__)("or fine-tune your collection by selecting 'Edit Collection' below.","kadence-blocks")]}),(0,i.jsx)("p",{children:(0,t.__)("or -","kadence-blocks")}),(0,i.jsx)("p",{children:(0,t.__)("Explore our pre-made collections or create your own from scratch using the drop-down menu above.","kadence-blocks")}),w&&(0,i.jsxs)(En.Popover,{onClose:()=>{x&&x!==a&&s({type:"SET_IMAGE_SEARCH_QUERY",payload:x}),k(!1)},placement:"bottom",anchor:C,className:"ai-generated-search-edit-popover-settings",children:[(0,i.jsx)(En.TextareaControl,{label:(0,t.__)("Search Query","kadence-blocks"),help:(0,t.__)("Customize the image search query.","kadence-blocks"),value:O?"":""!==x?x:a,onChange:e=>{j(""===e),S(e)},onKeyDown:e=>{e.keyCode===ENTER&&(e.preventDefault(),x&&x!==a&&(s({type:"SET_IMAGE_SEARCH_QUERY",payload:x}),_([{},{}])),k(!1))}}),(0,i.jsx)(En.Button,{variant:"primary",text:(0,t.__)("Save","kadence-blocks"),onClick:()=>{x&&x!==a&&(s({type:"SET_IMAGE_SEARCH_QUERY",payload:x}),_([{},{}])),k(!1)}})]})]}),(0,i.jsx)(gs,{loading:b,featured:y[0]||{},background:y[1]||{},updateCollection:function(e,t){const n=[{name:"featured",isLocal:!!y?.[0]?.isLocal,images:y?.[0]?.images},{name:"background",isLocal:!!y?.[1]?.isLocal,images:y?.[1]?.images}];n[e].images=t,n[e].isLocal=!0,function(e){let t=e;e?.value&&(t=e.value),t!==o?(s({type:"SET_PHOTO_LIBRARY",payload:t}),s({type:"SET_PHOTO_LIBRARY_CHANGED",payload:!0}),_([{},{}])):E(t)}(d(o,n))}})]})}function Gl(e,t){if(!e)throw new Error("useAiWizardHelper requires state");return{isForwardButtonDisabled:function(){const{currentPageIndex:n,locationType:r,locationInput:o,keywords:i,missionStatement:a}=e,s=function(){const n=Array.isArray(t)&&t[e.currentPageIndex]?.required?t[e.currentPageIndex]?.required:[],r=n.filter(t=>"string"==typeof e[t]?e[t].trim().length:Array.isArray(e[t])?e[t].length:"boolean"==typeof e[t]?!!e[t]:void 0);return n.filter(e=>!r.includes(e))}(),l=t?.[n]?.id;switch(l){case"industry-information":return s.length>0||r!==w&&!o;case"about-your-site":return!(a.length>=200&&a.length<1500&&!(s.length>0));case"the-details":return!(i.length>=5&&!(s.length>0));default:return s.length>0}},isFinishButtonDisabled:function(){const{saving:t}=e;return t}}}const Kl="/kb-design-library/v1/get_images",{kadence_blocks_params:Yl}=window;function Zl(){const[t,n]=(0,e.useState)(!1),[o,i]=(0,e.useState)(!1),[a,s]=(0,e.useState)(!1),[l,c]=(0,e.useState)(!1);let u=void 0!==Yl&&Yl?.proData&&Yl?.proData?.api_key?Yl.proData.api_key:"",d=void 0!==Yl&&Yl?.proData&&Yl?.proData?.api_email?Yl.proData.api_email:"";const p=void 0!==Yl&&Yl?.proData&&Yl?.proData?.product_id?Yl.proData.product_id:"";return u||(u=void 0!==Yl&&Yl?.proData&&Yl?.proData?.ithemes_key?Yl.proData.ithemes_key:"",u&&(d="iThemes")),{error:l,getAIContentData:async function(e){try{return await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get",{context:e})})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},getLocalAIContentData:async function(){try{return await Ts()({path:"/kb-design-library/v1/get_all_items"})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},getAIContentDataReload:async function(e){try{return await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get",{force_reload:!0,context:e})})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},saveAIWizardData:async function(e){n(!0),c(!1);try{if(await Ts()({path:"/wp/v2/settings",method:"POST",data:{kadence_blocks_prophecy:JSON.stringify(e)}}))return n(!1),!0}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),n(!1),c(!0),!1}},getAIWizardData:async function(e=!1){n(!0),c(!1);const t=!(!window?.kadence_blocks_params_wizard?.settings||!window?.kadence_blocks_params_wizard?.settings?.context)&&window.kadence_blocks_params_wizard.settings;if(!e&&t)return n(!1),t;try{const e=await Ts()({path:"/wp/v2/settings",method:"GET"});if(e&&(n(!1),e?.kadence_blocks_prophecy))return window?.kadence_blocks_params_wizard||(window.kadence_blocks_params_wizard={}),window.kadence_blocks_params_wizard.settings=e.kadence_blocks_prophecy,e.kadence_blocks_prophecy}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),n(!1),c(!0),{}}},getCollectionByIndustry:async function(e){if(!e?.photoLibrary)return[];const t=!(!e?.customCollections||!e?.customCollections.some(t=>t.value===e?.photoLibrary))&&e?.customCollections.find(t=>t.value===e?.photoLibrary);if(t){const e={data:[]};if(t?.galleries?.[0]?.images){const n=t?.galleries?.[0]?.images.map((e,t)=>{const n={};return e?.alt&&(n.alt=e.alt),e?.url&&(n.url=e.url),e?.width&&(n.width=e.width),e?.height&&(n.height=e.height),e?.photographer&&(n.photographer=e.photographer),e?.photographer_url&&(n.photographer_url=e.photographer_url),e?.id&&(n.id=e.id),e?.sizes?.[1]?.src?e.sizes.find(e=>"large"===e.name)?n.sizes=[{src:e.sizes.find(e=>"large"===e.name).src}]:e.sizes.find(e=>"2048x2048"===e.name)?n.sizes=[{src:e.sizes.find(e=>"2048x2048"===e.name).src}]:e.sizes.find(e=>"scaled"===e.name)?n.sizes=[{src:e.sizes.find(e=>"scaled"===e.name).src}]:n.sizes=[{src:e.sizes[1].src}]:n.sizes=[{src:e.url}],n});e.data.push({images:n})}if(t?.galleries?.[1]?.images){const n=t?.galleries?.[1]?.images.map((e,t)=>{const n={};return e?.alt&&(n.alt=e.alt),e?.url&&(n.url=e.url),e?.width&&(n.width=e.width),e?.height&&(n.height=e.height),e?.photographer&&(n.photographer=e.photographer),e?.photographer_url&&(n.photographer_url=e.photographer_url),e?.id&&(n.id=e.id),n.sizes=e?.sizes?.[1]?.src?[{src:e.sizes[1].src}]:[{src:e.url}],n});e.data.push({images:n})}return e}if("aiGenerated"===e?.photoLibrary){const t=Array.isArray(e.photoLibrary)?e?.photoLibrary:[e.photoLibrary];try{const n=await Ts()({path:(0,Tl.addQueryArgs)(Kl,{industries:t,industry:e?.imageSearchQuery})}),o=(0,r.SafeParseJSON)(n,!1);return o?{data:[{name:"featured",images:o?.data?.images.slice(0,12)},{name:"background",images:o?.data?.images.slice(12,24)}]}:[]}catch(e){const t=e?.message?e.message:e;console.log(`ERROR: ${t}`)}}const n=Array.isArray(e.photoLibrary)?e?.photoLibrary:[e.photoLibrary];try{const e=await Ts()({path:(0,Tl.addQueryArgs)(Kl,{industries:n})});return(0,r.SafeParseJSON)(e,!1)||[]}catch(e){const t=e?.message?e.message:e;console.log(`ERROR: ${t}`)}},getPatterns:async function(e,t,n=null,r=null,o=null){if("section"===e&&!t&&"html"!==o){const e=!!(window?.kadence_blocks_params_library?.library_sections&&window?.kadence_blocks_params_library?.library_sections.length>0)&&window.kadence_blocks_params_library.library_sections;if(e)return e}if("section"===e&&!t&&"html"===o){const e=!!(window?.kadence_blocks_params_library?.library_sections_html&&window?.kadence_blocks_params_library?.library_sections_html.length>0)&&window.kadence_blocks_params_library.library_sections_html;if(e)return e}try{const i=await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get_library",{force_reload:t,library:e,library_url:n||"",key:r||e,meta:o||""})});return"section"===e&&"html"===o&&i&&(window?.kadence_blocks_params_library||(window.kadence_blocks_params_library={}),window.kadence_blocks_params_library.library_sections_html=i),"section"===e&&"html"!==o&&i&&(window?.kadence_blocks_params_library||(window.kadence_blocks_params_library={}),window.kadence_blocks_params_library.library_sections=i),i}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},getPatternCategories:async function(e,t,n=null,r=null,o=null){try{return await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get_library_categories",{force_reload:t,library:e,library_url:n||"",key:r||e,meta:o||""})})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},getPattern:async function(e,t,n,r,o=null,i=null){try{const a={library:e,key:i||e,pattern_id:n||"",pattern_type:t||"",pattern_style:r||""};return o&&(a.library_url=o),u&&(a.api_key=u),d&&(a.api_email=d),p&&(a.product_id=p),await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get_pattern_content",a)})}catch(e){const t=e?.message?e.message:e,n=e?.code?e.code:e;return console.log(`ERROR: ${t}`),"invalid_access"===n?"invalid_access":"failed"}},processPattern:async function(e,t="",n="",r=""){try{return await Ts()({path:"/kb-design-library/v1/process_pattern",method:"POST",data:{content:e,image_library:t,cpt_blocks:n,style:r}})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},getLocalAIContexts:async function(){try{return await Ts()({path:"/kb-design-library/v1/get_local_contexts"})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},getInitialAIContent:async function(){try{return await Ts()({path:"/kb-design-library/v1/get_initial_jobs"})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},getAllAIContentData:async function(e=!1){try{return await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get-all-ai",{force_reload:e})})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},getAIContentRemaining:async function(e=!1){try{return await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get_remaining_jobs",{force_reload:e})})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},getAvailableCredits:async function(){try{return await Ts()({path:"/kb-design-library/v1/get_remaining_credits"})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"error"}},getConnection:async function(e,t,n){try{return await Ts()({path:(0,Tl.addQueryArgs)("/kb-design-library/v1/get_connection",{library:e,library_url:t||"",key:n||""})})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}},updateConnections:async function(e){try{return await Ts()({path:"/wp/v2/settings",method:"POST",data:{kadence_blocks_cloud:JSON.stringify(e)}})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}}}}async function Jl(e,t){try{return await Ts()({path:"/kb-design-library/v1/handle_event",method:"POST",data:{event_label:e,event_data:t||{}}})}catch(e){const t=e?.message?e.message:e;return console.log(`ERROR: ${t}`),"failed"}}const Ql=[{id:"how-it-works",content:(0,i.jsx)(cl,{}),step:"How it Works",required:[]},{id:"industry-information",content:(0,i.jsx)(yl,{}),step:"Industry Information",required:["entityType","companyName","location","industry"]},{id:"about-your-site",content:(0,i.jsx)(Al,{}),step:"About Your Site",required:["missionStatement"]},{id:"the-details",content:(0,i.jsx)(zl,{}),step:"The Details",required:["keywords","tone"]},{id:"goals",content:(0,i.jsx)(Ul,{}),step:"Site Goals",required:[]},{id:"photography",content:(0,i.jsx)(Wl,{}),step:"Photography",required:[]}],Xl=[{id:"photography",content:(0,i.jsx)(Wl,{photographyOnly:!0}),step:"Photography",required:[]}];function ec(e){const{state:{firstTime:t}}=D();return e?Xl:t?Ql:Ql.filter(e=>"how-it-works"!==e.id)}function tc(e){const{loading:n,onWizardClose:r,onPrimaryAction:o,photographyOnly:a,credits:s,isFullScreen:l}=e,{state:c,dispatch:u}=D(),{isComplete:d,firstTime:p,isSubmitted:f,currentPageIndex:h,saving:m,saveError:g,...b}=c,{isForwardButtonDisabled:v,isFinishButtonDisabled:y}=Gl(c,ec(a)),{saveAiWizardData:_,getAiWizardData:w}=Ls();async function k(){p&&Jl("ai_wizard_started"),await _({firstTime:!1,isSubmitted:!0,isComplete:d,...b})&&(r("saved"),x("ai_wizard_update"))}async function x(e){const t=await w();t&&Jl(e,JSON.parse(t))}return n?(0,i.jsx)(i.Fragment,{}):(0,i.jsx)(Ns,{isFirstTime:p,logo:(0,i.jsx)(Fn,{}),pages:ec(a),forwardButtonDisabled:v(),onPageChange:e=>u({type:"SET_CURRENT_PAGE_INDEX",payload:e}),onClose:function(e){if("blur"!==e.type&&(27!==e.keyCode||"keydown"!==e.type))return r()},onPrimaryClick:function(e){"blur"===e.type||27===e.keyCode&&"keydown"===e.type||("click"===e.type&&e.target.classList.contains("components-wizard__primary-button")&&(a?k().then(()=>{o("photography",!1),x("collection_updated")}):(async function(){await _({firstTime:!1,isSubmitted:!0,isComplete:!0,...b})&&x("ai_wizard_complete")}(),o(e,!0))),r())},primaryButtonText:a?(0,t.__)("Update My Design Library","kadence-blocks"):(0,t.__)("Generate Initial Content","kadence-blocks"),primaryButtonDisabled:y(),onSecondaryClick:a?null:function(e){"blur"===e.type||27===e.keyCode&&"keydown"===e.type||("click"===e.type&&e.target.classList.contains("components-wizard__secondary-button")&&(c.photoCollectionChanged?k().then(()=>{x("collection_updated")}):k()),r())},secondaryButtonText:(0,t.__)("Save","kadence-blocks"),credits:s,photographyOnly:a,isFullScreen:l})}function nc({photographyOnly:t=!1,onClose:n,onPrimaryAction:o,onSecondaryAction:a,credits:s="",isFullScreen:l=!1}){const[c,u]=(0,e.useState)(),{loading:d,getAiWizardData:p}=Ls();return(0,e.useEffect)(()=>{!async function(){const e=(0,r.SafeParseJSON)(await p());u(e)}()},[]),(0,i.jsx)(i.Fragment,{children:c&&!d&&(0,i.jsx)(R,{value:c,children:(0,i.jsx)(tc,{loading:d,onWizardClose:n,onPrimaryAction:o,onSecondaryAction:a,photographyOnly:t,credits:s,isFullScreen:l})})})}function rc(){const e=(0,Rs.useSelect)(e=>e("core/notices").getNotices().filter(e=>"snackbar"===e.type),[]),t=(0,Rs.useSelect)(e=>e("core/notices").getNotices().filter(e=>"default"===e.type),[]),{removeNotice:n}=(0,Rs.useDispatch)("core/notices");return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(En.NoticeList,{className:"components-editor-notices__default",notices:t,onRemove:n}),(0,i.jsx)(En.SnackbarList,{className:"components-editor-notices__snackbar",notices:e,onRemove:n})]})}function oc({variant:e,icon:t,heading:n,content:r,link:o,linkTarget:a="_self",label:s=""}){return(0,i.jsxs)("div",{className:`kb-action-card kb-action-card--${e}`,children:[(0,i.jsx)("div",{className:"kb-action-card__icon",children:t}),(0,i.jsx)("div",{className:"kb-action-card__heading",children:n}),(0,i.jsx)("div",{className:"kb-action-card__content",children:r}),o&&(0,i.jsx)("a",{href:o,className:"kb-action-card__link","aria-label":s||void 0,target:a})]})}function ic({category:e,heading:t,description:n,link:r,linkTarget:o="_blank"}){return(0,i.jsxs)("a",{href:r,target:o,className:"kb-article-card",children:[e&&(0,i.jsx)("div",{className:"kb-article-card__category",children:e}),(0,i.jsx)("div",{className:"kb-article-card__heading",children:t}),(0,i.jsx)("div",{className:"kb-article-card__description",children:n})]})}function ac({articles:t}){const n=function(){const[t,n]=(0,e.useState)({width:0,height:0});return(0,e.useEffect)(()=>{function e(){n({width:window.innerWidth,height:window.innerHeight})}return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),t}();let r=1;return n.width>768&&(r=2),n.width>1200&&(r=3),(0,i.jsx)("div",{className:"kb-article-slider",children:t.length>0&&(0,i.jsx)(_s.A,{numOfSlides:r,children:t.map(e=>(0,i.jsx)("div",{className:"kb-article-slider__single",children:(0,i.jsx)(ic,{...e},e.heading)}))})})}function sc({text:e,href:t,onClick:n}){return(0,i.jsx)(Ln,{className:"kb-dashboard-button",variant:"primary",onClick:n,href:t,children:(0,i.jsx)("span",{children:e})})}const lc=window.kadence.icons,cc=(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 1600 240",children:[(0,i.jsx)("path",{fill:"none",d:"M0 0H1600V240H0z"}),(0,i.jsxs)("g",{fill:"#fff",children:[(0,i.jsx)("path",{d:"M221.13 222.132h-57.915c-6.271 0-11.361-5.092-11.361-11.363 0-6.269 5.09-11.361 11.361-11.361h37.831c5.904-.405 10.574-5.328 10.574-11.333 0-6.271-5.091-11.361-11.362-11.361h-27.659v-.002H141.06c-6.262 0-11.346-5.083-11.346-11.345 0-6.262 5.084-11.347 11.346-11.347h7.146l-.015-.014h10.624c6.259 0 11.341-5.081 11.341-11.34 0-6.259-5.082-11.339-11.341-11.339h-26.721v-.01H76.061c-6.259 0-11.341-5.082-11.341-11.342 0-6.259 5.082-11.342 11.341-11.342h56.033v-.031h21.94c6.253 0 11.33-5.077 11.33-11.331s-5.077-11.331-11.33-11.331h-5.001l.001-.002-23.3-.001c-6.262.001-11.345-5.084-11.345-11.345 0-6.263 5.083-11.347 11.345-11.347h53.802c.269 0 .534.01.797.027h19.232c6.269 0 11.36-5.089 11.36-11.361 0-6.269-5.091-11.36-11.36-11.36h-28.27c-5.884-.427-10.53-5.341-10.53-11.331 0-6.271 5.09-11.362 11.361-11.362h44.532l.15.001h52.506l-92.001 100.473 111.279 103.81h-67.161l-.016-.015a6.714 6.714 0 01-.285.005zm-109.01-22.724c6.249 0 11.322 5.073 11.322 11.321 0 6.249-5.073 11.321-11.322 11.321H70.575c-6.248 0-11.32-5.072-11.32-11.321 0-6.248 5.073-11.321 11.321-11.321h41.544zM95.673 154.02c6.267 0 11.355 5.088 11.355 11.356 0 6.266-5.088 11.355-11.355 11.355-6.268 0-11.356-5.089-11.356-11.355 0-6.268 5.088-11.356 11.356-11.356zm-59.331-45.387c6.269 0 11.357 5.088 11.357 11.356 0 6.267-5.088 11.355-11.356 11.355-6.267 0-11.355-5.088-11.355-11.355 0-6.268 5.088-11.356 11.355-11.356zm44.005-45.387c6.267 0 11.356 5.088 11.356 11.356 0 6.267-5.089 11.354-11.356 11.354-6.267 0-11.356-5.087-11.356-11.354 0-6.268 5.089-11.356 11.356-11.356zm40.723-45.388c6.249 0 11.321 5.073 11.321 11.321 0 6.249-5.072 11.322-11.321 11.322H94.81c-6.248 0-11.321-5.073-11.321-11.322 0-6.248 5.072-11.321 11.321-11.321h26.26z"}),(0,i.jsx)("path",{fillRule:"nonzero",d:"M1340.97 132.65l19.465-73.534h30.948l18.687 73.312 18.688-73.312h31.771l-32.927 123.475h-30.124l-21.981-80.594-21.98 80.594h-30.124l-33.009-123.475h31.771l18.815 73.533zm131.561 49.942V59.118h59.264c28.811 0 43.217 11.854 43.217 35.561 0 24.584-14.378 36.878-43.134 36.878h-29.223v51.035h-30.124zm59.515-100.343h-29.391v26.259h29.144c9.932-.165 15.036-4.692 15.311-13.582-.275-8.122-5.296-12.348-15.064-12.677z"}),(0,i.jsx)("g",{fillRule:"nonzero",children:(0,i.jsx)("path",{d:"M365.698 58.581h24.695v49.39l41.158-49.39h27.741l-48.32 57.622 58.445 65.852h-32.104l-46.92-53.34v53.34h-24.695V58.581zM476.97 182.055L526.36 58.58h24.695l49.308 123.393-26.259.082-7.409-18.933H510.72l-7.408 18.933H476.97zm62.396-90.548l-18.768 46.92h37.043l-18.275-46.92zM642.654 157.442V83.276h22.884c21.896 0 32.872 12.346 32.927 37.042-.055 24.694-11.031 37.069-32.927 37.124h-22.884zm22.884 24.613c38.415 0 57.622-20.579 57.622-61.738 0-41.213-19.207-61.819-57.622-61.819h-47.579v123.557h47.579zM748.494 182.055V58.662l90.712-.082v23.049h-66.017v26.341h49.472v22.966h-49.472v28.07h65.853v23.049h-90.548zM863.223 182.055V58.58h8.232l77.378 77.378V58.58h24.695v123.475h-9.055L887.918 105.5v76.555h-24.695zM1053.85 182.055c-17.451-.055-32.09-5.968-43.916-17.739-11.826-11.772-17.739-26.519-17.739-44.245.055-17.341 5.981-31.925 17.78-43.751 11.799-11.826 26.424-17.739 43.875-17.739 17.616 0 32.734 5.488 45.356 16.463l-16.463 18.028c-8.396-6.586-18.027-9.878-28.893-9.878-11.085.054-20.017 3.512-26.794 10.371-6.778 6.86-10.166 15.641-10.166 26.342.055 11.469 3.484 20.579 10.289 27.329s15.75 10.125 26.836 10.125c11.085 0 20.661-3.265 28.728-9.796l16.463 18.028c-12.567 10.975-27.685 16.463-45.356 16.463zM1124.62 182.055V58.662l90.713-.082v23.049h-66.018v26.341h49.473v22.966h-49.473v28.07h65.854v23.049h-90.549z"})})]})]});function uc({heading:n,subHeading:o,subHeadingPro:a,imageSrc:s,buttonText:l,isUserAuthenticated:c,activateUrl:u,onUpdateWizard:d,showControls:p,isNetworkAdmin:f,siteName:h=""}){const m=!(!window?.kadenceHomeParams?.pro||"true"!==kadenceHomeParams.pro),g=window?.kadence_blocks_params?.proData?.api_key?kadence_blocks_params.proData.api_key:"",[b,v]=(0,e.useState)(!1),[y,_]=(0,e.useState)(!1),{getAIContentRemaining:w,getAvailableCredits:k}=Zl(),x=h||(0,t.__)("Something Great!","kadence-blocks"),S=c?(0,i.jsxs)("div",{children:[" ",x]}):"";return(0,i.jsxs)("div",{className:"kb-large-banner",children:[(0,i.jsx)("div",{className:"kb-large-banner__logo",children:cc}),(0,i.jsxs)("div",{className:"kb-large-banner__content",children:[(0,i.jsxs)("div",{className:"kb-large-banner__heading",children:[n,S]}),!c&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"kb-large-banner__subheading",children:m?a:o}),p&&(0,i.jsx)("a",{className:"uplink-authorize",href:u,children:m&&g?(0,t.__)("Connect Blocks Pro License to Site","kadence-blocks"):l}),!p&&(0,i.jsx)("p",{className:"uplink-authorize-note",children:(0,t.__)("Authorization needed from network admin","kadence-blocks")})]}),c&&!f&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(En.Button,{onClick:d,iconPosition:"left",icon:lc.aiIcon,text:(0,t.__)("Update Kadence AI Details","kadence-blocks"),className:"kadence-update-ai-wizard",variant:"link"})})]}),c&&(0,i.jsx)("div",{className:"kb-large-banner__tooltip",children:(0,i.jsx)(En.Button,{onClick:()=>{!1===y&&async function(){const e=await k(),t=(0,r.SafeParseJSON)(localStorage.getItem("kadenceBlocksPrebuilt"),!0);"error"===e?(console.log("Error getting credits"),t.credits="fetch",localStorage.setItem("kadenceBlocksPrebuilt",JSON.stringify(t)),_(0)):""===e?(t.credits=0,localStorage.setItem("kadenceBlocksPrebuilt",JSON.stringify(t)),_(0)):(t.credits=parseInt(e),localStorage.setItem("kadenceBlocksPrebuilt",JSON.stringify(t)),_(parseInt(e)))}(),v(e=>!e)},variant:"link",icon:(0,i.jsx)(En.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:(0,i.jsx)("path",{d:"M11 7H13V9H11V7ZM11 11H13V17H11V11ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z",fill:"white"})}),children:b&&(0,i.jsxs)(En.Popover,{className:"kb-large-banner__tooltip_popup",placement:"left",onClose:()=>{console.log("close"),v(!1)},children:[!1===y?(0,i.jsx)(En.Spinner,{}):"",!1===y?(0,t.__)("Fetching Available Credits"):y+" "+(0,t.__)("Credits Available","kadence-blocks")]})})})]})}function dc({title:e,icon:t,variant:n="black"}){return(0,i.jsxs)("div",{className:`kb-section-title kb-section-title--${n}`,children:[(0,i.jsx)("div",{className:"kb-section-title__title",children:e}),(0,i.jsx)("div",{className:"kb-section-title__icon",children:t})]})}function pc({image:e,tag:t,heading:n,description:r,href:o,buttonText:a,flip:s=!1}){return(0,i.jsxs)("div",{className:"kb-upsell-content "+(s?"kb-upsell-content--flipped":""),children:[e&&(0,i.jsx)("img",{className:"kb-upsell-content__image",src:e}),(0,i.jsxs)("div",{className:"kb-upsell-content__container",children:[t&&(0,i.jsx)("div",{className:"kb-upsell-content__tag",children:t}),n&&(0,i.jsx)("div",{className:"kb-upsell-content__heading",children:n}),r&&(0,i.jsx)("div",{className:"kb-upsell-content__description",children:r}),o&&a&&(0,i.jsx)(sc,{variant:"primary",text:a,href:o})]})]})}const fc=n.p+"images/blocks-pro.89bfc5a5.png",hc=n.p+"images/bundles.dba79a46.png",mc={largeBanner:{heading:(0,i.jsx)(i.Fragment,{children:(0,t.__)("Let's build,","kadence-blocks")}),subHeading:"",imageSrc:""},actionCards:{title:(0,i.jsx)(dc,{title:(0,t.__)("Start Building with Kadence AI","kadence-blocks"),icon:lc.aiIcon}),cards:[{icon:(0,i.jsx)(En.Icon,{icon:(0,i.jsxs)(En.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",children:[(0,i.jsx)("g",{clipPath:"url(#clip0_3059_18235)",children:(0,i.jsx)("path",{d:"M1.56776 21.2781C1.8869 21.2781 2.13423 21.2103 2.30975 21.0747C2.48526 20.939 2.62887 20.7076 2.74057 20.3806L4.28438 16.144H11.3452L12.889 20.3806C13.0007 20.7076 13.1443 20.939 13.3198 21.0747C13.4953 21.2103 13.7387 21.2781 14.0499 21.2781C14.369 21.2781 14.6223 21.1904 14.8098 21.0148C14.9973 20.8393 15.091 20.6 15.091 20.2968C15.091 20.1133 15.0471 19.8979 14.9593 19.6506L9.34661 4.71518C9.203 4.34019 9.00753 4.06295 8.76019 3.88344C8.51287 3.70393 8.19773 3.61417 7.81477 3.61417C7.07279 3.61417 6.57016 3.97718 6.30687 4.7032L0.694142 19.6625C0.606381 19.8779 0.5625 20.0934 0.5625 20.3088C0.5625 20.612 0.652256 20.8493 0.831768 21.0208C1.01128 21.1924 1.25661 21.2781 1.56776 21.2781ZM4.89472 14.3131L7.8028 6.25897H7.86264L10.7707 14.3131H4.89472ZM16.6108 24.9162H23.5998C24.1583 24.9162 24.4375 24.6808 24.4375 24.2102C24.4375 23.7474 24.1583 23.5161 23.5998 23.5161H20.9191V1.38822H23.5998C24.1583 1.38822 24.4375 1.15286 24.4375 0.682145C24.4375 0.227382 24.1583 0 23.5998 0H16.6108C16.0604 0 15.7851 0.227382 15.7851 0.682145C15.7851 1.15286 16.0604 1.38822 16.6108 1.38822H19.3036V23.5161H16.6108C16.0604 23.5161 15.7851 23.7474 15.7851 24.2102C15.7851 24.6808 16.0604 24.9162 16.6108 24.9162Z",fill:"#161A1E"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_3059_18235",children:(0,i.jsx)("rect",{width:"23.875",height:"25",fill:"white",transform:"translate(0.5625)"})})})]})}),heading:(0,t.__)("Build a page with AI-powered patterns","kadence-blocks"),content:(0,t.__)("Take your site further with hundreds of beautiful patterns filled with custom content developed just for your site.","kadence-blocks"),variant:"blue",link:"/wp-admin/post-new.php?post_type=page"},{icon:(0,i.jsx)(En.Icon,{icon:(0,i.jsxs)(En.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",children:[(0,i.jsx)("g",{clipPath:"url(#clip0_3059_18235)",children:(0,i.jsx)("path",{d:"M1.56776 21.2781C1.8869 21.2781 2.13423 21.2103 2.30975 21.0747C2.48526 20.939 2.62887 20.7076 2.74057 20.3806L4.28438 16.144H11.3452L12.889 20.3806C13.0007 20.7076 13.1443 20.939 13.3198 21.0747C13.4953 21.2103 13.7387 21.2781 14.0499 21.2781C14.369 21.2781 14.6223 21.1904 14.8098 21.0148C14.9973 20.8393 15.091 20.6 15.091 20.2968C15.091 20.1133 15.0471 19.8979 14.9593 19.6506L9.34661 4.71518C9.203 4.34019 9.00753 4.06295 8.76019 3.88344C8.51287 3.70393 8.19773 3.61417 7.81477 3.61417C7.07279 3.61417 6.57016 3.97718 6.30687 4.7032L0.694142 19.6625C0.606381 19.8779 0.5625 20.0934 0.5625 20.3088C0.5625 20.612 0.652256 20.8493 0.831768 21.0208C1.01128 21.1924 1.25661 21.2781 1.56776 21.2781ZM4.89472 14.3131L7.8028 6.25897H7.86264L10.7707 14.3131H4.89472ZM16.6108 24.9162H23.5998C24.1583 24.9162 24.4375 24.6808 24.4375 24.2102C24.4375 23.7474 24.1583 23.5161 23.5998 23.5161H20.9191V1.38822H23.5998C24.1583 1.38822 24.4375 1.15286 24.4375 0.682145C24.4375 0.227382 24.1583 0 23.5998 0H16.6108C16.0604 0 15.7851 0.227382 15.7851 0.682145C15.7851 1.15286 16.0604 1.38822 16.6108 1.38822H19.3036V23.5161H16.6108C16.0604 23.5161 15.7851 23.7474 15.7851 24.2102C15.7851 24.6808 16.0604 24.9162 16.6108 24.9162Z",fill:"#161A1E"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_3059_18235",children:(0,i.jsx)("rect",{width:"23.875",height:"25",fill:"white",transform:"translate(0.5625)"})})})]})}),heading:(0,t.__)("Get started with full pages","kadence-blocks"),content:(0,t.__)("Choose from a variety of pages featuring exclusively tailored content for your site.","kadence-blocks"),variant:"green",link:"/wp-admin/post-new.php?post_type=page"},{icon:(0,i.jsx)(En.Icon,{icon:(0,i.jsxs)(En.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",children:[(0,i.jsx)("g",{clipPath:"url(#clip0_3059_18235)",children:(0,i.jsx)("path",{d:"M1.56776 21.2781C1.8869 21.2781 2.13423 21.2103 2.30975 21.0747C2.48526 20.939 2.62887 20.7076 2.74057 20.3806L4.28438 16.144H11.3452L12.889 20.3806C13.0007 20.7076 13.1443 20.939 13.3198 21.0747C13.4953 21.2103 13.7387 21.2781 14.0499 21.2781C14.369 21.2781 14.6223 21.1904 14.8098 21.0148C14.9973 20.8393 15.091 20.6 15.091 20.2968C15.091 20.1133 15.0471 19.8979 14.9593 19.6506L9.34661 4.71518C9.203 4.34019 9.00753 4.06295 8.76019 3.88344C8.51287 3.70393 8.19773 3.61417 7.81477 3.61417C7.07279 3.61417 6.57016 3.97718 6.30687 4.7032L0.694142 19.6625C0.606381 19.8779 0.5625 20.0934 0.5625 20.3088C0.5625 20.612 0.652256 20.8493 0.831768 21.0208C1.01128 21.1924 1.25661 21.2781 1.56776 21.2781ZM4.89472 14.3131L7.8028 6.25897H7.86264L10.7707 14.3131H4.89472ZM16.6108 24.9162H23.5998C24.1583 24.9162 24.4375 24.6808 24.4375 24.2102C24.4375 23.7474 24.1583 23.5161 23.5998 23.5161H20.9191V1.38822H23.5998C24.1583 1.38822 24.4375 1.15286 24.4375 0.682145C24.4375 0.227382 24.1583 0 23.5998 0H16.6108C16.0604 0 15.7851 0.227382 15.7851 0.682145C15.7851 1.15286 16.0604 1.38822 16.6108 1.38822H19.3036V23.5161H16.6108C16.0604 23.5161 15.7851 23.7474 15.7851 24.2102C15.7851 24.6808 16.0604 24.9162 16.6108 24.9162Z",fill:"#161A1E"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_3059_18235",children:(0,i.jsx)("rect",{width:"23.875",height:"25",fill:"white",transform:"translate(0.5625)"})})})]})}),heading:(0,t.__)("Fine-tune your content","kadence-blocks"),content:(0,t.__)("Write your own prompts to generate AI content from scratch or fine-tune existing copy.","kadence-blocks"),variant:"yellow"}]},upsellContents:[{image:fc,tag:(0,t.__)("Upgrade","kadence-blocks"),heading:(0,t.__)("Elevate your pages with Blocks Pro","kadence-blocks"),description:(0,t.__)("Unleash limitless creativity with our custom block library - enhance your content with animations, dynamic texts, custom fonts and icons, and more!","kadence-blocks"),href:"https://www.kadencewp.com/kadence-blocks/pro/",buttonText:(0,t.__)("Upgrade to Blocks Pro","kadence-blocks")},{image:hc,tag:(0,t.__)("Go Pro","kadence-blocks"),heading:(0,t.__)("Achieve more with Bundles","kadence-blocks"),description:(0,t.__)("Elevate your site development process with our Pro Bundles. Jump start your site with a Pro Starter Template, and turbocharge your page building with Theme Pro and Blocks Pro – now powered by Kadence AI. Plus, unlock the potential of Custom Fonts, Cloud, Conversions, and so much more.","kadence-blocks"),href:"https://www.kadencewp.com/pricing/",buttonText:(0,t.__)("Go Pro with a Bundle","kadence-blocks"),flip:!0}],knowledgeBase:{heading:(0,t.__)("Need Help Getting Started?","kadence-blocks"),articles:[{category:(0,t.__)("Kadence AI","kadence-blocks"),heading:(0,t.__)("Update AI Settings","kadence-blocks"),description:(0,t.__)("Update Kadence AI settings. Regenerate contexts for patterns and pages to reflect your updated needs.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/docs/kadence-blocks/design-libary-changing-ai-details/",linkTarget:"_blank"},{category:(0,t.__)("Kadence AI","kadence-blocks"),heading:(0,t.__)("Customize Image Collections","kadence-blocks"),description:(0,t.__)("Update your Design Library imagery using premade collections or create and customize your own.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/docs/kadence-blocks/design-library-changing-ai-image-collections/",linkTarget:"_blank"},{category:(0,t.__)("Kadence Blocks","kadence-blocks"),heading:(0,t.__)("Row Layout Block","kadence-blocks"),description:(0,t.__)("Use the Row Layout block to improve the column functionality and create responsive post/page layouts.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/docs/kadence-blocks/row-layout-block-2/",linkTarget:"_blank"},{category:(0,t.__)("Kadence Blocks","kadence-blocks"),heading:(0,t.__)("Advanced Text Block","kadence-blocks"),description:(0,t.__)("Use the Advanced Text block to add text to your page/post with advanced customization - now with AI.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/docs/kadence-blocks/advanced-heading-block/",linkTarget:"_blank"},{category:(0,t.__)("Support","kadence-blocks"),heading:(0,t.__)("Need more help?","kadence-blocks"),description:(0,t.__)("Didn't find what you were looking for? Find more articles in our knowledge base.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/",linkTarget:"_blank"}]}},gc={largeBanner:{heading:(0,i.jsxs)(i.Fragment,{children:[(0,t.__)("Kadence is better with AI.","kadence-blocks")," ",lc.aiIcon]}),subHeading:(0,t.__)("Elevate your web development game with Kadence AI. Supercharge your pattern and page library's potential with tailored content - get building pages in no time. Try Kadence AI today with 250 free credits!","kadence-blocks"),subHeadingPro:(0,t.__)("Elevate your web development game with Kadence AI. Supercharge your pattern and page library's potential with tailored content - get building pages in no time. Connect to your account to use Kadence AI with Kadence Blocks Pro","kadence-blocks"),buttonText:(0,t.__)("Get Started with Kadence AI","kadence-blocks")},actionCards:{title:(0,i.jsx)(dc,{title:(0,t.__)("Streamlined site building","kadence-blocks")}),cards:[{icon:(0,i.jsx)(En.Icon,{icon:(0,i.jsxs)(En.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",children:[(0,i.jsx)("g",{clipPath:"url(#clip0_3059_18235)",children:(0,i.jsx)("path",{d:"M1.56776 21.2781C1.8869 21.2781 2.13423 21.2103 2.30975 21.0747C2.48526 20.939 2.62887 20.7076 2.74057 20.3806L4.28438 16.144H11.3452L12.889 20.3806C13.0007 20.7076 13.1443 20.939 13.3198 21.0747C13.4953 21.2103 13.7387 21.2781 14.0499 21.2781C14.369 21.2781 14.6223 21.1904 14.8098 21.0148C14.9973 20.8393 15.091 20.6 15.091 20.2968C15.091 20.1133 15.0471 19.8979 14.9593 19.6506L9.34661 4.71518C9.203 4.34019 9.00753 4.06295 8.76019 3.88344C8.51287 3.70393 8.19773 3.61417 7.81477 3.61417C7.07279 3.61417 6.57016 3.97718 6.30687 4.7032L0.694142 19.6625C0.606381 19.8779 0.5625 20.0934 0.5625 20.3088C0.5625 20.612 0.652256 20.8493 0.831768 21.0208C1.01128 21.1924 1.25661 21.2781 1.56776 21.2781ZM4.89472 14.3131L7.8028 6.25897H7.86264L10.7707 14.3131H4.89472ZM16.6108 24.9162H23.5998C24.1583 24.9162 24.4375 24.6808 24.4375 24.2102C24.4375 23.7474 24.1583 23.5161 23.5998 23.5161H20.9191V1.38822H23.5998C24.1583 1.38822 24.4375 1.15286 24.4375 0.682145C24.4375 0.227382 24.1583 0 23.5998 0H16.6108C16.0604 0 15.7851 0.227382 15.7851 0.682145C15.7851 1.15286 16.0604 1.38822 16.6108 1.38822H19.3036V23.5161H16.6108C16.0604 23.5161 15.7851 23.7474 15.7851 24.2102C15.7851 24.6808 16.0604 24.9162 16.6108 24.9162Z",fill:"#161A1E"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_3059_18235",children:(0,i.jsx)("rect",{width:"23.875",height:"25",fill:"white",transform:"translate(0.5625)"})})})]})}),heading:(0,t.__)("A content-rich design library that is uniquely yours","kadence-blocks"),content:(0,t.__)("Jump-start your site-building process with unique content and gorgeous designs. Learn more about the AI-Powered Design Library.","kadence-blocks"),link:"https://www.kadencewp.com/wordpress-solutions/kadence-ai/",variant:"blue"},{icon:(0,i.jsx)(En.Icon,{icon:(0,i.jsxs)(En.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",children:[(0,i.jsx)("g",{clipPath:"url(#clip0_3059_18235)",children:(0,i.jsx)("path",{d:"M1.56776 21.2781C1.8869 21.2781 2.13423 21.2103 2.30975 21.0747C2.48526 20.939 2.62887 20.7076 2.74057 20.3806L4.28438 16.144H11.3452L12.889 20.3806C13.0007 20.7076 13.1443 20.939 13.3198 21.0747C13.4953 21.2103 13.7387 21.2781 14.0499 21.2781C14.369 21.2781 14.6223 21.1904 14.8098 21.0148C14.9973 20.8393 15.091 20.6 15.091 20.2968C15.091 20.1133 15.0471 19.8979 14.9593 19.6506L9.34661 4.71518C9.203 4.34019 9.00753 4.06295 8.76019 3.88344C8.51287 3.70393 8.19773 3.61417 7.81477 3.61417C7.07279 3.61417 6.57016 3.97718 6.30687 4.7032L0.694142 19.6625C0.606381 19.8779 0.5625 20.0934 0.5625 20.3088C0.5625 20.612 0.652256 20.8493 0.831768 21.0208C1.01128 21.1924 1.25661 21.2781 1.56776 21.2781ZM4.89472 14.3131L7.8028 6.25897H7.86264L10.7707 14.3131H4.89472ZM16.6108 24.9162H23.5998C24.1583 24.9162 24.4375 24.6808 24.4375 24.2102C24.4375 23.7474 24.1583 23.5161 23.5998 23.5161H20.9191V1.38822H23.5998C24.1583 1.38822 24.4375 1.15286 24.4375 0.682145C24.4375 0.227382 24.1583 0 23.5998 0H16.6108C16.0604 0 15.7851 0.227382 15.7851 0.682145C15.7851 1.15286 16.0604 1.38822 16.6108 1.38822H19.3036V23.5161H16.6108C16.0604 23.5161 15.7851 23.7474 15.7851 24.2102C15.7851 24.6808 16.0604 24.9162 16.6108 24.9162Z",fill:"#161A1E"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_3059_18235",children:(0,i.jsx)("rect",{width:"23.875",height:"25",fill:"white",transform:"translate(0.5625)"})})})]})}),heading:(0,t.__)("Fine-Tuned Editing","kadence-blocks"),content:(0,t.__)("Get your messaging on point with in-line AI-assisted editing. Learn More about the inline AI.","kadence-blocks"),link:"https://www.kadencewp.com/wordpress-solutions/kadence-ai/",variant:"green"}]},upsellContents:[{image:fc,tag:(0,t.__)("Upgrade"),heading:(0,t.__)("Elevate your pages with Blocks Pro","kadence-blocks"),description:(0,t.__)("Unleash limitless creativity with our custom block library - enhance your content with animations, dynamic texts, custom fonts and icons, and more!","kadence-blocks"),href:"https://www.kadencewp.com/blocks-pro/",buttonText:(0,t.__)("Upgrade to Blocks Pro","kadence-blocks")},{image:hc,tag:(0,t.__)("Go Pro","kadence-blocks"),heading:(0,t.__)("Kadence Blocks works better with Kadence Theme","kadence-blocks"),description:(0,t.__)("Level up with Kadence Blocks and Theme. Kickstart your site using Starter Templates, customize with ease, and elevate your pattern library's style with the Kadence Theme.","kadence-blocks"),href:"https://wordpress.org/themes/kadence/",buttonText:(0,t.__)("Try Kadence Theme Free","kadence-blocks"),flip:!0}],knowledgeBase:{heading:(0,t.__)("Need Help Getting Started?","kadence-blocks"),articles:[{category:(0,t.__)("Kadence Blocks","kadence-blocks"),heading:(0,t.__)("Using the Design Library","kadence-blocks"),description:(0,t.__)("Use fully designed patterns and pages on your site with your own customizer settings - now with AI.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/docs/kadence-blocks/how-to-control-the-kadence-design-library/",linkTarget:"_blank"},{category:(0,t.__)("Kadence Blocks","kadence-blocks"),heading:(0,t.__)("Row Layout Block","kadence-blocks"),description:(0,t.__)("Use the Row Layout block to improve the column functionality and create responsive post/page layouts.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/docs/kadence-blocks/row-layout-block-2/",linkTarget:"_blank"},{category:(0,t.__)("Kadence Blocks","kadence-blocks"),heading:(0,t.__)("Advanced Text Block","kadence-blocks"),description:(0,t.__)("Use the Advanced Text block to add text to your page/post with advanced customization - now with AI.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/docs/kadence-blocks/advanced-heading-block/",linkTarget:"_blank"},{category:(0,t.__)("Kadence Blocks Pro","kadence-blocks"),heading:(0,t.__)("Kadence Blocks Pro Plugin","kadence-blocks"),description:(0,t.__)("Install and activate the Kadence Blocks Pro plugin, and get an overview of the Pro features available.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/docs/kadence-blocks/kadence-blocks-pro-plugin/",linkTarget:"_blank"},{category:(0,t.__)("Kadence Blocks Pro","kadence-blocks"),heading:(0,t.__)("Advanced Slider","kadence-blocks"),description:(0,t.__)("Showcase products or highlight important visual content using the Advanced Slider block.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/docs/kadence-blocks/advanced-slider/",linkTarget:"_blank"},{category:(0,t.__)("Support","kadence-blocks"),heading:(0,t.__)("Need more help?","kadence-blocks"),description:(0,t.__)("Didn't find what you were looking for? Find more articles in our knowledge base.","kadence-blocks"),link:"https://www.kadencewp.com/help-center/",linkTarget:"_blank"}]}},bc=(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",clipRule:"evenodd",viewBox:"0 0 1600 240",children:[(0,i.jsx)("path",{fill:"none",d:"M0 0H1600V240H0z"}),(0,i.jsxs)("g",{fill:"#fff",children:[(0,i.jsx)("path",{d:"M221.13 222.132h-57.915c-6.271 0-11.361-5.092-11.361-11.363 0-6.269 5.09-11.361 11.361-11.361h37.831c5.904-.405 10.574-5.328 10.574-11.333 0-6.271-5.091-11.361-11.362-11.361h-27.659v-.002H141.06c-6.262 0-11.346-5.083-11.346-11.345 0-6.262 5.084-11.347 11.346-11.347h7.146l-.015-.014h10.624c6.259 0 11.341-5.081 11.341-11.34 0-6.259-5.082-11.339-11.341-11.339h-26.721v-.01H76.061c-6.259 0-11.341-5.082-11.341-11.342 0-6.259 5.082-11.342 11.341-11.342h56.033v-.031h21.94c6.253 0 11.33-5.077 11.33-11.331s-5.077-11.331-11.33-11.331h-5.001l.001-.002-23.3-.001c-6.262.001-11.345-5.084-11.345-11.345 0-6.263 5.083-11.347 11.345-11.347h53.802c.269 0 .534.01.797.027h19.232c6.269 0 11.36-5.089 11.36-11.361 0-6.269-5.091-11.36-11.36-11.36h-28.27c-5.884-.427-10.53-5.341-10.53-11.331 0-6.271 5.09-11.362 11.361-11.362h44.532l.15.001h52.506l-92.001 100.473 111.279 103.81h-67.161l-.016-.015a6.714 6.714 0 01-.285.005zm-109.01-22.724c6.249 0 11.322 5.073 11.322 11.321 0 6.249-5.073 11.321-11.322 11.321H70.575c-6.248 0-11.32-5.072-11.32-11.321 0-6.248 5.073-11.321 11.321-11.321h41.544zM95.673 154.02c6.267 0 11.355 5.088 11.355 11.356 0 6.266-5.088 11.355-11.355 11.355-6.268 0-11.356-5.089-11.356-11.355 0-6.268 5.088-11.356 11.356-11.356zm-59.331-45.387c6.269 0 11.357 5.088 11.357 11.356 0 6.267-5.088 11.355-11.356 11.355-6.267 0-11.355-5.088-11.355-11.355 0-6.268 5.088-11.356 11.355-11.356zm44.005-45.387c6.267 0 11.356 5.088 11.356 11.356 0 6.267-5.089 11.354-11.356 11.354-6.267 0-11.356-5.087-11.356-11.354 0-6.268 5.089-11.356 11.356-11.356zm40.723-45.388c6.249 0 11.321 5.073 11.321 11.321 0 6.249-5.072 11.322-11.321 11.322H94.81c-6.248 0-11.321-5.073-11.321-11.322 0-6.248 5.072-11.321 11.321-11.321h26.26z"}),(0,i.jsx)("path",{fillRule:"nonzero",d:"M1340.97 132.65l19.465-73.534h30.948l18.687 73.312 18.688-73.312h31.771l-32.927 123.475h-30.124l-21.981-80.594-21.98 80.594h-30.124l-33.009-123.475h31.771l18.815 73.533zm131.561 49.942V59.118h59.264c28.811 0 43.217 11.854 43.217 35.561 0 24.584-14.378 36.878-43.134 36.878h-29.223v51.035h-30.124zm59.515-100.343h-29.391v26.259h29.144c9.932-.165 15.036-4.692 15.311-13.582-.275-8.122-5.296-12.348-15.064-12.677z"}),(0,i.jsx)("g",{fillRule:"nonzero",children:(0,i.jsx)("path",{d:"M365.698 58.581h24.695v49.39l41.158-49.39h27.741l-48.32 57.622 58.445 65.852h-32.104l-46.92-53.34v53.34h-24.695V58.581zM476.97 182.055L526.36 58.58h24.695l49.308 123.393-26.259.082-7.409-18.933H510.72l-7.408 18.933H476.97zm62.396-90.548l-18.768 46.92h37.043l-18.275-46.92zM642.654 157.442V83.276h22.884c21.896 0 32.872 12.346 32.927 37.042-.055 24.694-11.031 37.069-32.927 37.124h-22.884zm22.884 24.613c38.415 0 57.622-20.579 57.622-61.738 0-41.213-19.207-61.819-57.622-61.819h-47.579v123.557h47.579zM748.494 182.055V58.662l90.712-.082v23.049h-66.017v26.341h49.472v22.966h-49.472v28.07h65.853v23.049h-90.548zM863.223 182.055V58.58h8.232l77.378 77.378V58.58h24.695v123.475h-9.055L887.918 105.5v76.555h-24.695zM1053.85 182.055c-17.451-.055-32.09-5.968-43.916-17.739-11.826-11.772-17.739-26.519-17.739-44.245.055-17.341 5.981-31.925 17.78-43.751 11.799-11.826 26.424-17.739 43.875-17.739 17.616 0 32.734 5.488 45.356 16.463l-16.463 18.028c-8.396-6.586-18.027-9.878-28.893-9.878-11.085.054-20.017 3.512-26.794 10.371-6.778 6.86-10.166 15.641-10.166 26.342.055 11.469 3.484 20.579 10.289 27.329s15.75 10.125 26.836 10.125c11.085 0 20.661-3.265 28.728-9.796l16.463 18.028c-12.567 10.975-27.685 16.463-45.356 16.463zM1124.62 182.055V58.662l90.713-.082v23.049h-66.018v26.341h49.473v22.966h-49.473v28.07h65.854v23.049h-90.549z"})})]})]});function vc(){return(0,i.jsxs)("div",{className:"kb-large-banner",children:[(0,i.jsx)("div",{className:"kb-large-banner__logo",children:bc}),(0,i.jsxs)("div",{className:"kb-large-banner__content",children:[(0,i.jsxs)("div",{className:"kb-large-banner__heading",children:[(0,t.__)("Kadence is better with AI.","kadence-blocks")," ",lc.aiIcon]}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"kb-large-banner__subheading",children:(0,t.__)("Elevate your web development game with Kadence AI. Supercharge your pattern and page library's potential with tailored content - get building pages in no time.","kadence-blocks")}),(0,i.jsx)("p",{className:"disabled-authorize-note",children:(0,t.__)("Kadence AI is disabled by site admin.","kadence-blocks")})]})]})]})}const yc=window.wp.notices;function _c(){const[n,r]=(0,e.useState)(!1),o=new URLSearchParams(window.location.search),a=o.get("uplink_token"),{getInitialAIContent:s,getAllAIContentData:l,getAvailableCredits:c}=Zl(),[u,d]=(0,e.useState)("start"),[p,f]=(0,e.useState)(!1),h=!!kadenceHomeParams.isAuthorized,m=!!kadenceHomeParams.isNetworkAdmin,g=!!kadenceHomeParams.isNetworkEnabled,b=!!kadenceHomeParams.isAIDisabled,v=!(!window?.kadenceHomeParams?.pro||"true"!==kadenceHomeParams.pro),y=!!(m&&g||!m&&!g),_=h?mc:gc;(0,e.useEffect)(()=>{a&&(o.delete("uplink_token"),o.delete("uplink_license"),o.delete("uplink_slug"),o.delete("_uplink_nonce"),history.pushState(null,"",window.location.pathname+"?"+o.toString())),a&&h&&r(!0),h&&"start"===u?S():d("not-authenticated")},[]);const{createErrorNotice:w,createSuccessNotice:k,createNotice:x}=(0,Rs.useDispatch)(yc.store);async function S(){const e=await l(!0);"empty"===e?(console.log("No Local AI Content"),d("empty")):"loading"===e?("getInitial"!==u&&d("getInitial"),console.log("Still Loading"),setTimeout(()=>{S()},5e3)):"error"===e?(console.log("Error to load Local"),d("failed")):e&&d("infoLoaded")}(0,e.useEffect)(()=>{p&&"infoLoaded"===u&&x("info",(0,t.__)("AI Content generated. You can find AI content in your design library in the editor.","kadence-blocks"),{type:"default"}),"getInitial"===u&&f(!0)},[u]);const O=(0,i.jsxs)(i.Fragment,{children:[(0,t.__)("AI access authorized.","kadence-blocks")," ",(0,i.jsx)("a",{href:kadenceHomeParams.disconnectUrl,children:(0,t.__)("Disconnect?","kadence-blocks")})]});return b?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(vc,{}),(0,i.jsx)("div",{className:"kb-section kb-section--dark",children:(0,i.jsxs)("div",{className:"kb-container",children:[(0,i.jsx)(dc,{title:_.knowledgeBase.heading,variant:"white"}),(0,i.jsx)(ac,{articles:_.knowledgeBase.articles})]})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uc,{..._?.largeBanner,activateUrl:kadenceHomeParams.authUrl,onUpdateWizard:()=>r(!0),isUserAuthenticated:h,showControls:y,isNetworkAdmin:m}),"getInitial"===u&&(0,i.jsx)("div",{className:"components-notice kadence-ai-notice is-info",children:(0,i.jsxs)("div",{className:"components-notice__content",children:[(0,i.jsx)(En.Spinner,{}),(0,t.__)("Generating AI Content, this happens in the background, you can leave this page. You can find AI content in your design library in the editor.","kadence-blocks")]})}),(0,i.jsx)(rc,{}),(0,i.jsxs)("div",{className:"kb-container",children:[(0,i.jsxs)("div",{className:"kb-section",children:[_.actionCards.title,_.actionCards.cards.length>0&&(0,i.jsx)("div",{className:"kb-auto-grid",children:_.actionCards.cards.map(e=>(0,i.jsx)(oc,{...e},e.heading))})]}),!v&&_.upsellContents.length>0&&_.upsellContents.map(e=>(0,i.jsx)("div",{className:"kb-section",children:(0,i.jsx)(pc,{...e})},e.heading)),!m&&n&&(0,i.jsx)(nc,{onClose:e=>{r(!1),e&&"saved"===e&&k((0,t.__)("Saved"),{type:"snackbar"})},onPrimaryAction:(e,n)=>{n&&(d("getInitial"),console.log("Rebuild AI Content",u),async function(){k((0,t.__)("Generating AI Content"),{type:"snackbar"});const e=await s();console.log("response",e),"error"===e||"failed"===e?(w((0,t.__)("Error generating AI content, Please Retry"),{type:"snackbar"}),console.log("Error getting AI Content."),d("failed")):e?.error&&e?.context?(d("failed"),w((0,t.__)("Error, Some AI Contexts could not be started, Please Retry"),{type:"snackbar"}),console.log("Error getting all new AI Content.")):setTimeout(()=>{S()},1e4)}())},photographyOnly:!1,credits:!1,isFullScreen:!0})]}),(0,i.jsx)("div",{className:"kb-section kb-section--dark",children:(0,i.jsxs)("div",{className:"kb-container",children:[(0,i.jsx)(dc,{title:_.knowledgeBase.heading,variant:"white"}),(0,i.jsx)(ac,{articles:_.knowledgeBase.articles})]})}),(0,i.jsxs)("div",{className:"kb-footer-status",children:[y&&(0,i.jsx)("p",{children:h?O:(0,t.__)("AI access is not authorized.","kadence-blocks")}),!y&&(0,i.jsx)("p",{children:h?(0,t.__)("AI access authorized.","kadence-blocks"):(0,t.__)("AI access is not authorized.","kadence-blocks")})]})]})}wp.domReady(()=>{const t=document.querySelector(".kadence_blocks_home_main");(0,e.createRoot)(t).render((0,i.jsx)(_c,{}))})})(),(this.kadence=this.kadence||{})["admin-kadence-home"]={}})();