File: /home/bt667/public_html/wp-content/plugins/embed-optimizer/detect.min.js
export const name="Embed Optimizer";const loadedElementContentRects=new Map;export async function initialize({log:e}){const t=e||console.log,n=document.querySelectorAll(".wp-block-embed > .wp-block-embed__wrapper[data-od-xpath]");for(const e of n)monitorEmbedWrapperForResizes(e,t);t("Loaded embed content rects:",loadedElementContentRects)}export async function finalize({log:e,error:t,getElementData:n,extendElementData:o}){const r=e||console.log,d=t||console.error;for(const[e,t]of loadedElementContentRects.entries())try{o(e,{resizedBoundingClientRect:t}),r(`boundingClientRect for ${e} resized:`,n(e).boundingClientRect,"=>",t)}catch(n){d(`Failed to extend element data for ${e} with resizedBoundingClientRect:`,t,n)}}function monitorEmbedWrapperForResizes(e,t){if(!("odXpath"in e.dataset))throw new Error("Embed wrapper missing data-od-xpath attribute.");const n=e.dataset.odXpath;new ResizeObserver((e=>{const[o]=e;loadedElementContentRects.set(n,o.contentRect),t(`Resized element ${n}:`,o.contentRect)})).observe(e,{box:"content-box"})}