?AlkantarClanX12

Your IP : 216.73.217.134


Current Path : /home/rankinh/villavanille/wp-content/plugins/qi-blocks/assets/dist/
Upload File :
Current File : /home/rankinh/villavanille/wp-content/plugins/qi-blocks/assets/dist/timeline.js

(()=>{var e={2324:(e,t,n)=>{"use strict";n.d(t,{c:()=>l});var o=n(4232),r=n.n(o);document.addEventListener("DOMContentLoaded",(function(){i.init()})),window.addEventListener("resize",(function(){i.init()}));const i={init:function(e){this.holder=document.querySelectorAll(".qi-block-timeline"),this.holder.length&&[...this.holder].map((t=>{i.initItem(t,e)}))},getRealCurrentItem:function(e){return"string"==typeof e&&""!==e&&(e=qiBlocksEditor.qodefGetCurrentBlockElement.get(e)),e},initItem:function(e,t){if(!(e=i.getRealCurrentItem(e)))return;const n="object"!=typeof qiBlocksEditor?qiBlocks:qiBlocksEditor;t&&e.classList.remove("qodef--appeared"),n.qodefWaitForImages.check(e,(function(){setTimeout((()=>{i.initLogic(e),"mount"===t&&setTimeout((()=>{qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument().body.addEventListener("qi_frame_resized",(()=>{i.initLogic(e)}))}),600),n.qodefIsInViewport.check(e,(function(){e.classList.add("qodef--appeared")}))}),t?800:0)}))},initLogic:function(e){const t=e.querySelector(".qodef-timeline-inner");if(e.classList.contains("qodef-timeline--horizontal")){let n=(document.body.classList.contains("wp-admin")?qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument():document).body,o=e.querySelectorAll(".qodef-e-item"),r=parseInt(e.offsetWidth,10),l=o?o.length:0,a=0,s=0,c=JSON.parse(e.getAttribute("data-options"));l>1&&(a=document.body.classList.contains("wp-admin")?n.classList.contains("qi-preview-screen-tablet")?r/parseInt(c.colNum1024,10):n.classList.contains("qi-preview-screen-mobile")?r/parseInt(c.colNum480,10):r/parseInt(c.colNum,10):qiBlocks.windowWidth>1440?r/parseInt(c.colNum,10):qiBlocks.windowWidth>1366?r/parseInt(c.colNum1440,10):qiBlocks.windowWidth>1024?r/parseInt(c.colNum1366,10):qiBlocks.windowWidth>768?r/parseInt(c.colNum1024,10):qiBlocks.windowWidth>680?r/parseInt(c.colNum768,10):qiBlocks.windowWidth>480?r/parseInt(c.colNum680,10):r/parseInt(c.colNum480,10),s=a*l,e.setAttribute("data-movement",a),e.setAttribute("data-moved",0),t.style.width=s+"px",t.style.transform="translateX(0)",i.initHeight(e),i.initMovement(e))}else t.style.width="auto",t.style.transform="none",i.initHeight(e)},initMovement:function(e){let t=parseInt(e.getAttribute("data-movement"),10),n=e.querySelector(".qodef-timeline-inner"),o=parseInt(e.offsetWidth,10),i=n?parseInt(n.clientWidth,10):0,l=e.querySelector(".qodef-nav-prev"),a=e.querySelector(".qodef-nav-next");r()(l).off().on("click",(o=>{o.preventDefault();const r=parseFloat(e.getAttribute("data-moved"));if(r<-1){const o=r+t;n.style.transform="translateX( "+o+"px)",e.setAttribute("data-moved",o)}})),r()(a).off().on("click",(r=>{r.preventDefault();const l=parseFloat(e.getAttribute("data-moved"));if(i-o+1>-l+t){const o=l-t;n.style.transform="translateX( "+o+"px)",e.setAttribute("data-moved",o)}}))},initHeight:function(e){let t=e.querySelectorAll(".qodef-e-item"),n=0,o=0;if(t.length&&(t.forEach((t=>{const r=t.querySelector(".qodef-e-content-holder"),i=t.querySelector(".qodef-e-top-holder");i&&r&&(r.style.height="auto",i.style.height="auto");let l=r?parseInt(window.getComputedStyle(r).getPropertyValue("height"),10):0,a=i?parseInt(window.getComputedStyle(i).getPropertyValue("height"),10):0;e.classList.contains("qodef-timeline-layout--horizontal-standard")?(a>n&&(n=a),l>o&&(o=l)):e.classList.contains("qodef-timeline-layout--horizontal-alternating")&&(l<a&&(l=a),l>o&&(o=l))})),t.forEach((t=>{let r=t.querySelector(".qodef-e-content-holder"),i=t.querySelector(".qodef-e-top-holder"),l=t.querySelector(".qodef-e-line-holder");e.classList.contains("qodef-timeline-layout--horizontal-standard")?(i&&(i.style.height=n+"px"),r&&(r.style.height=o+"px"),l&&(l.style.top=n+"px")):e.classList.contains("qodef-timeline-layout--horizontal-alternating")&&(i&&(i.style.height=o+"px"),r&&(r.style.height=o+"px"))}))),e.classList.contains("qodef-timeline-layout--horizontal-standard")){let t=e.querySelector(".qodef-nav-prev"),o=e.querySelector(".qodef-nav-next");t&&(t.style.top=n+"px"),o&&(o.style.top=n+"px")}}},l=i},7576:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var o=n(5500),r=n.n(o),i=n(2312),l=n.n(i)()(r());l.push([e.id,".qi-preview-screen-tablet .qi-block-timeline.qodef-timeline-layout--vertical-side .qodef-e-item.qodef-reverse .qodef-e-item-content{flex-direction:column;text-align:center}.qi-preview-screen-tablet .qi-block-timeline.qodef-timeline-layout--vertical-side .qodef-e-item.qodef-reverse .qodef-e-side-holder{margin:0 0 10%}.qi-preview-screen-tablet .qi-block-timeline.qodef-timeline-layout--vertical-side .qodef-e-item-content{flex-direction:column;text-align:center}.qi-preview-screen-tablet .qi-block-timeline.qodef-timeline-layout--vertical-side .qodef-e-side-holder{margin:0 0 10%}.qi-preview-screen-mobile .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-item.qodef-reverse .qodef-e-item-inner{flex-direction:column;text-align:center}.qi-preview-screen-mobile .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-item.qodef-reverse .qodef-e-side-holder{padding:0}.qi-preview-screen-mobile .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-item.qodef-reverse .qodef-e-content-holder{padding:0}.qi-preview-screen-mobile .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-item-inner{flex-direction:column;text-align:center}.qi-preview-screen-mobile .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-side-holder{width:100%;padding:0;margin-bottom:5%}.qi-preview-screen-mobile .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-content-holder{width:100%;padding:0;margin-top:5%}.qi-preview-screen-mobile .qi-block-timeline.qodef-timeline-layout--vertical-side .qodef-e-item.qodef-reverse .qodef-e-item-content{padding:0}.qi-preview-screen-mobile .qi-block-timeline.qodef-timeline-layout--vertical-side .qodef-e-item-content{width:100%;padding:0}.qi-preview-screen-mobile .qi-block-timeline.qodef-timeline--vertical .qodef-e-point-holder,.qi-preview-screen-mobile .qi-block-timeline.qodef-timeline--vertical .qodef-e-line-holder{display:none}\n",""]);const a=l},2312:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var l={};if(o)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(l[s]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);o&&l[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},5500:e=>{"use strict";e.exports=function(e){return e[1]}},4300:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:l,create:a}=Object,{apply:s,construct:c}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),l||(l=function(e){return e}),s||(s=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=_(Array.prototype.forEach),p=_(Array.prototype.pop),m=_(Array.prototype.push),d=_(String.prototype.toLowerCase),b=_(String.prototype.toString),f=_(String.prototype.match),g=_(String.prototype.replace),h=_(String.prototype.indexOf),y=_(String.prototype.trim),v=_(RegExp.prototype.test),k=w(TypeError);function _(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return s(e,t,o)}}function w(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return c(e,n)}}function q(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function S(e){for(let t=0;t<e.length;t++)void 0===r(e,t)&&(e[t]=null);return e}function A(t){const n=a(null);for(const[o,i]of e(t))void 0!==r(t,o)&&(Array.isArray(i)?n[o]=S(i):i&&"object"==typeof i&&i.constructor===Object?n[o]=A(i):n[o]=i);return n}function I(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return _(n.get);if("function"==typeof n.value)return _(n.value)}e=o(e)}function n(e){return console.warn("fallback value for",e),null}return n}const x=i(["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=i(["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=i(["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=i(["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=i(["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"]),N=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O=i(["#text"]),D=i(["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"]),B=i(["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"]),R=i(["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"]),M=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),L=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),j=l(/<%[\w\W]*|[\w\W]*%>/gm),V=l(/\${[\w\W]*}/gm),z=l(/^data-[\-\w.\u00B7-\uFFFF]/),U=l(/^aria-[\-\w]+$/),F=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=l(/^(?:\w+script|data):/i),$=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),H=l(/^html$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:L,ERB_EXPR:j,TMPLIT_EXPR:V,DATA_ATTR:z,ARIA_ATTR:U,IS_ALLOWED_URI:F,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:$,DOCTYPE_NAME:H});const W=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 o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};function X(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W();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:o}=t;const r=o,l=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:_,Element:w,NodeFilter:S,NamedNodeMap:L=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:j,DOMParser:V,trustedTypes:z}=t,U=w.prototype,K=I(U,"cloneNode"),$=I(U,"nextSibling"),Z=I(U,"childNodes"),J=I(U,"parentNode");if("function"==typeof c){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Q,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:oe,getElementsByTagName:re}=o,{importNode:ie}=r;let le={};n.isSupported="function"==typeof e&&"function"==typeof J&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:se,TMPLIT_EXPR:ce,DATA_ATTR:ue,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:me,ATTR_WHITESPACE:de}=G;let{IS_ALLOWED_URI:be}=G,fe=null;const ge=q({},[...x,...E,...C,...P,...O]);let he=null;const ye=q({},[...D,...B,...R,...M]);let ve=Object.seal(a(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}})),ke=null,_e=null,we=!0,qe=!0,Se=!1,Ae=!0,Ie=!1,xe=!1,Ee=!1,Ce=!1,Te=!1,Pe=!1,Ne=!1,Oe=!0,De=!1;const Be="user-content-";let Re=!0,Me=!1,Le={},je=null;const Ve=q({},["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 ze=null;const Ue=q({},["audio","video","img","source","image","track"]);let Fe=null;const Ke=q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let We=Ge,Ye=!1,Xe=null;const Ze=q({},[$e,He,Ge],b);let Je=null;const Qe=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const ot=o.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},it=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=A(e),Je=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Je?b:d,fe="ALLOWED_TAGS"in e?q({},e.ALLOWED_TAGS,tt):ge,he="ALLOWED_ATTR"in e?q({},e.ALLOWED_ATTR,tt):ye,Xe="ALLOWED_NAMESPACES"in e?q({},e.ALLOWED_NAMESPACES,b):Ze,Fe="ADD_URI_SAFE_ATTR"in e?q(A(Ke),e.ADD_URI_SAFE_ATTR,tt):Ke,ze="ADD_DATA_URI_TAGS"in e?q(A(Ue),e.ADD_DATA_URI_TAGS,tt):Ue,je="FORBID_CONTENTS"in e?q({},e.FORBID_CONTENTS,tt):Ve,ke="FORBID_TAGS"in e?q({},e.FORBID_TAGS,tt):{},_e="FORBID_ATTR"in e?q({},e.FORBID_ATTR,tt):{},Le="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,qe=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=!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,Ne=e.RETURN_TRUSTED_TYPE||!1,Ce=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,De=e.SANITIZE_NAMED_PROPS||!1,Re=!1!==e.KEEP_CONTENT,Me=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||F,We=e.NAMESPACE||Ge,ve=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ve.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ve.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ve.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(qe=!1),Pe&&(Te=!0),Le&&(fe=q({},O),he=[],!0===Le.html&&(q(fe,x),q(he,D)),!0===Le.svg&&(q(fe,E),q(he,B),q(he,M)),!0===Le.svgFilters&&(q(fe,C),q(he,B),q(he,M)),!0===Le.mathMl&&(q(fe,P),q(he,R),q(he,M))),e.ADD_TAGS&&(fe===ge&&(fe=A(fe)),q(fe,e.ADD_TAGS,tt)),e.ADD_ATTR&&(he===ye&&(he=A(he)),q(he,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&q(Fe,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(je===Ve&&(je=A(je)),q(je,e.FORBID_CONTENTS,tt)),Re&&(fe["#text"]=!0),xe&&q(fe,["html","head","body"]),fe.table&&(q(fe,["tbody"]),delete ke.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=Y(z,l)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));i&&i(e),nt=e}},lt=q({},["mi","mo","mn","ms","mtext"]),at=q({},["foreignobject","desc","title","annotation-xml"]),st=q({},["title","style","font","a","script"]),ct=q({},[...E,...C,...T]),ut=q({},[...P,...N]),pt=function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:We,tagName:"template"});const n=d(e.tagName),o=d(t.tagName);return!!Xe[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(ct[n]):e.namespaceURI===$e?t.namespaceURI===Ge?"math"===n:t.namespaceURI===He?"math"===n&&at[o]:Boolean(ut[n]):e.namespaceURI===Ge?!(t.namespaceURI===He&&!at[o])&&!(t.namespaceURI===$e&&!lt[o])&&!ut[n]&&(st[n]||!ct[n]):!("application/xhtml+xml"!==Je||!Xe[e.namespaceURI]))},mt=function(e){m(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},dt=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!he[e])if(Te||Pe)try{mt(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&&We===Ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=Q?Q.createHTML(e):e;if(We===Ge)try{t=(new V).parseFromString(r,Je)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(We,"template",null);try{t.documentElement.innerHTML=Ye?ee:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),We===Ge?re.call(t,xe?"html":"body")[0]:xe?t.documentElement:i},ft=function(e){return ne.call(e.ownerDocument||e,e,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.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 L)||"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 _&&e instanceof _},yt=function(e,t,o){le[e]&&u(le[e],(e=>{e.call(n,t,o,nt)}))},vt=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),gt(e))return mt(e),!0;const o=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:o,allowedTags:fe}),e.hasChildNodes()&&!ht(e.firstElementChild)&&v(/<[/\w]/g,e.innerHTML)&&v(/<[/\w]/g,e.textContent))return mt(e),!0;if(!fe[o]||ke[o]){if(!ke[o]&&_t(o)){if(ve.tagNameCheck instanceof RegExp&&v(ve.tagNameCheck,o))return!1;if(ve.tagNameCheck instanceof Function&&ve.tagNameCheck(o))return!1}if(Re&&!je[o]){const t=J(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o)t.insertBefore(K(n[o],!0),$(e))}return mt(e),!0}return e instanceof w&&!pt(e)?(mt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!v(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&3===e.nodeType&&(t=e.textContent,u([ae,se,ce],(e=>{t=g(t,e," ")})),e.textContent!==t&&(m(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(mt(e),!0)},kt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in o||n in ot))return!1;if(qe&&!_e[t]&&v(ue,t));else if(we&&v(pe,t));else if(!he[t]||_e[t]){if(!(_t(e)&&(ve.tagNameCheck instanceof RegExp&&v(ve.tagNameCheck,e)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(e))&&(ve.attributeNameCheck instanceof RegExp&&v(ve.attributeNameCheck,t)||ve.attributeNameCheck instanceof Function&&ve.attributeNameCheck(t))||"is"===t&&ve.allowCustomizedBuiltInElements&&(ve.tagNameCheck instanceof RegExp&&v(ve.tagNameCheck,n)||ve.tagNameCheck instanceof Function&&ve.tagNameCheck(n))))return!1}else if(Fe[t]);else if(v(be,g(n,de,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==h(n,"data:")||!ze[e])if(Se&&!v(me,g(n,de,"")));else if(n)return!1;return!0},_t=function(e){return e.indexOf("-")>0},wt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:he};let r=t.length;for(;r--;){const i=t[r],{name:l,namespaceURI:a,value:s}=i,c=tt(l);let m="value"===l?s:y(s);if(o.attrName=c,o.attrValue=m,o.keepAttr=!0,o.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,o),m=o.attrValue,o.forceKeepAttr)continue;if(dt(l,e),!o.keepAttr)continue;if(!Ae&&v(/\/>/i,m)){dt(l,e);continue}Ie&&u([ae,se,ce],(e=>{m=g(m,e," ")}));const d=tt(e.nodeName);if(kt(d,c,m)){if(!De||"id"!==c&&"name"!==c||(dt(l,e),m=Be+m),Q&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(a);else switch(z.getAttributeType(d,c)){case"TrustedHTML":m=Q.createHTML(m);break;case"TrustedScriptURL":m=Q.createScriptURL(m)}try{a?e.setAttributeNS(a,l,m):e.setAttribute(l,m),p(n.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},qt=function e(t){let n=null;const o=ft(t);for(yt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)yt("uponSanitizeShadowNode",n,null),vt(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]:{},o=null,i=null,l=null,a=null;if(Ye=!e,Ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)){if("function"!=typeof e.toString)throw k("toString is not a function");if("string"!=typeof(e=e.toString()))throw k("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ee||it(t),n.removed=[],"string"==typeof e&&(Me=!1),Me){if(e.nodeName){const t=tt(e.nodeName);if(!fe[t]||ke[t])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)o=bt("\x3c!----\x3e"),i=o.ownerDocument.importNode(e,!0),1===i.nodeType&&"BODY"===i.nodeName||"HTML"===i.nodeName?o=i:o.appendChild(i);else{if(!Te&&!Ie&&!xe&&-1===e.indexOf("<"))return Q&&Ne?Q.createHTML(e):e;if(o=bt(e),!o)return Te?null:Ne?ee:""}o&&Ce&&mt(o.firstChild);const c=ft(Me?e:o);for(;l=c.nextNode();)vt(l)||(l.content instanceof s&&qt(l.content),wt(l));if(Me)return e;if(Te){if(Pe)for(a=oe.call(o.ownerDocument);o.firstChild;)a.appendChild(o.firstChild);else a=o;return(he.shadowroot||he.shadowrootmode)&&(a=ie.call(r,a,!0)),a}let p=xe?o.outerHTML:o.innerHTML;return xe&&fe["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&v(H,o.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+p),Ie&&u([ae,se,ce],(e=>{p=g(p,e," ")})),Q&&Ne?Q.createHTML(p):p},n.setConfig=function(){it(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||it({});const o=tt(e),r=tt(t);return kt(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&(le[e]=le[e]||[],m(le[e],t))},n.removeHook=function(e){if(le[e])return p(le[e])},n.removeHooks=function(e){le[e]&&(le[e]=[])},n.removeAllHooks=function(){le={}},n}return X()}()},6152:(e,t,n)=>{var o=n(2488);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return o(e)?e:[e]}},520:(e,t,n)=>{var o=n(5968),r=n(3740),i=n(4996),l=n(2600),a=n(7336);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=o,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=l,s.prototype.set=a,e.exports=s},9704:(e,t,n)=>{var o=n(7188).Uint8Array;e.exports=o},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,o){var r=-1,i=null==e?0:e.length;for(o&&i&&(n=e[++r]);++r<i;)n=t(n,e[r],r,e);return n}},5600:e=>{e.exports=function(e,t){for(var n=-1,o=null==e?0:e.length;++n<o;)if(t(e[n],n,e))return!0;return!1}},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 o=n(6139),r=n(864);e.exports=function(e,t,n){(void 0!==n&&!r(e[t],n)||void 0===n&&!(t in e))&&o(e,t,n)}},8288:(e,t,n)=>{var o=n(6139),r=n(864),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var l=e[t];i.call(e,t)&&r(l,n)&&(void 0!==n||t in e)||o(e,t,n)}},6600:(e,t,n)=>{var o=n(864);e.exports=function(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}},6139:(e,t,n)=>{var o=n(7792);e.exports=function(e,t,n){"__proto__"==t&&o?o(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},2471:(e,t,n)=>{var o=n(8940),r=Object.create,i=function(){function e(){}return function(t){if(!o(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},4596:(e,t,n)=>{var o=n(8168)();e.exports=o},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 o=n-1,r=e.length;++o<r;)if(e[o]===t)return o;return-1}},9184:(e,t,n)=>{var o=n(4840),r=n(2892);e.exports=function e(t,n,i,l,a){return t===n||(null==t||null==n||!r(t)&&!r(n)?t!=t&&n!=n:o(t,n,i,l,e,a))}},4840:(e,t,n)=>{var o=n(520),r=n(9124),i=n(2352),l=n(8608),a=n(3871),s=n(2488),c=n(7684),u=n(6700),p="[object Arguments]",m="[object Array]",d="[object Object]",b=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,f,g,h){var y=s(e),v=s(t),k=y?m:a(e),_=v?m:a(t),w=(k=k==p?d:k)==d,q=(_=_==p?d:_)==d,S=k==_;if(S&&c(e)){if(!c(t))return!1;y=!0,w=!1}if(S&&!w)return h||(h=new o),y||u(e)?r(e,t,n,f,g,h):i(e,t,k,n,f,g,h);if(!(1&n)){var A=w&&b.call(e,"__wrapped__"),I=q&&b.call(t,"__wrapped__");if(A||I){var x=A?e.value():e,E=I?t.value():t;return h||(h=new o),g(x,E,n,f,h)}}return!!S&&(h||(h=new o),l(e,t,n,f,g,h))}},660:(e,t,n)=>{var o=n(520),r=n(9200),i=n(4596),l=n(7132),a=n(8940),s=n(2756),c=n(7972);e.exports=function e(t,n,u,p,m){t!==n&&i(n,(function(i,s){if(m||(m=new o),a(i))l(t,n,s,u,e,p,m);else{var d=p?p(c(t,s),i,s+"",t,n,m):void 0;void 0===d&&(d=i),r(t,s,d)}}),s)}},7132:(e,t,n)=>{var o=n(9200),r=n(1328),i=n(2100),l=n(8416),a=n(6224),s=n(348),c=n(2488),u=n(2480),p=n(7684),m=n(7920),d=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),q=g(t,n),S=_.get(q);if(S)o(e,n,S);else{var A=k?k(w,q,n+"",e,t,_):void 0,I=void 0===A;if(I){var x=c(q),E=!x&&p(q),C=!x&&!E&&f(q);A=q,x||E||C?c(w)?A=w:u(w)?A=l(w):E?(I=!1,A=r(q,!0)):C?(I=!1,A=i(q,!0)):A=[]:b(q)||s(q)?(A=w,s(w)?A=h(w):d(w)&&!m(w)||(A=a(q))):I=!1}I&&(_.set(q,A),v(A,q,y,k,_),_.delete(q)),o(e,n,A)}}},8292:(e,t,n)=>{var o=n(552),r=n(8840),i=n(7360);e.exports=function(e,t){return i(r(e,t,o),e+"")}},4732:e=>{e.exports=function(e,t,n){var o=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++o<r;)i[o]=e[o+t];return i}},6524:e=>{e.exports=function(e){return e}},968:(e,t,n)=>{var o=n(3992);e.exports=function(e,t){return!!(null==e?0:e.length)&&o(e,t,0)>-1}},7320:(e,t,n)=>{var o=n(4732);e.exports=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:o(e,t,n)}},5987:(e,t,n)=>{var o=n(9704);e.exports=function(e){var t=new e.constructor(e.byteLength);return new o(t).set(new o(e)),t}},1328:(e,t,n)=>{e=n.nmd(e);var o=n(7188),r=t&&!t.nodeType&&t,i=r&&e&&!e.nodeType&&e,l=i&&i.exports===r?o.Buffer:void 0,a=l?l.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,o=a?a(n):new e.constructor(n);return e.copy(o),o}},2100:(e,t,n)=>{var o=n(5987);e.exports=function(e,t){var n=t?o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},8416:e=>{e.exports=function(e,t){var n=-1,o=e.length;for(t||(t=Array(o));++n<o;)t[n]=e[n];return t}},7612:(e,t,n)=>{var o=n(8288),r=n(6139);e.exports=function(e,t,n,i){var l=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var c=t[a],u=i?i(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),l?r(n,c,u):o(n,c,u)}return n}},764:(e,t,n)=>{var o=n(8292),r=n(4221);e.exports=function(e){return o((function(t,n){var o=-1,i=n.length,l=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(l=e.length>3&&"function"==typeof l?(i--,l):void 0,a&&r(n[0],n[1],a)&&(l=i<3?void 0:l,i=1),t=Object(t);++o<i;){var s=n[o];s&&e(t,s,o,l)}return t}))}},8168:e=>{e.exports=function(e){return function(t,n,o){for(var r=-1,i=Object(t),l=o(t),a=l.length;a--;){var s=l[e?a:++r];if(!1===n(i[s],s,i))break}return t}}},7288:(e,t,n)=>{var o=n(7320),r=n(9240),i=n(8595),l=n(1972);e.exports=function(e){return function(t){t=l(t);var n=r(t)?i(t):void 0,a=n?n[0]:t.charAt(0),s=n?o(n,1).join(""):t.slice(1);return a[e]()+s}}},184:(e,t,n)=>{var o=n(7748),r=n(5928),i=n(2996),l=RegExp("['’]","g");e.exports=function(e){return function(t){return o(i(r(t).replace(l,"")),e,"")}}},7792:(e,t,n)=>{var o=n(7892),r=function(){try{var e=o(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},9124:(e,t,n)=>{var o=n(6152),r=n(5600),i=n(968);e.exports=function(e,t,n,l,a,s){var c=1&n,u=e.length,p=t.length;if(u!=p&&!(c&&p>u))return!1;var m=s.get(e),d=s.get(t);if(m&&d)return m==t&&d==e;var b=-1,f=!0,g=2&n?new o:void 0;for(s.set(e,t),s.set(t,e);++b<u;){var h=e[b],y=t[b];if(l)var v=c?l(y,h,b,t,e,s):l(h,y,b,e,t,s);if(void 0!==v){if(v)continue;f=!1;break}if(g){if(!r(t,(function(e,t){if(!i(g,t)&&(h===e||a(h,e,n,l,s)))return g.push(t)}))){f=!1;break}}else if(h!==y&&!a(h,y,n,l,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 o=n(1096),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,l,a){var s=1&n,c=o(e),u=c.length;if(u!=o(t).length&&!s)return!1;for(var p=u;p--;){var m=c[p];if(!(s?m in t:r.call(t,m)))return!1}var d=a.get(e),b=a.get(t);if(d&&b)return d==t&&b==e;var f=!0;a.set(e,t),a.set(t,e);for(var g=s;++p<u;){var h=e[m=c[p]],y=t[m];if(i)var v=s?i(y,h,m,t,e,a):i(h,y,m,e,t,a);if(!(void 0===v?h===y||l(h,y,n,i,a):v)){f=!1;break}g||(g="constructor"==m)}if(f&&!g){var k=e.constructor,_=t.constructor;k==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof k&&k instanceof k&&"function"==typeof _&&_ instanceof _||(f=!1)}return a.delete(e),a.delete(t),f}},4848:(e,t,n)=>{var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=o},1096:(e,t,n)=>{var o=n(1304)(Object.keys,Object);e.exports=o},7892:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},476:(e,t,n)=>{var o=n(1304)(Object.getPrototypeOf,Object);e.exports=o},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 o=n(2471),r=n(476),i=n(1004);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:o(r(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 o=n(6600),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=o(t,e);return!(n<0)&&(n==t.length-1?t.pop():r.call(t,n,1),--this.size,!0)}},4996:(e,t,n)=>{var o=n(6600);e.exports=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]}},2600:(e,t,n)=>{var o=n(6600);e.exports=function(e){return o(this.__data__,e)>-1}},7336:(e,t,n)=>{var o=n(6600);e.exports=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},1304:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},8840:(e,t,n)=>{var o=n(2253),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var i=arguments,l=-1,a=r(i.length-t,0),s=Array(a);++l<a;)s[l]=i[t+l];l=-1;for(var c=Array(t+1);++l<t;)c[l]=i[l];return c[t]=n(s),o(e,this,c)}}},7188:(e,t,n)=>{var o=n(4848),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();e.exports=i},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 o=n(1120),r=n(9240),i=n(6448);e.exports=function(e){return r(e)?i(e):o(e)}},6448:e=>{var t="\\ud800-\\udfff",n="["+t+"]",o="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+o+"|"+r+")"+"?",c="[\\ufe0e\\ufe0f]?",u=c+s+("(?:\\u200d(?:"+[i,l,a].join("|")+")"+c+s+")*"),p="(?:"+[i+o+"?",o,l,a,n].join("|")+")",m=RegExp(r+"(?="+r+")|"+p+u,"g");e.exports=function(e){return e.match(m)||[]}},2744:e=>{var t="\\ud800-\\udfff",n="\\u2700-\\u27bf",o="a-z\\xdf-\\xf6\\xf8-\\xff",r="A-Z\\xc0-\\xd6\\xd8-\\xde",i="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",l="["+i+"]",a="\\d+",s="["+n+"]",c="["+o+"]",u="[^"+t+i+a+n+o+r+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",d="["+r+"]",b="(?:"+c+"|"+u+")",f="(?:"+d+"|"+u+")",g="(?:['’](?:d|ll|m|re|s|t|ve))?",h="(?:['’](?:D|LL|M|RE|S|T|VE))?",y="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",v="[\\ufe0e\\ufe0f]?",k=v+y+("(?:\\u200d(?:"+["[^"+t+"]",p,m].join("|")+")"+v+y+")*"),_="(?:"+[s,p,m].join("|")+")"+k,w=RegExp([d+"?"+c+"+"+g+"(?="+[l,d,"$"].join("|")+")",f+"+"+h+"(?="+[l,d+b,"$"].join("|")+")",d+"?"+b+"+"+g,d+"+"+h,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",a,_].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},5144:(e,t,n)=>{var o=n(1912),r=n(184)((function(e,t,n){return t=t.toLowerCase(),e+(n?o(t):t)}));e.exports=r},1912:(e,t,n)=>{var o=n(1972),r=n(4704);e.exports=function(e){return r(o(e).toLowerCase())}},5928:(e,t,n)=>{var o=n(6524);e.exports=function(e){return null==e?"":o(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 o=n(7920),r=n(9024);e.exports=function(e){return null!=e&&r(e.length)&&!o(e)}},2480:(e,t,n)=>{var o=n(4900),r=n(2892);e.exports=function(e){return r(e)&&o(e)}},7684:e=>{e.exports=function(){return!1}},948:(e,t,n)=>{var o=n(9184);e.exports=function(e,t){return o(e,t)}},7920:(e,t,n)=>{var o=n(6944),r=n(8940);e.exports=function(e){if(!r(e))return!1;var t=o(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 o=n(6944),r=n(476),i=n(2892),l=Function.prototype,a=Object.prototype,s=l.toString,c=a.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=o(e))return!1;var t=r(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u}},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 o=n(660),r=n(764)((function(e,t,n){o(e,t,n)}));e.exports=r},1824:(e,t,n)=>{var o=n(7612),r=n(2756);e.exports=function(e){return o(e,r(e))}},1972:e=>{e.exports=function(e){return e}},4704:(e,t,n)=>{var o=n(7288)("toUpperCase");e.exports=o},2996:(e,t,n)=>{var o=n(2628),r=n(4360),i=n(1972),l=n(2744);e.exports=function(e,t,n){return e=i(e),void 0===(t=n?void 0:t)?r(e)?l(e):o(e):e.match(t)||[]}},9776:(e,t,n)=>{"use strict";var o=n(9143);function r(){}function i(){}i.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,i,l){if(l!==o){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};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 o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==u(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(1504)),r=s(n(3268)),i=s(n(724)),l=s(n(7396)),a=n(5224);function s(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 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 p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function m(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 d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function 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 o=g(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;return f(e)}(this,t)}}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=function(){return!0},k="suggestions-revealed",_="input-focused",w="input-changed",q="escape-pressed",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&&h(e,t)}(c,e);var t,n,r,s=b(c);function c(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,c),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 o=n.sectionIndex,r=n.itemIndex;t.updateHighlightedSuggestion(o,r),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 o=t.props,r=o.alwaysRenderSuggestions,i=o.onSuggestionSelected,l=o.onSuggestionsFetchRequested;i&&i(e,n);var a=t.props.shouldKeepSuggestionsOnSelect(n.suggestion);r||a?l({value:n.suggestionValue,reason:"suggestion-selected"}):t.onSuggestionsClearRequested(),t.resetHighlightedSuggestion()})),y(f(t),"onSuggestionClick",(function(e){var n=t.props,o=n.alwaysRenderSuggestions,r=n.focusInputOnSuggestionClick,i=t.getSuggestionIndices(t.findSuggestionElement(e.target)),l=i.sectionIndex,a=i.suggestionIndex,s=t.getSuggestion(l,a),c=t.props.getSuggestionValue(s);t.maybeCallOnChange(e,c,"click"),t.onSuggestionSelected(e,{suggestion:s,suggestionValue:c,suggestionIndex:a,sectionIndex:l,method:"click"});var u=t.props.shouldKeepSuggestionsOnSelect(s);o||u||t.closeSuggestions(),!0===r?t.input.focus():t.onBlur(),setTimeout((function(){t.justSelectedSuggestion=!1}))})),y(f(t),"onBlur",(function(){var e=t.props,n=e.inputProps,o=e.shouldRenderSuggestions,r=n.value,i=n.onBlur,l=t.getHighlightedSuggestion(),a=o(r,"input-blurred");t.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!a}),i&&i(t.blurEvent,{highlightedSuggestion:l})})),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,o=e.children;return(0,t.props.renderSuggestionsContainer)({containerProps:n,children:o,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=c,n=[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=0===this.state.highlightedSuggestionIndex&&this.props.highlightFirstSuggestion&&!e.highlightFirstSuggestion;(0,i.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered?this.highlightFirstSuggestion():t&&this.resetHighlightedSuggestion():this.willRenderSuggestions(e,"suggestions-updated")?(this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions(),t&&this.resetHighlightedSuggestion()):this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,o=n.suggestions,r=n.onSuggestionHighlighted,l=n.highlightFirstSuggestion;if(!(0,i.default)(o,e.suggestions)&&o.length>0&&l)this.highlightFirstSuggestion();else if(r){var a=this.getHighlightedSuggestion();a!=t.highlightedSuggestion&&r({suggestion:a})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var o=this;this.setState((function(r){var i=r.valueBeforeUpDown;return null===t?i=null:null===i&&void 0!==n&&(i=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:o.getSuggestion(e,t),valueBeforeUpDown:i}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,o=n.suggestions,r=n.multiSection,i=n.getSectionSuggestions;return r?i(o[e])[t]:o[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 o=this.props.inputProps,r=o.value,i=o.onChange;t!==r&&i(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e,t){var n=e.suggestions,o=e.inputProps,r=e.shouldRenderSuggestions,i=o.value;return n.length>0&&r(i,t)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,r=t.renderInputComponent,i=t.onSuggestionsFetchRequested,s=t.renderSuggestion,c=t.inputProps,u=t.multiSection,p=t.renderSectionTitle,d=t.id,b=t.getSectionSuggestions,f=t.theme,g=t.getSuggestionValue,h=t.alwaysRenderSuggestions,y=t.highlightFirstSuggestion,S=t.containerProps,A=this.state,I=A.isFocused,x=A.isCollapsed,E=A.highlightedSectionIndex,C=A.highlightedSuggestionIndex,T=A.valueBeforeUpDown,P=h?v:this.props.shouldRenderSuggestions,N=c.value,O=c.onFocus,D=c.onKeyDown,B=this.willRenderSuggestions(this.props,"render"),R=h||I&&!x&&B,M=R?n:[],L=m({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=P(N,_);e.setState({isFocused:!0,isCollapsed:!n}),O&&O(t),n&&i({value:N,reason:_})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,o=P(n,w);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(m({},y?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!o})),o?i({value:n,reason:w}):e.onSuggestionsClearRequested()},onKeyDown:function(t,o){var r=t.keyCode;switch(r){case 40:case 38:if(x)P(N,k)&&(i({value:N,reason:k}),e.revealSuggestions(),t.preventDefault());else if(n.length>0){var l,a=o.newHighlightedSectionIndex,s=o.newHighlightedItemIndex;l=null===s?null===T?N:T:e.getSuggestionValueByIndex(a,s),e.updateHighlightedSuggestion(a,s,N),e.maybeCallOnChange(t,l,40===r?"down":"up"),t.preventDefault()}e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var c=e.getHighlightedSuggestion();if(R&&!h&&e.closeSuggestions(),null!=c){t.preventDefault();var u=g(c);e.maybeCallOnChange(t,u,"enter"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:u,suggestionIndex:C,sectionIndex:E,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:R&&t.preventDefault();var p=R&&!h;null===T?p||(e.maybeCallOnChange(t,"","escape"),P("",q)?i({value:"",reason:q}):e.onSuggestionsClearRequested()):e.maybeCallOnChange(t,T,"escape"),p?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}D&&D(t)}}),j={query:this.getQuery()};return o.default.createElement(l.default,{multiSection:u,items:M,renderInputComponent:r,renderItemsContainer:this.renderSuggestionsContainer,renderItem:s,renderItemData:j,renderSectionTitle:p,getSectionItems:b,highlightedSectionIndex:E,highlightedItemIndex:C,containerProps:S,inputProps:L,itemProps:this.itemProps,theme:(0,a.mapToAutowhateverTheme)(f),id:d,ref:this.storeAutowhateverRef})}}],n&&d(t.prototype,n),r&&d(t,r),c}(o.Component);t.default=S,y(S,"propTypes",{suggestions:r.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:r.default.func,onSuggestionSelected:r.default.func,onSuggestionHighlighted:r.default.func,renderInputComponent:r.default.func,renderSuggestionsContainer:r.default.func,getSuggestionValue:r.default.func.isRequired,renderSuggestion:r.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:r.default.func,alwaysRenderSuggestions:r.default.bool,multiSection:r.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:r.default.bool,highlightFirstSuggestion:r.default.bool,theme:r.default.object,id:r.default.string,containerProps:r.default.object}),y(S,"defaultProps",{renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return o.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:a.defaultTheme,id:"1",containerProps:{}})},7396:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==f(e)&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(1504)),r=c(n(3268)),i=c(n(7328)),l=c(n(3588)),a=c(n(5320)),s=c(n(7260));function c(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 p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(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=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(r)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e){return function(){var t,n=v(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var o=v(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;return y(e)}(this,t)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function k(e,t){return k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},k(e,t)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w={},q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(u,e);var t,n,r,c=h(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),_(y(t=c.call(this,e)),"storeInputReference",(function(e){null!==e&&(t.input=e);var n=t.props.inputProps.ref;n&&("function"==typeof n?n(e):"object"===f(n)&&Object.prototype.hasOwnProperty.call(n,"current")&&(n.current=e))})),_(y(t),"storeItemsContainerReference",(function(e){null!==e&&(t.itemsContainer=e)})),_(y(t),"onHighlightedItemChange",(function(e){t.highlightedItem=e})),_(y(t),"getItemId",(function(e,n){if(null===n)return null;var o=t.props.id,r=null===e?"":"section-".concat(e);return"react-autowhatever-".concat(o,"-").concat(r,"-item-").concat(n)})),_(y(t),"onFocus",(function(e){var n=t.props.inputProps;t.setState({isInputFocused:!0}),n.onFocus&&n.onFocus(e)})),_(y(t),"onBlur",(function(e){var n=t.props.inputProps;t.setState({isInputFocused:!1}),n.onBlur&&n.onBlur(e)})),_(y(t),"onKeyDown",(function(e){var n=t.props,o=n.inputProps,r=n.highlightedSectionIndex,i=n.highlightedItemIndex,l=e.keyCode;switch(l){case 40:case 38:var a=40===l?"next":"prev",s=d(t.sectionIterator[a]([r,i]),2),c=s[0],u=s[1];o.onKeyDown(e,{newHighlightedSectionIndex:c,newHighlightedItemIndex:u});break;default:o.onKeyDown(e,{highlightedSectionIndex:r,highlightedItemIndex:i})}})),t.highlightedItem=null,t.state={isInputFocused:!1},t.setSectionsItems(e),t.setSectionIterator(e),t.setTheme(e),t}return t=u,(n=[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,i.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,l.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,r=n.id,i=n.items,l=n.renderItem,c=n.renderItemData,u=n.renderSectionTitle,p=n.highlightedSectionIndex,m=n.highlightedItemIndex,d=n.itemProps;return i.map((function(n,i){var b="react-autowhatever-".concat(r,"-"),f="".concat(b,"section-").concat(i,"-"),g=0===i;return o.default.createElement("div",t("".concat(f,"container"),"sectionContainer",g&&"sectionContainerFirst"),o.default.createElement(a.default,{section:n,renderSectionTitle:u,theme:t,sectionKeyPrefix:f}),o.default.createElement(s.default,{items:e.sectionsItems[i],itemProps:d,renderItem:l,renderItemData:c,sectionIndex:i,highlightedItemIndex:p===i?m: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,r=n.id,i=n.renderItem,l=n.renderItemData,a=n.highlightedSectionIndex,c=n.highlightedItemIndex,u=n.itemProps;return o.default.createElement(s.default,{items:e,itemProps:u,renderItem:i,renderItemData:l,highlightedItemIndex:null===a?c:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-".concat(r,"-")})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,o=t.scrollTop;n<o?o=n:n+e.offsetHeight>o+t.offsetHeight&&(o=n+e.offsetHeight-t.offsetHeight),o!==t.scrollTop&&(t.scrollTop=o)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,r=t.multiSection,i=t.renderInputComponent,l=t.renderItemsContainer,a=t.highlightedSectionIndex,s=t.highlightedItemIndex,c=this.state.isInputFocused,u=r?this.renderSections():this.renderItems(),p=null!==u,d=this.getItemId(a,s),b="react-autowhatever-".concat(n),f=m({role:"combobox","aria-haspopup":"listbox","aria-owns":b,"aria-expanded":p},e("react-autowhatever-".concat(n,"-container"),"container",p&&"containerOpen"),{},this.props.containerProps),g=i(m({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":b,"aria-activedescendant":d},e("react-autowhatever-".concat(n,"-input"),"input",p&&"inputOpen",c&&"inputFocused"),{},this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),h=l({containerProps:m({id:b,role:"listbox"},e("react-autowhatever-".concat(n,"-items-container"),"itemsContainer",p&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:u});return o.default.createElement("div",f,g,h)}}])&&g(t.prototype,n),r&&g(t,r),u}(o.Component);t.default=q,_(q,"propTypes",{id:r.default.string,multiSection:r.default.bool,renderInputComponent:r.default.func,renderItemsContainer:r.default.func,items:r.default.array.isRequired,renderItem:r.default.func,renderItemData:r.default.object,renderSectionTitle:r.default.func,getSectionItems:r.default.func,containerProps:r.default.object,inputProps:r.default.object,itemProps:r.default.oneOfType([r.default.object,r.default.func]),highlightedSectionIndex:r.default.number,highlightedItemIndex:r.default.number,theme:r.default.oneOfType([r.default.object,r.default.array])}),_(q,"defaultProps",{id:"1",multiSection:!1,renderInputComponent:function(e){return o.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return o.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 o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(1504)),r=l(n(3268)),i=l(n(1196));function l(e){return e&&e.__esModule?e:{default:e}}function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=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 c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c.apply(this,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function p(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function m(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(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 o=f(this).constructor;t=Reflect.construct(n,arguments,o)}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)}(a,e);var t,n,r,l=d(a);function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return h(b(e=l.call.apply(l,[this].concat(n))),"storeItemReference",(function(t){null!==t&&(e.item=t)})),h(b(e),"onMouseEnter",(function(t){var n=e.props,o=n.sectionIndex,r=n.itemIndex;e.props.onMouseEnter(t,{sectionIndex:o,itemIndex:r})})),h(b(e),"onMouseLeave",(function(t){var n=e.props,o=n.sectionIndex,r=n.itemIndex;e.props.onMouseLeave(t,{sectionIndex:o,itemIndex:r})})),h(b(e),"onMouseDown",(function(t){var n=e.props,o=n.sectionIndex,r=n.itemIndex;e.props.onMouseDown(t,{sectionIndex:o,itemIndex:r})})),h(b(e),"onClick",(function(t){var n=e.props,o=n.sectionIndex,r=n.itemIndex;e.props.onClick(t,{sectionIndex:o,itemIndex:r})})),e}return t=a,n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,r=e.renderItem,i=e.renderItemData,l=p(e,["isHighlighted","item","renderItem","renderItemData"]);return delete l.sectionIndex,delete l.itemIndex,"function"==typeof l.onMouseEnter&&(l.onMouseEnter=this.onMouseEnter),"function"==typeof l.onMouseLeave&&(l.onMouseLeave=this.onMouseLeave),"function"==typeof l.onMouseDown&&(l.onMouseDown=this.onMouseDown),"function"==typeof l.onClick&&(l.onClick=this.onClick),o.default.createElement("li",c({role:"option"},l,{ref:this.storeItemReference}),r(n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({isHighlighted:t},i)))}}],n&&m(t.prototype,n),r&&m(t,r),a}(o.Component);t.default=y,h(y,"propTypes",{sectionIndex:r.default.number,isHighlighted:r.default.bool.isRequired,itemIndex:r.default.number.isRequired,item:r.default.any.isRequired,renderItem:r.default.func.isRequired,renderItemData:r.default.object.isRequired,onMouseEnter:r.default.func,onMouseLeave:r.default.func,onMouseDown:r.default.func,onClick:r.default.func})},7260:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(1504)),r=a(n(3268)),i=a(n(3508)),l=a(n(1196));function a(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 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 u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},u.apply(this,arguments)}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function m(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(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 o=f(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return function(e,t){if(t&&("object"===c(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,r,a=d(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),o=0;o<t;o++)n[o]=arguments[o];return h(b(e=a.call.apply(a,[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,l.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,r=t.itemProps,l=t.renderItem,a=t.renderItemData,s=t.sectionIndex,c=t.highlightedItemIndex,m=t.getItemId,d=t.theme,b=t.keyPrefix,f=null===s?b:"".concat(b,"section-").concat(s,"-"),g="function"==typeof r;return o.default.createElement("ul",u({role:"listbox"},d("".concat(f,"items-list"),"itemsList")),n.map((function(t,n){var b=0===n,y=n===c,v="".concat(f,"item-").concat(n),k=g?r({sectionIndex:s,itemIndex:n}):r,_=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:m(s,n),"aria-selected":y},d(v,"item",b&&"itemFirst",y&&"itemHighlighted"),{},k);return y&&(_.ref=e.storeHighlightedItemReference),o.default.createElement(i.default,u({},_,{sectionIndex:s,isHighlighted:y,itemIndex:n,item:t,renderItem:l,renderItemData:a}))})))}}],n&&m(t.prototype,n),r&&m(t,r),s}(o.Component);t.default=y,h(y,"propTypes",{items:r.default.array.isRequired,itemProps:r.default.oneOfType([r.default.object,r.default.func]),renderItem:r.default.func.isRequired,renderItemData:r.default.object.isRequired,sectionIndex:r.default.number,highlightedItemIndex:r.default.number,onHighlightedItemChange:r.default.func.isRequired,getItemId:r.default.func.isRequired,theme:r.default.func.isRequired,keyPrefix:r.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 o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==s(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=o?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n(1504)),r=l(n(3268)),i=l(n(1196));function l(e){return e&&e.__esModule?e:{default:e}}function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=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 c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(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 o=p(this).constructor;t=Reflect.construct(n,arguments,o)}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 m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}var d,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&&m(e,t)}(a,e);var t,n,r,l=u(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),l.apply(this,arguments)}return t=a,(n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,r=e.theme,i=e.sectionKeyPrefix,l=n(t);return l?o.default.createElement("div",r("".concat(i,"title"),"sectionTitle"),l):null}}])&&c(t.prototype,n),r&&c(t,r),a}(o.Component);t.default=g,d=g,b="propTypes",f={section:r.default.any.isRequired,renderSectionTitle:r.default.func.isRequired,theme:r.default.func.isRequired,sectionKeyPrefix:r.default.string.isRequired},b in d?Object.defineProperty(d,b,{value:f,enumerable:!0,configurable:!0,writable:!0}):d[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 o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!0;var l,a,s={};for(l=0,a=o.length;l<a;l++)s[o[l]]=!0;for(l=0,a=r.length;l<a;l++){var c=r[l],u=e[c],p=t[c];if(u!==p){if(!s[c]||null===u||null===p||"object"!==n(u)||"object"!==n(p))return!0;var m=Object.keys(u),d=Object.keys(p);if(m.length!==d.length)return!0;for(var b=0,f=m.length;b<f;b++){var g=m[b];if(u[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 o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i,l=n(9328),a=(i=l)&&i.__esModule?i:{default:i},s=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=o(t,2),i=n[0],l=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var c=n.map((function(e){return i[e]})).filter(s);return"string"==typeof c[0]||"function"==typeof l?{key:e,className:l?l.apply(void 0,r(c)):c.join(" ")}:{key:e,style:a.default.apply(void 0,[{}].concat(r(c)))}}},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 o,r,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){o=arguments[l],r=n(Object(o));for(var a=0;a<r.length;a++)i[r[a]]=o[r[a]]}return i}},3028:(e,t)=>{"use strict";var n=Symbol.for("react.element"),o=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),d=Symbol.iterator;var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function h(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||b}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||b}h.prototype.isReactComponent={},h.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=h.prototype;var k=v.prototype=new y;k.constructor=v,f(k,h.prototype),k.isPureReactComponent=!0;var _=Array.isArray,w=Object.prototype.hasOwnProperty,q={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,o){var r,i={},l=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(l=""+t.key),t)w.call(t,r)&&!S.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=o;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:n,type:e,key:l,ref:a,props:i,_owner:q.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,r,i,l){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var s=!1;if(null===e)s=!0;else switch(a){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case n:case o:s=!0}}if(s)return l=l(s=e),e=""===i?"."+E(s,0):i,_(l)?(r="",null!=e&&(r=e.replace(x,"$&/")+"/"),C(l,t,r,"",(function(e){return e}))):null!=l&&(I(l)&&(l=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(l,r+(!l.key||s&&s.key===l.key?"":(""+l.key).replace(x,"$&/")+"/")+e)),t.push(l)),1;if(s=0,i=""===i?".":i+":",_(e))for(var c=0;c<e.length;c++){var u=i+E(a=e[c],c);s+=C(a,t,r,u,l)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(a=e.next()).done;)s+=C(a=a.value,t,r,u=i+E(a,c++),l);else if("object"===a)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 o=[],r=0;return C(e,o,"","",(function(e){return t.call(n,e,r++)})),o}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 N={current:null},O={transition:null},D={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:O,ReactCurrentOwner:q};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=r,t.Profiler=l,t.PureComponent=v,t.StrictMode=i,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,t.cloneElement=function(e,t,o){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=f({},e.props),i=e.key,l=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,a=q.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)w.call(t,c)&&!S.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=o;else if(1<c){s=Array(c);for(var u=0;u<c;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:n,type:e.type,key:i,ref:l,props:r,_owner:a}},t.createContext=function(e){return(e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=A,t.createFactory=function(e){var t=A.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=I,t.lazy=function(e){return{$$typeof:m,_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=O.transition;O.transition={};try{e()}finally{O.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return N.current.useCallback(e,t)},t.useContext=function(e){return N.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return N.current.useDeferredValue(e)},t.useEffect=function(e,t){return N.current.useEffect(e,t)},t.useId=function(){return N.current.useId()},t.useImperativeHandle=function(e,t,n){return N.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return N.current.useMemo(e,t)},t.useReducer=function(e,t,n){return N.current.useReducer(e,t,n)},t.useRef=function(e){return N.current.useRef(e)},t.useState=function(e){return N.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return N.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return N.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=[],o=!0,r=!1,i=void 0;try{for(var l,a=e[Symbol.iterator]();!(o=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(r)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,o=e.multiSection;function r(e){var r=t(e,2),i=r[0],l=r[1];return o?null===l||l===n[i]-1?null===(i=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(i))?[null,null]:[i,0]:[i,l+1]:0===n||l===n-1?[null,null]:null===l?[null,0]:[null,l+1]}return{next:r,prev:function(e){var r=t(e,2),i=r[0],l=r[1];return o?null===l||0===l?null===(i=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(i))?[null,null]:[i,n[i]-1]:[i,l-1]:0===n||0===l?[null,null]:null===l?[null,n-1]:[null,l-1]},isLast:function(e){return null===r(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 o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0}},6976:e=>{"use strict";var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var i={},l=[],a=0;a<e.length;a++){var s=e[a],c=o.base?s[0]+o.base:s[0],u=i[c]||0,p="".concat(c," ").concat(u);i[c]=u+1;var m=n(p),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==m)t[m].references++,t[m].updater(d);else{var b=r(d,o);o.byIndex=a,t.splice(a,0,{identifier:p,updater:b,references:1})}l.push(p)}return l}function r(e,t){var n=t.domAPI(t);n.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var i=o(e=e||[],r=r||{});return function(e){e=e||[];for(var l=0;l<i.length;l++){var a=n(i[l]);t[a].references--}for(var s=o(e,r),c=0;c<i.length;c++){var u=n(i[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=s}}},6176:e=>{"use strict";var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},6808:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5120:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},6520:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1936:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},4232:e=>{"use strict";e.exports=jQuery},2084:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=l(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.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)o.call(e,n)&&e[n]&&(t=l(t,n));return t}function l(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={id:o,loaded:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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),n.nc=void 0,(()=>{"use strict";const e=wp.i18n,t=wp.blocks;var o=n(5144),r=n.n(o);const i=wp.hooks,l=wp.data;var a,s=n(1504);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c.apply(this,arguments)}const u=e=>s.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),a||(a=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 m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},m.apply(this,arguments)}const d=e=>s.createElement("svg",m({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 o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}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(u,null)},tablet:{label:(0,e.__)("Tablet","qi-blocks"),icon:wp.element.createElement(d,null)},mobile:{label:(0,e.__)("Mobile","qi-blocks"),icon:wp.element.createElement(g,null)}};let v=h;const k=()=>v,_=wp.components,w=e=>{const t={...e},{blockAttributeKey:n,blockAttributes:o,setAttributes:r,repeater:i,repeaterItemIndex:l,repeaterItemKey:a,repeaterSetAttributes:s,repeaterGetAttributes:c}=t;return t.getAttributeValue=()=>{let e=o[n];return i&&(e=c(a,l)),e||!1},t.setAttributeValue=e=>{i?s(a,e,l):r({[n]:e})},wp.element.createElement("div",{className:"qodef-on-off-option"},wp.element.createElement(_.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 q=w,S=[{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"}],A=e=>{const t={...e},{label:n,description:o,blockAttributeKeys:r,blockAttributes:i,setAttributes:l}=t;return wp.element.createElement("div",{className:"qodef-visibility-group-option"},n&&wp.element.createElement("label",{className:"qodef-option-label"},n),o&&wp.element.createElement("p",{className:"qodef-option-description"},o),r.map((e=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(q,{label:e.label,blockAttributeKey:e.blockAttributeKey,blockAttributes:i,setAttributes:l})))))};A.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:S,blockAttributes:{},setAttributes:()=>{}};const I=(e,t="")=>{const n=e=>N(t,e),o=[];return e[n("cssClasses")]&&o.push(e[n("cssClasses")]),void 0!==e[n("EntranceAnimation")]&&""!==e[n("EntranceAnimation")]&&(o.push("qodef-entrance-animation--on"),e[n("EntranceAnimationDuration")]&&o.push("qodef-animation-speed--"+e[n("EntranceAnimationDuration")])),e[n("BlockWidth")]&&o.push("qodef-width--"+e[n("BlockWidth")]),e[n("BlockWidthTablet")]&&o.push("qodef-width--tablet--"+e[n("BlockWidthTablet")]),e[n("BlockWidthMobile")]&&o.push("qodef-width--mobile--"+e[n("BlockWidthMobile")]),o.push((e=>{const t=[];return S.map((n=>{const o="qodef-hide-on--"+n.classSuffix,r=e[n.blockAttributeKey];t.includes(o)&&!r?t.filter((function(e){return e!==o})):!t.includes(o)&&r&&t.push(o)})),t.join(" ")})(e)),o.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 o=((e,t="")=>{const n=(e,n="")=>N(t,e,n),o={};return void 0!==e[n("EntranceAnimation")]&&""!==e[n("EntranceAnimation")]&&(o["data-animation"]=e[n("EntranceAnimation")]),"custom"!==e[n("BlockWidth")]&&"custom"!==e[n("BlockWidthTablet")]&&"custom"!==e[n("BlockWidthMobile")]||["","Tablet","Mobile"].forEach((t=>{const r=e[n("BlockCustomWidth",t)],i=e[n("BlockCustomWidthDecimal",t)],l=e[n("BlockCustomWidthUnit",t)];M(l)&&r?o["data-width"+(t?"-"+t.toLowerCase():"")]=parseInt(r,10)+l:L(l)&&i&&(o["data-width"+(t?"-"+t.toLowerCase():"")]=parseFloat(i)+l)})),o})(e,t);return o&&(n={...n,...o}),n},C=(e,t="",n=[])=>P(e,t,n),T=(e,t,n=[])=>{if(!e)return"";let o=[`qi-block-${e}`,"qodef-block","qodef-m"];return V(t.attributes.className,"all")&&o.push(t.attributes.className),n&&(o=[...o,...n]),o.join(" ")},P=(e,t="",n=[])=>{const o=e=>N(t,e);if(!e)return"";let r=[];return V(e[o("cssId")],"all")&&r.push(e[o("cssId")]),n&&(r=[...r,...n]),r.join(" ")},N=(t,n,o)=>(t=t||"",n=n||"",o=o||"",r()((0,e.sprintf)("%s%s%s",t,n,o))),O=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",D=e=>e&&h!==e?O(e):"",B=(e,t)=>{let n=e.desktop;return"mobile"===t&&(n={...n,...e.tablet}),{...n,...e[t]}},R=(e,t=!0)=>{let n="";return Object.entries(e).map((([e,o])=>{n+=`${e.replace(/([A-Z])/g,((e,t,n)=>(n>0?"-":"")+e.toLowerCase()))}: ${o} ${t?"!important":""};`})),n},M=e=>["px"].includes(e),L=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},z=e=>{let t="";return 0===e||"0"===e?t=0:e&&(t=e),t},U=(t,n=!0,o=[])=>{let r=[],l=[];if(t){switch(n&&(r=[{value:"",label:(0,e.__)("Default","qi-blocks")}]),t){case"no_yes":l=[{value:"no",label:(0,e.__)("No","qi-blocks")},{value:"yes",label:(0,e.__)("Yes","qi-blocks")}];break;case"yes_no":l=[{value:"yes",label:(0,e.__)("Yes","qi-blocks")},{value:"no",label:(0,e.__)("No","qi-blocks")}];break;case"link_target":l=[{value:"_self",label:(0,e.__)("Same Window","qi-blocks")},{value:"_blank",label:(0,e.__)("New Window","qi-blocks")}];break;case"column_gap":l=[{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":l=[{value:"predefined",label:(0,e.__)("Predefined","qi-blocks")},{value:"custom",label:(0,e.__)("Custom","qi-blocks")}];break;case"masonry_image_sizes":l=[{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":l=[{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":l=[{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":l=[{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":l=[{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":l=[{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":l=[{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":l=[{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":l=[{value:"scroll",label:(0,e.__)("Scroll","qi-blocks")},{value:"fixed",label:(0,e.__)("Fixed","qi-blocks")}];break;case"background_repeat":l=[{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":l=[{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":l=[{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":l=[{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":l=[{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":l=[{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":l=[{value:"random",label:(0,e.__)("Random","qi-blocks")},{value:"ms",label:(0,e.__)("Set ms","qi-blocks")}];break;case"responsive_screens":l=[{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":l=[{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":l=[{value:"desc",label:(0,e.__)("Descending","qi-blocks")},{value:"asc",label:(0,e.__)("Ascending","qi-blocks")}];break;case"border_style":l=[{value:"solid",label:(0,e.__)("Solid","qi-blocks")},{value:"dashed",label:(0,e.__)("Dashed","qi-blocks")},{value:"dotted",label:(0,e.__)("Dotted","qi-blocks")}]}r=[...r,...l],o&&(r=[...r,...o])}return(0,i.applyFilters)("qi-blocks-filter-options-pool",r)},F=(e,t="",n={cssProp:"",value:""})=>{const{attributes:o,blockAttrName:r,cssProp:i}=e,l=V(e,"all")&&void 0!==e.direction&&e.direction?O(e.direction):"",a=!!V(e,"all")&&(e.customUnitValue??!1);let s={},c={},u={};return Object.entries(y).map((([e])=>{let p=D(e),m="",d=r+l+p,b=r+l+"Decimal"+p,f=o[r+"Unit"+p];(V(o[d])||V(o[b]))&&(M(f)&&V(o[d])&&!a?m=j(o[d])+f:L(f)&&V(o[b])&&!a?m=j(o[b],"decimal")+f:""!==o[d]&&(m=o[d]));const g=e=>{let n=e;if(t.includes("%s")){const o=t.split("%s");n="",o.forEach(((t,r)=>{n+=t,r!==o.length-1&&(n+=e)}))}return n};if(m)switch(e){case"desktop":s[i]=t?g(m):m,n.cssProp&&n.value&&(s[n.cssProp]=n.value);break;case"tablet":c[i]=t?g(m):m,n.cssProp&&n.value&&(c[n.cssProp]=n.value);break;case"mobile":u[i]=t?g(m):m,n.cssProp&&n.value&&(u[n.cssProp]=n.value)}})),{desktop:s,tablet:c,mobile:u}},K=()=>({hideOnDesktop:{type:"boolean",default:!1},hideOnTablet:{type:"boolean",default:!1},hideOnMobile:{type:"boolean",default:!1}}),$=e=>{const{attrNameTemplate:t,attrName:n}=e,o=e=>N(t,n,e),r=!V(e,"all")||(e.allowUnitControl??!0),i=V(e,"all")&&e.disableDirections||[];let l={};return["Top","Right","Bottom","Left"].map((e=>{i.includes(e)||(l[o(e)]={type:"number",default:""},l[o(e+"Tablet")]={type:"number",default:""},l[o(e+"Mobile")]={type:"number",default:""},r&&(l[o(`${e}Decimal`)]={type:"number",default:""},l[o(`${e}DecimalTablet`)]={type:"number",default:""},l[o(`${e}DecimalMobile`)]={type:"number",default:""}))})),l[o("Unit")]={type:"string",default:"px"},l[o("UnitTablet")]={type:"string",default:"px"},l[o("UnitMobile")]={type:"string",default:"px"},l};$.defaultProps={attrNameTemplate:"",attrName:"",allowUnitControl:!0};const H=$,G=e=>{const{blockAttributeKey:t}=e,n=!!V(e,"all")&&(e.allowScreens??!1),o=!V(e,"all")||(e.allowUnits??!0),r=V(e,"all")&&e.optionType||"integer",i=V(e,"all")&&e.defaultValue||"",l="decimal"===r?i:"";let a={};return"integer"===r&&(a[t]={type:"number",default:i}),a[N(t,"Unit")]={type:"string",default:"px"},(o||"decimal"===r)&&(a[N(t,"Decimal")]={type:"number",default:l}),n&&(a[N(t,"Tablet")]={type:"number",default:""},a[N(t,"Mobile")]={type:"number",default:""},a[N(t,"UnitTablet")]={type:"string",default:"px"},a[N(t,"UnitMobile")]={type:"string",default:"px"},o&&(a[N(t,"DecimalTablet")]={type:"number",default:""},a[N(t,"DecimalMobile")]={type:"number",default:""})),a};G.defaultProps={allowScreens:!1,allowUnits:!0};const W=G,Y=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=V(e,"all")&&e.attrName||"Background",o=e=>N(t,n+e),r=W({blockAttributeKey:o("XPosition"),allowScreens:!0}),i=W({blockAttributeKey:o("YPosition"),allowScreens:!0}),l=W({blockAttributeKey:o("SizeWidth"),allowScreens:!0});return{[o("Image")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[o("ImageTablet")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[o("ImageMobile")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[o("Position")]:{type:"string",default:""},[o("PositionTablet")]:{type:"string",default:""},[o("PositionMobile")]:{type:"string",default:""},...r,...i,[o("Attachment")]:{type:"string",default:""},[o("Repeat")]:{type:"string",default:""},[o("RepeatTablet")]:{type:"string",default:""},[o("RepeatMobile")]:{type:"string",default:""},[o("Size")]:{type:"string",default:""},[o("SizeTablet")]:{type:"string",default:""},[o("SizeMobile")]:{type:"string",default:""},...l}};Y.defaultProps={attrNameTemplate:"",attrName:"Background"};const X=Y,Z=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=e=>N(t,e),o=!!V(e,"all")&&(e.includeVideoBG??!1),r=X({attrNameTemplate:t});let i={[n("BackgroundType")]:{type:"string",default:""},[n("BackgroundColor")]:{type:"string",default:""},...r,[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(o){const e={[n("BackgroundVideoLink")]:{type:"object",default:{id:null,url:"",alt:""}},[n("BackgroundVideoStartTime")]:{type:"number",default:""},[n("BackgroundVideoEndTime")]:{type:"number",default:""},[n("BackgroundVideoStartTime")]:{type:"number",default:""},[n("BackgroundVideoPlayOnce")]:{type:"boolean",default:!1},[n("BackgroundVideoPlayOnMobile")]:{type:"boolean",default:!1},[n("BackgroundVideoFallbackImage")]:{type:"object",default:{id:null,url:"",alt:""}}};i={...i,...e}}return i};Z.defaultProps={attrNameTemplate:"",includeVideoBG:!1};const J=Z,Q=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=V(e,"all")&&e.attrName||"",o=V(e,"all")&&e.defaultValue||"",r=e=>N(t,n+e);return{[r("")]:{type:"string",default:o},[r("Tablet")]:{type:"string",default:""},[r("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||[],o=!V(e,"all")||(e.allowBorderColor??!0),r=!V(e,"all")||(e.allowBorderRadius??!0),i=e=>N(t,e),l=H({attrNameTemplate:t,attrName:"BorderWidth",disableDirections:n,allowUnitControl:!1}),a=o?{[i("BorderColor")]:{type:"string",default:""}}:{},s=r?H({attrNameTemplate:t,attrName:"BorderRadius"}):{};return{[i("BorderStyle")]:{type:"string",default:""},...a,...l,...s}};te.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0};const ne=te,oe=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=e=>N(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:""}}};oe.defaultProps={attrNameTemplate:""};const re=oe,ie=e=>{const t=V(e,"all")&&e.excludePanels||[],n=V(e,"all")&&e.includePanels||[];let o=n&&n.length?n:["advanced","motion-effects","background","border","positioning","responsive"];const r=e=>N("",e);t&&t.length&&t.forEach((e=>{o.splice(o.indexOf(e),1)}));let i={};const l=K();if(o.includes("advanced")){const e=H({attrName:r("Margin")}),t=H({attrName:r("Padding")});i={...i,...e,...t,[r("zIndex")]:{type:"number",default:""},[r("cssId")]:{type:"string",default:""},[r("cssClasses")]:{type:"string",default:""}}}if(o.includes("motion-effects")&&(i={...i,[r("EntranceAnimation")]:{type:"string",default:""},[r("EntranceAnimationDuration")]:{type:"string",default:"normal"},[r("EntranceAnimationDelay")]:{type:"number",default:""}}),o.includes("background")){const e=J({attrNameTemplate:"Advanced"});i={...i,...e}}if(o.includes("border")){const e=ne({attrNameTemplate:"Advanced"}),t=re({attrNameTemplate:"Advanced"});i={...i,...e,...t}}if(o.includes("positioning")){const e=ee({attrName:r("BlockWidth")}),t=W({blockAttributeKey:r("BlockCustomWidth"),allowScreens:!0}),n=W({blockAttributeKey:r("PositionHorizontalOffset"),allowScreens:!0}),o=W({blockAttributeKey:r("PositionVerticalOffset"),allowScreens:!0});i={...i,...e,...t,[r("BlockPosition")]:{type:"string",default:""},[r("PositionHorizontalOrientation")]:{type:"string",default:"left"},...n,[r("PositionVerticalOrientation")]:{type:"string",default:"top"},...o}}return o.includes("responsive")&&(i={...i,...l}),i};ie.defaultProps={excludePanels:[],includePanels:[]};const le=ie;var ae=n(7060),se=n.n(ae);const ce=e=>{const t=!V(e,"all")||(e.allowColumnsGap??!0),n=!V(e,"all")||(e.allowColumnsGapSlider??!0),o=!V(e,"all")||(e.allowColumnsResponsive??!0),r=V(e,"all")&&e.attrNameTemplate||"",i=V(e,"all")&&e.defaultColumnNumber||3,l=V(e,"all")&&e.allowColumnsGapSliderValue||"";let a={},s={};return a[N(r,"Columns")]={type:"number",default:i},t&&(a[N(r,"ColumnsGap")]={type:"string",default:"normal"}),n&&(s=W({blockAttributeKey:N(r,"SpaceBetweenItems"),allowScreens:!0,defaultValue:l})),o&&(a[N(r,"ColumnsResponsive")]={type:"string",default:"predefined"},a[N(r,"Columns1440")]={type:"number",default:""},a[N(r,"Columns1366")]={type:"number",default:""},a[N(r,"Columns1024")]={type:"number",default:""},a[N(r,"Columns768")]={type:"number",default:""},a[N(r,"Columns680")]={type:"number",default:""},a[N(r,"Columns480")]={type:"number",default:""}),se()(a,s)};ce.defaultProps={allowColumnsGap:!0,allowColumnsResponsive:!0,attrNameTemplate:"",defaultColumnNumber:3};const ue=ce,pe=e=>{const t=V(e,"all")&&e.attrNameTemplate||"",n=e=>N(t,e),o=W({blockAttributeKey:n("FontSize"),allowScreens:!0}),r=W({blockAttributeKey:n("LineHeight"),allowScreens:!0}),i=W({blockAttributeKey:n("LetterSpacing"),allowScreens:!0});return{[n("FontFamily")]:{type:"string",default:""},...o,[n("FontWeight")]:{type:"string",default:""},[n("TextTransform")]:{type:"string",default:""},[n("FontStyle")]:{type:"string",default:""},[n("TextDecoration")]:{type:"string",default:""},...r,...i}};pe.defaultProps={attrNameTemplate:""};const me=pe,de=e=>{const t=!V(e,"all")||(e.allowSize??!0),n=!V(e,"all")||(e.allowColor??!0),o=V(e,"all")&&e.attrNameTemplate||"",r=V(e,"all")&&e.default||"";let i={},l={};return i[N(o,"Icon")]={type:"object",default:{html:r}},t&&(l=W({blockAttributeKey:N(o,"IconFontSize"),allowScreens:!0})),n&&(i[N(o,"IconColor")]={type:"string",default:""}),se()(i,l)};de.defaultProps={allowSize:!0,allowColor:!0,attrNameTemplate:"",default:""};const be=de,fe=le(),ge=ue({attrNameTemplate:"Timeline"}),he=H({attrNameTemplate:"Image",attrName:"BorderRadius"}),ye=W({blockAttributeKey:"horizontalSideWidth",allowScreens:!0}),ve=W({blockAttributeKey:"horizontalContentWidth",allowScreens:!0}),ke=me({attrNameTemplate:"Title"}),_e=me({attrNameTemplate:"Text"}),we=me({attrNameTemplate:"Date"}),qe=W({blockAttributeKey:"titleMarginBottom",allowScreens:!0}),Se=H({attrNameTemplate:"Title",attrName:"Padding"}),Ae=W({blockAttributeKey:"dateMarginBottom",allowScreens:!0}),Ie=W({blockAttributeKey:"textMarginBottom",allowScreens:!0}),xe=H({attrNameTemplate:"Text",attrName:"Padding"}),Ee=W({blockAttributeKey:"spaceBetweenItems",allowScreens:!0}),Ce=W({blockAttributeKey:"spaceFromCenter",allowScreens:!0}),Te=W({blockAttributeKey:"verticalSideItemSidePadding",allowScreens:!0}),Pe=H({attrNameTemplate:"verticalSideImage",attrName:"Margin"}),Ne=W({blockAttributeKey:"lineThickness",allowScreens:!0}),Oe=W({blockAttributeKey:"pointPosition",allowScreens:!0}),De=W({blockAttributeKey:"pointDiamondLinesSize",allowScreens:!0}),Be=W({blockAttributeKey:"pointSize",allowScreens:!0}),Re=H({attrNameTemplate:"Point",attrName:"BorderRadius"}),Me=W({blockAttributeKey:"iconSize",allowScreens:!0}),Le=be({attrNameTemplate:"prev",allowSize:!1,allowColor:!1}),je=be({attrNameTemplate:"next",allowSize:!1,allowColor:!1}),Ve=W({blockAttributeKey:"navigationSize",allowScreens:!0}),ze=W({blockAttributeKey:"navigationOffset",allowScreens:!0}),Ue={uniqueClass:{type:"string",default:""},layout:{type:"string",default:"horizontal-alternating"},timelineRepeater:{type:"array",default:[{itemPointIcon:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultImage,alt:""},itemTitle:qiBlocksEditor.vars.defaultTitleLabel+" 1",itemDate:"1980",itemText:qiBlocksEditor.vars.defaultContentLabel,itemLink:{}},{itemPointIcon:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultImage,alt:""},itemTitle:qiBlocksEditor.vars.defaultTitleLabel+" 2",itemDate:"1983",itemText:qiBlocksEditor.vars.defaultContentLabel,itemLink:{}},{itemPointIcon:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultImage,alt:""},itemTitle:qiBlocksEditor.vars.defaultTitleLabel+" 3",itemDate:"1989",itemText:qiBlocksEditor.vars.defaultContentLabel,itemLink:{}}]},appearAnimation:{type:"boolean",default:!0},titleTag:{type:"string",default:"h4"},lineType:{type:"string",default:"outside"},lineColor:{type:"string",default:"#ebebeb"},pointType:{type:"string",default:"standard"},pointColor:{type:"string",default:"#111"},iconColor:{type:"string",default:""},navigationColor:{type:"string",default:""},...fe,...ge,...he,...ye,...ve,...ke,titleColor:{type:"string",default:""},titleHoverColor:{type:"string",default:""},..._e,textColor:{type:"string",default:""},...we,dateColor:{type:"string",default:""},...qe,...Se,...Ae,...Ie,...xe,...Ee,...Ce,...Te,...Pe,...Ne,...Oe,...De,...Be,...Re,...Me,...Le,...je,...Ve,...ze};var Fe=n(948),Ke=n.n(Fe);const $e=wp.blockEditor,He=wp.compose,Ge=wp.element;var We=n(2084),Ye=n.n(We);const Xe=e=>{const t=t=>N(e.attrNameTemplate,e.attrName,t),n=V(e,"all")&&void 0!==e.disableDirections&&e.disableDirections.length>0?e.disableDirections:[],o=V(e,"all")&&void 0!==e.isImportant&&e.isImportant?" !important":"",{blockAttributes:r}=e,i=["Top","Right","Bottom","Left"];let l={},a={},s={};return Object.entries(y).map((([c])=>{const u=D(c),p=t("Unit"+u),m="p"===r[p]?"%":r[p]||"px";[...i].map(((p,d)=>{const b=r[t(p+u)],f=r[t(`${p}Decimal`+u)];if(V(b)||V(f)){let t;const r=e.attrName?e.attrName.toLowerCase():"";if(r.includes("border")){if(r.includes("width"))t=`border${p}Width`;else if(r.includes("radius")){let e,n,o;n=d%2?i[d-1]:p,o=d%2?p:i[i.length-d-1],e=`${n}${o}`,t=`border${e}Radius`}}else t=e.attrName?`${r}${p}`:p.toLowerCase();let u="";if(M(m)&&""!==b?u=n.length>0&&n.includes(p)?"":parseInt(b,10)+m:L(m)&&""!==f&&(u=n.length>0&&n.includes(p)?"":parseFloat(f)+m),u)switch(c){case"desktop":l[t]=u+o;break;case"tablet":a[t]=u+o;break;case"mobile":s[t]=u+o}}}))})),{desktop:l,tablet:a,mobile:s}};Xe.defaultProps={attrNameTemplate:"",attrName:"",blockAttributes:{},disableDirections:[],isImportant:!1};const Ze=Xe,Je=e=>{const{blockAttributes:t}=e,n=V(e,"all")&&e.attrNameTemplate||"",o=V(e,"all")&&e.attrName||"Background",r=(e,t)=>N(n,o+e,t);let i={},l={},a={};return t[r("Attachment")]&&(i.backgroundAttachment=t[r("Attachment")]),Object.entries(y).map((([e])=>{let n=D(e),o={};if(t[r("Image",n)]&&t[r("Image",n)].url&&(o.backgroundImage=`url(${t[r("Image",n)].url})`),t[r("Repeat",n)]&&(o.backgroundRepeat=t[r("Repeat",n)]),"custom"===t[r("Position",n)]){let e="",i="";(t[r("XPosition",n)]||t[r("XPositionDecimal",n)])&&(M(t[r("XPositionUnit",n)])&&t[r("XPosition",n)]?e=parseInt(t[r("XPosition",n)],10)+t[r("XPositionUnit",n)]:L(t[r("XPositionUnit",n)])&&t[r("XPositionDecimal",n)]&&(e=parseFloat(t[r("XPositionDecimal",n)])+t[r("XPositionUnit",n)])),(t[r("YPosition",n)]||t[r("YPositionDecimal",n)])&&(M(t[r("YPositionUnit",n)])&&t[r("YPosition",n)]?i=parseInt(t[r("YPosition",n)],10)+t[r("YPositionUnit",n)]:L(t[r("YPositionUnit",n)])&&t[r("YPositionDecimal",n)]&&(i=parseFloat(t[r("YPositionDecimal",n)])+t[r("YPositionUnit",n)])),""===e&&""===i||(o.backgroundPosition=e+" "+i)}else t[r("Position",n)]&&(o.backgroundPosition=t[r("Position",n)]);"custom"===t[r("Size",n)]?(t[r("SizeWidth",n)]||t[r("SizeWidthDecimal",n)])&&(M(t[r("SizeWidthUnit",n)])&&t[r("SizeWidth",n)]?o.backgroundSize=parseInt(t[r("SizeWidth",n)],10)+t[r("SizeWidthUnit",n)]+" auto":L(t[r("SizeWidthUnit",n)])&&t[r("SizeWidthDecimal",n)]&&(o.backgroundSize=parseFloat(t[r("SizeWidthDecimal",n)])+t[r("SizeWidthUnit",n)]+" auto")):t[r("Size",n)]&&(o.backgroundSize=t[r("Size",n)]),Object.keys(o).length>0&&Object.entries(o).map((([t,n])=>{switch(e){case"desktop":i[t]=n;break;case"tablet":l[t]=n;break;case"mobile":a[t]=n}}))})),{desktop:i,tablet:l,mobile:a}};Je.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{}};const Qe=Je,et=e=>{const{blockAttributes:t}=e,n=V(e,"all")&&e.attrNameTemplate||"",o=(e,t)=>N(n,e,t),r=t[o("BackgroundType")]||"";let i={},l={},a={};if("gradient"===r){let e={type:"linear",position:"",color_1:"",location_1:"",color_2:"",location_2:""};t[o("BackgroundGradientColor1")]&&(e.color_1=t[o("BackgroundGradientColor1")]),V(t[o("BackgroundGradientLocation1")])&&(e.location_1=j(t[o("BackgroundGradientLocation1")])+"%"),t[o("BackgroundGradientColor2")]&&(e.color_2=t[o("BackgroundGradientColor2")]),V(t[o("BackgroundGradientLocation2")])&&(e.location_2=j(t[o("BackgroundGradientLocation2")])+"%"),t[o("BackgroundGradientType")]&&(e.type=t[o("BackgroundGradientType")]),"linear"===e.type&&""!==t[o("BackgroundGradientTypeAngle")]?e.position=j(t[o("BackgroundGradientTypeAngle")])+"deg":"radial"===e.type&&t[o("BackgroundGradientTypePosition")]&&(e.position="at "+t[o("BackgroundGradientTypePosition")]),e.type&&e.position&&e.color_1&&e.location_1&&e.color_2&&e.location_2?(i.backgroundColor="transparent",i.backgroundImage=`${e.type}-gradient(${e.position}, ${e.color_1} ${e.location_1}, ${e.color_2} ${e.location_2})`):e.color_1&&(i.backgroundColor=e.color_1)}else"video"===r?!t[o("BackgroundVideoPlayOnMobile")]&&t[o("BackgroundVideoFallbackImage")]&&t[o("BackgroundVideoFallbackImage")].url&&(l.backgroundImage=`url(${t[o("BackgroundVideoFallbackImage")].url})`,l.backgroundPosition="center",l.backgroundSize="cover"):(t[o("BackgroundColor")]&&(i.backgroundColor=t[o("BackgroundColor")]),a=Qe({attrNameTemplate:n,blockAttributes:t}));return se()({desktop:i,tablet:{},mobile:l},a)};et.defaultProps={attrNameTemplate:"",blockAttributes:{}};const tt=et,nt=e=>{const{blockAttributes:t}=e,n=V(e,"all")&&e.attrNameTemplate||"",o=V(e,"all")&&e.disableWidthDirections||[],r=!V(e,"all")||(e.allowBorderColor??!0),i=(e,t)=>N(n,e,t);let l={},a={};const s=!V(e,"all")||(e.allowBorderRadius??!0)?Ze({blockAttributes:t,attrNameTemplate:n,attrName:"BorderRadius",disableDirections:o}):{};return t[i("BorderStyle")]&&(l.borderStyle=t[i("BorderStyle")],r&&t[i("BorderColor")]&&(l.borderColor=t[i("BorderColor")]),a=Ze({attrNameTemplate:n,attrName:"BorderWidth",blockAttributes:t})),se()({desktop:l,tablet:{},mobile:{}},a,s)};nt.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0,blockAttributes:{}};const ot=nt,rt=e=>{const{blockAttributes:t,excludeOptions:n}=e,o=V(e,"all")&&e.attrNameTemplate||"",r=(e,t)=>N(o,e,t);let i={},l={x:0,y:0,blur:0,spread:0,color:"",position:""};var a;return t[r("BoxShadowColor")]&&(l.color=t[r("BoxShadowColor")]),""!==t[r("BoxShadowHorizontal")]&&(l.x=t[r("BoxShadowHorizontal")]),""!==t[r("BoxShadowVertical")]&&(l.y=t[r("BoxShadowVertical")]),""!==t[r("BoxShadowBlur")]&&(l.blur=t[r("BoxShadowBlur")]),""!==t[r("BoxShadowSpread")]&&(l.spread=t[r("BoxShadowSpread")]),a="position",n&&n.length&&n.includes(a)||!t[r("BoxShadowPosition")]||(l.position=t[r("BoxShadowPosition")]),l.color&&(i.boxShadow=l.x+"px "+l.y+"px "+l.blur+"px "+l.spread+"px "+l.color+" "+l.position),{desktop:i,tablet:{},mobile:{}}};rt.defaultProps={attrNameTemplate:"",blockAttributes:{}};const it=rt,lt=e=>{const{blockAttributes:t}=e,n=(e,t="")=>N("",e,t),o=V(e,"all")&&e.excludePanels||[],r=V(e,"all")&&e.includePanels||[];let i=r&&r.length?r:["advanced","motion-effects","background","border","positioning","responsive"];o&&o.length&&o.forEach((e=>{i.splice(i.indexOf(e),1)}));let l={},a={},s={},c={},u={};i.includes("advanced")&&(V(t[n("zIndex")])&&(l.zIndex=j(t[n("zIndex")])),c=Ze({attrName:n("Margin"),blockAttributes:t}),u=Ze({attrName:n("Padding"),blockAttributes:t})),i.includes("motion-effects")&&void 0!==t[n("EntranceAnimation")]&&""!==t[n("EntranceAnimation")]&&t[n("EntranceAnimationDelay")]&&(l.animationDelay=j(t[n("EntranceAnimationDelay")])+"ms");let p={};i.includes("background")&&(p=tt({attrNameTemplate:"Advanced",blockAttributes:t}));let m={};if(i.includes("border")){const e=ot({attrNameTemplate:"Advanced",blockAttributes:t}),n=it({attrNameTemplate:"Advanced",blockAttributes:t});m=se()(e,n)}if(i.includes("positioning")){V(t[n("BlockPosition")])&&(l.position=t[n("BlockPosition")]);const e=t[n("PositionHorizontalOrientation")],o=t[n("PositionVerticalOrientation")];Object.entries(y).map((([r])=>{let i=D(r),c={};"custom"!==t[n("BlockWidth")]&&"custom"!==t[n("BlockWidth",i)]||!t[n("BlockCustomWidth",i)]&&!t[n("BlockCustomWidthDecimal",i)]||(M(t[n("BlockCustomWidthUnit",i)])&&t[n("BlockCustomWidth",i)]?(c.width=parseInt(t[n("BlockCustomWidth",i)],10)+t[n("BlockCustomWidthUnit",i)],c.maxWidth=parseInt(t[n("BlockCustomWidth",i)],10)+t[n("BlockCustomWidthUnit",i)]):L(t[n("BlockCustomWidthUnit",i)])&&t[n("BlockCustomWidthDecimal",i)]&&(c.width=parseFloat(t[n("BlockCustomWidthDecimal",i)])+t[n("BlockCustomWidthUnit",i)],c.maxWidth=parseFloat(t[n("BlockCustomWidthDecimal",i)])+t[n("BlockCustomWidthUnit",i)])),""===z(t[n("PositionHorizontalOffset",i)])&&""===z(t[n("PositionHorizontalOffsetDecimal",i)])||(M(t[n("PositionHorizontalOffsetUnit",i)])&&""!==z(t[n("PositionHorizontalOffset",i)])?c[e]=parseInt(t[n("PositionHorizontalOffset",i)],10)+t[n("PositionHorizontalOffsetUnit",i)]:L(t[n("PositionHorizontalOffsetUnit",i)])&&""!==z(t[n("PositionHorizontalOffsetDecimal",i)])&&(c[e]=parseFloat(t[n("PositionHorizontalOffsetDecimal",i)])+t[n("PositionHorizontalOffsetUnit",i)])),""===z(t[n("PositionVerticalOffset",i)])&&""===z(t[n("PositionVerticalOffsetDecimal",i)])||(M(t[n("PositionVerticalOffsetUnit",i)])&&""!==z(t[n("PositionVerticalOffset",i)])?c[o]=parseInt(t[n("PositionVerticalOffset",i)],10)+t[n("PositionVerticalOffsetUnit",i)]:L(t[n("PositionVerticalOffsetUnit",i)])&&""!==z(t[n("PositionVerticalOffsetDecimal",i)])&&(c[o]=parseFloat(t[n("PositionVerticalOffsetDecimal",i)])+t[n("PositionVerticalOffsetUnit",i)])),Object.keys(c).length>0&&Object.entries(c).map((([e,t])=>{switch(r){case"desktop":l[e]=t;break;case"tablet":a[e]=t;break;case"mobile":s[e]=t}}))}))}return l={desktop:l,tablet:a,mobile:s},se()(l,c,u,p,m)};lt.defaultProps={blockAttributes:{},excludePanels:[],includePanels:[]};const at=lt,st=e=>{const{unitType:t,unitValue:n,onChangeUnit:o}=e;if(e.units[t])return wp.element.createElement("ul",{className:"qodef-unit-control"},Object.entries(e.units[t]).map((([e,t],r)=>wp.element.createElement("li",{key:r},wp.element.createElement("a",{className:Ye()("qodef-unit",{"qodef--selected":("p"===e?"%":e)===n}),onClick:o,"data-unit":"p"===e?"%":e},t)))))};st.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 ct=st;class ut extends Ge.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}),v=e,!t&&n.changePreviewScreen(e),(0,i.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,i.addAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`,this.onOtherScreenChange.bind(this))}componentWillUnmount(){const{instanceId:e}=this.props;(0,i.removeAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`)}changeScreenControls(e){k()!==e.previewScreen&&this.onChangeScreen(e.previewScreen,!0)}changePreviewScreen(e){if(e!==this.props.previewScreen){const t=(0,l.dispatch)("core/edit-post")||"",n=(0,l.dispatch)("core/edit-site")||"";let o;if(t){let{__experimentalSetPreviewDeviceType:e}=t;o=e}if(n){const{__experimentalSetPreviewDeviceType:e}=n;o=e}o&&o(O(e))}}render(){const e={...this.props},t={...this.state},{label:n,screens:o,isWidgetsArea:r,previewScreen:i}=e;let l=!1;return(o.length<1||r)&&(l=!0),h!==i&&t.screen!==i&&this.onOtherScreenChange(i),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(o).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),!l&&wp.element.createElement("ul",{className:"qodef-screens "+(t.isScreenPickerOpen?"qodef--opened":"")},Object.entries(o).map((([e,n],r)=>r===Object.keys(o).indexOf(t.screen)||t.isScreenPickerOpen?wp.element.createElement("li",{className:"qodef-screen-item "+(e===t.screen?"qodef--selected":""),key:r},wp.element.createElement(_.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))))}}ut.defaultProps={label:"",screens:y,isWidgetsArea:!1,previewScreen:"desktop",onChangeScreen:()=>{}};const pt=(0,l.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,He.withInstanceId)(ut));class mt extends Ge.Component{constructor(){super(...arguments),this.state={screen:k(),linkedInputs:!1}}getScreenLabelSuffix(e){const t=e||this.state.screen;return D(t)}getAttributeValue(e,t=""){const{blockAttributes:n,allowScreens:o,repeater:r,repeaterItemIndex:i,repeaterItemKey:l,repeaterGetAttributes:a}=this.props;let s=e;o&&t&&(s=e+t);let c=n[s];return r&&(c=a({key:l,childKey:s},i)),z(c)}setAttributeValue(e,t,n=""){const{setAttributes:o,allowScreens:r,repeater:i,repeaterItemIndex:l,repeaterItemKey:a,repeaterSetAttributes:s}=this.props;let c=e;r&&n&&(c=e+n),i?s({key:a,childKey:c},t,l):o({[c]:t})}render(){const t={...this.props},{label:n,allowScreens:o,rangeMax:r,rangeMin:i,rangeStep:l,rangeDecimalMax:a,rangeDecimalMin:s,rangeDecimalStep:c,repeater:u}=t,p=e=>N(t.attrNameTemplate,t.attrName,e),m=this.getScreenLabelSuffix(),d=p(),b=p("Unit"+m),f=["Top","Right","Bottom","Left"],g=()=>{const e=this.getAttributeValue(b)||"px";return M(e)},h="margin"===t.attrName.toLowerCase()||t.allowNegativeValues?-1*(g()?r:a):g()?i:s;return t.onChange=(e,t)=>{g()?this.setAttributeValue(p(t),j(e),m):this.setAttributeValue(p(`${t}Decimal`),j(e,"decimal"),m)},t.getValue=e=>{let t;return t=g()?""!==this.getAttributeValue(p(e),m)?parseInt(this.getAttributeValue(p(e),m),10):"":""!==this.getAttributeValue(p(`${e}Decimal`),m)?parseFloat(this.getAttributeValue(p(`${e}Decimal`),m)):"",t},t.getPlaceholderValue=e=>{let t="";return"Tablet"===m?t=g()?""!==this.getAttributeValue(p(e))?parseInt(this.getAttributeValue(p(e)),10):"":""!==this.getAttributeValue(p(`${e}Decimal`))?parseFloat(this.getAttributeValue(p(`${e}Decimal`))):"":"Mobile"===m&&(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=u?200:0,n=e.target.getAttribute("data-unit"),o=this.getAttributeValue(b)||"px";this.setAttributeValue(b,n),setTimeout((()=>{n!==o&&[...f].map((e=>{const t=d+e,r=`${t}Decimal`;let i=t+m,l=r+m;"px"!==n&&(i=r+m),"px"===o&&(l=t+m,this.setAttributeValue(l,"")),this.setAttributeValue(i,this.getAttributeValue(l))}))}),t)},wp.element.createElement(_.BaseControl,{className:"qodef-input-control"},wp.element.createElement("div",{className:"qodef-control-heading"},o?wp.element.createElement("div",{className:"qodef-input-control-screens"},wp.element.createElement(pt,{label:n,onChangeScreen:t.onChangeScreen})):wp.element.createElement("label",{className:"qodef-option-label"},n),t.allowUnitControl&&wp.element.createElement(ct,{unitType:t.unitType,unitValue:this.getAttributeValue(b),onChangeUnit:t.onChangeUnit}),t.allowLinkedControl&&wp.element.createElement(_.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(_.RangeControl,{min:i,max:g()?r:a,step:g()?l:c,onChange:t.onRangeChange,allowReset:!0,value:t.getRangeValue()}):wp.element.createElement("ul",null,[...f].map(((n,o)=>wp.element.createElement("li",{className:"qodef-input-control-item",key:o},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(_.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()?r:a,step:g()?l:c}))))))}}mt.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 dt=mt;class bt extends Ge.Component{constructor(){super(...arguments),this.state={screen:k()}}getScreenLabelSuffix(){return D(this.state.screen)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterGetAttributes:l}=this.props;let a=e;t&&(a=e+t);let s=n[a];return o&&(s=l({key:i,childKey:a},r)),z(s)}setAttributeValue(e,t,n=this.getScreenLabelSuffix()){const{setAttributes:o,setCustomEventOnChange:r,repeater:i,repeaterItemIndex:l,repeaterItemKey:a,repeaterSetAttributes:s}=this.props;let c=e;n&&(c=e+n),i?s({key:a,childKey:c},t,l):o({[c]:t}),r(t)}render(){const e={...this.props},{label:t,blockAttributeKey:n,selectOptions:o}=e;return e.onChangeScreen=e=>{this.setState({screen:e})},wp.element.createElement(_.BaseControl,{className:"qodef-advanced-select-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},wp.element.createElement(pt,{label:t,onChangeScreen:e.onChangeScreen})),wp.element.createElement(_.SelectControl,{value:this.getAttributeValue(n),options:o,onChange:e=>this.setAttributeValue(n,e)}))}}bt.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},selectOptions:{},setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const ft=bt,gt=wp.blob;var ht=n(4300),yt=n.n(ht);class vt extends Ge.Component{constructor(){super(...arguments),this.state={screen:k(),imageId:"",externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return D(this.state.screen)}getAttributeValue(e=this.getScreenLabelSuffix()){const{blockAttributeKey:t,blockAttributes:n,allowScreens:o,repeater:r,repeaterItemIndex:i,repeaterItemKey:l,isSimpleRepeaterValue:a,repeaterGetAttributes:s}=this.props;let c=t;o&&e&&(c=t+e);let u=n[c];if(r){let n=a?null:t;o&&e&&(n=a?this.state.screen:c),u=s({key:l,childKey:n},i)||{}}return z(u)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:n,allowScreens:o,repeater:r,repeaterItemIndex:i,repeaterItemKey:l,isSimpleRepeaterValue:a,repeaterSetAttributes:s}=this.props,c=this.getScreenLabelSuffix();let u=t;if(o&&c&&(u=t+c),r){let n=a?null:t;o&&c&&(n=a?this.state.screen:u),s({key:l,childKey:n},e,i)}else n({[u]:e})}componentDidMount(){const{allowScreens:e,allowDefaultImage:t}=this.props,{url:n,id:o,defaultValueIsSet:r}=this.getAttributeValue("");if(n&&!n.includes(qiBlocksEditor.vars.siteURL))this.onSelectURL(n),this.setState({externalImageIsSet:!0});else{o&&(this.setState({imageId:o}),this.updateImageSizeOption(o)),!t||r||n||o||(this.setAttributeValue({id:null,url:qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder,caption:"",width:1200,height:800,custom_image_size:"",html:""}),this.setState({defaultImageIsSet:!0}));const i=[""];e&&(i.push("Tablet"),i.push("Mobile")),i.map((e=>{const{url:t,id:n}=this.getAttributeValue(e);t&&(0,gt.isBlobURL)(t)&&!n&&this.setAttributeValue({url:"",alt:"",caption:"",width:"",height:"",html:""})}))}}setSVGIcon=(e,t,n,o)=>{const r=new XMLHttpRequest;null!=r&&(r.open("GET",t,!0),r.onreadystatechange=()=>{4===r.readyState&&200===r.status&&this.setAttributeValue({id:e,url:t,alt:n,caption:o,html:yt().sanitize(r.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},r.send())};onSelectImage=({id:e,url:t,alt:n,caption:o,width:r,height:i})=>{t.includes(".svg")?this.setSVGIcon(e,t,n,o):this.setAttributeValue({id:e,url:t,alt:n,caption:o,width:r,height:i}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){const t=setInterval((()=>{(0,l.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,l.select)("core").getMedia(this.state.imageId);if(n){let o=e;t&&t.length>1&&(o=this.getImageURLbySize(e)||n.source_url),"custom"===e&&(o=n.source_url),this.setAttributeValue({id:n.id,url:o,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 o=(0,l.select)("core").getMedia(t.id);if(!o)return"";const r=o.media_details.sizes;if(r&&0===Object.keys(r).length)this.setState({imageSizeNotExist:!0});else{this.setState({imageSizeNotExist:!1});for(const t in r)if(t.includes("qi_blocks_image_size_"+e.replace("-","_"))){n=r[t].source_url;break}}["","custom"].includes(e)&&this.setState({imageSizeNotExist:!1})}return n}getImageSizes(){const{imageSizes:t,customImageSizes:n}=this.props,o=this.getAttributeValue();let r=[];if(o){const i=(0,l.select)("core").getMedia(o.id);if(!i)return[];const a=i.media_details.sizes;if(a&&0===Object.keys(a).length&&r.push({label:(0,e.__)("Default","qi-blocks"),value:""}),n&&n.length>1)n.map((e=>{r.push({label:e.label,value:e.value})}));else for(const e in a){const n=a[e],o=t.find((t=>t.slug===e));o&&r.push({label:o.name,value:n.source_url})}}return r}render(){const t={...this.props},n={...this.state},{label:o,help:r,noticeUI:i,allowedTypes:l,allowScreens:a,allowImageSizes:s}=t,c=this.getAttributeValue(),{id:u,url:p,alt:m,html:d}=c;t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(u)};let b=["qodef-image-option"];return p&&p.includes(".svg")&&b.push("qodef--svg"),wp.element.createElement(_.BaseControl,{className:b.join(" ")},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},a?wp.element.createElement(pt,{label:o,onChangeScreen:t.onChangeScreen}):wp.element.createElement(wp.element.Fragment,null,o&&wp.element.createElement("label",{className:"qodef-option-label"},o))),r&&wp.element.createElement("p",{className:"qodef-option-description"},r),p?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},(0,gt.isBlobURL)(p)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(_.Spinner,null)),wp.element.createElement($e.MediaUploadCheck,null,wp.element.createElement($e.MediaUpload,{allowedTypes:l,value:u,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:p,alt:m}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(_.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(_.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($e.MediaPlaceholder,{allowedTypes:l,icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:i}),s&&u&&!d&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},wp.element.createElement(_.SelectControl,{label:(0,e.__)("Image Size","qi-blocks"),options:this.getImageSizes(),onChange:this.onImageSizeChange,value:void 0!==c.custom_image_size?c.custom_image_size:p})))}}vt.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 kt=(0,l.withSelect)((e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes})))((0,_.withNotices)(vt));class _t extends Ge.Component{constructor(){super(...arguments),this.state={isPickerVisible:!1}}getAttributeValue(){const{defaultColor:e,blockAttributeKey:t,blockAttributes:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,isSimpleRepeaterValue:l,repeaterGetAttributes:a}=this.props;let s=n[t];return o&&(s=a({key:i,childKey:l?"":t},r)),s||e}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,isSimpleRepeaterValue:l,repeaterSetAttributes:a}=this.props;o?a({key:i,childKey:l?"":t},e,r):n({[t]:e})}onChange=e=>{const{r:t,g:n,b:o,a:r}=e.rgb;let i="rgba("+[t,n,o,r].join(",")+")";this.props.setHEXValue&&(i=e.hex),this.setState({colorReset:!0}),this.setAttributeValue(i)};onClick=e=>{e.preventDefault();const t=this;t.setState({isPickerVisible:!this.state.isPickerVisible}),window.addEventListener("click",(e=>{const n=document.querySelectorAll(".qodef-color-option.qodef--opened");n.length&&n.forEach((n=>{n.contains(e.target)||t.setState({isPickerVisible:!1})}))}))};onResetColor=e=>{e.preventDefault(),this.setState({isPickerVisible:!this.state.isPickerVisible}),this.setAttributeValue("")};render(){const{label:t,popup:n}=this.props;return wp.element.createElement(_.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(_.Button,{onClick:this.onClick,className:"qodef-color-indicator-button"},wp.element.createElement(_.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(_.ColorPicker,{color:this.getAttributeValue(),onChangeComplete:this.onChange,disableAlpha:this.props.setHEXValue}),wp.element.createElement(_.Button,{onClick:this.onResetColor,isSecondary:!0},(0,e.__)("Reset Color","qi-blocks"))))}}_t.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 wt=_t;class qt extends Ge.Component{getAttributeValue(){const{blockAttributeKey:e,blockAttributes:t,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterGetAttributes:i}=this.props;let l=t[e];return n&&(l=i({key:r},o)||{}),z(l)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:l}=this.props;o?l({key:i},e,r):n({[t]:e})}componentDidMount(){const{url:e,id:t}=this.getAttributeValue();e&&(0,gt.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:o,noticeUI:r}=t,{id:i,url:l}=this.getAttributeValue();return wp.element.createElement(_.BaseControl,{className:"qodef-video-option"},n&&wp.element.createElement("label",{className:"qodef-option-label"},n),o&&wp.element.createElement("p",{className:"qodef-option-description"},o),l?wp.element.createElement("div",{className:"qodef-video-option-inner"},(0,gt.isBlobURL)(l)&&wp.element.createElement("div",{className:"qodef-video-option-spinner"},wp.element.createElement(_.Spinner,null)),wp.element.createElement($e.MediaUploadCheck,null,wp.element.createElement($e.MediaUpload,{allowedTypes:["video"],value:i,onSelect:this.onSelectVideo,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("video",{src:l}),wp.element.createElement("div",{className:"qodef-video-option-actions"},wp.element.createElement(_.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Video","qi-blocks"),onClick:t}),wp.element.createElement(_.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Video","qi-blocks"),onClick:this.removeVideo})))}))):wp.element.createElement($e.MediaPlaceholder,{allowedTypes:["video"],icon:"format-video",onSelect:this.onSelectVideo,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:r}))}}qt.defaultProps={label:(0,e.__)("Video","qi-blocks"),description:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const St=(0,_.withNotices)(qt),At=qiBlocksEditor.vars.defaultFontSize,It=qiBlocksEditor.vars.defaultLineHeight,xt=e=>{const{convertorType:t,value:n,attributeKey:o}=e;let r=1;o.includes("FontSize")||o.includes("fontSize")?r=At:(o.includes("LineHeight")||o.includes("lineHeight"))&&(r=It);const i=e=>Math.round(parseInt(e,10)/r*100)/100,l=e=>Math.round(parseInt(e,10)/r*100)/100,a=e=>Math.round(parseFloat(e)/r*100),s=e=>Math.round(100*parseInt(e,10)/window.innerWidth),c=e=>Math.round(100*parseInt(e,10)/window.innerHeight),u=e=>Math.round(parseFloat(e)*r),p=e=>Math.round(parseFloat(e)*r/100),m=e=>Math.round(window.innerWidth*parseInt(e,10)/100),d=e=>Math.round(window.innerHeight*parseInt(e,10)/100);let b="";if(""!==n&&""!==o&&""!==t)switch(t){case"pxToEm":b=i(n);break;case"pxToRem":b=l(n);break;case"pxToP":b=a(n);break;case"pxToVw":b=s(n);break;case"pxToVh":b=c(n);break;case"emToPx":b=u(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(u(e)))(n);break;case"emToVh":case"remToVh":b=(e=>c(u(e)))(n);break;case"remToPx":b=(e=>Math.round(parseFloat(e)*r))(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=>c(p(e)))(n);break;case"vwToPx":b=m(n);break;case"vwToEm":b=(e=>i(m(e)))(n);break;case"vwToRem":b=(e=>l(m(e)))(n);break;case"vwToP":b=(e=>a(m(e)))(n);break;case"vhToPx":b=d(n);break;case"vhToEm":b=(e=>i(d(e)))(n);break;case"vhToRem":b=(e=>l(d(e)))(n);break;case"vhToP":b=(e=>a(d(e)))(n)}return b};xt.defaultProps={convertorType:"pxToEm"};const Et=xt;class Ct extends Ge.Component{constructor(){super(...arguments),this.state={screen:k()}}getScreenLabelSuffix(e){const t=e||this.state.screen;return D(t)}getAttributeValue(e,t=""){const{blockAttributes:n,allowScreens:o,repeater:r,repeaterItemIndex:i,repeaterItemKey:l,repeaterGetAttributes:a}=this.props;let s=e;o&&t&&(s=e+t);let c=n[s];return r&&(c=a({key:l,childKey:s},i)),z(c)}setAttributeValue(e,t,n=this.getScreenLabelSuffix()){const{setAttributes:o,allowScreens:r,repeater:i,repeaterItemIndex:l,repeaterItemKey:a,repeaterSetAttributes:s}=this.props;let c=e;r&&n&&(c=e+n),i?s({key:a,childKey:c},t,l):o({[c]:t})}onChangeUnitsValues(e,t,n,o){const r={...this.props},{rangeMax:i,rangeDecimalMax:l,allowUnitsConvertor:a}=r;let s=this.getAttributeValue(t);const c=s;o?(s=parseInt(s,10),s>i&&(s=i)):!o&&s>l&&(s=l),a?["emToRem","remToEm","vwToVh","vhToVw"].includes(n)||(this.setAttributeValue(e,Et({convertorType:n,value:c,attributeKey:t}),""),this.setAttributeValue(t,"","")):(this.setAttributeValue(e,s,""),this.setAttributeValue(t,"",""))}render(){const e={...this.props},{label:t,unitType:n,blockAttributeKey:o,rangeMax:r,rangeMin:i,rangeStep:l,rangeDecimalMax:a,rangeDecimalMin:s,rangeDecimalStep:c,optionType:u,allowReset:p,allowScreens:m,allowUnits:d,repeater:b,repeaterItemKey:f,isSimpleRepeaterValue:g}=e,h=this.getScreenLabelSuffix();let y=b&&!g?f:o;const v=`${y}Decimal`,k=`${y}Unit`,w=`${y}Tablet`,q=`${v}Tablet`,S=`${k}Tablet`,A=`${y}Mobile`,I=`${v}Mobile`,x=`${k}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"),o=this.getAttributeValue(k,h)||"px";this.setAttributeValue(k,n),setTimeout((()=>{if(n!==o){const e=`${o}To${O(n)}`;let t=y+h,r=v+h;"px"!==n&&(t=v+h,r=y+h),this.onChangeUnitsValues(t,r,e,"px"===n)}}),t)},e.onChange=t=>{this.setAttributeValue(y,t),e.setCustomEventOnChange()},e.onChangeDecimal=t=>{let n=0;"decimal"===u&&void 0===t&&(n=200),setTimeout((()=>{this.setAttributeValue(v,t),e.setCustomEventOnChange()}),n)},e.getPlaceholderValue=e=>{let t="";const n=this.getAttributeValue(y),o=this.getAttributeValue(v),r=this.getAttributeValue(w),i=this.getAttributeValue(q);return"Tablet"===h?e&&""===r?t=n:e||""!==i||(t=o):"Mobile"===h&&(e&&""===this.getAttributeValue(A)?t=""!==r?r:n:e||""!==this.getAttributeValue(I)||(t=""!==i?i:o)),t},wp.element.createElement(_.BaseControl,{className:"qodef-advanced-range-option"},wp.element.createElement("div",{className:"qodef-advanced-range-heading"},m?wp.element.createElement(pt,{label:t,onChangeScreen:e.onChangeScreen}):wp.element.createElement("label",{className:"qodef-option-label"},t),d&&wp.element.createElement(ct,{unitType:n,unitValue:this.getAttributeValue(k,h),onChangeUnit:e.onChangeUnit})),"desktop"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(M(this.getAttributeValue(k))&&"decimal"!==u||!d&&"integer"===u)&&wp.element.createElement(_.RangeControl,{min:i,max:r,step:l,value:this.getAttributeValue(y),onChange:e.onChange,allowReset:p}),(L(this.getAttributeValue(k))||!d&&"decimal"===u)&&wp.element.createElement(_.RangeControl,{min:s,max:a,step:c,value:this.getAttributeValue(v),onChange:e.onChangeDecimal,allowReset:p})),"tablet"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(M(this.getAttributeValue(S))&&"decimal"!==u||!d&&"integer"===u)&&wp.element.createElement(_.RangeControl,{min:i,max:r,step:l,value:this.getAttributeValue(w),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:p}),(L(this.getAttributeValue(S))||!d&&"decimal"===u)&&wp.element.createElement(_.RangeControl,{min:s,max:a,step:c,value:this.getAttributeValue(q),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:p})),"mobile"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(M(this.getAttributeValue(x))&&"decimal"!==u||!d&&"integer"===u)&&wp.element.createElement(_.RangeControl,{min:i,max:r,step:l,value:this.getAttributeValue(A),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:p}),(L(this.getAttributeValue(x))||!d&&"decimal"===u)&&wp.element.createElement(_.RangeControl,{min:s,max:a,step:c,value:this.getAttributeValue(I),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:p})))}}Ct.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 Tt=Ct,Pt=t=>{const n={...t},{attrNameTemplate:o,attrName:r,blockAttributes:i,setAttributes:l,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p,previewScreen:m}=n,d=r||"Background",b=e=>N(o,d+e);n.getAttributeValue=(e,t="")=>{let n=e;t&&(n=e+t);let o=i[n];return a&&(o=p({key:c,childKey:n},s)),z(o)},n.setAttributeValue=(e,t,n="")=>{let o=e;n&&(o=e+n),a?u({key:c,childKey:o},t,s):l({[o]:t})};let f=D(m||k());return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(kt,{label:(0,e.__)(`${d} Image`,"qi-blocks"),blockAttributeKey:b("Image"),blockAttributes:i,setAttributes:l,allowScreens:!0,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,isSimpleRepeaterValue:!1,repeaterSetAttributes:u,repeaterGetAttributes:p}),n.getAttributeValue(b("Image"))&&n.getAttributeValue(b("Image")).url&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(ft,{label:(0,e.__)(`${d} Position`,"qi-blocks"),blockAttributeKey:b("Position"),blockAttributes:i,setAttributes:l,selectOptions:U("background_position",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,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(Tt,{label:(0,e.__)("X Position","qi-blocks"),blockAttributeKey:b("XPosition"),setAttributes:l,blockAttributes:i,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"xPosition",allowScreens:!0,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(Tt,{label:(0,e.__)("Y Position","qi-blocks"),blockAttributeKey:b("YPosition"),setAttributes:l,blockAttributes:i,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"yPosition",allowScreens:!0,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p})),wp.element.createElement(_.SelectControl,{label:(0,e.__)(`${d} Attachment`,"qi-blocks"),value:n.getAttributeValue(b("Attachment")),options:U("background_attachment")||"",onChange:e=>n.setAttributeValue(b("Attachment"),e)}),wp.element.createElement(ft,{label:(0,e.__)(`${d} Repeat`,"qi-blocks"),blockAttributeKey:b("Repeat"),blockAttributes:i,setAttributes:l,selectOptions:U("background_repeat"),repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(ft,{label:(0,e.__)(`${d} Size`,"qi-blocks"),blockAttributeKey:b("Size"),blockAttributes:i,setAttributes:l,selectOptions:U("background_size",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),"custom"===n.getAttributeValue(b("Size"),f)&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Tt,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:b("SizeWidth"),setAttributes:l,blockAttributes:i,rangeMax:1e3,rangeMin:0,rangeDecimalMax:100,rangeDecimalMin:0,unitType:"xPosition",allowScreens:!0,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}))))};Pt.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const Nt=Pt,Ot=t=>{const n={...t},{attrNameTemplate:o,blockAttributes:r,setAttributes:i,includeVideoBG:l,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p,previewScreen:m}=n,d=e=>N(o,e);n.getAttributeValue=(e,t="")=>{let n=r[e];if(a){let o=e;t&&(o=e+t),n=p({key:c,childKey:o},s)}return z(n)},n.setAttributeValue=(e,t,n="")=>{if(a){let o=e;n&&(o=e+n),u({key:c,childKey:o},t,s)}else i({[e+n]:t})};const b=[{label:(0,e.__)("Classic","qi-blocks"),value:""},{label:(0,e.__)("Gradient","qi-blocks"),value:"gradient"}];return l&&b.push({label:(0,e.__)("Video","qi-blocks"),value:"video"}),wp.element.createElement("div",{className:"qodef-background-panel"},wp.element.createElement(_.SelectControl,{label:(0,e.__)("Background Type","qi-blocks"),value:n.getAttributeValue(d("BackgroundType")),options:b,onChange:e=>n.setAttributeValue(d("BackgroundType"),e)}),""===n.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(wt,{label:(0,e.__)("Background Color","qi-blocks"),blockAttributeKey:d("BackgroundColor"),blockAttributes:r,setAttributes:i,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(Nt,{attrNameTemplate:o,blockAttributes:r,setAttributes:i,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p,previewScreen:m})),"gradient"===n.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(wt,{label:(0,e.__)("First Color","qi-blocks"),blockAttributeKey:d("BackgroundGradientColor1"),blockAttributes:r,setAttributes:i,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(_.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:n.getAttributeValue(d("BackgroundGradientLocation1")),onChange:e=>n.setAttributeValue(d("BackgroundGradientLocation1"),e),min:0,max:100,step:1}),wp.element.createElement(wt,{label:(0,e.__)("Second Color","qi-blocks"),blockAttributeKey:d("BackgroundGradientColor2"),blockAttributes:r,setAttributes:i,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(_.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:n.getAttributeValue(d("BackgroundGradientLocation2")),onChange:e=>n.setAttributeValue(d("BackgroundGradientLocation2"),e),min:0,max:100,step:1}),wp.element.createElement(_.SelectControl,{label:(0,e.__)("Gradient Type","qi-blocks"),value:n.getAttributeValue(d("BackgroundGradientType")),options:[{label:(0,e.__)("Linear","qi-blocks"),value:"linear"},{label:(0,e.__)("Radial","qi-blocks"),value:"radial"}],onChange:e=>n.setAttributeValue(d("BackgroundGradientType"),e)}),"linear"===n.getAttributeValue(d("BackgroundGradientType"))&&wp.element.createElement(_.RangeControl,{label:(0,e.__)("Angle","qi-blocks"),value:n.getAttributeValue(d("BackgroundGradientTypeAngle")),onChange:e=>n.setAttributeValue(d("BackgroundGradientTypeAngle"),e),min:0,max:360,step:1}),"radial"===n.getAttributeValue(d("BackgroundGradientType"))&&wp.element.createElement(_.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:n.getAttributeValue(d("BackgroundGradientTypePosition")),options:U("background_position",!1),onChange:e=>n.setAttributeValue(d("BackgroundGradientTypePosition"),e)})),"video"===n.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(St,{label:(0,e.__)("Video Link","qi-blocks"),description:(0,e.__)("Self hosted video file (mp4 is recommended)","qi-blocks"),blockAttributeKey:d("BackgroundVideoLink"),blockAttributes:r,setAttributes:i,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(_.TextControl,{type:"number",label:(0,e.__)("Start Time","qi-blocks"),help:(0,e.__)("Specify a start time (in seconds)","qi-blocks"),value:n.getAttributeValue(d("BackgroundVideoStartTime")),onChange:e=>n.setAttributeValue(d("BackgroundVideoStartTime"),j(e))}),wp.element.createElement(_.TextControl,{type:"number",label:(0,e.__)("End Time","qi-blocks"),help:(0,e.__)("Specify an end time (in seconds)","qi-blocks"),value:n.getAttributeValue(d("BackgroundVideoEndTime")),onChange:e=>n.setAttributeValue(d("BackgroundVideoEndTime"),j(e))}),wp.element.createElement(q,{label:(0,e.__)("Play Once","qi-blocks"),blockAttributeKey:d("BackgroundVideoPlayOnce"),blockAttributes:r,setAttributes:i,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(q,{label:(0,e.__)("Play On Mobile","qi-blocks"),blockAttributeKey:d("BackgroundVideoPlayOnMobile"),blockAttributes:r,setAttributes:i,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(kt,{label:(0,e.__)("Background Fallback","qi-blocks"),blockAttributeKey:d("BackgroundVideoFallbackImage"),blockAttributes:r,setAttributes:i,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p})))};Ot.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},includeVideoBG:!1,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const Dt=Ot,Bt=t=>{const n={...t},{attrNameTemplate:o,blockAttributes:r,setAttributes:i,disableWidthDirections:l,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}=n,m=e=>N(o,e);return n.getAttributeValue=(e,t="")=>{let n=r[e];if(a){let o=e;t&&(o=e+t),n=p({key:c,childKey:o},s)}return z(n)},n.setAttributeValue=(e,t,n="")=>{if(a){let o=e;n&&(o=e+n),u({key:c,childKey:o},t,s)}else i({[e+n]:t})},wp.element.createElement("div",{className:"qodef-border-panel"},wp.element.createElement(_.SelectControl,{label:(0,e.__)("Border Type","qi-blocks"),value:n.getAttributeValue(m("BorderStyle")),options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("None","qi-blocks"),value:"none"},{label:(0,e.__)("Double","qi-blocks"),value:"double"},{label:(0,e.__)("Groove","qi-blocks"),value:"groove"},...U("border_style",!1)],onChange:e=>n.setAttributeValue(m("BorderStyle"),e)}),!["","none"].includes(r[m("BorderStyle")])&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(dt,{label:(0,e.__)("Border Width","qi-blocks"),attrName:m("BorderWidth"),blockAttributes:r,setAttributes:i,allowUnitControl:!1,disableDirections:l,rangeMax:20,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),(n.allowBorderColor??!0)&&wp.element.createElement(wt,{label:(0,e.__)("Border Color","qi-blocks"),blockAttributeKey:m("BorderColor"),blockAttributes:r,setAttributes:i,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p})),(n.allowBorderRadius??!0)&&wp.element.createElement(dt,{label:(0,e.__)("Border Radius","qi-blocks"),attrName:m("BorderRadius"),blockAttributes:r,setAttributes:i,unitType:"pxAndPercent",repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}))};Bt.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowBorderColor:!0,allowBorderRadius:!0,disableWidthDirections:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Rt=Bt,Mt=t=>{const n={...t},{attrNameTemplate:o,blockAttributes:r,setAttributes:i,excludeOptions:l}=n,a=e=>N(o,e),[s,c]=(0,Ge.useState)(!1);let u=["qodef-box-shadow-panel"];return n.popup&&u.push("qodef--has-popup"),s&&u.push("qodef--opened"),n.onClick=()=>{c((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)||c(!1)}))}))},wp.element.createElement("div",{className:u.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(_.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(wt,{label:(0,e.__)("Color","qi-blocks"),blockAttributeKey:a("BoxShadowColor"),blockAttributes:r,setAttributes:i,popup:!1}),wp.element.createElement(_.RangeControl,{label:(0,e.__)("Horizontal","qi-blocks"),value:r[a("BoxShadowHorizontal")],onChange:e=>i({[a("BoxShadowHorizontal")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(_.RangeControl,{label:(0,e.__)("Vertical","qi-blocks"),value:r[a("BoxShadowVertical")],onChange:e=>i({[a("BoxShadowVertical")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(_.RangeControl,{label:(0,e.__)("Blur","qi-blocks"),value:r[a("BoxShadowBlur")],onChange:e=>i({[a("BoxShadowBlur")]:e}),min:0,max:100,step:1,allowReset:!0}),wp.element.createElement(_.RangeControl,{label:(0,e.__)("Spread","qi-blocks"),value:r[a("BoxShadowSpread")],onChange:e=>i({[a("BoxShadowSpread")]:e}),min:-100,max:100,step:1,allowReset:!0}),(p="position",!(l&&l.length&&l.includes(p))&&wp.element.createElement(_.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:r[a("BoxShadowPosition")],options:[{label:(0,e.__)("Outline","qi-blocks"),value:""},{label:(0,e.__)("Inset","qi-blocks"),value:"inset"}],onChange:e=>i({[a("BoxShadowPosition")]:e})}))));var p};Mt.defaultProps={label:(0,e.__)("Box Shadow","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeOptions:[],popup:!1};const Lt=Mt;class jt extends Ge.Component{render(){const{blockAttributes:t,setAttributes:n,excludePanels:o,previewScreen:r,blockName:i}=this.props,l=(e,t="")=>N("",e,t),a=["advanced","motion-effects","background","border","positioning","responsive"];o&&o.length&&o.forEach((e=>{a.splice(a.indexOf(e),1)}));let s=D(r);return wp.element.createElement("div",{className:"qodef-advanced-panel"},a.includes("advanced")&&wp.element.createElement(_.PanelBody,{title:(0,e.__)("Advanced","qi-blocks")},wp.element.createElement(dt,{label:(0,e.__)("Margin","qi-blocks"),attrName:l("Margin"),blockAttributes:t,setAttributes:n}),wp.element.createElement(dt,{label:(0,e.__)("Padding","qi-blocks"),attrName:l("Padding"),blockAttributes:t,setAttributes:n}),wp.element.createElement(_.TextControl,{type:"number",label:(0,e.__)("Z-Index","qi-blocks"),value:t[l("zIndex")],onChange:e=>n({[l("zIndex")]:j(e)})}),wp.element.createElement(_.TextControl,{label:(0,e.__)("CSS ID","qi-blocks"),value:t[l("cssId")],onChange:e=>n({[l("cssId")]:e})}),wp.element.createElement(_.TextControl,{label:(0,e.__)("CSS Classes","qi-blocks"),value:t[l("cssClasses")],onChange:e=>n({[l("cssClasses")]:e})})),a.includes("motion-effects")&&wp.element.createElement(_.PanelBody,{title:(0,e.__)("Motion Effects","qi-blocks"),initialOpen:!1},wp.element.createElement(_.SelectControl,{label:(0,e.__)("Entrance Animation","qi-blocks"),value:t[l("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({[l("EntranceAnimation")]:e}),setTimeout((()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)}),300)}}),void 0!==t[l("EntranceAnimation")]&&""!==t[l("EntranceAnimation")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(_.SelectControl,{label:(0,e.__)("Animation Duration","qi-blocks"),value:t[l("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({[l("EntranceAnimationDuration")]:e}),setTimeout((()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)}),300)}}),wp.element.createElement(_.TextControl,{type:"number",label:(0,e.__)("Animation Delay (ms)","qi-blocks"),value:t[l("EntranceAnimationDelay")],min:0,step:100,onChange:e=>{n({[l("EntranceAnimationDelay")]:j(e)}),qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass,!0)}}))),a.includes("background")&&wp.element.createElement(_.PanelBody,{title:(0,e.__)("Background","qi-blocks"),initialOpen:!1},wp.element.createElement(Dt,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:n,previewScreen:r})),a.includes("border")&&wp.element.createElement(_.PanelBody,{title:(0,e.__)("Border","qi-blocks"),initialOpen:!1},wp.element.createElement(Rt,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:n}),wp.element.createElement(Lt,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:n,popup:!0})),a.includes("positioning")&&wp.element.createElement(_.PanelBody,{title:(0,e.__)("Positioning","qi-blocks"),initialOpen:!1},wp.element.createElement(ft,{label:(0,e.__)("Width","qi-blocks"),blockAttributeKey:l("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[l("BlockWidth")]||""!==s&&"custom"===t[l("BlockWidth",s)]||""!==s&&"custom"===t[l("BlockWidth")]&&["","custom"].includes(t[l("BlockWidth","Tablet")])&&""===t[l("BlockWidth",s)])&&wp.element.createElement(Tt,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:l("BlockCustomWidth"),setAttributes:n,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(_.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:t[l("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({[l("BlockPosition")]:e})}}),""!==t[l("BlockPosition")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(_.SelectControl,{label:(0,e.__)("Horizontal Orientation","qi-blocks"),value:t[l("PositionHorizontalOrientation")],options:[{label:(0,e.__)("Left","qi-blocks"),value:"left"},{label:(0,e.__)("Right","qi-blocks"),value:"right"}],onChange:e=>n({[l("PositionHorizontalOrientation")]:e})}),wp.element.createElement(Tt,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:l("PositionHorizontalOffset"),setAttributes:n,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}),wp.element.createElement(_.SelectControl,{label:(0,e.__)("Vertical Orientation","qi-blocks"),value:t[l("PositionVerticalOrientation")],options:[{label:(0,e.__)("Top","qi-blocks"),value:"Top"},{label:(0,e.__)("Bottom","qi-blocks"),value:"bottom"}],onChange:e=>n({[l("PositionVerticalOrientation")]:e})}),wp.element.createElement(Tt,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:l("PositionVerticalOffset"),setAttributes:n,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}))),a.includes("responsive")&&wp.element.createElement(_.PanelBody,{title:(0,e.__)("Responsive","qi-blocks"),initialOpen:!1},wp.element.createElement(A,{blockAttributes:t,setAttributes:n})),qiBlocksEditor.vars?.advancedBlockPanel&&wp.element.createElement(wp.element.Fragment,null,Object.entries(qiBlocksEditor.vars.advancedBlockPanel).map((([t,n],o)=>{let r="";if("help"===t?r=(0,e.__)("Help","qi-blocks"):"features"===t&&(r=(0,e.__)("Get more features","qi-blocks")),n.length<=0||"blocks"===t)return"";const l="help"===t,a=i?i.replace("qi-blocks/",""):"",s=n.map(((n,o)=>{let r=n?.link;if(0===o&&"help"===t&&a){const e=qiBlocksEditor.vars.advancedBlockPanel?.blocks[a]||"";e&&e?.demo&&(r=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:r,target:"_blank",rel:"noreferrer"},n?.title))}));return wp.element.createElement(_.PanelBody,{title:r,className:`qodef-advanced-block-panel-features ${"qodef--"+t} qodef-m`,key:o,initialOpen:l},s)}))))}}jt.defaultProps={blockAttributes:{},setAttributes:()=>{},excludePanels:[],previewScreen:"desktop",blockName:""};const Vt=(0,l.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}}))(jt);class zt extends Ge.Component{getAttributeValue(e){const{blockAttributes:t,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterGetAttributes:i}=this.props;let l=t[e];return n&&(l=i({key:r,childKey:e},o)),z(l)}setAttributeValue(e,t){const{setAttributes:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:l}=this.props;o?l({key:i,childKey:e},t,r):n({[e]:t})}render(){const{label:t,attrNameTemplate:n,blockAttributes:o,setAttributes:r,allowSize:i,allowColor:l,rangeMax:a,rangeDecimalMax:s,repeater:c,repeaterItemIndex:u,repeaterItemKey:p,repeaterSetAttributes:m,repeaterGetAttributes:d}=this.props,b=c?"":N(n,"Icon"),f=this.getAttributeValue(b);return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(kt,{label:t,help:(0,e.__)("This option allows only SVG icons","qi-blocks"),blockAttributeKey:`${b}`,blockAttributes:o,setAttributes:r,allowedTypes:["image/svg+xml"],repeater:c,repeaterItemIndex:u,repeaterItemKey:p,repeaterSetAttributes:m,repeaterGetAttributes:d}),f&&f.html&&wp.element.createElement(wp.element.Fragment,null,i&&wp.element.createElement(Tt,{label:(0,e.__)("Icon Size","qi-blocks"),blockAttributeKey:`${b}FontSize`,blockAttributes:o,setAttributes:r,allowScreens:!0,rangeMax:a,rangeDecimalMax:s,repeater:c,repeaterItemIndex:u,repeaterItemKey:p,repeaterSetAttributes:m,repeaterGetAttributes:d}),l&&wp.element.createElement(wt,{label:(0,e.__)("Icon Color","qi-blocks"),blockAttributeKey:`${b}Color`,blockAttributes:o,setAttributes:r,repeater:c,repeaterItemIndex:u,repeaterItemKey:p,repeaterSetAttributes:m,repeaterGetAttributes:d})))}}zt.defaultProps={label:"",attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowSize:!0,allowColor:!0,rangeMax:200,rangeDecimalMax:10,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Ut=zt;class Ft extends Ge.Component{constructor(){super(...arguments),this.state={isSettingsPanelVisible:!1}}getAttributeValue(e){const{blockAttributes:t,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterGetAttributes:i}=this.props;let l=t[e];return n&&(l=i({key:r,childKey:e},o)),z(l)}setAttributeValue(e,t){const{setAttributes:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:l}=this.props;o?l({key:i,childKey:e},t,r):n({[e]:t})}onClick=e=>{e.preventDefault();const t=this;t.setState({isSettingsPanelVisible:!this.state.isSettingsPanelVisible}),window.addEventListener("click",(e=>{const n=document.querySelectorAll(".qodef-url-input-control.qodef--opened");n.length&&n.forEach((n=>{n.contains(e.target)||t.setState({isSettingsPanelVisible:!1})}))}))};render(){const t={...this.props},n={...this.state},{label:o,attrNameTemplate:r,disableSuggestions:i}=t,l=N(r,"Link"),a=N(r,"LinkTargetBlank"),s=N(r,"LinkRelNofollow"),c=N(r,"LinkCustomAttributes");return wp.element.createElement(_.BaseControl,{className:"qodef-url-input-control "+(n.isSettingsPanelVisible?"qodef--opened":"")},wp.element.createElement("div",{className:"qodef-control-heading"},wp.element.createElement("label",{className:"qodef-option-label"},o),wp.element.createElement(_.Button,{onClick:this.onClick,className:"qodef-url-input-settings-button",icon:"admin-settings"})),wp.element.createElement($e.URLInput,{value:this.getAttributeValue(l),onChange:e=>this.setAttributeValue(l,e),className:"qodef-url-input",disableSuggestions:i}),n.isSettingsPanelVisible&&wp.element.createElement(_.Card,{size:"small"},wp.element.createElement(_.CardBody,null,wp.element.createElement(_.ToggleControl,{label:(0,e.__)("Open in new window","qi-blocks"),checked:this.getAttributeValue(a),onChange:e=>this.setAttributeValue(a,e)}),wp.element.createElement(_.ToggleControl,{label:(0,e.__)("Add nofollow","qi-blocks"),checked:this.getAttributeValue(s),onChange:e=>this.setAttributeValue(s,e)}),wp.element.createElement(_.TextControl,{label:(0,e.__)("Custom Attributes","qi-blocks"),help:(0,e.__)("Set custom attributes for the link element. Separate attribute keys from values using the | (pipe) character. Separate key-value pairs with a comma.","qi-blocks"),value:this.getAttributeValue(c),placeholder:(0,e.__)("key|value","qi-blocks"),onChange:e=>this.setAttributeValue(c,e)}))))}}Ft.defaultProps={label:"",attrNameTemplate:"",disableSuggestions:!1,blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Kt=Ft;var $t=n(4232),Ht=n.n($t);const Gt={init:function(){this.holder=Ht()(".qodef-repeater-option .qodef-repeater-items"),this.holder.length&&this.holder.each((function(){Gt.initItem(Ht()(this))}))},initItem:function(e){e&&e.find(".qodef-repeater-item-heading").off().on("click touchstart",(function(e){const t=Ht()(this),n=t.parents(".qodef-repeater-item");e.target.classList.contains("qodef-repeater-button")||e.target.classList.contains("dashicon")||(n.hasClass("qodef--active")?(n.removeClass("qodef--active"),t.siblings(".qodef-repeater-item-options").slideUp()):(t.siblings(".qodef-repeater-item-options").slideDown(),n.addClass("qodef--active"),n.siblings().removeClass("qodef--active"),n.siblings().find(".qodef-repeater-item-options").slideUp()))}))}},Wt=Gt;function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yt.apply(this,arguments)}class Xt extends Ge.Component{constructor(){super(...arguments),this.state={addedItemIndex:""},this.handleAddItem.bind(this),this.handleOnChange.bind(this),this.handleOnRemove.bind(this),this.handleDuplicateItem.bind(this)}componentDidMount(){this.initControlScript()}initControlScript(){setTimeout((()=>{"object"==typeof Wt&&Wt.init()}),600)}getItems=()=>{const{blockAttributeKey:e,blockAttributes:t}=this.props,n=t[e];return V(this.props,"all")&&n.length?JSON.parse(JSON.stringify(n)):[]};handleAddItem=()=>{const{options:e,blockAttributeKey:t,setAttributes:n}=this.props,o=this.getItems();let r={};e.map((e=>{r[e.optionKey]=e.optionDefaultValue||""})),o.push(r),this.setState({addedItemIndex:o.length-1}),n({[t]:o}),this.initControlScript()};handleOnChange=(e,t,n)=>{const{blockAttributeKey:o,setAttributes:r}=this.props,i=this.getItems();"object"==typeof e?e.key&&e.childKey?i[n][e.key][e.childKey]=t:i[n][e.key]=t:i[n][e]=t,r({[o]:i})};getRepeaterItemValues=(e,t)=>{const n=this.getItems();let o;return o="object"==typeof e?e.key&&e.childKey?n[t][e.key][e.childKey]:n[t][e.key]:n[t][e],z(o)};handleOnRemove=e=>{const{blockAttributeKey:t,setAttributes:n}=this.props,o=this.getItems();o.splice(e,1),n({[t]:o}),this.initControlScript()};handleDuplicateItem=e=>{const{options:t,blockAttributeKey:n,setAttributes:o}=this.props,r=this.getItems();let i={};t.map((t=>{i[t.optionKey]=r[e][t.optionKey]})),r.splice(e+1,0,i),o({[n]:r}),this.initControlScript()};handleOnDrag=(e,t)=>{const{blockAttributeKey:n,setAttributes:o}=this.props,r=this.getItems();var i,l,a;o({[n]:(i=r,l=e,a="up"===t?e-1:e+1,function(e,t,n){const o=t<0?e.length+t:t;if(o>=0&&o<e.length){const o=n<0?e.length+n:n,[r]=e.splice(t,1);e.splice(o,0,r)}}(i=[...i],l,a),i)}),this.initControlScript()};showItems=()=>{const{options:t,blockAttributes:n,blockAttributeKey:o,setAttributes:r}=this.props,i=this.getItems();return i.length>0&&wp.element.createElement("div",{className:"qodef-repeater-items"},i.map(((l,a)=>wp.element.createElement("div",{className:"qodef-repeater-item "+(this.state.addedItemIndex===a?"qodef--active":""),key:a},wp.element.createElement("div",{className:"qodef-repeater-item-heading"},wp.element.createElement("span",{className:"qodef-repeater-item-heading-label"},(0,e.__)(`Item ${a+1}`,"qi-blocks")),wp.element.createElement("div",{className:"qodef-repeater-item-action"},i.length>1&&wp.element.createElement(wp.element.Fragment,null,0!==a&&wp.element.createElement(_.Button,{className:"qodef-repeater-button qodef--move-up",icon:"arrow-up-alt2",text:"",showTooltip:!0,label:(0,e.__)("Move Up","qi-blocks"),onClick:()=>this.handleOnDrag(a,"up")}),i.length!==a+1&&wp.element.createElement(_.Button,{className:"qodef-repeater-button qodef--move-down",icon:"arrow-down-alt2",text:"",showTooltip:!0,label:(0,e.__)("Move Down","qi-blocks"),onClick:()=>this.handleOnDrag(a,"down")})),wp.element.createElement(_.Button,{className:"qodef-repeater-button qodef--duplicate",icon:"admin-page",text:"",showTooltip:!0,label:(0,e.__)("Duplicate Item","qi-blocks"),onClick:()=>this.handleDuplicateItem(a)}),wp.element.createElement(_.Button,{className:"qodef-repeater-button qodef--remove",icon:"no-alt",text:"",showTooltip:!0,label:(0,e.__)("Remove Item","qi-blocks"),onClick:()=>this.handleOnRemove(a)}))),wp.element.createElement("div",{className:"qodef-repeater-item-options"},t.map(((e,t)=>{const l=e.optionType;let s=e.optionAttributes||{};const c=e.advancedOptions||!1,u=e.dependency||{},p=Object.prototype.hasOwnProperty.call(u,"value")&&Object.prototype.hasOwnProperty.call(u,"key"),m="string"==typeof u.value?[u.value]:u.value,d=Object.prototype.hasOwnProperty.call(u,"isGlobal")?n[u.key]:i[a][u.key];return s=c?{...s,blockAttributeKey:o,blockAttributes:n,setAttributes:r,repeater:!0,repeaterItemIndex:a,repeaterItemKey:e.optionKey,repeaterSetAttributes:this.handleOnChange,repeaterGetAttributes:this.getRepeaterItemValues}:{...s,onChange:t=>this.handleOnChange(e.optionKey,t,a)},wp.element.createElement("div",{key:t,className:"qodef-repeater-item-option"},(p&&m.includes(d)||!p)&&wp.element.createElement(l,Yt({label:e.label||"",placeholder:e.placeholder||"",value:i[a][e.optionKey]},s)))})))))))};render(){const{label:t}=this.props;return wp.element.createElement("div",{className:"qodef-repeater-option"},t&&wp.element.createElement("label",{className:"qodef-option-label"},t),this.showItems(),wp.element.createElement(_.Button,{className:"qodef-repeater-button qodef--add",isSecondary:!0,text:(0,e.__)("Add Item","qi-blocks"),onClick:this.handleAddItem}))}}Xt.defaultProps={label:(0,e.__)("Items","qi-blocks"),options:[{label:(0,e.__)("Title","qi-blocks"),optionType:_.TextControl,optionKey:"itemTitle",optionDefaultValue:"",optionAttributes:{},advancedOptions:!1,dependency:{}}],blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},isRichText:!1};const Zt=Xt,Jt=(e,t="")=>{let n={},o={};if(!e)return n;const r=e=>N(t,e);return V(e[r("Link")])&&(n.href=e[r("Link")]),V(e[r("LinkTargetBlank")],"all")&&(n.target="_blank",n.rel="noopener noreferrer"),V(e[r("LinkRelNofollow")],"all")&&(n.rel=void 0!==n.rel?n.rel+" nofollow":"nofollow"),V(e[r("LinkCustomAttributes")])&&(o=((e="")=>{let t=[];if(""!==e){let n=e.split(",");n.length&&n.forEach((e=>{let n=e.trim().split("|");2===n.length&&(t[n[0]]=n[1])}))}return t})(e[r("LinkCustomAttributes")])),se()(n,o)};class Qt extends Ge.Component{render(){const{attrNameTemplate:t,blockAttributes:n,setAttributes:o,allowColumnsGap:r,allowColumnsGapSlider:i,allowColumnsResponsive:l,columnsMinNumber:a,columnsMaxNumber:s}=this.props,c=e=>N(t,e);return wp.element.createElement(_.BaseControl,null,wp.element.createElement(Tt,{label:(0,e.__)("Number of Columns","qi-blocks"),blockAttributeKey:c("Columns"),setAttributes:o,blockAttributes:n,rangeMax:s,rangeMin:a,allowUnits:!1}),r&&wp.element.createElement(_.SelectControl,{label:(0,e.__)("Columns Gap","qi-blocks"),options:U("column_gap",!1),value:n[c("ColumnsGap")]||"",onChange:e=>o({[c("ColumnsGap")]:e})}),i&&wp.element.createElement(Tt,{label:(0,e.__)("Space Between Items","qi-blocks"),blockAttributeKey:c("SpaceBetweenItems"),setAttributes:o,blockAttributes:n,rangeMax:150,rangeMin:0,rangeStep:1,allowScreens:!0,unitType:"pxEmVw"}),l&&wp.element.createElement(_.SelectControl,{label:(0,e.__)("Columns Responsive","qi-blocks"),options:U("columns_responsive",!1),value:n[c("ColumnsResponsive")]||"",onChange:e=>o({[c("ColumnsResponsive")]:e})}),l&&"custom"===n[c("ColumnsResponsive")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Tt,{label:(0,e.__)("Number of Columns 1367px - 1440px","qi-blocks"),blockAttributeKey:c("Columns1440"),setAttributes:o,blockAttributes:n,rangeMax:s,rangeMin:a,allowUnits:!1}),wp.element.createElement(Tt,{label:(0,e.__)("Number of Columns 1025px - 1366px","qi-blocks"),blockAttributeKey:c("Columns1366"),setAttributes:o,blockAttributes:n,rangeMax:s,rangeMin:a,allowUnits:!1}),wp.element.createElement(Tt,{label:(0,e.__)("Number of Columns 769px - 1024px","qi-blocks"),blockAttributeKey:c("Columns1024"),setAttributes:o,blockAttributes:n,rangeMax:s,rangeMin:a,allowUnits:!1}),wp.element.createElement(Tt,{label:(0,e.__)("Number of Columns 681px - 768px","qi-blocks"),blockAttributeKey:c("Columns768"),setAttributes:o,blockAttributes:n,rangeMax:s,rangeMin:a,allowUnits:!1}),wp.element.createElement(Tt,{label:(0,e.__)("Number of Columns 481px - 680px","qi-blocks"),blockAttributeKey:c("Columns680"),setAttributes:o,blockAttributes:n,rangeMax:s,rangeMin:a,allowUnits:!1}),wp.element.createElement(Tt,{label:(0,e.__)("Number of Columns 0 - 480px","qi-blocks"),blockAttributeKey:c("Columns480"),setAttributes:o,blockAttributes:n,rangeMax:s,rangeMin:a,allowUnits:!1})))}}Qt.defaultProps={attrNameTemplate:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},allowColumnsGap:!0,allowColumnsGapSlider:!1,allowColumnsResponsive:!0,columnsMinNumber:1,columnsMaxNumber:6};const en=Qt;var tn=n(8872),nn=n.n(tn);let on=[];const rn=qiBlocksEditor.vars.systemFontOptions,ln=e=>{let t=!0;return e||(t=!1),rn&&rn.map((({value:e})=>e)).forEach((n=>{""!==n&&e===n&&(t=!1)})),t},an=e=>{if(qiBlocksEditor.qodefGetCurrentBlockElement.getIframe()&&(on=[]),on.includes(e))return;const t=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument();if(t&&ln(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)}on.push(e)},sn=qiBlocksEditor.vars.fontOptions,cn=e=>{const t=e.trim().toLowerCase(),n=t.length;return 0===n?[]:sn.filter((e=>!["System","Google"].includes(e.value)&&e.label.toLowerCase().slice(0,n)===t))},un=e=>e.value,pn=e=>wp.element.createElement("div",{className:"qodef-font-family-autosuggest-option","data-label":e.value},e.label);class mn extends Ge.Component{constructor(){super(...arguments),this.state={value:"",suggestions:[]}}onChange=(e,{newValue:t})=>{let n=t;["System","Google"].includes(n)||(sn.some((e=>e.value.toLowerCase()===n.toLowerCase()&&(n=e.value,an(n),!0))),this.props.setAttributes({[this.props.blockAttributeKey]:n}),this.setState({value:n}))};onSuggestionsFetchRequested=({value:e})=>{this.setState({suggestions:""===e?sn:cn(e)})};onSuggestionsClearRequested=()=>{this.setState({suggestions:[]})};shouldRenderSuggestions(){return!0}componentDidMount(){""!==this.props.blockAttributes.length&&this.setState({value:this.props.blockAttributes[this.props.blockAttributeKey]||"",suggestions:sn})}render(){const{label:e}=this.props,{value:t,suggestions:n}=this.state,o={value:t,type:"search",onChange:this.onChange};return wp.element.createElement(_.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(nn(),{suggestions:n,onSuggestionsFetchRequested:this.onSuggestionsFetchRequested,onSuggestionsClearRequested:this.onSuggestionsClearRequested,shouldRenderSuggestions:this.shouldRenderSuggestions,getSuggestionValue:un,renderSuggestion:pn,inputProps:o})))}}mn.defaultProps={label:(0,e.__)("Font Family","qi-blocks"),blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{}};const dn=mn,bn=t=>{const n={...t},{attrNameTemplate:o,blockAttributes:r,setAttributes:i,popup:l,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p,allowReset:m}=n,[d,b]=(0,Ge.useState)(!1);let f=["qodef-typography-panel"];l?f.push("qodef--has-popup"):f.push("qodef-base-section-label"),d&&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=>N(o,e);return n.getAttributeValue=e=>{let t=r[e];return a&&(t=p({key:c,childKey:e},s)),z(t)},n.setAttributeValue=(e,t)=>{a?u({key:c,childKey:e},t,s):i({[e]:t})},wp.element.createElement(_.BaseControl,{label:l?"":n.label,className:f.join(" ")},l&&wp.element.createElement("div",{className:"qodef-typography-panel-heading"},wp.element.createElement("label",{className:"qodef-option-label"},n.label),wp.element.createElement(_.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(dn,{setAttributes:i,blockAttributes:r,blockAttributeKey:g("FontFamily"),repeater:a,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:p}),wp.element.createElement(Tt,{label:(0,e.__)("Font Size","qi-blocks"),blockAttributeKey:g("FontSize"),setAttributes:i,blockAttributes:r,rangeDecimalMax:20,allowScreens:!0,allowUnitsConvertor:!0,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,isSimpleRepeaterValue:!0,repeaterSetAttributes:u,repeaterGetAttributes:p,allowReset:m}),wp.element.createElement(_.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(_.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(_.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(_.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(Tt,{label:(0,e.__)("Line Height","qi-blocks"),setAttributes:i,blockAttributes:r,blockAttributeKey:g("LineHeight"),allowScreens:!0,allowUnitsConvertor:!0,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,isSimpleRepeaterValue:!0,repeaterSetAttributes:u,repeaterGetAttributes:p,allowReset:m}),wp.element.createElement(Tt,{label:(0,e.__)("Letter Spacing","qi-blocks"),setAttributes:i,blockAttributes:r,blockAttributeKey:g("LetterSpacing"),rangeMin:-10,rangeMax:30,rangeStep:.1,rangeDecimalMin:-10,unitType:"pxEmRem",allowScreens:!0,repeater:a,repeaterItemIndex:s,repeaterItemKey:c,isSimpleRepeaterValue:!0,repeaterSetAttributes:u,repeaterGetAttributes:p,allowReset:m})))};bn.defaultProps={label:(0,e.__)("Typography","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},popup:!1,allowReset:!0,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const fn=bn,gn=e=>{const{attrNameTemplate:t,attributes:n}=e,o=(e,n)=>N(t,e,n);if(!n)return{};let r={},i={},l={};return n[o("FontFamily")]&&(r.fontFamily=`'${n[o("FontFamily")]}'`),n[o("FontWeight")]&&(r.fontWeight=n[o("FontWeight")]),n[o("TextTransform")]&&(r.textTransform=n[o("TextTransform")]),n[o("FontStyle")]&&(r.fontStyle=n[o("FontStyle")]),n[o("TextDecoration")]&&(r.textDecoration=n[o("TextDecoration")]),Object.entries(y).map((([e])=>{let t=D(e),a={};(n[o("FontSize",t)]||n[o("FontSizeDecimal",t)])&&(M(n[o("FontSizeUnit",t)])&&n[o("FontSize",t)]?a.fontSize=parseInt(n[o("FontSize",t)],10)+n[o("FontSizeUnit",t)]:L(n[o("FontSizeUnit",t)])&&n[o("FontSizeDecimal",t)]&&(a.fontSize=parseFloat(n[o("FontSizeDecimal",t)])+n[o("FontSizeUnit",t)])),(n[o("LineHeight",t)]||n[o("LineHeightDecimal",t)])&&(M(n[o("LineHeightUnit",t)])&&n[o("LineHeight",t)]?a.lineHeight=parseInt(n[o("LineHeight",t)],10)+n[o("LineHeightUnit",t)]:L(n[o("LineHeightUnit",t)])&&n[o("LineHeightDecimal",t)]&&(a.lineHeight=parseFloat(n[o("LineHeightDecimal",t)])+n[o("LineHeightUnit",t)])),""===z(n[o("LetterSpacing",t)])&&""===z(n[o("LetterSpacingDecimal",t)])||(M(n[o("LetterSpacingUnit",t)])&&""!==z(n[o("LetterSpacing",t)])?a.letterSpacing=parseInt(n[o("LetterSpacing",t)],10)+n[o("LetterSpacingUnit",t)]:L(n[o("LetterSpacingUnit",t)])&&""!==z(n[o("LetterSpacingDecimal",t)])&&(a.letterSpacing=parseFloat(n[o("LetterSpacingDecimal",t)])+n[o("LetterSpacingUnit",t)])),Object.keys(a).length>0&&Object.entries(a).map((([t,n])=>{switch(e){case"desktop":r[t]=n;break;case"tablet":i[t]=n;break;case"mobile":l[t]=n}}))})),{desktop:r,tablet:i,mobile:l}},hn=(0,He.createHigherOrderComponent)((e=>class extends Ge.Component{static defaultProps={attributes:{}};componentDidMount(){(e=>{Object.keys(e).filter((e=>e.match(/fontfamily/i))).forEach((t=>{const n=e[t];n&&setTimeout((()=>{an(n)}),400)}))})(this.props.attributes)}render(){return wp.element.createElement(e,this.props)}}),"withGoogleFont"),yn=hn,vn=(0,He.createHigherOrderComponent)((e=>class extends Ge.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,o=e?.parentNode;for(;o;){let e=o;if(e&&e?.classList?.contains(t)){n=!0;break}if(!e?.parentNode)break;o=e.parentNode}return n}reInitUniqueClass(e){const{clientId:t,attributes:n,setAttributes:o,isFullSiteEditor:r}=this.props,{uniqueClass:i}=n,l=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument(),a=this.getNewUniqueClass(t);let s=!1;if(r){if(i.includes("qodef-block")||i.includes("qodef-widget")){const e=l.querySelector(`.${i}`);if(e){this.hasParent(e,"wp-block-post-content")||(s=!0)}}e&&l.addEventListener("paste",(()=>{s=!0}))}!r&&i.includes("qodef-template-block")&&(s=!0),""!==i&&i!==a&&l.querySelectorAll(`.${i}`).length>1&&(s=!0),s&&o({uniqueClass:a})}render(){return this.reInitUniqueClass(),wp.element.createElement(e,this.props)}}),"withUniqueClass"),kn=vn;function _n(){return _n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_n.apply(this,arguments)}let wn=[],qn={family:[],weight:[],style:[]};const Sn=e=>{let t="";return Object.entries(e).map((([e,n])=>{if(e.match(/fontfamily/i)){const e=n.replace(/["']/g,"");!wn.includes(e)&&ln(e)&&(qn.family.push(e),wn.push(e))}e.match(/fontweight/i)&&qn.weight.push(parseInt(n,10)),e.match(/fontstyle/i)&&qn.style.push(n),t+=`${e.replace(/([A-Z])/g,((e,t,n)=>(n>0?"-":"")+e.toLowerCase()))}: ${n};`})),t},An=(0,He.createHigherOrderComponent)((e=>class extends Ge.Component{addPageStyle(e){if(e){const t=this.postID;let n=this.getPageStyles||[],o={key:this.attributes.uniqueClass,values:[],fonts:[]};wn=[],qn={family:[],weight:[],style:[]},e.forEach(((r,i)=>{if(!Object.values(r.styles).every((e=>0===Object.keys(e).length))){const e=["widget","template"].includes(t)?"":`body[class*="-${t}"]`,n=`${e} ${r.selector}`,i=[];"string"!=typeof r.selector&&r.selector.forEach((t=>{t&&i.push(`${e} ${t}`)})),o.values.push({selector:i.length>1?i.join(","):n,styles:Sn(r.styles.desktop||""),tablet_styles:Sn(r.styles.tablet||""),mobile_styles:Sn(r.styles.mobile||""),custom_styles:r.custom_styles||[]}),o.fonts=qn}if(i===e.length-1)if(n&&n.length){let e=!1;n.map(((t,r)=>{t.key===o.key&&(e=!0,o.values.length?Ke()(t.values,o.values)||(n[r].values=o.values,n[r].fonts=o.fonts):(n[r].values=[],n[r].fonts={family:[],weight:[],style:[]}))})),!e&&o.values.length&&n.push(o)}else"object"==typeof n&&Object.keys(n).length?(n=Object.values(n),n.push(o)):n.push(o);const l=n.filter((e=>e.values.length));qiBlocksEditor.vars.currentPageID=t,qiBlocksEditor.vars.currentPageStyles=l}))}}render(){return wp.element.createElement(e,_n({},this.props,{addPageStyle:this.addPageStyle}))}}),"withStyles"),In=(0,He.compose)((0,l.withSelect)((e=>{let t=e("core/editor")?.getCurrentPostId()||"widget";const n=!!e("core/edit-site");let o="desktop";return e("core/edit-post")&&(o=e("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase()),n&&(t="template",o=e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:o,postID:t,getPageStyles:e("qi-blocks/data/with-styles").getOptions(t).data,isFullSiteEditor:n}})),kn,An);var xn=n(2324);class En extends Ge.Component{componentDidMount(){this.initBlockScript("mount")}componentDidUpdate(e){Ke()(e.attributes,this.props.attributes)||this.initBlockScript("reinit")}initBlockScript(e){"object"==typeof xn.c&&xn.c.initItem(this.props.attributes.uniqueClass,e)}render(){const{attributes:t,setAttributes:n,previewScreen:o}=this.props,{uniqueClass:r,layout:i,timelineRepeater:l,appearAnimation:a,timelineColumns:s,timelineColumnsResponsive:c,timelineColumns1440:u,timelineColumns1366:p,timelineColumns1024:m,timelineColumns768:d,timelineColumns680:b,timelineColumns480:f,horizontalSideWidthUnit:g,horizontalContentWidthUnit:h,titleTag:y,titleMarginBottomUnit:v,dateMarginBottomUnit:k,textMarginBottomUnit:w,spaceBetweenItemsUnit:S,spaceFromCenterUnit:A,verticalSideItemSidePaddingUnit:I,lineType:P,lineThicknessUnit:N,pointType:O,pointPositionUnit:D,pointDiamondLinesSizeUnit:M,pointSizeUnit:L,iconSizeUnit:j,prevIcon:z,nextIcon:K,navigationSizeUnit:$,navigationOffsetUnit:H}=t;let G,W=(e,t)=>{let n={desktop:{},tablet:{},mobile:{}};for(const o in e)n[o][t+"Top"]=void 0!==e[o][t+"Top"]?e[o][t+"Top"]:0,n[o][t+"Right"]=void 0!==e[o][t+"Left"]?e[o][t+"Left"]:0,n[o][t+"Bottom"]=void 0!==e[o][t+"Bottom"]?e[o][t+"Bottom"]:0,n[o][t+"Left"]=void 0!==e[o][t+"Right"]?e[o][t+"Right"]:0;return n},Y=e=>{let t=Jt(e.itemLink,"");return e.itemTitle&&wp.element.createElement(wp.element.Fragment,null,e.itemLink&&0!==Object.keys(e.itemLink).length&&wp.element.createElement(ee,{className:"qodef-e-title"},wp.element.createElement("a",t,e.itemTitle)),(!e.itemLink||0===Object.keys(e.itemLink).length)&&wp.element.createElement(ee,{className:"qodef-e-title"},e.itemTitle))},X=e=>e.itemText&&wp.element.createElement("p",{className:"qodef-e-text"},e.itemText),Z=e=>e.itemPointIcon&&e.itemPointIcon.html&&wp.element.createElement("div",{className:"qodef-e-icon-holder",style:B(Ie,o),dangerouslySetInnerHTML:{__html:e.itemPointIcon.html}}),J=e=>wp.element.createElement("div",{className:"qodef-e-image",style:B(Ne,o)},e.itemImage&&e.itemImage.url&&wp.element.createElement("img",{src:e.itemImage.url,alt:e.itemImage.alt})),Q=e=>e.itemDate&&wp.element.createElement("div",{className:"qodef-e-date",style:B(Te,o)},e.itemDate),ee=y,te=0,ne="horizontal-alternating"===i||"horizontal-standard"===i?"horizontal":"vertical",oe={};oe.colNum=s||"3","custom"===c&&(oe.colNum1440=u||oe.colNum,oe.colNum1366=p||oe.colNum,oe.colNum1024=m||oe.colNum,oe.colNum768=d||oe.colNum,oe.colNum680=b||oe.colNum,oe.colNum480=f||oe.colNum),G=JSON.stringify(oe);const re=C(t),ie=at({blockAttributes:t});let le={className:x(t),style:B(ie,o),...E(t)};re&&(le.id=re);const ae=Ye()(T("timeline",this.props),"horizontal"===ne?"qodef-timeline--horizontal":"qodef-timeline--vertical",`qodef-timeline-layout--${i}`,a?"qodef--has-appear":"","vertical"===ne?`qodef-line--${P}`:"",`qodef-point--${O}`,"vertical-separated"===i?"qodef-reverse-padding":"");let ce="qodef-timeline-inner";ce+="horizontal"===ne?" qodef-gutenberg-row":"";let ue=gn({attrNameTemplate:"Title",attributes:t}),pe=F({attributes:t,blockAttrName:"titleColor",cssProp:"color"}),me=F({attributes:t,blockAttrName:"titleMarginBottom",cssProp:"marginBottom"}),de=Ze({blockAttributes:t,attrNameTemplate:"Title",attrName:"Padding"}),be=se()(ue,pe,me,de),fe=W(de,"padding"),ge=F({attributes:t,blockAttrName:"titleHoverColor",cssProp:"color"}),he=se()(ge,{}),ye=gn({attrNameTemplate:"Text",attributes:t}),ve=F({attributes:t,blockAttrName:"textColor",cssProp:"color"}),ke=F({attributes:t,blockAttrName:"textMarginBottom",cssProp:"marginBottom"}),_e=Ze({blockAttributes:t,attrNameTemplate:"Text",attrName:"Padding"}),we=se()(ye,ve,ke,_e),qe=W(_e,"padding"),Se=F({attributes:t,blockAttrName:"iconSize",cssProp:"fontSize"}),Ae=F({attributes:t,blockAttrName:"iconColor",cssProp:"color"}),Ie=se()(Se,Ae),xe=gn({attrNameTemplate:"Date",attributes:t}),Ee=F({attributes:t,blockAttrName:"dateColor",cssProp:"color"}),Ce=F({attributes:t,blockAttrName:"dateMarginBottom",cssProp:"marginBottom"}),Te=se()(xe,Ee,Ce),Pe=Ze({blockAttributes:t,attrNameTemplate:"Image",attrName:"BorderRadius"}),Ne=se()(Pe,{}),Oe=Ze({blockAttributes:t,attrNameTemplate:"verticalSideImage",attrName:"Margin"}),De=se()({},Oe),Be="vertical"===ne?F({attributes:t,blockAttrName:"horizontalSideWidth",cssProp:"width"}):{},Re="vertical-side"===ne?W(Oe,"margin"):{},Me=se()(Be,Re),Le={};"vertical-separated"===i?Le=F({attributes:t,blockAttrName:"horizontalSideWidth",cssProp:"width"}):"vertical-side"===i&&(Le=F({attributes:t,blockAttrName:"horizontalContentWidth",cssProp:"width"}));let je=se()(Le,{}),Ve="vertical"===ne?F({attributes:t,blockAttrName:"spaceBetweenItems",cssProp:"paddingBottom"}):{},ze=se()(Ve,{}),Ue="horizontal"===ne?F({attributes:t,blockAttrName:"spaceBetweenItems",cssProp:"padding"},"0 calc(%s/2)"):{},Fe=se()(Ue,{}),Ke=F({attributes:t,blockAttrName:"spaceFromCenter",cssProp:"padding"},"%s 0 0"),He=F({attributes:t,blockAttrName:"spaceFromCenter",cssProp:"padding"},"0 0 %s"),Ge=F({attributes:t,blockAttrName:"spaceFromCenter",cssProp:"padding"},"0 0 0 %s"),We=F({attributes:t,blockAttrName:"spaceFromCenter",cssProp:"padding"},"0 %s 0 0"),Xe=F({attributes:t,blockAttrName:"verticalSideItemSidePadding",cssProp:"padding"},"0 0 0 %s"),Je=F({attributes:t,blockAttrName:"verticalSideItemSidePadding",cssProp:"padding"},"0 %s 0 0"),Qe=F({attributes:t,blockAttrName:"lineColor",cssProp:"backgroundColor"}),et=F({attributes:t,blockAttrName:"lineThickness",cssProp:"width"}),tt=F({attributes:t,blockAttrName:"lineThickness",cssProp:"height"}),nt=F({attributes:t,blockAttrName:"pointPosition",cssProp:"top"}),ot=F({attributes:t,blockAttrName:"pointDiamondLinesSize",cssProp:"width"}),rt=F({attributes:t,blockAttrName:"pointDiamondLinesSize",cssProp:"height"}),it=F({attributes:t,blockAttrName:"pointSize",cssProp:"fontSize"}),lt=se()(it,{}),st=F({attributes:t,blockAttrName:"pointColor",cssProp:"backgroundColor"}),ct=Ze({blockAttributes:t,attrNameTemplate:"Point",attrName:"BorderRadius"}),ut=se()(st,ct),pt=F({attributes:t,blockAttrName:"navigationColor",cssProp:"color"}),mt=F({attributes:t,blockAttrName:"navigationSize",cssProp:"fontSize"}),bt=F({attributes:t,blockAttrName:"navigationOffset",cssProp:"left"}),ft=F({attributes:t,blockAttrName:"navigationOffset",cssProp:"right"}),gt=se()({},pt,mt,bt),ht=se()({},pt,mt,ft);return this.props.addPageStyle([{selector:`.${r}.qodef-block-container`,styles:ie},{selector:`.${r} .qi-block-timeline`,styles:{}},{selector:`.${r} .qi-block-timeline.qodef-timeline--vertical .qodef-e-item:not(:last-child)`,styles:ze},{selector:`.${r} .qi-block-timeline.qodef-timeline--horizontal .qodef-e-item`,styles:Fe},{selector:`.${r} .qi-block-timeline .qodef-e-image`,styles:Ne},{selector:`.${r} .qi-block-timeline .qodef-e-side-holder`,styles:Me},{selector:`.${r} .qi-block-timeline .qodef-e-item.qodef-reverse .qodef-e-side-holder`,styles:De},{selector:`.${r} .qi-block-timeline .qodef-e-content-holder`,styles:je},{selector:`.${r} .qi-block-timeline .qodef-e-title`,styles:be},{selector:`.${r} .qi-block-timeline.qodef-reverse-padding .qodef-obverse .qodef-e-title`,styles:de},{selector:`.${r} .qi-block-timeline.qodef-reverse-padding .qodef-reverse .qodef-e-title`,styles:fe},{selector:`.${r} .qi-block-timeline .qodef-e-title:hover`,styles:he},{selector:`.${r} .qi-block-timeline .qodef-e-text`,styles:we},{selector:`.${r} .qi-block-timeline.qodef-reverse-padding .qodef-obverse .qodef-e-text`,styles:_e},{selector:`.${r} .qi-block-timeline.qodef-reverse-padding .qodef-reverse .qodef-e-text`,styles:qe},{selector:`.${r} .qi-block-timeline .qodef-e-date`,styles:Te},{selector:[`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-alternating .qodef-e-top-holder`,`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-alternating .qodef-e-item.qodef-reverse .qodef-e-content-holder`,`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-standard .qodef-e-content-holder`],styles:Ke},{selector:[`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-alternating .qodef-e-content-holder`,`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-alternating .qodef-e-item.qodef-reverse .qodef-e-top-holder`,`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-standard .qodef-e-top-holder`],styles:He},{selector:[`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-side-holder`,`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-item.qodef-reverse .qodef-e-content-holder`],styles:We},{selector:[`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-content-holder`,`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-item.qodef-reverse .qodef-e-side-holder`],styles:Ge},{selector:`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-side .qodef-e-item-inner`,styles:Xe},{selector:`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-side .qodef-e-item.qodef-reverse .qodef-e-item-inner`,styles:Je},{selector:[`.${r} .qi-block-timeline .qodef-e-line`,`.${r} .qi-block-timeline.qodef-point--diamond .qodef-e-point-holder:before`,`.${r} .qi-block-timeline.qodef-point--diamond .qodef-e-point-holder:after`],styles:Qe},{selector:[`.${r} .qi-block-timeline.qodef-timeline--vertical .qodef-e-line-holder`,`.${r} .qi-block-timeline.qodef-timeline--horizontal.qodef-point--diamond .qodef-e-point-holder:before`,`.${r} .qi-block-timeline.qodef-timeline--horizontal.qodef-point--diamond .qodef-e-point-holder:after`],styles:et},{selector:[`.${r} .qi-block-timeline.qodef-timeline--vertical.qodef-point--diamond .qodef-e-point-holder:before`,`.${r} .qi-block-timeline.qodef-timeline--vertical.qodef-point--diamond .qodef-e-point-holder:after`,`.${r} .qi-block-timeline.qodef-timeline--horizontal .qodef-e-line-holder`],styles:tt},{selector:[`.${r} .qi-block-timeline.qodef-timeline--vertical .qodef-e-point-holder`,`.${r} .qi-block-timeline.qodef-timeline--vertical.qodef-line--inside .qodef-e-line-holder`],styles:nt},{selector:[`.${r} .qi-block-timeline.qodef-timeline--vertical.qodef-point--diamond .qodef-e-point-holder:before`,`.${r} .qi-block-timeline.qodef-timeline--vertical.qodef-point--diamond .qodef-e-point-holder:after`],styles:ot},{selector:[`.${r} .qi-block-timeline.qodef-timeline--horizontal.qodef-point--diamond .qodef-e-point-holder:before`,`.${r} .qi-block-timeline.qodef-timeline--horizontal.qodef-point--diamond .qodef-e-point-holder:after`],styles:rt},{selector:`.${r} .qi-block-timeline .qodef-e-point-holder`,styles:lt},{selector:`.${r} .qi-block-timeline .qodef-e-point`,styles:ut},{selector:`.${r} .qi-block-timeline .qodef-e-point .qodef-e-icon-holder`,styles:Ie},{selector:`.${r} .qi-block-timeline .qodef-nav-prev`,styles:gt},{selector:`.${r} .qi-block-timeline .qodef-nav-next`,styles:ht}]),wp.element.createElement(wp.element.Fragment,null,wp.element.createElement($e.InspectorControls,null,wp.element.createElement(_.TabPanel,{className:"qodef-tab-panel qodef--timeline",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(_.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(_.PanelBody,{title:(0,e.__)("General","qi-blocks")},wp.element.createElement(_.SelectControl,{label:(0,e.__)("Layout","qi-blocks"),value:i,options:[{value:"horizontal-alternating",label:(0,e.__)("Horizontal Alternating","qi-blocks")},{value:"horizontal-standard",label:(0,e.__)("Horizontal Standard","qi-blocks")},{value:"vertical-separated",label:(0,e.__)("Vertical Separated","qi-blocks")},{value:"vertical-side",label:(0,e.__)("Vertical Side","qi-blocks")}],onChange:e=>n({layout:e})}),wp.element.createElement(Zt,{label:(0,e.__)("Items","qi-blocks"),options:[{label:(0,e.__)("Icon","qi-blocks"),optionType:Ut,optionKey:"itemPointIcon",optionDefaultValue:{},advancedOptions:!0,optionAttributes:{allowSize:!1,allowColor:!1}},{label:(0,e.__)("Image","qi-blocks"),optionType:kt,optionKey:"itemImage",optionAttributes:{allowImageSizes:!1},advancedOptions:!0},{label:(0,e.__)("Title","qi-blocks"),optionType:_.TextControl,optionKey:"itemTitle"},{label:(0,e.__)("Date","qi-blocks"),optionType:_.TextControl,optionKey:"itemDate"},{label:(0,e.__)("Text","qi-blocks"),optionType:_.TextareaControl,optionKey:"itemText"},{label:(0,e.__)("Link","qi-blocks"),optionType:Kt,optionKey:"itemLink",optionDefaultValue:{},advancedOptions:!0}],blockAttributeKey:"timelineRepeater",blockAttributes:t,setAttributes:n})),wp.element.createElement(_.PanelBody,{title:(0,e.__)("Appear Animation","qi-blocks"),initialOpen:!1},wp.element.createElement(q,{label:(0,e.__)("Enable Appear Animation","qi-blocks"),blockAttributeKey:"appearAnimation",blockAttributes:t,setAttributes:n})),"horizontal"===ne&&wp.element.createElement(_.PanelBody,{title:(0,e.__)("Columns","qi-blocks"),initialOpen:!1},wp.element.createElement(en,{setAttributes:n,blockAttributes:t,attrNameTemplate:"Timeline",allowColumnsGap:!1,allowColumnsGapSlider:!1,allowColumnsResponsive:!0,columnsMinNumber:1,columnsMaxNumber:8}))),"style"===o.name&&wp.element.createElement(_.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(_.PanelBody,{title:(0,e.__)("Content Style","qi-blocks")},wp.element.createElement(dt,{label:(0,e.__)("Image Border Radius","qi-blocks"),setAttributes:n,blockAttributes:t,attrNameTemplate:"Image",attrName:"BorderRadius",unitType:"pxAndPercent"}),"vertical"===ne&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Tt,{label:(0,e.__)("Side Width","qi-blocks"),blockAttributeKey:"horizontalSideWidth",setAttributes:n,blockAttributes:t,rangeMin:1,rangeDecimalMax:"em"===g?10:100,rangeDecimalMin:.01,allowScreens:!0,unitType:"space"}),"vertical-side"===i&&wp.element.createElement(Tt,{label:(0,e.__)("Content Width","qi-blocks"),blockAttributeKey:"horizontalContentWidth",setAttributes:n,blockAttributes:t,rangeMin:1,rangeDecimalMax:"em"===h?10:100,rangeDecimalMin:.01,allowScreens:!0,unitType:"space"}))),wp.element.createElement(_.PanelBody,{title:(0,e.__)("Style","qi-blocks"),initialOpen:!1},wp.element.createElement(_.TabPanel,{className:"qodef-tab-panel qodef--inner",tabs:[{name:"Title",title:(0,e.__)("Title","qi-blocks")},{name:"Date",title:(0,e.__)("Date","qi-blocks")},{name:"Text",title:(0,e.__)("Text","qi-blocks")}]},(o=>wp.element.createElement(_.Card,{size:"small"},wp.element.createElement(_.CardBody,null,"Title"===o.name&&wp.element.createElement(_.SelectControl,{label:(0,e.__)("Title Tag","qi-blocks"),value:y,options:U("title_tag",!1),onChange:e=>n({titleTag:e})}),wp.element.createElement(wt,{label:(0,e.__)(`${o.name} Color`,"qi-blocks"),blockAttributeKey:`${o.name.toLowerCase()}Color`,blockAttributes:t,setAttributes:n}),"Title"===o.name&&wp.element.createElement(wt,{label:(0,e.__)("Title Hover Color","qi-blocks"),blockAttributeKey:"titleHoverColor",blockAttributes:t,setAttributes:n}),wp.element.createElement(fn,{label:(0,e.__)(`${o.name} Typography`,"qi-blocks"),attrNameTemplate:`${o.name}`,blockAttributes:t,setAttributes:n,popup:!0})))))),wp.element.createElement(_.PanelBody,{title:(0,e.__)("Spacing Style","qi-blocks"),initialOpen:!1},wp.element.createElement(Tt,{label:(0,e.__)("Title Margin Bottom","qi-blocks"),blockAttributeKey:"titleMarginBottom",setAttributes:n,blockAttributes:t,rangeDecimalMax:"em"===v?10:100,allowScreens:!0,unitType:"space"}),wp.element.createElement(dt,{label:(0,e.__)("Title Padding","qi-blocks"),setAttributes:n,blockAttributes:t,attrNameTemplate:"Title",attrName:"Padding",unitType:"space"}),wp.element.createElement(Tt,{label:(0,e.__)("Date Margin Bottom","qi-blocks"),blockAttributeKey:"dateMarginBottom",setAttributes:n,blockAttributes:t,rangeDecimalMax:"em"===k?10:100,allowScreens:!0,unitType:"space"}),wp.element.createElement(Tt,{label:(0,e.__)("Text Margin Bottom","qi-blocks"),blockAttributeKey:"textMarginBottom",setAttributes:n,blockAttributes:t,rangeDecimalMax:"em"===w?10:100,allowScreens:!0,unitType:"space"}),wp.element.createElement(dt,{label:(0,e.__)("Text Padding","qi-blocks"),setAttributes:n,blockAttributes:t,attrNameTemplate:"Text",attrName:"Padding",unitType:"space"}),wp.element.createElement(Tt,{label:(0,e.__)("Space Between Items","qi-blocks"),blockAttributeKey:"spaceBetweenItems",setAttributes:n,blockAttributes:t,rangeDecimalMax:"em"===S?10:100,allowScreens:!0,unitType:"space"}),"vertical-side"!==i&&wp.element.createElement(Tt,{label:(0,e.__)("Space From Center","qi-blocks"),blockAttributeKey:"spaceFromCenter",setAttributes:n,blockAttributes:t,rangeMax:500,rangeDecimalMax:"em"===A?10:100,allowScreens:!0,unitType:"space"}),"vertical-side"===i&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Tt,{label:(0,e.__)("Item Side Padding","qi-blocks"),blockAttributeKey:"verticalSideItemSidePadding",setAttributes:n,blockAttributes:t,rangeDecimalMax:"em"===I?10:100,allowScreens:!0,unitType:"space"}),wp.element.createElement(dt,{label:(0,e.__)("Image Margins","qi-blocks"),setAttributes:n,blockAttributes:t,attrNameTemplate:"verticalSideImage",attrName:"Margin",unitType:"space"}))),wp.element.createElement(_.PanelBody,{title:(0,e.__)("Line & Point Style","qi-blocks"),initialOpen:!1},"vertical"===ne&&wp.element.createElement(_.SelectControl,{label:(0,e.__)("Line Type","qi-blocks"),value:P,options:[{value:"outside",label:(0,e.__)("Outside","qi-blocks")},{value:"inside",label:(0,e.__)("Inside","qi-blocks")}],onChange:e=>n({lineType:e})}),wp.element.createElement(wt,{label:(0,e.__)("Line Color","qi-blocks"),blockAttributeKey:"lineColor",blockAttributes:t,setAttributes:n}),wp.element.createElement(Tt,{label:(0,e.__)("Line Thickness","qi-blocks"),blockAttributeKey:"lineThickness",setAttributes:n,blockAttributes:t,rangeMax:100,rangeMin:1,rangeDecimalMax:"em"===N?10:100,rangeDecimalMin:.01,allowScreens:!0,unitType:"space"}),wp.element.createElement(_.SelectControl,{label:(0,e.__)("Point Type","qi-blocks"),value:O,options:[{value:"standard",label:(0,e.__)("Standard","qi-blocks")},{value:"diamond",label:(0,e.__)("Diamond","qi-blocks")}],onChange:e=>n({pointType:e})}),"vertical"===ne&&wp.element.createElement(Tt,{label:(0,e.__)("Point Position","qi-blocks"),blockAttributeKey:"pointPosition",setAttributes:n,blockAttributes:t,rangeDecimalMax:"em"===D?10:100,allowScreens:!0,unitType:"space"}),"diamond"===O&&wp.element.createElement(Tt,{label:(0,e.__)("Diamond Lines Size","qi-blocks"),blockAttributeKey:"pointDiamondLinesSize",setAttributes:n,blockAttributes:t,rangeMax:100,rangeMin:1,rangeDecimalMax:"em"===M?10:100,rangeDecimalMin:.01,allowScreens:!0,unitType:"space"}),wp.element.createElement(Tt,{label:(0,e.__)("Point Size","qi-blocks"),blockAttributeKey:"pointSize",setAttributes:n,blockAttributes:t,rangeMax:200,rangeMin:1,rangeDecimalMax:"em"===L?10:100,rangeDecimalMin:.01,allowScreens:!0,unitType:"space"}),wp.element.createElement(wt,{label:(0,e.__)("Point Color","qi-blocks"),blockAttributeKey:"pointColor",blockAttributes:t,setAttributes:n}),wp.element.createElement(dt,{label:(0,e.__)("Point Border Radius","qi-blocks"),setAttributes:n,blockAttributes:t,attrNameTemplate:"Point",attrName:"BorderRadius",unitType:"pxAndPercent"}),wp.element.createElement(Tt,{label:(0,e.__)("Icon Size","qi-blocks"),blockAttributeKey:"iconSize",setAttributes:n,blockAttributes:t,rangeMax:100,rangeMin:1,rangeDecimalMax:"em"===j?10:100,rangeDecimalMin:.01,allowScreens:!0,unitType:"space"}),wp.element.createElement(wt,{label:(0,e.__)("Icon Color","qi-blocks"),blockAttributeKey:"iconColor",blockAttributes:t,setAttributes:n})),"horizontal"===ne&&wp.element.createElement(_.PanelBody,{title:(0,e.__)("Navigation Style","qi-blocks"),initialOpen:!1},wp.element.createElement(Ut,{label:(0,e.__)("Navigation Arrow Previous","qi-blocks"),attrNameTemplate:"prev",setAttributes:n,blockAttributes:t,allowSize:!1,allowColor:!1}),wp.element.createElement(Ut,{label:(0,e.__)("Navigation Arrow Next","qi-blocks"),attrNameTemplate:"next",setAttributes:n,blockAttributes:t,allowSize:!1,allowColor:!1}),wp.element.createElement(wt,{label:(0,e.__)("Navigation Arrow Color","qi-blocks"),blockAttributeKey:"navigationColor",blockAttributes:t,setAttributes:n}),wp.element.createElement(Tt,{label:(0,e.__)("Navigation Arrow Size","qi-blocks"),blockAttributeKey:"navigationSize",setAttributes:n,blockAttributes:t,rangeMax:100,rangeMin:1,rangeDecimalMax:"em"===$?10:100,rangeDecimalMin:.01,allowScreens:!0,unitType:"space"}),wp.element.createElement(Tt,{label:(0,e.__)("Navigation Arrow Offset","qi-blocks"),blockAttributeKey:"navigationOffset",setAttributes:n,blockAttributes:t,rangeDecimalMax:"em"===H?10:100,allowScreens:!0,unitType:"space"}))),"advanced"===o.name&&wp.element.createElement(Vt,{blockAttributes:t,setAttributes:n}))))),wp.element.createElement("style",null,R(B(he,o))&&`.${r} .qi-block-timeline .qodef-e-title:hover  {\n                            ${R(B(he,o))}\n                        }`,R(B(ze,o))&&`.${r} .qi-block-timeline.qodef-timeline--vertical .qodef-e-item:not(:last-child)  {\n                            ${R(B(ze,o))}\n                        }`,R(B(Fe,o))&&`.${r} .qi-block-timeline.qodef-timeline--horizontal .qodef-e-item  {\n                            ${R(B(Fe,o))}\n                        }`,R(B(Ke,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-alternating .qodef-e-top-holder  {\n                            ${R(B(Ke,o))}\n                        }`,R(B(Ke,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-alternating .qodef-e-item.qodef-reverse .qodef-e-content-holder  {\n                            ${R(B(Ke,o))}\n                        }`,R(B(Ke,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-standard .qodef-e-content-holder  {\n                            ${R(B(Ke,o))}\n                        }`,R(B(He,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-alternating .qodef-e-content-holder  {\n                            ${R(B(He,o))}\n                        }`,R(B(He,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-alternating .qodef-e-item.qodef-reverse .qodef-e-top-holder  {\n                            ${R(B(He,o))}\n                        }`,R(B(He,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--horizontal-standard .qodef-e-top-holder  {\n                            ${R(B(He,o))}\n                        }`,R(B(We,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-side-holder  {\n                            ${R(B(We,o))}\n                        }`,R(B(We,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-item.qodef-reverse .qodef-e-content-holder  {\n                            ${R(B(We,o))}\n                        }`,R(B(Ge,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-content-holder  {\n                            ${R(B(Ge,o))}\n                        }`,R(B(Ge,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-separated .qodef-e-item.qodef-reverse .qodef-e-side-holder  {\n                            ${R(B(Ge,o))}\n                        }`,R(B(Xe,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-side .qodef-e-item-inner  {\n                            ${R(B(Xe,o))}\n                        }`,R(B(Je,o))&&`.${r} .qi-block-timeline.qodef-timeline-layout--vertical-side .qodef-e-item.qodef-reverse .qodef-e-item-inner {\n                            ${R(B(Je,o))}\n                        }`,R(B(Me,o))&&`.${r} .qi-block-timeline .qodef-e-side-holder {\n                            ${R(B(Me,o))}\n                        }`,R(B(De,o))&&`.${r} .qi-block-timeline .qodef-e-item.qodef-reverse .qodef-e-side-holder {\n                            ${R(B(De,o))}\n                        }`,R(B(be,o))&&`.${r} .qi-block-timeline .qodef-e-title {\n                            ${R(B(be,o))}\n                        }`,R(B(de,o))&&`.${r} .qi-block-timeline.qodef-reverse-padding .qodef-obverse .qodef-e-title {\n                            ${R(B(de,o))}\n                        }`,R(B(fe,o))&&`.${r} .qi-block-timeline.qodef-reverse-padding .qodef-reverse .qodef-e-title {\n                            ${R(B(fe,o))}\n                        }`,R(B(we,o))&&`.${r} .qi-block-timeline .qodef-e-text {\n                            ${R(B(we,o))}\n                        }`,R(B(_e,o))&&`.${r} .qi-block-timeline.qodef-reverse-padding .qodef-obverse .qodef-e-text {\n                            ${R(B(_e,o))}\n                        }`,R(B(qe,o))&&`.${r} .qi-block-timeline.qodef-reverse-padding .qodef-reverse .qodef-e-text {\n                            ${R(B(qe,o))}\n                        }`,R(B(Qe,o))&&`.${r} .qi-block-timeline .qodef-e-line, \n\t\t\t\t\t\t.${r} .qi-block-timeline.qodef-point--diamond .qodef-e-point-holder:before,\n\t\t\t\t\t\t.${r} .qi-block-timeline.qodef-point--diamond .qodef-e-point-holder:after {\n                            ${R(B(Qe,o))}\n                        }`,R(B(et,o))&&`.${r} .qi-block-timeline.qodef-timeline--vertical .qodef-e-line-holder, \n\t\t\t\t\t\t.${r} .qi-block-timeline.qodef-timeline--horizontal.qodef-point--diamond .qodef-e-point-holder:before,\n\t\t\t\t\t\t.${r} .qi-block-timeline.qodef-timeline--horizontal.qodef-point--diamond .qodef-e-point-holder:after {\n                            ${R(B(et,o))}\n                        }`,R(B(tt,o))&&`.${r} .qi-block-timeline.qodef-timeline--vertical.qodef-point--diamond .qodef-e-point-holder:before, \n\t\t\t\t\t\t.${r} .qi-block-timeline.qodef-timeline--vertical.qodef-point--diamond .qodef-e-point-holder:after,\n\t\t\t\t\t\t.${r} .qi-block-timeline.qodef-timeline--horizontal .qodef-e-line-holder {\n                            ${R(B(tt,o))}\n                        }`,R(B(nt,o))&&`.${r} .qi-block-timeline.qodef-timeline--vertical .qodef-e-point-holder,\n\t\t\t\t\t\t.${r} .qi-block-timeline.qodef-timeline--vertical.qodef-line--inside .qodef-e-line-holder {\n                            ${R(B(nt,o))}\n                        }`,R(B(ot,o))&&`.${r} .qi-block-timeline.qodef-timeline--vertical.qodef-point--diamond .qodef-e-point-holder:before,\n\t\t\t\t\t\t.${r} .qi-block-timeline.qodef-timeline--vertical.qodef-point--diamond .qodef-e-point-holder:after {\n                            ${R(B(ot,o))}\n                        }`,R(B(rt,o))&&`.${r} .qi-block-timeline.qodef-timeline--horizontal.qodef-point--diamond .qodef-e-point-holder:before,\n\t\t\t\t\t\t.${r} .qi-block-timeline.qodef-timeline--horizontal.qodef-point--diamond .qodef-e-point-holder:after {\n                            ${R(B(rt,o))}\n                        }`,R(B(lt,o))&&`.${r} .qi-block-timeline .qodef-e-point-holder {\n                            ${R(B(lt,o))}\n                        }`,R(B(ut,o))&&`.${r} .qi-block-timeline .qodef-e-point {\n                            ${R(B(ut,o))}\n                        }`,R(B(gt,o))&&`.${r} .qi-block-timeline .qodef-nav-prev {\n                            ${R(B(gt,o))}\n                        }`,R(B(ht,o))&&`.${r} .qi-block-timeline .qodef-nav-next {\n                            ${R(B(ht,o))}\n                        }`),wp.element.createElement("div",le,wp.element.createElement("div",{className:ae,"data-options":G},"horizontal"===ne&&wp.element.createElement(wp.element.Fragment,null,!(z&&V(z.html))&&wp.element.createElement("div",{className:"qodef-nav-prev",dangerouslySetInnerHTML:{__html:qiBlocksEditor.vars.arrowLeftIcon}}),z&&V(z.html)&&wp.element.createElement("div",{className:"qodef-nav-prev",dangerouslySetInnerHTML:{__html:z.html}}),!(K&&V(K.html))&&wp.element.createElement("div",{className:"qodef-nav-next",dangerouslySetInnerHTML:{__html:qiBlocksEditor.vars.arrowRightIcon}}),K&&V(K.html)&&wp.element.createElement("div",{className:"qodef-nav-next",dangerouslySetInnerHTML:{__html:K.html}})),wp.element.createElement("div",{className:ce},l&&l.map((e=>{let t="qodef-e qodef-e-item";return t+="horizontal"===ne?" qodef-gutenberg-column":"",t+=1==te%2?"vertical"===ne?" qodef-reverse":" qodef-obverse":"vertical"===ne?" qodef-obverse":" qodef-reverse",te++,i&&wp.element.createElement(wp.element.Fragment,null,"horizontal-alternating"===i&&wp.element.createElement("div",{className:t},wp.element.createElement("div",{className:"qodef-e-line-holder"},wp.element.createElement("span",{className:"qodef-e-line"})),wp.element.createElement("div",{className:"qodef-e-item-inner"},wp.element.createElement("div",{className:"qodef-e-point-holder"},wp.element.createElement("div",{className:"qodef-e-point"},Z(e))),wp.element.createElement("div",{className:"qodef-e-top-holder"},J(e)),wp.element.createElement("div",{className:"qodef-e-content-holder",style:B(je,o)},Y(e),X(e),Q(e)))),"horizontal-standard"===i&&wp.element.createElement("div",{className:t},wp.element.createElement("div",{className:"qodef-e-line-holder"},wp.element.createElement("span",{className:"qodef-e-line"}),wp.element.createElement("div",{className:"qodef-e-point-holder"},wp.element.createElement("div",{className:"qodef-e-point"},Z(e)))),wp.element.createElement("div",{className:"qodef-e-item-inner"},wp.element.createElement("div",{className:"qodef-e-top-holder"},J(e)),wp.element.createElement("div",{className:"qodef-e-content-holder",style:B(je,o)},Q(e),Y(e),X(e)))),"vertical-separated"===i&&wp.element.createElement("div",{className:t},wp.element.createElement("div",{className:"qodef-e-line-holder"},wp.element.createElement("span",{className:"qodef-e-line"})),wp.element.createElement("div",{className:"qodef-e-item-inner"},wp.element.createElement("div",{className:"qodef-e-point-holder"},wp.element.createElement("div",{className:"qodef-e-point"},Z(e))),wp.element.createElement("div",{className:"qodef-e-side-holder"},J(e)),wp.element.createElement("div",{className:"qodef-e-content-holder",style:B(je,o)},Q(e),Y(e),X(e)))),"vertical-side"===i&&wp.element.createElement("div",{className:t},wp.element.createElement("div",{className:"qodef-e-line-holder"},wp.element.createElement("span",{className:"qodef-e-line"})),wp.element.createElement("div",{className:"qodef-e-item-inner"},wp.element.createElement("div",{className:"qodef-e-point-holder"},wp.element.createElement("div",{className:"qodef-e-point"},Z(e))),wp.element.createElement("div",{className:"qodef-e-item-content"},wp.element.createElement("div",{className:"qodef-e-side-holder"},J(e)),wp.element.createElement("div",{className:"qodef-e-content-holder",style:B(je,o)},Q(e),Y(e),X(e))))))}))))))}}En.defaultProps={previewScreen:h};const Cn=(0,He.compose)(In,yn)(En);class Tn extends Ge.Component{render(){const{attributes:e}=this.props,{layout:t,timelineRepeater:n,timelineColumns:o,timelineColumnsResponsive:r,timelineColumns1440:i,timelineColumns1366:l,timelineColumns1024:a,timelineColumns768:s,timelineColumns680:c,timelineColumns480:u,appearAnimation:p,titleTag:m,lineType:d,pointType:b,prevIcon:f,nextIcon:g}=e;let h,y=e=>{let t=Jt(e.itemLink,"");return e.itemTitle&&wp.element.createElement(wp.element.Fragment,null,e.itemLink&&0!==Object.keys(e.itemLink).length&&wp.element.createElement(q,{className:"qodef-e-title"},wp.element.createElement("a",t,e.itemTitle)),(!e.itemLink||0===Object.keys(e.itemLink).length)&&wp.element.createElement(q,{className:"qodef-e-title"},e.itemTitle))},v=e=>e.itemText&&wp.element.createElement("p",{className:"qodef-e-text"},e.itemText),k=e=>e.itemPointIcon&&e.itemPointIcon.html&&wp.element.createElement("div",{className:"qodef-e-icon-holder",dangerouslySetInnerHTML:{__html:e.itemPointIcon.html}}),_=e=>wp.element.createElement("div",{className:"qodef-e-image"},e.itemImage&&e.itemImage.url&&wp.element.createElement("img",{src:e.itemImage.url,alt:e.itemImage.alt})),w=e=>e.itemDate&&wp.element.createElement("div",{className:"qodef-e-date"},e.itemDate),q=m,S=0,A="horizontal-alternating"===t||"horizontal-standard"===t?"horizontal":"vertical",I={};I.colNum=o||"3","custom"===r&&(I.colNum1440=i||I.colNum,I.colNum1366=l||I.colNum,I.colNum1024=a||I.colNum,I.colNum768=s||I.colNum,I.colNum680=c||I.colNum,I.colNum480=u||I.colNum),h=JSON.stringify(I);const P=C(e);let N={className:x(e),...E(e)};P&&(N.id=P);const O=Ye()(T("timeline",this.props),"horizontal"===A?"qodef-timeline--horizontal":"qodef-timeline--vertical",`qodef-timeline-layout--${t}`,p?"qodef--has-appear":"","vertical"===A?`qodef-line--${d}`:"",`qodef-point--${b}`,"vertical-separated"===t?"qodef-reverse-padding":"");let D="qodef-timeline-inner";return D+="horizontal"===A?" qodef-gutenberg-row":"",wp.element.createElement("div",N,wp.element.createElement("div",{className:O,"data-options":h},"horizontal"===A&&wp.element.createElement(wp.element.Fragment,null,!(f&&V(f.html))&&wp.element.createElement("div",{className:"qodef-nav-prev",dangerouslySetInnerHTML:{__html:qiBlocksEditor.vars.arrowLeftIcon}}),f&&V(f.html)&&wp.element.createElement("div",{className:"qodef-nav-prev",dangerouslySetInnerHTML:{__html:f.html}}),!(g&&V(g.html))&&wp.element.createElement("div",{className:"qodef-nav-next",dangerouslySetInnerHTML:{__html:qiBlocksEditor.vars.arrowRightIcon}}),g&&V(g.html)&&wp.element.createElement("div",{className:"qodef-nav-next",dangerouslySetInnerHTML:{__html:g.html}})),wp.element.createElement("div",{className:D},n&&n.map((e=>{let n="qodef-e qodef-e-item";return n+="horizontal"===A?" qodef-gutenberg-column":"",n+=1==S%2?"vertical"===A?" qodef-reverse":" qodef-obverse":"vertical"===A?" qodef-obverse":" qodef-reverse",S++,t&&wp.element.createElement(wp.element.Fragment,null,"horizontal-alternating"===t&&wp.element.createElement("div",{className:n},wp.element.createElement("div",{className:"qodef-e-line-holder"},wp.element.createElement("span",{className:"qodef-e-line"})),wp.element.createElement("div",{className:"qodef-e-item-inner"},wp.element.createElement("div",{className:"qodef-e-point-holder"},wp.element.createElement("div",{className:"qodef-e-point"},k(e))),wp.element.createElement("div",{className:"qodef-e-top-holder"},_(e)),wp.element.createElement("div",{className:"qodef-e-content-holder"},y(e),v(e),w(e)))),"horizontal-standard"===t&&wp.element.createElement("div",{className:n},wp.element.createElement("div",{className:"qodef-e-line-holder"},wp.element.createElement("span",{className:"qodef-e-line"}),wp.element.createElement("div",{className:"qodef-e-point-holder"},wp.element.createElement("div",{className:"qodef-e-point"},k(e)))),wp.element.createElement("div",{className:"qodef-e-item-inner"},wp.element.createElement("div",{className:"qodef-e-top-holder"},_(e)),wp.element.createElement("div",{className:"qodef-e-content-holder"},w(e),y(e),v(e)))),"vertical-separated"===t&&wp.element.createElement("div",{className:n},wp.element.createElement("div",{className:"qodef-e-line-holder"},wp.element.createElement("span",{className:"qodef-e-line"})),wp.element.createElement("div",{className:"qodef-e-item-inner"},wp.element.createElement("div",{className:"qodef-e-point-holder"},wp.element.createElement("div",{className:"qodef-e-point"},k(e))),wp.element.createElement("div",{className:"qodef-e-side-holder"},_(e)),wp.element.createElement("div",{className:"qodef-e-content-holder"},w(e),y(e),v(e)))),"vertical-side"===t&&wp.element.createElement("div",{className:n},wp.element.createElement("div",{className:"qodef-e-line-holder"},wp.element.createElement("span",{className:"qodef-e-line"})),wp.element.createElement("div",{className:"qodef-e-item-inner"},wp.element.createElement("div",{className:"qodef-e-point-holder"},wp.element.createElement("div",{className:"qodef-e-point"},k(e))),wp.element.createElement("div",{className:"qodef-e-item-content"},wp.element.createElement("div",{className:"qodef-e-side-holder"},_(e)),wp.element.createElement("div",{className:"qodef-e-content-holder"},w(e),y(e),v(e))))))})))))}}const Pn=Tn,Nn={attributes:{layout:"horizontal-alternating",timelineRepeater:[{itemPointIcon:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultImage,alt:""},itemTitle:qiBlocksEditor.vars.defaultTitleLabel+" 1",itemDate:"1980",itemText:qiBlocksEditor.vars.defaultContentLabel,itemLink:{}},{itemPointIcon:{},itemImage:{id:"",url:qiBlocksEditor.vars.defaultImage,alt:""},itemTitle:qiBlocksEditor.vars.defaultTitleLabel+" 2",itemDate:"1983",itemText:qiBlocksEditor.vars.defaultContentLabel,itemLink:{}}],appearAnimation:!0,titleTag:"h4",lineType:"outside",lineColor:"#ebebeb",pointType:"standard",pointColor:"#111",timelineColumns:2}};var On=n(6976),Dn=n.n(On),Bn=n(6520),Rn=n.n(Bn),Mn=n(6176),Ln=n.n(Mn),jn=n(5120),Vn=n.n(jn),zn=n(6808),Un=n.n(zn),Fn=n(1936),Kn=n.n(Fn),$n=n(7576),Hn={};Hn.styleTagTransform=Kn(),Hn.setAttributes=Vn(),Hn.insert=Ln().bind(null,"head"),Hn.domAPI=Rn(),Hn.insertStyleElement=Un();Dn()($n.c,Hn);$n.c&&$n.c.locals&&$n.c.locals;var Gn,Wn;function Yn(){return Yn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yn.apply(this,arguments)}const Xn=e=>s.createElement("svg",Yn({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),Gn||(Gn=s.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M11.458 0v24"})),Wn||(Wn=s.createElement("path",{fill:"none",stroke:"#EE2A53",strokeMiterlimit:10,d:"M3.021 6.458h8.5M3.021 17.542h8.5M11.458 11.563h8.501"})));(0,t.registerBlockType)("qi-blocks/timeline",{icon:wp.element.createElement(Xn,null),title:(0,e.__)("Timeline Showcase","qi-blocks"),description:(0,e.__)("A simple and intuitive way to display visually appealing chronological lists of events.","qi-blocks"),category:"qi-blocks",keywords:[(0,e.__)("timeline","qi-blocks"),(0,e.__)("showcase","qi-blocks"),(0,e.__)("chronology","qi-blocks"),(0,e.__)("horizontal","qi-blocks"),(0,e.__)("vertical","qi-blocks"),(0,e.__)("step by step","qi-blocks"),(0,e.__)("qi","qi-blocks")],attributes:Ue,example:Nn,edit:Cn,save:Pn})})()})();