1 line
56 KiB
JavaScript
1 line
56 KiB
JavaScript
(()=>{var e={4213(e,t){var n,a;void 0===(a="function"==typeof(n=function(){"use strict";function t(e,t,n){var a=new XMLHttpRequest;a.open("GET",e),a.responseType="blob",a.onload=function(){r(a.response,t,n)},a.onerror=function(){console.error("could not download file")},a.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var s="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof globalThis&&globalThis.global===globalThis?globalThis:void 0,o=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),r=s.saveAs||("object"!=typeof window||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!o?function(e,o,r){var i=s.URL||s.webkitURL,l=document.createElement("a");o=o||e.name||"download",l.download=o,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?a(l):n(l.href)?t(e,o,r):a(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,s,o){if(s=s||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),s);else if(n(e))t(e,s,o);else{var r=document.createElement("a");r.href=e,r.target="_blank",setTimeout((function(){a(r)}))}}:function(e,n,a,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,a);var i="application/octet-stream"===e.type,l=/constructor/i.test(s.HTMLElement)||s.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&l||o)&&"undefined"!=typeof FileReader){var m=new FileReader;m.onloadend=function(){var e=m.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},m.readAsDataURL(e)}else{var p=s.URL||s.webkitURL,h=p.createObjectURL(e);r?r.location=h:location.href=h,r=null,setTimeout((function(){p.revokeObjectURL(h)}),4e4)}});s.saveAs=r.saveAs=r,e.exports=r})?n.apply(t,[]):n)||(e.exports=a)}},t={};function n(a){var s=t[a];if(void 0!==s)return s.exports;var o=t[a]={exports:{}};return e[a].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React,{entries:t,setPrototypeOf:a,isFrozen:s,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:l,create:c}=Object,{apply:m,construct:p}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),l||(l=function(e){return e}),m||(m=function(e,t){for(var n=arguments.length,a=new Array(n>2?n-2:0),s=2;s<n;s++)a[s-2]=arguments[s];return e.apply(t,a)}),p||(p=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return new e(...n)});const h=A(Array.prototype.forEach),u=A(Array.prototype.lastIndexOf),d=A(Array.prototype.pop),g=A(Array.prototype.push),f=A(Array.prototype.splice),b=A(String.prototype.toLowerCase),E=A(String.prototype.toString),w=A(String.prototype.match),v=A(String.prototype.replace),k=A(String.prototype.indexOf),y=A(String.prototype.trim),S=A(Object.prototype.hasOwnProperty),T=A(RegExp.prototype.test),_=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return p(N,t)});var N;function A(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,a=new Array(n>1?n-1:0),s=1;s<n;s++)a[s-1]=arguments[s];return m(e,t,a)}}function x(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;a&&a(e,null);let o=t.length;for(;o--;){let a=t[o];if("string"==typeof a){const e=n(a);e!==a&&(s(t)||(t[o]=e),a=e)}e[a]=!0}return e}function L(e){for(let t=0;t<e.length;t++)S(e,t)||(e[t]=null);return e}function C(e){const n=c(null);for(const[a,s]of t(e))S(e,a)&&(Array.isArray(s)?n[a]=L(s):s&&"object"==typeof s&&s.constructor===Object?n[a]=C(s):n[a]=s);return n}function M(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=o(e)}return function(){return null}}const R=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),z=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),I=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),O=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),D=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),H=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=i(["#text"]),B=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),F=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),U=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),V=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=l(/\{\{[\w\W]*|[\w\W]*\}\}/gm),q=l(/<%[\w\W]*|[\w\W]*%>/gm),j=l(/\$\{[\w\W]*/gm),W=l(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y=l(/^aria-[\-\w]+$/),X=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Z=l(/^(?:\w+script|data):/i),J=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=l(/^html$/i),$=l(/^[a-z][.\w]*(-[.\w]+)+$/i);var Q=Object.freeze({__proto__:null,ARIA_ATTR:Y,ATTR_WHITESPACE:J,CUSTOM_ELEMENT:$,DATA_ATTR:W,DOCTYPE_NAME:K,ERB_EXPR:q,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:Z,MUSTACHE_EXPR:G,TMPLIT_EXPR:j});const ee=function(){return"undefined"==typeof window?null:window};var te=function e(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ee();const a=t=>e(t);if(a.version="3.3.3",a.removed=[],!n||!n.document||9!==n.document.nodeType||!n.Element)return a.isSupported=!1,a;let{document:s}=n;const o=s,r=o.currentScript,{DocumentFragment:l,HTMLTemplateElement:m,Node:p,Element:N,NodeFilter:A,NamedNodeMap:L=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:q,trustedTypes:j}=n,W=N.prototype,Y=M(W,"cloneNode"),Z=M(W,"remove"),J=M(W,"nextSibling"),$=M(W,"childNodes"),te=M(W,"parentNode");if("function"==typeof m){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let ne,ae="";const{implementation:se,createNodeIterator:oe,createDocumentFragment:re,getElementsByTagName:ie}=s,{importNode:le}=o;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};a.isSupported="function"==typeof t&&"function"==typeof te&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:me,ERB_EXPR:pe,TMPLIT_EXPR:he,DATA_ATTR:ue,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:fe,CUSTOM_ELEMENT:be}=Q;let{IS_ALLOWED_URI:Ee}=Q,we=null;const ve=x({},[...R,...z,...I,...D,...P]);let ke=null;const ye=x({},[...B,...F,...U,...V]);let Se=Object.seal(c(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}})),Te=null,_e=null;const Ne=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ae=!0,xe=!0,Le=!1,Ce=!0,Me=!1,Re=!0,ze=!1,Ie=!1,Oe=!1,De=!1,He=!1,Pe=!1,Be=!0,Fe=!1,Ue=!0,Ve=!1,Ge={},qe=null;const je=x({},["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 We=null;const Ye=x({},["audio","video","img","source","image","track"]);let Xe=null;const Ze=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Ke="http://www.w3.org/2000/svg",$e="http://www.w3.org/1999/xhtml";let Qe=$e,et=!1,tt=null;const nt=x({},[Je,Ke,$e],E);let at=x({},["mi","mo","mn","ms","mtext"]),st=x({},["annotation-xml"]);const ot=x({},["title","style","font","a","script"]);let rt=null;const it=["application/xhtml+xml","text/html"];let lt=null,ct=null;const mt=s.createElement("form"),pt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=C(e),rt=-1===it.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===rt?E:b,we=S(e,"ALLOWED_TAGS")?x({},e.ALLOWED_TAGS,lt):ve,ke=S(e,"ALLOWED_ATTR")?x({},e.ALLOWED_ATTR,lt):ye,tt=S(e,"ALLOWED_NAMESPACES")?x({},e.ALLOWED_NAMESPACES,E):nt,Xe=S(e,"ADD_URI_SAFE_ATTR")?x(C(Ze),e.ADD_URI_SAFE_ATTR,lt):Ze,We=S(e,"ADD_DATA_URI_TAGS")?x(C(Ye),e.ADD_DATA_URI_TAGS,lt):Ye,qe=S(e,"FORBID_CONTENTS")?x({},e.FORBID_CONTENTS,lt):je,Te=S(e,"FORBID_TAGS")?x({},e.FORBID_TAGS,lt):C({}),_e=S(e,"FORBID_ATTR")?x({},e.FORBID_ATTR,lt):C({}),Ge=!!S(e,"USE_PROFILES")&&e.USE_PROFILES,Ae=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ce=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,Re=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,De=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Pe=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,Ue=!1!==e.KEEP_CONTENT,Ve=e.IN_PLACE||!1,Ee=e.ALLOWED_URI_REGEXP||X,Qe=e.NAMESPACE||$e,at=e.MATHML_TEXT_INTEGRATION_POINTS||at,st=e.HTML_INTEGRATION_POINTS||st,Se=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(xe=!1),He&&(De=!0),Ge&&(we=x({},P),ke=c(null),!0===Ge.html&&(x(we,R),x(ke,B)),!0===Ge.svg&&(x(we,z),x(ke,F),x(ke,V)),!0===Ge.svgFilters&&(x(we,I),x(ke,F),x(ke,V)),!0===Ge.mathMl&&(x(we,D),x(ke,U),x(ke,V))),S(e,"ADD_TAGS")||(Ne.tagCheck=null),S(e,"ADD_ATTR")||(Ne.attributeCheck=null),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Ne.tagCheck=e.ADD_TAGS:(we===ve&&(we=C(we)),x(we,e.ADD_TAGS,lt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Ne.attributeCheck=e.ADD_ATTR:(ke===ye&&(ke=C(ke)),x(ke,e.ADD_ATTR,lt))),e.ADD_URI_SAFE_ATTR&&x(Xe,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(qe===je&&(qe=C(qe)),x(qe,e.FORBID_CONTENTS,lt)),e.ADD_FORBID_CONTENTS&&(qe===je&&(qe=C(qe)),x(qe,e.ADD_FORBID_CONTENTS,lt)),Ue&&(we["#text"]=!0),ze&&x(we,["html","head","body"]),we.table&&(x(we,["tbody"]),delete Te.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,ae=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const a="data-tt-policy-suffix";t&&t.hasAttribute(a)&&(n=t.getAttribute(a));const s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+s+" could not be created."),null}}(j,r)),null!==ne&&"string"==typeof ae&&(ae=ne.createHTML(""));i&&i(e),ct=e}},ut=x({},[...z,...I,...O]),dt=x({},[...D,...H]),gt=function(e){g(a.removed,{element:e});try{te(e).removeChild(e)}catch(t){Z(e)}},ft=function(e,t){try{g(a.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(a.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(De||He)try{gt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Oe)e="<remove></remove>"+e;else{const t=w(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===rt&&Qe===$e&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const a=ne?ne.createHTML(e):e;if(Qe===$e)try{t=(new q).parseFromString(a,rt)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=et?ae:a}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(s.createTextNode(n),o.childNodes[0]||null),Qe===$e?ie.call(t,ze?"html":"body")[0]:ze?t.documentElement:o},Et=function(e){return oe.call(e.ownerDocument||e,e,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT|A.SHOW_PROCESSING_INSTRUCTION|A.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof G&&("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)},vt=function(e){return"function"==typeof p&&e instanceof p};function kt(e,t,n){h(e,(e=>{e.call(a,t,n,ct)}))}const yt=function(e){let t=null;if(kt(ce.beforeSanitizeElements,e,null),wt(e))return gt(e),!0;const n=lt(e.nodeName);if(kt(ce.uponSanitizeElement,e,{tagName:n,allowedTags:we}),Re&&e.hasChildNodes()&&!vt(e.firstElementChild)&&T(/<[/\w!]/g,e.innerHTML)&&T(/<[/\w!]/g,e.textContent))return gt(e),!0;if(7===e.nodeType)return gt(e),!0;if(Re&&8===e.nodeType&&T(/<[/\w]/g,e.data))return gt(e),!0;if(!(Ne.tagCheck instanceof Function&&Ne.tagCheck(n))&&(!we[n]||Te[n])){if(!Te[n]&&Tt(n)){if(Se.tagNameCheck instanceof RegExp&&T(Se.tagNameCheck,n))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))return!1}if(Ue&&!qe[n]){const t=te(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t)for(let a=n.length-1;a>=0;--a){const s=Y(n[a],!0);s.__removalCount=(e.__removalCount||0)+1,t.insertBefore(s,J(e))}}return gt(e),!0}return e instanceof N&&!function(e){let t=te(e);t&&t.tagName||(t={namespaceURI:Qe,tagName:"template"});const n=b(e.tagName),a=b(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===Ke?t.namespaceURI===$e?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===a||at[a]):Boolean(ut[n]):e.namespaceURI===Je?t.namespaceURI===$e?"math"===n:t.namespaceURI===Ke?"math"===n&&st[a]:Boolean(dt[n]):e.namespaceURI===$e?!(t.namespaceURI===Ke&&!st[a])&&!(t.namespaceURI===Je&&!at[a])&&!dt[n]&&(ot[n]||!ut[n]):!("application/xhtml+xml"!==rt||!tt[e.namespaceURI]))}(e)?(gt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!T(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&3===e.nodeType&&(t=e.textContent,h([me,pe,he],(e=>{t=v(t,e," ")})),e.textContent!==t&&(g(a.removed,{element:e.cloneNode()}),e.textContent=t)),kt(ce.afterSanitizeElements,e,null),!1):(gt(e),!0)},St=function(e,t,n){if(_e[t])return!1;if(Be&&("id"===t||"name"===t)&&(n in s||n in mt))return!1;if(xe&&!_e[t]&&T(ue,t));else if(Ae&&T(de,t));else if(Ne.attributeCheck instanceof Function&&Ne.attributeCheck(t,e));else if(!ke[t]||_e[t]){if(!(Tt(e)&&(Se.tagNameCheck instanceof RegExp&&T(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&T(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t,e))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&T(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if(Xe[t]);else if(T(Ee,v(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==k(n,"data:")||!We[e])if(Le&&!T(ge,v(n,fe,"")));else if(n)return!1;return!0},Tt=function(e){return"annotation-xml"!==e&&w(e,be)},_t=function(e){kt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||wt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ke,forceKeepAttr:void 0};let s=t.length;for(;s--;){const o=t[s],{name:r,namespaceURI:i,value:l}=o,c=lt(r),m=l;let p="value"===r?m:y(m);if(n.attrName=c,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,kt(ce.uponSanitizeAttribute,e,n),p=n.attrValue,!Fe||"id"!==c&&"name"!==c||(ft(r,e),p="user-content-"+p),Re&&T(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)){ft(r,e);continue}if("attributename"===c&&w(p,"href")){ft(r,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){ft(r,e);continue}if(!Ce&&T(/\/>/i,p)){ft(r,e);continue}Me&&h([me,pe,he],(e=>{p=v(p,e," ")}));const u=lt(e.nodeName);if(St(u,c,p)){if(ne&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(i);else switch(j.getAttributeType(u,c)){case"TrustedHTML":p=ne.createHTML(p);break;case"TrustedScriptURL":p=ne.createScriptURL(p)}if(p!==m)try{i?e.setAttributeNS(i,r,p):e.setAttribute(r,p),wt(e)?gt(e):d(a.removed)}catch(t){ft(r,e)}}else ft(r,e)}kt(ce.afterSanitizeAttributes,e,null)},Nt=function e(t){let n=null;const a=Et(t);for(kt(ce.beforeSanitizeShadowDOM,t,null);n=a.nextNode();)kt(ce.uponSanitizeShadowNode,n,null),yt(n),_t(n),n.content instanceof l&&e(n.content);kt(ce.afterSanitizeShadowDOM,t,null)};return a.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,s=null,r=null,i=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!vt(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!a.isSupported)return e;if(Ie||ht(t),a.removed=[],"string"==typeof e&&(Ve=!1),Ve){if(e.nodeName){const t=lt(e.nodeName);if(!we[t]||Te[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof p)n=bt("\x3c!----\x3e"),s=n.ownerDocument.importNode(e,!0),1===s.nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!De&&!Me&&!ze&&-1===e.indexOf("<"))return ne&&Pe?ne.createHTML(e):e;if(n=bt(e),!n)return De?null:Pe?ae:""}n&&Oe&>(n.firstChild);const c=Et(Ve?e:n);for(;r=c.nextNode();)yt(r),_t(r),r.content instanceof l&&Nt(r.content);if(Ve)return e;if(De){if(He)for(i=re.call(n.ownerDocument);n.firstChild;)i.appendChild(n.firstChild);else i=n;return(ke.shadowroot||ke.shadowrootmode)&&(i=le.call(o,i,!0)),i}let m=ze?n.outerHTML:n.innerHTML;return ze&&we["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&T(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Me&&h([me,pe,he],(e=>{m=v(m,e," ")})),ne&&Pe?ne.createHTML(m):m},a.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ie=!0},a.clearConfig=function(){ct=null,Ie=!1},a.isValidAttribute=function(e,t,n){ct||ht({});const a=lt(e),s=lt(t);return St(a,s,n)},a.addHook=function(e,t){"function"==typeof t&&g(ce[e],t)},a.removeHook=function(e,t){if(void 0!==t){const n=u(ce[e],t);return-1===n?void 0:f(ce[e],n,1)[0]}return d(ce[e])},a.removeHooks=function(e){ce[e]=[]},a.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},a}();function ne(e){return te.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0}})}const ae=wp.element.createElement;function se(t){return"effects"===t?ae("svg",{width:20,height:20,viewBox:"0 0 113 113",fillRule:"evenodd"},ae("path",{d:"M106.283 6.217c8.289 8.29 8.289 91.776 0 100.066-8.29 8.289-91.776 8.289-100.066 0-8.289-8.29-8.289-91.776 0-100.066 8.29-8.289 91.776-8.289 100.066 0zM96.276 16.224c6.632 6.632 6.632 73.42 0 80.052-6.632 6.632-73.42 6.632-80.052 0-6.632-6.632-6.632-73.42 0-80.052 6.632-6.632 73.42-6.632 80.052 0z"}),ae("path",{d:"M48.418 58.413H33.304c-.71 0-1.019-.577-.687-1.288l16.637-35.68c.332-.71 1.178-1.287 1.889-1.287h22.962c.711 0 1.02.577.687 1.288l-10.934 23.45h15.74c.796 0 1.14.647.77 1.443L37.959 91.72c-2.42 2.448-5.343.578-3.83-2.666l14.289-30.642z"})):"colors"===t?ae("svg",{width:20,height:20,viewBox:"0 0 113 113",fillRule:"evenodd"},ae("path",{d:"M106.283,6.217c8.289,8.29 8.289,91.776 0,100.066c-8.29,8.289 -91.776,8.289 -100.066,0c-8.289,-8.29 -8.289,-91.776 0,-100.066c8.29,-8.289 91.776,-8.289 100.066,0Zm-50.033,12.818c-20.551,0 -37.215,16.664 -37.215,37.215c0,20.551 16.664,37.215 37.215,37.215c3.432,0 6.202,-2.77 6.202,-6.203c0,-1.612 -0.62,-3.059 -1.612,-4.176c-0.951,-1.075 -1.571,-2.522 -1.571,-4.094c0,-3.432 2.77,-6.202 6.202,-6.202l7.319,0c11.413,0 20.675,-9.262 20.675,-20.675c0,-18.277 -16.664,-33.08 -37.215,-33.08Zm-22.742,37.215c-3.433,0 -6.203,-2.77 -6.203,-6.202c0,-3.433 2.77,-6.203 6.203,-6.203c3.432,0 6.202,2.77 6.202,6.203c0,3.432 -2.77,6.202 -6.202,6.202Zm45.484,0c-3.432,0 -6.202,-2.77 -6.202,-6.202c0,-3.433 2.77,-6.203 6.202,-6.203c3.433,0 6.203,2.77 6.203,6.203c0,3.432 -2.77,6.202 -6.203,6.202Zm-33.079,-16.54c-3.433,0 -6.203,-2.77 -6.203,-6.202c0,-3.433 2.77,-6.203 6.203,-6.203c3.432,0 6.202,2.77 6.202,6.203c0,3.432 -2.77,6.202 -6.202,6.202Zm20.674,0c-3.432,0 -6.202,-2.77 -6.202,-6.202c0,-3.433 2.77,-6.203 6.202,-6.203c3.433,0 6.203,2.77 6.203,6.203c0,3.432 -2.77,6.202 -6.203,6.202Z"})):"gradient"===t?ae("svg",{width:24,height:24,viewBox:"0 0 24 24",fillRule:"evenodd"},ae("path",{d:"M17.66 8L12 2.35L6.34 8A8.02 8.02 0 0 0 4 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0 0 11.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8zM6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14H6z"})):"copy"===t?(0,e.createElement)("svg",{strokeWidth:"1.2",fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M19.4 20H9.6a.6.6 0 0 1-.6-.6V9.6a.6.6 0 0 1 .6-.6h9.8a.6.6 0 0 1 .6.6v9.8a.6.6 0 0 1-.6.6Z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,e.createElement)("path",{d:"M15 9V4.6a.6.6 0 0 0-.6-.6H4.6a.6.6 0 0 0-.6.6v9.8a.6.6 0 0 0 .6.6H9",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})):"link"===t?(0,e.createElement)("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})):"globe"===t?(0,e.createElement)("svg",{width:"20",height:"20",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",role:"img","aria-hidden":"true",focusable:"false"},(0,e.createElement)("path",{d:"M512 1024q-104 0-199-40.5t-163.5-109T40.5 711 0 512t40.5-199 109-163.5T313 40.5 512 0t199 40.5 163.5 109 109 163.5 40.5 199-40.5 199-109 163.5-163.5 109-199 40.5zM293 293l-48-42q-11 0-26 2.5t-27 2.5q-1-1-18-37Q64 346 64 512q0 3 .5 8t.5 7q6 6 29.5 22.5T128 576h64q3-2 5.5-3t5.5-2q-10-11-29.5-32.5T144 507q4-23 11-69.5t10-69.5q86-36 128-53v-22zm201-163q-14-6-26-11-3-8-4-12-6 19-19 57 4 1 11.5 2t11.5 2h26v-38zm-4 471q-5 5-7 8-12 21-34 64t-33 64q14 21 42.5 64t42.5 64q130 8 197 12 2 25 16 34 91-46 154-127.5T951 601q-19-4-41.5-11t-32.5-9.5-39.5-5T776 579q-12 1-15.5-15.5t-3.5-34-4-18.5q-22-4-89 7.5t-89 7.5q-13 12-85 75zm59-501q-3 20-10.5 60T527 221q5-1 16.5-2.5T560 217q-3-2-7-4 15-5 22-8-17-70-26-105zm116-9q-2 11-2 31t-10 53q1 2 4 4 20-2 67-7 0-21 21-42-38-23-80-39zm125 70q-2 4-7 11 19 3 25 5-12-11-18-16zm27 24q-3 6-9.5 18t-9.5 18q-29 1-78 3l-4-34q-2 1-7 2.5t-8 1.5v49q-21 2-64.5 6t-64.5 6q-7 10-15 22 27 58 41 87-20 5-82 22v34q0 2 1.5 6t2.5 6q17 8 53 24t54 25l22-27q-1-10-5-31.5t-6-32.5q3-2 9.5-5.5t9.5-5.5q27-8 41-11 13 21 36.5 60t29.5 49q9-8 25-24.5t24-24.5q-54-38-71-49 1-8 4-23h37q56 48 115 98 1 0 2-1.5t2-1.5q-4-8-26-49 0-1 3-4l4-4h41q1-1 17-9-34-116-124-200z"})):"info"===t?(0,e.createElement)("svg",{width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024","aria-hidden":"true"},(0,e.createElement)("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}),(0,e.createElement)("path",{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"})):"wrench"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,e.createElement)("rect",{x:"0",fill:"none",width:"20",height:"20"}),(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M16.68 9.77c-1.34 1.34-3.3 1.67-4.95.99l-5.41 6.52c-.99.99-2.59.99-3.58 0s-.99-2.59 0-3.57l6.52-5.42c-.68-1.65-.35-3.61.99-4.95 1.28-1.28 3.12-1.62 4.72-1.06l-2.89 2.89 2.82 2.82 2.86-2.87c.53 1.58.18 3.39-1.08 4.65zM3.81 16.21c.4.39 1.04.39 1.43 0 .4-.4.4-1.04 0-1.43-.39-.4-1.03-.4-1.43 0-.39.39-.39 1.03 0 1.43z"}))):"x"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},(0,e.createElement)("rect",{x:"0",fill:"none",width:"20",height:"20"}),(0,e.createElement)("g",null,(0,e.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))):"trash"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",style:{fill:"none"},stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},(0,e.createElement)("path",{d:"M3 6h18M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2M10 11v6M14 11v6"})):"question"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",style:{fill:"none"},stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},(0,e.createElement)("circle",{cx:"12",cy:"12",r:"10"}),(0,e.createElement)("path",{d:"M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3M12 17h.01"})):"lock"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",style:{fill:"none"},stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24"},(0,e.createElement)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),(0,e.createElement)("path",{d:"M7 11V7a5 5 0 0110 0v4"})):"template-library"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"gblocks-block-icon"},(0,e.createElement)("path",{style:{fill:"none"},d:"M0 0h24v24H0z"}),(0,e.createElement)("path",{d:"M21.375 12.625H2.625A.625.625 0 0 1 2 12V2.625C2 2.28 2.28 2 2.625 2h18.75c.345 0 .625.28.625.625V12c0 .345-.28.625-.625.625zM3.25 11.375h17.5V3.25H3.25v8.125zM10.283 22H2.625A.625.625 0 0 1 2 21.375V15.31c0-.345.28-.625.625-.625h7.658c.345 0 .625.28.625.625v6.065c0 .345-.28.625-.625.625zM3.25 20.75h6.407v-4.815H3.25v4.815zm18.125-1.783h-7.892a.625.625 0 0 1 0-1.25h7.892a.625.625 0 0 1 0 1.25zm0 3.033h-7.892a.625.625 0 0 1 0-1.25h7.892a.625.625 0 0 1 0 1.25zm0-6.065h-7.892a.625.625 0 0 1 0-1.25h7.892a.625.625 0 0 1 0 1.25z"}),(0,e.createElement)("path",{d:"M12 10.106a.625.625 0 0 1-.625-.625V5.144a.625.625 0 0 1 1.25 0v4.337c0 .346-.28.625-.625.625z"}),(0,e.createElement)("path",{d:"M14.169 7.938H9.831a.625.625 0 0 1 0-1.25h4.337a.625.625 0 0 1 .001 1.25z"})):"accordion"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"gblocks-block-icon"},(0,e.createElement)("path",{style:{fill:"none"},d:"M0 0h24v24H0z"}),(0,e.createElement)("path",{d:"M21.375 9.067H2.625A.625.625 0 0 1 2 8.441V2.625C2 2.28 2.28 2 2.625 2h18.751c.344 0 .624.28.624.625v5.816c0 .346-.28.626-.625.626zM3.249 7.816H20.75V3.25H3.249v4.566zm18.126 11.032H2.625a.625.625 0 0 1 0-1.251h18.751a.625.625 0 1 1-.001 1.251zm0 3.152H2.625a.625.625 0 0 1 0-1.25h18.751a.625.625 0 1 1-.001 1.25zm0-6.305H2.625a.625.625 0 0 1 0-1.25h18.751a.625.625 0 1 1-.001 1.25zm0-3.152H2.625a.625.625 0 0 1 0-1.25h18.751a.625.625 0 1 1-.001 1.25z"}),(0,e.createElement)("path",{d:"M17.831 6.874a.517.517 0 0 1-.368-.153L15.9 5.159l.737-.737 1.194 1.194 1.194-1.194.737.737-1.563 1.563a.522.522 0 0 1-.368.152z"})):"tabs"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"gblocks-block-icon"},(0,e.createElement)("path",{style:{fill:"none"},d:"M0 0h24v24H0V0z"}),(0,e.createElement)("path",{d:"M21.38 2H2.62c-.34 0-.62.28-.62.62v18.75c0 .35.28.63.62.63h18.75c.34 0 .62-.28.62-.62V2.62a.608.608 0 0 0-.61-.62zM9.5 3.25h5v2.51h-5V3.25zm11.25 17.5H3.25V3.25h5v3.14c0 .34.28.62.62.62h11.88v13.74zm0-14.99h-5V3.25h5v2.51z"}),(0,e.createElement)("path",{d:"M18.23 13.26H5.77c-.34 0-.62.28-.62.62s.28.62.62.62h12.46c.34 0 .62-.28.62-.62s-.27-.62-.62-.62zm0 3.03H5.77c-.34 0-.62.28-.62.62 0 .34.28.62.62.62h12.46c.34 0 .62-.28.62-.62a.61.61 0 0 0-.62-.62zM5.14 10.85c0 .34.28.62.62.62h12.46c.34 0 .62-.28.62-.62s-.28-.62-.62-.62H5.77a.613.613 0 0 0-.63.62z"})):"horizontal-tabs"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 100 100"},(0,e.createElement)("path",{d:"M83.91 48.67H16.09a1.92 1.92 0 0 0 0 3.84h67.82a1.92 1.92 0 0 0 0-3.84zm0 15.17H16.09a1.92 1.92 0 0 0 0 3.84h67.82a1.92 1.92 0 0 0 0-3.84zm0 15.17H16.09a1.92 1.92 0 0 0 0 3.84h67.82a1.92 1.92 0 0 0 0-3.84zm0-45.51H16.09a1.92 1.92 0 0 0 0 3.84h67.82a1.92 1.92 0 0 0 0-3.84z"}),(0,e.createElement)("path",{d:"M98.08 0H1.92C.86 0 0 .86 0 1.92v96.15C0 99.14.86 100 1.92 100h96.15c1.06 0 1.92-.86 1.92-1.92V1.92C100 .86 99.14 0 98.08 0zm-1.93 15.59-28.2.09V3.85h28.2v11.74zM35.9 3.85h28.21v11.84l-28.21.08V3.85zM3.85 96.15V3.85h28.21V17.7c0 .51.2 1 .57 1.36.36.36.85.56 1.36.56H34l62.17-.19v76.72H3.85z"})):"vertical-tabs"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 100 100"},(0,e.createElement)("path",{d:"M33.41 52.51h50.91a1.92 1.92 0 0 0 0-3.84H33.41a1.92 1.92 0 0 0 0 3.84zm0 15.17h50.91a1.92 1.92 0 0 0 0-3.84H33.41a1.92 1.92 0 0 0 0 3.84zm0 15.18h50.91a1.92 1.92 0 0 0 0-3.84H33.41a1.92 1.92 0 0 0 0 3.84zm0-45.52h50.91a1.92 1.92 0 0 0 0-3.84H33.41a1.92 1.92 0 0 0 0 3.84zm0-15.17h50.91a1.92 1.92 0 0 0 0-3.84H33.41a1.92 1.92 0 0 0 0 3.84z"}),(0,e.createElement)("path",{d:"M98.08 0H1.92C.86 0 0 .86 0 1.92v96.15C0 99.14.86 100 1.92 100h96.15c1.06 0 1.92-.86 1.92-1.92V1.92C100 .86 99.14 0 98.08 0zM3.85 52.12h12.52l-.05 19.97H3.85V52.12zm12.53-3.84H3.85V27.99h12.58l-.05 20.29zM3.85 75.94H16.3l-.05 20.21H3.85V75.94zm92.3 20.21H20.09l.19-70.08a1.932 1.932 0 0 0-1.92-1.93H3.85V3.85h92.31v92.3z"})):"button-tabs"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 100 100"},(0,e.createElement)("path",{d:"M16.09 55.55h67.82a1.92 1.92 0 0 0 0-3.84H16.09a1.92 1.92 0 0 0 0 3.84zm0 14.22h67.82a1.92 1.92 0 0 0 0-3.84H16.09a1.92 1.92 0 0 0 0 3.84zm0 14.23h67.82a1.92 1.92 0 0 0 0-3.84H16.09a1.92 1.92 0 0 0 0 3.84zm0-42.67h67.82a1.92 1.92 0 0 0 0-3.84H16.09a1.92 1.92 0 0 0 0 3.84z"}),(0,e.createElement)("path",{d:"M98.08 21.47H1.92C.86 21.47 0 22.33 0 23.4v74.68C0 99.14.86 100 1.92 100h96.15c1.06 0 1.92-.86 1.92-1.92V23.4c.01-1.07-.85-1.93-1.91-1.93zm-1.93 74.68H3.85V25.32h92.31v70.83zM1.92 14.9l25 .05c.48 0 .95-.19 1.29-.53.34-.34.54-.81.54-1.29V1.83C28.75.82 27.93 0 26.92 0h-25C.91 0 .1.82.1 1.83v11.24c0 1.01.81 1.82 1.82 1.83zM3.75 3.66H25.1v7.63l-21.35-.05V3.66zM37.5 14.9l25 .05c.48 0 .95-.19 1.29-.53.34-.34.54-.81.54-1.29V1.83C64.33.82 63.51 0 62.5 0h-25c-1.01 0-1.83.82-1.83 1.83v11.24c0 1.01.82 1.82 1.83 1.83zm1.83-11.24h21.35v7.63l-21.35-.05V3.66zM73.07 14.9l25 .05c.48 0 .95-.19 1.29-.53.34-.34.54-.81.54-1.29V1.83C99.9.82 99.09 0 98.08 0h-25c-1.01 0-1.83.82-1.83 1.83v11.24c0 1.01.82 1.82 1.82 1.83zM74.9 3.66h21.35v7.63l-21.35-.05V3.66z"})):"vertical-dots"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256"},(0,e.createElement)("rect",{width:"256",height:"256",fill:"none"}),(0,e.createElement)("circle",{cx:"128",cy:"60",r:"16"}),(0,e.createElement)("circle",{cx:"128",cy:"128",r:"16"}),(0,e.createElement)("circle",{cx:"128",cy:"196",r:"16"})):"generateblocks"===t?(0,e.createElement)("svg",{viewBox:"0 0 50 60.12",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M6.686 31.622V18.918a.077.077 0 0 1 .05-.072l6.5-2.313 6.5-2.313 9.682-3.445L39.1 7.33a.067.067 0 0 0 .036-.028.074.074 0 0 0 .014-.044V.076a.077.077 0 0 0-.032-.062.076.076 0 0 0-.069-.009l-13 4.625-13 4.625-6.5 2.313-6.5 2.313a.067.067 0 0 0-.036.028.097.097 0 0 0-.013.046V52.067c0 .026.013.048.032.062s.044.018.069.009l3.267-1.163 3.267-1.163c.015-.005.028-.015.036-.028s.014-.028.014-.044V37.999l.001-6.377c-.001 0 0 0 0 0z"}),(0,e.createElement)("path",{d:"m23.949 29.976 13-4.625 13-4.625c.015-.005.028-.015.036-.028s.015-.028.015-.044V8.056a.077.077 0 0 0-.032-.062.076.076 0 0 0-.069-.009l-13 4.625-13 4.625-6.5 2.313-6.5 2.313a.067.067 0 0 0-.036.028.074.074 0 0 0-.014.044V60.045c0 .026.013.048.032.062a.076.076 0 0 0 .069.009l6.475-2.304 6.475-2.304 6.525-2.322 6.525-2.322 6.5-2.313 6.5-2.313c.015-.005.028-.015.036-.028s.014-.025.014-.041V27.193a.077.077 0 0 0-.032-.062.076.076 0 0 0-.069-.009l-6.45 2.295L37 31.711a.067.067 0 0 0-.036.028.074.074 0 0 0-.014.044v6.272a.077.077 0 0 1-.05.072l-6.45 2.295L24 42.715a.075.075 0 0 1-.101-.071V30.046c0-.016.005-.031.014-.044a.08.08 0 0 1 .036-.026z"})):"clipboard"===t?(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256"},(0,e.createElement)("rect",{width:"256",height:"256",fill:"none"}),(0,e.createElement)("line",{x1:"96",y1:"152",x2:"160",y2:"152",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),(0,e.createElement)("line",{x1:"96",y1:"120",x2:"160",y2:"120",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),(0,e.createElement)("path",{d:"M160,40h40a8,8,0,0,1,8,8V216a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H96",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),(0,e.createElement)("path",{d:"M88,72V64a40,40,0,0,1,80,0v8Z",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"})):void 0}var oe=n(4213),re=n.n(oe);const ie=window.wp.i18n,le=window.wp.components,ce=window.wp.element,me=window.wp.apiFetch;var pe=n.n(me);async function he(e){try{const t=await fetch(e);return ne(await t.text())}catch(e){return console.error("Error fetching SVG:",e),null}}class ue extends ce.Component{constructor(){super(...arguments),this.state={isAPILoaded:!1,isAPISaving:!1,icons:generateBlocksProSettings.icons,showImportField:!1}}componentDidMount(){this.setState({isAPILoaded:!0})}updateSettings(e){this.setState({isAPISaving:!0});const t=e.target.nextElementSibling;pe()({path:"/generateblocks-pro/v1/icon-settings",method:"POST",data:{settings:this.state.icons}}).then((e=>{this.setState({isAPISaving:!1}),t.classList.add("gblocks-action-message--show"),t.textContent=e.response,e.success&&e.response?setTimeout((function(){t.classList.remove("gblocks-action-message--show")}),3e3):t.classList.add("gblocks-action-message--error")}))}render(){if(!this.state.isAPILoaded)return(0,e.createElement)(le.Placeholder,{className:"gblocks-settings-placeholder"},(0,e.createElement)(le.Spinner,null));let t="";return(0,e.createElement)(ce.Fragment,null,(0,e.createElement)("div",{className:"generateblocks-settings-main"},(0,e.createElement)(le.PanelBody,{title:(0,ie.__)("Icons","generateblocks-pro")},(0,e.createElement)("div",{className:"gblocks-dashboard-panel-row-wrapper"},(0,e.createElement)(le.PanelRow,null,(0,e.createElement)(le.BaseControl,{id:"gblocks-asset-library-control",className:"gblocks-asset-library-control"},(0,e.createElement)(le.Notice,{className:"gblocks-assets-safe-svg-notice",isDismissible:!1,status:"info"},(0,ie.__)("Icons are static elements that are added to your content. Changes here will not affect your existing icons.","generateblocks-pro")),(0,e.createElement)(le.BaseControl,{className:"gb-icon-chooser gb-shape-chooser"},this.state.icons.map(((n,a)=>(0,e.createElement)(ce.Fragment,{key:a},(0,e.createElement)(le.PanelBody,{title:this.state.icons[a].group?this.state.icons[a].group:(0,ie.__)("Group","generateblocks-pro"),initialOpen:!1},(0,e.createElement)(le.TextControl,{className:"gblocks-group-name",type:"text",label:(0,ie.__)("Group Name","generateblocks-pro"),value:this.state.icons[a].group,onChange:e=>{const t=[...this.state.icons];t[a]={...t[a],group:e},this.setState({icons:t})}}),(0,e.createElement)(le.Button,{className:"gblocks-delete-asset-group is-secondary is-small",onClick:()=>{if(window.confirm((0,ie.__)("This will permanently delete all icons in this group.","generateblocks-pro"))){const e=[...this.state.icons];e.splice(a,1),this.setState({icons:e})}}},(0,ie.__)("Delete Group","generateblocks-pro")),void 0!==this.state.icons[a].icons&&this.state.icons[a].icons.length>0&&(0,e.createElement)(le.Button,{className:"gblocks-export-asset-group is-secondary is-small",onClick:()=>{pe()({path:"/generateblocks-pro/v1/export-asset-group",method:"POST",data:{assetType:"icons",groupName:this.state.icons[a].group,assets:this.state.icons[a].icons}}).then((e=>{const t="group-"+this.state.icons[a].group+".json",n=new Blob([JSON.stringify(e.response)],{type:"application/json",name:t});re()(n,t)}))}},(0,ie.__)("Export Group","generateblocks-pro")),!!this.state.icons[a].group&&(0,e.createElement)(le.BaseControl,{className:"gblocks-asset-items"},this.state.icons[a].icons&&this.state.icons[a].icons.map(((n,s)=>(0,e.createElement)(ce.Fragment,{key:s},(0,e.createElement)("div",{className:"gblocks-asset-item"},(0,e.createElement)("div",{className:"gblocks-asset-name-area"},(0,e.createElement)("div",{className:"gblocks-asset-name-upload"},(0,e.createElement)(le.TextControl,{type:"text",placeholder:(0,ie.__)("Name","generateblocks-pro"),value:this.state.icons[a].icons[s].name||"",onChange:e=>{const t=[...this.state.icons];t[a].icons[s].name=e,this.setState({icons:t})}}),generateBlocksProSettings.hasSVGSupport&&(0,e.createElement)(ce.Fragment,null,(0,e.createElement)(le.Tooltip,{text:(0,ie.__)("Upload an SVG file","generateblocks-pro")},(0,e.createElement)(le.Button,{className:"gblocks-upload-svg is-secondary",onClick:e=>{const n=e.target.closest(".gblocks-asset-item"),o=[...this.state.icons],r=this.state.icons[a].icons[s].name;t=wp.media({title:(0,ie.__)("Upload SVG","generateblocks-pro"),multiple:!1,library:{type:"image/svg+xml"},button:{text:(0,ie.__)("Insert SVG","generateblocks-pro")}}),t.on("select",(async()=>{const e=t.state().get("selection").first().toJSON();!r&&e.name&&(o[a].icons[s].name=e.name),n.classList.add("gblocks-asset-loading"),n.querySelector(".gblocks-asset-spinner").classList.add("gblocks-asset-show-spinner");const i=await he(e.url);o[a].icons[s].icon=i,this.setState({icons:o}),n.classList.remove("gblocks-asset-loading"),n.querySelector(".gblocks-asset-spinner").classList.remove("gblocks-asset-show-spinner")})),t.open()}},(0,ie.__)("Browse","generateblocks-pro"))),(0,e.createElement)("span",{className:"gblocks-asset-spinner"},(0,e.createElement)(le.Spinner,null)))),""!==this.state.icons[a].icons[s].icon&&(0,e.createElement)("span",{className:"gblocks-asset-preview",dangerouslySetInnerHTML:{__html:ne(this.state.icons[a].icons[s].icon)}})),(0,e.createElement)(le.TextareaControl,{className:"gblocks-asset-textarea-control",label:(0,ie.__)("SVG HTML","generateblocks-pro"),value:this.state.icons[a].icons[s].icon||"",onChange:e=>{const t=[...this.state.icons];t[a].icons[s].icon=ne(e),this.setState({icons:t})}}),(0,e.createElement)(le.Tooltip,{text:(0,ie.__)("Delete Icon","generateblocks-pro")},(0,e.createElement)(le.Button,{className:"gblocks-delete-asset",onClick:()=>{if(window.confirm((0,ie.__)("This will permanently delete this icon.","generateblocks-pro"))){const e=[...this.state.icons];e[a].icons.splice(s,1),this.setState({icons:e})}},icon:se("x")})))))),(0,e.createElement)("div",{className:"gblocks-add-new-asset"},(0,e.createElement)(le.Button,{isSecondary:!0,onClick:()=>{const e=[...this.state.icons];e[a].icons.push({name:"",icon:""}),this.setState({icons:e})}},(0,ie.__)("Add Icon","generateblocks-pro"))))))))))),(0,e.createElement)(le.PanelRow,{className:"gblocks-asset-library-group-actions"},(0,e.createElement)("div",{className:"gblocks-add-new-asset-group"},(0,e.createElement)(le.Button,{isSecondary:!0,onClick:()=>{const e=[...this.state.icons];e.push({group:"",icons:[]}),this.setState({icons:e})}},(0,ie.__)("Add Group","generateblocks-pro"))),(0,e.createElement)("div",{className:"gblocks-import-asset-group"},!this.state.showImportField&&(0,e.createElement)(le.Button,{isSecondary:!0,onClick:()=>this.setState({showImportField:!0})},(0,ie.__)("Import Group","generateblocks-pro")),this.state.showImportField&&(0,e.createElement)("input",{type:"file",accept:".json",onChange:e=>{const t=e.target.nextElementSibling,n=new FileReader;n.onloadend=()=>{let e=n.result;if(e=JSON.parse(e),e&&"icons"===e.type){const n=[...this.state.icons];n.push({group:e.group,icons:e.assets}),this.setState({icons:n}),t.classList.add("gblocks-action-message--show"),t.textContent=(0,ie.__)("Group imported.","generateblocks-pro"),setTimeout((function(){t.classList.remove("gblocks-action-message--show")}),3e3)}e||(t.classList.add("gblocks-action-message--show"),t.classList.add("gblocks-action-message--error"),t.textContent=(0,ie.__)("File not valid.","generateblocks-pro"),setTimeout((function(){t.classList.remove("gblocks-action-message--show"),t.classList.remove("gblocks-action-message--error")}),3e3)),"icons"!==e.type&&(t.classList.add("gblocks-action-message--show"),t.classList.add("gblocks-action-message--error"),t.textContent=(0,ie.__)("Wrong asset type.","generateblocks-pro"),setTimeout((function(){t.classList.remove("gblocks-action-message--show"),t.classList.remove("gblocks-action-message--error")}),3e3))},n.readAsText(e.target.files[0]),e.target.value="",this.setState({showImportField:!1})}}),(0,e.createElement)("span",{className:"gblocks-action-message"}))),(0,e.createElement)(le.PanelRow,{className:"gblocks-asset-library-actions"},(0,e.createElement)("div",{className:"gblocks-action-button"},(0,e.createElement)(le.Button,{isPrimary:!0,disabled:this.state.isAPISaving,onClick:e=>this.updateSettings(e)},this.state.isAPISaving&&(0,e.createElement)(le.Spinner,null),!this.state.isAPISaving&&(0,ie.__)("Save Icons","generateblocks-pro")),(0,e.createElement)("span",{className:"gblocks-action-message"})))))))}}window.addEventListener("DOMContentLoaded",(()=>{(0,ce.render)((0,e.createElement)(ue,null),document.getElementById("gblocks-icon-library"))}));class de extends ce.Component{constructor(){super(...arguments),this.state={isAPILoaded:!1,isAPISaving:!1,shapes:generateBlocksProSettings.shapes,showImportField:!1}}componentDidMount(){this.setState({isAPILoaded:!0})}updateSettings(e){this.setState({isAPISaving:!0});const t=e.target.nextElementSibling;pe()({path:"/generateblocks-pro/v1/shape-settings",method:"POST",data:{settings:this.state.shapes}}).then((e=>{this.setState({isAPISaving:!1}),t.classList.add("gblocks-action-message--show"),t.textContent=e.response,e.success&&e.response?setTimeout((function(){t.classList.remove("gblocks-action-message--show")}),3e3):t.classList.add("gblocks-action-message--error")}))}render(){if(!this.state.isAPILoaded)return(0,e.createElement)(le.Placeholder,{className:"gblocks-settings-placeholder"},(0,e.createElement)(le.Spinner,null));let t="";return(0,e.createElement)(ce.Fragment,null,(0,e.createElement)("div",{className:"generateblocks-settings-main"},(0,e.createElement)(le.PanelBody,{title:(0,ie.__)("Shapes")},(0,e.createElement)("div",{className:"gblocks-dashboard-panel-row-wrapper"},(0,e.createElement)(le.PanelRow,null,(0,e.createElement)(le.BaseControl,{id:"gblocks-asset-library-control",className:"gblocks-asset-library-control"},(0,e.createElement)(le.Notice,{className:"gblocks-assets-safe-svg-notice",isDismissible:!1,status:"info"},(0,ie.__)("Shapes are dynamic elements that will update automatically on your website if altered/removed here.","generateblocks-pro")),(0,e.createElement)(le.BaseControl,{className:"gb-icon-chooser gb-shape-chooser"},this.state.shapes.map(((n,a)=>(0,e.createElement)(ce.Fragment,{key:a},(0,e.createElement)(le.PanelBody,{title:this.state.shapes[a].group?this.state.shapes[a].group:(0,ie.__)("Group","generateblocks-pro"),initialOpen:!1},(0,e.createElement)(le.TextControl,{className:"gblocks-group-name",type:"text",label:(0,ie.__)("Group Name","generateblocks-pro"),value:this.state.shapes[a].group,onChange:e=>{const t=[...this.state.shapes];t[a]={...t[a],group:e},this.setState({shapes:t})}}),(0,e.createElement)(le.Button,{className:"gblocks-delete-asset-group is-secondary is-small",onClick:()=>{if(window.confirm((0,ie.__)("This will permanently delete all shapes in this group and remove them from the front-end of your website.","generateblocks-pro"))){const e=[...this.state.shapes];e.splice(a,1),this.setState({shapes:e})}}},(0,ie.__)("Delete Group","generateblocks-pro")),void 0!==this.state.shapes[a].shapes&&this.state.shapes[a].shapes.length>0&&(0,e.createElement)(le.Button,{className:"gblocks-export-asset-group is-secondary is-small",onClick:()=>{pe()({path:"/generateblocks-pro/v1/export-asset-group",method:"POST",data:{assetType:"shapes",groupName:this.state.shapes[a].group,assets:this.state.shapes[a].shapes}}).then((e=>{const t="group-"+this.state.shapes[a].group+".json",n=new Blob([JSON.stringify(e.response)],{type:"application/json",name:t});re()(n,t)}))}},(0,ie.__)("Export Group","generateblocks-pro")),!!this.state.shapes[a].group&&(0,e.createElement)(le.BaseControl,{className:"gblocks-asset-items"},this.state.shapes[a].shapes&&this.state.shapes[a].shapes.map(((n,s)=>(0,e.createElement)(ce.Fragment,{key:s},(0,e.createElement)("div",{className:"gblocks-asset-item"},(0,e.createElement)("div",{className:"gblocks-asset-name-area"},(0,e.createElement)("div",{className:"gblocks-asset-name-upload"},(0,e.createElement)(le.TextControl,{type:"text",placeholder:(0,ie.__)("Name","generateblocks-pro"),value:this.state.shapes[a].shapes[s].name||"",onChange:e=>{const t=[...this.state.shapes];t[a].shapes[s].name=e,this.setState({shapes:t})}}),generateBlocksProSettings.hasSVGSupport&&(0,e.createElement)(ce.Fragment,null,(0,e.createElement)(le.Tooltip,{text:(0,ie.__)("Upload an SVG file","generateblocks-pro")},(0,e.createElement)(le.Button,{className:"gblocks-upload-svg is-secondary",onClick:e=>{const n=e.target.closest(".gblocks-asset-item"),o=[...this.state.shapes],r=this.state.shapes[a].shapes[s].name;t=wp.media({title:(0,ie.__)("Upload SVG","generateblocks-pro"),multiple:!1,library:{type:"image/svg+xml"},button:{text:(0,ie.__)("Insert SVG","generateblocks-pro")}}),t.on("select",(async()=>{const e=t.state().get("selection").first().toJSON();!r&&e.name&&(o[a].shapes[s].name=e.name),n.classList.add("gblocks-asset-loading"),n.querySelector(".gblocks-asset-spinner").classList.add("gblocks-asset-show-spinner");let i=await he(e.url);i.toLowerCase().includes('preserveaspectratio="none"')||(i=i.replace("<svg",'<svg preserveAspectRatio="none"')),o[a].shapes[s].shape=i,this.setState({shapes:o}),n.classList.remove("gblocks-asset-loading"),n.querySelector(".gblocks-asset-spinner").classList.remove("gblocks-asset-show-spinner")})),t.open()}},(0,ie.__)("Browse","generateblocks-pro"))),(0,e.createElement)("span",{className:"gblocks-asset-spinner"},(0,e.createElement)(le.Spinner,null)))),""!==this.state.shapes[a].shapes[s].shape&&(0,e.createElement)("span",{className:"gblocks-asset-preview",dangerouslySetInnerHTML:{__html:ne(this.state.shapes[a].shapes[s].shape)}})),(0,e.createElement)(le.TextareaControl,{className:"gblocks-asset-textarea-control",label:(0,ie.__)("SVG HTML","generateblocks-pro"),value:this.state.shapes[a].shapes[s].shape||"",onChange:e=>{const t=[...this.state.shapes];e.toLowerCase().includes('preserveaspectratio="none"')||(e=e.replace("<svg",'<svg preserveAspectRatio="none"')),t[a].shapes[s].shape=ne(e),this.setState({shapes:t})}}),(0,e.createElement)(le.Tooltip,{text:(0,ie.__)("Delete Shape","generateblocks-pro")},(0,e.createElement)(le.Button,{className:"gblocks-delete-asset",onClick:()=>{if(window.confirm((0,ie.__)("This will permanently delete this shape and remove it from the front-end of your website.","generateblocks-pro"))){const e=[...this.state.shapes];e[a].shapes.splice(s,1),this.setState({shapes:e})}},icon:se("x")})))))),(0,e.createElement)("div",{className:"gblocks-add-new-asset"},(0,e.createElement)(le.Button,{isSecondary:!0,onClick:()=>{const e=[...this.state.shapes];e[a].shapes.push({name:"",shape:""}),this.setState({shapes:e})}},(0,ie.__)("Add Shape","generateblocks-pro"))))))))))),(0,e.createElement)(le.PanelRow,{className:"gblocks-asset-library-group-actions"},(0,e.createElement)("div",{className:"gblocks-add-new-asset-group"},(0,e.createElement)(le.Button,{isSecondary:!0,onClick:()=>{const e=[...this.state.shapes];e.push({group:"",shapes:[]}),this.setState({shapes:e})}},(0,ie.__)("Add Group","generateblocks-pro"))),(0,e.createElement)("div",{className:"gblocks-import-asset-group"},!this.state.showImportField&&(0,e.createElement)(le.Button,{isSecondary:!0,onClick:()=>this.setState({showImportField:!0})},(0,ie.__)("Import Group","generateblocks-pro")),this.state.showImportField&&(0,e.createElement)("input",{type:"file",accept:".json",onChange:e=>{const t=e.target.nextElementSibling,n=new FileReader;n.onloadend=()=>{let e=n.result;if(e=JSON.parse(e),e&&"shapes"===e.type){const n=[...this.state.shapes];n.push({group:e.group,shapes:e.assets}),this.setState({shapes:n}),t.classList.add("gblocks-action-message--show"),t.textContent=(0,ie.__)("Group imported.","generateblocks-pro"),setTimeout((function(){t.classList.remove("gblocks-action-message--show")}),3e3)}e||(t.classList.add("gblocks-action-message--show"),t.classList.add("gblocks-action-message--error"),t.textContent=(0,ie.__)("File not valid.","generateblocks-pro"),setTimeout((function(){t.classList.remove("gblocks-action-message--show"),t.classList.remove("gblocks-action-message--error")}),3e3)),"shapes"!==e.type&&(t.classList.add("gblocks-action-message--show"),t.classList.add("gblocks-action-message--error"),t.textContent=(0,ie.__)("Wrong asset type.","generateblocks-pro"),setTimeout((function(){t.classList.remove("gblocks-action-message--show"),t.classList.remove("gblocks-action-message--error")}),3e3))},n.readAsText(e.target.files[0]),e.target.value="",this.setState({showImportField:!1})}}),(0,e.createElement)("span",{className:"gblocks-action-message"}))),(0,e.createElement)(le.PanelRow,{className:"gblocks-asset-library-actions"},(0,e.createElement)("div",{className:"gblocks-action-button"},(0,e.createElement)(le.Button,{isPrimary:!0,disabled:this.state.isAPISaving,onClick:e=>this.updateSettings(e)},this.state.isAPISaving&&(0,e.createElement)(le.Spinner,null),!this.state.isAPISaving&&(0,ie.__)("Save Shapes","generateblocks-pro")),(0,e.createElement)("span",{className:"gblocks-action-message"})))))))}}window.addEventListener("DOMContentLoaded",(()=>{(0,ce.render)((0,e.createElement)(de,null),document.getElementById("gblocks-shape-library"))}))})()})(); |