D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
oems
/
wp-content
/
plugins
/
qi-blocks
/
assets
/
dist
/
Filename :
post-author.js
back
Copy
(()=>{var e={7217(e,t,n){var r=n(3702),o=n(80),i=n(4739),a=n(8655),l=n(1175);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=o,s.prototype.get=i,s.prototype.has=a,s.prototype.set=l,e.exports=s},7828(e,t,n){var r=n(9325).Uint8Array;e.exports=r},1033(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},882(e){e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}},1074(e){e.exports=function(e){return e.split("")}},1733(e){var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},7805(e,t,n){var r=n(3360),o=n(5288);e.exports=function(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},6547(e,t,n){var r=n(3360),o=n(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},6025(e,t,n){var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},3360(e,t,n){var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},9344(e,t,n){var r=n(3805),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},6649(e,t,n){var r=n(3221)();e.exports=r},2552(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5250(e,t,n){var r=n(7217),o=n(7805),i=n(6649),a=n(2824),l=n(3805),s=n(7241),u=n(4974);e.exports=function e(t,n,c,p,d){t!==n&&i(n,function(i,s){if(d||(d=new r),l(i))a(t,n,s,c,e,p,d);else{var m=p?p(u(t,s),i,s+"",t,n,d):void 0;void 0===m&&(m=i),o(t,s,m)}},s)}},2824(e,t,n){var r=n(7805),o=n(3290),i=n(1961),a=n(3007),l=n(5529),s=n(2428),u=n(6449),c=n(3693),p=n(3656),d=n(1882),m=n(3805),b=n(1331),f=n(7167),g=n(4974),h=n(9884);e.exports=function(e,t,n,y,v,k,_){var w=g(e,n),S=g(t,n),A=_.get(S);if(A)r(e,n,A);else{var I=k?k(w,S,n+"",e,t,_):void 0,x=void 0===I;if(x){var E=u(S),C=!E&&p(S),q=!E&&!C&&f(S);I=S,E||C||q?u(w)?I=w:c(w)?I=a(w):C?(x=!1,I=o(S,!0)):q?(x=!1,I=i(S,!0)):I=[]:b(S)||s(S)?(I=w,s(w)?I=h(w):m(w)&&!d(w)||(I=l(S))):x=!1}x&&(_.set(S,I),v(I,S,y,k,_),_.delete(S)),r(e,n,I)}}},9302(e,t,n){var r=n(3488),o=n(6757),i=n(2865);e.exports=function(e,t){return i(o(e,t,r),e+"")}},5160(e){e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}},7556(e){e.exports=function(e){return e}},8754(e,t,n){var r=n(5160);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:r(e,t,n)}},9653(e,t,n){var r=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},3290(e,t,n){e=n.nmd(e);var r=n(9325),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,l=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=l?l(n):new e.constructor(n);return e.copy(r),r}},1961(e,t,n){var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},3007(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},1791(e,t,n){var r=n(6547),o=n(3360);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var l=-1,s=t.length;++l<s;){var u=t[l],c=i?i(n[u],e[u],u,n,e):void 0;void 0===c&&(c=e[u]),a?o(n,u,c):r(n,u,c)}return n}},999(e,t,n){var r=n(9302),o=n(6800);e.exports=function(e){return r(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,l&&o(n[0],n[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}},3221(e){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),l=a.length;l--;){var s=a[e?l:++o];if(!1===n(i[s],s,i))break}return t}}},2507(e,t,n){var r=n(8754),o=n(9698),i=n(3912),a=n(3222);e.exports=function(e){return function(t){t=a(t);var n=o(t)?i(t):void 0,l=n?n[0]:t.charAt(0),s=n?r(n,1).join(""):t.slice(1);return l[e]()+s}}},5539(e,t,n){var r=n(882),o=n(828),i=n(6645),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(i(o(t).replace(a,"")),e,"")}}},3243(e,t,n){var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},4840(e){var t="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;e.exports=t},6110(e){e.exports=function(e,t){return null==e?void 0:e[t]}},8879(e,t,n){var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},9698(e){var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},5434(e){var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},5529(e,t,n){var r=n(9344),o=n(8879),i=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},6800(e){e.exports=function(){return!1}},5527(e){e.exports=function(){return!1}},3702(e){e.exports=function(){this.__data__=[],this.size=0}},80(e,t,n){var r=n(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},4739(e,t,n){var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},8655(e,t,n){var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},1175(e,t,n){var r=n(6025);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4335(e){e.exports=function(e,t){return function(n){return e(t(n))}}},6757(e,t,n){var r=n(1033),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,l=o(i.length-t,0),s=Array(l);++a<l;)s[a]=i[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=i[a];return u[t]=n(s),r(e,this,u)}}},9325(e,t,n){var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},4974(e){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},2865(e){e.exports=function(e){return e}},3912(e,t,n){var r=n(1074),o=n(9698),i=n(2054);e.exports=function(e){return o(e)?i(e):r(e)}},2054(e){var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",l="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+o+")"+"?",u="[\\ufe0e\\ufe0f]?",c=u+s+("(?:\\u200d(?:"+[i,a,l].join("|")+")"+u+s+")*"),p="(?:"+[i+r+"?",r,a,l,n].join("|")+")",d=RegExp(o+"(?="+o+")|"+p+c,"g");e.exports=function(e){return e.match(d)||[]}},2225(e){var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+i+"]",l="\\d+",s="["+n+"]",u="["+r+"]",c="[^"+t+i+l+n+r+o+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",m="["+o+"]",b="(?:"+u+"|"+c+")",f="(?:"+m+"|"+c+")",g="(?:['’](?:d|ll|m|re|s|t|ve))?",h="(?:['’](?:D|LL|M|RE|S|T|VE))?",y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",v="[\\ufe0e\\ufe0f]?",k=v+y+("(?:\\u200d(?:"+["[^"+t+"]",p,d].join("|")+")"+v+y+")*"),_="(?:"+[s,p,d].join("|")+")"+k,w=RegExp([m+"?"+u+"+"+g+"(?="+[a,m,"$"].join("|")+")",f+"+"+h+"(?="+[a,m+b,"$"].join("|")+")",m+"?"+b+"+"+g,m+"+"+h,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",l,_].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},4058(e,t,n){var r=n(4792),o=n(5539)(function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)});e.exports=o},4792(e,t,n){var r=n(3222),o=n(5808);e.exports=function(e){return o(r(e).toLowerCase())}},828(e,t,n){var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},5288(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},9754(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},3488(e){e.exports=function(e){return e}},2428(e){e.exports=function(){return!1}},6449(e){var t=Array.isArray;e.exports=t},4894(e,t,n){var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},3693(e,t,n){var r=n(4894),o=n(346);e.exports=function(e){return o(e)&&r(e)}},3656(e){e.exports=function(){return!1}},1882(e,t,n){var r=n(2552),o=n(3805);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3805(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},1331(e,t,n){var r=n(2552),o=n(8879),i=n(346),a=Function.prototype,l=Object.prototype,s=a.toString,u=l.hasOwnProperty,c=s.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==c}},7167(e){e.exports=function(){return!1}},7241(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},5364(e,t,n){var r=n(5250),o=n(999)(function(e,t,n){r(e,t,n)});e.exports=o},9884(e,t,n){var r=n(1791),o=n(7241);e.exports=function(e){return r(e,o(e))}},3222(e){e.exports=function(e){return e}},5808(e,t,n){var r=n(2507)("toUpperCase");e.exports=r},6645(e,t,n){var r=n(1733),o=n(5434),i=n(3222),a=n(2225);e.exports=function(e,t,n){return e=i(e),void 0===(t=n?void 0:t)?o(e)?a(e):r(e):e.match(t)||[]}},2694(e,t,n){"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7424(e,t,n){"use strict";t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(6540)),o=s(n(5556)),i=s(n(9321)),a=s(n(3486)),l=n(6462);function s(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function c(e){return c="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},c(e)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function m(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,r.key,r)}}function b(e){return function(){var t,n=g(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var r=g(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;return f(e)}(this,t)}}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(){return!0},k="suggestions-revealed",_="input-focused",w="input-changed",S="escape-pressed",A=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}}),t&&h(e,t)}(u,e);var t,n,o,s=b(u);function u(e){var t,n=e.alwaysRenderSuggestions;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),y(f(t=s.call(this)),"onDocumentMouseDown",function(e){t.justClickedOnSuggestionsContainer=!1;for(var n=e.detail&&e.detail.target||e.target;null!==n&&n!==document;){if(n.getAttribute&&null!==n.getAttribute("data-suggestion-index"))return;if(n===t.suggestionsContainer)return void(t.justClickedOnSuggestionsContainer=!0);n=n.parentNode}}),y(f(t),"storeAutowhateverRef",function(e){null!==e&&(t.autowhatever=e)}),y(f(t),"onSuggestionMouseEnter",function(e,n){var r=n.sectionIndex,o=n.itemIndex;t.updateHighlightedSuggestion(r,o),e.target===t.pressedSuggestion&&(t.justSelectedSuggestion=!0),t.justMouseEntered=!0,setTimeout(function(){t.justMouseEntered=!1})}),y(f(t),"highlightFirstSuggestion",function(){t.updateHighlightedSuggestion(t.props.multiSection?0:null,0)}),y(f(t),"onDocumentMouseUp",function(){t.pressedSuggestion&&!t.justSelectedSuggestion&&t.input.focus(),t.pressedSuggestion=null}),y(f(t),"onSuggestionMouseDown",function(e){t.justSelectedSuggestion||(t.justSelectedSuggestion=!0,t.pressedSuggestion=e.target)}),y(f(t),"onSuggestionsClearRequested",function(){var e=t.props.onSuggestionsClearRequested;e&&e()}),y(f(t),"onSuggestionSelected",function(e,n){var r=t.props,o=r.alwaysRenderSuggestions,i=r.onSuggestionSelected,a=r.onSuggestionsFetchRequested;i&&i(e,n);var l=t.props.shouldKeepSuggestionsOnSelect(n.suggestion);o||l?a({value:n.suggestionValue,reason:"suggestion-selected"}):t.onSuggestionsClearRequested(),t.resetHighlightedSuggestion()}),y(f(t),"onSuggestionClick",function(e){var n=t.props,r=n.alwaysRenderSuggestions,o=n.focusInputOnSuggestionClick,i=t.getSuggestionIndices(t.findSuggestionElement(e.target)),a=i.sectionIndex,l=i.suggestionIndex,s=t.getSuggestion(a,l),u=t.props.getSuggestionValue(s);t.maybeCallOnChange(e,u,"click"),t.onSuggestionSelected(e,{suggestion:s,suggestionValue:u,suggestionIndex:l,sectionIndex:a,method:"click"});var c=t.props.shouldKeepSuggestionsOnSelect(s);r||c||t.closeSuggestions(),!0===o?t.input.focus():t.onBlur(),setTimeout(function(){t.justSelectedSuggestion=!1})}),y(f(t),"onBlur",function(){var e=t.props,n=e.inputProps,r=e.shouldRenderSuggestions,o=n.value,i=n.onBlur,a=t.getHighlightedSuggestion(),l=r(o,"input-blurred");t.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!l}),i&&i(t.blurEvent,{highlightedSuggestion:a})}),y(f(t),"onSuggestionMouseLeave",function(e){t.resetHighlightedSuggestion(!1),t.justSelectedSuggestion&&e.target===t.pressedSuggestion&&(t.justSelectedSuggestion=!1)}),y(f(t),"onSuggestionTouchStart",function(){t.justSelectedSuggestion=!0}),y(f(t),"onSuggestionTouchMove",function(){t.justSelectedSuggestion=!1,t.pressedSuggestion=null,t.input.focus()}),y(f(t),"itemProps",function(e){return{"data-section-index":e.sectionIndex,"data-suggestion-index":e.itemIndex,onMouseEnter:t.onSuggestionMouseEnter,onMouseLeave:t.onSuggestionMouseLeave,onMouseDown:t.onSuggestionMouseDown,onTouchStart:t.onSuggestionTouchStart,onTouchMove:t.onSuggestionTouchMove,onClick:t.onSuggestionClick}}),y(f(t),"renderSuggestionsContainer",function(e){var n=e.containerProps,r=e.children;return(0,t.props.renderSuggestionsContainer)({containerProps:n,children:r,query:t.getQuery()})}),t.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},t.justPressedUpDown=!1,t.justMouseEntered=!1,t.pressedSuggestion=null,t}return t=u,n=[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=0===this.state.highlightedSuggestionIndex&&this.props.highlightFirstSuggestion&&!e.highlightFirstSuggestion;(0,i.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered?this.highlightFirstSuggestion():t&&this.resetHighlightedSuggestion():this.willRenderSuggestions(e,"suggestions-updated")?(this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions(),t&&this.resetHighlightedSuggestion()):this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,o=n.onSuggestionHighlighted,a=n.highlightFirstSuggestion;if(!(0,i.default)(r,e.suggestions)&&r.length>0&&a)this.highlightFirstSuggestion();else if(o){var l=this.getHighlightedSuggestion();l!=t.highlightedSuggestion&&o({suggestion:l})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState(function(o){var i=o.valueBeforeUpDown;return null===t?i=null:null===i&&void 0!==n&&(i=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:i}})}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState(function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}})}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,o=n.multiSection,i=n.getSectionSuggestions;return o?i(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(t.getAttribute&&null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,o=r.value,i=r.onChange;t!==o&&i(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e,t){var n=e.suggestions,r=e.inputProps,o=e.shouldRenderSuggestions,i=r.value;return n.length>0&&o(i,t)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,o=t.renderInputComponent,i=t.onSuggestionsFetchRequested,s=t.renderSuggestion,u=t.inputProps,c=t.multiSection,p=t.renderSectionTitle,m=t.id,b=t.getSectionSuggestions,f=t.theme,g=t.getSuggestionValue,h=t.alwaysRenderSuggestions,y=t.highlightFirstSuggestion,A=t.containerProps,I=this.state,x=I.isFocused,E=I.isCollapsed,C=I.highlightedSectionIndex,q=I.highlightedSuggestionIndex,T=I.valueBeforeUpDown,O=h?v:this.props.shouldRenderSuggestions,P=u.value,D=u.onFocus,R=u.onKeyDown,N=this.willRenderSuggestions(this.props,"render"),B=h||x&&!E&&N,j=B?n:[],V=d({},u,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=O(P,_);e.setState({isFocused:!0,isCollapsed:!n}),D&&D(t),n&&i({value:P,reason:_})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,r=O(n,w);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(d({},y?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!r})),r?i({value:n,reason:w}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var o=t.keyCode;switch(o){case 40:case 38:if(E)O(P,k)&&(i({value:P,reason:k}),e.revealSuggestions(),t.preventDefault());else if(n.length>0){var a,l=r.newHighlightedSectionIndex,s=r.newHighlightedItemIndex;a=null===s?null===T?P:T:e.getSuggestionValueByIndex(l,s),e.updateHighlightedSuggestion(l,s,P),e.maybeCallOnChange(t,a,40===o?"down":"up"),t.preventDefault()}e.justPressedUpDown=!0,setTimeout(function(){e.justPressedUpDown=!1});break;case 13:if(229===t.keyCode)break;var u=e.getHighlightedSuggestion();if(B&&!h&&e.closeSuggestions(),null!=u){t.preventDefault();var c=g(u);e.maybeCallOnChange(t,c,"enter"),e.onSuggestionSelected(t,{suggestion:u,suggestionValue:c,suggestionIndex:q,sectionIndex:C,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout(function(){e.justSelectedSuggestion=!1})}break;case 27:B&&t.preventDefault();var p=B&&!h;null===T?p||(e.maybeCallOnChange(t,"","escape"),O("",S)?i({value:"",reason:S}):e.onSuggestionsClearRequested()):e.maybeCallOnChange(t,T,"escape"),p?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}R&&R(t)}}),M={query:this.getQuery()};return r.default.createElement(a.default,{multiSection:c,items:j,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:s,renderItemData:M,renderSectionTitle:p,getSectionItems:b,highlightedSectionIndex:C,highlightedItemIndex:q,containerProps:A,inputProps:V,itemProps:this.itemProps,theme:(0,l.mapToAutowhateverTheme)(f),id:m,ref:this.storeAutowhateverRef})}}],n&&m(t.prototype,n),o&&m(t,o),u}(r.Component);t.default=A,y(A,"propTypes",{suggestions:o.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){var n=e[t];if("function"!=typeof n)throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},shouldKeepSuggestionsOnSelect:o.default.func,onSuggestionSelected:o.default.func,onSuggestionHighlighted:o.default.func,renderInputComponent:o.default.func,renderSuggestionsContainer:o.default.func,getSuggestionValue:o.default.func.isRequired,renderSuggestion:o.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n)throw new Error("'inputProps' must be passed.");if(!Object.prototype.hasOwnProperty.call(n,"value"))throw new Error("'inputProps' must have 'value'.");if(!Object.prototype.hasOwnProperty.call(n,"onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:o.default.func,alwaysRenderSuggestions:o.default.bool,multiSection:o.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:o.default.bool,highlightFirstSuggestion:o.default.bool,theme:o.default.object,id:o.default.string,containerProps:o.default.object}),y(A,"defaultProps",{renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return r.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,shouldKeepSuggestionsOnSelect:function(){return!1},focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:l.defaultTheme,id:"1",containerProps:{}})},3486(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==f(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(6540)),o=u(n(5556)),i=u(n(1578)),a=u(n(4525)),l=u(n(2444)),s=u(n(7932));function u(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(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 f(e){return f="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},f(e)}function g(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,r.key,r)}}function h(e){return function(){var t,n=v(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var r=v(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;return y(e)}(this,t)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function k(e,t){return k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},k(e,t)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={},S=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}}),t&&k(e,t)}(c,e);var t,n,o,u=h(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),_(y(t=u.call(this,e)),"storeInputReference",function(e){null!==e&&(t.input=e);var n=t.props.inputProps.ref;n&&("function"==typeof n?n(e):"object"===f(n)&&Object.prototype.hasOwnProperty.call(n,"current")&&(n.current=e))}),_(y(t),"storeItemsContainerReference",function(e){null!==e&&(t.itemsContainer=e)}),_(y(t),"onHighlightedItemChange",function(e){t.highlightedItem=e}),_(y(t),"getItemId",function(e,n){if(null===n)return null;var r=t.props.id,o=null===e?"":"section-".concat(e);return"react-autowhatever-".concat(r,"-").concat(o,"-item-").concat(n)}),_(y(t),"onFocus",function(e){var n=t.props.inputProps;t.setState({isInputFocused:!0}),n.onFocus&&n.onFocus(e)}),_(y(t),"onBlur",function(e){var n=t.props.inputProps;t.setState({isInputFocused:!1}),n.onBlur&&n.onBlur(e)}),_(y(t),"onKeyDown",function(e){var n=t.props,r=n.inputProps,o=n.highlightedSectionIndex,i=n.highlightedItemIndex,a=e.keyCode;switch(a){case 40:case 38:var l=40===a?"next":"prev",s=m(t.sectionIterator[l]([o,i]),2),u=s[0],c=s[1];r.onKeyDown(e,{newHighlightedSectionIndex:u,newHighlightedItemIndex:c});break;default:r.onKeyDown(e,{highlightedSectionIndex:o,highlightedItemIndex:i})}}),t.highlightedItem=null,t.state={isInputFocused:!1},t.setSectionsItems(e),t.setSectionIterator(e),t.setTheme(e),t}return t=c,(n=[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map(function(t){return e.getSectionItems(t)}),this.sectionsLengths=this.sectionsItems.map(function(e){return e.length}),this.allSectionsAreEmpty=this.sectionsLengths.every(function(e){return 0===e}))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,i.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,a.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,o=n.id,i=n.items,a=n.renderItem,u=n.renderItemData,c=n.renderSectionTitle,p=n.highlightedSectionIndex,d=n.highlightedItemIndex,m=n.itemProps;return i.map(function(n,i){var b="react-autowhatever-".concat(o,"-"),f="".concat(b,"section-").concat(i,"-"),g=0===i;return r.default.createElement("div",t("".concat(f,"container"),"sectionContainer",g&&"sectionContainerFirst"),r.default.createElement(l.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:f}),r.default.createElement(s.default,{items:e.sectionsItems[i],itemProps:m,renderItem:a,renderItemData:u,sectionIndex:i,highlightedItemIndex:p===i?d:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:b,ref:e.storeItemsListReference}))})}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,o=n.id,i=n.renderItem,a=n.renderItemData,l=n.highlightedSectionIndex,u=n.highlightedItemIndex,c=n.itemProps;return r.default.createElement(s.default,{items:e,itemProps:c,renderItem:i,renderItemData:a,highlightedItemIndex:null===l?u:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-".concat(o,"-")})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,o=t.multiSection,i=t.renderInputComponent,a=t.renderItemsContainer,l=t.highlightedSectionIndex,s=t.highlightedItemIndex,u=this.state.isInputFocused,c=o?this.renderSections():this.renderItems(),p=null!==c,m=this.getItemId(l,s),b="react-autowhatever-".concat(n),f=d({role:"combobox","aria-haspopup":"listbox","aria-owns":b,"aria-expanded":p},e("react-autowhatever-".concat(n,"-container"),"container",p&&"containerOpen"),{},this.props.containerProps),g=i(d({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":b,"aria-activedescendant":m},e("react-autowhatever-".concat(n,"-input"),"input",p&&"inputOpen",u&&"inputFocused"),{},this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),h=a({containerProps:d({id:b,role:"listbox"},e("react-autowhatever-".concat(n,"-items-container"),"itemsContainer",p&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:c});return r.default.createElement("div",f,g,h)}}])&&g(t.prototype,n),o&&g(t,o),c}(r.Component);t.default=S,_(S,"propTypes",{id:o.default.string,multiSection:o.default.bool,renderInputComponent:o.default.func,renderItemsContainer:o.default.func,items:o.default.array.isRequired,renderItem:o.default.func,renderItemData:o.default.object,renderSectionTitle:o.default.func,getSectionItems:o.default.func,containerProps:o.default.object,inputProps:o.default.object,itemProps:o.default.oneOfType([o.default.object,o.default.func]),highlightedSectionIndex:o.default.number,highlightedItemIndex:o.default.number,theme:o.default.oneOfType([o.default.object,o.default.array])}),_(S,"defaultProps",{id:"1",multiSection:!1,renderInputComponent:function(e){return r.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return r.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:w,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:w,inputProps:w,itemProps:w,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}})},1572(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(6540)),o=a(n(5556)),i=a(n(1438));function a(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function s(e){return s="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},s(e)}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p(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 d(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,r.key,r)}}function m(e){return function(){var t,n=f(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;return b(e)}(this,t)}}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=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}}),t&&g(e,t)}(l,e);var t,n,o,a=m(l);function l(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h(b(e=a.call.apply(a,[this].concat(n))),"storeItemReference",function(t){null!==t&&(e.item=t)}),h(b(e),"onMouseEnter",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseEnter(t,{sectionIndex:r,itemIndex:o})}),h(b(e),"onMouseLeave",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseLeave(t,{sectionIndex:r,itemIndex:o})}),h(b(e),"onMouseDown",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseDown(t,{sectionIndex:r,itemIndex:o})}),h(b(e),"onClick",function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onClick(t,{sectionIndex:r,itemIndex:o})}),e}return t=l,n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,o=e.renderItem,i=e.renderItemData,a=p(e,["isHighlighted","item","renderItem","renderItemData"]);return delete a.sectionIndex,delete a.itemIndex,"function"==typeof a.onMouseEnter&&(a.onMouseEnter=this.onMouseEnter),"function"==typeof a.onMouseLeave&&(a.onMouseLeave=this.onMouseLeave),"function"==typeof a.onMouseDown&&(a.onMouseDown=this.onMouseDown),"function"==typeof a.onClick&&(a.onClick=this.onClick),r.default.createElement("li",u({role:"option"},a,{ref:this.storeItemReference}),o(n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({isHighlighted:t},i)))}}],n&&d(t.prototype,n),o&&d(t,o),l}(r.Component);t.default=y,h(y,"propTypes",{sectionIndex:o.default.number,isHighlighted:o.default.bool.isRequired,itemIndex:o.default.number.isRequired,item:o.default.any.isRequired,renderItem:o.default.func.isRequired,renderItemData:o.default.object.isRequired,onMouseEnter:o.default.func,onMouseLeave:o.default.func,onMouseDown:o.default.func,onClick:o.default.func})},7932(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==u(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(6540)),o=l(n(5556)),i=l(n(1572)),a=l(n(1438));function l(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(e){return u="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},u(e)}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e,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,r.key,r)}}function m(e){return function(){var t,n=f(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var r=f(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;return b(e)}(this,t)}}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=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}}),t&&g(e,t)}(s,e);var t,n,o,l=m(s);function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h(b(e=l.call.apply(l,[this].concat(n))),"storeHighlightedItemReference",function(t){e.props.onHighlightedItemChange(null===t?null:t.item)}),e}return t=s,n=[{key:"shouldComponentUpdate",value:function(e){return(0,a.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,o=t.itemProps,a=t.renderItem,l=t.renderItemData,s=t.sectionIndex,u=t.highlightedItemIndex,d=t.getItemId,m=t.theme,b=t.keyPrefix,f=null===s?b:"".concat(b,"section-").concat(s,"-"),g="function"==typeof o;return r.default.createElement("ul",c({role:"listbox"},m("".concat(f,"items-list"),"itemsList")),n.map(function(t,n){var b=0===n,y=n===u,v="".concat(f,"item-").concat(n),k=g?o({sectionIndex:s,itemIndex:n}):o,_=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({id:d(s,n),"aria-selected":y},m(v,"item",b&&"itemFirst",y&&"itemHighlighted"),{},k);return y&&(_.ref=e.storeHighlightedItemReference),r.default.createElement(i.default,c({},_,{sectionIndex:s,isHighlighted:y,itemIndex:n,item:t,renderItem:a,renderItemData:l}))}))}}],n&&d(t.prototype,n),o&&d(t,o),s}(r.Component);t.default=y,h(y,"propTypes",{items:o.default.array.isRequired,itemProps:o.default.oneOfType([o.default.object,o.default.func]),renderItem:o.default.func.isRequired,renderItemData:o.default.object.isRequired,sectionIndex:o.default.number,highlightedItemIndex:o.default.number,onHighlightedItemChange:o.default.func.isRequired,getItemId:o.default.func.isRequired,theme:o.default.func.isRequired,keyPrefix:o.default.string.isRequired}),h(y,"defaultProps",{sectionIndex:null})},2444(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(6540)),o=a(n(5556)),i=a(n(1438));function a(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function s(e){return s="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},s(e)}function u(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,r.key,r)}}function c(e){return function(){var t,n=p(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var r=p(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,t)}}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}var m,b,f,g=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}}),t&&d(e,t)}(l,e);var t,n,o,a=c(l);function l(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.apply(this,arguments)}return t=l,(n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,o=e.theme,i=e.sectionKeyPrefix,a=n(t);return a?r.default.createElement("div",o("".concat(i,"title"),"sectionTitle"),a):null}}])&&u(t.prototype,n),o&&u(t,o),l}(r.Component);t.default=g,m=g,b="propTypes",f={section:o.default.any.isRequired,renderSectionTitle:o.default.func.isRequired,theme:o.default.func.isRequired,sectionKeyPrefix:o.default.string.isRequired},b in m?Object.defineProperty(m,b,{value:f,enumerable:!0,configurable:!0,writable:!0}):m[b]=f},1438(e,t){"use strict";function n(e){return n="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},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!0;var a,l,s={};for(a=0,l=r.length;a<l;a++)s[r[a]]=!0;for(a=0,l=o.length;a<l;a++){var u=o[a],c=e[u],p=t[u];if(c!==p){if(!s[u]||null===c||null===p||"object"!==n(c)||"object"!==n(p))return!0;var d=Object.keys(c),m=Object.keys(p);if(d.length!==m.length)return!0;for(var b=0,f=d.length;b<f;b++){var g=d[b];if(c[g]!==p[g])return!0}}}return!1}},2243(e,t,n){"use strict";e.exports=n(7424).default},6462(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToAutowhateverTheme=t.defaultTheme=void 0;t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"};t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},4525(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i,a=n(3675),l=(i=a)&&i.__esModule?i:{default:i},s=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),i=n[0],a=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var u=n.map(function(e){return i[e]}).filter(s);return"string"==typeof u[0]||"function"==typeof a?{key:e,className:a?a.apply(void 0,o(u)):u.join(" ")}:{key:e,style:l.default.apply(void 0,[{}].concat(o(u)))}}},e.exports=t.default},3675(e){"use strict";var t=Object.prototype.propertyIsEnumerable;function n(e){var n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e))),n.filter(function(n){return t.call(e,n)})}e.exports=Object.assign||function(e,t){for(var r,o,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),a=1;a<arguments.length;a++){r=arguments[a],o=n(Object(r));for(var l=0;l<o.length;l++)i[o[l]]=r[o[l]]}return i}},5287(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.iterator;var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function h(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||b}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||b}h.prototype.isReactComponent={},h.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=h.prototype;var k=v.prototype=new y;k.constructor=v,f(k,h.prototype),k.isPureReactComponent=!0;var _=Array.isArray,w=Object.prototype.hasOwnProperty,S={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function I(e,t,r){var o,i={},a=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,o)&&!A.hasOwnProperty(o)&&(i[o]=t[o]);var s=arguments.length-2;if(1===s)i.children=r;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(o in s=e.defaultProps)void 0===i[o]&&(i[o]=s[o]);return{$$typeof:n,type:e,key:a,ref:l,props:i,_owner:S.current}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function q(e,t,o,i,a){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var s=!1;if(null===e)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case n:case r:s=!0}}if(s)return a=a(s=e),e=""===i?"."+C(s,0):i,_(a)?(o="",null!=e&&(o=e.replace(E,"$&/")+"/"),q(a,t,o,"",function(e){return e})):null!=a&&(x(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(s=0,i=""===i?".":i+":",_(e))for(var u=0;u<e.length;u++){var c=i+C(l=e[u],u);s+=q(l,t,o,c,a)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=m&&e[m]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(l=e.next()).done;)s+=q(l=l.value,t,o,c=i+C(l,u++),a);else if("object"===l)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function T(e,t,n){if(null==e)return e;var r=[],o=0;return q(e,r,"","",function(e){return t.call(n,e,o++)}),r}function O(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},D={transition:null},R={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:D,ReactCurrentOwner:S};function N(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:T,forEach:function(e,t,n){T(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return T(e,function(){t++}),t},toArray:function(e){return T(e,function(e){return e})||[]},only:function(e){if(!x(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=h,t.Fragment=o,t.Profiler=a,t.PureComponent=v,t.StrictMode=i,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.act=N,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=f({},e.props),i=e.key,a=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,l=S.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(u in t)w.call(t,u)&&!A.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==s?s[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){s=Array(u);for(var c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}return{$$typeof:n,type:e.type,key:i,ref:a,props:o,_owner:l}},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=I,t.createFactory=function(e){var t=I.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=N,t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return P.current.useTransition()},t.version="18.3.1"},6540(e,t,n){"use strict";e.exports=n(5287)},1578(e){"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,r=e.multiSection;function o(e){var o=t(e,2),i=o[0],a=o[1];return r?null===a||a===n[i]-1?null===(i=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(i))?[null,null]:[i,0]:[i,a+1]:0===n||a===n-1?[null,null]:null===a?[null,0]:[null,a+1]}return{next:o,prev:function(e){var o=t(e,2),i=o[0],a=o[1];return r?null===a||0===a?null===(i=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(i))?[null,null]:[i,n[i]-1]:[i,a-1]:0===n||0===a?[null,null]:null===a?[null,n-1]:[null,a-1]},isLast:function(e){return null===o(e)[1]}}}},9321(e){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},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)}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,n),i.loaded=!0,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.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e=wp.i18n,t=wp.blocks;var r=n(5364),o=n.n(r),i=n(9754),a=n.n(i);const l=wp.blockEditor,s=wp.compose,u=wp.element,c=wp.components,p=wp.data;var d,m=n(6942),b=n.n(m),f=n(6540);function g(){return g=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},g.apply(null,arguments)}const h=e=>f.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),d||(d=f.createElement("path",{d:"M13 18h2c.6 0 1 .4 1 1s-.4 1-1 1H9c-.6 0-1-.4-1-1s.4-1 1-1h2v-2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-7zM4 6v8h16V6z"})));var y;function v(){return v=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},v.apply(null,arguments)}const k=e=>f.createElement("svg",v({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),y||(y=f.createElement("path",{d:"M6 4v15h12V4zm0-2h12c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2"})));var _;function w(){return w=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},w.apply(null,arguments)}const S=e=>f.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),_||(_=f.createElement("path",{d:"M8 2h8c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H8c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m0 2v15h8V4z"}))),A="desktop",I={desktop:{label:(0,e.__)("Desktop","qi-blocks"),icon:wp.element.createElement(h,null)},tablet:{label:(0,e.__)("Tablet","qi-blocks"),icon:wp.element.createElement(k,null)},mobile:{label:(0,e.__)("Mobile","qi-blocks"),icon:wp.element.createElement(S,null)}};let x=A;const E=()=>x;var C=n(4058),q=n.n(C);const T=wp.hooks,O=e=>{const t={...e},{blockAttributeKey:n,blockAttributes:r,setAttributes:o,repeater:i,repeaterItemIndex:a,repeaterItemKey:l,repeaterSetAttributes:s,repeaterGetAttributes:u}=t;return t.getAttributeValue=()=>{let e=r[n];return i&&(e=u(l,a)),e||!1},t.setAttributeValue=e=>{i?s(l,e,a):o({[n]:e})},wp.element.createElement("div",{className:"qodef-on-off-option"},wp.element.createElement(c.ToggleControl,{label:t.label,help:t.help,checked:t.getAttributeValue(),onChange:()=>t.setAttributeValue(!t.getAttributeValue())}))};O.defaultProps={label:(0,e.__)("Show","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const P=O,D=[{classSuffix:"desktop",label:(0,e.__)("Hide On Desktop","qi-blocks"),blockAttributeKey:"hideOnDesktop"},{classSuffix:"tablet",label:(0,e.__)("Hide On Tablet","qi-blocks"),blockAttributeKey:"hideOnTablet"},{classSuffix:"mobile",label:(0,e.__)("Hide On Mobile","qi-blocks"),blockAttributeKey:"hideOnMobile"}],R=e=>{const t={...e},{label:n,description:r,blockAttributeKeys:o,blockAttributes:i,setAttributes:a}=t;return wp.element.createElement("div",{className:"qodef-visibility-group-option"},n&&wp.element.createElement("label",{className:"qodef-option-label"},n),r&&wp.element.createElement("p",{className:"qodef-option-description"},r),o.map(e=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(P,{label:e.label,blockAttributeKey:e.blockAttributeKey,blockAttributes:i,setAttributes:a}))))};R.defaultProps={label:(0,e.__)("Visibility","qi-blocks"),description:(0,e.__)("Responsive visibility will take effect only on preview or live page, and not while editing in Gutenberg.","qi-blocks"),blockAttributeKeys:D,blockAttributes:{},setAttributes:()=>{}};const N=()=>({hideOnDesktop:{type:"boolean",default:!1},hideOnTablet:{type:"boolean",default:!1},hideOnMobile:{type:"boolean",default:!1}}),B=e=>{const{attrNameTemplate:t,attrName:n}=e,r=e=>te(t,n,e),o=!ue(e,"all")||(e.allowUnitControl??!0),i=ue(e,"all")&&e.disableDirections||[];let a={};return["Top","Right","Bottom","Left"].map(e=>{i.includes(e)||(a[r(e)]={type:"number",default:""},a[r(e+"Tablet")]={type:"number",default:""},a[r(e+"Mobile")]={type:"number",default:""},o&&(a[r(`${e}Decimal`)]={type:"number",default:""},a[r(`${e}DecimalTablet`)]={type:"number",default:""},a[r(`${e}DecimalMobile`)]={type:"number",default:""}))}),a[r("Unit")]={type:"string",default:"px"},a[r("UnitTablet")]={type:"string",default:"px"},a[r("UnitMobile")]={type:"string",default:"px"},a};B.defaultProps={attrNameTemplate:"",attrName:"",allowUnitControl:!0};const j=B,V=e=>{const{blockAttributeKey:t}=e,n=!!ue(e,"all")&&(e.allowScreens??!1),r=!ue(e,"all")||(e.allowUnits??!0),o=ue(e,"all")&&e.optionType||"integer",i=ue(e,"all")&&e.defaultValue||"",a="decimal"===o?i:"";let l={};return"integer"===o&&(l[t]={type:"number",default:i}),l[te(t,"Unit")]={type:"string",default:"px"},(r||"decimal"===o)&&(l[te(t,"Decimal")]={type:"number",default:a}),n&&(l[te(t,"Tablet")]={type:"number",default:""},l[te(t,"Mobile")]={type:"number",default:""},l[te(t,"UnitTablet")]={type:"string",default:"px"},l[te(t,"UnitMobile")]={type:"string",default:"px"},r&&(l[te(t,"DecimalTablet")]={type:"number",default:""},l[te(t,"DecimalMobile")]={type:"number",default:""})),l};V.defaultProps={allowScreens:!1,allowUnits:!0};const M=V,L=e=>{const t=ue(e,"all")&&e.attrNameTemplate||"",n=ue(e,"all")&&e.attrName||"Background",r=e=>te(t,n+e),o=M({blockAttributeKey:r("XPosition"),allowScreens:!0}),i=M({blockAttributeKey:r("YPosition"),allowScreens:!0}),a=M({blockAttributeKey:r("SizeWidth"),allowScreens:!0});return{[r("Image")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[r("ImageTablet")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[r("ImageMobile")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[r("Position")]:{type:"string",default:""},[r("PositionTablet")]:{type:"string",default:""},[r("PositionMobile")]:{type:"string",default:""},...o,...i,[r("Attachment")]:{type:"string",default:""},[r("Repeat")]:{type:"string",default:""},[r("RepeatTablet")]:{type:"string",default:""},[r("RepeatMobile")]:{type:"string",default:""},[r("Size")]:{type:"string",default:""},[r("SizeTablet")]:{type:"string",default:""},[r("SizeMobile")]:{type:"string",default:""},...a}};L.defaultProps={attrNameTemplate:"",attrName:"Background"};const F=L,U=e=>{const t=ue(e,"all")&&e.attrNameTemplate||"",n=e=>te(t,e),r=!!ue(e,"all")&&(e.includeVideoBG??!1),o=F({attrNameTemplate:t});let i={[n("BackgroundType")]:{type:"string",default:""},[n("BackgroundColor")]:{type:"string",default:""},...o,[n("BackgroundGradientColor1")]:{type:"string",default:""},[n("BackgroundGradientLocation1")]:{type:"number",default:""},[n("BackgroundGradientColor2")]:{type:"string",default:""},[n("BackgroundGradientLocation2")]:{type:"number",default:""},[n("BackgroundGradientType")]:{type:"string",default:"linear"},[n("BackgroundGradientTypeAngle")]:{type:"number",default:""},[n("BackgroundGradientTypePosition")]:{type:"string",default:"center center"}};if(r){const e={[n("BackgroundVideoLink")]:{type:"object",default:{id:null,url:"",alt:""}},[n("BackgroundVideoStartTime")]:{type:"number",default:""},[n("BackgroundVideoEndTime")]:{type:"number",default:""},[n("BackgroundVideoStartTime")]:{type:"number",default:""},[n("BackgroundVideoPlayOnce")]:{type:"boolean",default:!1},[n("BackgroundVideoPlayOnMobile")]:{type:"boolean",default:!1},[n("BackgroundVideoFallbackImage")]:{type:"object",default:{id:null,url:"",alt:""}}};i={...i,...e}}return i};U.defaultProps={attrNameTemplate:"",includeVideoBG:!1};const z=U,H=e=>{const t=ue(e,"all")&&e.attrNameTemplate||"",n=ue(e,"all")&&e.attrName||"",r=ue(e,"all")&&e.defaultValue||"",o=e=>te(t,n+e);return{[o("")]:{type:"string",default:r},[o("Tablet")]:{type:"string",default:""},[o("Mobile")]:{type:"string",default:""}}};H.defaultProps={attrNameTemplate:"",attrName:"",defaultValue:""};const K=H,G=e=>{const t=ue(e,"all")&&e.attrNameTemplate||"",n=ue(e,"all")&&e.disableWidthDirections||[],r=!ue(e,"all")||(e.allowBorderColor??!0),o=!ue(e,"all")||(e.allowBorderRadius??!0),i=e=>te(t,e),a=j({attrNameTemplate:t,attrName:"BorderWidth",disableDirections:n,allowUnitControl:!1}),l=r?{[i("BorderColor")]:{type:"string",default:""}}:{},s=o?j({attrNameTemplate:t,attrName:"BorderRadius"}):{};return{[i("BorderStyle")]:{type:"string",default:""},...l,...a,...s}};G.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0};const W=G,$=e=>{const t=ue(e,"all")&&e.attrNameTemplate||"",n=e=>te(t,e);return{[n("BoxShadowColor")]:{type:"string",default:""},[n("BoxShadowHorizontal")]:{type:"number",default:""},[n("BoxShadowVertical")]:{type:"number",default:""},[n("BoxShadowBlur")]:{type:"number",default:""},[n("BoxShadowSpread")]:{type:"number",default:""},[n("BoxShadowPosition")]:{type:"string",default:""}}};$.defaultProps={attrNameTemplate:""};const Y=$,X=e=>{const t=ue(e,"all")&&e.excludePanels||[],n=ue(e,"all")&&e.includePanels||[];let r=n&&n.length?n:Z();const o=e=>te("",e);t&&t.length&&t.forEach(e=>{r.splice(r.indexOf(e),1)});let i={};const a=N();if(r.includes("advanced")){const e=j({attrName:o("Margin")}),t=j({attrName:o("Padding")});i={...i,...e,...t,[o("zIndex")]:{type:"number",default:""},[o("cssId")]:{type:"string",default:""},[o("cssClasses")]:{type:"string",default:""}}}if(r.includes("motion-effects")&&(i={...i,[o("EntranceAnimation")]:{type:"string",default:""},[o("EntranceAnimationDuration")]:{type:"string",default:"normal"},[o("EntranceAnimationDelay")]:{type:"number",default:""}}),r.includes("background")){const e=z({attrNameTemplate:"Advanced"});i={...i,...e}}if(r.includes("border")){const e=W({attrNameTemplate:"Advanced"}),t=Y({attrNameTemplate:"Advanced"});i={...i,...e,...t}}if(r.includes("positioning")){const e=K({attrName:o("BlockWidth")}),t=M({blockAttributeKey:o("BlockCustomWidth"),allowScreens:!0}),n=M({blockAttributeKey:o("PositionHorizontalOffset"),allowScreens:!0}),r=M({blockAttributeKey:o("PositionVerticalOffset"),allowScreens:!0});i={...i,...e,...t,[o("BlockPosition")]:{type:"string",default:""},[o("PositionHorizontalOrientation")]:{type:"string",default:"left"},...n,[o("PositionVerticalOrientation")]:{type:"string",default:"top"},...r}}return r.includes("responsive")&&(i={...i,...a}),i};X.defaultProps={excludePanels:[],includePanels:[]};const Z=()=>["advanced","motion-effects","background","border","positioning","responsive"],J=(e,t="")=>{const n=e=>te(t,e),r=[];return e[n("cssClasses")]&&r.push(e[n("cssClasses")]),void 0!==e[n("EntranceAnimation")]&&""!==e[n("EntranceAnimation")]&&(r.push("qodef-entrance-animation--on"),e[n("EntranceAnimationDuration")]&&r.push("qodef-animation-speed--"+e[n("EntranceAnimationDuration")])),e[n("BlockWidth")]&&r.push("qodef-width--"+e[n("BlockWidth")]),e[n("BlockWidthTablet")]&&r.push("qodef-width--tablet--"+e[n("BlockWidthTablet")]),e[n("BlockWidthMobile")]&&r.push("qodef-width--mobile--"+e[n("BlockWidthMobile")]),r.push((e=>{const t=[];return D.map(n=>{const r="qodef-hide-on--"+n.classSuffix,o=e[n.blockAttributeKey];t.includes(r)&&!o?t.filter(function(e){return e!==r}):!t.includes(r)&&o&&t.push(r)}),t.join(" ")})(e)),r.join(" ")};const Q=(e,t="")=>{let n={};const r=((e,t="")=>{const n=(e,n="")=>te(t,e,n),r={};return void 0!==e[n("EntranceAnimation")]&&""!==e[n("EntranceAnimation")]&&(r["data-animation"]=e[n("EntranceAnimation")]),"custom"!==e[n("BlockWidth")]&&"custom"!==e[n("BlockWidthTablet")]&&"custom"!==e[n("BlockWidthMobile")]||["","Tablet","Mobile"].forEach(t=>{const o=e[n("BlockCustomWidth",t)],i=e[n("BlockCustomWidthDecimal",t)],a=e[n("BlockCustomWidthUnit",t)];ae(a)&&o?r["data-width"+(t?"-"+t.toLowerCase():"")]=parseInt(o,10)+a:le(a)&&i&&(r["data-width"+(t?"-"+t.toLowerCase():"")]=parseFloat(i)+a)}),r})(e,t);return r&&(n={...n,...r}),n},ee=(e,t="",n=[])=>{const r=e=>te(t,e);if(!e)return"";let o=[];return ue(e[r("cssId")],"all")&&o.push(e[r("cssId")]),n&&(o=[...o,...n]),o.join(" ")},te=(t,n,r)=>(t=t||"",n=n||"",r=r||"",q()((0,e.sprintf)("%s%s%s",t,n,r))),ne=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",re=e=>e&&A!==e?ne(e):"",oe=(e,t)=>{let n=e.desktop;return"mobile"===t&&(n={...n,...e.tablet}),{...n,...e[t]}},ie=(e,t=!0)=>{let n="";return Object.entries(e).map(([e,r])=>{n+=`${e.replace(/([A-Z])/g,(e,t,n)=>(n>0?"-":"")+e.toLowerCase())}: ${r} ${t?"!important":""};`}),n},ae=e=>["px"].includes(e),le=e=>["em","rem","%","vw","vh"].includes(e),se=(e,t="integer")=>{let n="";return 0===e||"0"===e?n=0:e&&(n=parseInt(e,10),"decimal"===t&&(n=parseFloat(e))),n},ue=(e,t="")=>{let n=void 0!==e&&""!==e;return"all"===t&&(n=void 0!==e&&e),n},ce=e=>{let t="";return 0===e||"0"===e?t=0:e&&(t=e),t},pe=(t,n=!0,r=[])=>{let o=[],i=[];if(t){switch(n&&(o=[{value:"",label:(0,e.__)("Default","qi-blocks")}]),t){case"no_yes":i=[{value:"no",label:(0,e.__)("No","qi-blocks")},{value:"yes",label:(0,e.__)("Yes","qi-blocks")}];break;case"yes_no":i=[{value:"yes",label:(0,e.__)("Yes","qi-blocks")},{value:"no",label:(0,e.__)("No","qi-blocks")}];break;case"link_target":i=[{value:"_self",label:(0,e.__)("Same Window","qi-blocks")},{value:"_blank",label:(0,e.__)("New Window","qi-blocks")}];break;case"column_gap":i=[{value:"huge",label:(0,e.__)("Huge (35)","qi-blocks")},{value:"large",label:(0,e.__)("Large (25)","qi-blocks")},{value:"medium",label:(0,e.__)("Medium (20)","qi-blocks")},{value:"normal",label:(0,e.__)("Normal (15)","qi-blocks")},{value:"small",label:(0,e.__)("Small (10)","qi-blocks")},{value:"tiny",label:(0,e.__)("Tiny (5)","qi-blocks")},{value:"no",label:(0,e.__)("No (0)","qi-blocks")}];break;case"columns_responsive":i=[{value:"predefined",label:(0,e.__)("Predefined","qi-blocks")},{value:"custom",label:(0,e.__)("Custom","qi-blocks")}];break;case"masonry_image_sizes":i=[{value:"square",label:(0,e.__)("Square","qi-blocks")},{value:"landscape",label:(0,e.__)("Landscape","qi-blocks")},{value:"portrait",label:(0,e.__)("Portrait","qi-blocks")},{value:"huge-square",label:(0,e.__)("Huge","qi-blocks")}];break;case"image_sizes":i=[{value:"full",label:(0,e.__)("Original","qi-blocks")},{value:"thumbnail",label:(0,e.__)("Thumbnail","qi-blocks")},{value:"medium",label:(0,e.__)("Medium","qi-blocks")},{value:"large",label:(0,e.__)("Large","qi-blocks")}];break;case"title_tag":i=[{value:"h1",label:(0,e.__)("H1","qi-blocks")},{value:"h2",label:(0,e.__)("H2","qi-blocks")},{value:"h3",label:(0,e.__)("H3","qi-blocks")},{value:"h4",label:(0,e.__)("H4","qi-blocks")},{value:"h5",label:(0,e.__)("H5","qi-blocks")},{value:"h6",label:(0,e.__)("H6","qi-blocks")},{value:"p",label:(0,e.__)("Paragraph","qi-blocks")}];break;case"font_weight":i=[{value:"normal",label:(0,e.__)("Normal","qi-blocks")},{value:"bold",label:(0,e.__)("Bold","qi-blocks")},{value:"100",label:(0,e.__)("Thin (100)","qi-blocks")},{value:"200",label:(0,e.__)("Extra Light (200)","qi-blocks")},{value:"300",label:(0,e.__)("Light (300)","qi-blocks")},{value:"400",label:(0,e.__)("Normal (400)","qi-blocks")},{value:"500",label:(0,e.__)("Medium (500)","qi-blocks")},{value:"600",label:(0,e.__)("Semi Bold (600)","qi-blocks")},{value:"700",label:(0,e.__)("Bold (700)","qi-blocks")},{value:"800",label:(0,e.__)("Extra Bold (800)","qi-blocks")},{value:"900",label:(0,e.__)("Black (900)","qi-blocks")}];break;case"text_transform":i=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"uppercase",label:(0,e.__)("Uppercase","qi-blocks")},{value:"lowercase",label:(0,e.__)("Lowercase","qi-blocks")},{value:"capitalize",label:(0,e.__)("Capitalize","qi-blocks")},{value:"normal",label:(0,e.__)("Normal","qi-blocks")}];break;case"font_style":i=[{value:"normal",label:(0,e.__)("Normal","qi-blocks")},{value:"italic",label:(0,e.__)("Italic","qi-blocks")},{value:"oblique",label:(0,e.__)("Oblique","qi-blocks")}];break;case"text_decoration":i=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"underline",label:(0,e.__)("Underline","qi-blocks")},{value:"overline",label:(0,e.__)("Overline","qi-blocks")},{value:"line-through",label:(0,e.__)("Line-Through","qi-blocks")}];break;case"background_position":i=[{value:"center center",label:(0,e.__)("Center Center","qi-blocks")},{value:"center left",label:(0,e.__)("Center Left","qi-blocks")},{value:"center right",label:(0,e.__)("Center Right","qi-blocks")},{value:"top center",label:(0,e.__)("Top Center","qi-blocks")},{value:"top left",label:(0,e.__)("Top Left","qi-blocks")},{value:"top right",label:(0,e.__)("Top Right","qi-blocks")},{value:"bottom center",label:(0,e.__)("Bottom Center","qi-blocks")},{value:"bottom left",label:(0,e.__)("Bottom Left","qi-blocks")},{value:"bottom right",label:(0,e.__)("Bottom Right","qi-blocks")}];break;case"background_attachment":i=[{value:"scroll",label:(0,e.__)("Scroll","qi-blocks")},{value:"fixed",label:(0,e.__)("Fixed","qi-blocks")}];break;case"background_repeat":i=[{value:"no-repeat",label:(0,e.__)("No-repeat","qi-blocks")},{value:"repeat",label:(0,e.__)("Repeat","qi-blocks")},{value:"repeat-x",label:(0,e.__)("Repeat-x","qi-blocks")},{value:"repeat-y",label:(0,e.__)("Repeat-y","qi-blocks")}];break;case"background_size":i=[{value:"auto",label:(0,e.__)("Auto","qi-blocks")},{value:"cover",label:(0,e.__)("Cover","qi-blocks")},{value:"contain",label:(0,e.__)("Contain","qi-blocks")}];break;case"horizontal_alignment":i=[{value:"left",label:(0,e.__)("Left","qi-blocks")},{value:"right",label:(0,e.__)("Right","qi-blocks")},{value:"center",label:(0,e.__)("Center","qi-blocks")}];break;case"vertical_alignment":i=[{value:"top",label:(0,e.__)("Top","qi-blocks")},{value:"middle",label:(0,e.__)("Middle","qi-blocks")},{value:"bottom",label:(0,e.__)("Bottom","qi-blocks")}];break;case"html_tag":i=[{value:"section",label:(0,e.__)("Section","qi-blocks")},{value:"div",label:(0,e.__)("Div","qi-blocks")},{value:"main",label:(0,e.__)("Main","qi-blocks")},{value:"article",label:(0,e.__)("Article","qi-blocks")},{value:"nav",label:(0,e.__)("Nav","qi-blocks")},{value:"footer",label:(0,e.__)("Footer","qi-blocks")},{value:"header",label:(0,e.__)("Header","qi-blocks")},{value:"aside",label:(0,e.__)("Aside","qi-blocks")}];break;case"appear_animation":i=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"from-bottom",label:(0,e.__)("From Bottom","qi-blocks")},{value:"from-top",label:(0,e.__)("From Top","qi-blocks")},{value:"from-left",label:(0,e.__)("From Left","qi-blocks")},{value:"from-right",label:(0,e.__)("From Right","qi-blocks")},{value:"fade",label:(0,e.__)("Fade in","qi-blocks")}];break;case"appear_delay":i=[{value:"random",label:(0,e.__)("Random","qi-blocks")},{value:"ms",label:(0,e.__)("Set ms","qi-blocks")}];break;case"responsive_screens":i=[{value:"1024",label:(0,e.__)("Below 1024px","qi-blocks")},{value:"768",label:(0,e.__)("Below 768px","qi-blocks")},{value:"680",label:(0,e.__)("Below 680px","qi-blocks")},{value:"480",label:(0,e.__)("Below 480px","qi-blocks")}];break;case"order_by":i=[{value:"date",label:(0,e.__)("Date","qi-blocks")},{value:"id",label:(0,e.__)("ID","qi-blocks")},{value:"title",label:(0,e.__)("Title","qi-blocks")}];break;case"order":i=[{value:"desc",label:(0,e.__)("Descending","qi-blocks")},{value:"asc",label:(0,e.__)("Ascending","qi-blocks")}];break;case"border_style":i=[{value:"solid",label:(0,e.__)("Solid","qi-blocks")},{value:"dashed",label:(0,e.__)("Dashed","qi-blocks")},{value:"dotted",label:(0,e.__)("Dotted","qi-blocks")}]}o=[...o,...i],r&&(o=[...o,...r])}return(0,T.applyFilters)("qi-blocks-filter-options-pool",o)},de=(e,t="",n={cssProp:"",value:""})=>{const{attributes:r,blockAttrName:o,cssProp:i}=e,a=ue(e,"all")&&void 0!==e.direction&&e.direction?ne(e.direction):"",l=!!ue(e,"all")&&(e.customUnitValue??!1);let s={},u={},c={};return Object.entries(I).map(([e])=>{let p=re(e),d="",m=o+a+p,b=o+a+"Decimal"+p,f=r[o+"Unit"+p];(ue(r[m])||ue(r[b]))&&(ae(f)&&ue(r[m])&&!l?d=se(r[m])+f:le(f)&&ue(r[b])&&!l?d=se(r[b],"decimal")+f:""!==r[m]&&(d=r[m]));const g=e=>{let n=e;if(t.includes("%s")){const r=t.split("%s");n="",r.forEach((t,o)=>{n+=t,o!==r.length-1&&(n+=e)})}return n};if(d)switch(e){case"desktop":s[i]=t?g(d):d,n.cssProp&&n.value&&(s[n.cssProp]=n.value);break;case"tablet":u[i]=t?g(d):d,n.cssProp&&n.value&&(u[n.cssProp]=n.value);break;case"mobile":c[i]=t?g(d):d,n.cssProp&&n.value&&(c[n.cssProp]=n.value)}}),{desktop:s,tablet:u,mobile:c}},me=e=>{if(!e)return null;const t=Number(e);return(0,p.select)("core").getEntityRecord("postType","attachment",Number.isNaN(t)?e:t)},be=e=>{const t=t=>te(e.attrNameTemplate,e.attrName,t),n=ue(e,"all")&&void 0!==e.disableDirections&&e.disableDirections.length>0?e.disableDirections:[],r=ue(e,"all")&&void 0!==e.isImportant&&e.isImportant?" !important":"",{blockAttributes:o}=e,i=["Top","Right","Bottom","Left"];let a={},l={},s={};return Object.entries(I).map(([u])=>{const c=re(u),p=t("Unit"+c),d="p"===o[p]?"%":o[p]||"px";[...i].map((p,m)=>{const b=o[t(p+c)],f=o[t(`${p}Decimal`+c)];if(ue(b)||ue(f)){let t;const o=e.attrName?e.attrName.toLowerCase():"";if(o.includes("border")){if(o.includes("width"))t=`border${p}Width`;else if(o.includes("radius")){let e,n,r;n=m%2?i[m-1]:p,r=m%2?p:i[i.length-m-1],e=`${n}${r}`,t=`border${e}Radius`}}else t=e.attrName?`${o}${p}`:p.toLowerCase();let c="";if(ae(d)&&""!==b?c=n.length>0&&n.includes(p)?"":parseInt(b,10)+d:le(d)&&""!==f&&(c=n.length>0&&n.includes(p)?"":parseFloat(f)+d),c)switch(u){case"desktop":a[t]=c+r;break;case"tablet":l[t]=c+r;break;case"mobile":s[t]=c+r}}})}),{desktop:a,tablet:l,mobile:s}};be.defaultProps={attrNameTemplate:"",attrName:"",blockAttributes:{},disableDirections:[],isImportant:!1};const fe=be,ge=e=>{const{blockAttributes:t}=e,n=ue(e,"all")&&e.attrNameTemplate||"",r=ue(e,"all")&&e.attrName||"Background",o=(e,t)=>te(n,r+e,t);let i={},a={},l={};return t[o("Attachment")]&&(i.backgroundAttachment=t[o("Attachment")]),Object.entries(I).map(([e])=>{let n=re(e),r={};if(t[o("Image",n)]&&t[o("Image",n)].url&&(r.backgroundImage=`url(${t[o("Image",n)].url})`),t[o("Repeat",n)]&&(r.backgroundRepeat=t[o("Repeat",n)]),"custom"===t[o("Position",n)]){let e="",i="";(t[o("XPosition",n)]||t[o("XPositionDecimal",n)])&&(ae(t[o("XPositionUnit",n)])&&t[o("XPosition",n)]?e=parseInt(t[o("XPosition",n)],10)+t[o("XPositionUnit",n)]:le(t[o("XPositionUnit",n)])&&t[o("XPositionDecimal",n)]&&(e=parseFloat(t[o("XPositionDecimal",n)])+t[o("XPositionUnit",n)])),(t[o("YPosition",n)]||t[o("YPositionDecimal",n)])&&(ae(t[o("YPositionUnit",n)])&&t[o("YPosition",n)]?i=parseInt(t[o("YPosition",n)],10)+t[o("YPositionUnit",n)]:le(t[o("YPositionUnit",n)])&&t[o("YPositionDecimal",n)]&&(i=parseFloat(t[o("YPositionDecimal",n)])+t[o("YPositionUnit",n)])),""===e&&""===i||(r.backgroundPosition=e+" "+i)}else t[o("Position",n)]&&(r.backgroundPosition=t[o("Position",n)]);"custom"===t[o("Size",n)]?(t[o("SizeWidth",n)]||t[o("SizeWidthDecimal",n)])&&(ae(t[o("SizeWidthUnit",n)])&&t[o("SizeWidth",n)]?r.backgroundSize=parseInt(t[o("SizeWidth",n)],10)+t[o("SizeWidthUnit",n)]+" auto":le(t[o("SizeWidthUnit",n)])&&t[o("SizeWidthDecimal",n)]&&(r.backgroundSize=parseFloat(t[o("SizeWidthDecimal",n)])+t[o("SizeWidthUnit",n)]+" auto")):t[o("Size",n)]&&(r.backgroundSize=t[o("Size",n)]),Object.keys(r).length>0&&Object.entries(r).map(([t,n])=>{switch(e){case"desktop":i[t]=n;break;case"tablet":a[t]=n;break;case"mobile":l[t]=n}})}),{desktop:i,tablet:a,mobile:l}};ge.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{}};const he=ge,ye=e=>{const{blockAttributes:t}=e,n=ue(e,"all")&&e.attrNameTemplate||"",r=(e,t)=>te(n,e,t),i=t[r("BackgroundType")]||"";let a={},l={},s={};if("gradient"===i){let e={type:"linear",position:"",color_1:"",location_1:"",color_2:"",location_2:""};t[r("BackgroundGradientColor1")]&&(e.color_1=t[r("BackgroundGradientColor1")]),ue(t[r("BackgroundGradientLocation1")])&&(e.location_1=se(t[r("BackgroundGradientLocation1")])+"%"),t[r("BackgroundGradientColor2")]&&(e.color_2=t[r("BackgroundGradientColor2")]),ue(t[r("BackgroundGradientLocation2")])&&(e.location_2=se(t[r("BackgroundGradientLocation2")])+"%"),t[r("BackgroundGradientType")]&&(e.type=t[r("BackgroundGradientType")]),"linear"===e.type&&""!==t[r("BackgroundGradientTypeAngle")]?e.position=se(t[r("BackgroundGradientTypeAngle")])+"deg":"radial"===e.type&&t[r("BackgroundGradientTypePosition")]&&(e.position="at "+t[r("BackgroundGradientTypePosition")]),e.type&&e.position&&e.color_1&&e.location_1&&e.color_2&&e.location_2?(a.backgroundColor="transparent",a.backgroundImage=`${e.type}-gradient(${e.position}, ${e.color_1} ${e.location_1}, ${e.color_2} ${e.location_2})`):e.color_1&&(a.backgroundColor=e.color_1)}else"video"===i?!t[r("BackgroundVideoPlayOnMobile")]&&t[r("BackgroundVideoFallbackImage")]&&t[r("BackgroundVideoFallbackImage")].url&&(l.backgroundImage=`url(${t[r("BackgroundVideoFallbackImage")].url})`,l.backgroundPosition="center",l.backgroundSize="cover"):(t[r("BackgroundColor")]&&(a.backgroundColor=t[r("BackgroundColor")]),s=he({attrNameTemplate:n,blockAttributes:t}));return o()({desktop:a,tablet:{},mobile:l},s)};ye.defaultProps={attrNameTemplate:"",blockAttributes:{}};const ve=ye,ke=e=>{const{blockAttributes:t}=e,n=ue(e,"all")&&e.attrNameTemplate||"",r=ue(e,"all")&&e.disableWidthDirections||[],i=!ue(e,"all")||(e.allowBorderColor??!0),a=(e,t)=>te(n,e,t);let l={},s={};const u=!ue(e,"all")||(e.allowBorderRadius??!0)?fe({blockAttributes:t,attrNameTemplate:n,attrName:"BorderRadius",disableDirections:r}):{};return t[a("BorderStyle")]&&(l.borderStyle=t[a("BorderStyle")],i&&t[a("BorderColor")]&&(l.borderColor=t[a("BorderColor")]),s=fe({attrNameTemplate:n,attrName:"BorderWidth",blockAttributes:t})),o()({desktop:l,tablet:{},mobile:{}},s,u)};ke.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0,blockAttributes:{}};const _e=ke,we=e=>{const{blockAttributes:t,excludeOptions:n}=e,r=ue(e,"all")&&e.attrNameTemplate||"",o=(e,t)=>te(r,e,t);let i={},a={x:0,y:0,blur:0,spread:0,color:"",position:""};var l;return t[o("BoxShadowColor")]&&(a.color=t[o("BoxShadowColor")]),""!==t[o("BoxShadowHorizontal")]&&(a.x=t[o("BoxShadowHorizontal")]),""!==t[o("BoxShadowVertical")]&&(a.y=t[o("BoxShadowVertical")]),""!==t[o("BoxShadowBlur")]&&(a.blur=t[o("BoxShadowBlur")]),""!==t[o("BoxShadowSpread")]&&(a.spread=t[o("BoxShadowSpread")]),l="position",n&&n.length&&n.includes(l)||!t[o("BoxShadowPosition")]||(a.position=t[o("BoxShadowPosition")]),a.color&&(i.boxShadow=a.x+"px "+a.y+"px "+a.blur+"px "+a.spread+"px "+a.color+" "+a.position),{desktop:i,tablet:{},mobile:{}}};we.defaultProps={attrNameTemplate:"",blockAttributes:{}};const Se=we,Ae=e=>{const{blockAttributes:t}=e,n=(e,t="")=>te("",e,t),r=ue(e,"all")&&e.excludePanels||[],i=ue(e,"all")&&e.includePanels||[];let a=i&&i.length?i:Z();r&&r.length&&r.forEach(e=>{a.splice(a.indexOf(e),1)});let l={},s={},u={},c={},p={};a.includes("advanced")&&(ue(t[n("zIndex")])&&(l.zIndex=se(t[n("zIndex")])),c=fe({attrName:n("Margin"),blockAttributes:t}),p=fe({attrName:n("Padding"),blockAttributes:t})),a.includes("motion-effects")&&void 0!==t[n("EntranceAnimation")]&&""!==t[n("EntranceAnimation")]&&t[n("EntranceAnimationDelay")]&&(l.animationDelay=se(t[n("EntranceAnimationDelay")])+"ms");let d={};a.includes("background")&&(d=ve({attrNameTemplate:"Advanced",blockAttributes:t}));let m={};if(a.includes("border")){const e=_e({attrNameTemplate:"Advanced",blockAttributes:t}),n=Se({attrNameTemplate:"Advanced",blockAttributes:t});m=o()(e,n)}if(a.includes("positioning")){ue(t[n("BlockPosition")])&&(l.position=t[n("BlockPosition")]);const e=t[n("PositionHorizontalOrientation")],r=t[n("PositionVerticalOrientation")];Object.entries(I).map(([o])=>{let i=re(o),a={};"custom"!==t[n("BlockWidth")]&&"custom"!==t[n("BlockWidth",i)]||!t[n("BlockCustomWidth",i)]&&!t[n("BlockCustomWidthDecimal",i)]||(ae(t[n("BlockCustomWidthUnit",i)])&&t[n("BlockCustomWidth",i)]?(a.width=parseInt(t[n("BlockCustomWidth",i)],10)+t[n("BlockCustomWidthUnit",i)],a.maxWidth=parseInt(t[n("BlockCustomWidth",i)],10)+t[n("BlockCustomWidthUnit",i)]):le(t[n("BlockCustomWidthUnit",i)])&&t[n("BlockCustomWidthDecimal",i)]&&(a.width=parseFloat(t[n("BlockCustomWidthDecimal",i)])+t[n("BlockCustomWidthUnit",i)],a.maxWidth=parseFloat(t[n("BlockCustomWidthDecimal",i)])+t[n("BlockCustomWidthUnit",i)])),""===ce(t[n("PositionHorizontalOffset",i)])&&""===ce(t[n("PositionHorizontalOffsetDecimal",i)])||(ae(t[n("PositionHorizontalOffsetUnit",i)])&&""!==ce(t[n("PositionHorizontalOffset",i)])?a[e]=parseInt(t[n("PositionHorizontalOffset",i)],10)+t[n("PositionHorizontalOffsetUnit",i)]:le(t[n("PositionHorizontalOffsetUnit",i)])&&""!==ce(t[n("PositionHorizontalOffsetDecimal",i)])&&(a[e]=parseFloat(t[n("PositionHorizontalOffsetDecimal",i)])+t[n("PositionHorizontalOffsetUnit",i)])),""===ce(t[n("PositionVerticalOffset",i)])&&""===ce(t[n("PositionVerticalOffsetDecimal",i)])||(ae(t[n("PositionVerticalOffsetUnit",i)])&&""!==ce(t[n("PositionVerticalOffset",i)])?a[r]=parseInt(t[n("PositionVerticalOffset",i)],10)+t[n("PositionVerticalOffsetUnit",i)]:le(t[n("PositionVerticalOffsetUnit",i)])&&""!==ce(t[n("PositionVerticalOffsetDecimal",i)])&&(a[r]=parseFloat(t[n("PositionVerticalOffsetDecimal",i)])+t[n("PositionVerticalOffsetUnit",i)])),Object.keys(a).length>0&&Object.entries(a).map(([e,t])=>{switch(o){case"desktop":l[e]=t;break;case"tablet":s[e]=t;break;case"mobile":u[e]=t}})})}return l={desktop:l,tablet:s,mobile:u},o()(l,c,p,d,m)};Ae.defaultProps={blockAttributes:{},excludePanels:[],includePanels:[]};const Ie=Ae,xe=e=>{const{unitType:t,unitValue:n,onChangeUnit:r}=e;if(e.units[t])return wp.element.createElement("ul",{className:"qodef-unit-control"},Object.entries(e.units[t]).map(([e,t],o)=>wp.element.createElement("li",{key:o},wp.element.createElement("a",{className:b()("qodef-unit",{"qodef--selected":("p"===e?"%":e)===n}),onClick:r,"data-unit":"p"===e?"%":e},t))))};xe.defaultProps={units:{typography:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),rem:(0,e.__)("rem","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},measure:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},space:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),em:(0,e.__)("em","qi-blocks")},height:{px:(0,e.__)("px","qi-blocks"),vw:(0,e.__)("vw","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},xPosition:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},yPosition:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},pxAndPercent:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks")},pxAndEm:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks")},pxEmVw:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},pxPercentVh:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},pxPercentVw:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},pxEmRem:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),rem:(0,e.__)("rem","qi-blocks")}},unitValue:"",onChangeUnit:()=>{}};const Ee=xe;class Ce extends u.Component{constructor(){super(...arguments),this.state={screen:A,isScreenPickerOpen:!1,isMouseOver:!1}}onChangeScreen(e,t){const n=this;n.state.isScreenPickerOpen?(n.props.onChangeScreen(e),n.setState({screen:e,isScreenPickerOpen:!1}),x=e,!t&&n.changePreviewScreen(e),(0,T.doAction)("qi-blocks-action-screen-change",e)):t||n.setState({isScreenPickerOpen:!0}),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-screens-option .qodef-screens.qodef--opened");t.length&&!t[0].contains(e.target)&&n.setState({isScreenPickerOpen:!1})})}onOtherScreenChange(e){this.props.onChangeScreen(e),this.setState({screen:e})}componentDidMount(){const{instanceId:e}=this.props;(0,T.addAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`,this.onOtherScreenChange.bind(this))}componentWillUnmount(){const{instanceId:e}=this.props;(0,T.removeAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`)}changeScreenControls(e){E()!==e.previewScreen&&this.onChangeScreen(e.previewScreen,!0)}changePreviewScreen(e){if(e!==this.props.previewScreen){const t=(0,p.dispatch)("core/edit-post")||"",n=(0,p.dispatch)("core/edit-site")||"";let r;if(t){let{__experimentalSetPreviewDeviceType:e}=t;r=e}if(n){const{__experimentalSetPreviewDeviceType:e}=n;r=e}r&&r(ne(e))}}render(){const e={...this.props},t={...this.state},{label:n,screens:r,isWidgetsArea:o,previewScreen:i}=e;let a=!1;return(r.length<1||o)&&(a=!0),A!==i&&t.screen!==i&&this.onOtherScreenChange(i),this.changeScreenControls(e),wp.element.createElement("div",{className:"qodef-screens-option"},A!==t.screen&&wp.element.createElement("style",null,"\n\t\t\t\t\t\t\t.qodef-screens-option .qodef-screens.qodef--opened {\n\t\t\t\t\t\t\t\ttop: calc(-4px - 22px * "+Object.keys(r).indexOf(t.screen)+");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t"),n&&wp.element.createElement("label",{className:"qodef-option-label"},n),!a&&wp.element.createElement("ul",{className:"qodef-screens "+(t.isScreenPickerOpen?"qodef--opened":"")},Object.entries(r).map(([e,n],o)=>o===Object.keys(r).indexOf(t.screen)||t.isScreenPickerOpen?wp.element.createElement("li",{className:"qodef-screen-item "+(e===t.screen?"qodef--selected":""),key:o},wp.element.createElement(c.Button,{className:"qodef-screen-item-button",onClick:()=>this.onChangeScreen(e),icon:n.icon,showTooltip:!1,label:n.label,"data-screen":e,onMouseEnter:()=>this.setState({isMouseOver:e}),onMouseLeave:()=>this.setState({isMouseOver:!1})}),e===t.isMouseOver&&wp.element.createElement("div",{className:"qodef-screen-item-tooltip"},n.label)):null)))}}Ce.defaultProps={label:"",screens:I,isWidgetsArea:!1,previewScreen:"desktop",onChangeScreen:()=>{}};const qe=(0,p.withSelect)(e=>{let t="desktop";return e("core/edit-post")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase()),e("core/edit-site")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{isWidgetsArea:e("core/edit-widgets")&&!e("core/edit-post"),previewScreen:t}})((0,s.withInstanceId)(Ce));class Te extends u.Component{constructor(){super(...arguments),this.state={screen:E(),linkedInputs:!1}}getScreenLabelSuffix(e){const t=e||this.state.screen;return re(t)}getAttributeValue(e,t=""){const{blockAttributes:n,allowScreens:r,repeater:o,repeaterItemIndex:i,repeaterItemKey:a,repeaterGetAttributes:l}=this.props;let s=e;r&&t&&(s=e+t);let u=n[s];return o&&(u=l({key:a,childKey:s},i)),ce(u)}setAttributeValue(e,t,n=""){const{setAttributes:r,allowScreens:o,repeater:i,repeaterItemIndex:a,repeaterItemKey:l,repeaterSetAttributes:s}=this.props;let u=e;o&&n&&(u=e+n),i?s({key:l,childKey:u},t,a):r({[u]:t})}render(){const t={...this.props},{label:n,allowScreens:r,rangeMax:o,rangeMin:i,rangeStep:a,rangeDecimalMax:l,rangeDecimalMin:s,rangeDecimalStep:u,repeater:p}=t,d=e=>te(t.attrNameTemplate,t.attrName,e),m=this.getScreenLabelSuffix(),b=d(),f=d("Unit"+m),g=["Top","Right","Bottom","Left"],h=()=>{const e=this.getAttributeValue(f)||"px";return ae(e)},y="margin"===t.attrName.toLowerCase()||t.allowNegativeValues?-1*(h()?o:l):h()?i:s;return t.onChange=(e,t)=>{h()?this.setAttributeValue(d(t),se(e),m):this.setAttributeValue(d(`${t}Decimal`),se(e,"decimal"),m)},t.getValue=e=>{let t;return t=h()?""!==this.getAttributeValue(d(e),m)?parseInt(this.getAttributeValue(d(e),m),10):"":""!==this.getAttributeValue(d(`${e}Decimal`),m)?parseFloat(this.getAttributeValue(d(`${e}Decimal`),m)):"",t},t.getPlaceholderValue=e=>{let t="";return"Tablet"===m?t=h()?""!==this.getAttributeValue(d(e))?parseInt(this.getAttributeValue(d(e)),10):"":""!==this.getAttributeValue(d(`${e}Decimal`))?parseFloat(this.getAttributeValue(d(`${e}Decimal`))):"":"Mobile"===m&&(h()?""!==this.getAttributeValue(d(e),"Tablet")?t=parseInt(this.getAttributeValue(d(e),"Tablet"),10):""!==this.getAttributeValue(d(e))&&(t=parseInt(this.getAttributeValue(d(e)),10)):""!==this.getAttributeValue(d(`${e}Decimal`),"Tablet")?t=parseInt(this.getAttributeValue(d(`${e}Decimal`),"Tablet"),10):""!==this.getAttributeValue(d(`${e}Decimal`))&&(t=parseInt(this.getAttributeValue(d(`${e}Decimal`)),10))),t},t.getRangeValue=()=>{let e="";return[...g].some(n=>{t.disableDirections.includes(n)||(e=t.getValue(n))}),e},t.onRangeChange=e=>{[...g].map(n=>{t.disableDirections.length>0&&t.disableDirections.includes(n)?t.onChange("",n):t.onChange(e,n)})},t.onChangeScreen=e=>{this.setState({screen:e})},t.onLinkInputs=e=>{e.preventDefault(),this.state.linkedInputs||[...g].map(e=>{t.disableDirections.length>0&&t.disableDirections.includes(e)?t.onChange("",e):t.onChange(t.getValue("Top"),e)}),this.setState({linkedInputs:!this.state.linkedInputs})},t.onChangeUnit=e=>{e.preventDefault();const t=p?200:0,n=e.target.getAttribute("data-unit"),r=this.getAttributeValue(f)||"px";this.setAttributeValue(f,n),setTimeout(()=>{n!==r&&[...g].map(e=>{const t=b+e,o=`${t}Decimal`;let i=t+m,a=o+m;"px"!==n&&(i=o+m),"px"===r&&(a=t+m,this.setAttributeValue(a,"")),this.setAttributeValue(i,this.getAttributeValue(a))})},t)},wp.element.createElement(c.BaseControl,{className:"qodef-input-control"},wp.element.createElement("div",{className:"qodef-control-heading"},r?wp.element.createElement("div",{className:"qodef-input-control-screens"},wp.element.createElement(qe,{label:n,onChangeScreen:t.onChangeScreen})):wp.element.createElement("label",{className:"qodef-option-label"},n),t.allowUnitControl&&wp.element.createElement(Ee,{unitType:t.unitType,unitValue:this.getAttributeValue(f),onChangeUnit:t.onChangeUnit}),t.allowLinkedControl&&wp.element.createElement(c.Button,{icon:this.state.linkedInputs?"editor-unlink":"admin-links",onClick:t.onLinkInputs,className:"qodef-link-inputs-button "+(this.state.linkedInputs?"linked":"unlinked")})),this.state.linkedInputs?wp.element.createElement(c.RangeControl,{min:i,max:h()?o:l,step:h()?a:u,onChange:t.onRangeChange,allowReset:!0,value:t.getRangeValue()}):wp.element.createElement("ul",null,[...g].map((n,r)=>wp.element.createElement("li",{className:"qodef-input-control-item",key:r},t.disableDirections.length>0&&t.disableDirections.includes(n)?wp.element.createElement("div",{className:"components-base-control__field"},wp.element.createElement("label",null,(0,e.__)(n,"qi-blocks")),wp.element.createElement("input",{className:"components-text-control__input",type:"text",disabled:!0,value:(0,e.__)("auto","qi-blocks")})):wp.element.createElement(c.TextControl,{type:"number",value:t.getValue(n),placeholder:t.getPlaceholderValue(n),onChange:e=>t.onChange(e,n),label:(0,e.__)(n,"qi-blocks"),min:y,max:h()?o:l,step:h()?a:u})))))}}Te.defaultProps={label:"",attrNameTemplate:"",attrName:"",blockAttributes:{},setAttributes:()=>{},unitType:"space",allowScreens:!0,allowNegativeValues:!1,disableDirections:[],allowUnitControl:!0,allowLinkedControl:!0,rangeMax:600,rangeMin:0,rangeStep:1,rangeDecimalMax:100,rangeDecimalMin:0,rangeDecimalStep:.01,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Oe=Te;class Pe extends u.Component{constructor(){super(...arguments),this.state={screen:E()}}getScreenLabelSuffix(){return re(this.state.screen)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterGetAttributes:a}=this.props;let l=e;t&&(l=e+t);let s=n[l];return r&&(s=a({key:i,childKey:l},o)),ce(s)}setAttributeValue(e,t,n=this.getScreenLabelSuffix()){const{setAttributes:r,setCustomEventOnChange:o,repeater:i,repeaterItemIndex:a,repeaterItemKey:l,repeaterSetAttributes:s}=this.props;let u=e;n&&(u=e+n),i?s({key:l,childKey:u},t,a):r({[u]:t}),o(t)}render(){const e={...this.props},{label:t,blockAttributeKey:n,selectOptions:r}=e;return e.onChangeScreen=e=>{this.setState({screen:e})},wp.element.createElement(c.BaseControl,{className:"qodef-advanced-select-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},wp.element.createElement(qe,{label:t,onChangeScreen:e.onChangeScreen})),wp.element.createElement(c.SelectControl,{value:this.getAttributeValue(n),options:r,onChange:e=>this.setAttributeValue(n,e)}))}}Pe.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},selectOptions:{},setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const De=Pe,Re=wp.blob;function Ne(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 Be(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,l=[],s=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(s=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ne(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)?Ne(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.")}()}const je=Object.entries,Ve=Object.setPrototypeOf,Me=Object.isFrozen,Le=Object.getPrototypeOf,Fe=Object.getOwnPropertyDescriptor;let Ue=Object.freeze,ze=Object.seal,He=Object.create,Ke="undefined"!=typeof Reflect&&Reflect,Ge=Ke.apply,We=Ke.construct;Ue||(Ue=function(e){return e}),ze||(ze=function(e){return e}),Ge||(Ge=function(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];return e.apply(t,r)}),We||(We=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];return new e(...n)});const $e=ft(Array.prototype.forEach),Ye=ft(Array.prototype.lastIndexOf),Xe=ft(Array.prototype.pop),Ze=ft(Array.prototype.push),Je=ft(Array.prototype.splice),Qe=Array.isArray,et=ft(String.prototype.toLowerCase),tt=ft(String.prototype.toString),nt=ft(String.prototype.match),rt=ft(String.prototype.replace),ot=ft(String.prototype.indexOf),it=ft(String.prototype.trim),at=ft(Number.prototype.toString),lt=ft(Boolean.prototype.toString),st="undefined"==typeof BigInt?null:ft(BigInt.prototype.toString),ut="undefined"==typeof Symbol?null:ft(Symbol.prototype.toString),ct=ft(Object.prototype.hasOwnProperty),pt=ft(Object.prototype.toString),dt=ft(RegExp.prototype.test),mt=(bt=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return We(bt,t)});var bt;function ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Ge(e,t,r)}}function gt(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:et;if(Ve&&Ve(e,null),!Qe(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(Me(t)||(t[r]=e),o=e)}e[o]=!0}return e}function ht(e){for(let t=0;t<e.length;t++){ct(e,t)||(e[t]=null)}return e}function yt(e){const t=He(null);for(const r of je(e)){var n=Be(r,2);const o=n[0],i=n[1];ct(e,o)&&(Qe(i)?t[o]=ht(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=yt(i):t[o]=i)}return t}function vt(e,t){for(;null!==e;){const n=Fe(e,t);if(n){if(n.get)return ft(n.get);if("function"==typeof n.value)return ft(n.value)}e=Le(e)}return function(){return null}}const kt=Ue(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),_t=Ue(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wt=Ue(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),St=Ue(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),At=Ue(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),It=Ue(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xt=Ue(["#text"]),Et=Ue(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ct=Ue(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),qt=Ue(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Tt=Ue(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ot=ze(/{{[\w\W]*|^[\w\W]*}}/g),Pt=ze(/<%[\w\W]*|^[\w\W]*%>/g),Dt=ze(/\${[\w\W]*/g),Rt=ze(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nt=ze(/^aria-[\-\w]+$/),Bt=ze(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jt=ze(/^(?:\w+script|data):/i),Vt=ze(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Mt=ze(/^html$/i),Lt=ze(/^[a-z][.\w]*(-[.\w]+)+$/i),Ft=ze(/<[/\w!]/g),Ut=ze(/<[/\w]/g),zt=ze(/<\/no(script|embed|frames)/i),Ht=ze(/\/>/i),Kt=1,Gt=3,Wt=7,$t=8,Yt=9,Xt=11,Zt=function(){return"undefined"==typeof window?null:window},Jt=function(e,t,n,r){return ct(e,t)&&Qe(e[t])?gt(r.base?yt(r.base):{},e[t],r.transform):n};var Qt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zt();const n=t=>e(t);if(n.version="3.4.10",n.removed=[],!t||!t.document||t.document.nodeType!==Yt||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,i=o.currentScript;t.DocumentFragment;const a=t.HTMLTemplateElement,l=t.Node,s=t.Element,u=t.NodeFilter,c=t.NamedNodeMap;void 0===c&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const p=t.DOMParser,d=t.trustedTypes,m=s.prototype,b=vt(m,"cloneNode"),f=vt(m,"remove"),g=vt(m,"nextSibling"),h=vt(m,"childNodes"),y=vt(m,"parentNode"),v=vt(m,"shadowRoot"),k=vt(m,"attributes"),_=l&&l.prototype?vt(l.prototype,"nodeType"):null,w=l&&l.prototype?vt(l.prototype,"nodeName"):null;if("function"==typeof a){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let S,A,I="",x=!1,E=0;const C=function(){if(E>0)throw mt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},q=function(e){C(),E++;try{return S.createHTML(e)}finally{E--}},T=function(){return x||(A=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(d,i),x=!0),A},O=r,P=O.implementation,D=O.createNodeIterator,R=O.createDocumentFragment,N=O.getElementsByTagName,B=o.importNode;let j={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof je&&"function"==typeof y&&P&&void 0!==P.createHTMLDocument;const V=Ot,M=Pt,L=Dt,F=Rt,U=Nt,z=jt,H=Vt,K=Lt;let G=Bt,W=null;const $=gt({},[...kt,..._t,...wt,...At,...xt]);let Y=null;const X=gt({},[...Et,...Ct,...qt,...Tt]);let Z=Object.seal(He(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),J=null,Q=null;const ee=Object.seal(He(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let te=!0,ne=!0,re=!1,oe=!0,ie=!1,ae=!0,le=!1,se=!1,ue=!1,ce=!1,pe=!1,de=!1,me=!0,be=!1;const fe="user-content-";let ge=!0,he=!1,ye={},ve=null;const ke=gt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let _e=null;const we=gt({},["audio","video","img","source","image","track"]);let Se=null;const Ae=gt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ie="http://www.w3.org/1998/Math/MathML",xe="http://www.w3.org/2000/svg",Ee="http://www.w3.org/1999/xhtml";let Ce=Ee,qe=!1,Te=null;const Oe=gt({},[Ie,xe,Ee],tt),Pe=Ue(["mi","mo","mn","ms","mtext"]);let De=gt({},Pe);const Re=Ue(["annotation-xml"]);let Ne=gt({},Re);const Be=gt({},["title","style","font","a","script"]);let Ve=null;const Me=["application/xhtml+xml","text/html"];let Le=null,Fe=null;const Ke=r.createElement("form"),Ge=function(e){return e instanceof RegExp||e instanceof Function},We=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Fe&&Fe===e)return;e&&"object"==typeof e||(e={}),e=yt(e),Ve=-1===Me.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Le="application/xhtml+xml"===Ve?tt:et,W=Jt(e,"ALLOWED_TAGS",$,{transform:Le}),Y=Jt(e,"ALLOWED_ATTR",X,{transform:Le}),Te=Jt(e,"ALLOWED_NAMESPACES",Oe,{transform:tt}),Se=Jt(e,"ADD_URI_SAFE_ATTR",Ae,{transform:Le,base:Ae}),_e=Jt(e,"ADD_DATA_URI_TAGS",we,{transform:Le,base:we}),ve=Jt(e,"FORBID_CONTENTS",ke,{transform:Le}),J=Jt(e,"FORBID_TAGS",yt({}),{transform:Le}),Q=Jt(e,"FORBID_ATTR",yt({}),{transform:Le}),ye=!!ct(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?yt(e.USE_PROFILES):e.USE_PROFILES),te=!1!==e.ALLOW_ARIA_ATTR,ne=!1!==e.ALLOW_DATA_ATTR,re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ie=e.SAFE_FOR_TEMPLATES||!1,ae=!1!==e.SAFE_FOR_XML,le=e.WHOLE_DOCUMENT||!1,ce=e.RETURN_DOM||!1,pe=e.RETURN_DOM_FRAGMENT||!1,de=e.RETURN_TRUSTED_TYPE||!1,ue=e.FORCE_BODY||!1,me=!1!==e.SANITIZE_DOM,be=e.SANITIZE_NAMED_PROPS||!1,ge=!1!==e.KEEP_CONTENT,he=e.IN_PLACE||!1,G=function(e){try{return dt(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Bt,Ce="string"==typeof e.NAMESPACE?e.NAMESPACE:Ee,De=ct(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?yt(e.MATHML_TEXT_INTEGRATION_POINTS):gt({},Pe),Ne=ct(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?yt(e.HTML_INTEGRATION_POINTS):gt({},Re);const t=ct(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?yt(e.CUSTOM_ELEMENT_HANDLING):He(null);if(Z=He(null),ct(t,"tagNameCheck")&&Ge(t.tagNameCheck)&&(Z.tagNameCheck=t.tagNameCheck),ct(t,"attributeNameCheck")&&Ge(t.attributeNameCheck)&&(Z.attributeNameCheck=t.attributeNameCheck),ct(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(Z.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),ze(Z),ie&&(ne=!1),pe&&(ce=!0),ye&&(W=gt({},xt),Y=He(null),!0===ye.html&&(gt(W,kt),gt(Y,Et)),!0===ye.svg&&(gt(W,_t),gt(Y,Ct),gt(Y,Tt)),!0===ye.svgFilters&&(gt(W,wt),gt(Y,Ct),gt(Y,Tt)),!0===ye.mathMl&&(gt(W,At),gt(Y,qt),gt(Y,Tt))),ee.tagCheck=null,ee.attributeCheck=null,ct(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?ee.tagCheck=e.ADD_TAGS:Qe(e.ADD_TAGS)&&(W===$&&(W=yt(W)),gt(W,e.ADD_TAGS,Le))),ct(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?ee.attributeCheck=e.ADD_ATTR:Qe(e.ADD_ATTR)&&(Y===X&&(Y=yt(Y)),gt(Y,e.ADD_ATTR,Le))),ct(e,"ADD_URI_SAFE_ATTR")&&Qe(e.ADD_URI_SAFE_ATTR)&>(Se,e.ADD_URI_SAFE_ATTR,Le),ct(e,"FORBID_CONTENTS")&&Qe(e.FORBID_CONTENTS)&&(ve===ke&&(ve=yt(ve)),gt(ve,e.FORBID_CONTENTS,Le)),ct(e,"ADD_FORBID_CONTENTS")&&Qe(e.ADD_FORBID_CONTENTS)&&(ve===ke&&(ve=yt(ve)),gt(ve,e.ADD_FORBID_CONTENTS,Le)),ge&&(W["#text"]=!0),le&>(W,["html","head","body"]),W.table&&(gt(W,["tbody"]),delete J.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw mt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw mt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=S;S=e.TRUSTED_TYPES_POLICY;try{I=q("")}catch(e){throw S=t,e}}else null===e.TRUSTED_TYPES_POLICY?(S=void 0,I=""):(void 0===S&&(S=T()),S&&"string"==typeof I&&(I=q("")));(j.uponSanitizeElement.length>0||j.uponSanitizeAttribute.length>0)&&W===$&&(W=yt(W)),j.uponSanitizeAttribute.length>0&&Y===X&&(Y=yt(Y)),Ue&&Ue(e),Fe=e},bt=gt({},[..._t,...wt,...St]),ft=gt({},[...At,...It]),ht=function(e){let t=y(e);t&&t.tagName||(t={namespaceURI:Ce,tagName:"template"});const n=et(e.tagName),r=et(t.tagName);return!!Te[e.namespaceURI]&&(e.namespaceURI===xe?function(e,t,n){return t.namespaceURI===Ee?"svg"===e:t.namespaceURI===Ie?"svg"===e&&("annotation-xml"===n||De[n]):Boolean(bt[e])}(n,t,r):e.namespaceURI===Ie?function(e,t,n){return t.namespaceURI===Ee?"math"===e:t.namespaceURI===xe?"math"===e&&Ne[n]:Boolean(ft[e])}(n,t,r):e.namespaceURI===Ee?function(e,t,n){return!(t.namespaceURI===xe&&!Ne[n])&&!(t.namespaceURI===Ie&&!De[n])&&!ft[e]&&(Be[e]||!bt[e])}(n,t,r):!("application/xhtml+xml"!==Ve||!Te[e.namespaceURI]))},Qt=function(e){Ze(n.removed,{element:e});try{y(e).removeChild(e)}catch(t){if(f(e),!y(e))throw mt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},en=function(e){const t=h(e);if(t){const e=[];$e(t,t=>{Ze(e,t)}),$e(e,e=>{try{f(e)}catch(e){}})}const n=k(e);if(n)for(let t=n.length-1;t>=0;--t){const r=n[t],o=r&&r.name;if("string"==typeof o)try{e.removeAttribute(o)}catch(e){}}},tn=function(e,t){try{Ze(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Ze(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ce||pe)try{Qt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},nn=function(e){const t=k(e);if(t)for(let n=t.length-1;n>=0;--n){const r=t[n],o=r&&r.name;if("string"==typeof o&&!Y[Le(o)])try{e.removeAttribute(o)}catch(e){}}},rn=function(e){let t=null,n=null;if(ue)e="<remove></remove>"+e;else{const t=nt(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ve&&Ce===Ee&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=S?q(e):e;if(Ce===Ee)try{t=(new p).parseFromString(o,Ve)}catch(e){}if(!t||!t.documentElement){t=P.createDocument(Ce,"template",null);try{t.documentElement.innerHTML=qe?I:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Ce===Ee?N.call(t,le?"html":"body")[0]:le?t.documentElement:i},on=function(e){return D.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},an=function(e){return e=rt(e,V," "),e=rt(e,M," "),e=rt(e,L," ")},ln=function(e){var t;e.normalize();const n=D.call(e.ownerDocument||e,e,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let r=n.nextNode();for(;r;)r.data=an(r.data),r=n.nextNode();const o=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");o&&$e(o,e=>{un(e.content)&&ln(e.content)})},sn=function(e){const t=w?w(e):null;return"string"==typeof t&&("form"===Le(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==k(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==_(e)||e.childNodes!==h(e)))},un=function(e){if(!_||"object"!=typeof e||null===e)return!1;try{return _(e)===Xt}catch(e){return!1}},cn=function(e){if(!_||"object"!=typeof e||null===e)return!1;try{return"number"==typeof _(e)}catch(e){return!1}};function pn(e,t,r){0!==e.length&&$e(e,e=>{e.call(n,t,r,Fe)})}const dn=function(e){if(pn(j.beforeSanitizeElements,e,null),sn(e))return Qt(e),!0;const t=Le(w?w(e):e.nodeName);if(pn(j.uponSanitizeElement,e,{tagName:t,allowedTags:W}),function(e,t){return!!(ae&&e.hasChildNodes()&&!cn(e.firstElementChild)&&dt(Ft,e.textContent)&&dt(Ft,e.innerHTML))||!(!ae||e.namespaceURI!==Ee||"style"!==t||!cn(e.firstElementChild))||e.nodeType===Wt||!(!ae||e.nodeType!==$t||!dt(Ut,e.data))}(e,t))return Qt(e),!0;if(J[t]||!(ee.tagCheck instanceof Function&&ee.tagCheck(t))&&!W[t])return function(e,t){if(!J[t]&&fn(t)){if(Z.tagNameCheck instanceof RegExp&&dt(Z.tagNameCheck,t))return!1;if(Z.tagNameCheck instanceof Function&&Z.tagNameCheck(t))return!1}if(ge&&!ve[t]){const t=y(e),n=h(e);if(n&&t)for(let r=n.length-1;r>=0;--r){const o=he?n[r]:b(n[r],!0);t.insertBefore(o,g(e))}}return Qt(e),!0}(e,t);if((_?_(e):e.nodeType)===Kt&&!ht(e))return Qt(e),!0;if(("noscript"===t||"noembed"===t||"noframes"===t)&&dt(zt,e.innerHTML))return Qt(e),!0;if(ie&&e.nodeType===Gt){const t=an(e.textContent);e.textContent!==t&&(Ze(n.removed,{element:e.cloneNode()}),e.textContent=t)}return pn(j.afterSanitizeElements,e,null),!1},mn=function(e,t,n){if(Q[t])return!1;if(me&&("id"===t||"name"===t)&&(n in r||n in Ke))return!1;const o=Y[t]||ee.attributeCheck instanceof Function&&ee.attributeCheck(t,e);if(ne&&dt(F,t));else if(te&&dt(U,t));else if(o)if(Se[t]);else if(dt(G,rt(n,H,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ot(n,"data:")||!_e[e]){if(re&&!dt(z,rt(n,H,"")));else if(n)return!1}else;else if(!(fn(e)&&(Z.tagNameCheck instanceof RegExp&&dt(Z.tagNameCheck,e)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(e))&&(Z.attributeNameCheck instanceof RegExp&&dt(Z.attributeNameCheck,t)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(t,e))||"is"===t&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&dt(Z.tagNameCheck,n)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(n))))return!1;return!0},bn=gt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),fn=function(e){return!bn[et(e)]&&dt(K,e)},gn=function(e,t,n,r){if(S&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!n)switch(d.getAttributeType(e,t)){case"TrustedHTML":return q(r);case"TrustedScriptURL":return function(e){C(),E++;try{return S.createScriptURL(e)}finally{E--}}(r)}return r},hn=function(e,t,r,o){try{r?e.setAttributeNS(r,t,o):e.setAttribute(t,o),sn(e)?Qt(e):Xe(n.removed)}catch(n){tn(t,e)}},yn=function(e){pn(j.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||sn(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let r=t.length;const o=Le(e.nodeName);for(;r--;){const i=t[r],a=i.name,l=i.namespaceURI,s=i.value,u=Le(a),c=s;let p="value"===a?c:it(c);n.attrName=u,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,pn(j.uponSanitizeAttribute,e,n),p=n.attrValue,!be||"id"!==u&&"name"!==u||0===ot(p,fe)||(tn(a,e),p=fe+p),ae&&dt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)?tn(a,e):"attributename"===u&&nt(p,"href")?tn(a,e):n.forceKeepAttr||(n.keepAttr&&(oe||!dt(Ht,p))?(ie&&(p=an(p)),mn(o,u,p)?(p=gn(o,u,l,p),p!==c&&hn(e,a,l,p)):tn(a,e)):tn(a,e))}pn(j.afterSanitizeAttributes,e,null)},vn=function(e){let t=null;const n=on(e);for(pn(j.beforeSanitizeShadowDOM,e,null);t=n.nextNode();){pn(j.uponSanitizeShadowNode,t,null),dn(t),yn(t),un(t.content)&&vn(t.content);if((_?_(t):t.nodeType)===Kt){const e=v(t);un(e)&&(kn(e),vn(e))}}pn(j.afterSanitizeShadowDOM,e,null)},kn=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){vn(e.shadow);continue}const n=e.node,r=(_?_(n):n.nodeType)===Kt,o=h(n);if(o)for(let e=o.length-1;e>=0;--e)t.push({node:o[e],shadow:null});if(r){const e=w?w(n):null;if("string"==typeof e&&"template"===Le(e)){const e=n.content;un(e)&&t.push({node:e,shadow:null})}}if(r){const e=v(n);un(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,a=null,l=null;if(qe=!e,qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!cn(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return at(e);case"boolean":return lt(e);case"bigint":return st?st(e):"0";case"symbol":return ut?ut(e):"Symbol()";case"undefined":default:return pt(e);case"function":case"object":{if(null===e)return pt(e);const t=e,n=vt(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:pt(e)}return pt(e)}}}(e)))throw mt("dirty is not a string, aborting");if(!n.isSupported)return e;se||We(t),n.removed=[];const s=he&&"string"!=typeof e&&cn(e);if(s){const t=w?w(e):e.nodeName;if("string"==typeof t){const e=Le(t);if(!W[e]||J[e])throw mt("root node is forbidden and cannot be sanitized in-place")}if(sn(e))throw mt("root node is clobbered and cannot be sanitized in-place");try{kn(e)}catch(t){throw en(e),t}}else if(cn(e))r=rn("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===Kt&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),kn(i);else{if(!ce&&!ie&&!le&&-1===e.indexOf("<"))return S&&de?q(e):e;if(r=rn(e),!r)return ce?null:de?I:""}r&&ue&&Qt(r.firstChild);const u=on(s?e:r);try{for(;a=u.nextNode();)dn(a),yn(a),un(a.content)&&vn(a.content)}catch(t){throw s&&en(e),t}if(s)return $e(n.removed,e=>{e.element&&function(e){const t=[e];for(;t.length>0;){const e=t.pop();(_?_(e):e.nodeType)===Kt&&nn(e);const n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}}(e.element)}),ie&&ln(e),e;if(ce){if(ie&&ln(r),pe)for(l=R.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(Y.shadowroot||Y.shadowrootmode)&&(l=B.call(o,l,!0)),l}let c=le?r.outerHTML:r.innerHTML;return le&&W["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&dt(Mt,r.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+c),ie&&(c=an(c)),S&&de?q(c):c},n.setConfig=function(){We(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),se=!0},n.clearConfig=function(){Fe=null,se=!1,S=A,I=""},n.isValidAttribute=function(e,t,n){Fe||We({});const r=Le(e),o=Le(t);return mn(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Ze(j[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=Ye(j[e],t);return-1===n?void 0:Je(j[e],n,1)[0]}return Xe(j[e])},n.removeHooks=function(e){j[e]=[]},n.removeAllHooks=function(){j={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();class en extends u.Component{constructor(){super(...arguments),this.state={screen:E(),imageId:"",externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return re(this.state.screen)}getAttributeValue(e=this.getScreenLabelSuffix()){const{blockAttributeKey:t,blockAttributes:n,allowScreens:r,repeater:o,repeaterItemIndex:i,repeaterItemKey:a,isSimpleRepeaterValue:l,repeaterGetAttributes:s}=this.props;let u=t;r&&e&&(u=t+e);let c=n[u];if(o){let n=l?null:t;r&&e&&(n=l?this.state.screen:u),c=s({key:a,childKey:n},i)||{}}return ce(c)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:n,allowScreens:r,repeater:o,repeaterItemIndex:i,repeaterItemKey:a,isSimpleRepeaterValue:l,repeaterSetAttributes:s}=this.props,u=this.getScreenLabelSuffix();let c=t;if(r&&u&&(c=t+u),o){let n=l?null:t;r&&u&&(n=l?this.state.screen:c),s({key:a,childKey:n},e,i)}else n({[c]:e})}componentDidMount(){const{allowScreens:e,allowDefaultImage:t}=this.props,{url:n,id:r,defaultValueIsSet:o}=this.getAttributeValue("");if(n&&!n.includes(qiBlocksEditor.vars.siteURL))this.onSelectURL(n),this.setState({externalImageIsSet:!0});else{r&&(this.setState({imageId:r}),this.updateImageSizeOption(r)),!t||o||n||r||(this.setAttributeValue({id:null,url:qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder,caption:"",width:1200,height:800,custom_image_size:"",html:""}),this.setState({defaultImageIsSet:!0}));const i=[""];e&&(i.push("Tablet"),i.push("Mobile")),i.map(e=>{const{url:t,id:n}=this.getAttributeValue(e);t&&(0,Re.isBlobURL)(t)&&!n&&this.setAttributeValue({url:"",alt:"",caption:"",width:"",height:"",html:""})})}}setSVGIcon=(e,t,n,r)=>{const o=new XMLHttpRequest;null!=o&&(o.open("GET",t,!0),o.onreadystatechange=()=>{4===o.readyState&&200===o.status&&this.setAttributeValue({id:e,url:t,alt:n,caption:r,html:Qt.sanitize(o.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},o.send())};onSelectImage=({id:e,url:t,alt:n,caption:r,width:o,height:i})=>{t.includes(".svg")?this.setSVGIcon(e,t,n,r):this.setAttributeValue({id:e,url:t,alt:n,caption:r,width:o,height:i}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){const t=setInterval(()=>{me(e)&&(clearInterval(t),this.forceUpdate())},1e3)}};onSelectURL=e=>{e.includes(".svg")?this.setSVGIcon(null,e,"",""):this.setAttributeValue({id:null,url:e,alt:"",caption:"",width:"",height:"",html:""}),this.setState({externalImageIsSet:!1})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeImage=()=>{this.setAttributeValue({id:null,url:"",alt:"",caption:"",width:"",height:"",html:"",defaultValueIsSet:!!this.props.allowDefaultImage})};onImageSizeChange=e=>{const{customImageSizes:t}=this.props,n=me(this.state.imageId);if(n){let r=e;t&&t.length>1&&(r=this.getImageURLbySize(e)||n.source_url),"custom"===e&&(r=n.source_url),this.setAttributeValue({id:n.id,url:r,alt:n.alt_text||"",caption:n.caption&&n.caption.raw||"",custom_image_size:e})}};getImageURLbySize(e){const t=this.getAttributeValue();let n="";if(t){const r=me(t.id);if(!r)return"";const o=r.media_details.sizes;if(o&&0===Object.keys(o).length)this.setState({imageSizeNotExist:!0});else{this.setState({imageSizeNotExist:!1});for(const t in o)if(t.includes("qi_blocks_image_size_"+e.replace("-","_"))){n=o[t].source_url;break}}["","custom"].includes(e)&&this.setState({imageSizeNotExist:!1})}return n}getImageSizes(){const{imageSizes:t,customImageSizes:n}=this.props,r=this.getAttributeValue();let o=[];if(r){const i=me(r.id);if(!i)return[];const a=i.media_details.sizes;if(a&&0===Object.keys(a).length&&o.push({label:(0,e.__)("Default","qi-blocks"),value:""}),n&&n.length>1)n.map(e=>{o.push({label:e.label,value:e.value})});else for(const e in a){const n=a[e],r=t.find(t=>t.slug===e);r&&o.push({label:r.name,value:n.source_url})}}return o}render(){const t={...this.props},n={...this.state},{label:r,help:o,noticeUI:i,allowedTypes:a,allowScreens:s,allowImageSizes:u}=t,p=this.getAttributeValue(),{id:d,url:m,alt:b,html:f}=p;t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(d)};let g=["qodef-image-option"];return m&&m.includes(".svg")&&g.push("qodef--svg"),wp.element.createElement(c.BaseControl,{className:g.join(" ")},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},s?wp.element.createElement(qe,{label:r,onChangeScreen:t.onChangeScreen}):wp.element.createElement(wp.element.Fragment,null,r&&wp.element.createElement("label",{className:"qodef-option-label"},r))),o&&wp.element.createElement("p",{className:"qodef-option-description"},o),m?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},(0,Re.isBlobURL)(m)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(c.Spinner,null)),wp.element.createElement(l.MediaUploadCheck,null,wp.element.createElement(l.MediaUpload,{allowedTypes:a,value:d,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:m,alt:b}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(c.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(c.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Image","qi-blocks"),onClick:this.removeImage})))}))),n.imageSizeNotExist&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("The Image has no predefined sizes, please set a custom image size.","qi-blocks")),n.externalImageIsSet&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("External image URL is set, please upload your image for this Element.","qi-blocks"))):wp.element.createElement(l.MediaPlaceholder,{allowedTypes:a,icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:i}),u&&d&&!f&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},wp.element.createElement(c.SelectControl,{label:(0,e.__)("Image Size","qi-blocks"),options:this.getImageSizes(),onChange:this.onImageSizeChange,value:void 0!==p.custom_image_size?p.custom_image_size:m})))}}en.defaultProps={label:(0,e.__)("Image","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},allowedTypes:["image"],allowScreens:!1,allowDefaultImage:!1,allowImageSizes:!1,customImageSizes:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!0,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const tn=(0,p.withSelect)(e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes}))((0,c.withNotices)(en));class nn extends u.Component{constructor(){super(...arguments),this.state={isPickerVisible:!1}}getAttributeValue(){const{defaultColor:e,blockAttributeKey:t,blockAttributes:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,isSimpleRepeaterValue:a,repeaterGetAttributes:l}=this.props;let s=n[t];return r&&(s=l({key:i,childKey:a?"":t},o)),s||e}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,isSimpleRepeaterValue:a,repeaterSetAttributes:l}=this.props;r?l({key:i,childKey:a?"":t},e,o):n({[t]:e})}onChange=e=>{const{r:t,g:n,b:r,a:o}=e.rgb;let i="rgba("+[t,n,r,o].join(",")+")";this.props.setHEXValue&&(i=e.hex),this.setState({colorReset:!0}),this.setAttributeValue(i)};onClick=e=>{e.preventDefault();const t=this;t.setState({isPickerVisible:!this.state.isPickerVisible}),window.addEventListener("click",e=>{const n=document.querySelectorAll(".qodef-color-option.qodef--opened");n.length&&n.forEach(n=>{n.contains(e.target)||t.setState({isPickerVisible:!1})})})};onResetColor=e=>{e.preventDefault(),this.setState({isPickerVisible:!this.state.isPickerVisible}),this.setAttributeValue("")};render(){const{label:t,popup:n}=this.props;return wp.element.createElement(c.BaseControl,{className:"qodef-color-option "+(this.state.isPickerVisible?"qodef--opened":"")},wp.element.createElement("div",{className:"qodef-control-heading"},t&&wp.element.createElement("label",{className:"qodef-option-label"},t),wp.element.createElement(c.Button,{onClick:this.onClick,className:"qodef-color-indicator-button"},wp.element.createElement(c.ColorIndicator,{colorValue:this.getAttributeValue(),className:"qodef-color-indicator"}))),this.state.isPickerVisible&&wp.element.createElement("div",{className:`qodef-color-picker-wrapper ${n&&"qodef--popup"}`},wp.element.createElement(c.ColorPicker,{color:this.getAttributeValue(),onChangeComplete:this.onChange,disableAlpha:this.props.setHEXValue}),wp.element.createElement(c.Button,{onClick:this.onResetColor,isSecondary:!0},(0,e.__)("Reset Color","qi-blocks"))))}}nn.defaultProps={label:(0,e.__)("Color","qi-blocks"),defaultColor:"#000",setHEXValue:!1,blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},popup:!0,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const rn=nn;class on extends u.Component{getAttributeValue(){const{blockAttributeKey:e,blockAttributes:t,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,repeaterGetAttributes:i}=this.props;let a=t[e];return n&&(a=i({key:o},r)||{}),ce(a)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:i,repeaterSetAttributes:a}=this.props;r?a({key:i},e,o):n({[t]:e})}componentDidMount(){const{url:e,id:t}=this.getAttributeValue();e&&(0,Re.isBlobURL)(e)&&!t&&this.setAttributeValue({url:"",alt:""})}onSelectVideo=({id:e,url:t,alt:n})=>{this.setAttributeValue({id:e,url:t,alt:n})};onSelectURL=e=>{this.setAttributeValue({id:null,url:e,alt:""})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeVideo=()=>{this.setAttributeValue({id:null,url:"",alt:""})};render(){const t={...this.props},{label:n,description:r,noticeUI:o}=t,{id:i,url:a}=this.getAttributeValue();return wp.element.createElement(c.BaseControl,{className:"qodef-video-option"},n&&wp.element.createElement("label",{className:"qodef-option-label"},n),r&&wp.element.createElement("p",{className:"qodef-option-description"},r),a?wp.element.createElement("div",{className:"qodef-video-option-inner"},(0,Re.isBlobURL)(a)&&wp.element.createElement("div",{className:"qodef-video-option-spinner"},wp.element.createElement(c.Spinner,null)),wp.element.createElement(l.MediaUploadCheck,null,wp.element.createElement(l.MediaUpload,{allowedTypes:["video"],value:i,onSelect:this.onSelectVideo,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("video",{src:a}),wp.element.createElement("div",{className:"qodef-video-option-actions"},wp.element.createElement(c.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Video","qi-blocks"),onClick:t}),wp.element.createElement(c.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Video","qi-blocks"),onClick:this.removeVideo})))}))):wp.element.createElement(l.MediaPlaceholder,{allowedTypes:["video"],icon:"format-video",onSelect:this.onSelectVideo,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:o}))}}on.defaultProps={label:(0,e.__)("Video","qi-blocks"),description:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const an=(0,c.withNotices)(on),ln=qiBlocksEditor.vars.defaultFontSize,sn=qiBlocksEditor.vars.defaultLineHeight,un=e=>{const{convertorType:t,value:n,attributeKey:r}=e;let o=1;r.includes("FontSize")||r.includes("fontSize")?o=ln:(r.includes("LineHeight")||r.includes("lineHeight"))&&(o=sn);const i=e=>Math.round(parseInt(e,10)/o*100)/100,a=e=>Math.round(parseInt(e,10)/o*100)/100,l=e=>Math.round(parseFloat(e)/o*100),s=e=>Math.round(100*parseInt(e,10)/window.innerWidth),u=e=>Math.round(100*parseInt(e,10)/window.innerHeight),c=e=>Math.round(parseFloat(e)*o),p=e=>Math.round(parseFloat(e)*o/100),d=e=>Math.round(window.innerWidth*parseInt(e,10)/100),m=e=>Math.round(window.innerHeight*parseInt(e,10)/100);let b="";if(""!==n&&""!==r&&""!==t)switch(t){case"pxToEm":b=i(n);break;case"pxToRem":b=a(n);break;case"pxToP":b=l(n);break;case"pxToVw":b=s(n);break;case"pxToVh":b=u(n);break;case"emToPx":b=c(n);break;case"emToRem":case"remToRem":case"vwToVh":case"vhToVw":b=n;break;case"emToP":case"remToP":b=(e=>100*parseFloat(e))(n);break;case"emToVw":case"remToVw":b=(e=>s(c(e)))(n);break;case"emToVh":case"remToVh":b=(e=>u(c(e)))(n);break;case"remToPx":b=(e=>Math.round(parseFloat(e)*o))(n);break;case"pToPx":b=p(n);break;case"pToEm":case"pToRem":b=(e=>parseFloat(e)/100)(n);break;case"pToVw":b=(e=>s(p(e)))(n);break;case"pToVh":b=(e=>u(p(e)))(n);break;case"vwToPx":b=d(n);break;case"vwToEm":b=(e=>i(d(e)))(n);break;case"vwToRem":b=(e=>a(d(e)))(n);break;case"vwToP":b=(e=>l(d(e)))(n);break;case"vhToPx":b=m(n);break;case"vhToEm":b=(e=>i(m(e)))(n);break;case"vhToRem":b=(e=>a(m(e)))(n);break;case"vhToP":b=(e=>l(m(e)))(n)}return b};un.defaultProps={convertorType:"pxToEm"};const cn=un;class pn extends u.Component{constructor(){super(...arguments),this.state={screen:E()}}getScreenLabelSuffix(e){const t=e||this.state.screen;return re(t)}getAttributeValue(e,t=""){const{blockAttributes:n,allowScreens:r,repeater:o,repeaterItemIndex:i,repeaterItemKey:a,repeaterGetAttributes:l}=this.props;let s=e;r&&t&&(s=e+t);let u=n[s];return o&&(u=l({key:a,childKey:s},i)),ce(u)}setAttributeValue(e,t,n=this.getScreenLabelSuffix()){const{setAttributes:r,allowScreens:o,repeater:i,repeaterItemIndex:a,repeaterItemKey:l,repeaterSetAttributes:s}=this.props;let u=e;o&&n&&(u=e+n),i?s({key:l,childKey:u},t,a):r({[u]:t})}onChangeUnitsValues(e,t,n,r){const o={...this.props},{rangeMax:i,rangeDecimalMax:a,allowUnitsConvertor:l}=o;let s=this.getAttributeValue(t);const u=s;r?(s=parseInt(s,10),s>i&&(s=i)):!r&&s>a&&(s=a),l?["emToRem","remToEm","vwToVh","vhToVw"].includes(n)||(this.setAttributeValue(e,cn({convertorType:n,value:u,attributeKey:t}),""),this.setAttributeValue(t,"","")):(this.setAttributeValue(e,s,""),this.setAttributeValue(t,"",""))}render(){const e={...this.props},{label:t,unitType:n,blockAttributeKey:r,rangeMax:o,rangeMin:i,rangeStep:a,rangeDecimalMax:l,rangeDecimalMin:s,rangeDecimalStep:u,optionType:p,allowReset:d,allowScreens:m,allowUnits:b,repeater:f,repeaterItemKey:g,isSimpleRepeaterValue:h}=e,y=this.getScreenLabelSuffix();let v=f&&!h?g:r;const k=`${v}Decimal`,_=`${v}Unit`,w=`${v}Tablet`,S=`${k}Tablet`,A=`${_}Tablet`,I=`${v}Mobile`,x=`${k}Mobile`,E=`${_}Mobile`;return e.onChangeScreen=e=>{this.setState({screen:e})},e.onChangeUnit=e=>{e.preventDefault();const t=f?200:0,n=e.target.getAttribute("data-unit"),r=this.getAttributeValue(_,y)||"px";this.setAttributeValue(_,n),setTimeout(()=>{if(n!==r){const e=`${r}To${ne(n)}`;let t=v+y,o=k+y;"px"!==n&&(t=k+y,o=v+y),this.onChangeUnitsValues(t,o,e,"px"===n)}},t)},e.onChange=t=>{this.setAttributeValue(v,t),e.setCustomEventOnChange()},e.onChangeDecimal=t=>{let n=0;"decimal"===p&&void 0===t&&(n=200),setTimeout(()=>{this.setAttributeValue(k,t),e.setCustomEventOnChange()},n)},e.getPlaceholderValue=e=>{let t="";const n=this.getAttributeValue(v),r=this.getAttributeValue(k),o=this.getAttributeValue(w),i=this.getAttributeValue(S);return"Tablet"===y?e&&""===o?t=n:e||""!==i||(t=r):"Mobile"===y&&(e&&""===this.getAttributeValue(I)?t=""!==o?o:n:e||""!==this.getAttributeValue(x)||(t=""!==i?i:r)),t},wp.element.createElement(c.BaseControl,{className:"qodef-advanced-range-option"},wp.element.createElement("div",{className:"qodef-advanced-range-heading"},m?wp.element.createElement(qe,{label:t,onChangeScreen:e.onChangeScreen}):wp.element.createElement("label",{className:"qodef-option-label"},t),b&&wp.element.createElement(Ee,{unitType:n,unitValue:this.getAttributeValue(_,y),onChangeUnit:e.onChangeUnit})),"desktop"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(ae(this.getAttributeValue(_))&&"decimal"!==p||!b&&"integer"===p)&&wp.element.createElement(c.RangeControl,{min:i,max:o,step:a,value:this.getAttributeValue(v),onChange:e.onChange,allowReset:d}),(le(this.getAttributeValue(_))||!b&&"decimal"===p)&&wp.element.createElement(c.RangeControl,{min:s,max:l,step:u,value:this.getAttributeValue(k),onChange:e.onChangeDecimal,allowReset:d})),"tablet"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(ae(this.getAttributeValue(A))&&"decimal"!==p||!b&&"integer"===p)&&wp.element.createElement(c.RangeControl,{min:i,max:o,step:a,value:this.getAttributeValue(w),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:d}),(le(this.getAttributeValue(A))||!b&&"decimal"===p)&&wp.element.createElement(c.RangeControl,{min:s,max:l,step:u,value:this.getAttributeValue(S),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:d})),"mobile"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(ae(this.getAttributeValue(E))&&"decimal"!==p||!b&&"integer"===p)&&wp.element.createElement(c.RangeControl,{min:i,max:o,step:a,value:this.getAttributeValue(I),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:d}),(le(this.getAttributeValue(E))||!b&&"decimal"===p)&&wp.element.createElement(c.RangeControl,{min:s,max:l,step:u,value:this.getAttributeValue(x),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:d})))}}pn.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),unitType:"typography",blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},rangeMax:300,rangeMin:0,rangeStep:1,rangeDecimalMax:10,rangeDecimalMin:0,rangeDecimalStep:.01,optionType:"integer",allowReset:!0,screens:I,allowScreens:!1,allowUnits:!0,allowUnitsConvertor:!1,setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const dn=pn,mn=t=>{const n={...t},{attrNameTemplate:r,attrName:o,blockAttributes:i,setAttributes:a,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d,previewScreen:m}=n,b=o||"Background",f=e=>te(r,b+e);n.getAttributeValue=(e,t="")=>{let n=e;t&&(n=e+t);let r=i[n];return l&&(r=d({key:u,childKey:n},s)),ce(r)},n.setAttributeValue=(e,t,n="")=>{let r=e;n&&(r=e+n),l?p({key:u,childKey:r},t,s):a({[r]:t})};let g=re(m||E());return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(tn,{label:(0,e.__)(`${b} Image`,"qi-blocks"),blockAttributeKey:f("Image"),blockAttributes:i,setAttributes:a,allowScreens:!0,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,isSimpleRepeaterValue:!1,repeaterSetAttributes:p,repeaterGetAttributes:d}),n.getAttributeValue(f("Image"))&&n.getAttributeValue(f("Image")).url&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(De,{label:(0,e.__)(`${b} Position`,"qi-blocks"),blockAttributeKey:f("Position"),blockAttributes:i,setAttributes:a,selectOptions:pe("background_position",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),(""===g&&"custom"===n.getAttributeValue(f("Position"))||""!==g&&"custom"===n.getAttributeValue(f("Position"),g)||""!==g&&"custom"===n.getAttributeValue(f("Position"))&&["","custom"].includes(n.getAttributeValue(f("Position"),"Tablet"))&&""===n.getAttributeValue(f("Position"),g))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(dn,{label:(0,e.__)("X Position","qi-blocks"),blockAttributeKey:f("XPosition"),setAttributes:a,blockAttributes:i,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"xPosition",allowScreens:!0,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),wp.element.createElement(dn,{label:(0,e.__)("Y Position","qi-blocks"),blockAttributeKey:f("YPosition"),setAttributes:a,blockAttributes:i,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"yPosition",allowScreens:!0,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d})),wp.element.createElement(c.SelectControl,{label:(0,e.__)(`${b} Attachment`,"qi-blocks"),value:n.getAttributeValue(f("Attachment")),options:pe("background_attachment")||"",onChange:e=>n.setAttributeValue(f("Attachment"),e)}),wp.element.createElement(De,{label:(0,e.__)(`${b} Repeat`,"qi-blocks"),blockAttributeKey:f("Repeat"),blockAttributes:i,setAttributes:a,selectOptions:pe("background_repeat"),repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),wp.element.createElement(De,{label:(0,e.__)(`${b} Size`,"qi-blocks"),blockAttributeKey:f("Size"),blockAttributes:i,setAttributes:a,selectOptions:pe("background_size",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),"custom"===n.getAttributeValue(f("Size"),g)&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(dn,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:f("SizeWidth"),setAttributes:a,blockAttributes:i,rangeMax:1e3,rangeMin:0,rangeDecimalMax:100,rangeDecimalMin:0,unitType:"xPosition",allowScreens:!0,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}))))};mn.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const bn=mn,fn=t=>{const n={...t},{attrNameTemplate:r,blockAttributes:o,setAttributes:i,includeVideoBG:a,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d,previewScreen:m}=n,b=e=>te(r,e);n.getAttributeValue=(e,t="")=>{let n=o[e];if(l){let r=e;t&&(r=e+t),n=d({key:u,childKey:r},s)}return ce(n)},n.setAttributeValue=(e,t,n="")=>{if(l){let r=e;n&&(r=e+n),p({key:u,childKey:r},t,s)}else i({[e+n]:t})};const f=[{label:(0,e.__)("Classic","qi-blocks"),value:""},{label:(0,e.__)("Gradient","qi-blocks"),value:"gradient"}];return a&&f.push({label:(0,e.__)("Video","qi-blocks"),value:"video"}),wp.element.createElement("div",{className:"qodef-background-panel"},wp.element.createElement(c.SelectControl,{label:(0,e.__)("Background Type","qi-blocks"),value:n.getAttributeValue(b("BackgroundType")),options:f,onChange:e=>n.setAttributeValue(b("BackgroundType"),e)}),""===n.getAttributeValue(b("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(rn,{label:(0,e.__)("Background Color","qi-blocks"),blockAttributeKey:b("BackgroundColor"),blockAttributes:o,setAttributes:i,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),wp.element.createElement(bn,{attrNameTemplate:r,blockAttributes:o,setAttributes:i,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d,previewScreen:m})),"gradient"===n.getAttributeValue(b("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(rn,{label:(0,e.__)("First Color","qi-blocks"),blockAttributeKey:b("BackgroundGradientColor1"),blockAttributes:o,setAttributes:i,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:n.getAttributeValue(b("BackgroundGradientLocation1")),onChange:e=>n.setAttributeValue(b("BackgroundGradientLocation1"),e),min:0,max:100,step:1}),wp.element.createElement(rn,{label:(0,e.__)("Second Color","qi-blocks"),blockAttributeKey:b("BackgroundGradientColor2"),blockAttributes:o,setAttributes:i,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:n.getAttributeValue(b("BackgroundGradientLocation2")),onChange:e=>n.setAttributeValue(b("BackgroundGradientLocation2"),e),min:0,max:100,step:1}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Gradient Type","qi-blocks"),value:n.getAttributeValue(b("BackgroundGradientType")),options:[{label:(0,e.__)("Linear","qi-blocks"),value:"linear"},{label:(0,e.__)("Radial","qi-blocks"),value:"radial"}],onChange:e=>n.setAttributeValue(b("BackgroundGradientType"),e)}),"linear"===n.getAttributeValue(b("BackgroundGradientType"))&&wp.element.createElement(c.RangeControl,{label:(0,e.__)("Angle","qi-blocks"),value:n.getAttributeValue(b("BackgroundGradientTypeAngle")),onChange:e=>n.setAttributeValue(b("BackgroundGradientTypeAngle"),e),min:0,max:360,step:1}),"radial"===n.getAttributeValue(b("BackgroundGradientType"))&&wp.element.createElement(c.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:n.getAttributeValue(b("BackgroundGradientTypePosition")),options:pe("background_position",!1),onChange:e=>n.setAttributeValue(b("BackgroundGradientTypePosition"),e)})),"video"===n.getAttributeValue(b("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(an,{label:(0,e.__)("Video Link","qi-blocks"),description:(0,e.__)("Self hosted video file (mp4 is recommended)","qi-blocks"),blockAttributeKey:b("BackgroundVideoLink"),blockAttributes:o,setAttributes:i,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),wp.element.createElement(c.TextControl,{type:"number",label:(0,e.__)("Start Time","qi-blocks"),help:(0,e.__)("Specify a start time (in seconds)","qi-blocks"),value:n.getAttributeValue(b("BackgroundVideoStartTime")),onChange:e=>n.setAttributeValue(b("BackgroundVideoStartTime"),se(e))}),wp.element.createElement(c.TextControl,{type:"number",label:(0,e.__)("End Time","qi-blocks"),help:(0,e.__)("Specify an end time (in seconds)","qi-blocks"),value:n.getAttributeValue(b("BackgroundVideoEndTime")),onChange:e=>n.setAttributeValue(b("BackgroundVideoEndTime"),se(e))}),wp.element.createElement(P,{label:(0,e.__)("Play Once","qi-blocks"),blockAttributeKey:b("BackgroundVideoPlayOnce"),blockAttributes:o,setAttributes:i,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),wp.element.createElement(P,{label:(0,e.__)("Play On Mobile","qi-blocks"),blockAttributeKey:b("BackgroundVideoPlayOnMobile"),blockAttributes:o,setAttributes:i,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),wp.element.createElement(tn,{label:(0,e.__)("Background Fallback","qi-blocks"),blockAttributeKey:b("BackgroundVideoFallbackImage"),blockAttributes:o,setAttributes:i,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d})))};fn.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},includeVideoBG:!1,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const gn=fn,hn=t=>{const n={...t},{attrNameTemplate:r,blockAttributes:o,setAttributes:i,disableWidthDirections:a,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}=n,m=e=>te(r,e);return n.getAttributeValue=(e,t="")=>{let n=o[e];if(l){let r=e;t&&(r=e+t),n=d({key:u,childKey:r},s)}return ce(n)},n.setAttributeValue=(e,t,n="")=>{if(l){let r=e;n&&(r=e+n),p({key:u,childKey:r},t,s)}else i({[e+n]:t})},wp.element.createElement("div",{className:"qodef-border-panel"},wp.element.createElement(c.SelectControl,{label:(0,e.__)("Border Type","qi-blocks"),value:n.getAttributeValue(m("BorderStyle")),options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("None","qi-blocks"),value:"none"},{label:(0,e.__)("Double","qi-blocks"),value:"double"},{label:(0,e.__)("Groove","qi-blocks"),value:"groove"},...pe("border_style",!1)],onChange:e=>n.setAttributeValue(m("BorderStyle"),e)}),!["","none"].includes(o[m("BorderStyle")])&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Oe,{label:(0,e.__)("Border Width","qi-blocks"),attrName:m("BorderWidth"),blockAttributes:o,setAttributes:i,allowUnitControl:!1,disableDirections:a,rangeMax:20,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}),(n.allowBorderColor??!0)&&wp.element.createElement(rn,{label:(0,e.__)("Border Color","qi-blocks"),blockAttributeKey:m("BorderColor"),blockAttributes:o,setAttributes:i,repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d})),(n.allowBorderRadius??!0)&&wp.element.createElement(Oe,{label:(0,e.__)("Border Radius","qi-blocks"),attrName:m("BorderRadius"),blockAttributes:o,setAttributes:i,unitType:"pxAndPercent",repeater:l,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:p,repeaterGetAttributes:d}))};hn.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowBorderColor:!0,allowBorderRadius:!0,disableWidthDirections:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const yn=hn,vn=t=>{const n={...t},{attrNameTemplate:r,blockAttributes:o,setAttributes:i,excludeOptions:a}=n,l=e=>te(r,e),[s,p]=(0,u.useState)(!1);let d=["qodef-box-shadow-panel"];return n.popup&&d.push("qodef--has-popup"),s&&d.push("qodef--opened"),n.onClick=()=>{p(e=>!e),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-box-shadow-panel.qodef--opened");t.length&&t.forEach(t=>{t.contains(e.target)||p(!1)})})},wp.element.createElement("div",{className:d.join(" ")},wp.element.createElement("div",{className:"qodef-box-shadow-panel-heading"},n.label&&wp.element.createElement("label",{className:"qodef-option-label"},n.label),n.popup&&wp.element.createElement(c.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Open Panel","qi-blocks"),onClick:n.onClick})),wp.element.createElement("div",{className:"qodef-box-shadow-panel-content"},wp.element.createElement(rn,{label:(0,e.__)("Color","qi-blocks"),blockAttributeKey:l("BoxShadowColor"),blockAttributes:o,setAttributes:i,popup:!1}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Horizontal","qi-blocks"),value:o[l("BoxShadowHorizontal")],onChange:e=>i({[l("BoxShadowHorizontal")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Vertical","qi-blocks"),value:o[l("BoxShadowVertical")],onChange:e=>i({[l("BoxShadowVertical")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Blur","qi-blocks"),value:o[l("BoxShadowBlur")],onChange:e=>i({[l("BoxShadowBlur")]:e}),min:0,max:100,step:1,allowReset:!0}),wp.element.createElement(c.RangeControl,{label:(0,e.__)("Spread","qi-blocks"),value:o[l("BoxShadowSpread")],onChange:e=>i({[l("BoxShadowSpread")]:e}),min:-100,max:100,step:1,allowReset:!0}),(m="position",!(a&&a.length&&a.includes(m))&&wp.element.createElement(c.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:o[l("BoxShadowPosition")],options:[{label:(0,e.__)("Outline","qi-blocks"),value:""},{label:(0,e.__)("Inset","qi-blocks"),value:"inset"}],onChange:e=>i({[l("BoxShadowPosition")]:e})}))));var m};vn.defaultProps={label:(0,e.__)("Box Shadow","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeOptions:[],popup:!1};const kn=vn;class _n extends u.Component{render(){const{blockAttributes:t,setAttributes:n,excludePanels:r,previewScreen:o,blockName:i}=this.props,a=(e,t="")=>te("",e,t),l=Z();r&&r.length&&r.forEach(e=>{l.splice(l.indexOf(e),1)});let s=re(o);return wp.element.createElement("div",{className:"qodef-advanced-panel"},l.includes("advanced")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Advanced","qi-blocks")},wp.element.createElement(Oe,{label:(0,e.__)("Margin","qi-blocks"),attrName:a("Margin"),blockAttributes:t,setAttributes:n}),wp.element.createElement(Oe,{label:(0,e.__)("Padding","qi-blocks"),attrName:a("Padding"),blockAttributes:t,setAttributes:n}),wp.element.createElement(c.TextControl,{type:"number",label:(0,e.__)("Z-Index","qi-blocks"),value:t[a("zIndex")],onChange:e=>n({[a("zIndex")]:se(e)})}),wp.element.createElement(c.TextControl,{label:(0,e.__)("CSS ID","qi-blocks"),value:t[a("cssId")],onChange:e=>n({[a("cssId")]:e})}),wp.element.createElement(c.TextControl,{label:(0,e.__)("CSS Classes","qi-blocks"),value:t[a("cssClasses")],onChange:e=>n({[a("cssClasses")]:e})})),l.includes("motion-effects")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Motion Effects","qi-blocks"),initialOpen:!1},wp.element.createElement(c.SelectControl,{label:(0,e.__)("Entrance Animation","qi-blocks"),value:t[a("EntranceAnimation")],options:[{label:(0,e.__)("None","qi-blocks"),value:""},{label:(0,e.__)("Back In Down","qi-blocks"),value:"backInDown"},{label:(0,e.__)("Back In Left","qi-blocks"),value:"backInLeft"},{label:(0,e.__)("Back In Right","qi-blocks"),value:"backInRight"},{label:(0,e.__)("Back In Up","qi-blocks"),value:"backInUp"},{label:(0,e.__)("Bounce","qi-blocks"),value:"bounce"},{label:(0,e.__)("Bounce In","qi-blocks"),value:"bounceIn"},{label:(0,e.__)("Bounce In Down","qi-blocks"),value:"bounceInDown"},{label:(0,e.__)("Bounce In Left","qi-blocks"),value:"bounceInLeft"},{label:(0,e.__)("Bounce In Right","qi-blocks"),value:"bounceInRight"},{label:(0,e.__)("Bounce In Up","qi-blocks"),value:"bounceInUp"},{label:(0,e.__)("Fade In","qi-blocks"),value:"fadeIn"},{label:(0,e.__)("Fade In Down","qi-blocks"),value:"fadeInDown"},{label:(0,e.__)("Fade In Down Big","qi-blocks"),value:"fadeInDownBig"},{label:(0,e.__)("Fade In Left","qi-blocks"),value:"fadeInLeft"},{label:(0,e.__)("Fade In Left Big","qi-blocks"),value:"fadeInLeftBig"},{label:(0,e.__)("Fade In Right","qi-blocks"),value:"fadeInRight"},{label:(0,e.__)("Fade In Right Big","qi-blocks"),value:"fadeInRightBig"},{label:(0,e.__)("Fade In Up","qi-blocks"),value:"fadeInUp"},{label:(0,e.__)("Fade In Up Big","qi-blocks"),value:"fadeInUpBig"},{label:(0,e.__)("Fade In Top Left","qi-blocks"),value:"fadeInTopLeft"},{label:(0,e.__)("Fade In Top Right","qi-blocks"),value:"fadeInTopRight"},{label:(0,e.__)("Fade In Bottom Left","qi-blocks"),value:"fadeInBottomLeft"},{label:(0,e.__)("Fade In Bottom Right","qi-blocks"),value:"fadeInBottomRight"},{label:(0,e.__)("Flash","qi-blocks"),value:"flash"},{label:(0,e.__)("Flip","qi-blocks"),value:"flip"},{label:(0,e.__)("Flip In X","qi-blocks"),value:"flipInX"},{label:(0,e.__)("Flip In Y","qi-blocks"),value:"flipInY"},{label:(0,e.__)("Head Shake","qi-blocks"),value:"headShake"},{label:(0,e.__)("Heart Beat","qi-blocks"),value:"heartBeat"},{label:(0,e.__)("Jack In The Box","qi-blocks"),value:"jackInTheBox"},{label:(0,e.__)("Jello","qi-blocks"),value:"jello"},{label:(0,e.__)("Light Speed In Right","qi-blocks"),value:"lightSpeedInRight"},{label:(0,e.__)("Light Speed In Left","qi-blocks"),value:"lightSpeedInLeft"},{label:(0,e.__)("Pulse","qi-blocks"),value:"pulse"},{label:(0,e.__)("Roll In","qi-blocks"),value:"rollIn"},{label:(0,e.__)("Rotate In","qi-blocks"),value:"rotateIn"},{label:(0,e.__)("Rotate In Down Left","qi-blocks"),value:"rotateInDownLeft"},{label:(0,e.__)("Rotate In Down Right","qi-blocks"),value:"rotateInDownRight"},{label:(0,e.__)("Rotate In Up Left","qi-blocks"),value:"rotateInUpLeft"},{label:(0,e.__)("Rotate In Up Right","qi-blocks"),value:"rotateInUpRight"},{label:(0,e.__)("Rubber Band","qi-blocks"),value:"rubberBand"},{label:(0,e.__)("Shake X","qi-blocks"),value:"shakeX"},{label:(0,e.__)("Shake Y","qi-blocks"),value:"shakeY"},{label:(0,e.__)("Slide In Down","qi-blocks"),value:"slideInDown"},{label:(0,e.__)("Slide In Left","qi-blocks"),value:"slideInLeft"},{label:(0,e.__)("Slide In Right","qi-blocks"),value:"slideInRight"},{label:(0,e.__)("Slide In Up","qi-blocks"),value:"slideInUp"},{label:(0,e.__)("Swing","qi-blocks"),value:"swing"},{label:(0,e.__)("Tada","qi-blocks"),value:"tada"},{label:(0,e.__)("Wobble","qi-blocks"),value:"wobble"},{label:(0,e.__)("Zoom In","qi-blocks"),value:"zoomIn"},{label:(0,e.__)("Zoom In Down","qi-blocks"),value:"zoomInDown"},{label:(0,e.__)("Zoom In Left","qi-blocks"),value:"zoomInLeft"},{label:(0,e.__)("Zoom In Right","qi-blocks"),value:"zoomInRight"},{label:(0,e.__)("Zoom In Up","qi-blocks"),value:"zoomInUp"}],onChange:e=>{n({[a("EntranceAnimation")]:e}),setTimeout(()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)},300)}}),void 0!==t[a("EntranceAnimation")]&&""!==t[a("EntranceAnimation")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(c.SelectControl,{label:(0,e.__)("Animation Duration","qi-blocks"),value:t[a("EntranceAnimationDuration")],options:[{label:(0,e.__)("Slower","qi-blocks"),value:"slower"},{label:(0,e.__)("Slow","qi-blocks"),value:"slow"},{label:(0,e.__)("Normal","qi-blocks"),value:"normal"},{label:(0,e.__)("Fast","qi-blocks"),value:"fast"},{label:(0,e.__)("Faster","qi-blocks"),value:"faster"}],onChange:e=>{n({[a("EntranceAnimationDuration")]:e}),setTimeout(()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)},300)}}),wp.element.createElement(c.TextControl,{type:"number",label:(0,e.__)("Animation Delay (ms)","qi-blocks"),value:t[a("EntranceAnimationDelay")],min:0,step:100,onChange:e=>{n({[a("EntranceAnimationDelay")]:se(e)}),qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass,!0)}}))),l.includes("background")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Background","qi-blocks"),initialOpen:!1},wp.element.createElement(gn,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:n,previewScreen:o})),l.includes("border")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Border","qi-blocks"),initialOpen:!1},wp.element.createElement(yn,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:n}),wp.element.createElement(kn,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:n,popup:!0})),l.includes("positioning")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Positioning","qi-blocks"),initialOpen:!1},wp.element.createElement(De,{label:(0,e.__)("Width","qi-blocks"),blockAttributeKey:a("BlockWidth"),blockAttributes:t,setAttributes:n,selectOptions:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Full Width (100%)","qi-blocks"),value:"full-width"},{label:(0,e.__)("Inline (auto)","qi-blocks"),value:"inline"},{label:(0,e.__)("Custom","qi-blocks"),value:"custom"}]}),(""===s&&"custom"===t[a("BlockWidth")]||""!==s&&"custom"===t[a("BlockWidth",s)]||""!==s&&"custom"===t[a("BlockWidth")]&&["","custom"].includes(t[a("BlockWidth","Tablet")])&&""===t[a("BlockWidth",s)])&&wp.element.createElement(dn,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:a("BlockCustomWidth"),setAttributes:n,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:t[a("BlockPosition")],options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Absolute","qi-blocks"),value:"absolute"},{label:(0,e.__)("Relative","qi-blocks"),value:"relative"},{label:(0,e.__)("Fixed","qi-blocks"),value:"fixed"}],onChange:e=>{n({[a("BlockPosition")]:e})}}),""!==t[a("BlockPosition")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(c.SelectControl,{label:(0,e.__)("Horizontal Orientation","qi-blocks"),value:t[a("PositionHorizontalOrientation")],options:[{label:(0,e.__)("Left","qi-blocks"),value:"left"},{label:(0,e.__)("Right","qi-blocks"),value:"right"}],onChange:e=>n({[a("PositionHorizontalOrientation")]:e})}),wp.element.createElement(dn,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:a("PositionHorizontalOffset"),setAttributes:n,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Vertical Orientation","qi-blocks"),value:t[a("PositionVerticalOrientation")],options:[{label:(0,e.__)("Top","qi-blocks"),value:"Top"},{label:(0,e.__)("Bottom","qi-blocks"),value:"bottom"}],onChange:e=>n({[a("PositionVerticalOrientation")]:e})}),wp.element.createElement(dn,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:a("PositionVerticalOffset"),setAttributes:n,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}))),l.includes("responsive")&&wp.element.createElement(c.PanelBody,{title:(0,e.__)("Responsive","qi-blocks"),initialOpen:!1},wp.element.createElement(R,{blockAttributes:t,setAttributes:n})),qiBlocksEditor.vars?.advancedBlockPanel&&wp.element.createElement(wp.element.Fragment,null,Object.entries(qiBlocksEditor.vars.advancedBlockPanel).map(([t,n],r)=>{let o="";if("help"===t?o=(0,e.__)("Help","qi-blocks"):"features"===t&&(o=(0,e.__)("Get more features","qi-blocks")),n.length<=0||"blocks"===t)return"";const a="help"===t,l=i?i.replace("qi-blocks/",""):"",s=n.map((n,r)=>{let o=n?.link;if(0===r&&"help"===t&&l){const e=qiBlocksEditor.vars.advancedBlockPanel?.blocks[l]||"";e&&e?.demo&&(o=e?.demo+"?utm_source=dash&utm_medium=qiblocks&utm_campaign=blocks")}return wp.element.createElement("div",{className:"qodef-m-item"},n?.image?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("a",{className:"qodef-m-item-image-link",href:n?.link,target:"_blank",rel:"noreferrer"},wp.element.createElement("img",{className:"qodef-m-item-image",src:n.image,alt:n?.title})),wp.element.createElement("p",{className:"qodef-m-item-title"},n?.title),wp.element.createElement("a",{className:"qodef-m-item-button",href:n?.link,target:"_blank",rel:"noreferrer"},(0,e.__)("Upgrade","qi-blocks"))):wp.element.createElement("a",{className:"qodef-m-item-link",href:o,target:"_blank",rel:"noreferrer"},n?.title))});return wp.element.createElement(c.PanelBody,{title:o,className:`qodef-advanced-block-panel-features ${"qodef--"+t} qodef-m`,key:r,initialOpen:a},s)})))}}_n.defaultProps={blockAttributes:{},setAttributes:()=>{},excludePanels:[],previewScreen:"desktop",blockName:""};const wn=(0,p.withSelect)(e=>{let t="desktop";return e("core/edit-post")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post")?.__experimentalGetPreviewDeviceType()?.toLowerCase()),e("core/edit-site")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:t,blockName:e("core/block-editor")?.getSelectedBlock()?.name}})(_n);var Sn=n(2243),An=n.n(Sn);let In=[];const xn=qiBlocksEditor.vars.systemFontOptions,En=e=>{let t=!0;return e||(t=!1),xn&&xn.map(({value:e})=>e).forEach(n=>{""!==n&&e===n&&(t=!1)}),t},Cn=e=>{if(qiBlocksEditor.qodefGetCurrentBlockElement.getIframe()&&(In=[]),In.includes(e))return;const t=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument();if(t&&En(e)){const n=t.createElement("link");n.setAttribute("href",(e=>`https://fonts.googleapis.com/css?family=${e.replace(/ /g,"+")}:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic&subset=latin-ext`)(e)),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),t.querySelector("head").appendChild(n)}In.push(e)},qn=qiBlocksEditor.vars.fontOptions,Tn=e=>{const t=e.trim().toLowerCase(),n=t.length;return 0===n?[]:qn.filter(e=>!["System","Google"].includes(e.value)&&e.label.toLowerCase().slice(0,n)===t)},On=e=>e.value,Pn=e=>wp.element.createElement("div",{className:"qodef-font-family-autosuggest-option","data-label":e.value},e.label);class Dn extends u.Component{constructor(){super(...arguments),this.state={value:this.props.blockAttributes[this.props.blockAttributeKey]||"",suggestions:[]}}onChange=(e,{newValue:t})=>{let n=t;["System","Google"].includes(n)||(qn.some(e=>e.value.toLowerCase()===n.toLowerCase()&&(n=e.value,Cn(n),!0)),this.props.setAttributes({[this.props.blockAttributeKey]:n}),this.setState({value:n}))};onSuggestionsFetchRequested=({value:e})=>{this.setState({suggestions:""===e?qn:Tn(e)})};onSuggestionsClearRequested=()=>{this.setState({suggestions:[]})};shouldRenderSuggestions(){return!0}componentDidMount(){void 0!==this.props.blockAttributes[this.props.blockAttributeKey]&&this.setState({value:this.props.blockAttributes[this.props.blockAttributeKey]||"",suggestions:qn})}render(){const{label:e}=this.props,{value:t,suggestions:n}=this.state,r={value:t,type:"search",onChange:this.onChange};return wp.element.createElement(c.BaseControl,{className:"qodef-font-family-option"},wp.element.createElement("label",{className:"qodef-option-label"},e),wp.element.createElement("div",{className:"qodef-font-family-autosuggest"},wp.element.createElement(An(),{suggestions:n,onSuggestionsFetchRequested:this.onSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested,shouldRenderSuggestions:this.shouldRenderSuggestions,getSuggestionValue:On,renderSuggestion:Pn,inputProps:r})))}}Dn.defaultProps={label:(0,e.__)("Font Family","qi-blocks"),blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{}};const Rn=Dn,Nn=t=>{const n={...t},{attrNameTemplate:r,blockAttributes:o,setAttributes:i,popup:a,repeater:l,repeaterItemIndex:s,repeaterItemKey:p,repeaterSetAttributes:d,repeaterGetAttributes:m,allowReset:b}=n,[f,g]=(0,u.useState)(!1);let h=["qodef-typography-panel"];a?h.push("qodef--has-popup"):h.push("qodef-base-section-label"),f&&h.push("qodef--opened"),n.onClick=()=>{g(e=>!e),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-typography-panel.qodef--opened");t.length&&t.forEach(t=>{t.contains(e.target)||g(!1)})})};const y=e=>te(r,e);return n.getAttributeValue=e=>{let t=o[e];return l&&(t=m({key:p,childKey:e},s)),ce(t)},n.setAttributeValue=(e,t)=>{l?d({key:p,childKey:e},t,s):i({[e]:t})},wp.element.createElement(c.BaseControl,{label:a?"":n.label,className:h.join(" ")},a&&wp.element.createElement("div",{className:"qodef-typography-panel-heading"},wp.element.createElement("label",{className:"qodef-option-label"},n.label),wp.element.createElement(c.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Open Typography","qi-blocks"),onClick:n.onClick})),wp.element.createElement("div",{className:"qodef-typography-panel-content"},wp.element.createElement(Rn,{setAttributes:i,blockAttributes:o,blockAttributeKey:y("FontFamily"),repeater:l,repeaterItemIndex:s,repeaterItemKey:p,repeaterSetAttributes:d,repeaterGetAttributes:m}),wp.element.createElement(dn,{label:(0,e.__)("Font Size","qi-blocks"),blockAttributeKey:y("FontSize"),setAttributes:i,blockAttributes:o,rangeDecimalMax:20,allowScreens:!0,allowUnitsConvertor:!0,repeater:l,repeaterItemIndex:s,repeaterItemKey:p,isSimpleRepeaterValue:!0,repeaterSetAttributes:d,repeaterGetAttributes:m,allowReset:b}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Weight","qi-blocks"),options:pe("font_weight"),value:n.getAttributeValue(y("FontWeight")),onChange:e=>n.setAttributeValue(y("FontWeight"),e)}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Transform","qi-blocks"),options:pe("text_transform"),value:n.getAttributeValue(y("TextTransform")),onChange:e=>n.setAttributeValue(y("TextTransform"),e)}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Style","qi-blocks"),options:pe("font_style"),value:n.getAttributeValue(y("FontStyle")),onChange:e=>n.setAttributeValue(y("FontStyle"),e)}),wp.element.createElement(c.SelectControl,{label:(0,e.__)("Decoration","qi-blocks"),options:pe("text_decoration"),value:n.getAttributeValue(y("TextDecoration")),onChange:e=>n.setAttributeValue(y("TextDecoration"),e)}),wp.element.createElement(dn,{label:(0,e.__)("Line Height","qi-blocks"),setAttributes:i,blockAttributes:o,blockAttributeKey:y("LineHeight"),allowScreens:!0,allowUnitsConvertor:!0,repeater:l,repeaterItemIndex:s,repeaterItemKey:p,isSimpleRepeaterValue:!0,repeaterSetAttributes:d,repeaterGetAttributes:m,allowReset:b}),wp.element.createElement(dn,{label:(0,e.__)("Letter Spacing","qi-blocks"),setAttributes:i,blockAttributes:o,blockAttributeKey:y("LetterSpacing"),rangeMin:-10,rangeMax:30,rangeStep:.1,rangeDecimalMin:-10,unitType:"pxEmRem",allowScreens:!0,repeater:l,repeaterItemIndex:s,repeaterItemKey:p,isSimpleRepeaterValue:!0,repeaterSetAttributes:d,repeaterGetAttributes:m,allowReset:b})))};Nn.defaultProps={label:(0,e.__)("Typography","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},popup:!1,allowReset:!0,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Bn=Nn,jn=e=>{const{attrNameTemplate:t,attributes:n}=e,r=(e,n)=>te(t,e,n);if(!n)return{};let o={},i={},a={};return n[r("FontFamily")]&&(o.fontFamily=`'${n[r("FontFamily")]}'`),n[r("FontWeight")]&&(o.fontWeight=n[r("FontWeight")]),n[r("TextTransform")]&&(o.textTransform=n[r("TextTransform")]),n[r("FontStyle")]&&(o.fontStyle=n[r("FontStyle")]),n[r("TextDecoration")]&&(o.textDecoration=n[r("TextDecoration")]),Object.entries(I).map(([e])=>{let t=re(e),l={};(n[r("FontSize",t)]||n[r("FontSizeDecimal",t)])&&(ae(n[r("FontSizeUnit",t)])&&n[r("FontSize",t)]?l.fontSize=parseInt(n[r("FontSize",t)],10)+n[r("FontSizeUnit",t)]:le(n[r("FontSizeUnit",t)])&&n[r("FontSizeDecimal",t)]&&(l.fontSize=parseFloat(n[r("FontSizeDecimal",t)])+n[r("FontSizeUnit",t)])),(n[r("LineHeight",t)]||n[r("LineHeightDecimal",t)])&&(ae(n[r("LineHeightUnit",t)])&&n[r("LineHeight",t)]?l.lineHeight=parseInt(n[r("LineHeight",t)],10)+n[r("LineHeightUnit",t)]:le(n[r("LineHeightUnit",t)])&&n[r("LineHeightDecimal",t)]&&(l.lineHeight=parseFloat(n[r("LineHeightDecimal",t)])+n[r("LineHeightUnit",t)])),""===ce(n[r("LetterSpacing",t)])&&""===ce(n[r("LetterSpacingDecimal",t)])||(ae(n[r("LetterSpacingUnit",t)])&&""!==ce(n[r("LetterSpacing",t)])?l.letterSpacing=parseInt(n[r("LetterSpacing",t)],10)+n[r("LetterSpacingUnit",t)]:le(n[r("LetterSpacingUnit",t)])&&""!==ce(n[r("LetterSpacingDecimal",t)])&&(l.letterSpacing=parseFloat(n[r("LetterSpacingDecimal",t)])+n[r("LetterSpacingUnit",t)])),Object.keys(l).length>0&&Object.entries(l).map(([t,n])=>{switch(e){case"desktop":o[t]=n;break;case"tablet":i[t]=n;break;case"mobile":a[t]=n}})}),{desktop:o,tablet:i,mobile:a}},Vn=(0,s.createHigherOrderComponent)(e=>class extends u.Component{static defaultProps={attributes:{}};componentDidMount(){(e=>{Object.keys(e).filter(e=>e.match(/fontfamily/i)).forEach(t=>{const n=e[t];n&&setTimeout(()=>{Cn(n)},400)})})(this.props.attributes)}render(){return wp.element.createElement(e,this.props)}},"withGoogleFont"),Mn=Vn,Ln=(0,s.createHigherOrderComponent)(e=>class extends u.Component{static defaultProps={clientId:"",attributes:{},setAttributes:()=>{}};componentDidMount(){const{clientId:e,attributes:t,setAttributes:n}=this.props;t.uniqueClass||n({uniqueClass:this.getNewUniqueClass(e)}),this.reInitUniqueClass(!0)}getNewUniqueClass(e){let t="qodef-block-";return this.props.isFullSiteEditor?t="qodef-template-block-":"widget"===this.props.postID&&(t="qodef-widget-block-"),`${t}${e.substring(0,8)}`}hasParent(e,t){let n=!1,r=e?.parentNode;for(;r;){let e=r;if(e&&e?.classList?.contains(t)){n=!0;break}if(!e?.parentNode)break;r=e.parentNode}return n}reInitUniqueClass(e){const{clientId:t,attributes:n,setAttributes:r,isFullSiteEditor:o}=this.props,{uniqueClass:i}=n,a=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument(),l=this.getNewUniqueClass(t);let s=!1;if(o){if(i.includes("qodef-block")||i.includes("qodef-widget")){const e=a.querySelector(`.${i}`);if(e){this.hasParent(e,"wp-block-post-content")||(s=!0)}}e&&a.addEventListener("paste",()=>{s=!0})}!o&&i.includes("qodef-template-block")&&(s=!0),""!==i&&i!==l&&a.querySelectorAll(`.${i}`).length>1&&(s=!0),s&&r({uniqueClass:l})}render(){return this.reInitUniqueClass(),wp.element.createElement(e,this.props)}},"withUniqueClass"),Fn=Ln;function Un(){return Un=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},Un.apply(null,arguments)}let zn=new Set,Hn={family:new Set,weight:new Set,style:new Set};const Kn=(e={})=>{let t="";return Object.entries(e).forEach(([e,n])=>{const r=e.toLowerCase();if(r.includes("fontfamily")){const e=n.replace(/["']/g,"");!zn.has(e)&&En(e)&&(zn.add(e),Hn.family.add(e))}if(r.includes("fontweight")){const e=parseInt(n,10);isNaN(e)||Hn.weight.add(e)}r.includes("fontstyle")&&Hn.style.add(n),t+=`${e.replace(/([A-Z])/g,(e,t,n)=>(n>0?"-":"")+e.toLowerCase())}: ${n};`}),t},Gn=(0,s.createHigherOrderComponent)(e=>class extends u.Component{addPageStyle(e){if(!e)return;const t=this.postID;let n=Array.isArray(qiBlocksEditor.vars.currentPageStyles)?[...qiBlocksEditor.vars.currentPageStyles]:Object.values(this.getPageStyles||{});zn=new Set,Hn={family:new Set,weight:new Set,style:new Set};const r=["widget","template"].includes(t)?"":`body[class*="-${t}"]`,o={key:this.attributes.uniqueClass,values:[],fonts:[]};e.forEach(e=>{if(!Object.values(e.styles).every(e=>0===Object.keys(e).length)){const t=Array.isArray(e.selector)?e.selector.filter(Boolean).map(e=>`${r} ${e}`):[`${r} ${e.selector}`];o.values.push({selector:t.length>1?t.join(","):t[0],styles:Kn(e.styles.desktop||{}),tablet_styles:Kn(e.styles.tablet||{}),mobile_styles:Kn(e.styles.mobile||{}),custom_styles:e.custom_styles||[]}),o.fonts={family:Array.from(Hn.family),weight:Array.from(Hn.weight),style:Array.from(Hn.style)}}});const i=n.findIndex(e=>e.key===o.key);i>-1?n[i]=o:o.values.length&&n.push(o);const a=n.filter(e=>e.values.length);qiBlocksEditor.vars.currentPageID=t,qiBlocksEditor.vars.currentPageStyles=a}render(){return wp.element.createElement(e,Un({},this.props,{addPageStyle:this.addPageStyle}))}},"withStyles"),Wn=(0,s.compose)((0,p.withSelect)(e=>{let t=e("core/editor")?.getCurrentPostId()||"widget";const n=!!e("core/edit-site");let r="desktop";return e("core/edit-post")&&(r="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post")?.__experimentalGetPreviewDeviceType()?.toLowerCase()),n&&(t="template",r="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:r,postID:t,getPageStyles:e("qi-blocks/data/with-styles").getOptions(t).data,isFullSiteEditor:n}}),Fn,Gn);class $n extends u.Component{render(){const{attributes:t,setAttributes:n,context:r,authorId:i,authorDetails:s,authors:u,previewScreen:d}=this.props,{uniqueClass:m,showAvatar:f,avatarSize:g,byLine:h}=t,{postType:y,postId:v,queryId:k}=r,_=Number.isFinite(k),w=[];s&&a()(s.avatar_urls,(e,t)=>{w.push({value:t,label:`${t} x ${t}`})});const S=((e,t="",n=[])=>ee(e,t,n))(t),A=Ie({blockAttributes:t}),I=JSON.stringify(Q(t)),x=((e,t="",n="")=>{let r=[];n&&r.push(`wp-block-qi-blocks-${n}`),r.push("qodef-block-container"),ue(e.uniqueClass,"all")&&r.push(e.uniqueClass);const o=J(e,t);return o&&r.push(o),r.join(" ")})(t,"","post-author");n({blockContainerIds:S}),n({blockContainerData:I}),n({blockContainerClasses:x});let E={className:x,style:oe(A,d),...Q(t)};S&&(E.id=S);const C=b()(((e,t,n=[])=>{if(!e)return"";let r=[`qi-block-${e}`,"qodef-block","qodef-m"];if(ue(t.attributes.className,"all")){const e=t.attributes.className.split(/\s+/).filter(e=>e&&!e.startsWith("wp-block-")).join(" ");e&&r.push(e)}return n&&(r=[...r,...n]),r.join(" ")})("post-author",this.props),{}),q=de({attributes:t,blockAttrName:"authorColor",cssProp:"color"}),T=de({attributes:t,blockAttrName:"authorHoverColor",cssProp:"color"}),O=jn({attrNameTemplate:"Author",attributes:t}),D=de({attributes:t,blockAttrName:"authorByLineColor",cssProp:"color"}),R=jn({attrNameTemplate:"AuthorByLine",attributes:t}),N=de({attributes:t,blockAttrName:"authorByLineMarginRight",cssProp:"marginRight"}),B=de({attributes:t,blockAttrName:"avatarMarginRight",cssProp:"marginRight"}),j=de({attributes:t,blockAttrName:"avatarBorderRadius",cssProp:"borderRadius"}),V=o()(q,O),M=T,L=o()(D,R,N),F=o()(B,j);return this.props.addPageStyle([{selector:`.${m}.qodef-block-container`,styles:A},{selector:`.${m} .qi-block-post-author .qodef-m-author-name`,styles:V},{selector:`.${m} .qi-block-post-author .qodef-m-author-name a:hover`,styles:M},{selector:`.${m} .qi-block-post-author .qodef-m-author-by-line`,styles:L},{selector:`.${m} .qi-block-post-author .qodef-m-avatar`,styles:F}]),wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(l.InspectorControls,null,wp.element.createElement(c.TabPanel,{className:"qodef-tab-panel qodef--post-author",activeClass:"qodef--active",tabs:[{name:"content",title:(0,e.__)("Content","qi-blocks")},{name:"style",title:(0,e.__)("Style","qi-blocks")},{name:"advanced",title:(0,e.__)("Advanced","qi-blocks")}]},r=>wp.element.createElement(wp.element.Fragment,null,"content"===r.name&&wp.element.createElement(c.BaseControl,{className:"qodef-base-control-container"},!_&&!!u?.length&&wp.element.createElement(c.SelectControl,{label:(0,e.__)("Author","qi-blocks"),value:i,options:u.map(({id:e,name:t})=>({value:e,label:t})),onChange:e=>{(0,p.dispatch)("core").editEntityRecord("postType",y,v,{author:e})}}),wp.element.createElement(P,{label:(0,e.__)("Show Author Avatar","qi-blocks"),blockAttributeKey:"showAvatar",blockAttributes:t,setAttributes:n}),f&&wp.element.createElement(c.SelectControl,{label:(0,e.__)("Avatar Size","qi-blocks"),value:g,options:w,onChange:e=>{n({avatarSize:parseInt(e,10)})}}),wp.element.createElement(c.TextControl,{label:(0,e.__)("Write byline...","qi-blocks"),value:h,onChange:e=>n({byLine:e})})),"style"===r.name&&wp.element.createElement(c.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(c.TabPanel,{className:"qodef-tab-panel qodef--inner",tabs:[{name:"author",title:(0,e.__)("Author","qi-blocks")},{name:"by-line",title:(0,e.__)("By Line","qi-blocks")},{name:"avatar",title:(0,e.__)("Avatar","qi-blocks")}]},r=>wp.element.createElement(wp.element.Fragment,null,"author"===r.name&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(rn,{label:(0,e.__)("Color","qi-blocks"),blockAttributeKey:"authorColor",blockAttributes:t,setAttributes:n}),wp.element.createElement(rn,{label:(0,e.__)("Hover Color","qi-blocks"),blockAttributeKey:"authorHoverColor",blockAttributes:t,setAttributes:n}),wp.element.createElement(Bn,{label:(0,e.__)("Typography","qi-blocks"),attrNameTemplate:"Author",blockAttributes:t,setAttributes:n,popup:!0})),"by-line"===r.name&&h&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(rn,{label:(0,e.__)("By Line Color","qi-blocks"),blockAttributeKey:"authorByLineColor",blockAttributes:t,setAttributes:n}),wp.element.createElement(Bn,{label:(0,e.__)("By Line Typography","qi-blocks"),attrNameTemplate:"AuthorByLine",blockAttributes:t,setAttributes:n,popup:!0}),wp.element.createElement(dn,{label:(0,e.__)("By Line Margin Right","qi-blocks"),blockAttributeKey:"authorByLineMarginRight",setAttributes:n,blockAttributes:t,rangeMax:100,rangeDecimalMax:"em"===t.authorByLineMarginRightUnit?10:100,rangeDecimalStep:.1,unitType:"space"})),"avatar"===r.name&&f&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(dn,{label:(0,e.__)("Margin Right","qi-blocks"),blockAttributeKey:"avatarMarginRight",setAttributes:n,blockAttributes:t,rangeMax:100,rangeDecimalMax:"em"===t.avatarMarginRightUnit?10:100,rangeDecimalStep:.1,unitType:"space"}),wp.element.createElement(dn,{label:(0,e.__)("Border Radius","qi-blocks"),blockAttributeKey:"avatarBorderRadius",setAttributes:n,blockAttributes:t,rangeMax:100,rangeDecimalMax:"em"===t.avatarBorderRadiusUnit?10:100,rangeDecimalStep:.1,unitType:"space"}))))),"advanced"===r.name&&wp.element.createElement(wn,{blockAttributes:t,setAttributes:n})))),wp.element.createElement("style",null,ie(oe(M,d),!1)&&`.${m} .qi-block-post-author .qodef-m-author-name a:hover {\n\t\t\t\t\t\t\t${ie(oe(M,d),!1)}\n\t\t\t\t\t\t}`),wp.element.createElement("div",E,wp.element.createElement("div",{className:C},f&&s&&wp.element.createElement("div",{className:"qodef-m-avatar",style:oe(F,d)},wp.element.createElement("img",{width:g,src:s.avatar_urls[g],alt:s.name})),wp.element.createElement("div",{className:"qodef-m-author"},h&&wp.element.createElement("span",{className:"qodef-m-author-by-line",style:oe(L,d)},h),wp.element.createElement("p",{className:"qodef-m-author-name",style:oe(V,d)},s?.name?wp.element.createElement("a",{href:s?.link||"#"},s.name):(0,e.__)("Post Author","qi-blocks"))))))}}$n.defaultProps={previewScreen:A};const Yn=(0,s.compose)(Wn,Mn,(0,p.withSelect)((e,{context:{postType:t,postId:n}})=>{const{getEditedEntityRecord:r,getUser:o,getUsers:i}=e("core"),a=r("postType",t,n)?.author;return{authorId:a,authorDetails:a?o(a):null,authors:i({who:"authors"})}}))($n);var Xn,Zn,Jn;function Qn(){return Qn=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},Qn.apply(null,arguments)}const er=e=>f.createElement("svg",Qn({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),Xn||(Xn=f.createElement("path",{fill:"none",stroke:"#EE2E54",strokeMiterlimit:10,d:"M.5 4.5h22.999v15H.5z"})),Zn||(Zn=f.createElement("path",{fill:"none",stroke:"#EE2C53",strokeMiterlimit:10,d:"M4.5 4.5h15v5h-15zM11.722 14.509h8.001"})),Jn||(Jn=f.createElement("circle",{cx:7.136,cy:14.509,r:2,fill:"none",stroke:"#EE2C53",strokeMiterlimit:10})));(0,t.registerBlockType)("qi-blocks/post-author",{apiVersion:3,icon:wp.element.createElement(er,null),title:(0,e.__)("Post Author","qi-blocks"),description:(0,e.__)("A straightforward way to display the authors of posts on your website.","qi-blocks"),category:"qi-blocks",keywords:[(0,e.__)("post","qi-blocks"),(0,e.__)("author","qi-blocks"),(0,e.__)("content","qi-blocks"),(0,e.__)("blog","qi-blocks"),(0,e.__)("writer","qi-blocks"),(0,e.__)("avatar","qi-blocks"),(0,e.__)("qi","qi-blocks")],usesContext:["postType","postId","queryId"],example:{attributes:{}},edit:Yn})})()})();