{"version":3,"file":"Wistia.Bde7Nc8P.mjs","names":[],"sources":["https:/framerusercontent.com/modules/5d0qzrJHfoZdZAkm3GjD/CFpyoMkONQa9lAOkcg9U/Wistia.js"],"sourcesContent":["/**\n * @framerDisableUnlink\n * @framerIntrinsicWidth 640\n * @framerIntrinsicHeight 360\n */import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";/**\n * WistiaEmbed\n *\n * A Framer Code Component that embeds a Wistia video using Wistia’s custom player.\n * It injects the required scripts and dynamic style based on the provided video ID.\n */export default function WistiaEmbed({videoId,style}){useEffect(()=>{// Inject the main Wistia player script if it's not already on the page.\nif(!document.querySelector('script[src=\"https://fast.wistia.com/player.js\"]')){const playerScript=document.createElement(\"script\");playerScript.src=\"https://fast.wistia.com/player.js\";playerScript.async=true;document.body.appendChild(playerScript);}// Create (or update) the embed script specific to the video.\nconst embedScriptId=`wistia-embed-script-${videoId}`;const existingEmbedScript=document.getElementById(embedScriptId);if(existingEmbedScript){existingEmbedScript.remove();}const embedScript=document.createElement(\"script\");embedScript.src=`https://fast.wistia.com/embed/${videoId}.js`;embedScript.async=true;embedScript.type=\"module\";embedScript.id=embedScriptId;document.body.appendChild(embedScript);// Cleanup when the component unmounts or when videoId changes.\nreturn()=>{if(embedScript.parentNode){embedScript.parentNode.removeChild(embedScript);}};},[videoId]);// Dynamically generate the style block for the placeholder (swatch) image.\nconst styleContent=`\n        wistia-player[media-id='${videoId}']:not(:defined) {\n            background: center / contain no-repeat url('https://fast.wistia.com/embed/medias/${videoId}/swatch');\n            display: block;\n            filter: blur(5px);\n            padding-top: 56.25%;\n        }\n    `;return /*#__PURE__*/_jsxs(motion.div,{style:style,children:[/*#__PURE__*/_jsx(\"style\",{children:styleContent}),/*#__PURE__*/_jsx(\"wistia-player\",{\"media-id\":videoId,aspect:\"1.7777777777777777\"})]});}WistiaEmbed.defaultProps={videoId:\"l38i9g3r7x\",style:{width:\"640px\",height:\"360px\"}};addPropertyControls(WistiaEmbed,{videoId:{type:ControlType.String,title:\"Video ID\",defaultValue:\"l38i9g3r7x\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"WistiaEmbed\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Wistia.map"],"mappings":"yVASG,SAAwB,EAAY,CAAC,UAAQ,QAAM,CAAC,CAAC,EAAU,IAAI,CACtE,IAAI,SAAS,cAAc,kDAAkD,CAAC,CAAC,IAAM,EAAa,SAAS,cAAc,SAAS,CAA8E,AAA7E,EAAa,IAAI,oCAAoC,EAAa,OAAM,EAAK,SAAS,KAAK,YAAY,EAAa,AAAE,CACzP,IAAM,GAAe,sBAAsB,IAAgB,EAAoB,SAAS,eAAe,EAAc,CAAC,AAAG,GAAqB,EAAoB,QAAQ,CAAE,IAAM,EAAY,SAAS,cAAc,SAAS,CAC9N,OAD+N,EAAY,KAAK,gCAAgC,EAAQ,KAAK,EAAY,OAAM,EAAK,EAAY,KAAK,SAAS,EAAY,GAAG,EAAc,SAAS,KAAK,YAAY,EAAY,CAC3Y,IAAI,CAAC,AAAG,EAAY,YAAY,EAAY,WAAW,YAAY,EAAY,AAAG,CAAE,EAAC,CAAC,CAAQ,EAAC,CACrG,IAAM,GAAc;kCACc,EAAQ;+FACqD,EAAQ;;;;;MAKjG,MAAoB,GAAM,EAAO,IAAI,CAAO,QAAM,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS,CAAa,EAAC,CAAc,EAAK,gBAAgB,CAAC,WAAW,EAAQ,OAAO,oBAAqB,EAAC,AAAC,CAAC,EAAC,AAAE,cAAqF,AAhB/R,GAAyD,IAA6B,IAAkC,IAAoD,CAgB8B,EAAY,aAAa,CAAC,QAAQ,aAAa,MAAM,CAAC,MAAM,QAAQ,OAAO,OAAQ,CAAC,EAAC,EAAoB,EAAY,CAAC,QAAQ,CAAC,KAAK,EAAY,OAAO,MAAM,WAAW,aAAa,YAAa,CAAC,EAAC"}