import{M as e,H as r,p as a,F as o,a7 as n,z as c}from"./app-DLP8qLDG.js";class d{#t;src=e("");referrerPolicy=null;get iframe(){return this.#t}constructor(t){this.#t=t,t.setAttribute("frameBorder","0"),t.setAttribute("aria-hidden","true"),t.setAttribute("allow","autoplay; fullscreen; encrypted-media; picture-in-picture; accelerometer; gyroscope"),this.referrerPolicy!==null&&t.setAttribute("referrerpolicy",this.referrerPolicy)}setup(){r(window,"message",this.#i.bind(this)),r(this.#t,"load",this.onLoad.bind(this)),a(this.#s.bind(this))}#s(){const t=this.src();if(!t.length){this.#t.setAttribute("src","");return}const s=o(()=>this.buildParams());this.#t.setAttribute("src",n(t,s))}postMessage(t,s){this.#t.contentWindow?.postMessage(JSON.stringify(t),s??"*")}#i(t){const s=this.getOrigin();if((t.source===null||t.source===this.#t?.contentWindow)&&(!c(s)||s===t.origin)){try{const i=JSON.parse(t.data);i&&this.onMessage(i,t);return}catch{}t.data&&this.onMessage(t.data,t)}}}export{d as E};
