{"version":3,"file":"TipsAndResourcesVideo-CWTUpBxU.js","sources":["../../../app/javascript/modules/growthmentor/dashboard/components/DashboardCarousel.vue","../../../app/javascript/shared/composables/useWistiaScriptLoader.js","../../../app/javascript/shared/components/TipsAndResourcesVideo.vue"],"sourcesContent":["\n\n\n","import { onMounted } from 'vue'\n\nexport const useWistiaScriptLoader = () => {\n const loadWistiaScript = (url) => {\n if (isWistiaScriptAlreadyLoaded(url)) return\n const wistiaPlayerScript = document.createElement('script')\n wistiaPlayerScript.setAttribute('src', url)\n wistiaPlayerScript.setAttribute('async', 'true')\n document.head.appendChild(wistiaPlayerScript)\n }\n const isWistiaScriptAlreadyLoaded = (url) => {\n const wistiaPlayerScript = document.querySelectorAll(`[src=\"${url}\"]`)\n return wistiaPlayerScript.length > 0\n }\n const loadWistiaVideoScript = (videoId) => {\n const url = `https://fast.wistia.com/embed/medias/${videoId}.jsonp`\n if (isWistiaScriptAlreadyLoaded(url)) return\n loadWistiaScript(url)\n }\n\n onMounted(() => {\n loadWistiaScript('https://fast.wistia.com/assets/external/E-v1.js')\n })\n\n return {\n loadWistiaVideoScript,\n }\n}\n","\n\n\n\n\n"],"names":["props","__props","currentIndex","ref","maxIndex","computed","hasNextIndex","hasPreviousIndex","next","previous","useWistiaScriptLoader","loadWistiaScript","url","isWistiaScriptAlreadyLoaded","wistiaPlayerScript","loadWistiaVideoScript","videoId","onMounted","openModal","useModals","modalName","trackClickedVideo","handleVideoClick"],"mappings":"sjBAmDA,MAAMA,EAAQC,EAMRC,EAAeC,EAAI,CAAC,EACpBC,EAAWC,EAAS,IAAML,EAAM,SAAS,OAAS,CAAC,EACnDM,EAAeD,EAAS,IAAMH,EAAa,MAAQE,EAAS,KAAK,EACjEG,EAAmBF,EAAS,IAAMH,EAAa,MAAQ,CAAC,EAExDM,EAAO,IAAM,CACZF,EAAa,OACLJ,EAAA,OAAA,EAGTO,EAAW,IAAM,CAChBF,EAAiB,OACTL,EAAA,OAAA,gnCCnEFQ,EAAwB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