|
1
|
|
-(()=>{"use strict";var e={5338:(e,t,r)=>{var n=r(5795);t.H=n.createRoot,n.hydrateRoot},5795:e=>{e.exports=window.ReactDOM}},t={};const r=window.React;var n=function r(n){var a=t[n];if(void 0!==a)return a.exports;var c=t[n]={exports:{}};return e[n](c,c.exports,r),c.exports}(5338);const a=(e,t="box")=>{const{hOffset:r="0px",vOffset:n="0px",blur:a="0px",spreed:c="0px",color:s="#7090b0",isInset:l=!1}=e||{},i=`${r} ${n} ${a}`;return("text"===t?`${i} ${s}`:`${i} ${c} ${s} ${l?"inset":""}`)||"none"},c=e=>{const{side:t=2,vertical:r="0px",horizontal:n="0px",top:a="0px",right:c="0px",bottom:s="0px",left:l="0px"}=e||{};return 2===t?`${r} ${n}`:`${a} ${c} ${s} ${l}`},s="bBlocksPricingTable",l=({attributes:e,id:t,isStandard:n})=>{const{pricingTables:l,columnGap:i,rowGap:o,textAlign:m,padding:p,shadow:u}=e,d=`#${t}`,$=`${d} .${s}`;return(0,r.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${$}{\n\t\t\tgrid-gap: ${o} ${i};\n\t\t\ttext-align: ${m};\n\t\t\tpadding: ${n?"30px 0":"0"}\n\t\t}\n\t\t${$} .priceItem{\n\t\t\tpadding: ${c(p)};\n\t\t\tbox-shadow: ${a(u)};\n\t\t}\n\n\t\t${l?.map(((e,t)=>{const{color:r}=e,n=`${$} #priceItem-${t} .priceItem`,a=e=>`${d}.is-style-${e} .${s} #priceItem-${t} .priceItem`;return`\n\t\t\t\t${n} .priceName,\n\t\t\t\t${a("basic")} .priceAmountWrap,\n\t\t\t\t${a("standard")} .priceAmountWrap{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t\t${n} .priceLink,\n\t\t\t\t${a("basic")} .priceName,\n\t\t\t\t${a("standard")}::before,\n\t\t\t\t${a("ultimate")} .priceAmountWrap{\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tbackground-color: ${r};\n\t\t\t\t}\n\t\t\t\t${a("basic")} .priceName::before{\n\t\t\t\t\tborder-top-color: ${r};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},i=e=>{try{const t=new URL(e);return["http:","https:"].includes(t.protocol)?t.toString():null}catch(t){return"string"==typeof e&&e.startsWith("/")&&!e.startsWith("//")?e:null}},o=e=>{const t=(new DOMParser).parseFromString(e,"text/html"),r=["b","strong","i","em","span","a","br"],n=["style","href","target","rel","class"];return t.body.querySelectorAll("*").forEach((e=>{r.includes(e.tagName.toLowerCase())?[...e.attributes].forEach((t=>{if(n.includes(t.name)||e.removeAttribute(t.name),"href"===t.name){const r=i(t.value);r?e.setAttribute("href",r):e.removeAttribute("href")}})):e.remove()})),t.body.innerHTML},m=(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureEnabled",viewBox:"0 0 512 512"},(0,r.createElement)("path",{fill:"#01944e",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})),p=(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureDisabled",viewBox:"0 0 352 512"},(0,r.createElement)("path",{fill:"#f00025",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})),u=({features:e})=>(0,r.createElement)("div",{className:"priceFeatures"},e?.map(((e,t)=>{const{isEnable:n,label:a}=e;return(0,r.createElement)("div",{key:t,className:"priceFeature"},n?m:p,(0,r.createElement)("span",{className:"priceFeatureLabel",dangerouslySetInnerHTML:{__html:o(a)}}))}))),d=({attributes:e,id:t,isBasic:n,isStandard:a,isUltimate:c})=>{const{pricingTables:l,columns:m}=e;(0,r.useEffect)((()=>{const e=document.querySelectorAll(`#${t} .priceItem .priceFeatures`),r=[];e?.forEach((e=>{r.push(e?.clientHeight)})),e?.forEach((e=>{e.style.height=Math.max(...r)+"px"}))}),[l]);const p=({priceTable:e,index:t})=>{const{name:s,price:l,priceCurrency:m,period:p,link:d,linkLabel:$,features:b}=e,f=(0,r.useRef)(null),h=(0,r.useRef)(null);(0,r.useEffect)((()=>{if(c){const e=f?.current?.clientHeight/100*82;h.current.style.width=`${e}px`,h.current.style.top=e/2+"px",h.current.style.left=-e/2+60+"px"}}),[]);const g=(0,r.createElement)("span",{className:"priceAmount"},m,l),x=(0,r.createElement)("span",{className:"pricePeriod",dangerouslySetInnerHTML:{__html:o(p)}});return(0,r.createElement)("div",{key:t,id:`priceItem-${t}`},(0,r.createElement)("div",{className:"priceItem",ref:f},(0,r.createElement)("h3",{className:"priceName",dangerouslySetInnerHTML:{__html:o(s)}}),a||c?(0,r.createElement)("div",{className:"priceAmountWrap",ref:h},g,p?" / ":"",x):"",(0,r.createElement)(u,{features:b}),a||c?"":(0,r.createElement)("div",{className:"priceAmountWrap"},g),!n&&(0,r.createElement)("br",null),$&&(0,r.createElement)("a",{className:"priceLink",href:i(d),dangerouslySetInnerHTML:{__html:o($)}})))};return(0,r.createElement)("div",{className:`${s} columns-${m.desktop} columns-tablet-${m.tablet} columns-mobile-${m.mobile}`},l?.map(((e,t)=>(0,r.createElement)(p,{key:t,priceTable:e,index:t}))))};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-pricing-table").forEach((e=>{const t=JSON.parse(e.dataset.attributes),a=e.className.includes("basic"),c=e.className.includes("standard"),s=e.className.includes("ultimate");(0,n.H)(e).render((0,r.createElement)(r.Fragment,null,(0,r.createElement)(l,{attributes:t,id:e.id,isStandard:c}),(0,r.createElement)(d,{attributes:t,id:e.id,isBasic:a,isStandard:c,isUltimate:s}))),e?.removeAttribute("data-attributes")}))}))})(); |
|
1
|
+(()=>{"use strict";const t=window.ReactDOM,e=window.React,r=(t,e="box")=>{const{hOffset:r="0px",vOffset:s="0px",blur:n="0px",spreed:a="0px",color:i="#7090b0",isInset:c=!1}=t||{},l=`${r} ${s} ${n}`;return("text"===e?`${l} ${i}`:`${l} ${a} ${i} ${c?"inset":""}`)||"none"},s=t=>{const{side:e=2,vertical:r="0px",horizontal:s="0px",top:n="0px",right:a="0px",bottom:i="0px",left:c="0px"}=t||{};return 2===e?`${r} ${s}`:`${n} ${a} ${i} ${c}`},n="bBlocksPricingTable",a=window.ReactJSXRuntime,i=({attributes:t,id:e,isStandard:i})=>{const{pricingTables:c,columnGap:l,rowGap:o,textAlign:d,padding:p,shadow:u}=t,m=`#${e}`,x=`${m} .${n}`;return(0,a.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t${x}{\n\t\t\tgrid-gap: ${o} ${l};\n\t\t\ttext-align: ${d};\n\t\t\tpadding: ${i?"30px 0":"0"}\n\t\t}\n\t\t${x} .priceItem{\n\t\t\tpadding: ${s(p)};\n\t\t\tbox-shadow: ${r(u)};\n\t\t}\n\n\t\t${c?.map(((t,e)=>{const{color:r}=t,s=`${x} #priceItem-${e} .priceItem`,a=t=>`${m}.is-style-${t} .${n} #priceItem-${e} .priceItem`;return`\n\t\t\t\t${s} .priceName,\n\t\t\t\t${a("basic")} .priceAmountWrap,\n\t\t\t\t${a("standard")} .priceAmountWrap{\n\t\t\t\t\tcolor: ${r};\n\t\t\t\t}\n\t\t\t\t${s} .priceLink,\n\t\t\t\t${a("basic")} .priceName,\n\t\t\t\t${a("standard")}::before,\n\t\t\t\t${a("ultimate")} .priceAmountWrap{\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t\tbackground-color: ${r};\n\t\t\t\t}\n\t\t\t\t${a("basic")} .priceName::before{\n\t\t\t\t\tborder-top-color: ${r};\n\t\t\t\t}\n\t\t\t`})).join(" ")}\n\t\t`.replace(/\s+/g," ")}})},c=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}},l=t=>{const e=(new DOMParser).parseFromString(t,"text/html"),r=["b","strong","i","em","span","a","br"],s=["style","href","target","rel","class"];return e.body.querySelectorAll("*").forEach((t=>{r.includes(t.tagName.toLowerCase())?[...t.attributes].forEach((e=>{if(s.includes(e.name)||t.removeAttribute(e.name),"href"===e.name){const r=c(e.value);r?t.setAttribute("href",r):t.removeAttribute("href")}})):t.remove()})),e.body.innerHTML},o=(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureEnabled",viewBox:"0 0 512 512",children:(0,a.jsx)("path",{fill:"#01944e",d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"})}),d=(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"priceFeatureDisabled",viewBox:"0 0 352 512",children:(0,a.jsx)("path",{fill:"#f00025",d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"})}),p=({features:t})=>(0,a.jsx)("div",{className:"priceFeatures",children:t?.map(((t,e)=>{const{isEnable:r,label:s}=t;return(0,a.jsxs)("div",{className:"priceFeature",children:[r?o:d,(0,a.jsx)("span",{className:"priceFeatureLabel",dangerouslySetInnerHTML:{__html:l(s)}})]},e)}))}),u=({attributes:t,id:r,isBasic:s,isStandard:i,isUltimate:o})=>{const{pricingTables:d,columns:u}=t;(0,e.useEffect)((()=>{const t=document.querySelectorAll(`#${r} .priceItem .priceFeatures`),e=[];t?.forEach((t=>{e.push(t?.clientHeight)})),t?.forEach((t=>{t.style.height=Math.max(...e)+"px"}))}),[d]);const m=({priceTable:t,index:r})=>{const{name:n,price:d,priceCurrency:u,period:m,link:x,linkLabel:$,features:b}=t,h=(0,e.useRef)(null),f=(0,e.useRef)(null);(0,e.useEffect)((()=>{if(o){const t=h?.current?.clientHeight/100*82;f.current.style.width=`${t}px`,f.current.style.top=t/2+"px",f.current.style.left=-t/2+60+"px"}}),[]);const g=(0,a.jsxs)("span",{className:"priceAmount",children:[u,d]}),j=(0,a.jsx)("span",{className:"pricePeriod",dangerouslySetInnerHTML:{__html:l(m)}});return(0,a.jsx)("div",{id:`priceItem-${r}`,children:(0,a.jsxs)("div",{className:"priceItem",ref:h,children:[(0,a.jsx)("h3",{className:"priceName",dangerouslySetInnerHTML:{__html:l(n)}}),i||o?(0,a.jsxs)("div",{className:"priceAmountWrap",ref:f,children:[g,m?" / ":"",j]}):"",(0,a.jsx)(p,{features:b}),i||o?"":(0,a.jsx)("div",{className:"priceAmountWrap",children:g}),!s&&(0,a.jsx)("br",{}),$&&(0,a.jsx)("a",{className:"priceLink",href:c(x),dangerouslySetInnerHTML:{__html:l($)}})]})},r)};return(0,a.jsx)("div",{className:`${n} columns-${u.desktop} columns-tablet-${u.tablet} columns-mobile-${u.mobile}`,children:d?.map(((t,e)=>(0,a.jsx)(m,{priceTable:t,index:e},e)))})};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-pricing-table").forEach((e=>{const r=JSON.parse(e.dataset.attributes),s=e.className.includes("basic"),n=e.className.includes("standard"),c=e.className.includes("ultimate");(0,t.createRoot)(e).render((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i,{attributes:r,id:e.id,isStandard:n}),(0,a.jsx)(u,{attributes:r,id:e.id,isBasic:s,isStandard:n,isUltimate:c})]})),e?.removeAttribute("data-attributes")}))}))})(); |