(function(){const BLOCK_QUOTE_CLASS="snapchat-embed";const BLOCK_QUOTE_URL_KEY="snapchatEmbedUrl";const BLOCK_QUOTE_HEIGHT_KEY="snapchatEmbedHeight";const BLOCK_QUOTE_WIDTH_KEY="snapchatEmbedWidth";const BLOCK_QUOTE_STYLE_KEY="snapchatEmbedStyle";if(typeof window==="undefined")return;const loadEmbed=()=>{const blockQuoteElements=document.getElementsByClassName(BLOCK_QUOTE_CLASS);if(blockQuoteElements.length===0){console.warn("No blockquote element found")}for(const blockQuoteEl of Array.from(blockQuoteElements)){const dataset=blockQuoteEl.dataset;const iframeStyle=dataset[BLOCK_QUOTE_STYLE_KEY];const embedUrl=dataset[BLOCK_QUOTE_URL_KEY];const embedHeight=dataset[BLOCK_QUOTE_HEIGHT_KEY]||"700";const embedWidth=dataset[BLOCK_QUOTE_WIDTH_KEY]||"340";if(!embedUrl){console.warn("No embed URL found in blockquote",blockQuoteEl);return}const parentURL=window.location.href||"";const iframe=document.createElement("iframe");iframe.src=embedUrl;iframe.height=embedHeight;iframe.width=embedWidth;iframe.setAttribute("frameborder","0");iframe.setAttribute("allow","autoplay; camera; microphone; clipboard-write;");iframe.setAttribute("allowfullscreen","true");iframe.setAttribute("allowtransparency","true");iframe.setAttribute("scrolling","no");iframe.setAttribute("style",iframeStyle||"");iframe.setAttribute("data-snapchat-parent-url",parentURL);iframe.setAttribute("class","snapchat-embed-iframe");blockQuoteEl.parentNode.replaceChild(iframe,blockQuoteEl)}};window.addEventListener("loadEmbed",loadEmbed);if(document.readyState==="complete"){loadEmbed()}else{window.addEventListener("load",loadEmbed)}})();