(()=>{"use strict";var e={5338:(e,t,r)=>{var o=r(5795);t.H=o.createRoot,o.hydrateRoot},5795:e=>{e.exports=window.ReactDOM}},t={};const r=window.React;var o=function r(o){var a=t[o];if(void 0!==a)return a.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}(5338);const a="bBlocksVideo",n=({attributes:e,id:t})=>{const{width:o,radius:n}=e;return(0,r.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n\t\t#${t} .${a}{\n\t\t\twidth: ${["0px","0%","0em"].includes(o)?"100%":o};\n\t\t\tborder-radius: ${n};\n\t\t}\n\t\t`.replace(/\s+/g," ")}})},s=e=>{const t=[];return Object.keys(e).map((r=>{e[r]&&t.push(r)})),t};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-b-blocks-video").forEach((e=>{const t=JSON.parse(e.dataset.attributes);(0,o.H)(e).render((0,r.createElement)(r.Fragment,null,(0,r.createElement)(n,{attributes:t,id:e.id}),(0,r.createElement)(c,{attributes:t}))),e?.removeAttribute("data-attributes")}))}));const c=({attributes:e})=>{const{source:t,poster:o,controls:n,repeat:c,autoplay:d,muted:l,resetOnEnd:u,autoHideControl:i}=e,p=(0,r.useRef)(null);return(0,r.useEffect)((()=>{new Plyr(p.current,{controls:s(n),clickToPlay:!1,loop:{active:c},muted:l,autoplay:d,resetOnEnd:u,hideControls:i})}),[]),(0,r.createElement)("div",{className:a},(0,r.createElement)("div",{className:"videoWrapper"},(0,r.createElement)("video",{controls:!0,playsInline:!0,"data-poster":o,preload:"metadata",ref:p},"Your browser does not support the video tag.",(0,r.createElement)("source",{src:t,type:"video/mp4"}))))}})();