{"version":3,"file":"YogoVideo.D-Rw_6ZD.mjs","names":["useRef","__esmMin","window","init_npm_react_18_3_1","init_ssg_sandbox_shims","ce","init_jsx_runtime","c","de","applyYogoLogic","elementRef","initialized","scriptId","setupYogo","oldScript","script","observer","mutations","mutation","parsed","dataVideoGroup","Component","props","withBasal","withBeginner","withLowerBack","withChant","withEnglish","withSoft","withShort","withMeditations","withVinyasana","withLevel2","withAllVideos","init_YogoVideo"],"sources":["https:/framerusercontent.com/modules/MqsWhswrsGgwEkEBlIvJ/a78tgnARXb5Qt4sKNArv/YogoVideo.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";function applyYogoLogic(Component,dataVideoGroup){return props=>{const elementRef=useRef(null);const initialized=useRef(false);useEffect(()=>{const YOGO_APP_SERVER=\"lasseyoga.yogo.dk\";const scriptId=\"yogo-loader-script\";// Function to initialize or reinitialize Yogo\nconst setupYogo=()=>{// Remove old script if it exists\nconst oldScript=document.getElementById(scriptId);if(oldScript){oldScript.remove();}// Reset Yogo state\nwindow.YOGO_WIDGETS_LOADED=false;// Create new script\nconst script=document.createElement(\"script\");script.id=scriptId;script.innerHTML=`\n                    !function(){var I=\"https://${YOGO_APP_SERVER}/widgets/\",l=new XMLHttpRequest;l.onloadend=function(){if(200<=l.status&&l.status<300){for(var e=JSON.parse(l.responseText),t=e.css,s=e.js,r=0;r<t.length;r++){var n=document.createElement(\"link\");n.rel=\"stylesheet\",n.setAttribute(\"type\",\"text/css\"),n.href=I+t[r],document.head.appendChild(n)}for(var a=0;a<s.length;a++){var o=document.createElement(\"script\");o.setAttribute(\"type\",\"text/javascript\"),o.src=I+s[a],document.head.appendChild(o)}}else console.error(\"YOGO: Failed to get widget file list from app server.\")},l.open(\"GET\",I+\"filelist.json?cachebuster=\"+Date.now()),l.send()}();\n                `;document.body.appendChild(script);};// Set up MutationObserver to watch for page changes\nconst observer=new MutationObserver(mutations=>{mutations.forEach(mutation=>{if(mutation.type===\"childList\"&&elementRef.current){const isVisible=document.body.contains(elementRef.current);if(isVisible&&!initialized.current){setupYogo();initialized.current=true;}}});});// Start observing\nobserver.observe(document.body,{childList:true,subtree:true});// Initial setup\nif(!initialized.current){setupYogo();initialized.current=true;}// Cleanup\nreturn()=>{observer.disconnect();initialized.current=false;if(elementRef.current){const parsed=elementRef.current.querySelector(\"[data-yogo-parsed]\");if(parsed){parsed.removeAttribute(\"data-yogo-parsed\");}}};},[]);return /*#__PURE__*/_jsx(\"div\",{ref:elementRef,className:\"yogo-widget\",style:{width:\"100%\",height:\"auto\"},children:/*#__PURE__*/_jsx(\"div\",{className:\"yogo-video-group\",\"data-video-group\":dataVideoGroup,style:{width:\"100%\",height:\"auto\"},children:/*#__PURE__*/_jsx(Component,{...props})})});};}// Separate function exports for each override with updated names and video group IDs\nexport function withBasal(Component){return applyYogoLogic(Component,\"468\");}export function withBeginner(Component){return applyYogoLogic(Component,\"469\");}export function withLowerBack(Component){return applyYogoLogic(Component,\"522\");}export function withChant(Component){return applyYogoLogic(Component,\"718\");}export function withEnglish(Component){return applyYogoLogic(Component,\"581\");}export function withSoft(Component){return applyYogoLogic(Component,\"471\");}export function withShort(Component){return applyYogoLogic(Component,\"376\");}export function withMeditations(Component){return applyYogoLogic(Component,\"467\");}export function withVinyasana(Component){return applyYogoLogic(Component,\"470\");}export function withLevel2(Component){return applyYogoLogic(Component,\"1008\");}export function withAllVideos(Component){return applyYogoLogic(Component,\"1629\");}\nexport const __FramerMetadata__ = {\"exports\":{\"withAllVideos\":{\"type\":\"reactHoc\",\"name\":\"withAllVideos\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSoft\":{\"type\":\"reactHoc\",\"name\":\"withSoft\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLevel2\":{\"type\":\"reactHoc\",\"name\":\"withLevel2\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMeditations\":{\"type\":\"reactHoc\",\"name\":\"withMeditations\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVinyasana\":{\"type\":\"reactHoc\",\"name\":\"withVinyasana\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBeginner\":{\"type\":\"reactHoc\",\"name\":\"withBeginner\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withChant\":{\"type\":\"reactHoc\",\"name\":\"withChant\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLowerBack\":{\"type\":\"reactHoc\",\"name\":\"withLowerBack\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withShort\":{\"type\":\"reactHoc\",\"name\":\"withShort\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withEnglish\":{\"type\":\"reactHoc\",\"name\":\"withEnglish\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withBasal\":{\"type\":\"reactHoc\",\"name\":\"withBasal\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./YogoVideo.map"],"mappings":"A,uIAA+E,SAASS,EAAe,EAAU,EAAe,CAAC,MAAO,IAAO,CAAC,IAAMC,EAAWV,EAAO,IAAI,EAAQW,EAAYX,EAAO,EAAK,EAUU,OAVRK,MAAc,CAAC,IAAgDO,EAAS,qBAChRC,MAAc,CACpB,IAAMC,EAAU,SAAS,eAAeF,CAAQ,EAAKE,GAAWA,EAAU,OAAO,EACjF,EAAO,oBAAoB,GAC3B,IAAMC,EAAO,SAAS,cAAc,QAAQ,EAAE,EAAO,GAAGH,EAAS,EAAO,UAAU;;kBAEhE,SAAS,KAAK,YAAYG,CAAM,CAAE,EAC9CC,EAAS,IAAI,iBAAiB,GAAW,CAACC,EAAU,QAAQ,GAAU,CAAIC,EAAS,OAAO,aAAaR,EAAW,SAAyB,SAAS,KAAK,SAASA,EAAW,OAAoB,GAAG,CAACC,EAAY,UAASE,EAAU,EAAE,EAAY,QAAQ,GAAO,CAAC,CAAE,CAAC,EAG3Q,OAFAG,EAAS,QAAQ,SAAS,KAAK,CAAC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