PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.8
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.8
2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 All 108 releases
← All changes | build/counters/view.js +2 -1 2.1.1 → 2.1.8 View file →
@@ -1 +1,2 @@
1 -(()=>{"use strict";const t=window.React,e=window.ReactDOM,n=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}},r=t=>{const e=(new DOMParser).parseFromString(t,"text/html"),r=["b","strong","i","em","span","a","br"],o=["style","href","target","rel","class"];return e.body.querySelectorAll("*").forEach((t=>{r.includes(t.tagName.toLowerCase())?[...t.attributes].forEach((e=>{if(o.includes(e.name)||t.removeAttribute(e.name),"href"===e.name){const r=n(e.value);r?t.setAttribute("href",r):t.removeAttribute("href")}})):t.remove()})),e.body.innerHTML},o="linear-gradient(135deg, #0040E3, #18D4FD)",s=(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,r=!0,a=!0)=>{const{type:c="solid",color:i="",gradient:l=o,image:u={},position:d="center center",attachment:$="",repeat:p="no-repeat",size:b="",overlayColor:m=""}=t||{};return"gradient"===c&&r?s("background",l):"image"===c&&a?`background: ${(t=>{const e=n(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"})(u?.url)};\n\t\t\t\t${s("background-color",m)}\n\t\t\t\t${s("background-position",d)}\n\t\t\t\t${s("background-size",b)}\n\t\t\t\t${s("background-repeat",p)}\n\t\t\t\t${s("background-attachment",$)}\n\t\t\t\t${s("background-repeat",p)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&s("background",i)},c=t=>{const{width:e="",style:n="solid",color:r="",side:o="all",radius:a=""}=t||{},c=t=>{const e=o?.toLowerCase();return e?.includes("all")||e?.includes(t)},i=`${e} ${n} ${r}`,l=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map((t=>c(t)?`border-${t}: ${i};`:"")).join(""):""}\n\t\t${s("border-radius",a)}\n\t`;return l},i=(t,e="box")=>{const{hOffset:n="0px",vOffset:r="0px",blur:o="0px",spreed:s="0px",color:a="#7090b0",isInset:c=!1}=t||{},i=`${n} ${r} ${o}`;return("text"===e?`${i} ${a}`:`${i} ${s} ${a} ${c?"inset":""}`)||"none"},l=t=>{const{side:e=2,vertical:n="0px",horizontal:r="0px",top:o="0px",right:s="0px",bottom:a="0px",left:c="0px"}=t||{};return 2===e?`${n} ${r}`:`${o} ${s} ${a} ${c}`},u=(t,e,n=!0)=>{const{fontFamily:r="Default",fontCategory:o="sans-serif",fontVariant:a=400,fontWeight:c,isUploadFont:i=!0,fontSize:l={desktop:null,tablet:null,mobile:null},fontStyle:u,textTransform:d,textDecoration:$,lineHeight:p,letterSpace:b}=e||{},m=!n||!r||"Default"===r,g=l?.desktop||l,x=l?.tablet||g,h=l?.mobile||x,f=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},y=`\n\t\t${m?"":`font-family: '${r}', ${o};`}\n\t\t${s("font-weight",c)}\n\t\t${s("font-size",f(g))}\n\t\t${s("font-style",u)}\n\t\t${s("text-transform",d)}\n\t\t${s("text-decoration",$)}\n\t\t${s("line-height",p)}\n\t\t${s("letter-spacing",b)}\n\t`,k=a&&400!==a?"400i"===a?":ital@1":a?.includes("00i")?`: ital, wght@1, ${a?.replace("00i","00")} `:`: wght@${a} `:"",w=m?"":`https://fonts.googleapis.com/css2?family=${r?.split(" ").join("+")}${k.replace(/ /g,"")}&display=swap`;return{googleFontLink:!i||m?"":`@import url(${w});`,styles:`${t}{\n\t\t\t${y}\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${t}{\n\t\t\t\t${s("font-size",f(x))}\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${s("font-size",f(h))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},d="bBlocksCounters",$=window.ReactJSXRuntime,p=({attributes:t,id:e})=>{const{counters:n=[],columnGap:r,rowGap:p,background:b,padding:m,textAlign:g,counterWidth:x,counterHeight:h,iconSize:f,numberTypo:y,labelTypo:k,counterPadding:w,counterBorder:v,counterShadow:j}=t,I=`#${e}`,N=`${I} .${d}`,S=`${N} .counter`;return(0,$.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${u("",y)?.googleFontLink}\n\t\t${u("",k)?.googleFontLink}\n\t\t${u(`${S} .counterNumber`,y)?.styles}\n\t\t${u(`${S} .counterLabel`,k)?.styles}\n\t\t\n\t\t${N}{\n\t\t\tgrid-gap: ${p} ${r};\n\t\t\t${a(b)}\n\t\t\tpadding: ${l(m)};\n\t\t}\n\t\t${S}{\n\t\t\ttext-align: ${g};\n\t\t\twidth: ${"0px"===x||"0%"===x||"0em"===x?"250px":x};\n\t\t\theight: ${"0px"===h||"0%"===h||"0em"===h?"250px":h};\n\t\t\tpadding: ${l(w)};\n\t\t\t${c(v)}\n\t\t\tbox-shadow: ${i(j)};\n\t\t}\n\t\t${S} .counterIcon,\n\t\t${S} .counterIconLabel{\n\t\t\tfont-size: ${f||50}px;\n\t\t}\n\n\t\t${n?.map(((t,e)=>{const{background:n,icon:r,number:c,label:i}=t,l=`${I} #counter-${e}`;return`\n\t\t\t\t${l} .counter{\n\t\t\t\t\t${a(n)}\n\t\t\t\t}\n\t\t\t\t${l} .counterIcon i,\n\t\t\t\t${l} .counterIconLabel i{\n\t\t\t\t\t${((t,e=!0,n=!0)=>{const{fontSize:r=16,colorType:a="solid",color:c="inherit",gradient:i=o}=t||{},l="gradient"===a?`color: transparent; background-image: ${i}; -webkit-background-clip: text; background-clip: text;`:s("color",c);return`\n\t\t${r&&e?s("font-size",r?`${r}px`:""):""}\n\t\t${n?l:""}\n\t`})(r)}\n\t\t\t\t\tfont-size: inherit;\n\t\t\t\t}\n\t\t\t\t${l} .counterNumber{\n\t\t\t\t\tcolor: ${c.color};\n\t\t\t\t}\n\t\t\t\t${l} .counterLabel{\n\t\t\t\t\tcolor: ${i.color};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},b=({attributes:t,counter:e,index:n,labelEl:r,isBackend:o=!1,custom:s={}})=>{const{isIcon:a,iconPosition:c}=t,{icon:i,number:l}=e,{start:u,end:d,prefix:p,suffix:b}=l,m=i?.class&&(0,$.jsx)("i",{className:i.class});return(0,$.jsx)("div",{onClick:()=>o?s.setActiveIndex(n):null,className:o&&n===s.activeIndex?"bPlNowEditing":"",id:`counter-${n}`,children:(0,$.jsxs)("div",{className:"counter",children:[a&&"top"===c&&(0,$.jsx)("div",{className:"counterIcon",children:m}),(0,$.jsxs)("div",{className:"counterNumber",children:[(0,$.jsx)("span",{className:"prefix",children:p}),(0,$.jsx)("span",{className:"number","data-count-start":u,"data-count-end":d,children:u}),(0,$.jsx)("span",{className:"suffix",children:b})]}),"label"===c?(0,$.jsxs)("div",{className:"counterIconLabel",children:[m,r]}):r]})})},m=(t,e)=>{const{char:n=""}=e;return n?t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,n):t};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-counters").forEach((t=>{const n=JSON.parse(t.dataset.attributes);(0,e.createRoot)(t).render((0,$.jsx)(g,{attributes:n,countersEl:t})),t?.removeAttribute("data-attributes")}))}));const g=({attributes:e,countersEl:n})=>{const{counters:o=[],columns:s,duration:a,separator:c={},isLabel:i}=e;return(0,t.useEffect)((()=>{const t=document.querySelectorAll(`#${n.id} .${d} .counterNumber .number`),e=new IntersectionObserver((n=>{n[0].intersectionRatio<=0||(((t,e,n={})=>{t?.forEach((t=>{const r=parseInt(t.dataset.countStart),o=parseInt(t.dataset.countEnd),s=Date.now(),a=setInterval((()=>{const c=Date.now()-s;c>=e?clearInterval(a):t.innerText=m(parseInt(c/(e/(o-r))+r),n)}),20);setTimeout((()=>{t.innerText=m(o,n)}),e)}))})(t,a,c),e.unobserve(n[0].target))}));e.observe(document.querySelector(`#${n.id} .${d} .counterNumber .number`))}),[]),(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(p,{attributes:e,id:n.id}),(0,$.jsx)("div",{className:`${d} columns-${s.desktop} columns-tablet-${s.tablet} columns-mobile-${s.mobile}`,children:o?.map(((t,n)=>{const{text:o}=t.label,s=i&&o&&(0,$.jsx)("p",{className:"counterLabel",dangerouslySetInnerHTML:{__html:r(o)}});return(0,$.jsx)(b,{attributes:e,counter:t,index:n,labelEl:s},n)}))})]})}})();
1 +(()=>{"use strict";const t=window.React,e=window.ReactDOM,n=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}},r=t=>{const e=(new DOMParser).parseFromString(t,"text/html"),r=["b","strong","i","em","span","a","br"],o=["style","href","target","rel","class"];return e.body.querySelectorAll("*").forEach((t=>{r.includes(t.tagName.toLowerCase())?[...t.attributes].forEach((e=>{if(o.includes(e.name)||t.removeAttribute(e.name),"href"===e.name){const r=n(e.value);r?t.setAttribute("href",r):t.removeAttribute("href")}})):t.remove()})),e.body.innerHTML};new class{constructor(t={}){this.defaultOptions={allowedTags:["svg","g","path","rect","circle","ellipse","line","polyline","polygon","text","tspan","defs","clipPath","mask","linearGradient","radialGradient","stop","style","title","desc"],allowedAttributes:["id","class","style","transform","xmlns","xmlns:xlink","version","baseProfile","xml:space","d","x","y","width","height","cx","cy","r","rx","ry","points","x1","y1","x2","y2","viewBox","preserveAspectRatio","overflow","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","opacity","color","paint-order","vector-effect","shape-rendering","display","visibility","clip-path","clip-rule","clipPathUnits","mask","maskUnits","maskContentUnits","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","fx","fy","fr","dx","dy","text-anchor","dominant-baseline","alignment-baseline","font-family","font-size","font-style","font-weight","letter-spacing","word-spacing","textLength","lengthAdjust","role","focusable","aria-hidden","aria-label","aria-labelledby","aria-describedby"],allowedProtocols:["http","https","data"],removeScripts:!0,removeEvents:!0,removeExternalResources:!0,sanitizeStyle:!0},this.options={...this.defaultOptions,...t},this.allowedTagSet=new Set(this.options.allowedTags.map((t=>t.toLowerCase()))),this.allowedAttributeSet=new Set(this.options.allowedAttributes.map((t=>t.toLowerCase())))}sanitize(t){if("string"!=typeof t||""===t.trim())return"";const e=(new DOMParser).parseFromString(t,"image/svg+xml"),n=e.documentElement;return!n||"svg"!==n.localName.toLowerCase()||e.getElementsByTagName("parsererror").length?"":(this.removeScripts(e),this.sanitizeElements(e),(new XMLSerializer).serializeToString(e.documentElement))}async sanitizeFile(t){const e=await fetch(t),n=await e.text();return this.sanitize(`${n}`)}removeScripts(t){this.options.removeScripts&&Array.from(t.querySelectorAll("*")).forEach((t=>{t.localName.toLowerCase().includes("script")&&t.remove()}))}sanitizeElements(t){Array.from(t.querySelectorAll("*")).forEach((t=>{const e=t.localName.toLowerCase();this.allowedTagSet.has(e)?("style"===e&&this.options.sanitizeStyle&&(t.textContent=this.sanitizeCss(t.textContent)),this.sanitizeAttributes(t)):t.remove()}))}sanitizeAttributes(t){Array.from(t.attributes).forEach((e=>{const n=e.name,r=n.toLowerCase(),o=e.value;if(this.options.removeEvents&&r.startsWith("on"))return void t.removeAttribute(n);if(this.options.removeExternalResources&&("href"===r||r.endsWith(":href"))&&!this.isAllowedUrl(o))return void t.removeAttribute(n);const s=r.replace("xlink:","");this.allowedAttributeSet.has(r)||this.allowedAttributeSet.has(s)?this.options.removeExternalResources&&this.hasExternalUrl(o)?t.removeAttribute(n):"style"===r&&this.options.sanitizeStyle&&t.setAttribute(n,this.sanitizeCss(o)):t.removeAttribute(n)}))}hasExternalUrl(t){return!("string"!=typeof t||!/url\s*\(/i.test(t))&&Array.from(t.matchAll(/url\s*\(\s*['"]?([^'")]*)/gi)).some((([,t])=>!t.trim().startsWith("#")))}isAllowedUrl(t){const e=String(t||"").trim();if(e.startsWith("#"))return!0;if(/^data:/i.test(e))return this.options.allowedProtocols.includes("data")&&/^data:image\/(png|jpe?g|gif|webp);base64,/i.test(e);try{return this.options.allowedProtocols.includes(new URL(e).protocol.replace(":",""))}catch{return!1}}sanitizeCss(t){return String(t||"").replace(/expression\s*\(/gi,"").replace(/javascript:/gi,"").replace(/behavior\s*:/gi,"").replace(/binding\s*:/gi,"").replace(/@import[^;]*;?/gi,"").replace(/url\s*\(\s*(['"]?)(?!#)[^)]*\)/gi,"none")}};const o="linear-gradient(135deg, #0040E3, #18D4FD)",s=(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},i=(t,e=!0,r=!0,i=!0)=>{const{type:a="solid",color:l="",gradient:c=o,image:u={},position:d="center center",attachment:p="",repeat:m="no-repeat",size:h="",overlayColor:g=""}=t||{};return"gradient"===a&&r?s("background",c):"image"===a&&i?`background: ${(t=>{const e=n(t);return e?`url('${e.replace(/['"()]/g,"")}')`:"none"})(u?.url)};\n\t\t\t\t${s("background-color",g)}\n\t\t\t\t${s("background-position",d)}\n\t\t\t\t${s("background-size",h)}\n\t\t\t\t${s("background-repeat",m)}\n\t\t\t\t${s("background-attachment",p)}\n\t\t\t\t${s("background-repeat",m)}\n\t\t\t\tbackground-blend-mode: overlay;`:e&&s("background",l)},a=t=>{const{width:e="",style:n="solid",color:r="",side:o="all",radius:i=""}=t||{},a=t=>{const e=o?.toLowerCase();return e?.includes("all")||e?.includes(t)},l=`${e} ${n} ${r}`,c=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map((t=>a(t)?`border-${t}: ${l};`:"")).join(""):""}\n\t\t${s("border-radius",i)}\n\t`;return c},l=(t,e="box")=>{const{hOffset:n="0px",vOffset:r="0px",blur:o="0px",spreed:s="0px",color:i="#7090b0",isInset:a=!1}=t||{},l=`${n} ${r} ${o}`;return("text"===e?`${l} ${i}`:`${l} ${s} ${i} ${a?"inset":""}`)||"none"},c=t=>{const{side:e=2,vertical:n="0px",horizontal:r="0px",top:o="0px",right:s="0px",bottom:i="0px",left:a="0px"}=t||{};return 2===e?`${n} ${r}`:`${o} ${s} ${i} ${a}`},u=(t,e,n=!0)=>{const{fontFamily:r="Default",fontCategory:o="sans-serif",fontVariant:i=400,fontWeight:a,isUploadFont:l=!0,fontSize:c={desktop:null,tablet:null,mobile:null},fontStyle:u,textTransform:d,textDecoration:p,lineHeight:m,letterSpace:h}=e||{},g=!n||!r||"Default"===r,b=c?.desktop||c,$=c?.tablet||b,f=c?.mobile||$,x=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some((t=>e.endsWith(t)))?e:"number"==typeof t?`${e}px`:""},y=`\n\t\t${g?"":`font-family: '${r}', ${o};`}\n\t\t${s("font-weight",a)}\n\t\t${s("font-size",x(b))}\n\t\t${s("font-style",u)}\n\t\t${s("text-transform",d)}\n\t\t${s("text-decoration",p)}\n\t\t${s("line-height",m)}\n\t\t${s("letter-spacing",h)}\n\t`,w=i&&400!==i?"400i"===i?":ital@1":i?.includes("00i")?`: ital, wght@1, ${i?.replace("00i","00")} `:`: wght@${i} `:"",v=g?"":`https://fonts.googleapis.com/css2?family=${r?.split(" ").join("+")}${w.replace(/ /g,"")}&display=swap`;return{googleFontLink:!l||g?"":`@import url(${v});`,styles:`${t}{\n\t\t\t${y}\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${t}{\n\t\t\t\t${s("font-size",x($))}\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${s("font-size",x(f))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},d="bBlocksCounters",p=window.ReactJSXRuntime,m=({attributes:t,id:e})=>{const{counters:n=[],columnGap:r,rowGap:m,background:h,padding:g,textAlign:b,counterWidth:$,counterHeight:f,iconSize:x,numberTypo:y,labelTypo:w,counterPadding:v,counterBorder:k,counterShadow:S}=t,A=`#${e}`,z=`${A} .${d}`,E=`${z} .counter`;return(0,p.jsx)("style",{dangerouslySetInnerHTML:{
2 +__html:`\n\t\t${u("",y)?.googleFontLink}\n\t\t${u("",w)?.googleFontLink}\n\t\t${u(`${E} .counterNumber`,y)?.styles}\n\t\t${u(`${E} .counterLabel`,w)?.styles}\n\t\t\n\t\t${z}{\n\t\t\tgrid-gap: ${m} ${r};\n\t\t\t${i(h)}\n\t\t\tpadding: ${c(g)};\n\t\t}\n\t\t${E}{\n\t\t\ttext-align: ${b};\n\t\t\twidth: ${"0px"===$||"0%"===$||"0em"===$?"250px":$};\n\t\t\theight: ${"0px"===f||"0%"===f||"0em"===f?"250px":f};\n\t\t\tpadding: ${c(v)};\n\t\t\t${a(k)}\n\t\t\tbox-shadow: ${l(S)};\n\t\t}\n\t\t${E} .counterIcon,\n\t\t${E} .counterIconLabel{\n\t\t\tfont-size: ${x||50}px;\n\t\t}\n\n\t\t${n?.map(((t,e)=>{const{background:n,icon:r,number:a,label:l}=t,c=`${A} #counter-${e}`;return`\n\t\t\t\t${c} .counter{\n\t\t\t\t\t${i(n)}\n\t\t\t\t}\n\t\t\t\t${c} .counterIcon i,\n\t\t\t\t${c} .counterIconLabel i{\n\t\t\t\t\t${((t,e=!0,n=!0)=>{const{fontSize:r=16,colorType:i="solid",color:a="inherit",gradient:l=o}=t||{},c="gradient"===i?`color: transparent; background-image: ${l}; -webkit-background-clip: text; background-clip: text;`:s("color",a);return`\n\t\t${r&&e?s("font-size",r?`${r}px`:""):""}\n\t\t${n?c:""}\n\t`})(r)}\n\t\t\t\t\tfont-size: inherit;\n\t\t\t\t}\n\t\t\t\t${c} .counterNumber{\n\t\t\t\t\tcolor: ${a.color};\n\t\t\t\t}\n\t\t\t\t${c} .counterLabel{\n\t\t\t\t\tcolor: ${l.color};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},h=({attributes:t,counter:e,index:n,labelEl:r,isBackend:o=!1,custom:s={}})=>{const{isIcon:i,iconPosition:a}=t,{icon:l,number:c}=e,{start:u,end:d,prefix:m,suffix:h}=c,g=l?.class&&(0,p.jsx)("i",{className:l.class});return(0,p.jsx)("div",{onClick:()=>o?s.setActiveIndex(n):null,className:o&&n===s.activeIndex?"bPlNowEditing":"",id:`counter-${n}`,children:(0,p.jsxs)("div",{className:"counter",children:[i&&"top"===a&&(0,p.jsx)("div",{className:"counterIcon",children:g}),(0,p.jsxs)("div",{className:"counterNumber",children:[(0,p.jsx)("span",{className:"prefix",children:m}),(0,p.jsx)("span",{className:"number","data-count-start":u,"data-count-end":d,children:u}),(0,p.jsx)("span",{className:"suffix",children:h})]}),"label"===a?(0,p.jsxs)("div",{className:"counterIconLabel",children:[g,r]}):r]})})},g=(t,e)=>{const{char:n=""}=e;return n?t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,n):t};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-counters").forEach((t=>{const n=JSON.parse(t.dataset.attributes);(0,e.createRoot)(t).render((0,p.jsx)(b,{attributes:n,countersEl:t})),t?.removeAttribute("data-attributes")}))}));const b=({attributes:e,countersEl:n})=>{const{counters:o=[],columns:s,duration:i,separator:a={},isLabel:l}=e;return(0,t.useEffect)((()=>{const t=document.querySelectorAll(`#${n.id} .${d} .counterNumber .number`),e=new IntersectionObserver((n=>{n[0].intersectionRatio<=0||(((t,e,n={})=>{t?.forEach((t=>{const r=parseInt(t.dataset.countStart),o=parseInt(t.dataset.countEnd),s=Date.now(),i=setInterval((()=>{const a=Date.now()-s;a>=e?clearInterval(i):t.innerText=g(parseInt(a/(e/(o-r))+r),n)}),20);setTimeout((()=>{t.innerText=g(o,n)}),e)}))})(t,i,a),e.unobserve(n[0].target))}));e.observe(document.querySelector(`#${n.id} .${d} .counterNumber .number`))}),[]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m,{attributes:e,id:n.id}),(0,p.jsx)("div",{className:`${d} columns-${s.desktop} columns-tablet-${s.tablet} columns-mobile-${s.mobile}`,children:o?.map(((t,n)=>{const{text:o}=t.label,s=l&&o&&(0,p.jsx)("p",{className:"counterLabel",dangerouslySetInnerHTML:{__html:r(o)}});return(0,p.jsx)(h,{attributes:e,counter:t,index:n,labelEl:s},n)}))})]})}})();