?AlkantarClanX12
| Current Path : /home/rankinh/villavanille/wp-content/plugins/qi-blocks/assets/dist/ |
| Current File : /home/rankinh/villavanille/wp-content/plugins/qi-blocks/assets/dist/single-image.js |
(()=>{var e={4300:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:l,getPrototypeOf:a,getOwnPropertyDescriptor:n}=Object;let{freeze:o,seal:r,create:i}=Object,{apply:s,construct:c}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),r||(r=function(e){return e}),s||(s=function(e,t,l){return e.apply(t,l)}),c||(c=function(e,t){return new e(...t)});const u=y(Array.prototype.forEach),m=y(Array.prototype.pop),p=y(Array.prototype.push),b=y(String.prototype.toLowerCase),d=y(String.prototype.toString),g=y(String.prototype.match),f=y(String.prototype.replace),h=y(String.prototype.indexOf),k=y(String.prototype.trim),_=y(RegExp.prototype.test),v=w(TypeError);function y(e){return function(t){for(var l=arguments.length,a=new Array(l>1?l-1:0),n=1;n<l;n++)a[n-1]=arguments[n];return s(e,t,a)}}function w(e){return function(){for(var t=arguments.length,l=new Array(t),a=0;a<t;a++)l[a]=arguments[a];return c(e,l)}}function A(e,a){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;t&&t(e,null);let o=a.length;for(;o--;){let t=a[o];if("string"==typeof t){const e=n(t);e!==t&&(l(a)||(a[o]=e),t=e)}e[t]=!0}return e}function S(e){for(let t=0;t<e.length;t++)void 0===n(e,t)&&(e[t]=null);return e}function q(t){const l=i(null);for(const[a,o]of e(t))void 0!==n(t,a)&&(Array.isArray(o)?l[a]=S(o):o&&"object"==typeof o&&o.constructor===Object?l[a]=q(o):l[a]=o);return l}function I(e,t){for(;null!==e;){const l=n(e,t);if(l){if(l.get)return y(l.get);if("function"==typeof l.value)return y(l.value)}e=a(e)}function l(e){return console.warn("fallback value for",e),null}return l}const x=o(["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=o(["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=o(["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=o(["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"]),N=o(["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"]),B=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=o(["#text"]),V=o(["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"]),O=o(["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"]),D=o(["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"]),R=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),L=r(/\{\{[\w\W]*|[\w\W]*\}\}/gm),M=r(/<%[\w\W]*|[\w\W]*%>/gm),z=r(/\${[\w\W]*}/gm),U=r(/^data-[\-\w.\u00B7-\uFFFF]/),j=r(/^aria-[\-\w]+$/),F=r(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=r(/^(?:\w+script|data):/i),H=r(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=r(/^html$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:L,ERB_EXPR:M,TMPLIT_EXPR:z,DATA_ATTR:U,ARIA_ATTR:j,IS_ALLOWED_URI:F,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:H,DOCTYPE_NAME:G});const $=function(){return"undefined"==typeof window?null:window},Y=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let l=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(l=t.getAttribute(a));const n="dompurify"+(l?"#"+l:"");try{return e.createPolicy(n,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+n+" could not be created."),null}};function X(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$();const l=e=>X(e);if(l.version="3.0.8",l.removed=[],!t||!t.document||9!==t.document.nodeType)return l.isSupported=!1,l;let{document:a}=t;const n=a,r=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:y,Element:w,NodeFilter:S,NamedNodeMap:L=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:M,DOMParser:z,trustedTypes:U}=t,j=w.prototype,K=I(j,"cloneNode"),H=I(j,"nextSibling"),Z=I(j,"childNodes"),J=I(j,"parentNode");if("function"==typeof c){const e=a.createElement("template");e.content&&e.content.ownerDocument&&(a=e.content.ownerDocument)}let Q,ee="";const{implementation:te,createNodeIterator:le,createDocumentFragment:ae,getElementsByTagName:ne}=a,{importNode:oe}=n;let re={};l.isSupported="function"==typeof e&&"function"==typeof J&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ie,ERB_EXPR:se,TMPLIT_EXPR:ce,DATA_ATTR:ue,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:pe,ATTR_WHITESPACE:be}=W;let{IS_ALLOWED_URI:de}=W,ge=null;const fe=A({},[...x,...E,...C,...N,...P]);let he=null;const ke=A({},[...V,...O,...D,...R]);let _e=Object.seal(i(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,ye=null,we=!0,Ae=!0,Se=!1,qe=!0,Ie=!1,xe=!1,Ee=!1,Ce=!1,Te=!1,Ne=!1,Be=!1,Pe=!0,Ve=!1;const Oe="user-content-";let De=!0,Re=!1,Le={},Me=null;const ze=A({},["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 Ue=null;const je=A({},["audio","video","img","source","image","track"]);let Fe=null;const Ke=A({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let $e=We,Ye=!1,Xe=null;const Ze=A({},[He,Ge,We],d);let Je=null;const Qe=["application/xhtml+xml","text/html"],et="text/html";let tt=null,lt=null;const at=a.createElement("form"),nt=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!lt||lt!==e){if(e&&"object"==typeof e||(e={}),e=q(e),Je=-1===Qe.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Je?d:b,ge="ALLOWED_TAGS"in e?A({},e.ALLOWED_TAGS,tt):fe,he="ALLOWED_ATTR"in e?A({},e.ALLOWED_ATTR,tt):ke,Xe="ALLOWED_NAMESPACES"in e?A({},e.ALLOWED_NAMESPACES,d):Ze,Fe="ADD_URI_SAFE_ATTR"in e?A(q(Ke),e.ADD_URI_SAFE_ATTR,tt):Ke,Ue="ADD_DATA_URI_TAGS"in e?A(q(je),e.ADD_DATA_URI_TAGS,tt):je,Me="FORBID_CONTENTS"in e?A({},e.FORBID_CONTENTS,tt):ze,ve="FORBID_TAGS"in e?A({},e.FORBID_TAGS,tt):{},ye="FORBID_ATTR"in e?A({},e.FORBID_ATTR,tt):{},Le="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,Se=e.ALLOW_UNKNOWN_PROTOCOLS||!1,qe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,xe=e.WHOLE_DOCUMENT||!1,Te=e.RETURN_DOM||!1,Ne=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,Ce=e.FORCE_BODY||!1,Pe=!1!==e.SANITIZE_DOM,Ve=e.SANITIZE_NAMED_PROPS||!1,De=!1!==e.KEEP_CONTENT,Re=e.IN_PLACE||!1,de=e.ALLOWED_URI_REGEXP||F,$e=e.NAMESPACE||We,_e=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&nt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&nt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_e.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Ae=!1),Ne&&(Te=!0),Le&&(ge=A({},P),he=[],!0===Le.html&&(A(ge,x),A(he,V)),!0===Le.svg&&(A(ge,E),A(he,O),A(he,R)),!0===Le.svgFilters&&(A(ge,C),A(he,O),A(he,R)),!0===Le.mathMl&&(A(ge,N),A(he,D),A(he,R))),e.ADD_TAGS&&(ge===fe&&(ge=q(ge)),A(ge,e.ADD_TAGS,tt)),e.ADD_ATTR&&(he===ke&&(he=q(he)),A(he,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&A(Fe,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Me===ze&&(Me=q(Me)),A(Me,e.FORBID_CONTENTS,tt)),De&&(ge["#text"]=!0),xe&&A(ge,["html","head","body"]),ge.table&&(A(ge,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw v('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Q=e.TRUSTED_TYPES_POLICY,ee=Q.createHTML("")}else void 0===Q&&(Q=Y(U,r)),null!==Q&&"string"==typeof ee&&(ee=Q.createHTML(""));o&&o(e),lt=e}},rt=A({},["mi","mo","mn","ms","mtext"]),it=A({},["foreignobject","desc","title","annotation-xml"]),st=A({},["title","style","font","a","script"]),ct=A({},[...E,...C,...T]),ut=A({},[...N,...B]),mt=function(e){let t=J(e);t&&t.tagName||(t={namespaceURI:$e,tagName:"template"});const l=b(e.tagName),a=b(t.tagName);return!!Xe[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===We?"svg"===l:t.namespaceURI===He?"svg"===l&&("annotation-xml"===a||rt[a]):Boolean(ct[l]):e.namespaceURI===He?t.namespaceURI===We?"math"===l:t.namespaceURI===Ge?"math"===l&&it[a]:Boolean(ut[l]):e.namespaceURI===We?!(t.namespaceURI===Ge&&!it[a])&&!(t.namespaceURI===He&&!rt[a])&&!ut[l]&&(st[l]||!ct[l]):!("application/xhtml+xml"!==Je||!Xe[e.namespaceURI]))},pt=function(e){p(l.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},bt=function(e,t){try{p(l.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(l.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!he[e])if(Te||Ne)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,l=null;if(Ce)e="<remove></remove>"+e;else{const t=g(e,/^[\r\n\t ]+/);l=t&&t[0]}"application/xhtml+xml"===Je&&$e===We&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const n=Q?Q.createHTML(e):e;if($e===We)try{t=(new z).parseFromString(n,Je)}catch(e){}if(!t||!t.documentElement){t=te.createDocument($e,"template",null);try{t.documentElement.innerHTML=Ye?ee:n}catch(e){}}const o=t.body||t.documentElement;return e&&l&&o.insertBefore(a.createTextNode(l),o.childNodes[0]||null),$e===We?ne.call(t,xe?"html":"body")[0]:xe?t.documentElement:o},gt=function(e){return le.call(e.ownerDocument||e,e,S.SHOW_ELEMENT|S.SHOW_COMMENT|S.SHOW_TEXT,null)},ft=function(e){return e instanceof M&&("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 y&&e instanceof y},kt=function(e,t,a){re[e]&&u(re[e],(e=>{e.call(l,t,a,lt)}))},_t=function(e){let t=null;if(kt("beforeSanitizeElements",e,null),ft(e))return pt(e),!0;const a=tt(e.nodeName);if(kt("uponSanitizeElement",e,{tagName:a,allowedTags:ge}),e.hasChildNodes()&&!ht(e.firstElementChild)&&_(/<[/\w]/g,e.innerHTML)&&_(/<[/\w]/g,e.textContent))return pt(e),!0;if(!ge[a]||ve[a]){if(!ve[a]&&yt(a)){if(_e.tagNameCheck instanceof RegExp&&_(_e.tagNameCheck,a))return!1;if(_e.tagNameCheck instanceof Function&&_e.tagNameCheck(a))return!1}if(De&&!Me[a]){const t=J(e)||e.parentNode,l=Z(e)||e.childNodes;if(l&&t)for(let a=l.length-1;a>=0;--a)t.insertBefore(K(l[a],!0),H(e))}return pt(e),!0}return e instanceof w&&!mt(e)?(pt(e),!0):"noscript"!==a&&"noembed"!==a&&"noframes"!==a||!_(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&3===e.nodeType&&(t=e.textContent,u([ie,se,ce],(e=>{t=f(t,e," ")})),e.textContent!==t&&(p(l.removed,{element:e.cloneNode()}),e.textContent=t)),kt("afterSanitizeElements",e,null),!1):(pt(e),!0)},vt=function(e,t,l){if(Pe&&("id"===t||"name"===t)&&(l in a||l in at))return!1;if(Ae&&!ye[t]&&_(ue,t));else if(we&&_(me,t));else if(!he[t]||ye[t]){if(!(yt(e)&&(_e.tagNameCheck instanceof RegExp&&_(_e.tagNameCheck,e)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(e))&&(_e.attributeNameCheck instanceof RegExp&&_(_e.attributeNameCheck,t)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(t))||"is"===t&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&_(_e.tagNameCheck,l)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(l))))return!1}else if(Fe[t]);else if(_(de,f(l,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==h(l,"data:")||!Ue[e])if(Se&&!_(pe,f(l,be,"")));else if(l)return!1;return!0},yt=function(e){return e.indexOf("-")>0},wt=function(e){kt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:he};let n=t.length;for(;n--;){const o=t[n],{name:r,namespaceURI:i,value:s}=o,c=tt(r);let p="value"===r?s:k(s);if(a.attrName=c,a.attrValue=p,a.keepAttr=!0,a.forceKeepAttr=void 0,kt("uponSanitizeAttribute",e,a),p=a.attrValue,a.forceKeepAttr)continue;if(bt(r,e),!a.keepAttr)continue;if(!qe&&_(/\/>/i,p)){bt(r,e);continue}Ie&&u([ie,se,ce],(e=>{p=f(p,e," ")}));const b=tt(e.nodeName);if(vt(b,c,p)){if(!Ve||"id"!==c&&"name"!==c||(bt(r,e),p=Oe+p),Q&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(i);else switch(U.getAttributeType(b,c)){case"TrustedHTML":p=Q.createHTML(p);break;case"TrustedScriptURL":p=Q.createScriptURL(p)}try{i?e.setAttributeNS(i,r,p):e.setAttribute(r,p),m(l.removed)}catch(e){}}}kt("afterSanitizeAttributes",e,null)},At=function e(t){let l=null;const a=gt(t);for(kt("beforeSanitizeShadowDOM",t,null);l=a.nextNode();)kt("uponSanitizeShadowNode",l,null),_t(l)||(l.content instanceof s&&e(l.content),wt(l));kt("afterSanitizeShadowDOM",t,null)};return l.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null,o=null,r=null,i=null;if(Ye=!e,Ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ht(e)){if("function"!=typeof e.toString)throw v("toString is not a function");if("string"!=typeof(e=e.toString()))throw v("dirty is not a string, aborting")}if(!l.isSupported)return e;if(Ee||ot(t),l.removed=[],"string"==typeof e&&(Re=!1),Re){if(e.nodeName){const t=tt(e.nodeName);if(!ge[t]||ve[t])throw v("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof y)a=dt("\x3c!----\x3e"),o=a.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?a=o:a.appendChild(o);else{if(!Te&&!Ie&&!xe&&-1===e.indexOf("<"))return Q&&Be?Q.createHTML(e):e;if(a=dt(e),!a)return Te?null:Be?ee:""}a&&Ce&&pt(a.firstChild);const c=gt(Re?e:a);for(;r=c.nextNode();)_t(r)||(r.content instanceof s&&At(r.content),wt(r));if(Re)return e;if(Te){if(Ne)for(i=ae.call(a.ownerDocument);a.firstChild;)i.appendChild(a.firstChild);else i=a;return(he.shadowroot||he.shadowrootmode)&&(i=oe.call(n,i,!0)),i}let m=xe?a.outerHTML:a.innerHTML;return xe&&ge["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&_(G,a.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+m),Ie&&u([ie,se,ce],(e=>{m=f(m,e," ")})),Q&&Be?Q.createHTML(m):m},l.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ee=!0},l.clearConfig=function(){lt=null,Ee=!1},l.isValidAttribute=function(e,t,l){lt||ot({});const a=tt(e),n=tt(t);return vt(a,n,l)},l.addHook=function(e,t){"function"==typeof t&&(re[e]=re[e]||[],p(re[e],t))},l.removeHook=function(e){if(re[e])return m(re[e])},l.removeHooks=function(e){re[e]&&(re[e]=[])},l.removeAllHooks=function(){re={}},l}return X()}()},6152:(e,t,l)=>{var a=l(2488);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return a(e)?e:[e]}},520:(e,t,l)=>{var a=l(5968),n=l(3740),o=l(4996),r=l(2600),i=l(7336);function s(e){var t=-1,l=null==e?0:e.length;for(this.clear();++t<l;){var a=e[t];this.set(a[0],a[1])}}s.prototype.clear=a,s.prototype.delete=n,s.prototype.get=o,s.prototype.has=r,s.prototype.set=i,e.exports=s},9704:(e,t,l)=>{var a=l(7188).Uint8Array;e.exports=a},2253:e=>{e.exports=function(e,t,l){switch(l.length){case 0:return e.call(t);case 1:return e.call(t,l[0]);case 2:return e.call(t,l[0],l[1]);case 3:return e.call(t,l[0],l[1],l[2])}return e.apply(t,l)}},7748:e=>{e.exports=function(e,t,l,a){var n=-1,o=null==e?0:e.length;for(a&&o&&(l=e[++n]);++n<o;)l=t(l,e[n],n,e);return l}},5600:e=>{e.exports=function(e,t){for(var l=-1,a=null==e?0:e.length;++l<a;)if(t(e[l],l,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,l)=>{var a=l(6139),n=l(864);e.exports=function(e,t,l){(void 0!==l&&!n(e[t],l)||void 0===l&&!(t in e))&&a(e,t,l)}},8288:(e,t,l)=>{var a=l(6139),n=l(864),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,l){var r=e[t];o.call(e,t)&&n(r,l)&&(void 0!==l||t in e)||a(e,t,l)}},6600:(e,t,l)=>{var a=l(864);e.exports=function(e,t){for(var l=e.length;l--;)if(a(e[l][0],t))return l;return-1}},6139:(e,t,l)=>{var a=l(7792);e.exports=function(e,t,l){"__proto__"==t&&a?a(e,t,{configurable:!0,enumerable:!0,value:l,writable:!0}):e[t]=l}},2471:(e,t,l)=>{var a=l(8940),n=Object.create,o=function(){function e(){}return function(t){if(!a(t))return{};if(n)return n(t);e.prototype=t;var l=new e;return e.prototype=void 0,l}}();e.exports=o},4596:(e,t,l)=>{var a=l(8168)();e.exports=a},6944:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3992:e=>{e.exports=function(e,t,l){for(var a=l-1,n=e.length;++a<n;)if(e[a]===t)return a;return-1}},9184:(e,t,l)=>{var a=l(4840),n=l(2892);e.exports=function e(t,l,o,r,i){return t===l||(null==t||null==l||!n(t)&&!n(l)?t!=t&&l!=l:a(t,l,o,r,e,i))}},4840:(e,t,l)=>{var a=l(520),n=l(9124),o=l(2352),r=l(8608),i=l(3871),s=l(2488),c=l(7684),u=l(6700),m="[object Arguments]",p="[object Array]",b="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,l,g,f,h){var k=s(e),_=s(t),v=k?p:i(e),y=_?p:i(t),w=(v=v==m?b:v)==b,A=(y=y==m?b:y)==b,S=v==y;if(S&&c(e)){if(!c(t))return!1;k=!0,w=!1}if(S&&!w)return h||(h=new a),k||u(e)?n(e,t,l,g,f,h):o(e,t,v,l,g,f,h);if(!(1&l)){var q=w&&d.call(e,"__wrapped__"),I=A&&d.call(t,"__wrapped__");if(q||I){var x=q?e.value():e,E=I?t.value():t;return h||(h=new a),f(x,E,l,g,h)}}return!!S&&(h||(h=new a),r(e,t,l,g,f,h))}},660:(e,t,l)=>{var a=l(520),n=l(9200),o=l(4596),r=l(7132),i=l(8940),s=l(2756),c=l(7972);e.exports=function e(t,l,u,m,p){t!==l&&o(l,(function(o,s){if(p||(p=new a),i(o))r(t,l,s,u,e,m,p);else{var b=m?m(c(t,s),o,s+"",t,l,p):void 0;void 0===b&&(b=o),n(t,s,b)}}),s)}},7132:(e,t,l)=>{var a=l(9200),n=l(1328),o=l(2100),r=l(8416),i=l(6224),s=l(348),c=l(2488),u=l(2480),m=l(7684),p=l(7920),b=l(8940),d=l(2688),g=l(6700),f=l(7972),h=l(1824);e.exports=function(e,t,l,k,_,v,y){var w=f(e,l),A=f(t,l),S=y.get(A);if(S)a(e,l,S);else{var q=v?v(w,A,l+"",e,t,y):void 0,I=void 0===q;if(I){var x=c(A),E=!x&&m(A),C=!x&&!E&&g(A);q=A,x||E||C?c(w)?q=w:u(w)?q=r(w):E?(I=!1,q=n(A,!0)):C?(I=!1,q=o(A,!0)):q=[]:d(A)||s(A)?(q=w,s(w)?q=h(w):b(w)&&!p(w)||(q=i(A))):I=!1}I&&(y.set(A,q),_(q,A,k,v,y),y.delete(A)),a(e,l,q)}}},8292:(e,t,l)=>{var a=l(552),n=l(8840),o=l(7360);e.exports=function(e,t){return o(n(e,t,a),e+"")}},4732:e=>{e.exports=function(e,t,l){var a=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(l=l>n?n:l)<0&&(l+=n),n=t>l?0:l-t>>>0,t>>>=0;for(var o=Array(n);++a<n;)o[a]=e[a+t];return o}},6524:e=>{e.exports=function(e){return e}},968:(e,t,l)=>{var a=l(3992);e.exports=function(e,t){return!!(null==e?0:e.length)&&a(e,t,0)>-1}},7320:(e,t,l)=>{var a=l(4732);e.exports=function(e,t,l){var n=e.length;return l=void 0===l?n:l,!t&&l>=n?e:a(e,t,l)}},5987:(e,t,l)=>{var a=l(9704);e.exports=function(e){var t=new e.constructor(e.byteLength);return new a(t).set(new a(e)),t}},1328:(e,t,l)=>{e=l.nmd(e);var a=l(7188),n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,r=o&&o.exports===n?a.Buffer:void 0,i=r?r.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var l=e.length,a=i?i(l):new e.constructor(l);return e.copy(a),a}},2100:(e,t,l)=>{var a=l(5987);e.exports=function(e,t){var l=t?a(e.buffer):e.buffer;return new e.constructor(l,e.byteOffset,e.length)}},8416:e=>{e.exports=function(e,t){var l=-1,a=e.length;for(t||(t=Array(a));++l<a;)t[l]=e[l];return t}},7612:(e,t,l)=>{var a=l(8288),n=l(6139);e.exports=function(e,t,l,o){var r=!l;l||(l={});for(var i=-1,s=t.length;++i<s;){var c=t[i],u=o?o(l[c],e[c],c,l,e):void 0;void 0===u&&(u=e[c]),r?n(l,c,u):a(l,c,u)}return l}},764:(e,t,l)=>{var a=l(8292),n=l(4221);e.exports=function(e){return a((function(t,l){var a=-1,o=l.length,r=o>1?l[o-1]:void 0,i=o>2?l[2]:void 0;for(r=e.length>3&&"function"==typeof r?(o--,r):void 0,i&&n(l[0],l[1],i)&&(r=o<3?void 0:r,o=1),t=Object(t);++a<o;){var s=l[a];s&&e(t,s,a,r)}return t}))}},8168:e=>{e.exports=function(e){return function(t,l,a){for(var n=-1,o=Object(t),r=a(t),i=r.length;i--;){var s=r[e?i:++n];if(!1===l(o[s],s,o))break}return t}}},7288:(e,t,l)=>{var a=l(7320),n=l(9240),o=l(8595),r=l(1972);e.exports=function(e){return function(t){t=r(t);var l=n(t)?o(t):void 0,i=l?l[0]:t.charAt(0),s=l?a(l,1).join(""):t.slice(1);return i[e]()+s}}},184:(e,t,l)=>{var a=l(7748),n=l(5928),o=l(2996),r=RegExp("['’]","g");e.exports=function(e){return function(t){return a(o(n(t).replace(r,"")),e,"")}}},7792:(e,t,l)=>{var a=l(7892),n=function(){try{var e=a(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=n},9124:(e,t,l)=>{var a=l(6152),n=l(5600),o=l(968);e.exports=function(e,t,l,r,i,s){var c=1&l,u=e.length,m=t.length;if(u!=m&&!(c&&m>u))return!1;var p=s.get(e),b=s.get(t);if(p&&b)return p==t&&b==e;var d=-1,g=!0,f=2&l?new a:void 0;for(s.set(e,t),s.set(t,e);++d<u;){var h=e[d],k=t[d];if(r)var _=c?r(k,h,d,t,e,s):r(h,k,d,e,t,s);if(void 0!==_){if(_)continue;g=!1;break}if(f){if(!n(t,(function(e,t){if(!o(f,t)&&(h===e||i(h,e,l,r,s)))return f.push(t)}))){g=!1;break}}else if(h!==k&&!i(h,k,l,r,s)){g=!1;break}}return s.delete(e),s.delete(t),g}},2352:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},8608:(e,t,l)=>{var a=l(1096),n=Object.prototype.hasOwnProperty;e.exports=function(e,t,l,o,r,i){var s=1&l,c=a(e),u=c.length;if(u!=a(t).length&&!s)return!1;for(var m=u;m--;){var p=c[m];if(!(s?p in t:n.call(t,p)))return!1}var b=i.get(e),d=i.get(t);if(b&&d)return b==t&&d==e;var g=!0;i.set(e,t),i.set(t,e);for(var f=s;++m<u;){var h=e[p=c[m]],k=t[p];if(o)var _=s?o(k,h,p,t,e,i):o(h,k,p,e,t,i);if(!(void 0===_?h===k||r(h,k,l,o,i):_)){g=!1;break}f||(f="constructor"==p)}if(g&&!f){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(g=!1)}return i.delete(e),i.delete(t),g}},4848:(e,t,l)=>{var a="object"==typeof l.g&&l.g&&l.g.Object===Object&&l.g;e.exports=a},1096:(e,t,l)=>{var a=l(1304)(Object.keys,Object);e.exports=a},7892:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},476:(e,t,l)=>{var a=l(1304)(Object.getPrototypeOf,Object);e.exports=a},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,l)=>{var a=l(2471),n=l(476),o=l(1004);e.exports=function(e){return"function"!=typeof e.constructor||o(e)?{}:a(n(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,l)=>{var a=l(6600),n=Array.prototype.splice;e.exports=function(e){var t=this.__data__,l=a(t,e);return!(l<0)&&(l==t.length-1?t.pop():n.call(t,l,1),--this.size,!0)}},4996:(e,t,l)=>{var a=l(6600);e.exports=function(e){var t=this.__data__,l=a(t,e);return l<0?void 0:t[l][1]}},2600:(e,t,l)=>{var a=l(6600);e.exports=function(e){return a(this.__data__,e)>-1}},7336:(e,t,l)=>{var a=l(6600);e.exports=function(e,t){var l=this.__data__,n=a(l,e);return n<0?(++this.size,l.push([e,t])):l[n][1]=t,this}},1304:e=>{e.exports=function(e,t){return function(l){return e(t(l))}}},8840:(e,t,l)=>{var a=l(2253),n=Math.max;e.exports=function(e,t,l){return t=n(void 0===t?e.length-1:t,0),function(){for(var o=arguments,r=-1,i=n(o.length-t,0),s=Array(i);++r<i;)s[r]=o[t+r];r=-1;for(var c=Array(t+1);++r<t;)c[r]=o[r];return c[t]=l(s),a(e,this,c)}}},7188:(e,t,l)=>{var a=l(4848),n="object"==typeof self&&self&&self.Object===Object&&self,o=a||n||Function("return this")();e.exports=o},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,l)=>{var a=l(1120),n=l(9240),o=l(6448);e.exports=function(e){return n(e)?o(e):a(e)}},6448:e=>{var t="\\ud800-\\udfff",l="["+t+"]",a="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",r="(?:\\ud83c[\\udde6-\\uddff]){2}",i="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+a+"|"+n+")"+"?",c="[\\ufe0e\\ufe0f]?",u=c+s+("(?:\\u200d(?:"+[o,r,i].join("|")+")"+c+s+")*"),m="(?:"+[o+a+"?",a,r,i,l].join("|")+")",p=RegExp(n+"(?="+n+")|"+m+u,"g");e.exports=function(e){return e.match(p)||[]}},2744:e=>{var t="\\ud800-\\udfff",l="\\u2700-\\u27bf",a="a-z\\xdf-\\xf6\\xf8-\\xff",n="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\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",r="["+o+"]",i="\\d+",s="["+l+"]",c="["+a+"]",u="[^"+t+o+i+l+a+n+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",b="["+n+"]",d="(?:"+c+"|"+u+")",g="(?:"+b+"|"+u+")",f="(?:['’](?:d|ll|m|re|s|t|ve))?",h="(?:['’](?:D|LL|M|RE|S|T|VE))?",k="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_="[\\ufe0e\\ufe0f]?",v=_+k+("(?:\\u200d(?:"+["[^"+t+"]",m,p].join("|")+")"+_+k+")*"),y="(?:"+[s,m,p].join("|")+")"+v,w=RegExp([b+"?"+c+"+"+f+"(?="+[r,b,"$"].join("|")+")",g+"+"+h+"(?="+[r,b+d,"$"].join("|")+")",b+"?"+d+"+"+f,b+"+"+h,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,y].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},5144:(e,t,l)=>{var a=l(1912),n=l(184)((function(e,t,l){return t=t.toLowerCase(),e+(l?a(t):t)}));e.exports=n},1912:(e,t,l)=>{var a=l(1972),n=l(4704);e.exports=function(e){return n(a(e).toLowerCase())}},5928:(e,t,l)=>{var a=l(6524);e.exports=function(e){return null==e?"":a(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,l)=>{var a=l(7920),n=l(9024);e.exports=function(e){return null!=e&&n(e.length)&&!a(e)}},2480:(e,t,l)=>{var a=l(4900),n=l(2892);e.exports=function(e){return n(e)&&a(e)}},7684:e=>{e.exports=function(){return!1}},948:(e,t,l)=>{var a=l(9184);e.exports=function(e,t){return a(e,t)}},7920:(e,t,l)=>{var a=l(6944),n=l(8940);e.exports=function(e){if(!n(e))return!1;var t=a(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,l)=>{var a=l(6944),n=l(476),o=l(2892),r=Function.prototype,i=Object.prototype,s=r.toString,c=i.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=a(e))return!1;var t=n(e);if(null===t)return!0;var l=c.call(t,"constructor")&&t.constructor;return"function"==typeof l&&l instanceof l&&s.call(l)==u}},6700:e=>{e.exports=function(){return!1}},2756:e=>{e.exports=function(e){var t=[];if(null!=e)for(var l in Object(e))t.push(l);return t}},7060:(e,t,l)=>{var a=l(660),n=l(764)((function(e,t,l){a(e,t,l)}));e.exports=n},1824:(e,t,l)=>{var a=l(7612),n=l(2756);e.exports=function(e){return a(e,n(e))}},1972:e=>{e.exports=function(e){return e}},4704:(e,t,l)=>{var a=l(7288)("toUpperCase");e.exports=a},2996:(e,t,l)=>{var a=l(2628),n=l(4360),o=l(1972),r=l(2744);e.exports=function(e,t,l){return e=o(e),void 0===(t=l?void 0:t)?n(e)?r(e):a(e):e.match(t)||[]}},3028:(e,t)=>{"use strict";var l=Symbol.for("react.element"),a=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.iterator;var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,f={};function h(e,t,l){this.props=e,this.context=t,this.refs=f,this.updater=l||d}function k(){}function _(e,t,l){this.props=e,this.context=t,this.refs=f,this.updater=l||d}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")},k.prototype=h.prototype;var v=_.prototype=new k;v.constructor=_,g(v,h.prototype),v.isPureReactComponent=!0;var y=Array.isArray,w=Object.prototype.hasOwnProperty,A={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function q(e,t,a){var n,o={},r=null,i=null;if(null!=t)for(n in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(r=""+t.key),t)w.call(t,n)&&!S.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(1===s)o.children=a;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(n in s=e.defaultProps)void 0===o[n]&&(o[n]=s[n]);return{$$typeof:l,type:e,key:r,ref:i,props:o,_owner:A.current}}function I(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}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,n,o,r){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case l:case a:s=!0}}if(s)return r=r(s=e),e=""===o?"."+E(s,0):o,y(r)?(n="",null!=e&&(n=e.replace(x,"$&/")+"/"),C(r,t,n,"",(function(e){return e}))):null!=r&&(I(r)&&(r=function(e,t){return{$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(r,n+(!r.key||s&&s.key===r.key?"":(""+r.key).replace(x,"$&/")+"/")+e)),t.push(r)),1;if(s=0,o=""===o?".":o+":",y(e))for(var c=0;c<e.length;c++){var u=o+E(i=e[c],c);s+=C(i,t,n,u,r)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=b&&e[b]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(i=e.next()).done;)s+=C(i=i.value,t,n,u=o+E(i,c++),r);else if("object"===i)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function T(e,t,l){if(null==e)return e;var a=[],n=0;return C(e,a,"","",(function(e){return t.call(l,e,n++)})),a}function N(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 B={current:null},P={transition:null};t.createElement=q},1504:(e,t,l)=>{"use strict";e.exports=l(3028)},2084:(e,t)=>{var l;!function(){"use strict";var a={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=r(e,o(l)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)a.call(e,l)&&e[l]&&(t=r(t,l));return t}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):void 0===(l=function(){return n}.apply(t,[]))||(e.exports=l)}()}},t={};function l(a){var n=t[a];if(void 0!==n)return n.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,l),o.loaded=!0,o.exports}l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e=wp.i18n,t=wp.blocks;var a=l(5144),n=l.n(a);const o=wp.hooks,r=wp.data;var i,s=l(1504);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}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),i||(i=s.createElement("path",{d:"M13 18h2c.6 0 1 .4 1 1s-.4 1-1 1H9c-.6 0-1-.4-1-1s.4-1 1-1h2v-2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-7zM4 6v8h16V6z"})));var m;function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},p.apply(this,arguments)}const b=e=>s.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),m||(m=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 d;function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},g.apply(this,arguments)}const f=e=>s.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),d||(d=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",k={desktop:{label:(0,e.__)("Desktop","qi-blocks"),icon:wp.element.createElement(u,null)},tablet:{label:(0,e.__)("Tablet","qi-blocks"),icon:wp.element.createElement(b,null)},mobile:{label:(0,e.__)("Mobile","qi-blocks"),icon:wp.element.createElement(f,null)}};let _=h;const v=()=>_,y=wp.components,w=e=>{const t={...e},{blockAttributeKey:l,blockAttributes:a,setAttributes:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:s,repeaterGetAttributes:c}=t;return t.getAttributeValue=()=>{let e=a[l];return o&&(e=c(i,r)),e||!1},t.setAttributeValue=e=>{o?s(i,e,r):n({[l]:e})},wp.element.createElement("div",{className:"qodef-on-off-option"},wp.element.createElement(y.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 A=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"}],q=e=>{const t={...e},{label:l,description:a,blockAttributeKeys:n,blockAttributes:o,setAttributes:r}=t;return wp.element.createElement("div",{className:"qodef-visibility-group-option"},l&&wp.element.createElement("label",{className:"qodef-option-label"},l),a&&wp.element.createElement("p",{className:"qodef-option-description"},a),n.map((e=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(A,{label:e.label,blockAttributeKey:e.blockAttributeKey,blockAttributes:o,setAttributes:r})))))};q.defaultProps={label:(0,e.__)("Visibility","qi-blocks"),description:(0,e.__)("Responsive visibility will take effect only on preview or live page, and not while editing in Gutenberg.","qi-blocks"),blockAttributeKeys:S,blockAttributes:{},setAttributes:()=>{}};const I=(e,t="")=>{const l=e=>B(t,e),a=[];return e[l("cssClasses")]&&a.push(e[l("cssClasses")]),void 0!==e[l("EntranceAnimation")]&&""!==e[l("EntranceAnimation")]&&(a.push("qodef-entrance-animation--on"),e[l("EntranceAnimationDuration")]&&a.push("qodef-animation-speed--"+e[l("EntranceAnimationDuration")])),e[l("BlockWidth")]&&a.push("qodef-width--"+e[l("BlockWidth")]),e[l("BlockWidthTablet")]&&a.push("qodef-width--tablet--"+e[l("BlockWidthTablet")]),e[l("BlockWidthMobile")]&&a.push("qodef-width--mobile--"+e[l("BlockWidthMobile")]),a.push((e=>{const t=[];return S.map((l=>{const a="qodef-hide-on--"+l.classSuffix,n=e[l.blockAttributeKey];t.includes(a)&&!n?t.filter((function(e){return e!==a})):!t.includes(a)&&n&&t.push(a)})),t.join(" ")})(e)),a.join(" ")},x=(e,t="")=>{let l=["qodef-block-container"];return z(e.uniqueClass,"all")&&l.push(e.uniqueClass),l.push(I(e,t)),l.join(" ")},E=(e,t="")=>{let l={};const a=((e,t="")=>{const l=(e,l="")=>B(t,e,l),a={};return void 0!==e[l("EntranceAnimation")]&&""!==e[l("EntranceAnimation")]&&(a["data-animation"]=e[l("EntranceAnimation")]),"custom"!==e[l("BlockWidth")]&&"custom"!==e[l("BlockWidthTablet")]&&"custom"!==e[l("BlockWidthMobile")]||["","Tablet","Mobile"].forEach((t=>{const n=e[l("BlockCustomWidth",t)],o=e[l("BlockCustomWidthDecimal",t)],r=e[l("BlockCustomWidthUnit",t)];R(r)&&n?a["data-width"+(t?"-"+t.toLowerCase():"")]=parseInt(n,10)+r:L(r)&&o&&(a["data-width"+(t?"-"+t.toLowerCase():"")]=parseFloat(o)+r)})),a})(e,t);return a&&(l={...l,...a}),l},C=(e,t="",l=[])=>N(e,t,l),T=(e,t,l=[])=>{if(!e)return"";let a=[`qi-block-${e}`,"qodef-block","qodef-m"];return z(t.attributes.className,"all")&&a.push(t.attributes.className),l&&(a=[...a,...l]),a.join(" ")},N=(e,t="",l=[])=>{const a=e=>B(t,e);if(!e)return"";let n=[];return z(e[a("cssId")],"all")&&n.push(e[a("cssId")]),l&&(n=[...n,...l]),n.join(" ")},B=(t,l,a)=>(t=t||"",l=l||"",a=a||"",n()((0,e.sprintf)("%s%s%s",t,l,a))),P=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",V=e=>e&&h!==e?P(e):"",O=(e,t)=>{let l=e.desktop;return"mobile"===t&&(l={...l,...e.tablet}),{...l,...e[t]}},D=(e,t=!0)=>{let l="";return Object.entries(e).map((([e,a])=>{l+=`${e.replace(/([A-Z])/g,((e,t,l)=>(l>0?"-":"")+e.toLowerCase()))}: ${a} ${t?"!important":""};`})),l},R=e=>["px"].includes(e),L=e=>["em","rem","%","vw","vh"].includes(e),M=(e,t="integer")=>{let l="";return 0===e||"0"===e?l=0:e&&(l=parseInt(e,10),"decimal"===t&&(l=parseFloat(e))),l},z=(e,t="")=>{let l=void 0!==e&&""!==e;return"all"===t&&(l=void 0!==e&&e),l},U=e=>{let t="";return 0===e||"0"===e?t=0:e&&(t=e),t},j=(t,l=!0,a=[])=>{let n=[],r=[];if(t){switch(l&&(n=[{value:"",label:(0,e.__)("Default","qi-blocks")}]),t){case"no_yes":r=[{value:"no",label:(0,e.__)("No","qi-blocks")},{value:"yes",label:(0,e.__)("Yes","qi-blocks")}];break;case"yes_no":r=[{value:"yes",label:(0,e.__)("Yes","qi-blocks")},{value:"no",label:(0,e.__)("No","qi-blocks")}];break;case"link_target":r=[{value:"_self",label:(0,e.__)("Same Window","qi-blocks")},{value:"_blank",label:(0,e.__)("New Window","qi-blocks")}];break;case"column_gap":r=[{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":r=[{value:"predefined",label:(0,e.__)("Predefined","qi-blocks")},{value:"custom",label:(0,e.__)("Custom","qi-blocks")}];break;case"masonry_image_sizes":r=[{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":r=[{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":r=[{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":r=[{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":r=[{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":r=[{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":r=[{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":r=[{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":r=[{value:"scroll",label:(0,e.__)("Scroll","qi-blocks")},{value:"fixed",label:(0,e.__)("Fixed","qi-blocks")}];break;case"background_repeat":r=[{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":r=[{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":r=[{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":r=[{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":r=[{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":r=[{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":r=[{value:"random",label:(0,e.__)("Random","qi-blocks")},{value:"ms",label:(0,e.__)("Set ms","qi-blocks")}];break;case"responsive_screens":r=[{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":r=[{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":r=[{value:"desc",label:(0,e.__)("Descending","qi-blocks")},{value:"asc",label:(0,e.__)("Ascending","qi-blocks")}];break;case"border_style":r=[{value:"solid",label:(0,e.__)("Solid","qi-blocks")},{value:"dashed",label:(0,e.__)("Dashed","qi-blocks")},{value:"dotted",label:(0,e.__)("Dotted","qi-blocks")}]}n=[...n,...r],a&&(n=[...n,...a])}return(0,o.applyFilters)("qi-blocks-filter-options-pool",n)},F=(e,t="",l={cssProp:"",value:""})=>{const{attributes:a,blockAttrName:n,cssProp:o}=e,r=z(e,"all")&&void 0!==e.direction&&e.direction?P(e.direction):"",i=!!z(e,"all")&&(e.customUnitValue??!1);let s={},c={},u={};return Object.entries(k).map((([e])=>{let m=V(e),p="",b=n+r+m,d=n+r+"Decimal"+m,g=a[n+"Unit"+m];(z(a[b])||z(a[d]))&&(R(g)&&z(a[b])&&!i?p=M(a[b])+g:L(g)&&z(a[d])&&!i?p=M(a[d],"decimal")+g:""!==a[b]&&(p=a[b]));const f=e=>{let l=e;if(t.includes("%s")){const a=t.split("%s");l="",a.forEach(((t,n)=>{l+=t,n!==a.length-1&&(l+=e)}))}return l};if(p)switch(e){case"desktop":s[o]=t?f(p):p,l.cssProp&&l.value&&(s[l.cssProp]=l.value);break;case"tablet":c[o]=t?f(p):p,l.cssProp&&l.value&&(c[l.cssProp]=l.value);break;case"mobile":u[o]=t?f(p):p,l.cssProp&&l.value&&(u[l.cssProp]=l.value)}})),{desktop:s,tablet:c,mobile:u}},K=()=>({hideOnDesktop:{type:"boolean",default:!1},hideOnTablet:{type:"boolean",default:!1},hideOnMobile:{type:"boolean",default:!1}}),H=e=>{const{attrNameTemplate:t,attrName:l}=e,a=e=>B(t,l,e),n=!z(e,"all")||(e.allowUnitControl??!0),o=z(e,"all")&&e.disableDirections||[];let r={};return["Top","Right","Bottom","Left"].map((e=>{o.includes(e)||(r[a(e)]={type:"number",default:""},r[a(e+"Tablet")]={type:"number",default:""},r[a(e+"Mobile")]={type:"number",default:""},n&&(r[a(`${e}Decimal`)]={type:"number",default:""},r[a(`${e}DecimalTablet`)]={type:"number",default:""},r[a(`${e}DecimalMobile`)]={type:"number",default:""}))})),r[a("Unit")]={type:"string",default:"px"},r[a("UnitTablet")]={type:"string",default:"px"},r[a("UnitMobile")]={type:"string",default:"px"},r};H.defaultProps={attrNameTemplate:"",attrName:"",allowUnitControl:!0};const G=H,W=e=>{const{blockAttributeKey:t}=e,l=!!z(e,"all")&&(e.allowScreens??!1),a=!z(e,"all")||(e.allowUnits??!0),n=z(e,"all")&&e.optionType||"integer",o=z(e,"all")&&e.defaultValue||"",r="decimal"===n?o:"";let i={};return"integer"===n&&(i[t]={type:"number",default:o}),i[B(t,"Unit")]={type:"string",default:"px"},(a||"decimal"===n)&&(i[B(t,"Decimal")]={type:"number",default:r}),l&&(i[B(t,"Tablet")]={type:"number",default:""},i[B(t,"Mobile")]={type:"number",default:""},i[B(t,"UnitTablet")]={type:"string",default:"px"},i[B(t,"UnitMobile")]={type:"string",default:"px"},a&&(i[B(t,"DecimalTablet")]={type:"number",default:""},i[B(t,"DecimalMobile")]={type:"number",default:""})),i};W.defaultProps={allowScreens:!1,allowUnits:!0};const $=W,Y=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=z(e,"all")&&e.attrName||"Background",a=e=>B(t,l+e),n=$({blockAttributeKey:a("XPosition"),allowScreens:!0}),o=$({blockAttributeKey:a("YPosition"),allowScreens:!0}),r=$({blockAttributeKey:a("SizeWidth"),allowScreens:!0});return{[a("Image")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[a("ImageTablet")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[a("ImageMobile")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[a("Position")]:{type:"string",default:""},[a("PositionTablet")]:{type:"string",default:""},[a("PositionMobile")]:{type:"string",default:""},...n,...o,[a("Attachment")]:{type:"string",default:""},[a("Repeat")]:{type:"string",default:""},[a("RepeatTablet")]:{type:"string",default:""},[a("RepeatMobile")]:{type:"string",default:""},[a("Size")]:{type:"string",default:""},[a("SizeTablet")]:{type:"string",default:""},[a("SizeMobile")]:{type:"string",default:""},...r}};Y.defaultProps={attrNameTemplate:"",attrName:"Background"};const X=Y,Z=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=e=>B(t,e),a=!!z(e,"all")&&(e.includeVideoBG??!1),n=X({attrNameTemplate:t});let o={[l("BackgroundType")]:{type:"string",default:""},[l("BackgroundColor")]:{type:"string",default:""},...n,[l("BackgroundGradientColor1")]:{type:"string",default:""},[l("BackgroundGradientLocation1")]:{type:"number",default:""},[l("BackgroundGradientColor2")]:{type:"string",default:""},[l("BackgroundGradientLocation2")]:{type:"number",default:""},[l("BackgroundGradientType")]:{type:"string",default:"linear"},[l("BackgroundGradientTypeAngle")]:{type:"number",default:""},[l("BackgroundGradientTypePosition")]:{type:"string",default:"center center"}};if(a){const e={[l("BackgroundVideoLink")]:{type:"object",default:{id:null,url:"",alt:""}},[l("BackgroundVideoStartTime")]:{type:"number",default:""},[l("BackgroundVideoEndTime")]:{type:"number",default:""},[l("BackgroundVideoStartTime")]:{type:"number",default:""},[l("BackgroundVideoPlayOnce")]:{type:"boolean",default:!1},[l("BackgroundVideoPlayOnMobile")]:{type:"boolean",default:!1},[l("BackgroundVideoFallbackImage")]:{type:"object",default:{id:null,url:"",alt:""}}};o={...o,...e}}return o};Z.defaultProps={attrNameTemplate:"",includeVideoBG:!1};const J=Z,Q=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=z(e,"all")&&e.attrName||"",a=z(e,"all")&&e.defaultValue||"",n=e=>B(t,l+e);return{[n("")]:{type:"string",default:a},[n("Tablet")]:{type:"string",default:""},[n("Mobile")]:{type:"string",default:""}}};Q.defaultProps={attrNameTemplate:"",attrName:"",defaultValue:""};const ee=Q,te=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=z(e,"all")&&e.disableWidthDirections||[],a=!z(e,"all")||(e.allowBorderColor??!0),n=!z(e,"all")||(e.allowBorderRadius??!0),o=e=>B(t,e),r=G({attrNameTemplate:t,attrName:"BorderWidth",disableDirections:l,allowUnitControl:!1}),i=a?{[o("BorderColor")]:{type:"string",default:""}}:{},s=n?G({attrNameTemplate:t,attrName:"BorderRadius"}):{};return{[o("BorderStyle")]:{type:"string",default:""},...i,...r,...s}};te.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0};const le=te,ae=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=e=>B(t,e);return{[l("BoxShadowColor")]:{type:"string",default:""},[l("BoxShadowHorizontal")]:{type:"number",default:""},[l("BoxShadowVertical")]:{type:"number",default:""},[l("BoxShadowBlur")]:{type:"number",default:""},[l("BoxShadowSpread")]:{type:"number",default:""},[l("BoxShadowPosition")]:{type:"string",default:""}}};ae.defaultProps={attrNameTemplate:""};const ne=ae,oe=e=>{const t=z(e,"all")&&e.excludePanels||[],l=z(e,"all")&&e.includePanels||[];let a=l&&l.length?l:["advanced","motion-effects","background","border","positioning","responsive"];const n=e=>B("",e);t&&t.length&&t.forEach((e=>{a.splice(a.indexOf(e),1)}));let o={};const r=K();if(a.includes("advanced")){const e=G({attrName:n("Margin")}),t=G({attrName:n("Padding")});o={...o,...e,...t,[n("zIndex")]:{type:"number",default:""},[n("cssId")]:{type:"string",default:""},[n("cssClasses")]:{type:"string",default:""}}}if(a.includes("motion-effects")&&(o={...o,[n("EntranceAnimation")]:{type:"string",default:""},[n("EntranceAnimationDuration")]:{type:"string",default:"normal"},[n("EntranceAnimationDelay")]:{type:"number",default:""}}),a.includes("background")){const e=J({attrNameTemplate:"Advanced"});o={...o,...e}}if(a.includes("border")){const e=le({attrNameTemplate:"Advanced"}),t=ne({attrNameTemplate:"Advanced"});o={...o,...e,...t}}if(a.includes("positioning")){const e=ee({attrName:n("BlockWidth")}),t=$({blockAttributeKey:n("BlockCustomWidth"),allowScreens:!0}),l=$({blockAttributeKey:n("PositionHorizontalOffset"),allowScreens:!0}),a=$({blockAttributeKey:n("PositionVerticalOffset"),allowScreens:!0});o={...o,...e,...t,[n("BlockPosition")]:{type:"string",default:""},[n("PositionHorizontalOrientation")]:{type:"string",default:"left"},...l,[n("PositionVerticalOrientation")]:{type:"string",default:"top"},...a}}return a.includes("responsive")&&(o={...o,...r}),o};oe.defaultProps={excludePanels:[],includePanels:[]};const re=oe,ie=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=e=>B(t,e);return{[l("Image")]:{type:"object",default:{id:null,url:"",alt:"",caption:"",html:""}},[l("ImageTablet")]:{type:"object",default:{id:null,url:"",alt:"",caption:"",html:""}},[l("ImageMobile")]:{type:"object",default:{id:null,url:"",alt:"",caption:"",html:""}},[l("ImageSize")]:{type:"string",default:"full"},[l("ImageSizeTablet")]:{type:"string",default:""},[l("ImageSizeMobile")]:{type:"string",default:""},[l("ImageCustomWidth")]:{type:"number",default:""},[l("ImageCustomWidthTablet")]:{type:"number",default:""},[l("ImageCustomWidthMobile")]:{type:"number",default:""},[l("ImageCustomHeight")]:{type:"number",default:""},[l("ImageCustomHeightTablet")]:{type:"number",default:""},[l("ImageCustomHeightMobile")]:{type:"number",default:""}}};ie.defaultProps={attrNameTemplate:""};const se=ie,ce=e=>{const t=z(e,"all")&&e.attrNameTemplate||"";let l={};return l[B(t,"Link")]={type:"string",default:""},l[B(t,"LinkTargetBlank")]={type:"boolean",default:!1},l[B(t,"LinkRelNofollow")]={type:"boolean",default:!1},l[B(t,"LinkCustomAttributes")]={type:"string",default:""},l};ce.defaultProps={attrNameTemplate:""};const ue=ce,me=e=>{const t=z(e,"all")&&e.attrNameTemplate||"",l=z(e,"all")&&e.defaultValue||"",a="HorizontalAlignment";let n={};return n[B(t,a)]={type:"string",default:l},n[B(t,a,"Tablet")]={type:"string",default:""},n[B(t,a,"Mobile")]={type:"string",default:""},n};me.defaultProps={attrNameTemplate:""};const pe=me,be={uniqueClass:{type:"string",default:""},imageAction:{type:"string",default:""},enablePopup:{type:"boolean",default:!1},galleryData:{type:"string",default:""},imageHover:{type:"string",default:""},imageZoomOrigin:{type:"string",default:""},...re(),...se(),...ue(),...pe(),...$({blockAttributeKey:"imageWidth",allowScreens:!0}),...$({blockAttributeKey:"imageMaxWidth",allowScreens:!0}),...$({blockAttributeKey:"imageHeight",allowScreens:!0}),...$({blockAttributeKey:"imageOpacity",allowUnits:!1,optionType:"decimal"}),...$({blockAttributeKey:"imageHoverOpacity",allowUnits:!1,optionType:"decimal"}),...$({blockAttributeKey:"transitionDuration",allowUnits:!1,optionType:"decimal"}),...le({attrNameTemplate:"Image"})};var de=l(7060),ge=l.n(de);const fe=wp.blockEditor,he=wp.compose,ke=wp.element;var _e=l(2084),ve=l.n(_e);const ye=e=>{const{unitType:t,unitValue:l,onChangeUnit:a}=e;if(e.units[t])return wp.element.createElement("ul",{className:"qodef-unit-control"},Object.entries(e.units[t]).map((([e,t],n)=>wp.element.createElement("li",{key:n},wp.element.createElement("a",{className:ve()("qodef-unit",{"qodef--selected":("p"===e?"%":e)===l}),onClick:a,"data-unit":"p"===e?"%":e},t)))))};ye.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 we=ye;class Ae extends ke.Component{constructor(){super(...arguments),this.state={screen:h,isScreenPickerOpen:!1,isMouseOver:!1}}onChangeScreen(e,t){const l=this;l.state.isScreenPickerOpen?(l.props.onChangeScreen(e),l.setState({screen:e,isScreenPickerOpen:!1}),_=e,!t&&l.changePreviewScreen(e),(0,o.doAction)("qi-blocks-action-screen-change",e)):t||l.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)&&l.setState({isScreenPickerOpen:!1})}))}onOtherScreenChange(e){this.props.onChangeScreen(e),this.setState({screen:e})}componentDidMount(){const{instanceId:e}=this.props;(0,o.addAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`,this.onOtherScreenChange.bind(this))}componentWillUnmount(){const{instanceId:e}=this.props;(0,o.removeAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`)}changeScreenControls(e){v()!==e.previewScreen&&this.onChangeScreen(e.previewScreen,!0)}changePreviewScreen(e){if(e!==this.props.previewScreen){const t=(0,r.dispatch)("core/edit-post")||"",l=(0,r.dispatch)("core/edit-site")||"";let a;if(t){let{__experimentalSetPreviewDeviceType:e}=t;a=e}if(l){const{__experimentalSetPreviewDeviceType:e}=l;a=e}a&&a(P(e))}}render(){const e={...this.props},t={...this.state},{label:l,screens:a,isWidgetsArea:n,previewScreen:o}=e;let r=!1;return(a.length<1||n)&&(r=!0),h!==o&&t.screen!==o&&this.onOtherScreenChange(o),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(a).indexOf(t.screen)+");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t"),l&&wp.element.createElement("label",{className:"qodef-option-label"},l),!r&&wp.element.createElement("ul",{className:"qodef-screens "+(t.isScreenPickerOpen?"qodef--opened":"")},Object.entries(a).map((([e,l],n)=>n===Object.keys(a).indexOf(t.screen)||t.isScreenPickerOpen?wp.element.createElement("li",{className:"qodef-screen-item "+(e===t.screen?"qodef--selected":""),key:n},wp.element.createElement(y.Button,{className:"qodef-screen-item-button",onClick:()=>this.onChangeScreen(e),icon:l.icon,showTooltip:!1,label:l.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"},l.label)):null))))}}Ae.defaultProps={label:"",screens:k,isWidgetsArea:!1,previewScreen:"desktop",onChangeScreen:()=>{}};const Se=(0,r.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)(Ae));class qe extends ke.Component{constructor(){super(...arguments),this.state={screen:v(),linkedInputs:!1}}getScreenLabelSuffix(e){const t=e||this.state.screen;return V(t)}getAttributeValue(e,t=""){const{blockAttributes:l,allowScreens:a,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterGetAttributes:i}=this.props;let s=e;a&&t&&(s=e+t);let c=l[s];return n&&(c=i({key:r,childKey:s},o)),U(c)}setAttributeValue(e,t,l=""){const{setAttributes:a,allowScreens:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;n&&l&&(c=e+l),o?s({key:i,childKey:c},t,r):a({[c]:t})}render(){const t={...this.props},{label:l,allowScreens:a,rangeMax:n,rangeMin:o,rangeStep:r,rangeDecimalMax:i,rangeDecimalMin:s,rangeDecimalStep:c,repeater:u}=t,m=e=>B(t.attrNameTemplate,t.attrName,e),p=this.getScreenLabelSuffix(),b=m(),d=m("Unit"+p),g=["Top","Right","Bottom","Left"],f=()=>{const e=this.getAttributeValue(d)||"px";return R(e)},h="margin"===t.attrName.toLowerCase()||t.allowNegativeValues?-1*(f()?n:i):f()?o:s;return t.onChange=(e,t)=>{f()?this.setAttributeValue(m(t),M(e),p):this.setAttributeValue(m(`${t}Decimal`),M(e,"decimal"),p)},t.getValue=e=>{let t;return t=f()?""!==this.getAttributeValue(m(e),p)?parseInt(this.getAttributeValue(m(e),p),10):"":""!==this.getAttributeValue(m(`${e}Decimal`),p)?parseFloat(this.getAttributeValue(m(`${e}Decimal`),p)):"",t},t.getPlaceholderValue=e=>{let t="";return"Tablet"===p?t=f()?""!==this.getAttributeValue(m(e))?parseInt(this.getAttributeValue(m(e)),10):"":""!==this.getAttributeValue(m(`${e}Decimal`))?parseFloat(this.getAttributeValue(m(`${e}Decimal`))):"":"Mobile"===p&&(f()?""!==this.getAttributeValue(m(e),"Tablet")?t=parseInt(this.getAttributeValue(m(e),"Tablet"),10):""!==this.getAttributeValue(m(e))&&(t=parseInt(this.getAttributeValue(m(e)),10)):""!==this.getAttributeValue(m(`${e}Decimal`),"Tablet")?t=parseInt(this.getAttributeValue(m(`${e}Decimal`),"Tablet"),10):""!==this.getAttributeValue(m(`${e}Decimal`))&&(t=parseInt(this.getAttributeValue(m(`${e}Decimal`)),10))),t},t.getRangeValue=()=>{let e="";return[...g].some((l=>{t.disableDirections.includes(l)||(e=t.getValue(l))})),e},t.onRangeChange=e=>{[...g].map((l=>{t.disableDirections.length>0&&t.disableDirections.includes(l)?t.onChange("",l):t.onChange(e,l)}))},t.onChangeScreen=e=>{this.setState({screen:e})},t.onLinkInputs=e=>{e.preventDefault(),this.state.linkedInputs||[...g].map((e=>{t.disableDirections.length>0&&t.disableDirections.includes(e)?t.onChange("",e):t.onChange(t.getValue("Top"),e)})),this.setState({linkedInputs:!this.state.linkedInputs})},t.onChangeUnit=e=>{e.preventDefault();const t=u?200:0,l=e.target.getAttribute("data-unit"),a=this.getAttributeValue(d)||"px";this.setAttributeValue(d,l),setTimeout((()=>{l!==a&&[...g].map((e=>{const t=b+e,n=`${t}Decimal`;let o=t+p,r=n+p;"px"!==l&&(o=n+p),"px"===a&&(r=t+p,this.setAttributeValue(r,"")),this.setAttributeValue(o,this.getAttributeValue(r))}))}),t)},wp.element.createElement(y.BaseControl,{className:"qodef-input-control"},wp.element.createElement("div",{className:"qodef-control-heading"},a?wp.element.createElement("div",{className:"qodef-input-control-screens"},wp.element.createElement(Se,{label:l,onChangeScreen:t.onChangeScreen})):wp.element.createElement("label",{className:"qodef-option-label"},l),t.allowUnitControl&&wp.element.createElement(we,{unitType:t.unitType,unitValue:this.getAttributeValue(d),onChangeUnit:t.onChangeUnit}),t.allowLinkedControl&&wp.element.createElement(y.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(y.RangeControl,{min:o,max:f()?n:i,step:f()?r:c,onChange:t.onRangeChange,allowReset:!0,value:t.getRangeValue()}):wp.element.createElement("ul",null,[...g].map(((l,a)=>wp.element.createElement("li",{className:"qodef-input-control-item",key:a},t.disableDirections.length>0&&t.disableDirections.includes(l)?wp.element.createElement("div",{className:"components-base-control__field"},wp.element.createElement("label",null,(0,e.__)(l,"qi-blocks")),wp.element.createElement("input",{className:"components-text-control__input",type:"text",disabled:!0,value:(0,e.__)("auto","qi-blocks")})):wp.element.createElement(y.TextControl,{type:"number",value:t.getValue(l),placeholder:t.getPlaceholderValue(l),onChange:e=>t.onChange(e,l),label:(0,e.__)(l,"qi-blocks"),min:h,max:f()?n:i,step:f()?r:c}))))))}}qe.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 Ie=qe;class xe extends ke.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(){return V(this.state.screen)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:l,repeater:a,repeaterItemIndex:n,repeaterItemKey:o,repeaterGetAttributes:r}=this.props;let i=e;t&&(i=e+t);let s=l[i];return a&&(s=r({key:o,childKey:i},n)),U(s)}setAttributeValue(e,t,l=this.getScreenLabelSuffix()){const{setAttributes:a,setCustomEventOnChange:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;l&&(c=e+l),o?s({key:i,childKey:c},t,r):a({[c]:t}),n(t)}render(){const e={...this.props},{label:t,blockAttributeKey:l,selectOptions:a}=e;return e.onChangeScreen=e=>{this.setState({screen:e})},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-select-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},wp.element.createElement(Se,{label:t,onChangeScreen:e.onChangeScreen})),wp.element.createElement(y.SelectControl,{value:this.getAttributeValue(l),options:a,onChange:e=>this.setAttributeValue(l,e)}))}}xe.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},selectOptions:{},setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Ee=xe,Ce=wp.blob;var Te=l(4300),Ne=l.n(Te);class Be extends ke.Component{constructor(){super(...arguments),this.state={screen:v(),imageId:"",externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return V(this.state.screen)}getAttributeValue(e=this.getScreenLabelSuffix()){const{blockAttributeKey:t,blockAttributes:l,allowScreens:a,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,isSimpleRepeaterValue:i,repeaterGetAttributes:s}=this.props;let c=t;a&&e&&(c=t+e);let u=l[c];if(n){let l=i?null:t;a&&e&&(l=i?this.state.screen:c),u=s({key:r,childKey:l},o)||{}}return U(u)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:l,allowScreens:a,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,isSimpleRepeaterValue:i,repeaterSetAttributes:s}=this.props,c=this.getScreenLabelSuffix();let u=t;if(a&&c&&(u=t+c),n){let l=i?null:t;a&&c&&(l=i?this.state.screen:u),s({key:r,childKey:l},e,o)}else l({[u]:e})}componentDidMount(){const{allowScreens:e,allowDefaultImage:t}=this.props,{url:l,id:a,defaultValueIsSet:n}=this.getAttributeValue("");if(l&&!l.includes(qiBlocksEditor.vars.siteURL))this.onSelectURL(l),this.setState({externalImageIsSet:!0});else{a&&(this.setState({imageId:a}),this.updateImageSizeOption(a)),!t||n||l||a||(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 o=[""];e&&(o.push("Tablet"),o.push("Mobile")),o.map((e=>{const{url:t,id:l}=this.getAttributeValue(e);t&&(0,Ce.isBlobURL)(t)&&!l&&this.setAttributeValue({url:"",alt:"",caption:"",width:"",height:"",html:""})}))}}setSVGIcon=(e,t,l,a)=>{const n=new XMLHttpRequest;null!=n&&(n.open("GET",t,!0),n.onreadystatechange=()=>{4===n.readyState&&200===n.status&&this.setAttributeValue({id:e,url:t,alt:l,caption:a,html:Ne().sanitize(n.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},n.send())};onSelectImage=({id:e,url:t,alt:l,caption:a,width:n,height:o})=>{t.includes(".svg")?this.setSVGIcon(e,t,l,a):this.setAttributeValue({id:e,url:t,alt:l,caption:a,width:n,height:o}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){const t=setInterval((()=>{(0,r.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,l=(0,r.select)("core").getMedia(this.state.imageId);if(l){let a=e;t&&t.length>1&&(a=this.getImageURLbySize(e)||l.source_url),"custom"===e&&(a=l.source_url),this.setAttributeValue({id:l.id,url:a,alt:l.alt_text||"",caption:l.caption&&l.caption.raw||"",custom_image_size:e})}};getImageURLbySize(e){const t=this.getAttributeValue();let l="";if(t){const a=(0,r.select)("core").getMedia(t.id);if(!a)return"";const n=a.media_details.sizes;if(n&&0===Object.keys(n).length)this.setState({imageSizeNotExist:!0});else{this.setState({imageSizeNotExist:!1});for(const t in n)if(t.includes("qi_blocks_image_size_"+e.replace("-","_"))){l=n[t].source_url;break}}["","custom"].includes(e)&&this.setState({imageSizeNotExist:!1})}return l}getImageSizes(){const{imageSizes:t,customImageSizes:l}=this.props,a=this.getAttributeValue();let n=[];if(a){const o=(0,r.select)("core").getMedia(a.id);if(!o)return[];const i=o.media_details.sizes;if(i&&0===Object.keys(i).length&&n.push({label:(0,e.__)("Default","qi-blocks"),value:""}),l&&l.length>1)l.map((e=>{n.push({label:e.label,value:e.value})}));else for(const e in i){const l=i[e],a=t.find((t=>t.slug===e));a&&n.push({label:a.name,value:l.source_url})}}return n}render(){const t={...this.props},l={...this.state},{label:a,help:n,noticeUI:o,allowedTypes:r,allowScreens:i,allowImageSizes:s}=t,c=this.getAttributeValue(),{id:u,url:m,alt:p,html:b}=c;t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(u)};let d=["qodef-image-option"];return m&&m.includes(".svg")&&d.push("qodef--svg"),wp.element.createElement(y.BaseControl,{className:d.join(" ")},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},i?wp.element.createElement(Se,{label:a,onChangeScreen:t.onChangeScreen}):wp.element.createElement(wp.element.Fragment,null,a&&wp.element.createElement("label",{className:"qodef-option-label"},a))),n&&wp.element.createElement("p",{className:"qodef-option-description"},n),m?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},(0,Ce.isBlobURL)(m)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(fe.MediaUploadCheck,null,wp.element.createElement(fe.MediaUpload,{allowedTypes:r,value:u,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:m,alt:p}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Image","qi-blocks"),onClick:this.removeImage})))}))),l.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")),l.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(fe.MediaPlaceholder,{allowedTypes:r,icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:o}),s&&u&&!b&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},wp.element.createElement(y.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:m})))}}Be.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 Pe=(0,r.withSelect)((e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes})))((0,y.withNotices)(Be));class Ve extends ke.Component{constructor(){super(...arguments),this.state={isPickerVisible:!1}}getAttributeValue(){const{defaultColor:e,blockAttributeKey:t,blockAttributes:l,repeater:a,repeaterItemIndex:n,repeaterItemKey:o,isSimpleRepeaterValue:r,repeaterGetAttributes:i}=this.props;let s=l[t];return a&&(s=i({key:o,childKey:r?"":t},n)),s||e}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:l,repeater:a,repeaterItemIndex:n,repeaterItemKey:o,isSimpleRepeaterValue:r,repeaterSetAttributes:i}=this.props;a?i({key:o,childKey:r?"":t},e,n):l({[t]:e})}onChange=e=>{const{r:t,g:l,b:a,a:n}=e.rgb;let o="rgba("+[t,l,a,n].join(",")+")";this.props.setHEXValue&&(o=e.hex),this.setState({colorReset:!0}),this.setAttributeValue(o)};onClick=e=>{e.preventDefault();const t=this;t.setState({isPickerVisible:!this.state.isPickerVisible}),window.addEventListener("click",(e=>{const l=document.querySelectorAll(".qodef-color-option.qodef--opened");l.length&&l.forEach((l=>{l.contains(e.target)||t.setState({isPickerVisible:!1})}))}))};onResetColor=e=>{e.preventDefault(),this.setState({isPickerVisible:!this.state.isPickerVisible}),this.setAttributeValue("")};render(){const{label:t,popup:l}=this.props;return wp.element.createElement(y.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(y.Button,{onClick:this.onClick,className:"qodef-color-indicator-button"},wp.element.createElement(y.ColorIndicator,{colorValue:this.getAttributeValue(),className:"qodef-color-indicator"}))),this.state.isPickerVisible&&wp.element.createElement("div",{className:`qodef-color-picker-wrapper ${l&&"qodef--popup"}`},wp.element.createElement(y.ColorPicker,{color:this.getAttributeValue(),onChangeComplete:this.onChange,disableAlpha:this.props.setHEXValue}),wp.element.createElement(y.Button,{onClick:this.onResetColor,isSecondary:!0},(0,e.__)("Reset Color","qi-blocks"))))}}Ve.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 Oe=Ve;class De extends ke.Component{getAttributeValue(){const{blockAttributeKey:e,blockAttributes:t,repeater:l,repeaterItemIndex:a,repeaterItemKey:n,repeaterGetAttributes:o}=this.props;let r=t[e];return l&&(r=o({key:n},a)||{}),U(r)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:l,repeater:a,repeaterItemIndex:n,repeaterItemKey:o,repeaterSetAttributes:r}=this.props;a?r({key:o},e,n):l({[t]:e})}componentDidMount(){const{url:e,id:t}=this.getAttributeValue();e&&(0,Ce.isBlobURL)(e)&&!t&&this.setAttributeValue({url:"",alt:""})}onSelectVideo=({id:e,url:t,alt:l})=>{this.setAttributeValue({id:e,url:t,alt:l})};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:l,description:a,noticeUI:n}=t,{id:o,url:r}=this.getAttributeValue();return wp.element.createElement(y.BaseControl,{className:"qodef-video-option"},l&&wp.element.createElement("label",{className:"qodef-option-label"},l),a&&wp.element.createElement("p",{className:"qodef-option-description"},a),r?wp.element.createElement("div",{className:"qodef-video-option-inner"},(0,Ce.isBlobURL)(r)&&wp.element.createElement("div",{className:"qodef-video-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(fe.MediaUploadCheck,null,wp.element.createElement(fe.MediaUpload,{allowedTypes:["video"],value:o,onSelect:this.onSelectVideo,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("video",{src:r}),wp.element.createElement("div",{className:"qodef-video-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Video","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Video","qi-blocks"),onClick:this.removeVideo})))}))):wp.element.createElement(fe.MediaPlaceholder,{allowedTypes:["video"],icon:"format-video",onSelect:this.onSelectVideo,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:n}))}}De.defaultProps={label:(0,e.__)("Video","qi-blocks"),description:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Re=(0,y.withNotices)(De),Le=qiBlocksEditor.vars.defaultFontSize,Me=qiBlocksEditor.vars.defaultLineHeight,ze=e=>{const{convertorType:t,value:l,attributeKey:a}=e;let n=1;a.includes("FontSize")||a.includes("fontSize")?n=Le:(a.includes("LineHeight")||a.includes("lineHeight"))&&(n=Me);const o=e=>Math.round(parseInt(e,10)/n*100)/100,r=e=>Math.round(parseInt(e,10)/n*100)/100,i=e=>Math.round(parseFloat(e)/n*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)*n),m=e=>Math.round(parseFloat(e)*n/100),p=e=>Math.round(window.innerWidth*parseInt(e,10)/100),b=e=>Math.round(window.innerHeight*parseInt(e,10)/100);let d="";if(""!==l&&""!==a&&""!==t)switch(t){case"pxToEm":d=o(l);break;case"pxToRem":d=r(l);break;case"pxToP":d=i(l);break;case"pxToVw":d=s(l);break;case"pxToVh":d=c(l);break;case"emToPx":d=u(l);break;case"emToRem":case"remToRem":case"vwToVh":case"vhToVw":d=l;break;case"emToP":case"remToP":d=(e=>100*parseFloat(e))(l);break;case"emToVw":case"remToVw":d=(e=>s(u(e)))(l);break;case"emToVh":case"remToVh":d=(e=>c(u(e)))(l);break;case"remToPx":d=(e=>Math.round(parseFloat(e)*n))(l);break;case"pToPx":d=m(l);break;case"pToEm":case"pToRem":d=(e=>parseFloat(e)/100)(l);break;case"pToVw":d=(e=>s(m(e)))(l);break;case"pToVh":d=(e=>c(m(e)))(l);break;case"vwToPx":d=p(l);break;case"vwToEm":d=(e=>o(p(e)))(l);break;case"vwToRem":d=(e=>r(p(e)))(l);break;case"vwToP":d=(e=>i(p(e)))(l);break;case"vhToPx":d=b(l);break;case"vhToEm":d=(e=>o(b(e)))(l);break;case"vhToRem":d=(e=>r(b(e)))(l);break;case"vhToP":d=(e=>i(b(e)))(l)}return d};ze.defaultProps={convertorType:"pxToEm"};const Ue=ze;class je extends ke.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(e){const t=e||this.state.screen;return V(t)}getAttributeValue(e,t=""){const{blockAttributes:l,allowScreens:a,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterGetAttributes:i}=this.props;let s=e;a&&t&&(s=e+t);let c=l[s];return n&&(c=i({key:r,childKey:s},o)),U(c)}setAttributeValue(e,t,l=this.getScreenLabelSuffix()){const{setAttributes:a,allowScreens:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;n&&l&&(c=e+l),o?s({key:i,childKey:c},t,r):a({[c]:t})}onChangeUnitsValues(e,t,l,a){const n={...this.props},{rangeMax:o,rangeDecimalMax:r,allowUnitsConvertor:i}=n;let s=this.getAttributeValue(t);const c=s;a?(s=parseInt(s,10),s>o&&(s=o)):!a&&s>r&&(s=r),i?["emToRem","remToEm","vwToVh","vhToVw"].includes(l)||(this.setAttributeValue(e,Ue({convertorType:l,value:c,attributeKey:t}),""),this.setAttributeValue(t,"","")):(this.setAttributeValue(e,s,""),this.setAttributeValue(t,"",""))}render(){const e={...this.props},{label:t,unitType:l,blockAttributeKey:a,rangeMax:n,rangeMin:o,rangeStep:r,rangeDecimalMax:i,rangeDecimalMin:s,rangeDecimalStep:c,optionType:u,allowReset:m,allowScreens:p,allowUnits:b,repeater:d,repeaterItemKey:g,isSimpleRepeaterValue:f}=e,h=this.getScreenLabelSuffix();let k=d&&!f?g:a;const _=`${k}Decimal`,v=`${k}Unit`,w=`${k}Tablet`,A=`${_}Tablet`,S=`${v}Tablet`,q=`${k}Mobile`,I=`${_}Mobile`,x=`${v}Mobile`;return e.onChangeScreen=e=>{this.setState({screen:e})},e.onChangeUnit=e=>{e.preventDefault();const t=d?200:0,l=e.target.getAttribute("data-unit"),a=this.getAttributeValue(v,h)||"px";this.setAttributeValue(v,l),setTimeout((()=>{if(l!==a){const e=`${a}To${P(l)}`;let t=k+h,n=_+h;"px"!==l&&(t=_+h,n=k+h),this.onChangeUnitsValues(t,n,e,"px"===l)}}),t)},e.onChange=t=>{this.setAttributeValue(k,t),e.setCustomEventOnChange()},e.onChangeDecimal=t=>{let l=0;"decimal"===u&&void 0===t&&(l=200),setTimeout((()=>{this.setAttributeValue(_,t),e.setCustomEventOnChange()}),l)},e.getPlaceholderValue=e=>{let t="";const l=this.getAttributeValue(k),a=this.getAttributeValue(_),n=this.getAttributeValue(w),o=this.getAttributeValue(A);return"Tablet"===h?e&&""===n?t=l:e||""!==o||(t=a):"Mobile"===h&&(e&&""===this.getAttributeValue(q)?t=""!==n?n:l:e||""!==this.getAttributeValue(I)||(t=""!==o?o:a)),t},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-range-option"},wp.element.createElement("div",{className:"qodef-advanced-range-heading"},p?wp.element.createElement(Se,{label:t,onChangeScreen:e.onChangeScreen}):wp.element.createElement("label",{className:"qodef-option-label"},t),b&&wp.element.createElement(we,{unitType:l,unitValue:this.getAttributeValue(v,h),onChangeUnit:e.onChangeUnit})),"desktop"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(R(this.getAttributeValue(v))&&"decimal"!==u||!b&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:o,max:n,step:r,value:this.getAttributeValue(k),onChange:e.onChange,allowReset:m}),(L(this.getAttributeValue(v))||!b&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:i,step:c,value:this.getAttributeValue(_),onChange:e.onChangeDecimal,allowReset:m})),"tablet"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(R(this.getAttributeValue(S))&&"decimal"!==u||!b&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:o,max:n,step:r,value:this.getAttributeValue(w),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:m}),(L(this.getAttributeValue(S))||!b&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:i,step:c,value:this.getAttributeValue(A),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:m})),"mobile"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(R(this.getAttributeValue(x))&&"decimal"!==u||!b&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:o,max:n,step:r,value:this.getAttributeValue(q),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:m}),(L(this.getAttributeValue(x))||!b&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:i,step:c,value:this.getAttributeValue(I),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:m})))}}je.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:k,allowScreens:!1,allowUnits:!0,allowUnitsConvertor:!1,setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Fe=je,Ke=t=>{const l={...t},{attrNameTemplate:a,attrName:n,blockAttributes:o,setAttributes:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m,previewScreen:p}=l,b=n||"Background",d=e=>B(a,b+e);l.getAttributeValue=(e,t="")=>{let l=e;t&&(l=e+t);let a=o[l];return i&&(a=m({key:c,childKey:l},s)),U(a)},l.setAttributeValue=(e,t,l="")=>{let a=e;l&&(a=e+l),i?u({key:c,childKey:a},t,s):r({[a]:t})};let g=V(p||v());return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Pe,{label:(0,e.__)(`${b} Image`,"qi-blocks"),blockAttributeKey:d("Image"),blockAttributes:o,setAttributes:r,allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,isSimpleRepeaterValue:!1,repeaterSetAttributes:u,repeaterGetAttributes:m}),l.getAttributeValue(d("Image"))&&l.getAttributeValue(d("Image")).url&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ee,{label:(0,e.__)(`${b} Position`,"qi-blocks"),blockAttributeKey:d("Position"),blockAttributes:o,setAttributes:r,selectOptions:j("background_position",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),(""===g&&"custom"===l.getAttributeValue(d("Position"))||""!==g&&"custom"===l.getAttributeValue(d("Position"),g)||""!==g&&"custom"===l.getAttributeValue(d("Position"))&&["","custom"].includes(l.getAttributeValue(d("Position"),"Tablet"))&&""===l.getAttributeValue(d("Position"),g))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Fe,{label:(0,e.__)("X Position","qi-blocks"),blockAttributeKey:d("XPosition"),setAttributes:r,blockAttributes:o,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"xPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(Fe,{label:(0,e.__)("Y Position","qi-blocks"),blockAttributeKey:d("YPosition"),setAttributes:r,blockAttributes:o,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"yPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m})),wp.element.createElement(y.SelectControl,{label:(0,e.__)(`${b} Attachment`,"qi-blocks"),value:l.getAttributeValue(d("Attachment")),options:j("background_attachment")||"",onChange:e=>l.setAttributeValue(d("Attachment"),e)}),wp.element.createElement(Ee,{label:(0,e.__)(`${b} Repeat`,"qi-blocks"),blockAttributeKey:d("Repeat"),blockAttributes:o,setAttributes:r,selectOptions:j("background_repeat"),repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(Ee,{label:(0,e.__)(`${b} Size`,"qi-blocks"),blockAttributeKey:d("Size"),blockAttributes:o,setAttributes:r,selectOptions:j("background_size",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),"custom"===l.getAttributeValue(d("Size"),g)&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Fe,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:d("SizeWidth"),setAttributes:r,blockAttributes:o,rangeMax:1e3,rangeMin:0,rangeDecimalMax:100,rangeDecimalMin:0,unitType:"xPosition",allowScreens:!0,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}))))};Ke.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const He=Ke,Ge=t=>{const l={...t},{attrNameTemplate:a,blockAttributes:n,setAttributes:o,includeVideoBG:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m,previewScreen:p}=l,b=e=>B(a,e);l.getAttributeValue=(e,t="")=>{let l=n[e];if(i){let a=e;t&&(a=e+t),l=m({key:c,childKey:a},s)}return U(l)},l.setAttributeValue=(e,t,l="")=>{if(i){let a=e;l&&(a=e+l),u({key:c,childKey:a},t,s)}else o({[e+l]:t})};const d=[{label:(0,e.__)("Classic","qi-blocks"),value:""},{label:(0,e.__)("Gradient","qi-blocks"),value:"gradient"}];return r&&d.push({label:(0,e.__)("Video","qi-blocks"),value:"video"}),wp.element.createElement("div",{className:"qodef-background-panel"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Background Type","qi-blocks"),value:l.getAttributeValue(b("BackgroundType")),options:d,onChange:e=>l.setAttributeValue(b("BackgroundType"),e)}),""===l.getAttributeValue(b("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Oe,{label:(0,e.__)("Background Color","qi-blocks"),blockAttributeKey:b("BackgroundColor"),blockAttributes:n,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(He,{attrNameTemplate:a,blockAttributes:n,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m,previewScreen:p})),"gradient"===l.getAttributeValue(b("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Oe,{label:(0,e.__)("First Color","qi-blocks"),blockAttributeKey:b("BackgroundGradientColor1"),blockAttributes:n,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:l.getAttributeValue(b("BackgroundGradientLocation1")),onChange:e=>l.setAttributeValue(b("BackgroundGradientLocation1"),e),min:0,max:100,step:1}),wp.element.createElement(Oe,{label:(0,e.__)("Second Color","qi-blocks"),blockAttributeKey:b("BackgroundGradientColor2"),blockAttributes:n,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:l.getAttributeValue(b("BackgroundGradientLocation2")),onChange:e=>l.setAttributeValue(b("BackgroundGradientLocation2"),e),min:0,max:100,step:1}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Gradient Type","qi-blocks"),value:l.getAttributeValue(b("BackgroundGradientType")),options:[{label:(0,e.__)("Linear","qi-blocks"),value:"linear"},{label:(0,e.__)("Radial","qi-blocks"),value:"radial"}],onChange:e=>l.setAttributeValue(b("BackgroundGradientType"),e)}),"linear"===l.getAttributeValue(b("BackgroundGradientType"))&&wp.element.createElement(y.RangeControl,{label:(0,e.__)("Angle","qi-blocks"),value:l.getAttributeValue(b("BackgroundGradientTypeAngle")),onChange:e=>l.setAttributeValue(b("BackgroundGradientTypeAngle"),e),min:0,max:360,step:1}),"radial"===l.getAttributeValue(b("BackgroundGradientType"))&&wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:l.getAttributeValue(b("BackgroundGradientTypePosition")),options:j("background_position",!1),onChange:e=>l.setAttributeValue(b("BackgroundGradientTypePosition"),e)})),"video"===l.getAttributeValue(b("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Re,{label:(0,e.__)("Video Link","qi-blocks"),description:(0,e.__)("Self hosted video file (mp4 is recommended)","qi-blocks"),blockAttributeKey:b("BackgroundVideoLink"),blockAttributes:n,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Start Time","qi-blocks"),help:(0,e.__)("Specify a start time (in seconds)","qi-blocks"),value:l.getAttributeValue(b("BackgroundVideoStartTime")),onChange:e=>l.setAttributeValue(b("BackgroundVideoStartTime"),M(e))}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("End Time","qi-blocks"),help:(0,e.__)("Specify an end time (in seconds)","qi-blocks"),value:l.getAttributeValue(b("BackgroundVideoEndTime")),onChange:e=>l.setAttributeValue(b("BackgroundVideoEndTime"),M(e))}),wp.element.createElement(A,{label:(0,e.__)("Play Once","qi-blocks"),blockAttributeKey:b("BackgroundVideoPlayOnce"),blockAttributes:n,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(A,{label:(0,e.__)("Play On Mobile","qi-blocks"),blockAttributeKey:b("BackgroundVideoPlayOnMobile"),blockAttributes:n,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(Pe,{label:(0,e.__)("Background Fallback","qi-blocks"),blockAttributeKey:b("BackgroundVideoFallbackImage"),blockAttributes:n,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m})))};Ge.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},includeVideoBG:!1,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const We=Ge,$e=t=>{const l={...t},{attrNameTemplate:a,blockAttributes:n,setAttributes:o,disableWidthDirections:r,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}=l,p=e=>B(a,e);return l.getAttributeValue=(e,t="")=>{let l=n[e];if(i){let a=e;t&&(a=e+t),l=m({key:c,childKey:a},s)}return U(l)},l.setAttributeValue=(e,t,l="")=>{if(i){let a=e;l&&(a=e+l),u({key:c,childKey:a},t,s)}else o({[e+l]:t})},wp.element.createElement("div",{className:"qodef-border-panel"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Border Type","qi-blocks"),value:l.getAttributeValue(p("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"},...j("border_style",!1)],onChange:e=>l.setAttributeValue(p("BorderStyle"),e)}),!["","none"].includes(n[p("BorderStyle")])&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ie,{label:(0,e.__)("Border Width","qi-blocks"),attrName:p("BorderWidth"),blockAttributes:n,setAttributes:o,allowUnitControl:!1,disableDirections:r,rangeMax:20,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),(l.allowBorderColor??!0)&&wp.element.createElement(Oe,{label:(0,e.__)("Border Color","qi-blocks"),blockAttributeKey:p("BorderColor"),blockAttributes:n,setAttributes:o,repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m})),(l.allowBorderRadius??!0)&&wp.element.createElement(Ie,{label:(0,e.__)("Border Radius","qi-blocks"),attrName:p("BorderRadius"),blockAttributes:n,setAttributes:o,unitType:"pxAndPercent",repeater:i,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}))};$e.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowBorderColor:!0,allowBorderRadius:!0,disableWidthDirections:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Ye=$e,Xe=t=>{const l={...t},{attrNameTemplate:a,blockAttributes:n,setAttributes:o,excludeOptions:r}=l,i=e=>B(a,e),[s,c]=(0,ke.useState)(!1);let u=["qodef-box-shadow-panel"];return l.popup&&u.push("qodef--has-popup"),s&&u.push("qodef--opened"),l.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"},l.label&&wp.element.createElement("label",{className:"qodef-option-label"},l.label),l.popup&&wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Open Panel","qi-blocks"),onClick:l.onClick})),wp.element.createElement("div",{className:"qodef-box-shadow-panel-content"},wp.element.createElement(Oe,{label:(0,e.__)("Color","qi-blocks"),blockAttributeKey:i("BoxShadowColor"),blockAttributes:n,setAttributes:o,popup:!1}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Horizontal","qi-blocks"),value:n[i("BoxShadowHorizontal")],onChange:e=>o({[i("BoxShadowHorizontal")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Vertical","qi-blocks"),value:n[i("BoxShadowVertical")],onChange:e=>o({[i("BoxShadowVertical")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Blur","qi-blocks"),value:n[i("BoxShadowBlur")],onChange:e=>o({[i("BoxShadowBlur")]:e}),min:0,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Spread","qi-blocks"),value:n[i("BoxShadowSpread")],onChange:e=>o({[i("BoxShadowSpread")]:e}),min:-100,max:100,step:1,allowReset:!0}),(m="position",!(r&&r.length&&r.includes(m))&&wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:n[i("BoxShadowPosition")],options:[{label:(0,e.__)("Outline","qi-blocks"),value:""},{label:(0,e.__)("Inset","qi-blocks"),value:"inset"}],onChange:e=>o({[i("BoxShadowPosition")]:e})}))));var m};Xe.defaultProps={label:(0,e.__)("Box Shadow","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeOptions:[],popup:!1};const Ze=Xe;class Je extends ke.Component{render(){const{blockAttributes:t,setAttributes:l,excludePanels:a,previewScreen:n,blockName:o}=this.props,r=(e,t="")=>B("",e,t),i=["advanced","motion-effects","background","border","positioning","responsive"];a&&a.length&&a.forEach((e=>{i.splice(i.indexOf(e),1)}));let s=V(n);return wp.element.createElement("div",{className:"qodef-advanced-panel"},i.includes("advanced")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Advanced","qi-blocks")},wp.element.createElement(Ie,{label:(0,e.__)("Margin","qi-blocks"),attrName:r("Margin"),blockAttributes:t,setAttributes:l}),wp.element.createElement(Ie,{label:(0,e.__)("Padding","qi-blocks"),attrName:r("Padding"),blockAttributes:t,setAttributes:l}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Z-Index","qi-blocks"),value:t[r("zIndex")],onChange:e=>l({[r("zIndex")]:M(e)})}),wp.element.createElement(y.TextControl,{label:(0,e.__)("CSS ID","qi-blocks"),value:t[r("cssId")],onChange:e=>l({[r("cssId")]:e})}),wp.element.createElement(y.TextControl,{label:(0,e.__)("CSS Classes","qi-blocks"),value:t[r("cssClasses")],onChange:e=>l({[r("cssClasses")]:e})})),i.includes("motion-effects")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Motion Effects","qi-blocks"),initialOpen:!1},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Entrance Animation","qi-blocks"),value:t[r("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=>{l({[r("EntranceAnimation")]:e}),setTimeout((()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)}),300)}}),void 0!==t[r("EntranceAnimation")]&&""!==t[r("EntranceAnimation")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(y.SelectControl,{label:(0,e.__)("Animation Duration","qi-blocks"),value:t[r("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=>{l({[r("EntranceAnimationDuration")]:e}),setTimeout((()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)}),300)}}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Animation Delay (ms)","qi-blocks"),value:t[r("EntranceAnimationDelay")],min:0,step:100,onChange:e=>{l({[r("EntranceAnimationDelay")]:M(e)}),qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass,!0)}}))),i.includes("background")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Background","qi-blocks"),initialOpen:!1},wp.element.createElement(We,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:l,previewScreen:n})),i.includes("border")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Border","qi-blocks"),initialOpen:!1},wp.element.createElement(Ye,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:l}),wp.element.createElement(Ze,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:l,popup:!0})),i.includes("positioning")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Positioning","qi-blocks"),initialOpen:!1},wp.element.createElement(Ee,{label:(0,e.__)("Width","qi-blocks"),blockAttributeKey:r("BlockWidth"),blockAttributes:t,setAttributes:l,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[r("BlockWidth")]||""!==s&&"custom"===t[r("BlockWidth",s)]||""!==s&&"custom"===t[r("BlockWidth")]&&["","custom"].includes(t[r("BlockWidth","Tablet")])&&""===t[r("BlockWidth",s)])&&wp.element.createElement(Fe,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:r("BlockCustomWidth"),setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:t[r("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=>{l({[r("BlockPosition")]:e})}}),""!==t[r("BlockPosition")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(y.SelectControl,{label:(0,e.__)("Horizontal Orientation","qi-blocks"),value:t[r("PositionHorizontalOrientation")],options:[{label:(0,e.__)("Left","qi-blocks"),value:"left"},{label:(0,e.__)("Right","qi-blocks"),value:"right"}],onChange:e=>l({[r("PositionHorizontalOrientation")]:e})}),wp.element.createElement(Fe,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:r("PositionHorizontalOffset"),setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Vertical Orientation","qi-blocks"),value:t[r("PositionVerticalOrientation")],options:[{label:(0,e.__)("Top","qi-blocks"),value:"Top"},{label:(0,e.__)("Bottom","qi-blocks"),value:"bottom"}],onChange:e=>l({[r("PositionVerticalOrientation")]:e})}),wp.element.createElement(Fe,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:r("PositionVerticalOffset"),setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}))),i.includes("responsive")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Responsive","qi-blocks"),initialOpen:!1},wp.element.createElement(q,{blockAttributes:t,setAttributes:l})),qiBlocksEditor.vars?.advancedBlockPanel&&wp.element.createElement(wp.element.Fragment,null,Object.entries(qiBlocksEditor.vars.advancedBlockPanel).map((([t,l],a)=>{let n="";if("help"===t?n=(0,e.__)("Help","qi-blocks"):"features"===t&&(n=(0,e.__)("Get more features","qi-blocks")),l.length<=0||"blocks"===t)return"";const r="help"===t,i=o?o.replace("qi-blocks/",""):"",s=l.map(((l,a)=>{let n=l?.link;if(0===a&&"help"===t&&i){const e=qiBlocksEditor.vars.advancedBlockPanel?.blocks[i]||"";e&&e?.demo&&(n=e?.demo+"?utm_source=dash&utm_medium=qiblocks&utm_campaign=blocks")}return wp.element.createElement("div",{className:"qodef-m-item"},l?.image?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("a",{className:"qodef-m-item-image-link",href:l?.link,target:"_blank",rel:"noreferrer"},wp.element.createElement("img",{className:"qodef-m-item-image",src:l.image,alt:l?.title})),wp.element.createElement("p",{className:"qodef-m-item-title"},l?.title),wp.element.createElement("a",{className:"qodef-m-item-button",href:l?.link,target:"_blank",rel:"noreferrer"},(0,e.__)("Upgrade","qi-blocks"))):wp.element.createElement("a",{className:"qodef-m-item-link",href:n,target:"_blank",rel:"noreferrer"},l?.title))}));return wp.element.createElement(y.PanelBody,{title:n,className:`qodef-advanced-block-panel-features ${"qodef--"+t} qodef-m`,key:a,initialOpen:r},s)}))))}}Je.defaultProps={blockAttributes:{},setAttributes:()=>{},excludePanels:[],previewScreen:"desktop",blockName:""};const Qe=(0,r.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}}))(Je),et=wp.apiFetch;var tt=l.n(et);class lt extends ke.Component{constructor(){super(...arguments),this.state={screen:v(),imageId:"",customImageSizeLoading:!1,externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return V(this.state.screen)}getAttributeName(e){const{attrNameTemplate:t}=this.props;return B(t,e)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:l,allowScreens:a,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterGetAttributes:i}=this.props;let s=e;a&&t&&(s=e+t);let c=l[s];return n&&(c=i({key:r,childKey:s},o)),U(c)}setAttributeValue(e,t,l=this.getScreenLabelSuffix()){const{setAttributes:a,allowScreens:n,repeater:o,repeaterItemIndex:r,repeaterItemKey:i,repeaterSetAttributes:s}=this.props;let c=e;n&&l&&(c=e+l),o?s({key:i,childKey:c},t,r):a({[c]:t})}componentDidMount(){const{allowDefaultImage:e,defaultImageURL:t,allowScreens:l}=this.props,{url:a,id:n,defaultValueIsSet:o}=this.getAttributeValue(this.getAttributeName("Image"));a&&!a.includes(qiBlocksEditor.vars.siteURL)?(this.onSelectURL(a),this.setState({externalImageIsSet:!0})):(a&&(0,Ce.isBlobURL)(a)&&!n&&this.setAttributeValue(this.getAttributeName("Image"),{url:"",alt:"",caption:"",html:""}),l&&["Tablet","Mobile"].map((e=>{const{url:t,id:l}=this.getAttributeValue(this.getAttributeName("Image"),e);t&&(0,Ce.isBlobURL)(t)&&!l&&this.setAttributeValue(this.getAttributeName("Image"),{url:"",alt:"",caption:"",html:""},e)})),!e||o||a||n||this.setAttributeValue(this.getAttributeName("Image"),{id:null,url:t||qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder,caption:"",html:""}),n&&(this.setState({imageId:n}),this.updateImageSizeOption(n)))}setSVGIcon=(e,t,l,a)=>{const n=new XMLHttpRequest;null!=n&&(n.open("GET",t,!0),n.onreadystatechange=()=>{4===n.readyState&&200===n.status&&this.setAttributeValue(this.getAttributeName("Image"),{id:e,url:t,alt:l,caption:a,html:Ne().sanitize(n.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},n.send())};onSelectImage=({id:e,url:t,alt:l,caption:a})=>{this.setAttributeValue(this.getAttributeName("ImageSize"),""),t.includes(".svg")?this.setSVGIcon(e,t,l,a):this.setAttributeValue(this.getAttributeName("Image"),{id:e,url:t,alt:l,caption:a}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){let t=0;const l=setInterval((()=>{((0,r.select)("core").getMedia(e)||t>5)&&(clearInterval(l),this.forceUpdate()),t++}),1e3)}};onSelectURL=e=>{e.includes(".svg")?this.setSVGIcon(null,e,"",""):this.setAttributeValue(this.getAttributeName("Image"),{id:null,url:e,alt:"",caption:"",html:""}),this.setAttributeValue(this.getAttributeName("ImageSize"),""),this.setState({externalImageIsSet:!1})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeImage=()=>{this.setAttributeValue(this.getAttributeName("Image"),{id:null,url:"",alt:"",caption:"",html:"",defaultValueIsSet:!!this.props.allowDefaultImage})};getImageSizes(){const{imageSizes:t,additionalImageSizes:l}=this.props,a=this.getAttributeValue(this.getAttributeName("Image"));let n=[];if(a){const o=(0,r.select)("core").getMedia(a.id);if(!o)return[];const i=o.media_details.sizes;i&&0===Object.keys(i).length&&n.push({label:(0,e.__)("Default","qi-blocks"),value:""});for(const e in i){const l=t.find((t=>t.slug===e));l&&n.push({label:l.name,value:e})}l&&l.length>1&&l.map((e=>{n.push({label:e.label,value:e.value})})),n.push({label:(0,e.__)("Custom","qi-blocks"),value:"custom"})}return n}onImageSizeChange=e=>{this.setAttributeValue(this.getAttributeName("ImageSize"),e);const t=(0,r.select)("core").getMedia(this.state.imageId);if(t){let l=t.source_url;""!==e&&(l=this.getImageURLbySize(e)||t.source_url),"custom"===e?this.getImageURLbyCustomSize(e):this.setAttributeValue(this.getAttributeName("Image"),{id:t.id,url:l,alt:t.alt_text||"",caption:t.caption&&t.caption.raw||""})}};getImageURLbySize(e){const t=this.getAttributeValue(this.getAttributeName("Image"));let l="";if(t){const a=(0,r.select)("core").getMedia(t.id);if(!a)return"";this.setState({customImageSizeLoading:!0});const n=a.media_details.sizes;if(n&&0===Object.keys(n).length)this.setState({imageSizeNotExist:!0,customImageSizeLoading:!1});else{this.setState({imageSizeNotExist:!1,customImageSizeLoading:!1});for(const t in n){if(t===e){l=n[t].source_url;break}if(t.includes("qi_blocks_image_size_"+e.replace("-","_"))){l=n[t].source_url;break}}}["","custom"].includes(e)&&this.setState({imageSizeNotExist:!1})}return l}getImageURLbyCustomSize=()=>{const e=(0,r.select)("core").getMedia(this.state.imageId);if(e){let t=e.source_url;const l=parseInt(this.getAttributeValue(this.getAttributeName("ImageCustomWidth")),10),a=parseInt(this.getAttributeValue(this.getAttributeName("ImageCustomHeight")),10);t&&l&&a&&(this.setState({customImageSizeLoading:!0}),tt()({method:"POST",path:"/qi-blocks/v1/resize-image",data:{image_id:this.state.imageId,custom_size:{width:l,height:a}}}).then((l=>{"success"===l.status&&(t=l.data.url),this.setState({customImageSizeLoading:!1}),this.setAttributeValue(this.getAttributeName("Image"),{id:e.id,url:t,alt:e.alt_text||"",caption:e.caption&&e.caption.raw||""})})))}};render(){const t={...this.props},l={...this.state},{label:a,noticeUI:n,allowScreens:o,allowImageSizes:r}=t,i=this.getAttributeValue(this.getAttributeName("Image")),{id:s,url:c,alt:u,html:m}=i;return t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(s)},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-image-option qodef-image-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},o?wp.element.createElement(Se,{label:a,onChangeScreen:t.onChangeScreen}):wp.element.createElement(wp.element.Fragment,null,a&&wp.element.createElement("label",{className:"qodef-option-label"},a))),c?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},((0,Ce.isBlobURL)(c)||l.customImageSizeLoading)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(fe.MediaUploadCheck,null,wp.element.createElement(fe.MediaUpload,{allowedTypes:["image"],value:s,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:c,alt:u}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Image","qi-blocks"),onClick:this.removeImage})))}))),l.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")),l.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(fe.MediaPlaceholder,{allowedTypes:["image"],icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:n}),r&&s&&!m&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},this.getImageSizes()&&this.getImageSizes().length>0?wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Size","qi-blocks"),options:this.getImageSizes(),onChange:this.onImageSizeChange,value:this.getAttributeValue(this.getAttributeName("ImageSize"))||"full"}):wp.element.createElement(y.Spinner,null),"custom"===this.getAttributeValue(this.getAttributeName("ImageSize"))&&wp.element.createElement("div",{className:"qodef-image-option-custom-size"},wp.element.createElement("label",{className:"qodef-option-label"},(0,e.__)("Custom Image Size","qi-blocks")),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Width","qi-blocks"),value:this.getAttributeValue(this.getAttributeName("ImageCustomWidth")),onChange:e=>this.setAttributeValue(this.getAttributeName("ImageCustomWidth"),M(e)),min:1,max:2560,step:1}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Height","qi-blocks"),value:this.getAttributeValue(this.getAttributeName("ImageCustomHeight")),onChange:e=>this.setAttributeValue(this.getAttributeName("ImageCustomHeight"),M(e)),min:1,max:2560,step:1}),wp.element.createElement(y.Button,{isPrimary:!0,text:(0,e.__)("Apply Changes","qi-blocks"),onClick:this.getImageURLbyCustomSize}))))}}lt.defaultProps={label:(0,e.__)("Image","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowDefaultImage:!1,defaultImageURL:"",allowScreens:!1,allowImageSizes:!0,additionalImageSizes:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const at=(0,r.withSelect)((e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes})))((0,y.withNotices)(lt));class nt extends ke.Component{constructor(){super(...arguments),this.state={isSettingsPanelVisible:!1}}getAttributeValue(e){const{blockAttributes:t,repeater:l,repeaterItemIndex:a,repeaterItemKey:n,repeaterGetAttributes:o}=this.props;let r=t[e];return l&&(r=o({key:n,childKey:e},a)),U(r)}setAttributeValue(e,t){const{setAttributes:l,repeater:a,repeaterItemIndex:n,repeaterItemKey:o,repeaterSetAttributes:r}=this.props;a?r({key:o,childKey:e},t,n):l({[e]:t})}onClick=e=>{e.preventDefault();const t=this;t.setState({isSettingsPanelVisible:!this.state.isSettingsPanelVisible}),window.addEventListener("click",(e=>{const l=document.querySelectorAll(".qodef-url-input-control.qodef--opened");l.length&&l.forEach((l=>{l.contains(e.target)||t.setState({isSettingsPanelVisible:!1})}))}))};render(){const t={...this.props},l={...this.state},{label:a,attrNameTemplate:n,disableSuggestions:o}=t,r=B(n,"Link"),i=B(n,"LinkTargetBlank"),s=B(n,"LinkRelNofollow"),c=B(n,"LinkCustomAttributes");return wp.element.createElement(y.BaseControl,{className:"qodef-url-input-control "+(l.isSettingsPanelVisible?"qodef--opened":"")},wp.element.createElement("div",{className:"qodef-control-heading"},wp.element.createElement("label",{className:"qodef-option-label"},a),wp.element.createElement(y.Button,{onClick:this.onClick,className:"qodef-url-input-settings-button",icon:"admin-settings"})),wp.element.createElement(fe.URLInput,{value:this.getAttributeValue(r),onChange:e=>this.setAttributeValue(r,e),className:"qodef-url-input",disableSuggestions:o}),l.isSettingsPanelVisible&&wp.element.createElement(y.Card,{size:"small"},wp.element.createElement(y.CardBody,null,wp.element.createElement(y.ToggleControl,{label:(0,e.__)("Open in new window","qi-blocks"),checked:this.getAttributeValue(i),onChange:e=>this.setAttributeValue(i,e)}),wp.element.createElement(y.ToggleControl,{label:(0,e.__)("Add nofollow","qi-blocks"),checked:this.getAttributeValue(s),onChange:e=>this.setAttributeValue(s,e)}),wp.element.createElement(y.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)}))))}}nt.defaultProps={label:"",attrNameTemplate:"",disableSuggestions:!1,blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const ot=nt,rt=(e,t="")=>{let l={},a={};if(!e)return l;const n=e=>B(t,e);return z(e[n("Link")])&&(l.href=e[n("Link")]),z(e[n("LinkTargetBlank")],"all")&&(l.target="_blank",l.rel="noopener noreferrer"),z(e[n("LinkRelNofollow")],"all")&&(l.rel=void 0!==l.rel?l.rel+" nofollow":"nofollow"),z(e[n("LinkCustomAttributes")])&&(a=((e="")=>{let t=[];if(""!==e){let l=e.split(",");l.length&&l.forEach((e=>{let l=e.trim().split("|");2===l.length&&(t[l[0]]=l[1])}))}return t})(e[n("LinkCustomAttributes")])),ge()(l,a)};class it extends ke.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(){return V(this.state.screen)}render(){const e={...this.props},{label:t,blockAttributes:l,setAttributes:a,attrNameTemplate:n,excludeDirection:o}=e,r=["left","center","right"].filter((e=>![o].includes(e))),i="HorizontalAlignment",s=B(n,i),c=B(n,i,"Tablet"),u=B(n,i,"Mobile");return e.onChangeScreen=e=>{this.setState({screen:e})},e.onChangeAlignment=e=>{e.preventDefault();const t=this.getScreenLabelSuffix(),l=e.target.getAttribute("data-alignment");a({[`${s}${t}`]:l})},wp.element.createElement(y.BaseControl,{className:"qodef-alignment-horizontal-option"},wp.element.createElement(Se,{label:t,onChangeScreen:e.onChangeScreen}),"desktop"===this.state.screen&&wp.element.createElement(y.ButtonGroup,null,r.map(((t,a)=>wp.element.createElement(y.Button,{key:a,href:"#",icon:`editor-align${t}`,className:ve()("qodef-alignment-horizontal",{"qodef--selected":t===l[s]}),"data-alignment":t,onClick:e.onChangeAlignment})))),"tablet"===this.state.screen&&wp.element.createElement(y.ButtonGroup,null,r.map(((t,a)=>wp.element.createElement(y.Button,{key:a,href:"#",icon:`editor-align${t}`,className:ve()("qodef-alignment-horizontal",{"qodef--selected":t===l[c]}),"data-alignment":t,onClick:e.onChangeAlignment})))),"mobile"===this.state.screen&&wp.element.createElement(y.ButtonGroup,null,r.map(((t,a)=>wp.element.createElement(y.Button,{key:a,href:"#",icon:`editor-align${t}`,className:ve()("qodef-alignment-horizontal",{"qodef--selected":t===l[u]}),"data-alignment":t,onClick:e.onChangeAlignment})))))}}it.defaultProps={label:(0,e.__)("Alignment","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeDirection:""};const st=it,ct=e=>{const t=t=>B(e.attrNameTemplate,e.attrName,t),l=z(e,"all")&&void 0!==e.disableDirections&&e.disableDirections.length>0?e.disableDirections:[],a=z(e,"all")&&void 0!==e.isImportant&&e.isImportant?" !important":"",{blockAttributes:n}=e,o=["Top","Right","Bottom","Left"];let r={},i={},s={};return Object.entries(k).map((([c])=>{const u=V(c),m=t("Unit"+u),p="p"===n[m]?"%":n[m]||"px";[...o].map(((m,b)=>{const d=n[t(m+u)],g=n[t(`${m}Decimal`+u)];if(z(d)||z(g)){let t;const n=e.attrName?e.attrName.toLowerCase():"";if(n.includes("border")){if(n.includes("width"))t=`border${m}Width`;else if(n.includes("radius")){let e,l,a;l=b%2?o[b-1]:m,a=b%2?m:o[o.length-b-1],e=`${l}${a}`,t=`border${e}Radius`}}else t=e.attrName?`${n}${m}`:m.toLowerCase();let u="";if(R(p)&&""!==d?u=l.length>0&&l.includes(m)?"":parseInt(d,10)+p:L(p)&&""!==g&&(u=l.length>0&&l.includes(m)?"":parseFloat(g)+p),u)switch(c){case"desktop":r[t]=u+a;break;case"tablet":i[t]=u+a;break;case"mobile":s[t]=u+a}}}))})),{desktop:r,tablet:i,mobile:s}};ct.defaultProps={attrNameTemplate:"",attrName:"",blockAttributes:{},disableDirections:[],isImportant:!1};const ut=ct,mt=e=>{const{blockAttributes:t}=e,l=z(e,"all")&&e.attrNameTemplate||"",a=z(e,"all")&&e.disableWidthDirections||[],n=!z(e,"all")||(e.allowBorderColor??!0),o=(e,t)=>B(l,e,t);let r={},i={};const s=!z(e,"all")||(e.allowBorderRadius??!0)?ut({blockAttributes:t,attrNameTemplate:l,attrName:"BorderRadius",disableDirections:a}):{};return t[o("BorderStyle")]&&(r.borderStyle=t[o("BorderStyle")],n&&t[o("BorderColor")]&&(r.borderColor=t[o("BorderColor")]),i=ut({attrNameTemplate:l,attrName:"BorderWidth",blockAttributes:t})),ge()({desktop:r,tablet:{},mobile:{}},i,s)};mt.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0,blockAttributes:{}};const pt=mt,bt=e=>{const{blockAttributes:t}=e,l=z(e,"all")&&e.attrNameTemplate||"",a=z(e,"all")&&e.attrName||"Background",n=(e,t)=>B(l,a+e,t);let o={},r={},i={};return t[n("Attachment")]&&(o.backgroundAttachment=t[n("Attachment")]),Object.entries(k).map((([e])=>{let l=V(e),a={};if(t[n("Image",l)]&&t[n("Image",l)].url&&(a.backgroundImage=`url(${t[n("Image",l)].url})`),t[n("Repeat",l)]&&(a.backgroundRepeat=t[n("Repeat",l)]),"custom"===t[n("Position",l)]){let e="",o="";(t[n("XPosition",l)]||t[n("XPositionDecimal",l)])&&(R(t[n("XPositionUnit",l)])&&t[n("XPosition",l)]?e=parseInt(t[n("XPosition",l)],10)+t[n("XPositionUnit",l)]:L(t[n("XPositionUnit",l)])&&t[n("XPositionDecimal",l)]&&(e=parseFloat(t[n("XPositionDecimal",l)])+t[n("XPositionUnit",l)])),(t[n("YPosition",l)]||t[n("YPositionDecimal",l)])&&(R(t[n("YPositionUnit",l)])&&t[n("YPosition",l)]?o=parseInt(t[n("YPosition",l)],10)+t[n("YPositionUnit",l)]:L(t[n("YPositionUnit",l)])&&t[n("YPositionDecimal",l)]&&(o=parseFloat(t[n("YPositionDecimal",l)])+t[n("YPositionUnit",l)])),""===e&&""===o||(a.backgroundPosition=e+" "+o)}else t[n("Position",l)]&&(a.backgroundPosition=t[n("Position",l)]);"custom"===t[n("Size",l)]?(t[n("SizeWidth",l)]||t[n("SizeWidthDecimal",l)])&&(R(t[n("SizeWidthUnit",l)])&&t[n("SizeWidth",l)]?a.backgroundSize=parseInt(t[n("SizeWidth",l)],10)+t[n("SizeWidthUnit",l)]+" auto":L(t[n("SizeWidthUnit",l)])&&t[n("SizeWidthDecimal",l)]&&(a.backgroundSize=parseFloat(t[n("SizeWidthDecimal",l)])+t[n("SizeWidthUnit",l)]+" auto")):t[n("Size",l)]&&(a.backgroundSize=t[n("Size",l)]),Object.keys(a).length>0&&Object.entries(a).map((([t,l])=>{switch(e){case"desktop":o[t]=l;break;case"tablet":r[t]=l;break;case"mobile":i[t]=l}}))})),{desktop:o,tablet:r,mobile:i}};bt.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{}};const dt=bt,gt=e=>{const{blockAttributes:t}=e,l=z(e,"all")&&e.attrNameTemplate||"",a=(e,t)=>B(l,e,t),n=t[a("BackgroundType")]||"";let o={},r={},i={};if("gradient"===n){let e={type:"linear",position:"",color_1:"",location_1:"",color_2:"",location_2:""};t[a("BackgroundGradientColor1")]&&(e.color_1=t[a("BackgroundGradientColor1")]),z(t[a("BackgroundGradientLocation1")])&&(e.location_1=M(t[a("BackgroundGradientLocation1")])+"%"),t[a("BackgroundGradientColor2")]&&(e.color_2=t[a("BackgroundGradientColor2")]),z(t[a("BackgroundGradientLocation2")])&&(e.location_2=M(t[a("BackgroundGradientLocation2")])+"%"),t[a("BackgroundGradientType")]&&(e.type=t[a("BackgroundGradientType")]),"linear"===e.type&&""!==t[a("BackgroundGradientTypeAngle")]?e.position=M(t[a("BackgroundGradientTypeAngle")])+"deg":"radial"===e.type&&t[a("BackgroundGradientTypePosition")]&&(e.position="at "+t[a("BackgroundGradientTypePosition")]),e.type&&e.position&&e.color_1&&e.location_1&&e.color_2&&e.location_2?(o.backgroundColor="transparent",o.backgroundImage=`${e.type}-gradient(${e.position}, ${e.color_1} ${e.location_1}, ${e.color_2} ${e.location_2})`):e.color_1&&(o.backgroundColor=e.color_1)}else"video"===n?!t[a("BackgroundVideoPlayOnMobile")]&&t[a("BackgroundVideoFallbackImage")]&&t[a("BackgroundVideoFallbackImage")].url&&(r.backgroundImage=`url(${t[a("BackgroundVideoFallbackImage")].url})`,r.backgroundPosition="center",r.backgroundSize="cover"):(t[a("BackgroundColor")]&&(o.backgroundColor=t[a("BackgroundColor")]),i=dt({attrNameTemplate:l,blockAttributes:t}));return ge()({desktop:o,tablet:{},mobile:r},i)};gt.defaultProps={attrNameTemplate:"",blockAttributes:{}};const ft=gt,ht=e=>{const{blockAttributes:t,excludeOptions:l}=e,a=z(e,"all")&&e.attrNameTemplate||"",n=(e,t)=>B(a,e,t);let o={},r={x:0,y:0,blur:0,spread:0,color:"",position:""};var i;return t[n("BoxShadowColor")]&&(r.color=t[n("BoxShadowColor")]),""!==t[n("BoxShadowHorizontal")]&&(r.x=t[n("BoxShadowHorizontal")]),""!==t[n("BoxShadowVertical")]&&(r.y=t[n("BoxShadowVertical")]),""!==t[n("BoxShadowBlur")]&&(r.blur=t[n("BoxShadowBlur")]),""!==t[n("BoxShadowSpread")]&&(r.spread=t[n("BoxShadowSpread")]),i="position",l&&l.length&&l.includes(i)||!t[n("BoxShadowPosition")]||(r.position=t[n("BoxShadowPosition")]),r.color&&(o.boxShadow=r.x+"px "+r.y+"px "+r.blur+"px "+r.spread+"px "+r.color+" "+r.position),{desktop:o,tablet:{},mobile:{}}};ht.defaultProps={attrNameTemplate:"",blockAttributes:{}};const kt=ht,_t=e=>{const{blockAttributes:t}=e,l=(e,t="")=>B("",e,t),a=z(e,"all")&&e.excludePanels||[],n=z(e,"all")&&e.includePanels||[];let o=n&&n.length?n:["advanced","motion-effects","background","border","positioning","responsive"];a&&a.length&&a.forEach((e=>{o.splice(o.indexOf(e),1)}));let r={},i={},s={},c={},u={};o.includes("advanced")&&(z(t[l("zIndex")])&&(r.zIndex=M(t[l("zIndex")])),c=ut({attrName:l("Margin"),blockAttributes:t}),u=ut({attrName:l("Padding"),blockAttributes:t})),o.includes("motion-effects")&&void 0!==t[l("EntranceAnimation")]&&""!==t[l("EntranceAnimation")]&&t[l("EntranceAnimationDelay")]&&(r.animationDelay=M(t[l("EntranceAnimationDelay")])+"ms");let m={};o.includes("background")&&(m=ft({attrNameTemplate:"Advanced",blockAttributes:t}));let p={};if(o.includes("border")){const e=pt({attrNameTemplate:"Advanced",blockAttributes:t}),l=kt({attrNameTemplate:"Advanced",blockAttributes:t});p=ge()(e,l)}if(o.includes("positioning")){z(t[l("BlockPosition")])&&(r.position=t[l("BlockPosition")]);const e=t[l("PositionHorizontalOrientation")],a=t[l("PositionVerticalOrientation")];Object.entries(k).map((([n])=>{let o=V(n),c={};"custom"!==t[l("BlockWidth")]&&"custom"!==t[l("BlockWidth",o)]||!t[l("BlockCustomWidth",o)]&&!t[l("BlockCustomWidthDecimal",o)]||(R(t[l("BlockCustomWidthUnit",o)])&&t[l("BlockCustomWidth",o)]?(c.width=parseInt(t[l("BlockCustomWidth",o)],10)+t[l("BlockCustomWidthUnit",o)],c.maxWidth=parseInt(t[l("BlockCustomWidth",o)],10)+t[l("BlockCustomWidthUnit",o)]):L(t[l("BlockCustomWidthUnit",o)])&&t[l("BlockCustomWidthDecimal",o)]&&(c.width=parseFloat(t[l("BlockCustomWidthDecimal",o)])+t[l("BlockCustomWidthUnit",o)],c.maxWidth=parseFloat(t[l("BlockCustomWidthDecimal",o)])+t[l("BlockCustomWidthUnit",o)])),""===U(t[l("PositionHorizontalOffset",o)])&&""===U(t[l("PositionHorizontalOffsetDecimal",o)])||(R(t[l("PositionHorizontalOffsetUnit",o)])&&""!==U(t[l("PositionHorizontalOffset",o)])?c[e]=parseInt(t[l("PositionHorizontalOffset",o)],10)+t[l("PositionHorizontalOffsetUnit",o)]:L(t[l("PositionHorizontalOffsetUnit",o)])&&""!==U(t[l("PositionHorizontalOffsetDecimal",o)])&&(c[e]=parseFloat(t[l("PositionHorizontalOffsetDecimal",o)])+t[l("PositionHorizontalOffsetUnit",o)])),""===U(t[l("PositionVerticalOffset",o)])&&""===U(t[l("PositionVerticalOffsetDecimal",o)])||(R(t[l("PositionVerticalOffsetUnit",o)])&&""!==U(t[l("PositionVerticalOffset",o)])?c[a]=parseInt(t[l("PositionVerticalOffset",o)],10)+t[l("PositionVerticalOffsetUnit",o)]:L(t[l("PositionVerticalOffsetUnit",o)])&&""!==U(t[l("PositionVerticalOffsetDecimal",o)])&&(c[a]=parseFloat(t[l("PositionVerticalOffsetDecimal",o)])+t[l("PositionVerticalOffsetUnit",o)])),Object.keys(c).length>0&&Object.entries(c).map((([e,t])=>{switch(n){case"desktop":r[e]=t;break;case"tablet":i[e]=t;break;case"mobile":s[e]=t}}))}))}return r={desktop:r,tablet:i,mobile:s},ge()(r,c,u,m,p)};_t.defaultProps={blockAttributes:{},excludePanels:[],includePanels:[]};const vt=_t;let yt=[];const wt=qiBlocksEditor.vars.systemFontOptions,At=e=>{let t=!0;return e||(t=!1),wt&&wt.map((({value:e})=>e)).forEach((l=>{""!==l&&e===l&&(t=!1)})),t},St=e=>{Object.keys(e).filter((e=>e.match(/fontfamily/i))).forEach((t=>{const l=e[t];l&&setTimeout((()=>{(e=>{if(qiBlocksEditor.qodefGetCurrentBlockElement.getIframe()&&(yt=[]),yt.includes(e))return;const t=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument();if(t&&At(e)){const l=t.createElement("link");l.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)),l.setAttribute("rel","stylesheet"),l.setAttribute("type","text/css"),t.querySelector("head").appendChild(l)}yt.push(e)})(l)}),400)}))},qt=(0,he.createHigherOrderComponent)((e=>class extends ke.Component{static defaultProps={attributes:{}};componentDidMount(){St(this.props.attributes)}render(){return wp.element.createElement(e,this.props)}}),"withGoogleFont");var It=l(948),xt=l.n(It);const Et=(0,he.createHigherOrderComponent)((e=>class extends ke.Component{static defaultProps={clientId:"",attributes:{},setAttributes:()=>{}};componentDidMount(){const{clientId:e,attributes:t,setAttributes:l}=this.props;t.uniqueClass||l({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 l=!1,a=e?.parentNode;for(;a;){let e=a;if(e&&e?.classList?.contains(t)){l=!0;break}if(!e?.parentNode)break;a=e.parentNode}return l}reInitUniqueClass(e){const{clientId:t,attributes:l,setAttributes:a,isFullSiteEditor:n}=this.props,{uniqueClass:o}=l,r=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument(),i=this.getNewUniqueClass(t);let s=!1;if(n){if(o.includes("qodef-block")||o.includes("qodef-widget")){const e=r.querySelector(`.${o}`);if(e){this.hasParent(e,"wp-block-post-content")||(s=!0)}}e&&r.addEventListener("paste",(()=>{s=!0}))}!n&&o.includes("qodef-template-block")&&(s=!0),""!==o&&o!==i&&r.querySelectorAll(`.${o}`).length>1&&(s=!0),s&&a({uniqueClass:i})}render(){return this.reInitUniqueClass(),wp.element.createElement(e,this.props)}}),"withUniqueClass"),Ct=Et;function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},Tt.apply(this,arguments)}let Nt=[],Bt={family:[],weight:[],style:[]};const Pt=e=>{let t="";return Object.entries(e).map((([e,l])=>{if(e.match(/fontfamily/i)){const e=l.replace(/["']/g,"");!Nt.includes(e)&&At(e)&&(Bt.family.push(e),Nt.push(e))}e.match(/fontweight/i)&&Bt.weight.push(parseInt(l,10)),e.match(/fontstyle/i)&&Bt.style.push(l),t+=`${e.replace(/([A-Z])/g,((e,t,l)=>(l>0?"-":"")+e.toLowerCase()))}: ${l};`})),t},Vt=(0,he.createHigherOrderComponent)((e=>class extends ke.Component{addPageStyle(e){if(e){const t=this.postID;let l=this.getPageStyles||[],a={key:this.attributes.uniqueClass,values:[],fonts:[]};Nt=[],Bt={family:[],weight:[],style:[]},e.forEach(((n,o)=>{if(!Object.values(n.styles).every((e=>0===Object.keys(e).length))){const e=["widget","template"].includes(t)?"":`body[class*="-${t}"]`,l=`${e} ${n.selector}`,o=[];"string"!=typeof n.selector&&n.selector.forEach((t=>{t&&o.push(`${e} ${t}`)})),a.values.push({selector:o.length>1?o.join(","):l,styles:Pt(n.styles.desktop||""),tablet_styles:Pt(n.styles.tablet||""),mobile_styles:Pt(n.styles.mobile||""),custom_styles:n.custom_styles||[]}),a.fonts=Bt}if(o===e.length-1)if(l&&l.length){let e=!1;l.map(((t,n)=>{t.key===a.key&&(e=!0,a.values.length?xt()(t.values,a.values)||(l[n].values=a.values,l[n].fonts=a.fonts):(l[n].values=[],l[n].fonts={family:[],weight:[],style:[]}))})),!e&&a.values.length&&l.push(a)}else"object"==typeof l&&Object.keys(l).length?(l=Object.values(l),l.push(a)):l.push(a);const r=l.filter((e=>e.values.length));qiBlocksEditor.vars.currentPageID=t,qiBlocksEditor.vars.currentPageStyles=r}))}}render(){return wp.element.createElement(e,Tt({},this.props,{addPageStyle:this.addPageStyle}))}}),"withStyles"),Ot=(0,he.compose)((0,r.withSelect)((e=>{let t=e("core/editor")?.getCurrentPostId()||"widget";const l=!!e("core/edit-site");let a="desktop";return e("core/edit-post")&&(a=e("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase()),l&&(t="template",a=e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:a,postID:t,getPageStyles:e("qi-blocks/data/with-styles").getOptions(t).data,isFullSiteEditor:l}})),Ct,Vt);function Dt(){return Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},Dt.apply(this,arguments)}class Rt extends ke.Component{render(){const{attributes:t,setAttributes:l,previewScreen:a}=this.props,{uniqueClass:n,image:o,enablePopup:r,galleryData:i,imageHover:s,imageZoomOrigin:c}=t;const u=C(t),m=vt({blockAttributes:t}),p={className:x(t),style:O(m,a),...E(t)};u&&(p.id=u);const b=ve()(T("single-image",this.props),{"qi-block-fslightbox-popup qodef-popup-gallery":r,[`qodef-hover--${s}`]:s,[`qodef-hover-from--${c}`]:["zoom","zoom-out"].includes(s)&&c});t.galleryData=i&&""!==i?i:"gallery-"+Math.floor(1001*Math.random());const d=F({attributes:t,blockAttrName:"horizontalAlignment",cssProp:"textAlign"}),g=F({attributes:t,blockAttrName:"imageWidth",cssProp:"width"}),f=F({attributes:t,blockAttrName:"imageMaxWidth",cssProp:"maxWidth"}),h=F({attributes:t,blockAttrName:"imageHeight",cssProp:"height"}),k=F({attributes:t,blockAttrName:"imageOpacityDecimal",cssProp:"opacity",customUnitValue:!0}),_=F({attributes:t,blockAttrName:"transitionDurationDecimal",cssProp:"transitionDuration",customUnitValue:!0},"%ss"),v=pt({attrNameTemplate:"Image",blockAttributes:t}),w=F({attributes:t,blockAttrName:"imageHoverOpacityDecimal",cssProp:"opacity",customUnitValue:!0}),S=ge()(g,f,h,k,_,v),q=w;return this.props.addPageStyle([{selector:`.${n}.qodef-block-container`,styles:m},{selector:`.${n} .qi-block-single-image`,styles:d},{selector:[`.${n} .qi-block-single-image img`,`.${n} .qi-block-single-image svg`],styles:S},{selector:[`.${n} .qi-block-single-image:hover img`,`.${n} .qi-block-single-image:hover svg`],styles:q}]),wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(fe.InspectorControls,null,wp.element.createElement(y.TabPanel,{className:"qodef-tab-panel qodef--single-image",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")}]},(a=>wp.element.createElement(wp.element.Fragment,null,"content"===a.name&&wp.element.createElement(y.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(at,{blockAttributes:t,setAttributes:l,allowDefaultImage:!0,additionalImageSizes:j("masonry_image_sizes",!1)}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Action","qi-blocks"),options:[{value:"",label:(0,e.__)("No Action","qi-blocks")},{value:"custom-link",label:(0,e.__)("Custom Link","qi-blocks")},{value:"home-link",label:(0,e.__)("Set Site Home Link","qi-blocks")}],value:t.imageAction,onChange:e=>{l({imageAction:e})}}),"inline"!==t.blockWidth&&wp.element.createElement(st,{blockAttributes:t,setAttributes:l}),"custom-link"===t.imageAction&&wp.element.createElement(ot,{label:(0,e.__)("Custom Link","qi-blocks"),blockAttributes:t,setAttributes:l}),""===t.imageAction&&wp.element.createElement(A,{label:(0,e.__)("Enable Lightbox Popup","qi-blocks"),blockAttributeKey:"enablePopup",blockAttributes:t,setAttributes:l}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Hover","qi-blocks"),value:s,options:[{value:"",label:(0,e.__)("None","qi-blocks")},{value:"zoom",label:(0,e.__)("Zoom","qi-blocks")},{value:"zoom-out",label:(0,e.__)("Zoom Out","qi-blocks")},{value:"move",label:(0,e.__)("Move","qi-blocks")}],onChange:e=>l({imageHover:e})}),["zoom","zoom-out"].includes(s)&&wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Hover Zoom Origin","qi-blocks"),value:c,options:[{value:"",label:(0,e.__)("Center","qi-blocks")},{value:"top",label:(0,e.__)("Top","qi-blocks")},{value:"bottom",label:(0,e.__)("Bottom","qi-blocks")},{value:"left",label:(0,e.__)("Left","qi-blocks")},{value:"right",label:(0,e.__)("Right","qi-blocks")}],onChange:e=>l({imageZoomOrigin:e})})),"style"===a.name&&wp.element.createElement(y.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(Fe,{label:(0,e.__)("Width","qi-blocks"),blockAttributeKey:"imageWidth",setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,rangeDecimalMin:1,rangeDecimalStep:1,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(Fe,{label:(0,e.__)("Max Width","qi-blocks"),blockAttributeKey:"imageMaxWidth",setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,rangeDecimalMin:1,rangeDecimalStep:1,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(Fe,{label:(0,e.__)("Height","qi-blocks"),blockAttributeKey:"imageHeight",setAttributes:l,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,rangeDecimalMin:1,rangeDecimalStep:1,unitType:"height",allowScreens:!0}),wp.element.createElement(y.TabPanel,{className:"qodef-tab-panel qodef--inner",tabs:[{name:"normal",title:(0,e.__)("Normal","qi-blocks")},{name:"hover",title:(0,e.__)("Hover","qi-blocks")}]},(a=>wp.element.createElement(y.Card,{size:"small"},wp.element.createElement(y.CardBody,null,"normal"===a.name&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Fe,{label:(0,e.__)("Opacity","qi-blocks"),blockAttributeKey:"imageOpacity",setAttributes:l,blockAttributes:t,rangeDecimalMax:1,rangeDecimalMin:0,rangeDecimalStep:.1,optionType:"decimal",allowUnits:!1})),"hover"===a.name&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Fe,{label:(0,e.__)("Opacity","qi-blocks"),blockAttributeKey:"imageHoverOpacity",setAttributes:l,blockAttributes:t,rangeDecimalMax:1,rangeDecimalMin:0,rangeDecimalStep:.1,optionType:"decimal",allowUnits:!1}),wp.element.createElement(Fe,{label:(0,e.__)("Transition Duration (s)","qi-blocks"),blockAttributeKey:"transitionDuration",setAttributes:l,blockAttributes:t,rangeDecimalMax:4,rangeDecimalMin:0,rangeDecimalStep:.1,optionType:"decimal",allowUnits:!1})))))),wp.element.createElement(Ye,{blockAttributes:t,setAttributes:l,attrNameTemplate:"Image"})),"advanced"===a.name&&wp.element.createElement(Qe,{blockAttributes:t,setAttributes:l}))))),wp.element.createElement("style",null,D(O(S,a),!1)&&`.${n} .qi-block-single-image img,\n\t\t\t\t\t\t .${n} .qi-block-single-image svg {\n\t\t\t\t\t\t\t${D(O(S,a),!1)}\n\t\t\t\t\t\t}`,D(O(q,a),!1)&&`.${n} .qi-block-single-image:hover img,\n\t\t\t\t\t\t .${n} .qi-block-single-image:hover svg {\n\t\t\t\t\t\t\t${D(O(q,a),!1)}\n\t\t\t\t\t\t}`),wp.element.createElement("div",p,wp.element.createElement("div",{className:b,style:O(d,a)},o&&o.url&&(()=>{const e=rt(t,"");let l="";return o&&o.url&&(l=`<img src="${o.url}" alt="${o.alt}"/>`,o.html&&(l=o.html)),"home-link"===t.imageAction?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",{href:qiBlocksEditor.vars.siteURL,dangerouslySetInnerHTML:{__html:l}})):""===t.imageAction&&r?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",{className:"qodef-popup-item",href:o?.url,"data-type":"image","data-fslightbox":i,dangerouslySetInnerHTML:{__html:l}})):"custom-link"===t.imageAction&&z(t.link)?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",Dt({},e,{dangerouslySetInnerHTML:{__html:l}}))):wp.element.createElement("div",{className:"qodef-m-image",dangerouslySetInnerHTML:{__html:l}})})())))}}Rt.defaultProps={previewScreen:h};const Lt=(0,he.compose)(Ot,qt)(Rt);function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},Mt.apply(this,arguments)}class zt extends ke.Component{render(){const{attributes:e}=this.props,{image:t,enablePopup:l,galleryData:a,imageHover:n,imageZoomOrigin:o}=e;const r=C(e),i={className:x(e),...E(e)};r&&(i.id=r);const s=ve()(T("single-image",this.props),{"qi-block-fslightbox-popup qodef-popup-gallery":l,[`qodef-hover--${n}`]:n,[`qodef-hover-from--${o}`]:["zoom","zoom-out"].includes(n)&&o});return wp.element.createElement("div",i,wp.element.createElement("div",{className:s},t&&t.url&&(()=>{const o=rt(e,"");let r="";if(t&&t.url){r=`<img class="${t.id?`wp-image-${t.id}`:""}" ${n?'loading="eager"':""} src="${t.url}" alt="${t.alt}"/>`,t.html&&(r=t.html)}return"home-link"===e.imageAction?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",{href:qiBlocksEditor.vars.siteURL,dangerouslySetInnerHTML:{__html:r}})):""===e.imageAction&&l?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",{className:"qodef-popup-item",href:t?.url,"data-type":"image","data-fslightbox":a,dangerouslySetInnerHTML:{__html:r}})):"custom-link"===e.imageAction&&z(e.link)?wp.element.createElement("div",{className:"qodef-m-image"},wp.element.createElement("a",Mt({},o,{dangerouslySetInnerHTML:{__html:r}}))):wp.element.createElement("div",{className:"qodef-m-image",dangerouslySetInnerHTML:{__html:r}})})()))}}const Ut=zt,jt={attributes:{image:{id:null,url:qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder}}};var Ft,Kt;function Ht(){return Ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},Ht.apply(this,arguments)}const Gt=e=>s.createElement("svg",Ht({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),Ft||(Ft=s.createElement("path",{fill:"none",stroke:"#EE2852",strokeMiterlimit:10,d:"M.5 3.578h23v17H.5z"})),Kt||(Kt=s.createElement("path",{fill:"#EE2852",d:"M16.614 8H7.281v8h9.333zm-7.999 7.335h-.667v-2.668l2-2.001 3.334 2.667 2.665-1.999v4.001H8.615m4.679-6.377q.384 0 .654.281.272.282.271.655c-.001.373-.09.468-.271.654a.87.87 0 0 1-.654.282.87.87 0 0 1-.657-.282q-.271-.28-.271-.654v-.375l.271-.28a.88.88 0 0 1 .657-.281"})));(0,t.registerBlockType)("qi-blocks/single-image",{icon:wp.element.createElement(Gt,null),title:(0,e.__)("Single Image","qi-blocks"),description:(0,e.__)("Create easily configurable individual image displays on your website pages.","qi-blocks"),category:"qi-blocks",keywords:[(0,e.__)("image","qi-blocks"),(0,e.__)("showcase","qi-blocks"),(0,e.__)("lightbox popup","qi-blocks"),(0,e.__)("image hover","qi-blocks"),(0,e.__)("qi","qi-blocks")],attributes:be,example:jt,edit:Lt,save:Ut})})()})();