| 1 |
(()=>{"use strict";const t=window.React,e=window.ReactDOM,n="linear-gradient(135deg, #0040E3, #18D4FD)",o=t=>{const e=(t=>{try{const e=new URL(t);return["http:","https:"].includes(e.protocol)?e.toString():null}catch(e){return"string"==typeof t&&t.startsWith("/")&&!t.startsWith("//")?t:null}})(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"},r=(t,e)=>{return null==(n=e)||""===n||Array.isArray(n)&&0===n.length||"object"==typeof n&&0===Object.keys(n).length||"string"==typeof n&&""===n.trim()||"number"==typeof n&&0===n?"":`${t}: ${e};`;var n},a=(t,e=!0,a=!0,i=!0)=>{const{type:s="solid",color:l="",gradient:c=n,image:d={},position:u="center center",attachment:$="",repeat:p="no-repeat",size:f="",overlayColor:g=""}=t||{};return"gradient"===s&&a?r("background",c):"image"===s&&i?`background: ${o(d?.url)};\n\t\t\t\t${r("background-color",g)}\n\t\t\t\t${r("background-position",u)}\n\t\t\t\t${r("background-size",f)}\n\t\t\t\t${r("background-repeat",p)}\n\t\t\t\t${r("background-attachment",$)}\n\t\t\t\t${r("background-repeat",p)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&r("background",l)},i=t=>{const{width:e="",style:n="solid",color:o="",side:a="all",radius:i=""}=t||{},s=t=>{const e=a?.toLowerCase();return e?.includes("all")||e?.includes(t)},l=`${e} ${n} ${o}`,c=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map((t=>s(t)?`border-${t}: ${l};`:"")).join(""):""}\n\t\t${r("border-radius",i)}\n\t`;return c},s=t=>{const{side:e=2,vertical:n="0px",horizontal:o="0px",top:r="0px",right:a="0px",bottom:i="0px",left:s="0px"}=t||{};return 2===e?`${n} ${o}`:`${r} ${a} ${i} ${s}`},l=(t,e,n=!0)=>{const{fontFamily:o="Default",fontCategory:a="sans-serif",fontVariant:i=400,fontWeight:s,isUploadFont:l=!0,fontSize:c={desktop:null,tablet:null,mobile:null},fontStyle:d,textTransform:u,textDecoration:$,lineHeight:p,letterSpace:f}=e||{},g=!n||!o||"Default"===o,m=c?.desktop||c,y=c?.tablet||m,b=c?.mobile||y,h=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},x=`\n\t\t${g?"":`font-family: '${o}', ${a};`}\n\t\t${r("font-weight",s)}\n\t\t${r("font-size",h(m))}\n\t\t${r("font-style",d)}\n\t\t${r("text-transform",u)}\n\t\t${r("text-decoration",$)}\n\t\t${r("line-height",p)}\n\t\t${r("letter-spacing",f)}\n\t`,k=i&&400!==i?"400i"===i?":ital@1":i?.includes("00i")?`: ital, wght@1, ${i?.replace("00i","00")} `:`: wght@${i} `:"",w=g?"":`https://fonts.googleapis.com/css2?family=${o?.split(" ").join("+")}${k.replace(/ /g,"")}&display=swap`;return{googleFontLink:!l||g?"":`@import url(${w});`,styles:`${t}{\n\t\t\t${x}\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${t}{\n\t\t\t\t${r("font-size",h(y))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${t}{\n\t\t\t\t${r("font-size",h(b))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},c="bBlocksAnimatedText",d=window.ReactJSXRuntime,u=({attributes:t,id:e})=>{const{textAlign:n,background:o,typography:r,color:u,padding:$,border:p}=t,f=`#${e} .${c}`;return(0,d.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${l("",r)?.googleFontLink}\n\t\t${l(`${f} .content`,r)?.styles}\n\n\t\t${f}{\n\t\t\ttext-align: ${n};\n\t\t\t${a(o)}\n\t\t\tpadding: ${s($)};\n\t\t\t${i(p)}\n\t\t}\n\t\t${f} .content{\n\t\t\tcolor: ${u};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},$=jQuery;document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-animated-text").forEach((t=>{const n=JSON.parse(t.dataset.attributes);(0,e.createRoot)(t).render((0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u,{attributes:n,id:t.id}),(0,d.jsx)(p,{attributes:n,id:t.id})]})),t?.removeAttribute("data-attributes")}))}));const p=({attributes:e,id:n})=>{const{loop:o,animateIn:r,inEffect:a,inSequence:i,outEffect:s,outSequence:l,content:u}=e,p=`#${n} .content`;return(0,t.useEffect)((()=>{const t=new IntersectionObserver((n=>{n[0].intersectionRatio<=0||($(p).textillate((t=>{const{loop:e,animateIn:n,inEffect:o,inSequence:r,outEffect:a,outSequence:i}=t;return{loop:e,minDisplayTime:2e3,initialDelay:0,autoStart:!0,inEffects:[],outEffects:["hinge"],in:{effect:o,delayScale:1.5,delay:50,sync:"sync"===r,shuffle:"shuffle"===r,reverse:"reverse"===r},out:{effect:a,delayScale:1.5,delay:50,sync:"sync"===i,shuffle:"shuffle"===i,reverse:"reverse"===i},type:n}})(e)),t.unobserve(n[0].target))}));t.observe(document.querySelector(p))}),[o,r,a,i,s,l]),(0,d.jsx)("div",{className:c,children:(0,d.jsx)("p",{className:"content",children:u})})}})(); |