?AlkantarClanX12
| Current Path : /home/rankinh/villavanille/wp-content/plugins/qi-blocks/assets/dist/ |
| Current File : /home/rankinh/villavanille/wp-content/plugins/qi-blocks/assets/dist/countdown.js |
(()=>{var e={6860:(e,t,n)=>{"use strict";n.d(t,{c:()=>o}),document.addEventListener("DOMContentLoaded",(function(){r.init()}));const r={interval:[],isInitiated:!1,init:function(e){this.holder=document.querySelectorAll(".qi-block-countdown"),this.holder.length&&[...this.holder].map((t=>{r.initItem(t,e)}))},getRealCurrentItem:function(e){return"string"==typeof e&&""!==e&&(e=qiBlocksEditor.qodefGetCurrentBlockElement.get(e)),e},initItem:function(e,t){const n=t?e:0;if(!(e=r.getRealCurrentItem(e)))return;let o=e.querySelector(".qodef-m-date"),l=r.generateOptions(e);r.initCountdown(o,l,t,n)},generateOptions:function(e){let t={};return t.date=void 0!==e.getAttribute("data-date")?e.getAttribute("data-date"):null,t.hide=void 0!==e.getAttribute("data-hide")?e.getAttribute("data-hide"):null,t.monthLabel=void 0!==e.getAttribute("data-month-label")?e.getAttribute("data-month-label"):"Month",t.monthLabelPlural=void 0!==e.getAttribute("data-month-label-plural")?e.getAttribute("data-month-label-plural"):"Months",t.dayLabel=void 0!==e.getAttribute("data-day-label")?e.getAttribute("data-day-label"):"Day",t.dayLabelPlural=void 0!==e.getAttribute("data-day-label-plural")?e.getAttribute("data-day-label-plural"):"Days",t.hourLabel=void 0!==e.getAttribute("data-hour-label")?e.getAttribute("data-hour-label"):"Hour",t.hourLabelPlural=void 0!==e.getAttribute("data-hour-label-plural")?e.getAttribute("data-hour-label-plural"):"Hours",t.minuteLabel=void 0!==e.getAttribute("data-minute-label")?e.getAttribute("data-minute-label"):"Minute",t.minuteLabelPlural=void 0!==e.getAttribute("data-minute-label-plural")?e.getAttribute("data-minute-label-plural"):"Minutes",t.secondLabel=void 0!==e.getAttribute("data-second-label")?e.getAttribute("data-second-label"):"Second",t.secondLabelPlural=void 0!==e.getAttribute("data-second-label-plural")?e.getAttribute("data-second-label-plural"):"Seconds",t},initCountdown:function(e,t,n,o){!r.isInitiated&&o&&(r.interval[o]=r.initInterval(e,t),r.isInitiated=!0),n&&r.isInitiated&&(clearInterval(r.interval[o]),r.interval[o]=r.initInterval(e,t)),o||r.initInterval(e,t)},initInterval:function(e,t){let n=new Date(t.date).getTime();return setInterval((function(){let r=(new Date).getTime(),o=n-r,l=Math.floor(o/2592e6),a=Math.floor(o%2592e6/864e5),i=Math.floor(o%864e5/36e5),s=Math.floor(o%36e5/6e4),u=Math.floor(o%6e4/1e3);const c="minsec"===t.hide,p="sec"===t.hide,d="mon"===t.hide;d&&(a=Math.floor(o/864e5));let m=e.querySelector(".qodef-months"),b=e.querySelector(".qodef-days"),f=e.querySelector(".qodef-hours"),g=e.querySelector(".qodef-minutes"),h=e.querySelector(".qodef-seconds");d||(m.querySelector(".qodef-label").innerHTML=1===l?t.monthLabel:t.monthLabelPlural),b.querySelector(".qodef-label").innerHTML=1===a?t.dayLabel:t.dayLabelPlural,f.querySelector(".qodef-label").innerHTML=1===i?t.hourLabel:t.hourLabelPlural,c||(g.querySelector(".qodef-label").innerHTML=1===s?t.minuteLabel:t.minuteLabelPlural),c||p||(h.querySelector(".qodef-label").innerHTML=1===u?t.secondLabel:t.secondLabelPlural),l=l<10?"0"+l:l,a=a<10?"0"+a:a,i=i<10?"0"+i:i,s=s<10?"0"+s:s,u=u<10?"0"+u:u,d||(m.querySelector(".qodef-digit").innerHTML=l),b.querySelector(".qodef-digit").innerHTML=a,f.querySelector(".qodef-digit").innerHTML=i,c||(g.querySelector(".qodef-digit").innerHTML=s),c||p||(h.querySelector(".qodef-digit").innerHTML=u),o<0&&(d||(m.querySelector(".qodef-label").innerHTML=t.monthLabelPlural),b.querySelector(".qodef-label").innerHTML=t.dayLabelPlural,f.querySelector(".qodef-label").innerHTML=t.hourLabelPlural,c||(g.querySelector(".qodef-label").innerHTML=t.minuteLabelPlural),c||p||(h.querySelector(".qodef-label").innerHTML=t.secondLabelPlural),d||(m.querySelector(".qodef-digit").innerHTML="00"),b.querySelector(".qodef-digit").innerHTML="00",f.querySelector(".qodef-digit").innerHTML="00",c||(g.querySelector(".qodef-digit").innerHTML="00"),c||p||(h.querySelector(".qodef-digit").innerHTML="00"))}),1e3)}},o=r},4300:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:l,seal:a,create:i}=Object,{apply:s,construct:u}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t,n){return e.apply(t,n)}),u||(u=function(e,t){return new e(...t)});const c=k(Array.prototype.forEach),p=k(Array.prototype.pop),d=k(Array.prototype.push),m=k(String.prototype.toLowerCase),b=k(String.prototype.toString),f=k(String.prototype.match),g=k(String.prototype.replace),h=k(String.prototype.indexOf),y=k(String.prototype.trim),_=k(RegExp.prototype.test),v=w(TypeError);function k(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return s(e,t,r)}}function w(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return u(e,n)}}function S(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m;t&&t(e,null);let l=r.length;for(;l--;){let t=r[l];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[l]=e),t=e)}e[t]=!0}return e}function A(e){for(let t=0;t<e.length;t++)void 0===o(e,t)&&(e[t]=null);return e}function q(t){const n=i(null);for(const[r,l]of e(t))void 0!==o(t,r)&&(Array.isArray(l)?n[r]=A(l):l&&"object"==typeof l&&l.constructor===Object?n[r]=q(l):n[r]=l);return n}function I(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return k(n.get);if("function"==typeof n.value)return k(n.value)}e=r(e)}function n(e){return console.warn("fallback value for",e),null}return n}const x=l(["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","section","select","shadow","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"]),E=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),C=l(["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"]),T=l(["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"]),P=l(["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"]),O=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=l(["#text"]),N=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),R=l(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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","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"]),L=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),B=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),M=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),j=a(/<%[\w\W]*|[\w\W]*%>/gm),V=a(/\${[\w\W]*}/gm),F=a(/^data-[\-\w.\u00B7-\uFFFF]/),U=a(/^aria-[\-\w]+$/),H=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=a(/^(?:\w+script|data):/i),K=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=a(/^html$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:M,ERB_EXPR:j,TMPLIT_EXPR:V,DATA_ATTR:F,ARIA_ATTR:U,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:K,DOCTYPE_NAME:G});const $=function(){return"undefined"==typeof window?null:window},Y=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}};function X(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$();const n=e=>X(e);if(n.version="3.0.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const o=r,a=o.currentScript,{DocumentFragment:s,HTMLTemplateElement:u,Node:k,Element:w,NodeFilter:A,NamedNodeMap:M=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:j,DOMParser:V,trustedTypes:F}=t,U=w.prototype,z=I(U,"cloneNode"),K=I(U,"nextSibling"),Z=I(U,"childNodes"),J=I(U,"parentNode");if("function"==typeof u){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let Q,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=r,{importNode:le}=o;let ae={};n.isSupported="function"==typeof e&&"function"==typeof J&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ie,ERB_EXPR:se,TMPLIT_EXPR:ue,DATA_ATTR:ce,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:me}=W;let{IS_ALLOWED_URI:be}=W,fe=null;const ge=S({},[...x,...E,...C,...P,...D]);let he=null;const ye=S({},[...N,...R,...L,...B]);let _e=Object.seal(i(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}})),ve=null,ke=null,we=!0,Se=!0,Ae=!1,qe=!0,Ie=!1,xe=!1,Ee=!1,Ce=!1,Te=!1,Pe=!1,Oe=!1,De=!0,Ne=!1;const Re="user-content-";let Le=!0,Be=!1,Me={},je=null;const Ve=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Fe=null;const Ue=S({},["audio","video","img","source","image","track"]);let He=null;const ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let $e=We,Ye=!1,Xe=null;const Ze=S({},[Ke,Ge,We],b);let Je=null;const Qe=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const rt=r.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},lt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=q(e),Je=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Je?b:m,fe="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS,tt):ge,he="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR,tt):ye,Xe="ALLOWED_NAMESPACES"in e?S({},e.ALLOWED_NAMESPACES,b):Ze,He="ADD_URI_SAFE_ATTR"in e?S(q(ze),e.ADD_URI_SAFE_ATTR,tt):ze,Fe="ADD_DATA_URI_TAGS"in e?S(q(Ue),e.ADD_DATA_URI_TAGS,tt):Ue,je="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS,tt):Ve,ve="FORBID_TAGS"in e?S({},e.FORBID_TAGS,tt):{},ke="FORBID_ATTR"in e?S({},e.FORBID_ATTR,tt):{},Me="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,qe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,xe=e.WHOLE_DOCUMENT||!1,Te=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Oe=e.RETURN_TRUSTED_TYPE||!1,Ce=e.FORCE_BODY||!1,De=!1!==e.SANITIZE_DOM,Ne=e.SANITIZE_NAMED_PROPS||!1,Le=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||H,$e=e.NAMESPACE||We,_e=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_e.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Se=!1),Pe&&(Te=!0),Me&&(fe=S({},D),he=[],!0===Me.html&&(S(fe,x),S(he,N)),!0===Me.svg&&(S(fe,E),S(he,R),S(he,B)),!0===Me.svgFilters&&(S(fe,C),S(he,R),S(he,B)),!0===Me.mathMl&&(S(fe,P),S(he,L),S(he,B))),e.ADD_TAGS&&(fe===ge&&(fe=q(fe)),S(fe,e.ADD_TAGS,tt)),e.ADD_ATTR&&(he===ye&&(he=q(he)),S(he,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&S(He,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(je===Ve&&(je=q(je)),S(je,e.FORBID_CONTENTS,tt)),Le&&(fe["#text"]=!0),xe&&S(fe,["html","head","body"]),fe.table&&(S(fe,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=Y(F,a)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));l&&l(e),nt=e}},at=S({},["mi","mo","mn","ms","mtext"]),it=S({},["foreignobject","desc","title","annotation-xml"]),st=S({},["title","style","font","a","script"]),ut=S({},[...E,...C,...T]),ct=S({},[...P,...O]),pt=function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const n=m(e.tagName),r=m(t.tagName);return!!Xe[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===We?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(ut[n]):e.namespaceURI===Ke?t.namespaceURI===We?"math"===n:t.namespaceURI===Ge?"math"===n&&it[r]:Boolean(ct[n]):e.namespaceURI===We?!(t.namespaceURI===Ge&&!it[r])&&!(t.namespaceURI===Ke&&!at[r])&&!ct[n]&&(st[n]||!ut[n]):!("application/xhtml+xml"!==Je||!Xe[e.namespaceURI]))},dt=function(e){d(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},mt=function(e,t){try{d(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!he[e])if(Te||Pe)try{dt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Ce)e="<remove></remove>"+e;else{const t=f(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Je&&$e===We&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Q?Q.createHTML(e):e;if($e===We)try{t=(new V).parseFromString(o,Je)}catch(e){}if(!t||!t.documentElement){t=te.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ye?ee:o}catch(e){}}const l=t.body||t.documentElement;return e&&n&&l.insertBefore(r.createTextNode(n),l.childNodes[0]||null),$e===We?oe.call(t,xe?"html":"body")[0]:xe?t.documentElement:l},ft=function(e){return ne.call(e.ownerDocument||e,e,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT,null)},gt=function(e){return e instanceof j&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof M)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},ht=function(e){return"function"==typeof k&&e instanceof k},yt=function(e,t,r){ae[e]&&c(ae[e],(e=>{e.call(n,t,r,nt)}))},_t=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),gt(e))return dt(e),!0;const r=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:r,allowedTags:fe}),e.hasChildNodes()&&!ht(e.firstElementChild)&&_(/<[/\w]/g,e.innerHTML)&&_(/<[/\w]/g,e.textContent))return dt(e),!0;if(!fe[r]||ve[r]){if(!ve[r]&&kt(r)){if(_e.tagNameCheck instanceof RegExp&&_(_e.tagNameCheck,r))return!1;if(_e.tagNameCheck instanceof Function&&_e.tagNameCheck(r))return!1}if(Le&&!je[r]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(z(n[r],!0),K(e))}return dt(e),!0}return e instanceof w&&!pt(e)?(dt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&3===e.nodeType&&(t=e.textContent,c([ie,se,ue],(e=>{t=g(t,e," ")})),e.textContent!==t&&(d(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(dt(e),!0)},vt=function(e,t,n){if(De&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(Se&&!ke[t]&&_(ce,t));else if(we&&_(pe,t));else if(!he[t]||ke[t]){if(!(kt(e)&&(_e.tagNameCheck instanceof RegExp&&_(_e.tagNameCheck,e)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(e))&&(_e.attributeNameCheck instanceof RegExp&&_(_e.attributeNameCheck,t)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(t))||"is"===t&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&_(_e.tagNameCheck,n)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(n))))return!1}else if(He[t]);else if(_(be,g(n,me,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==h(n,"data:")||!Fe[e])if(Ae&&!_(de,g(n,me,"")));else if(n)return!1;return!0},kt=function(e){return e.indexOf("-")>0},wt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:he};let o=t.length;for(;o--;){const l=t[o],{name:a,namespaceURI:i,value:s}=l,u=tt(a);let d="value"===a?s:y(s);if(r.attrName=u,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,r),d=r.attrValue,r.forceKeepAttr)continue;if(mt(a,e),!r.keepAttr)continue;if(!qe&&_(/\/>/i,d)){mt(a,e);continue}Ie&&c([ie,se,ue],(e=>{d=g(d,e," ")}));const m=tt(e.nodeName);if(vt(m,u,d)){if(!Ne||"id"!==u&&"name"!==u||(mt(a,e),d=Re+d),Q&&"object"==typeof F&&"function"==typeof F.getAttributeType)if(i);else switch(F.getAttributeType(m,u)){case"TrustedHTML":d=Q.createHTML(d);break;case"TrustedScriptURL":d=Q.createScriptURL(d)}try{i?e.setAttributeNS(i,a,d):e.setAttribute(a,d),p(n.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},St=function e(t){let n=null;const r=ft(t);for(yt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)yt("uponSanitizeShadowNode",n,null),_t(n)||(n.content instanceof s&&e(n.content),wt(n));yt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,l=null,a=null,i=null;if(Ye=!e,Ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)){if("function"!=typeof e.toString)throw v("toString is not a function");if("string"!=typeof(e=e.toString()))throw v("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ee||lt(t),n.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=tt(e.nodeName);if(!fe[t]||ve[t])throw v("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof k)r=bt("\x3c!----\x3e"),l=r.ownerDocument.importNode(e,!0),1===l.nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?r=l:r.appendChild(l);else{if(!Te&&!Ie&&!xe&&-1===e.indexOf("<"))return Q&&Oe?Q.createHTML(e):e;if(r=bt(e),!r)return Te?null:Oe?ee:""}r&&Ce&&dt(r.firstChild);const u=ft(Be?e:r);for(;a=u.nextNode();)_t(a)||(a.content instanceof s&&St(a.content),wt(a));if(Be)return e;if(Te){if(Pe)for(i=re.call(r.ownerDocument);r.firstChild;)i.appendChild(r.firstChild);else i=r;return(he.shadowroot||he.shadowrootmode)&&(i=le.call(o,i,!0)),i}let p=xe?r.outerHTML:r.innerHTML;return xe&&fe["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&_(G,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),Ie&&c([ie,se,ue],(e=>{p=g(p,e," ")})),Q&&Oe?Q.createHTML(p):p},n.setConfig=function(){lt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ee=!0},n.clearConfig=function(){nt=null,Ee=!1},n.isValidAttribute=function(e,t,n){nt||lt({});const r=tt(e),o=tt(t);return vt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&(ae[e]=ae[e]||[],d(ae[e],t))},n.removeHook=function(e){if(ae[e])return p(ae[e])},n.removeHooks=function(e){ae[e]&&(ae[e]=[])},n.removeAllHooks=function(){ae={}},n}return X()}()},6152:(e,t,n)=>{var r=n(2488);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return r(e)?e:[e]}},520:(e,t,n)=>{var r=n(5968),o=n(3740),l=n(4996),a=n(2600),i=n(7336);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=l,s.prototype.has=a,s.prototype.set=i,e.exports=s},9704:(e,t,n)=>{var r=n(7188).Uint8Array;e.exports=r},2253: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)}},7748:e=>{e.exports=function(e,t,n,r){var o=-1,l=null==e?0:e.length;for(r&&l&&(n=e[++o]);++o<l;)n=t(n,e[o],o,e);return n}},5600:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},1120:e=>{e.exports=function(e){return e.split("")}},2628:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},9200:(e,t,n)=>{var r=n(6139),o=n(864);e.exports=function(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},8288:(e,t,n)=>{var r=n(6139),o=n(864),l=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];l.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},6600:(e,t,n)=>{var r=n(864);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},6139:(e,t,n)=>{var r=n(7792);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},2471:(e,t,n)=>{var r=n(8940),o=Object.create,l=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=l},4596:(e,t,n)=>{var r=n(8168)();e.exports=r},6944:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3992:e=>{e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},9184:(e,t,n)=>{var r=n(4840),o=n(2892);e.exports=function e(t,n,l,a,i){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,l,a,e,i))}},4840:(e,t,n)=>{var r=n(520),o=n(9124),l=n(2352),a=n(8608),i=n(3871),s=n(2488),u=n(7684),c=n(6700),p="[object Arguments]",d="[object Array]",m="[object Object]",b=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,f,g,h){var y=s(e),_=s(t),v=y?d:i(e),k=_?d:i(t),w=(v=v==p?m:v)==m,S=(k=k==p?m:k)==m,A=v==k;if(A&&u(e)){if(!u(t))return!1;y=!0,w=!1}if(A&&!w)return h||(h=new r),y||c(e)?o(e,t,n,f,g,h):l(e,t,v,n,f,g,h);if(!(1&n)){var q=w&&b.call(e,"__wrapped__"),I=S&&b.call(t,"__wrapped__");if(q||I){var x=q?e.value():e,E=I?t.value():t;return h||(h=new r),g(x,E,n,f,h)}}return!!A&&(h||(h=new r),a(e,t,n,f,g,h))}},660:(e,t,n)=>{var r=n(520),o=n(9200),l=n(4596),a=n(7132),i=n(8940),s=n(2756),u=n(7972);e.exports=function e(t,n,c,p,d){t!==n&&l(n,(function(l,s){if(d||(d=new r),i(l))a(t,n,s,c,e,p,d);else{var m=p?p(u(t,s),l,s+"",t,n,d):void 0;void 0===m&&(m=l),o(t,s,m)}}),s)}},7132:(e,t,n)=>{var r=n(9200),o=n(1328),l=n(2100),a=n(8416),i=n(6224),s=n(348),u=n(2488),c=n(2480),p=n(7684),d=n(7920),m=n(8940),b=n(2688),f=n(6700),g=n(7972),h=n(1824);e.exports=function(e,t,n,y,_,v,k){var w=g(e,n),S=g(t,n),A=k.get(S);if(A)r(e,n,A);else{var q=v?v(w,S,n+"",e,t,k):void 0,I=void 0===q;if(I){var x=u(S),E=!x&&p(S),C=!x&&!E&&f(S);q=S,x||E||C?u(w)?q=w:c(w)?q=a(w):E?(I=!1,q=o(S,!0)):C?(I=!1,q=l(S,!0)):q=[]:b(S)||s(S)?(q=w,s(w)?q=h(w):m(w)&&!d(w)||(q=i(S))):I=!1}I&&(k.set(S,q),_(q,S,y,v,k),k.delete(S)),r(e,n,q)}}},8292:(e,t,n)=>{var r=n(552),o=n(8840),l=n(7360);e.exports=function(e,t){return l(o(e,t,r),e+"")}},4732: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 l=Array(o);++r<o;)l[r]=e[r+t];return l}},6524:e=>{e.exports=function(e){return e}},968:(e,t,n)=>{var r=n(3992);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},7320:(e,t,n)=>{var r=n(4732);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)}},5987:(e,t,n)=>{var r=n(9704);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},1328:(e,t,n)=>{e=n.nmd(e);var r=n(7188),o=t&&!t.nodeType&&t,l=o&&e&&!e.nodeType&&e,a=l&&l.exports===o?r.Buffer:void 0,i=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}},2100:(e,t,n)=>{var r=n(5987);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},8416: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}},7612:(e,t,n)=>{var r=n(8288),o=n(6139);e.exports=function(e,t,n,l){var a=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var u=t[i],c=l?l(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}},764:(e,t,n)=>{var r=n(8292),o=n(4221);e.exports=function(e){return r((function(t,n){var r=-1,l=n.length,a=l>1?n[l-1]:void 0,i=l>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(l--,a):void 0,i&&o(n[0],n[1],i)&&(a=l<3?void 0:a,l=1),t=Object(t);++r<l;){var s=n[r];s&&e(t,s,r,a)}return t}))}},8168:e=>{e.exports=function(e){return function(t,n,r){for(var o=-1,l=Object(t),a=r(t),i=a.length;i--;){var s=a[e?i:++o];if(!1===n(l[s],s,l))break}return t}}},7288:(e,t,n)=>{var r=n(7320),o=n(9240),l=n(8595),a=n(1972);e.exports=function(e){return function(t){t=a(t);var n=o(t)?l(t):void 0,i=n?n[0]:t.charAt(0),s=n?r(n,1).join(""):t.slice(1);return i[e]()+s}}},184:(e,t,n)=>{var r=n(7748),o=n(5928),l=n(2996),a=RegExp("['’]","g");e.exports=function(e){return function(t){return r(l(o(t).replace(a,"")),e,"")}}},7792:(e,t,n)=>{var r=n(7892),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},9124:(e,t,n)=>{var r=n(6152),o=n(5600),l=n(968);e.exports=function(e,t,n,a,i,s){var u=1&n,c=e.length,p=t.length;if(c!=p&&!(u&&p>c))return!1;var d=s.get(e),m=s.get(t);if(d&&m)return d==t&&m==e;var b=-1,f=!0,g=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++b<c;){var h=e[b],y=t[b];if(a)var _=u?a(y,h,b,t,e,s):a(h,y,b,e,t,s);if(void 0!==_){if(_)continue;f=!1;break}if(g){if(!o(t,(function(e,t){if(!l(g,t)&&(h===e||i(h,e,n,a,s)))return g.push(t)}))){f=!1;break}}else if(h!==y&&!i(h,y,n,a,s)){f=!1;break}}return s.delete(e),s.delete(t),f}},2352:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},8608:(e,t,n)=>{var r=n(1096),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,l,a,i){var s=1&n,u=r(e),c=u.length;if(c!=r(t).length&&!s)return!1;for(var p=c;p--;){var d=u[p];if(!(s?d in t:o.call(t,d)))return!1}var m=i.get(e),b=i.get(t);if(m&&b)return m==t&&b==e;var f=!0;i.set(e,t),i.set(t,e);for(var g=s;++p<c;){var h=e[d=u[p]],y=t[d];if(l)var _=s?l(y,h,d,t,e,i):l(h,y,d,e,t,i);if(!(void 0===_?h===y||a(h,y,n,l,i):_)){f=!1;break}g||(g="constructor"==d)}if(f&&!g){var v=e.constructor,k=t.constructor;v==k||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof k&&k instanceof k||(f=!1)}return i.delete(e),i.delete(t),f}},4848:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},1096:(e,t,n)=>{var r=n(1304)(Object.keys,Object);e.exports=r},7892:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},476:(e,t,n)=>{var r=n(1304)(Object.getPrototypeOf,Object);e.exports=r},3871:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9240:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},4360: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)}},6224:(e,t,n)=>{var r=n(2471),o=n(476),l=n(1004);e.exports=function(e){return"function"!=typeof e.constructor||l(e)?{}:r(o(e))}},4221:e=>{e.exports=function(){return!1}},1004:e=>{e.exports=function(){return!1}},5968:e=>{e.exports=function(){this.__data__=[],this.size=0}},3740:(e,t,n)=>{var r=n(6600),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)}},4996:(e,t,n)=>{var r=n(6600);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},2600:(e,t,n)=>{var r=n(6600);e.exports=function(e){return r(this.__data__,e)>-1}},7336:(e,t,n)=>{var r=n(6600);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}},1304:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},8840:(e,t,n)=>{var r=n(2253),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var l=arguments,a=-1,i=o(l.length-t,0),s=Array(i);++a<i;)s[a]=l[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=l[a];return u[t]=n(s),r(e,this,u)}}},7188:(e,t,n)=>{var r=n(4848),o="object"==typeof self&&self&&self.Object===Object&&self,l=r||o||Function("return this")();e.exports=l},7972:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},7360:e=>{e.exports=function(e){return e}},8595:(e,t,n)=>{var r=n(1120),o=n(9240),l=n(6448);e.exports=function(e){return o(e)?l(e):r(e)}},6448:e=>{var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",l="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+o+")"+"?",u="[\\ufe0e\\ufe0f]?",c=u+s+("(?:\\u200d(?:"+[l,a,i].join("|")+")"+u+s+")*"),p="(?:"+[l+r+"?",r,a,i,n].join("|")+")",d=RegExp(o+"(?="+o+")|"+p+c,"g");e.exports=function(e){return e.match(d)||[]}},2744:e=>{var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",r="a-z\\xdf-\\xf6\\xf8-\\xff",o="A-Z\\xc0-\\xd6\\xd8-\\xde",l="\\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="["+l+"]",i="\\d+",s="["+n+"]",u="["+r+"]",c="[^"+t+l+i+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])?",_="[\\ufe0e\\ufe0f]?",v=_+y+("(?:\\u200d(?:"+["[^"+t+"]",p,d].join("|")+")"+_+y+")*"),k="(?:"+[s,p,d].join("|")+")"+v,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_])",i,k].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},5144:(e,t,n)=>{var r=n(1912),o=n(184)((function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)}));e.exports=o},1912:(e,t,n)=>{var r=n(1972),o=n(4704);e.exports=function(e){return o(r(e).toLowerCase())}},5928:(e,t,n)=>{var r=n(6524);e.exports=function(e){return null==e?"":r(e)}},864:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},552:e=>{e.exports=function(e){return e}},348:e=>{e.exports=function(){return!1}},2488:e=>{var t=Array.isArray;e.exports=t},4900:(e,t,n)=>{var r=n(7920),o=n(9024);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},2480:(e,t,n)=>{var r=n(4900),o=n(2892);e.exports=function(e){return o(e)&&r(e)}},7684:e=>{e.exports=function(){return!1}},948:(e,t,n)=>{var r=n(9184);e.exports=function(e,t){return r(e,t)}},7920:(e,t,n)=>{var r=n(6944),o=n(8940);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}},9024:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},8940:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},2892:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},2688:(e,t,n)=>{var r=n(6944),o=n(476),l=n(2892),a=Function.prototype,i=Object.prototype,s=a.toString,u=i.hasOwnProperty,c=s.call(Object);e.exports=function(e){if(!l(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}},6700:e=>{e.exports=function(){return!1}},2756:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},7060:(e,t,n)=>{var r=n(660),o=n(764)((function(e,t,n){r(e,t,n)}));e.exports=o},1824:(e,t,n)=>{var r=n(7612),o=n(2756);e.exports=function(e){return r(e,o(e))}},1972:e=>{e.exports=function(e){return e}},4704:(e,t,n)=>{var r=n(7288)("toUpperCase");e.exports=r},2996:(e,t,n)=>{var r=n(2628),o=n(4360),l=n(1972),a=n(2744);e.exports=function(e,t,n){return e=l(e),void 0===(t=n?void 0:t)?o(e)?a(e):r(e):e.match(t)||[]}},9776:(e,t,n)=>{"use strict";var r=n(9143);function o(){}function l(){}l.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,l,a){if(a!==r){var i=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 i.name="Invariant Violation",i}}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:l,resetWarningCache:o};return n.PropTypes=n,n}},3268:(e,t,n)=>{e.exports=n(9776)()},9143:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7980:(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 l=r?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(n,o,l):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(1504)),o=s(n(3268)),l=s(n(724)),a=s(n(7396)),i=n(5224);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 _=function(){return!0},v="suggestions-revealed",k="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,l=r.onSuggestionSelected,a=r.onSuggestionsFetchRequested;l&&l(e,n);var i=t.props.shouldKeepSuggestionsOnSelect(n.suggestion);o||i?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,l=t.getSuggestionIndices(t.findSuggestionElement(e.target)),a=l.sectionIndex,i=l.suggestionIndex,s=t.getSuggestion(a,i),u=t.props.getSuggestionValue(s);t.maybeCallOnChange(e,u,"click"),t.onSuggestionSelected(e,{suggestion:s,suggestionValue:u,suggestionIndex:i,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,l=n.onBlur,a=t.getHighlightedSuggestion(),i=r(o,"input-blurred");t.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!i}),l&&l(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,l.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,l.default)(r,e.suggestions)&&r.length>0&&a)this.highlightFirstSuggestion();else if(o){var i=this.getHighlightedSuggestion();i!=t.highlightedSuggestion&&o({suggestion:i})}}},{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 l=o.valueBeforeUpDown;return null===t?l=null:null===l&&void 0!==n&&(l=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:l}}))}},{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,l=n.getSectionSuggestions;return o?l(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,l=r.onChange;t!==o&&l(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e,t){var n=e.suggestions,r=e.inputProps,o=e.shouldRenderSuggestions,l=r.value;return n.length>0&&o(l,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,l=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,q=this.state,I=q.isFocused,x=q.isCollapsed,E=q.highlightedSectionIndex,C=q.highlightedSuggestionIndex,T=q.valueBeforeUpDown,P=h?_:this.props.shouldRenderSuggestions,O=u.value,D=u.onFocus,N=u.onKeyDown,R=this.willRenderSuggestions(this.props,"render"),L=h||I&&!x&&R,B=L?n:[],M=d({},u,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=P(O,k);e.setState({isFocused:!0,isCollapsed:!n}),D&&D(t),n&&l({value:O,reason:k})}},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=P(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?l({value:n,reason:w}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var o=t.keyCode;switch(o){case 40:case 38:if(x)P(O,v)&&(l({value:O,reason:v}),e.revealSuggestions(),t.preventDefault());else if(n.length>0){var a,i=r.newHighlightedSectionIndex,s=r.newHighlightedItemIndex;a=null===s?null===T?O:T:e.getSuggestionValueByIndex(i,s),e.updateHighlightedSuggestion(i,s,O),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(L&&!h&&e.closeSuggestions(),null!=u){t.preventDefault();var c=g(u);e.maybeCallOnChange(t,c,"enter"),e.onSuggestionSelected(t,{suggestion:u,suggestionValue:c,suggestionIndex:C,sectionIndex:E,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:L&&t.preventDefault();var p=L&&!h;null===T?p||(e.maybeCallOnChange(t,"","escape"),P("",S)?l({value:"",reason:S}):e.onSuggestionsClearRequested()):e.maybeCallOnChange(t,T,"escape"),p?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}N&&N(t)}}),j={query:this.getQuery()};return r.default.createElement(a.default,{multiSection:c,items:B,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:s,renderItemData:j,renderSectionTitle:p,getSectionItems:b,highlightedSectionIndex:E,highlightedItemIndex:C,containerProps:A,inputProps:M,itemProps:this.itemProps,theme:(0,i.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:i.defaultTheme,id:"1",containerProps:{}})},7396:(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 l=r?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(n,o,l):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(1504)),o=u(n(3268)),l=u(n(7328)),a=u(n(3588)),i=u(n(5320)),s=u(n(7260));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){k(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,l=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,l=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw l}}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=_(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=_(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 _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function k(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&&v(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),k(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))})),k(y(t),"storeItemsContainerReference",(function(e){null!==e&&(t.itemsContainer=e)})),k(y(t),"onHighlightedItemChange",(function(e){t.highlightedItem=e})),k(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)})),k(y(t),"onFocus",(function(e){var n=t.props.inputProps;t.setState({isInputFocused:!0}),n.onFocus&&n.onFocus(e)})),k(y(t),"onBlur",(function(e){var n=t.props.inputProps;t.setState({isInputFocused:!1}),n.onBlur&&n.onBlur(e)})),k(y(t),"onKeyDown",(function(e){var n=t.props,r=n.inputProps,o=n.highlightedSectionIndex,l=n.highlightedItemIndex,a=e.keyCode;switch(a){case 40:case 38:var i=40===a?"next":"prev",s=m(t.sectionIterator[i]([o,l]),2),u=s[0],c=s[1];r.onKeyDown(e,{newHighlightedSectionIndex:u,newHighlightedItemIndex:c});break;default:r.onKeyDown(e,{highlightedSectionIndex:o,highlightedItemIndex:l})}})),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,l.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,l=n.items,a=n.renderItem,u=n.renderItemData,c=n.renderSectionTitle,p=n.highlightedSectionIndex,d=n.highlightedItemIndex,m=n.itemProps;return l.map((function(n,l){var b="react-autowhatever-".concat(o,"-"),f="".concat(b,"section-").concat(l,"-"),g=0===l;return r.default.createElement("div",t("".concat(f,"container"),"sectionContainer",g&&"sectionContainerFirst"),r.default.createElement(i.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:f}),r.default.createElement(s.default,{items:e.sectionsItems[l],itemProps:m,renderItem:a,renderItemData:u,sectionIndex:l,highlightedItemIndex:p===l?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,l=n.renderItem,a=n.renderItemData,i=n.highlightedSectionIndex,u=n.highlightedItemIndex,c=n.itemProps;return r.default.createElement(s.default,{items:e,itemProps:c,renderItem:l,renderItemData:a,highlightedItemIndex:null===i?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,l=t.renderInputComponent,a=t.renderItemsContainer,i=t.highlightedSectionIndex,s=t.highlightedItemIndex,u=this.state.isInputFocused,c=o?this.renderSections():this.renderItems(),p=null!==c,m=this.getItemId(i,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=l(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,k(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])}),k(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"}})},3508:(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=i();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 l=r?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(n,o,l):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(1504)),o=a(n(3268)),l=a(n(1196));function a(e){return e&&e.__esModule?e:{default:e}}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=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={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[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)}(i,e);var t,n,o,a=m(i);function i(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);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=i,n=[{key:"shouldComponentUpdate",value:function(e){return(0,l.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,o=e.renderItem,l=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},l)))}}],n&&d(t.prototype,n),o&&d(t,o),i}(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})},7260:(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 l=r?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(n,o,l):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(1504)),o=i(n(3268)),l=i(n(3508)),a=i(n(1196));function i(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,i=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=i.call.apply(i,[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,i=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,_="".concat(f,"item-").concat(n),v=g?o({sectionIndex:s,itemIndex:n}):o,k=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(_,"item",b&&"itemFirst",y&&"itemHighlighted"),{},v);return y&&(k.ref=e.storeHighlightedItemReference),r.default.createElement(l.default,c({},k,{sectionIndex:s,isHighlighted:y,itemIndex:n,item:t,renderItem:a,renderItemData:i}))})))}}],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})},5320:(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=i();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 l=r?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(n,o,l):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(1504)),o=a(n(3268)),l=a(n(1196));function a(e){return e&&e.__esModule?e:{default:e}}function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=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)}(i,e);var t,n,o,a=c(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),a.apply(this,arguments)}return t=i,(n=[{key:"shouldComponentUpdate",value:function(e){return(0,l.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,o=e.theme,l=e.sectionKeyPrefix,a=n(t);return a?r.default.createElement("div",o("".concat(l,"title"),"sectionTitle"),a):null}}])&&u(t.prototype,n),o&&u(t,o),i}(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},1196:(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),l=Object.keys(t);if(o.length!==l.length)return!0;var a,i,s={};for(a=0,i=r.length;a<i;a++)s[r[a]]=!0;for(a=0,i=o.length;a<i;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}},8872:(e,t,n)=>{"use strict";e.exports=n(7980).default},5224:(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}},3588:(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,l=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,l=e}finally{try{!r&&i.return&&i.return()}finally{if(o)throw l}}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 l,a=n(9328),i=(l=a)&&l.__esModule?l:{default:l},s=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),l=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 l[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:i.default.apply(void 0,[{}].concat(o(u)))}}},e.exports=t.default},9328: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,l=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 i=0;i<o.length;i++)l[o[i]]=r[o[i]]}return l}},3028:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=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 _(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 v=_.prototype=new y;v.constructor=_,f(v,h.prototype),v.isPureReactComponent=!0;var k=Array.isArray,w=Object.prototype.hasOwnProperty,S={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function q(e,t,r){var o,l={},a=null,i=null;if(null!=t)for(o in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,o)&&!A.hasOwnProperty(o)&&(l[o]=t[o]);var s=arguments.length-2;if(1===s)l.children=r;else if(1<s){for(var u=Array(s),c=0;c<s;c++)u[c]=arguments[c+2];l.children=u}if(e&&e.defaultProps)for(o in s=e.defaultProps)void 0===l[o]&&(l[o]=s[o]);return{$$typeof:n,type:e,key:a,ref:i,props:l,_owner:S.current}}function I(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var x=/\/+/g;function E(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 C(e,t,o,l,a){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){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=""===l?"."+E(s,0):l,k(a)?(o="",null!=e&&(o=e.replace(x,"$&/")+"/"),C(a,t,o,"",(function(e){return e}))):null!=a&&(I(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(x,"$&/")+"/")+e)),t.push(a)),1;if(s=0,l=""===l?".":l+":",k(e))for(var u=0;u<e.length;u++){var c=l+E(i=e[u],u);s+=C(i,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;!(i=e.next()).done;)s+=C(i=i.value,t,o,c=l+E(i,u++),a);else if("object"===i)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 C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function P(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 O={current:null},D={transition:null},N={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:D,ReactCurrentOwner:S};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(!I(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=_,t.StrictMode=l,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=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),l=e.key,a=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,i=S.current),void 0!==t.key&&(l=""+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:l,ref:a,props:o,_owner:i}},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=q,t.createFactory=function(e){var t=q.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=I,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},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=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return O.current.useCallback(e,t)},t.useContext=function(e){return O.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return O.current.useDeferredValue(e)},t.useEffect=function(e,t){return O.current.useEffect(e,t)},t.useId=function(){return O.current.useId()},t.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return O.current.useMemo(e,t)},t.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},t.useRef=function(e){return O.current.useRef(e)},t.useState=function(e){return O.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return O.current.useTransition()},t.version="18.2.0"},1504:(e,t,n)=>{"use strict";e.exports=n(3028)},7328: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,l=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,l=e}finally{try{!r&&i.return&&i.return()}finally{if(o)throw l}}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),l=o[0],a=o[1];return r?null===a||a===n[l]-1?null===(l=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(l))?[null,null]:[l,0]:[l,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),l=o[0],a=o[1];return r?null===a||0===a?null===(l=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(l))?[null,null]:[l,n[l]-1]:[l,a-1]:0===n||0===a?[null,null]:null===a?[null,n-1]:[null,a-1]},isLast:function(e){return null===o(e)[1]}}}},724: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}},2084:(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,l(n)))}return e}function l(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 l=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(l.exports,l,l.exports,n),l.loaded=!0,l.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e=wp.i18n,t=wp.blocks;var r=n(5144),o=n.n(r);const l=wp.hooks,a=wp.data;var i,s=n(1504);function u(){return u=Object.assign?Object.assign.bind():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)}const c=e=>s.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),i||(i=s.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 p;function d(){return d=Object.assign?Object.assign.bind():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},d.apply(this,arguments)}const m=e=>s.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),p||(p=s.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 b;function f(){return f=Object.assign?Object.assign.bind():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},f.apply(this,arguments)}const g=e=>s.createElement("svg",f({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),b||(b=s.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"}))),h="desktop",y={desktop:{label:(0,e.__)("Desktop","qi-blocks"),icon:wp.element.createElement(c,null)},tablet:{label:(0,e.__)("Tablet","qi-blocks"),icon:wp.element.createElement(m,null)},mobile:{label:(0,e.__)("Mobile","qi-blocks"),icon:wp.element.createElement(g,null)}};let _=h;const v=()=>_,k=wp.components,w=e=>{const t={...e},{blockAttributeKey:n,blockAttributes:r,setAttributes:o,repeater:l,repeaterItemIndex:a,repeaterItemKey:i,repeaterSetAttributes:s,repeaterGetAttributes:u}=t;return t.getAttributeValue=()=>{let e=r[n];return l&&(e=u(i,a)),e||!1},t.setAttributeValue=e=>{l?s(i,e,a):o({[n]:e})},wp.element.createElement("div",{className:"qodef-on-off-option"},wp.element.createElement(k.ToggleControl,{label:t.label,help:t.help,checked:t.getAttributeValue(),onChange:()=>t.setAttributeValue(!t.getAttributeValue())}))};w.defaultProps={label:(0,e.__)("Show","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const S=w,A=[{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"}],q=e=>{const t={...e},{label:n,description:r,blockAttributeKeys:o,blockAttributes:l,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(S,{label:e.label,blockAttributeKey:e.blockAttributeKey,blockAttributes:l,setAttributes:a})))))};q.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:A,blockAttributes:{},setAttributes:()=>{}};const I=(e,t="")=>{const n=e=>O(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 A.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(" ")},x=(e,t="")=>{let n=["qodef-block-container"];return V(e.uniqueClass,"all")&&n.push(e.uniqueClass),n.push(I(e,t)),n.join(" ")},E=(e,t="")=>{let n={};const r=((e,t="")=>{const n=(e,n="")=>O(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)],l=e[n("BlockCustomWidthDecimal",t)],a=e[n("BlockCustomWidthUnit",t)];B(a)&&o?r["data-width"+(t?"-"+t.toLowerCase():"")]=parseInt(o,10)+a:M(a)&&l&&(r["data-width"+(t?"-"+t.toLowerCase():"")]=parseFloat(l)+a)})),r})(e,t);return r&&(n={...n,...r}),n},C=(e,t="",n=[])=>P(e,t,n),T=(e,t,n=[])=>{if(!e)return"";let r=[`qi-block-${e}`,"qodef-block","qodef-m"];return V(t.attributes.className,"all")&&r.push(t.attributes.className),n&&(r=[...r,...n]),r.join(" ")},P=(e,t="",n=[])=>{const r=e=>O(t,e);if(!e)return"";let o=[];return V(e[r("cssId")],"all")&&o.push(e[r("cssId")]),n&&(o=[...o,...n]),o.join(" ")},O=(t,n,r)=>(t=t||"",n=n||"",r=r||"",o()((0,e.sprintf)("%s%s%s",t,n,r))),D=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",N=e=>e&&h!==e?D(e):"",R=(e,t)=>{let n=e.desktop;return"mobile"===t&&(n={...n,...e.tablet}),{...n,...e[t]}},L=(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},B=e=>["px"].includes(e),M=e=>["em","rem","%","vw","vh"].includes(e),j=(e,t="integer")=>{let n="";return 0===e||"0"===e?n=0:e&&(n=parseInt(e,10),"decimal"===t&&(n=parseFloat(e))),n},V=(e,t="")=>{let n=void 0!==e&&""!==e;return"all"===t&&(n=void 0!==e&&e),n},F=e=>{let t="";return 0===e||"0"===e?t=0:e&&(t=e),t},U=(t,n=!0,r=[])=>{let o=[],a=[];if(t){switch(n&&(o=[{value:"",label:(0,e.__)("Default","qi-blocks")}]),t){case"no_yes":a=[{value:"no",label:(0,e.__)("No","qi-blocks")},{value:"yes",label:(0,e.__)("Yes","qi-blocks")}];break;case"yes_no":a=[{value:"yes",label:(0,e.__)("Yes","qi-blocks")},{value:"no",label:(0,e.__)("No","qi-blocks")}];break;case"link_target":a=[{value:"_self",label:(0,e.__)("Same Window","qi-blocks")},{value:"_blank",label:(0,e.__)("New Window","qi-blocks")}];break;case"column_gap":a=[{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":a=[{value:"predefined",label:(0,e.__)("Predefined","qi-blocks")},{value:"custom",label:(0,e.__)("Custom","qi-blocks")}];break;case"masonry_image_sizes":a=[{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":a=[{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":a=[{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":a=[{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":a=[{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":a=[{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":a=[{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":a=[{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":a=[{value:"scroll",label:(0,e.__)("Scroll","qi-blocks")},{value:"fixed",label:(0,e.__)("Fixed","qi-blocks")}];break;case"background_repeat":a=[{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":a=[{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":a=[{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":a=[{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":a=[{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":a=[{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":a=[{value:"random",label:(0,e.__)("Random","qi-blocks")},{value:"ms",label:(0,e.__)("Set ms","qi-blocks")}];break;case"responsive_screens":a=[{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":a=[{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":a=[{value:"desc",label:(0,e.__)("Descending","qi-blocks")},{value:"asc",label:(0,e.__)("Ascending","qi-blocks")}];break;case"border_style":a=[{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,...a],r&&(o=[...o,...r])}return(0,l.applyFilters)("qi-blocks-filter-options-pool",o)},H=(e,t="",n={cssProp:"",value:""})=>{const{attributes:r,blockAttrName:o,cssProp:l}=e,a=V(e,"all")&&void 0!==e.direction&&e.direction?D(e.direction):"",i=!!V(e,"all")&&(e.customUnitValue??!1);let s={},u={},c={};return Object.entries(y).map((([e])=>{let p=N(e),d="",m=o+a+p,b=o+a+"Decimal"+p,f=r[o+"Unit"+p];(V(r[m])||V(r[b]))&&(B(f)&&V(r[m])&&!i?d=j(r[m])+f:M(f)&&V(r[b])&&!i?d=j(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[l]=t?g(d):d,n.cssProp&&n.value&&(s[n.cssProp]=n.value);break;case"tablet":u[l]=t?g(d):d,n.cssProp&&n.value&&(u[n.cssProp]=n.value);break;case"mobile":c[l]=t?g(d):d,n.cssProp&&n.value&&(c[n.cssProp]=n.value)}})),{desktop:s,tablet:u,mobile:c}},z=()=>({hideOnDesktop:{type:"boolean",default:!1},hideOnTablet:{type:"boolean",default:!1},hideOnMobile:{type:"boolean",default:!1}}),K=e=>{const{attrNameTemplate:t,attrName:n}=e,r=e=>O(t,n,e),o=!V(e,"all")||(e.allowUnitControl??!0),l=V(e,"all")&&e.disableDirections||[];let a={};return["Top","Right","Bottom","Left"].map((e=>{l.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};K.defaultProps={attrNameTemplate:"",attrName:"",allowUnitControl:!0};const G=K,W=e=>{const{blockAttributeKey:t}=e,n=!!V(e,"all")&&(e.allowScreens??!1),r=!V(e,"all")||(e.allowUnits??!0),o=V(e,"all")&&e.optionType||"integer",l=V(e,"all")&&e.defaultValue||"",a="decimal"===o?l:"";let i={};return"integer"===o&&(i[t]={type:"number",default:l}),i[O(t,"Unit")]={type:"string",default:"px"},(r||"decimal"===o)&&(i[O(t,"Decimal")]={type:"number",default:a}),n&&(i[O(t,"Tablet")]={type:"number",default:""},i[O(t,"Mobile")]={type:"number",default:""},i[O(t,"UnitTablet")]={type:"string",default:"px"},i[O(t,"UnitMobile")]={type:"string",default:"px"},r&&(i[O(t,"DecimalTablet")]={type:"number",default:""},i[O(t,"DecimalMobile")]={type:"number",default:""})),i};W.defaultProps={allowScreens:!1,allowUnits:!0};const $=W,Y=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=V(e,"all")&&e.attrName||"Background",r=e=>O(t,n+e),o=$({blockAttributeKey:r("XPosition"),allowScreens:!0}),l=$({blockAttributeKey:r("YPosition"),allowScreens:!0}),a=$({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,...l,[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}};Y.defaultProps={attrNameTemplate:"",attrName:"Background"};const X=Y,Z=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=e=>O(t,e),r=!!V(e,"all")&&(e.includeVideoBG??!1),o=X({attrNameTemplate:t});let l={[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:""}}};l={...l,...e}}return l};Z.defaultProps={attrNameTemplate:"",includeVideoBG:!1};const J=Z,Q=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=V(e,"all")&&e.attrName||"",r=V(e,"all")&&e.defaultValue||"",o=e=>O(t,n+e);return{[o("")]:{type:"string",default:r},[o("Tablet")]:{type:"string",default:""},[o("Mobile")]:{type:"string",default:""}}};Q.defaultProps={attrNameTemplate:"",attrName:"",defaultValue:""};const ee=Q,te=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=V(e,"all")&&e.disableWidthDirections||[],r=!V(e,"all")||(e.allowBorderColor??!0),o=!V(e,"all")||(e.allowBorderRadius??!0),l=e=>O(t,e),a=G({attrNameTemplate:t,attrName:"BorderWidth",disableDirections:n,allowUnitControl:!1}),i=r?{[l("BorderColor")]:{type:"string",default:""}}:{},s=o?G({attrNameTemplate:t,attrName:"BorderRadius"}):{};return{[l("BorderStyle")]:{type:"string",default:""},...i,...a,...s}};te.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0};const ne=te,re=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=e=>O(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:""}}};re.defaultProps={attrNameTemplate:""};const oe=re,le=e=>{const t=V(e,"all")&&e.excludePanels||[],n=V(e,"all")&&e.includePanels||[];let r=n&&n.length?n:["advanced","motion-effects","background","border","positioning","responsive"];const o=e=>O("",e);t&&t.length&&t.forEach((e=>{r.splice(r.indexOf(e),1)}));let l={};const a=z();if(r.includes("advanced")){const e=G({attrName:o("Margin")}),t=G({attrName:o("Padding")});l={...l,...e,...t,[o("zIndex")]:{type:"number",default:""},[o("cssId")]:{type:"string",default:""},[o("cssClasses")]:{type:"string",default:""}}}if(r.includes("motion-effects")&&(l={...l,[o("EntranceAnimation")]:{type:"string",default:""},[o("EntranceAnimationDuration")]:{type:"string",default:"normal"},[o("EntranceAnimationDelay")]:{type:"number",default:""}}),r.includes("background")){const e=J({attrNameTemplate:"Advanced"});l={...l,...e}}if(r.includes("border")){const e=ne({attrNameTemplate:"Advanced"}),t=oe({attrNameTemplate:"Advanced"});l={...l,...e,...t}}if(r.includes("positioning")){const e=ee({attrName:o("BlockWidth")}),t=$({blockAttributeKey:o("BlockCustomWidth"),allowScreens:!0}),n=$({blockAttributeKey:o("PositionHorizontalOffset"),allowScreens:!0}),r=$({blockAttributeKey:o("PositionVerticalOffset"),allowScreens:!0});l={...l,...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")&&(l={...l,...a}),l};le.defaultProps={excludePanels:[],includePanels:[]};const ae=le,ie=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=V(e,"all")&&e.defaultValue||"",r="HorizontalAlignment";let o={};return o[O(t,r)]={type:"string",default:n},o[O(t,r,"Tablet")]={type:"string",default:""},o[O(t,r,"Mobile")]={type:"string",default:""},o};ie.defaultProps={attrNameTemplate:""};const se=ie,ue=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=e=>O(t,e),r=$({blockAttributeKey:n("FontSize"),allowScreens:!0}),o=$({blockAttributeKey:n("LineHeight"),allowScreens:!0}),l=$({blockAttributeKey:n("LetterSpacing"),allowScreens:!0});return{[n("FontFamily")]:{type:"string",default:""},...r,[n("FontWeight")]:{type:"string",default:""},[n("TextTransform")]:{type:"string",default:""},[n("FontStyle")]:{type:"string",default:""},[n("TextDecoration")]:{type:"string",default:""},...o,...l}};ue.defaultProps={attrNameTemplate:""};const ce=ue,pe=ae(),de=se({attrNameTemplate:"Text"}),me=ce({attrNameTemplate:"Digit"}),be=ce({attrNameTemplate:"Label"}),fe=$({blockAttributeKey:"labelMarginTop",allowScreens:!0}),ge=J(),he=$({blockAttributeKey:"itemWidth",allowScreens:!0}),ye=$({blockAttributeKey:"itemHeight",allowScreens:!0}),_e=G({attrNameTemplate:"Item",attrName:"Margin"}),ve=ee({attrName:"justifyContent",defaultValue:"space-between"}),ke=(new Date).getTime()+1e10,we={uniqueClass:{type:"string",default:""},date:{type:"string",default:new Date(ke)},format:{type:"string",default:""},monthSingularLabel:{type:"string",default:""},monthPluralLabel:{type:"string",default:""},daySingularLabel:{type:"string",default:""},dayPluralLabel:{type:"string",default:""},hourSingularLabel:{type:"string",default:""},hourPluralLabel:{type:"string",default:""},minuteSingularLabel:{type:"string",default:""},minutePluralLabel:{type:"string",default:""},secondSingularLabel:{type:"string",default:""},secondPluralLabel:{type:"string",default:""},...ve,...pe,...de,digitColor:{type:"string",default:""},...me,labelColor:{type:"string",default:""},...be,...fe,...ge,...he,...ye,..._e};var Se=n(948),Ae=n.n(Se),qe=n(7060),Ie=n.n(qe);const xe=wp.blockEditor,Ee=wp.compose,Ce=wp.element;var Te=n(2084),Pe=n.n(Te);const Oe=e=>{const t=t=>O(e.attrNameTemplate,e.attrName,t),n=V(e,"all")&&void 0!==e.disableDirections&&e.disableDirections.length>0?e.disableDirections:[],r=V(e,"all")&&void 0!==e.isImportant&&e.isImportant?" !important":"",{blockAttributes:o}=e,l=["Top","Right","Bottom","Left"];let a={},i={},s={};return Object.entries(y).map((([u])=>{const c=N(u),p=t("Unit"+c),d="p"===o[p]?"%":o[p]||"px";[...l].map(((p,m)=>{const b=o[t(p+c)],f=o[t(`${p}Decimal`+c)];if(V(b)||V(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?l[m-1]:p,r=m%2?p:l[l.length-m-1],e=`${n}${r}`,t=`border${e}Radius`}}else t=e.attrName?`${o}${p}`:p.toLowerCase();let c="";if(B(d)&&""!==b?c=n.length>0&&n.includes(p)?"":parseInt(b,10)+d:M(d)&&""!==f&&(c=n.length>0&&n.includes(p)?"":parseFloat(f)+d),c)switch(u){case"desktop":a[t]=c+r;break;case"tablet":i[t]=c+r;break;case"mobile":s[t]=c+r}}}))})),{desktop:a,tablet:i,mobile:s}};Oe.defaultProps={attrNameTemplate:"",attrName:"",blockAttributes:{},disableDirections:[],isImportant:!1};const De=Oe,Ne=e=>{const{blockAttributes:t}=e,n=V(e,"all")&&e.attrNameTemplate||"",r=V(e,"all")&&e.attrName||"Background",o=(e,t)=>O(n,r+e,t);let l={},a={},i={};return t[o("Attachment")]&&(l.backgroundAttachment=t[o("Attachment")]),Object.entries(y).map((([e])=>{let n=N(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="",l="";(t[o("XPosition",n)]||t[o("XPositionDecimal",n)])&&(B(t[o("XPositionUnit",n)])&&t[o("XPosition",n)]?e=parseInt(t[o("XPosition",n)],10)+t[o("XPositionUnit",n)]:M(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)])&&(B(t[o("YPositionUnit",n)])&&t[o("YPosition",n)]?l=parseInt(t[o("YPosition",n)],10)+t[o("YPositionUnit",n)]:M(t[o("YPositionUnit",n)])&&t[o("YPositionDecimal",n)]&&(l=parseFloat(t[o("YPositionDecimal",n)])+t[o("YPositionUnit",n)])),""===e&&""===l||(r.backgroundPosition=e+" "+l)}else t[o("Position",n)]&&(r.backgroundPosition=t[o("Position",n)]);"custom"===t[o("Size",n)]?(t[o("SizeWidth",n)]||t[o("SizeWidthDecimal",n)])&&(B(t[o("SizeWidthUnit",n)])&&t[o("SizeWidth",n)]?r.backgroundSize=parseInt(t[o("SizeWidth",n)],10)+t[o("SizeWidthUnit",n)]+" auto":M(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":l[t]=n;break;case"tablet":a[t]=n;break;case"mobile":i[t]=n}}))})),{desktop:l,tablet:a,mobile:i}};Ne.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{}};const Re=Ne,Le=e=>{const{blockAttributes:t}=e,n=V(e,"all")&&e.attrNameTemplate||"",r=(e,t)=>O(n,e,t),o=t[r("BackgroundType")]||"";let l={},a={},i={};if("gradient"===o){let e={type:"linear",position:"",color_1:"",location_1:"",color_2:"",location_2:""};t[r("BackgroundGradientColor1")]&&(e.color_1=t[r("BackgroundGradientColor1")]),V(t[r("BackgroundGradientLocation1")])&&(e.location_1=j(t[r("BackgroundGradientLocation1")])+"%"),t[r("BackgroundGradientColor2")]&&(e.color_2=t[r("BackgroundGradientColor2")]),V(t[r("BackgroundGradientLocation2")])&&(e.location_2=j(t[r("BackgroundGradientLocation2")])+"%"),t[r("BackgroundGradientType")]&&(e.type=t[r("BackgroundGradientType")]),"linear"===e.type&&""!==t[r("BackgroundGradientTypeAngle")]?e.position=j(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?(l.backgroundColor="transparent",l.backgroundImage=`${e.type}-gradient(${e.position}, ${e.color_1} ${e.location_1}, ${e.color_2} ${e.location_2})`):e.color_1&&(l.backgroundColor=e.color_1)}else"video"===o?!t[r("BackgroundVideoPlayOnMobile")]&&t[r("BackgroundVideoFallbackImage")]&&t[r("BackgroundVideoFallbackImage")].url&&(a.backgroundImage=`url(${t[r("BackgroundVideoFallbackImage")].url})`,a.backgroundPosition="center",a.backgroundSize="cover"):(t[r("BackgroundColor")]&&(l.backgroundColor=t[r("BackgroundColor")]),i=Re({attrNameTemplate:n,blockAttributes:t}));return Ie()({desktop:l,tablet:{},mobile:a},i)};Le.defaultProps={attrNameTemplate:"",blockAttributes:{}};const Be=Le,Me=e=>{const{blockAttributes:t}=e,n=V(e,"all")&&e.attrNameTemplate||"",r=V(e,"all")&&e.disableWidthDirections||[],o=!V(e,"all")||(e.allowBorderColor??!0),l=(e,t)=>O(n,e,t);let a={},i={};const s=!V(e,"all")||(e.allowBorderRadius??!0)?De({blockAttributes:t,attrNameTemplate:n,attrName:"BorderRadius",disableDirections:r}):{};return t[l("BorderStyle")]&&(a.borderStyle=t[l("BorderStyle")],o&&t[l("BorderColor")]&&(a.borderColor=t[l("BorderColor")]),i=De({attrNameTemplate:n,attrName:"BorderWidth",blockAttributes:t})),Ie()({desktop:a,tablet:{},mobile:{}},i,s)};Me.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0,blockAttributes:{}};const je=Me,Ve=e=>{const{blockAttributes:t,excludeOptions:n}=e,r=V(e,"all")&&e.attrNameTemplate||"",o=(e,t)=>O(r,e,t);let l={},a={x:0,y:0,blur:0,spread:0,color:"",position:""};var i;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")]),i="position",n&&n.length&&n.includes(i)||!t[o("BoxShadowPosition")]||(a.position=t[o("BoxShadowPosition")]),a.color&&(l.boxShadow=a.x+"px "+a.y+"px "+a.blur+"px "+a.spread+"px "+a.color+" "+a.position),{desktop:l,tablet:{},mobile:{}}};Ve.defaultProps={attrNameTemplate:"",blockAttributes:{}};const Fe=Ve,Ue=e=>{const{blockAttributes:t}=e,n=(e,t="")=>O("",e,t),r=V(e,"all")&&e.excludePanels||[],o=V(e,"all")&&e.includePanels||[];let l=o&&o.length?o:["advanced","motion-effects","background","border","positioning","responsive"];r&&r.length&&r.forEach((e=>{l.splice(l.indexOf(e),1)}));let a={},i={},s={},u={},c={};l.includes("advanced")&&(V(t[n("zIndex")])&&(a.zIndex=j(t[n("zIndex")])),u=De({attrName:n("Margin"),blockAttributes:t}),c=De({attrName:n("Padding"),blockAttributes:t})),l.includes("motion-effects")&&void 0!==t[n("EntranceAnimation")]&&""!==t[n("EntranceAnimation")]&&t[n("EntranceAnimationDelay")]&&(a.animationDelay=j(t[n("EntranceAnimationDelay")])+"ms");let p={};l.includes("background")&&(p=Be({attrNameTemplate:"Advanced",blockAttributes:t}));let d={};if(l.includes("border")){const e=je({attrNameTemplate:"Advanced",blockAttributes:t}),n=Fe({attrNameTemplate:"Advanced",blockAttributes:t});d=Ie()(e,n)}if(l.includes("positioning")){V(t[n("BlockPosition")])&&(a.position=t[n("BlockPosition")]);const e=t[n("PositionHorizontalOrientation")],r=t[n("PositionVerticalOrientation")];Object.entries(y).map((([o])=>{let l=N(o),u={};"custom"!==t[n("BlockWidth")]&&"custom"!==t[n("BlockWidth",l)]||!t[n("BlockCustomWidth",l)]&&!t[n("BlockCustomWidthDecimal",l)]||(B(t[n("BlockCustomWidthUnit",l)])&&t[n("BlockCustomWidth",l)]?(u.width=parseInt(t[n("BlockCustomWidth",l)],10)+t[n("BlockCustomWidthUnit",l)],u.maxWidth=parseInt(t[n("BlockCustomWidth",l)],10)+t[n("BlockCustomWidthUnit",l)]):M(t[n("BlockCustomWidthUnit",l)])&&t[n("BlockCustomWidthDecimal",l)]&&(u.width=parseFloat(t[n("BlockCustomWidthDecimal",l)])+t[n("BlockCustomWidthUnit",l)],u.maxWidth=parseFloat(t[n("BlockCustomWidthDecimal",l)])+t[n("BlockCustomWidthUnit",l)])),""===F(t[n("PositionHorizontalOffset",l)])&&""===F(t[n("PositionHorizontalOffsetDecimal",l)])||(B(t[n("PositionHorizontalOffsetUnit",l)])&&""!==F(t[n("PositionHorizontalOffset",l)])?u[e]=parseInt(t[n("PositionHorizontalOffset",l)],10)+t[n("PositionHorizontalOffsetUnit",l)]:M(t[n("PositionHorizontalOffsetUnit",l)])&&""!==F(t[n("PositionHorizontalOffsetDecimal",l)])&&(u[e]=parseFloat(t[n("PositionHorizontalOffsetDecimal",l)])+t[n("PositionHorizontalOffsetUnit",l)])),""===F(t[n("PositionVerticalOffset",l)])&&""===F(t[n("PositionVerticalOffsetDecimal",l)])||(B(t[n("PositionVerticalOffsetUnit",l)])&&""!==F(t[n("PositionVerticalOffset",l)])?u[r]=parseInt(t[n("PositionVerticalOffset",l)],10)+t[n("PositionVerticalOffsetUnit",l)]:M(t[n("PositionVerticalOffsetUnit",l)])&&""!==F(t[n("PositionVerticalOffsetDecimal",l)])&&(u[r]=parseFloat(t[n("PositionVerticalOffsetDecimal",l)])+t[n("PositionVerticalOffsetUnit",l)])),Object.keys(u).length>0&&Object.entries(u).map((([e,t])=>{switch(o){case"desktop":a[e]=t;break;case"tablet":i[e]=t;break;case"mobile":s[e]=t}}))}))}return a={desktop:a,tablet:i,mobile:s},Ie()(a,u,c,p,d)};Ue.defaultProps={blockAttributes:{},excludePanels:[],includePanels:[]};const He=Ue,ze=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:Pe()("qodef-unit",{"qodef--selected":("p"===e?"%":e)===n}),onClick:r,"data-unit":"p"===e?"%":e},t)))))};ze.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 Ke=ze;class Ge extends Ce.Component{constructor(){super(...arguments),this.state={screen:h,isScreenPickerOpen:!1,isMouseOver:!1}}onChangeScreen(e,t){const n=this;n.state.isScreenPickerOpen?(n.props.onChangeScreen(e),n.setState({screen:e,isScreenPickerOpen:!1}),_=e,!t&&n.changePreviewScreen(e),(0,l.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,l.addAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`,this.onOtherScreenChange.bind(this))}componentWillUnmount(){const{instanceId:e}=this.props;(0,l.removeAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`)}changeScreenControls(e){v()!==e.previewScreen&&this.onChangeScreen(e.previewScreen,!0)}changePreviewScreen(e){if(e!==this.props.previewScreen){const t=(0,a.dispatch)("core/edit-post")||"",n=(0,a.dispatch)("core/edit-site")||"";let r;if(t){let{__experimentalSetPreviewDeviceType:e}=t;r=e}if(n){const{__experimentalSetPreviewDeviceType:e}=n;r=e}r&&r(D(e))}}render(){const e={...this.props},t={...this.state},{label:n,screens:r,isWidgetsArea:o,previewScreen:l}=e;let a=!1;return(r.length<1||o)&&(a=!0),h!==l&&t.screen!==l&&this.onOtherScreenChange(l),this.changeScreenControls(e),wp.element.createElement("div",{className:"qodef-screens-option"},h!==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(k.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))))}}Ge.defaultProps={label:"",screens:y,isWidgetsArea:!1,previewScreen:"desktop",onChangeScreen:()=>{}};const We=(0,a.withSelect)((e=>{let t="desktop";return e("core/edit-post")&&(t=e("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase()),e("core/edit-site")&&(t=e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{isWidgetsArea:e("core/edit-widgets")&&!e("core/edit-post"),previewScreen:t}}))((0,Ee.withInstanceId)(Ge));class $e extends Ce.Component{constructor(){super(...arguments),this.state={screen:v(),linkedInputs:!1}}getScreenLabelSuffix(e){const t=e||this.state.screen;return N(t)}getAttributeValue(e,t=""){const{blockAttributes:n,allowScreens:r,repeater:o,repeaterItemIndex:l,repeaterItemKey:a,repeaterGetAttributes:i}=this.props;let s=e;r&&t&&(s=e+t);let u=n[s];return o&&(u=i({key:a,childKey:s},l)),F(u)}setAttributeValue(e,t,n=""){const{setAttributes:r,allowScreens:o,repeater:l,repeaterItemIndex:a,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let u=e;o&&n&&(u=e+n),l?s({key:i,childKey:u},t,a):r({[u]:t})}render(){const t={...this.props},{label:n,allowScreens:r,rangeMax:o,rangeMin:l,rangeStep:a,rangeDecimalMax:i,rangeDecimalMin:s,rangeDecimalStep:u,repeater:c}=t,p=e=>O(t.attrNameTemplate,t.attrName,e),d=this.getScreenLabelSuffix(),m=p(),b=p("Unit"+d),f=["Top","Right","Bottom","Left"],g=()=>{const e=this.getAttributeValue(b)||"px";return B(e)},h="margin"===t.attrName.toLowerCase()||t.allowNegativeValues?-1*(g()?o:i):g()?l:s;return t.onChange=(e,t)=>{g()?this.setAttributeValue(p(t),j(e),d):this.setAttributeValue(p(`${t}Decimal`),j(e,"decimal"),d)},t.getValue=e=>{let t;return t=g()?""!==this.getAttributeValue(p(e),d)?parseInt(this.getAttributeValue(p(e),d),10):"":""!==this.getAttributeValue(p(`${e}Decimal`),d)?parseFloat(this.getAttributeValue(p(`${e}Decimal`),d)):"",t},t.getPlaceholderValue=e=>{let t="";return"Tablet"===d?t=g()?""!==this.getAttributeValue(p(e))?parseInt(this.getAttributeValue(p(e)),10):"":""!==this.getAttributeValue(p(`${e}Decimal`))?parseFloat(this.getAttributeValue(p(`${e}Decimal`))):"":"Mobile"===d&&(g()?""!==this.getAttributeValue(p(e),"Tablet")?t=parseInt(this.getAttributeValue(p(e),"Tablet"),10):""!==this.getAttributeValue(p(e))&&(t=parseInt(this.getAttributeValue(p(e)),10)):""!==this.getAttributeValue(p(`${e}Decimal`),"Tablet")?t=parseInt(this.getAttributeValue(p(`${e}Decimal`),"Tablet"),10):""!==this.getAttributeValue(p(`${e}Decimal`))&&(t=parseInt(this.getAttributeValue(p(`${e}Decimal`)),10))),t},t.getRangeValue=()=>{let e="";return[...f].some((n=>{t.disableDirections.includes(n)||(e=t.getValue(n))})),e},t.onRangeChange=e=>{[...f].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||[...f].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=c?200:0,n=e.target.getAttribute("data-unit"),r=this.getAttributeValue(b)||"px";this.setAttributeValue(b,n),setTimeout((()=>{n!==r&&[...f].map((e=>{const t=m+e,o=`${t}Decimal`;let l=t+d,a=o+d;"px"!==n&&(l=o+d),"px"===r&&(a=t+d,this.setAttributeValue(a,"")),this.setAttributeValue(l,this.getAttributeValue(a))}))}),t)},wp.element.createElement(k.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(We,{label:n,onChangeScreen:t.onChangeScreen})):wp.element.createElement("label",{className:"qodef-option-label"},n),t.allowUnitControl&&wp.element.createElement(Ke,{unitType:t.unitType,unitValue:this.getAttributeValue(b),onChangeUnit:t.onChangeUnit}),t.allowLinkedControl&&wp.element.createElement(k.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(k.RangeControl,{min:l,max:g()?o:i,step:g()?a:u,onChange:t.onRangeChange,allowReset:!0,value:t.getRangeValue()}):wp.element.createElement("ul",null,[...f].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(k.TextControl,{type:"number",value:t.getValue(n),placeholder:t.getPlaceholderValue(n),onChange:e=>t.onChange(e,n),label:(0,e.__)(n,"qi-blocks"),min:h,max:g()?o:i,step:g()?a:u}))))))}}$e.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 Ye=$e;class Xe extends Ce.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(){return N(this.state.screen)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:l,repeaterGetAttributes:a}=this.props;let i=e;t&&(i=e+t);let s=n[i];return r&&(s=a({key:l,childKey:i},o)),F(s)}setAttributeValue(e,t,n=this.getScreenLabelSuffix()){const{setAttributes:r,setCustomEventOnChange:o,repeater:l,repeaterItemIndex:a,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let u=e;n&&(u=e+n),l?s({key:i,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(k.BaseControl,{className:"qodef-advanced-select-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},wp.element.createElement(We,{label:t,onChangeScreen:e.onChangeScreen})),wp.element.createElement(k.SelectControl,{value:this.getAttributeValue(n),options:r,onChange:e=>this.setAttributeValue(n,e)}))}}Xe.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},selectOptions:{},setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Ze=Xe,Je=wp.blob;var Qe=n(4300),et=n.n(Qe);class tt extends Ce.Component{constructor(){super(...arguments),this.state={screen:v(),imageId:"",externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return N(this.state.screen)}getAttributeValue(e=this.getScreenLabelSuffix()){const{blockAttributeKey:t,blockAttributes:n,allowScreens:r,repeater:o,repeaterItemIndex:l,repeaterItemKey:a,isSimpleRepeaterValue:i,repeaterGetAttributes:s}=this.props;let u=t;r&&e&&(u=t+e);let c=n[u];if(o){let n=i?null:t;r&&e&&(n=i?this.state.screen:u),c=s({key:a,childKey:n},l)||{}}return F(c)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:n,allowScreens:r,repeater:o,repeaterItemIndex:l,repeaterItemKey:a,isSimpleRepeaterValue:i,repeaterSetAttributes:s}=this.props,u=this.getScreenLabelSuffix();let c=t;if(r&&u&&(c=t+u),o){let n=i?null:t;r&&u&&(n=i?this.state.screen:c),s({key:a,childKey:n},e,l)}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 l=[""];e&&(l.push("Tablet"),l.push("Mobile")),l.map((e=>{const{url:t,id:n}=this.getAttributeValue(e);t&&(0,Je.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:et().sanitize(o.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},o.send())};onSelectImage=({id:e,url:t,alt:n,caption:r,width:o,height:l})=>{t.includes(".svg")?this.setSVGIcon(e,t,n,r):this.setAttributeValue({id:e,url:t,alt:n,caption:r,width:o,height:l}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){const t=setInterval((()=>{(0,a.select)("core").getMedia(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=(0,a.select)("core").getMedia(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=(0,a.select)("core").getMedia(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 l=(0,a.select)("core").getMedia(r.id);if(!l)return[];const i=l.media_details.sizes;if(i&&0===Object.keys(i).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 i){const n=i[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:l,allowedTypes:a,allowScreens:i,allowImageSizes:s}=t,u=this.getAttributeValue(),{id:c,url:p,alt:d,html:m}=u;t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(c)};let b=["qodef-image-option"];return p&&p.includes(".svg")&&b.push("qodef--svg"),wp.element.createElement(k.BaseControl,{className:b.join(" ")},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},i?wp.element.createElement(We,{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),p?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},(0,Je.isBlobURL)(p)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(k.Spinner,null)),wp.element.createElement(xe.MediaUploadCheck,null,wp.element.createElement(xe.MediaUpload,{allowedTypes:a,value:c,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:p,alt:d}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(k.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(k.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(xe.MediaPlaceholder,{allowedTypes:a,icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:l}),s&&c&&!m&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},wp.element.createElement(k.SelectControl,{label:(0,e.__)("Image Size","qi-blocks"),options:this.getImageSizes(),onChange:this.onImageSizeChange,value:void 0!==u.custom_image_size?u.custom_image_size:p})))}}tt.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 nt=(0,a.withSelect)((e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes})))((0,k.withNotices)(tt));class rt extends Ce.Component{constructor(){super(...arguments),this.state={isPickerVisible:!1}}getAttributeValue(){const{defaultColor:e,blockAttributeKey:t,blockAttributes:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:l,isSimpleRepeaterValue:a,repeaterGetAttributes:i}=this.props;let s=n[t];return r&&(s=i({key:l,childKey:a?"":t},o)),s||e}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:l,isSimpleRepeaterValue:a,repeaterSetAttributes:i}=this.props;r?i({key:l,childKey:a?"":t},e,o):n({[t]:e})}onChange=e=>{const{r:t,g:n,b:r,a:o}=e.rgb;let l="rgba("+[t,n,r,o].join(",")+")";this.props.setHEXValue&&(l=e.hex),this.setState({colorReset:!0}),this.setAttributeValue(l)};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(k.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(k.Button,{onClick:this.onClick,className:"qodef-color-indicator-button"},wp.element.createElement(k.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(k.ColorPicker,{color:this.getAttributeValue(),onChangeComplete:this.onChange,disableAlpha:this.props.setHEXValue}),wp.element.createElement(k.Button,{onClick:this.onResetColor,isSecondary:!0},(0,e.__)("Reset Color","qi-blocks"))))}}rt.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 ot=rt;class lt extends Ce.Component{getAttributeValue(){const{blockAttributeKey:e,blockAttributes:t,repeater:n,repeaterItemIndex:r,repeaterItemKey:o,repeaterGetAttributes:l}=this.props;let a=t[e];return n&&(a=l({key:o},r)||{}),F(a)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:n,repeater:r,repeaterItemIndex:o,repeaterItemKey:l,repeaterSetAttributes:a}=this.props;r?a({key:l},e,o):n({[t]:e})}componentDidMount(){const{url:e,id:t}=this.getAttributeValue();e&&(0,Je.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:l,url:a}=this.getAttributeValue();return wp.element.createElement(k.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,Je.isBlobURL)(a)&&wp.element.createElement("div",{className:"qodef-video-option-spinner"},wp.element.createElement(k.Spinner,null)),wp.element.createElement(xe.MediaUploadCheck,null,wp.element.createElement(xe.MediaUpload,{allowedTypes:["video"],value:l,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(k.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Video","qi-blocks"),onClick:t}),wp.element.createElement(k.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Video","qi-blocks"),onClick:this.removeVideo})))}))):wp.element.createElement(xe.MediaPlaceholder,{allowedTypes:["video"],icon:"format-video",onSelect:this.onSelectVideo,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:o}))}}lt.defaultProps={label:(0,e.__)("Video","qi-blocks"),description:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const at=(0,k.withNotices)(lt),it=qiBlocksEditor.vars.defaultFontSize,st=qiBlocksEditor.vars.defaultLineHeight,ut=e=>{const{convertorType:t,value:n,attributeKey:r}=e;let o=1;r.includes("FontSize")||r.includes("fontSize")?o=it:(r.includes("LineHeight")||r.includes("lineHeight"))&&(o=st);const l=e=>Math.round(parseInt(e,10)/o*100)/100,a=e=>Math.round(parseInt(e,10)/o*100)/100,i=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=l(n);break;case"pxToRem":b=a(n);break;case"pxToP":b=i(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=>l(d(e)))(n);break;case"vwToRem":b=(e=>a(d(e)))(n);break;case"vwToP":b=(e=>i(d(e)))(n);break;case"vhToPx":b=m(n);break;case"vhToEm":b=(e=>l(m(e)))(n);break;case"vhToRem":b=(e=>a(m(e)))(n);break;case"vhToP":b=(e=>i(m(e)))(n)}return b};ut.defaultProps={convertorType:"pxToEm"};const ct=ut;class pt extends Ce.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(e){const t=e||this.state.screen;return N(t)}getAttributeValue(e,t=""){const{blockAttributes:n,allowScreens:r,repeater:o,repeaterItemIndex:l,repeaterItemKey:a,repeaterGetAttributes:i}=this.props;let s=e;r&&t&&(s=e+t);let u=n[s];return o&&(u=i({key:a,childKey:s},l)),F(u)}setAttributeValue(e,t,n=this.getScreenLabelSuffix()){const{setAttributes:r,allowScreens:o,repeater:l,repeaterItemIndex:a,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let u=e;o&&n&&(u=e+n),l?s({key:i,childKey:u},t,a):r({[u]:t})}onChangeUnitsValues(e,t,n,r){const o={...this.props},{rangeMax:l,rangeDecimalMax:a,allowUnitsConvertor:i}=o;let s=this.getAttributeValue(t);const u=s;r?(s=parseInt(s,10),s>l&&(s=l)):!r&&s>a&&(s=a),i?["emToRem","remToEm","vwToVh","vhToVw"].includes(n)||(this.setAttributeValue(e,ct({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:l,rangeStep:a,rangeDecimalMax:i,rangeDecimalMin:s,rangeDecimalStep:u,optionType:c,allowReset:p,allowScreens:d,allowUnits:m,repeater:b,repeaterItemKey:f,isSimpleRepeaterValue:g}=e,h=this.getScreenLabelSuffix();let y=b&&!g?f:r;const _=`${y}Decimal`,v=`${y}Unit`,w=`${y}Tablet`,S=`${_}Tablet`,A=`${v}Tablet`,q=`${y}Mobile`,I=`${_}Mobile`,x=`${v}Mobile`;return e.onChangeScreen=e=>{this.setState({screen:e})},e.onChangeUnit=e=>{e.preventDefault();const t=b?200:0,n=e.target.getAttribute("data-unit"),r=this.getAttributeValue(v,h)||"px";this.setAttributeValue(v,n),setTimeout((()=>{if(n!==r){const e=`${r}To${D(n)}`;let t=y+h,o=_+h;"px"!==n&&(t=_+h,o=y+h),this.onChangeUnitsValues(t,o,e,"px"===n)}}),t)},e.onChange=t=>{this.setAttributeValue(y,t),e.setCustomEventOnChange()},e.onChangeDecimal=t=>{let n=0;"decimal"===c&&void 0===t&&(n=200),setTimeout((()=>{this.setAttributeValue(_,t),e.setCustomEventOnChange()}),n)},e.getPlaceholderValue=e=>{let t="";const n=this.getAttributeValue(y),r=this.getAttributeValue(_),o=this.getAttributeValue(w),l=this.getAttributeValue(S);return"Tablet"===h?e&&""===o?t=n:e||""!==l||(t=r):"Mobile"===h&&(e&&""===this.getAttributeValue(q)?t=""!==o?o:n:e||""!==this.getAttributeValue(I)||(t=""!==l?l:r)),t},wp.element.createElement(k.BaseControl,{className:"qodef-advanced-range-option"},wp.element.createElement("div",{className:"qodef-advanced-range-heading"},d?wp.element.createElement(We,{label:t,onChangeScreen:e.onChangeScreen}):wp.element.createElement("label",{className:"qodef-option-label"},t),m&&wp.element.createElement(Ke,{unitType:n,unitValue:this.getAttributeValue(v,h),onChangeUnit:e.onChangeUnit})),"desktop"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(B(this.getAttributeValue(v))&&"decimal"!==c||!m&&"integer"===c)&&wp.element.createElement(k.RangeControl,{min:l,max:o,step:a,value:this.getAttributeValue(y),onChange:e.onChange,allowReset:p}),(M(this.getAttributeValue(v))||!m&&"decimal"===c)&&wp.element.createElement(k.RangeControl,{min:s,max:i,step:u,value:this.getAttributeValue(_),onChange:e.onChangeDecimal,allowReset:p})),"tablet"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(B(this.getAttributeValue(A))&&"decimal"!==c||!m&&"integer"===c)&&wp.element.createElement(k.RangeControl,{min:l,max:o,step:a,value:this.getAttributeValue(w),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:p}),(M(this.getAttributeValue(A))||!m&&"decimal"===c)&&wp.element.createElement(k.RangeControl,{min:s,max:i,step:u,value:this.getAttributeValue(S),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:p})),"mobile"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(B(this.getAttributeValue(x))&&"decimal"!==c||!m&&"integer"===c)&&wp.element.createElement(k.RangeControl,{min:l,max:o,step:a,value:this.getAttributeValue(q),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:p}),(M(this.getAttributeValue(x))||!m&&"decimal"===c)&&wp.element.createElement(k.RangeControl,{min:s,max:i,step:u,value:this.getAttributeValue(I),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:p})))}}pt.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:y,allowScreens:!1,allowUnits:!0,allowUnitsConvertor:!1,setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const dt=pt,mt=t=>{const n={...t},{attrNameTemplate:r,attrName:o,blockAttributes:l,setAttributes:a,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p,previewScreen:d}=n,m=o||"Background",b=e=>O(r,m+e);n.getAttributeValue=(e,t="")=>{let n=e;t&&(n=e+t);let r=l[n];return i&&(r=p({key:u,childKey:n},s)),F(r)},n.setAttributeValue=(e,t,n="")=>{let r=e;n&&(r=e+n),i?c({key:u,childKey:r},t,s):a({[r]:t})};let f=N(d||v());return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(nt,{label:(0,e.__)(`${m} Image`,"qi-blocks"),blockAttributeKey:b("Image"),blockAttributes:l,setAttributes:a,allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,isSimpleRepeaterValue:!1,repeaterSetAttributes:c,repeaterGetAttributes:p}),n.getAttributeValue(b("Image"))&&n.getAttributeValue(b("Image")).url&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ze,{label:(0,e.__)(`${m} Position`,"qi-blocks"),blockAttributeKey:b("Position"),blockAttributes:l,setAttributes:a,selectOptions:U("background_position",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),(""===f&&"custom"===n.getAttributeValue(b("Position"))||""!==f&&"custom"===n.getAttributeValue(b("Position"),f)||""!==f&&"custom"===n.getAttributeValue(b("Position"))&&["","custom"].includes(n.getAttributeValue(b("Position"),"Tablet"))&&""===n.getAttributeValue(b("Position"),f))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(dt,{label:(0,e.__)("X Position","qi-blocks"),blockAttributeKey:b("XPosition"),setAttributes:a,blockAttributes:l,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"xPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),wp.element.createElement(dt,{label:(0,e.__)("Y Position","qi-blocks"),blockAttributeKey:b("YPosition"),setAttributes:a,blockAttributes:l,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"yPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p})),wp.element.createElement(k.SelectControl,{label:(0,e.__)(`${m} Attachment`,"qi-blocks"),value:n.getAttributeValue(b("Attachment")),options:U("background_attachment")||"",onChange:e=>n.setAttributeValue(b("Attachment"),e)}),wp.element.createElement(Ze,{label:(0,e.__)(`${m} Repeat`,"qi-blocks"),blockAttributeKey:b("Repeat"),blockAttributes:l,setAttributes:a,selectOptions:U("background_repeat"),repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),wp.element.createElement(Ze,{label:(0,e.__)(`${m} Size`,"qi-blocks"),blockAttributeKey:b("Size"),blockAttributes:l,setAttributes:a,selectOptions:U("background_size",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),"custom"===n.getAttributeValue(b("Size"),f)&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(dt,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:b("SizeWidth"),setAttributes:a,blockAttributes:l,rangeMax:1e3,rangeMin:0,rangeDecimalMax:100,rangeDecimalMin:0,unitType:"xPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}))))};mt.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const bt=mt,ft=t=>{const n={...t},{attrNameTemplate:r,blockAttributes:o,setAttributes:l,includeVideoBG:a,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p,previewScreen:d}=n,m=e=>O(r,e);n.getAttributeValue=(e,t="")=>{let n=o[e];if(i){let r=e;t&&(r=e+t),n=p({key:u,childKey:r},s)}return F(n)},n.setAttributeValue=(e,t,n="")=>{if(i){let r=e;n&&(r=e+n),c({key:u,childKey:r},t,s)}else l({[e+n]:t})};const b=[{label:(0,e.__)("Classic","qi-blocks"),value:""},{label:(0,e.__)("Gradient","qi-blocks"),value:"gradient"}];return a&&b.push({label:(0,e.__)("Video","qi-blocks"),value:"video"}),wp.element.createElement("div",{className:"qodef-background-panel"},wp.element.createElement(k.SelectControl,{label:(0,e.__)("Background Type","qi-blocks"),value:n.getAttributeValue(m("BackgroundType")),options:b,onChange:e=>n.setAttributeValue(m("BackgroundType"),e)}),""===n.getAttributeValue(m("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(ot,{label:(0,e.__)("Background Color","qi-blocks"),blockAttributeKey:m("BackgroundColor"),blockAttributes:o,setAttributes:l,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),wp.element.createElement(bt,{attrNameTemplate:r,blockAttributes:o,setAttributes:l,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p,previewScreen:d})),"gradient"===n.getAttributeValue(m("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(ot,{label:(0,e.__)("First Color","qi-blocks"),blockAttributeKey:m("BackgroundGradientColor1"),blockAttributes:o,setAttributes:l,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),wp.element.createElement(k.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:n.getAttributeValue(m("BackgroundGradientLocation1")),onChange:e=>n.setAttributeValue(m("BackgroundGradientLocation1"),e),min:0,max:100,step:1}),wp.element.createElement(ot,{label:(0,e.__)("Second Color","qi-blocks"),blockAttributeKey:m("BackgroundGradientColor2"),blockAttributes:o,setAttributes:l,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),wp.element.createElement(k.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:n.getAttributeValue(m("BackgroundGradientLocation2")),onChange:e=>n.setAttributeValue(m("BackgroundGradientLocation2"),e),min:0,max:100,step:1}),wp.element.createElement(k.SelectControl,{label:(0,e.__)("Gradient Type","qi-blocks"),value:n.getAttributeValue(m("BackgroundGradientType")),options:[{label:(0,e.__)("Linear","qi-blocks"),value:"linear"},{label:(0,e.__)("Radial","qi-blocks"),value:"radial"}],onChange:e=>n.setAttributeValue(m("BackgroundGradientType"),e)}),"linear"===n.getAttributeValue(m("BackgroundGradientType"))&&wp.element.createElement(k.RangeControl,{label:(0,e.__)("Angle","qi-blocks"),value:n.getAttributeValue(m("BackgroundGradientTypeAngle")),onChange:e=>n.setAttributeValue(m("BackgroundGradientTypeAngle"),e),min:0,max:360,step:1}),"radial"===n.getAttributeValue(m("BackgroundGradientType"))&&wp.element.createElement(k.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:n.getAttributeValue(m("BackgroundGradientTypePosition")),options:U("background_position",!1),onChange:e=>n.setAttributeValue(m("BackgroundGradientTypePosition"),e)})),"video"===n.getAttributeValue(m("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(at,{label:(0,e.__)("Video Link","qi-blocks"),description:(0,e.__)("Self hosted video file (mp4 is recommended)","qi-blocks"),blockAttributeKey:m("BackgroundVideoLink"),blockAttributes:o,setAttributes:l,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),wp.element.createElement(k.TextControl,{type:"number",label:(0,e.__)("Start Time","qi-blocks"),help:(0,e.__)("Specify a start time (in seconds)","qi-blocks"),value:n.getAttributeValue(m("BackgroundVideoStartTime")),onChange:e=>n.setAttributeValue(m("BackgroundVideoStartTime"),j(e))}),wp.element.createElement(k.TextControl,{type:"number",label:(0,e.__)("End Time","qi-blocks"),help:(0,e.__)("Specify an end time (in seconds)","qi-blocks"),value:n.getAttributeValue(m("BackgroundVideoEndTime")),onChange:e=>n.setAttributeValue(m("BackgroundVideoEndTime"),j(e))}),wp.element.createElement(S,{label:(0,e.__)("Play Once","qi-blocks"),blockAttributeKey:m("BackgroundVideoPlayOnce"),blockAttributes:o,setAttributes:l,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),wp.element.createElement(S,{label:(0,e.__)("Play On Mobile","qi-blocks"),blockAttributeKey:m("BackgroundVideoPlayOnMobile"),blockAttributes:o,setAttributes:l,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),wp.element.createElement(nt,{label:(0,e.__)("Background Fallback","qi-blocks"),blockAttributeKey:m("BackgroundVideoFallbackImage"),blockAttributes:o,setAttributes:l,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p})))};ft.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},includeVideoBG:!1,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const gt=ft,ht=t=>{const n={...t},{attrNameTemplate:r,blockAttributes:o,setAttributes:l,disableWidthDirections:a,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}=n,d=e=>O(r,e);return n.getAttributeValue=(e,t="")=>{let n=o[e];if(i){let r=e;t&&(r=e+t),n=p({key:u,childKey:r},s)}return F(n)},n.setAttributeValue=(e,t,n="")=>{if(i){let r=e;n&&(r=e+n),c({key:u,childKey:r},t,s)}else l({[e+n]:t})},wp.element.createElement("div",{className:"qodef-border-panel"},wp.element.createElement(k.SelectControl,{label:(0,e.__)("Border Type","qi-blocks"),value:n.getAttributeValue(d("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"},...U("border_style",!1)],onChange:e=>n.setAttributeValue(d("BorderStyle"),e)}),!["","none"].includes(o[d("BorderStyle")])&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ye,{label:(0,e.__)("Border Width","qi-blocks"),attrName:d("BorderWidth"),blockAttributes:o,setAttributes:l,allowUnitControl:!1,disableDirections:a,rangeMax:20,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),(n.allowBorderColor??!0)&&wp.element.createElement(ot,{label:(0,e.__)("Border Color","qi-blocks"),blockAttributeKey:d("BorderColor"),blockAttributes:o,setAttributes:l,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p})),(n.allowBorderRadius??!0)&&wp.element.createElement(Ye,{label:(0,e.__)("Border Radius","qi-blocks"),attrName:d("BorderRadius"),blockAttributes:o,setAttributes:l,unitType:"pxAndPercent",repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}))};ht.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowBorderColor:!0,allowBorderRadius:!0,disableWidthDirections:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const yt=ht,_t=t=>{const n={...t},{attrNameTemplate:r,blockAttributes:o,setAttributes:l,excludeOptions:a}=n,i=e=>O(r,e),[s,u]=(0,Ce.useState)(!1);let c=["qodef-box-shadow-panel"];return n.popup&&c.push("qodef--has-popup"),s&&c.push("qodef--opened"),n.onClick=()=>{u((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)||u(!1)}))}))},wp.element.createElement("div",{className:c.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(k.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(ot,{label:(0,e.__)("Color","qi-blocks"),blockAttributeKey:i("BoxShadowColor"),blockAttributes:o,setAttributes:l,popup:!1}),wp.element.createElement(k.RangeControl,{label:(0,e.__)("Horizontal","qi-blocks"),value:o[i("BoxShadowHorizontal")],onChange:e=>l({[i("BoxShadowHorizontal")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(k.RangeControl,{label:(0,e.__)("Vertical","qi-blocks"),value:o[i("BoxShadowVertical")],onChange:e=>l({[i("BoxShadowVertical")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(k.RangeControl,{label:(0,e.__)("Blur","qi-blocks"),value:o[i("BoxShadowBlur")],onChange:e=>l({[i("BoxShadowBlur")]:e}),min:0,max:100,step:1,allowReset:!0}),wp.element.createElement(k.RangeControl,{label:(0,e.__)("Spread","qi-blocks"),value:o[i("BoxShadowSpread")],onChange:e=>l({[i("BoxShadowSpread")]:e}),min:-100,max:100,step:1,allowReset:!0}),(p="position",!(a&&a.length&&a.includes(p))&&wp.element.createElement(k.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:o[i("BoxShadowPosition")],options:[{label:(0,e.__)("Outline","qi-blocks"),value:""},{label:(0,e.__)("Inset","qi-blocks"),value:"inset"}],onChange:e=>l({[i("BoxShadowPosition")]:e})}))));var p};_t.defaultProps={label:(0,e.__)("Box Shadow","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeOptions:[],popup:!1};const vt=_t;class kt extends Ce.Component{render(){const{blockAttributes:t,setAttributes:n,excludePanels:r,previewScreen:o,blockName:l}=this.props,a=(e,t="")=>O("",e,t),i=["advanced","motion-effects","background","border","positioning","responsive"];r&&r.length&&r.forEach((e=>{i.splice(i.indexOf(e),1)}));let s=N(o);return wp.element.createElement("div",{className:"qodef-advanced-panel"},i.includes("advanced")&&wp.element.createElement(k.PanelBody,{title:(0,e.__)("Advanced","qi-blocks")},wp.element.createElement(Ye,{label:(0,e.__)("Margin","qi-blocks"),attrName:a("Margin"),blockAttributes:t,setAttributes:n}),wp.element.createElement(Ye,{label:(0,e.__)("Padding","qi-blocks"),attrName:a("Padding"),blockAttributes:t,setAttributes:n}),wp.element.createElement(k.TextControl,{type:"number",label:(0,e.__)("Z-Index","qi-blocks"),value:t[a("zIndex")],onChange:e=>n({[a("zIndex")]:j(e)})}),wp.element.createElement(k.TextControl,{label:(0,e.__)("CSS ID","qi-blocks"),value:t[a("cssId")],onChange:e=>n({[a("cssId")]:e})}),wp.element.createElement(k.TextControl,{label:(0,e.__)("CSS Classes","qi-blocks"),value:t[a("cssClasses")],onChange:e=>n({[a("cssClasses")]:e})})),i.includes("motion-effects")&&wp.element.createElement(k.PanelBody,{title:(0,e.__)("Motion Effects","qi-blocks"),initialOpen:!1},wp.element.createElement(k.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(k.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(k.TextControl,{type:"number",label:(0,e.__)("Animation Delay (ms)","qi-blocks"),value:t[a("EntranceAnimationDelay")],min:0,step:100,onChange:e=>{n({[a("EntranceAnimationDelay")]:j(e)}),qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass,!0)}}))),i.includes("background")&&wp.element.createElement(k.PanelBody,{title:(0,e.__)("Background","qi-blocks"),initialOpen:!1},wp.element.createElement(gt,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:n,previewScreen:o})),i.includes("border")&&wp.element.createElement(k.PanelBody,{title:(0,e.__)("Border","qi-blocks"),initialOpen:!1},wp.element.createElement(yt,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:n}),wp.element.createElement(vt,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:n,popup:!0})),i.includes("positioning")&&wp.element.createElement(k.PanelBody,{title:(0,e.__)("Positioning","qi-blocks"),initialOpen:!1},wp.element.createElement(Ze,{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(dt,{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(k.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(k.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(dt,{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(k.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(dt,{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}))),i.includes("responsive")&&wp.element.createElement(k.PanelBody,{title:(0,e.__)("Responsive","qi-blocks"),initialOpen:!1},wp.element.createElement(q,{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,i=l?l.replace("qi-blocks/",""):"",s=n.map(((n,r)=>{let o=n?.link;if(0===r&&"help"===t&&i){const e=qiBlocksEditor.vars.advancedBlockPanel?.blocks[i]||"";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(k.PanelBody,{title:o,className:`qodef-advanced-block-panel-features ${"qodef--"+t} qodef-m`,key:r,initialOpen:a},s)}))))}}kt.defaultProps={blockAttributes:{},setAttributes:()=>{},excludePanels:[],previewScreen:"desktop",blockName:""};const wt=(0,a.withSelect)((e=>{let t="desktop";return e("core/edit-post")&&(t=e("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase()),e("core/edit-site")&&(t=e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:t,blockName:e("core/block-editor")?.getSelectedBlock()?.name}}))(kt);var St=n(8872),At=n.n(St);let qt=[];const It=qiBlocksEditor.vars.systemFontOptions,xt=e=>{let t=!0;return e||(t=!1),It&&It.map((({value:e})=>e)).forEach((n=>{""!==n&&e===n&&(t=!1)})),t},Et=e=>{if(qiBlocksEditor.qodefGetCurrentBlockElement.getIframe()&&(qt=[]),qt.includes(e))return;const t=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument();if(t&&xt(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)}qt.push(e)},Ct=qiBlocksEditor.vars.fontOptions,Tt=e=>{const t=e.trim().toLowerCase(),n=t.length;return 0===n?[]:Ct.filter((e=>!["System","Google"].includes(e.value)&&e.label.toLowerCase().slice(0,n)===t))},Pt=e=>e.value,Ot=e=>wp.element.createElement("div",{className:"qodef-font-family-autosuggest-option","data-label":e.value},e.label);class Dt extends Ce.Component{constructor(){super(...arguments),this.state={value:"",suggestions:[]}}onChange=(e,{newValue:t})=>{let n=t;["System","Google"].includes(n)||(Ct.some((e=>e.value.toLowerCase()===n.toLowerCase()&&(n=e.value,Et(n),!0))),this.props.setAttributes({[this.props.blockAttributeKey]:n}),this.setState({value:n}))};onSuggestionsFetchRequested=({value:e})=>{this.setState({suggestions:""===e?Ct:Tt(e)})};onSuggestionsClearRequested=()=>{this.setState({suggestions:[]})};shouldRenderSuggestions(){return!0}componentDidMount(){""!==this.props.blockAttributes.length&&this.setState({value:this.props.blockAttributes[this.props.blockAttributeKey]||"",suggestions:Ct})}render(){const{label:e}=this.props,{value:t,suggestions:n}=this.state,r={value:t,type:"search",onChange:this.onChange};return wp.element.createElement(k.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(At(),{suggestions:n,onSuggestionsFetchRequested:this.onSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested,shouldRenderSuggestions:this.shouldRenderSuggestions,getSuggestionValue:Pt,renderSuggestion:Ot,inputProps:r})))}}Dt.defaultProps={label:(0,e.__)("Font Family","qi-blocks"),blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{}};const Nt=Dt,Rt=t=>{const n={...t},{attrNameTemplate:r,blockAttributes:o,setAttributes:l,popup:a,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p,allowReset:d}=n,[m,b]=(0,Ce.useState)(!1);let f=["qodef-typography-panel"];a?f.push("qodef--has-popup"):f.push("qodef-base-section-label"),m&&f.push("qodef--opened"),n.onClick=()=>{b((e=>!e)),window.addEventListener("click",(e=>{const t=document.querySelectorAll(".qodef-typography-panel.qodef--opened");t.length&&t.forEach((t=>{t.contains(e.target)||b(!1)}))}))};const g=e=>O(r,e);return n.getAttributeValue=e=>{let t=o[e];return i&&(t=p({key:u,childKey:e},s)),F(t)},n.setAttributeValue=(e,t)=>{i?c({key:u,childKey:e},t,s):l({[e]:t})},wp.element.createElement(k.BaseControl,{label:a?"":n.label,className:f.join(" ")},a&&wp.element.createElement("div",{className:"qodef-typography-panel-heading"},wp.element.createElement("label",{className:"qodef-option-label"},n.label),wp.element.createElement(k.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(Nt,{setAttributes:l,blockAttributes:o,blockAttributeKey:g("FontFamily"),repeater:i,repeaterItemIndex:s,repeaterItemKey:u,repeaterSetAttributes:c,repeaterGetAttributes:p}),wp.element.createElement(dt,{label:(0,e.__)("Font Size","qi-blocks"),blockAttributeKey:g("FontSize"),setAttributes:l,blockAttributes:o,rangeDecimalMax:20,allowScreens:!0,allowUnitsConvertor:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,isSimpleRepeaterValue:!0,repeaterSetAttributes:c,repeaterGetAttributes:p,allowReset:d}),wp.element.createElement(k.SelectControl,{label:(0,e.__)("Weight","qi-blocks"),options:U("font_weight"),value:n.getAttributeValue(g("FontWeight")),onChange:e=>n.setAttributeValue(g("FontWeight"),e)}),wp.element.createElement(k.SelectControl,{label:(0,e.__)("Transform","qi-blocks"),options:U("text_transform"),value:n.getAttributeValue(g("TextTransform")),onChange:e=>n.setAttributeValue(g("TextTransform"),e)}),wp.element.createElement(k.SelectControl,{label:(0,e.__)("Style","qi-blocks"),options:U("font_style"),value:n.getAttributeValue(g("FontStyle")),onChange:e=>n.setAttributeValue(g("FontStyle"),e)}),wp.element.createElement(k.SelectControl,{label:(0,e.__)("Decoration","qi-blocks"),options:U("text_decoration"),value:n.getAttributeValue(g("TextDecoration")),onChange:e=>n.setAttributeValue(g("TextDecoration"),e)}),wp.element.createElement(dt,{label:(0,e.__)("Line Height","qi-blocks"),setAttributes:l,blockAttributes:o,blockAttributeKey:g("LineHeight"),allowScreens:!0,allowUnitsConvertor:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,isSimpleRepeaterValue:!0,repeaterSetAttributes:c,repeaterGetAttributes:p,allowReset:d}),wp.element.createElement(dt,{label:(0,e.__)("Letter Spacing","qi-blocks"),setAttributes:l,blockAttributes:o,blockAttributeKey:g("LetterSpacing"),rangeMin:-10,rangeMax:30,rangeStep:.1,rangeDecimalMin:-10,unitType:"pxEmRem",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:u,isSimpleRepeaterValue:!0,repeaterSetAttributes:c,repeaterGetAttributes:p,allowReset:d})))};Rt.defaultProps={label:(0,e.__)("Typography","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},popup:!1,allowReset:!0,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Lt=Rt;class Bt extends Ce.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(){return N(this.state.screen)}render(){const e={...this.props},{label:t,blockAttributes:n,setAttributes:r,attrNameTemplate:o,excludeDirection:l}=e,a=["left","center","right"].filter((e=>![l].includes(e))),i="HorizontalAlignment",s=O(o,i),u=O(o,i,"Tablet"),c=O(o,i,"Mobile");return e.onChangeScreen=e=>{this.setState({screen:e})},e.onChangeAlignment=e=>{e.preventDefault();const t=this.getScreenLabelSuffix(),n=e.target.getAttribute("data-alignment");r({[`${s}${t}`]:n})},wp.element.createElement(k.BaseControl,{className:"qodef-alignment-horizontal-option"},wp.element.createElement(We,{label:t,onChangeScreen:e.onChangeScreen}),"desktop"===this.state.screen&&wp.element.createElement(k.ButtonGroup,null,a.map(((t,r)=>wp.element.createElement(k.Button,{key:r,href:"#",icon:`editor-align${t}`,className:Pe()("qodef-alignment-horizontal",{"qodef--selected":t===n[s]}),"data-alignment":t,onClick:e.onChangeAlignment})))),"tablet"===this.state.screen&&wp.element.createElement(k.ButtonGroup,null,a.map(((t,r)=>wp.element.createElement(k.Button,{key:r,href:"#",icon:`editor-align${t}`,className:Pe()("qodef-alignment-horizontal",{"qodef--selected":t===n[u]}),"data-alignment":t,onClick:e.onChangeAlignment})))),"mobile"===this.state.screen&&wp.element.createElement(k.ButtonGroup,null,a.map(((t,r)=>wp.element.createElement(k.Button,{key:r,href:"#",icon:`editor-align${t}`,className:Pe()("qodef-alignment-horizontal",{"qodef--selected":t===n[c]}),"data-alignment":t,onClick:e.onChangeAlignment})))))}}Bt.defaultProps={label:(0,e.__)("Alignment","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeDirection:""};const Mt=Bt,jt=e=>{const{attrNameTemplate:t,attributes:n}=e,r=(e,n)=>O(t,e,n);if(!n)return{};let o={},l={},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(y).map((([e])=>{let t=N(e),i={};(n[r("FontSize",t)]||n[r("FontSizeDecimal",t)])&&(B(n[r("FontSizeUnit",t)])&&n[r("FontSize",t)]?i.fontSize=parseInt(n[r("FontSize",t)],10)+n[r("FontSizeUnit",t)]:M(n[r("FontSizeUnit",t)])&&n[r("FontSizeDecimal",t)]&&(i.fontSize=parseFloat(n[r("FontSizeDecimal",t)])+n[r("FontSizeUnit",t)])),(n[r("LineHeight",t)]||n[r("LineHeightDecimal",t)])&&(B(n[r("LineHeightUnit",t)])&&n[r("LineHeight",t)]?i.lineHeight=parseInt(n[r("LineHeight",t)],10)+n[r("LineHeightUnit",t)]:M(n[r("LineHeightUnit",t)])&&n[r("LineHeightDecimal",t)]&&(i.lineHeight=parseFloat(n[r("LineHeightDecimal",t)])+n[r("LineHeightUnit",t)])),""===F(n[r("LetterSpacing",t)])&&""===F(n[r("LetterSpacingDecimal",t)])||(B(n[r("LetterSpacingUnit",t)])&&""!==F(n[r("LetterSpacing",t)])?i.letterSpacing=parseInt(n[r("LetterSpacing",t)],10)+n[r("LetterSpacingUnit",t)]:M(n[r("LetterSpacingUnit",t)])&&""!==F(n[r("LetterSpacingDecimal",t)])&&(i.letterSpacing=parseFloat(n[r("LetterSpacingDecimal",t)])+n[r("LetterSpacingUnit",t)])),Object.keys(i).length>0&&Object.entries(i).map((([t,n])=>{switch(e){case"desktop":o[t]=n;break;case"tablet":l[t]=n;break;case"mobile":a[t]=n}}))})),{desktop:o,tablet:l,mobile:a}},Vt=(0,Ee.createHigherOrderComponent)((e=>class extends Ce.Component{static defaultProps={attributes:{}};componentDidMount(){(e=>{Object.keys(e).filter((e=>e.match(/fontfamily/i))).forEach((t=>{const n=e[t];n&&setTimeout((()=>{Et(n)}),400)}))})(this.props.attributes)}render(){return wp.element.createElement(e,this.props)}}),"withGoogleFont"),Ft=Vt,Ut=(0,Ee.createHigherOrderComponent)((e=>class extends Ce.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:l}=n,a=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument(),i=this.getNewUniqueClass(t);let s=!1;if(o){if(l.includes("qodef-block")||l.includes("qodef-widget")){const e=a.querySelector(`.${l}`);if(e){this.hasParent(e,"wp-block-post-content")||(s=!0)}}e&&a.addEventListener("paste",(()=>{s=!0}))}!o&&l.includes("qodef-template-block")&&(s=!0),""!==l&&l!==i&&a.querySelectorAll(`.${l}`).length>1&&(s=!0),s&&r({uniqueClass:i})}render(){return this.reInitUniqueClass(),wp.element.createElement(e,this.props)}}),"withUniqueClass"),Ht=Ut;function zt(){return zt=Object.assign?Object.assign.bind():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},zt.apply(this,arguments)}let Kt=[],Gt={family:[],weight:[],style:[]};const Wt=e=>{let t="";return Object.entries(e).map((([e,n])=>{if(e.match(/fontfamily/i)){const e=n.replace(/["']/g,"");!Kt.includes(e)&&xt(e)&&(Gt.family.push(e),Kt.push(e))}e.match(/fontweight/i)&&Gt.weight.push(parseInt(n,10)),e.match(/fontstyle/i)&&Gt.style.push(n),t+=`${e.replace(/([A-Z])/g,((e,t,n)=>(n>0?"-":"")+e.toLowerCase()))}: ${n};`})),t},$t=(0,Ee.createHigherOrderComponent)((e=>class extends Ce.Component{addPageStyle(e){if(e){const t=this.postID;let n=this.getPageStyles||[],r={key:this.attributes.uniqueClass,values:[],fonts:[]};Kt=[],Gt={family:[],weight:[],style:[]},e.forEach(((o,l)=>{if(!Object.values(o.styles).every((e=>0===Object.keys(e).length))){const e=["widget","template"].includes(t)?"":`body[class*="-${t}"]`,n=`${e} ${o.selector}`,l=[];"string"!=typeof o.selector&&o.selector.forEach((t=>{t&&l.push(`${e} ${t}`)})),r.values.push({selector:l.length>1?l.join(","):n,styles:Wt(o.styles.desktop||""),tablet_styles:Wt(o.styles.tablet||""),mobile_styles:Wt(o.styles.mobile||""),custom_styles:o.custom_styles||[]}),r.fonts=Gt}if(l===e.length-1)if(n&&n.length){let e=!1;n.map(((t,o)=>{t.key===r.key&&(e=!0,r.values.length?Ae()(t.values,r.values)||(n[o].values=r.values,n[o].fonts=r.fonts):(n[o].values=[],n[o].fonts={family:[],weight:[],style:[]}))})),!e&&r.values.length&&n.push(r)}else"object"==typeof n&&Object.keys(n).length?(n=Object.values(n),n.push(r)):n.push(r);const a=n.filter((e=>e.values.length));qiBlocksEditor.vars.currentPageID=t,qiBlocksEditor.vars.currentPageStyles=a}))}}render(){return wp.element.createElement(e,zt({},this.props,{addPageStyle:this.addPageStyle}))}}),"withStyles"),Yt=(0,Ee.compose)((0,a.withSelect)((e=>{let t=e("core/editor")?.getCurrentPostId()||"widget";const n=!!e("core/edit-site");let r="desktop";return e("core/edit-post")&&(r=e("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase()),n&&(t="template",r=e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:r,postID:t,getPageStyles:e("qi-blocks/data/with-styles").getOptions(t).data,isFullSiteEditor:n}})),Ht,$t);var Xt=n(6860);class Zt extends Ce.Component{componentDidMount(){this.initBlockScript()}componentDidUpdate(e){Ae()(e.attributes,this.props.attributes)||this.initBlockScript()}initBlockScript(){"object"==typeof Xt.c&&Xt.c.initItem(this.props.attributes.uniqueClass,!0)}render(){const{attributes:t,setAttributes:n,previewScreen:r}=this.props,{uniqueClass:o,date:l,format:a,monthSingularLabel:i,monthPluralLabel:s,daySingularLabel:u,dayPluralLabel:c,hourSingularLabel:p,hourPluralLabel:d,minuteSingularLabel:m,minutePluralLabel:b,secondSingularLabel:f,secondPluralLabel:g,labelMarginTopUnit:h,itemWidthUnit:y,itemHeightUnit:_}=t,v=C(t),w=He({blockAttributes:t});let S={className:x(t),style:R(w,r),...E(t)};v&&(S.id=v);const A=Pe()(T("countdown",this.props),"qodef-layout--simple",{[`qodef-hide--${a}`]:a}),q=H({attributes:t,blockAttrName:"justifyContent",cssProp:"justifyContent"});let I=H({attributes:t,blockAttrName:"textHorizontalAlignment",cssProp:"textAlign"}),P=Be({blockAttributes:t}),O=H({attributes:t,blockAttrName:"itemWidth",cssProp:"width"}),D=H({attributes:t,blockAttrName:"itemHeight",cssProp:"height"}),N=De({blockAttributes:t,attrNameTemplate:"Item",attrName:"Margin"}),B=Ie()(I,P,O,D,N),M=H({attributes:t,blockAttrName:"digitColor",cssProp:"color"}),j=jt({attrNameTemplate:"Digit",attributes:t}),V=Ie()(M,j),F=H({attributes:t,blockAttrName:"labelColor",cssProp:"color"}),U=jt({attrNameTemplate:"Label",attributes:t}),z=H({attributes:t,blockAttrName:"labelMarginTop",cssProp:"marginTop"}),K=Ie()(F,U,z);return this.props.addPageStyle([{selector:`.${o}.qodef-block-container`,styles:w},{selector:`.${o} .qi-block-countdown .qodef-m-date`,styles:q},{selector:`.${o} .qi-block-countdown .qodef-digit-wrapper`,styles:B},{selector:`.${o} .qi-block-countdown .qodef-digit`,styles:V},{selector:`.${o} .qi-block-countdown .qodef-label`,styles:K}]),wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(xe.InspectorControls,null,wp.element.createElement(k.TabPanel,{className:"qodef-tab-panel qodef--countdown",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")}]},(o=>wp.element.createElement(wp.element.Fragment,null,"content"===o.name&&wp.element.createElement(k.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(k.PanelBody,{title:(0,e.__)("General","qi-blocks")},wp.element.createElement(k.DateTimePicker,{currentDate:l,onChange:e=>n({date:e})}),wp.element.createElement(k.SelectControl,{label:(0,e.__)("Format","qi-blocks"),value:a,options:[{value:"",label:(0,e.__)("Show All","qi-blocks")},{value:"sec",label:(0,e.__)("Hide Seconds","qi-blocks")},{value:"minsec",label:(0,e.__)("Hide Minutes And Seconds","qi-blocks")},{value:"mon",label:(0,e.__)("Hide Months","qi-blocks")}],onChange:e=>n({format:e})})),wp.element.createElement(k.PanelBody,{title:(0,e.__)("Labels","qi-blocks"),initialOpen:!1},wp.element.createElement(k.TabPanel,{className:"qodef-tab-panel qodef--inner",tabs:[{name:"Singular",title:(0,e.__)("Singular","qi-blocks")},{name:"Plural",title:(0,e.__)("Plural","qi-blocks")}]},(t=>wp.element.createElement(k.Card,{size:"small"},wp.element.createElement(k.CardBody,null,"Singular"===t.name&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(k.TextControl,{label:(0,e.__)("Month Singular Label","qi-blocks"),value:i,onChange:e=>n({monthSingularLabel:e})}),wp.element.createElement(k.TextControl,{label:(0,e.__)("Day Singular Label","qi-blocks"),value:u,onChange:e=>n({daySingularLabel:e})}),wp.element.createElement(k.TextControl,{label:(0,e.__)("Hour Singular Label","qi-blocks"),value:p,onChange:e=>n({hourSingularLabel:e})}),wp.element.createElement(k.TextControl,{label:(0,e.__)("Minute Singular Label","qi-blocks"),value:m,onChange:e=>n({minuteSingularLabel:e})}),wp.element.createElement(k.TextControl,{label:(0,e.__)("Second Singular Label","qi-blocks"),value:f,onChange:e=>n({secondSingularLabel:e})})),"Plural"===t.name&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(k.TextControl,{label:(0,e.__)("Month Plural Label","qi-blocks"),value:s,onChange:e=>n({monthPluralLabel:e})}),wp.element.createElement(k.TextControl,{label:(0,e.__)("Day Plural Label","qi-blocks"),value:c,onChange:e=>n({dayPluralLabel:e})}),wp.element.createElement(k.TextControl,{label:(0,e.__)("Hour Plural Label","qi-blocks"),value:d,onChange:e=>n({hourPluralLabel:e})}),wp.element.createElement(k.TextControl,{label:(0,e.__)("Minute Plural Label","qi-blocks"),value:b,onChange:e=>n({minutePluralLabel:e})}),wp.element.createElement(k.TextControl,{label:(0,e.__)("Second Plural Label","qi-blocks"),value:g,onChange:e=>n({secondPluralLabel:e})})))))))),"style"===o.name&&wp.element.createElement(k.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(k.PanelBody,{title:(0,e.__)("Style","qi-blocks")},wp.element.createElement(Ze,{label:(0,e.__)("Justify Content","qi-blocks"),blockAttributeKey:"justifyContent",blockAttributes:t,setAttributes:n,selectOptions:[{value:"",label:(0,e.__)("Default","qi-blocks")},{value:"space-between",label:(0,e.__)("Space Between","qi-blocks")},{value:"space-around",label:(0,e.__)("Space Around","qi-blocks")},{value:"space-evenly",label:(0,e.__)("Space Evenly","qi-blocks")},{value:"center",label:(0,e.__)("Center","qi-blocks")}]}),wp.element.createElement(Mt,{label:(0,e.__)("Alignment","qi-blocks"),blockAttributes:t,setAttributes:n,attrNameTemplate:"Text"}),wp.element.createElement(ot,{label:(0,e.__)("Digit Color","qi-blocks"),blockAttributeKey:"digitColor",blockAttributes:t,setAttributes:n}),wp.element.createElement(Lt,{label:(0,e.__)("Digit Typography","qi-blocks"),attrNameTemplate:"Digit",blockAttributes:t,setAttributes:n,popup:!0}),wp.element.createElement(ot,{label:(0,e.__)("Label Color","qi-blocks"),blockAttributeKey:"labelColor",blockAttributes:t,setAttributes:n}),wp.element.createElement(Lt,{label:(0,e.__)("Label Typography","qi-blocks"),attrNameTemplate:"Label",blockAttributes:t,setAttributes:n,popup:!0}),wp.element.createElement(dt,{label:(0,e.__)("Label Margin Top","qi-blocks"),blockAttributeKey:"labelMarginTop",setAttributes:n,blockAttributes:t,rangeDecimalMax:"em"===h?10:100,allowScreens:!0,unitType:"space"})),wp.element.createElement(k.PanelBody,{title:(0,e.__)("Item Style","qi-blocks"),initialOpen:!1},wp.element.createElement(gt,{blockAttributes:t,setAttributes:n,previewScreen:r}),wp.element.createElement(dt,{label:(0,e.__)("Item Width","qi-blocks"),blockAttributeKey:"itemWidth",setAttributes:n,blockAttributes:t,rangeDecimalMax:"em"===y?10:100,allowScreens:!0,unitType:"space"}),wp.element.createElement(dt,{label:(0,e.__)("Item Height","qi-blocks"),blockAttributeKey:"itemHeight",setAttributes:n,blockAttributes:t,rangeDecimalMax:"em"===_?10:100,allowScreens:!0,unitType:"space"}),wp.element.createElement(Ye,{label:(0,e.__)("Item Margin","qi-blocks"),setAttributes:n,blockAttributes:t,attrNameTemplate:"Item",attrName:"Margin",unitType:"space"}))),"advanced"===o.name&&wp.element.createElement(wt,{blockAttributes:t,setAttributes:n}))))),wp.element.createElement("style",null,L(R(B,r))&&`.${o} .qi-block-countdown .qodef-digit-wrapper {\n ${L(R(B,r))}\n }`,L(R(V,r))&&`.${o} .qi-block-countdown .qodef-digit {\n ${L(R(V,r))}\n }`,L(R(K,r))&&`.${o} .qi-block-countdown .qodef-label {\n ${L(R(K,r))}\n }`),wp.element.createElement("div",S,wp.element.createElement("div",{className:A,"data-date":l,"data-hide":a||"","data-month-label":i||(0,e.__)("Month","qi-blocks"),"data-month-label-plural":s||(0,e.__)("Months","qi-blocks"),"data-day-label":u||(0,e.__)("Day","qi-blocks"),"data-day-label-plural":c||(0,e.__)("Days","qi-blocks"),"data-hour-label":p||(0,e.__)("Hour","qi-blocks"),"data-hour-label-plural":d||(0,e.__)("Hours","qi-blocks"),"data-minute-label":m||(0,e.__)("Minute","qi-blocks"),"data-minute-label-plural":b||(0,e.__)("Minutes","qi-blocks"),"data-second-label":f||(0,e.__)("Second","qi-blocks"),"data-second-label-plural":g||(0,e.__)("Seconds","qi-blocks")},wp.element.createElement("span",{className:"qodef-m-date",style:R(q,r)},"mon"!==a&&wp.element.createElement("span",{className:"qodef-digit-wrapper qodef-months"},wp.element.createElement("span",{className:"qodef-digit"},"00"),wp.element.createElement("span",{className:"qodef-label"},(0,e.__)("Months","qi-blocks"))),wp.element.createElement("span",{className:"qodef-digit-wrapper qodef-days"},wp.element.createElement("span",{className:"qodef-digit"},"00"),wp.element.createElement("span",{className:"qodef-label"},(0,e.__)("Days","qi-blocks"))),wp.element.createElement("span",{className:"qodef-digit-wrapper qodef-hours"},wp.element.createElement("span",{className:"qodef-digit"},"00"),wp.element.createElement("span",{className:"qodef-label"},(0,e.__)("Hours","qi-blocks"))),"minsec"!==a&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("span",{className:"qodef-digit-wrapper qodef-minutes"},wp.element.createElement("span",{className:"qodef-digit"},"00"),wp.element.createElement("span",{className:"qodef-label"},(0,e.__)("Minutes","qi-blocks"))),"sec"!==a&&wp.element.createElement("span",{className:"qodef-digit-wrapper qodef-seconds"},wp.element.createElement("span",{className:"qodef-digit"},"00"),wp.element.createElement("span",{className:"qodef-label"},(0,e.__)("Seconds","qi-blocks"))))))))}}Zt.defaultProps={previewScreen:h};const Jt=(0,Ee.compose)(Yt,Ft)(Zt);class Qt extends Ce.Component{render(){const{attributes:t}=this.props,{date:n,format:r,monthSingularLabel:o,monthPluralLabel:l,daySingularLabel:a,dayPluralLabel:i,hourSingularLabel:s,hourPluralLabel:u,minuteSingularLabel:c,minutePluralLabel:p,secondSingularLabel:d,secondPluralLabel:m}=t,b=C(t);let f={className:x(t),...E(t)};b&&(f.id=b);const g=Pe()(T("countdown",this.props),"qodef-layout--simple",{[`qodef-hide--${r}`]:r});return wp.element.createElement("div",f,wp.element.createElement("div",{className:g,"data-date":n,"data-hide":r||"","data-month-label":o||(0,e.__)("Month","qi-blocks"),"data-month-label-plural":l||(0,e.__)("Months","qi-blocks"),"data-day-label":a||(0,e.__)("Day","qi-blocks"),"data-day-label-plural":i||(0,e.__)("Days","qi-blocks"),"data-hour-label":s||(0,e.__)("Hour","qi-blocks"),"data-hour-label-plural":u||(0,e.__)("Hours","qi-blocks"),"data-minute-label":c||(0,e.__)("Minute","qi-blocks"),"data-minute-label-plural":p||(0,e.__)("Minutes","qi-blocks"),"data-second-label":d||(0,e.__)("Second","qi-blocks"),"data-second-label-plural":m||(0,e.__)("Seconds","qi-blocks")},wp.element.createElement("span",{className:"qodef-m-date"},"mon"!==r&&wp.element.createElement("span",{className:"qodef-digit-wrapper qodef-months"},wp.element.createElement("span",{className:"qodef-digit"},"00"),wp.element.createElement("span",{className:"qodef-label"},(0,e.__)("Months","qi-blocks"))),wp.element.createElement("span",{className:"qodef-digit-wrapper qodef-days"},wp.element.createElement("span",{className:"qodef-digit"},"00"),wp.element.createElement("span",{className:"qodef-label"},(0,e.__)("Days","qi-blocks"))),wp.element.createElement("span",{className:"qodef-digit-wrapper qodef-hours"},wp.element.createElement("span",{className:"qodef-digit"},"00"),wp.element.createElement("span",{className:"qodef-label"},(0,e.__)("Hours","qi-blocks"))),"minsec"!==r&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("span",{className:"qodef-digit-wrapper qodef-minutes"},wp.element.createElement("span",{className:"qodef-digit"},"00"),wp.element.createElement("span",{className:"qodef-label"},(0,e.__)("Minutes","qi-blocks"))),"sec"!==r&&wp.element.createElement("span",{className:"qodef-digit-wrapper qodef-seconds"},wp.element.createElement("span",{className:"qodef-digit"},"00"),wp.element.createElement("span",{className:"qodef-label"},(0,e.__)("Seconds","qi-blocks")))))))}}const en=Qt,tn={attributes:{date:new Date((new Date).getTime()+1e10),digitFontSize:"50px"}};var nn,rn,on,ln,an,sn;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)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},un.apply(this,arguments)}const cn=e=>s.createElement("svg",un({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),nn||(nn=s.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M4.484 21.625h15M6.984 23.523h10"})),rn||(rn=s.createElement("path",{fill:"#EE2852",d:"M2.948 16.294v-.796l5.46-7.349h1.245v7.23h1.605v.915H9.653v2.55H8.618v-2.55zm5.715-6.99-4.5 6.075h4.5z"})),on||(on=s.createElement("path",{fill:"none",d:"M17.896 14.197q.689-.555.689-1.484 0-.99-.676-1.531-.674-.54-1.829-.54-1.156 0-1.83.533c-.674.533-.675.868-.675 1.538q0 .93.689 1.484.69.555 1.815.555c1.125 0 1.357-.185 1.817-.555M18.084 16.125q-.774-.563-2.003-.563t-2.011.555q-.78.555-.779 1.68c0 .071.014.135.019.203h5.527c.005-.068.019-.132.019-.203q-.001-1.11-.772-1.672"})),ln||(ln=s.createElement("path",{fill:"#EE2852",d:"M13.291 17.797q0-1.125.779-1.68.78-.554 2.011-.555 1.229 0 2.003.563.771.562.771 1.672c0 .071-.014.135-.019.203h1.043c.003-.059.011-.113.011-.173q0-1.034-.585-1.755c-.585-.721-.925-.805-1.604-.975q.929-.286 1.417-.945c.488-.659.487-.96.487-1.561q0-.809-.412-1.447-.413-.637-1.207-1.005-.796-.367-1.905-.367-1.11 0-1.905.367-.796.367-1.207 1.005a2.6 2.6 0 0 0-.413 1.447q0 .915.487 1.561.488.645 1.418.945-1.02.254-1.605.975-.584.72-.584 1.755c0 .06.008.114.011.173h1.027c-.005-.068-.019-.132-.019-.203m.975-3.6q-.69-.555-.689-1.484 0-1.005.675-1.538c.675-.533 1.06-.533 1.83-.533q1.155 0 1.829.54.676.54.676 1.531 0 .93-.689 1.484-.69.555-1.815.555c-1.125 0-1.357-.185-1.817-.555"})),an||(an=s.createElement("path",{fill:"none",d:"M14.146 2.805q.69.72 1.95.72.704 0 1.298-.292.592-.292.952-.862t.36-1.365A3.5 3.5 0 0 0 18.56.001h-4.995a3.3 3.3 0 0 0-.109.825q.001 1.259.69 1.979"})),sn||(sn=s.createElement("path",{fill:"#EE2852",d:"M18.707 1.005q0 .795-.36 1.365t-.952.862a2.9 2.9 0 0 1-1.298.292q-1.26 0-1.95-.72c-.69-.72-.689-1.14-.689-1.98 0-.3.044-.57.109-.825H12.54a4.5 4.5 0 0 0-.088.855q0 1.68.953 2.625c.953.945 1.477.945 2.527.945q1.035 0 1.838-.472.8-.473 1.087-1.298.06 2.55-.622 3.653T16.142 7.41q-1.022 0-1.604-.525-.587-.525-.75-1.5h-.976q.15 1.305.976 2.108.823.802 2.31.802 2.025 0 2.857-1.41t.833-4.215c0-1.042-.115-1.92-.318-2.67h-.907c.09.308.144.64.144 1.005"})));(0,t.registerBlockType)("qi-blocks/countdown",{icon:wp.element.createElement(cn,null),title:(0,e.__)("Countdown","qi-blocks"),description:(0,e.__)("Announce anything you wish by displaying eye-catching countdowns to a date you input.","qi-blocks"),category:"qi-blocks",keywords:[(0,e.__)("countdown","qi-blocks"),(0,e.__)("showcase","qi-blocks"),(0,e.__)("months","qi-blocks"),(0,e.__)("days","qi-blocks"),(0,e.__)("hours","qi-blocks"),(0,e.__)("timer","qi-blocks"),(0,e.__)("qi","qi-blocks")],attributes:we,example:tn,edit:Jt,save:en})})()})();