{"version":3,"file":"figure-c7fdb3d2.js","sources":["../../../../node_modules/youtube-iframe/index.js","../../../../src/scripts/modules/figure.ts"],"sourcesContent":["(function(window) {\n\tvar YouTubeIframeLoader = {\n\t\tsrc: 'https://www.youtube.com/iframe_api',\n\t\tloading: false,\n\t\tloaded: false,\n\t\tlisteners: [],\n\n\t\tload: function(callback) {\n\t\t\tvar _this = this;\n\t\t\tthis.listeners.push(callback);\n\n\t\t\tif(this.loaded) {\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t_this.done();\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(this.loading) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.loading = true;\n\n\t\t\twindow.onYouTubeIframeAPIReady = function() {\n\t\t\t\t_this.loaded = true;\n\t\t\t\t_this.done();\n\t\t\t};\n\n\t\t\tvar script = document.createElement('script');\n\t\t\tscript.type = 'text/javascript';\n\t\t\tscript.src = this.src;\n\t\t\tdocument.body.appendChild(script);\n\t\t},\n\n\t\tdone: function() {\n\t\t\tdelete window.onYouTubeIframeAPIReady;\n\n\t\t\twhile(this.listeners.length) {\n\t\t\t\tthis.listeners.pop()(window.YT);\n\t\t\t}\n\t\t}\n\t};\n\n\tif(typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = YouTubeIframeLoader;\n\t} else {\n\t\twindow.YouTubeIframeLoader = YouTubeIframeLoader;\n\t}\n}(window));\n","import { Component } from '@verndale/core';\nimport YouTubeIframeLoader from 'youtube-iframe';\nimport { BREAKPOINTS } from '../helpers/breakpoints';\nimport { debounce } from '../helpers/debounce';\nimport { DataLayerObject, ExtendedWindowType } from '../helpers/global-types';\n\ntype YoutubePlayer = {\n on: (event: string, cb: () => void) => void;\n showLightbox: () => void;\n setVolume: (newVolume: number) => void;\n playVideo: () => void;\n pauseVideo: () => void;\n getCurrentTime: () => number;\n getDuration: () => number;\n loadVideoById: (id: string, start: number, quality: string) => void;\n};\n\nclass VideoFigure extends Component {\n private player: YoutubePlayer | null = null;\n private src: string;\n private pauseLabel: string;\n private playLabel: string;\n private autoplay: boolean;\n private playing = false;\n private lastEvent: number | null;\n private config: object;\n private customControls: boolean;\n private mobileVideoId: string;\n private tabletVideoId: string;\n private wideVideoId: string;\n private currentBreakpoint: number;\n private changed: boolean;\n private checkProgress: null | NodeJS.Timer;\n private playingInterval: null | NodeJS.Timer;\n private fallback: number;\n private playedVideoTimes: number[];\n private iframeLoaded: boolean;\n private facadeEvents: string[];\n\n constructor(el: HTMLElement) {\n super(el);\n this.src = this.el.dataset.url || '';\n this.pauseLabel = this.el.dataset.pauseLabel || 'Pause';\n this.playLabel = this.el.dataset.playLabel || 'Play';\n this.autoplay = this.el.dataset.autoplay ? true : false;\n this.customControls = this.el.dataset.customControls ? true : false;\n this.mobileVideoId = this.el.dataset.mobileVideoId || '';\n this.tabletVideoId =\n this.el.dataset.tabletVideoId || this.el.dataset.mobileVideoId || '';\n this.wideVideoId = this.el.dataset.wideVideoId || this.src || '';\n this.currentBreakpoint = 0;\n this.fallback = 0;\n this.playing = false;\n this.lastEvent = null;\n this.config = {};\n this.changed = false;\n this.playingInterval = null;\n this.checkProgress = null;\n this.playedVideoTimes = [];\n this.iframeLoaded = false;\n this.facadeEvents = [\n 'resize',\n 'mousemove',\n 'touchstart',\n 'touchmove',\n 'scroll',\n 'click',\n 'keydown'\n ];\n\n if (this.wideVideoId || this.tabletVideoId || this.mobileVideoId) {\n this.resizeYoutubePlayer();\n }\n\n this.addFacadeListeners();\n }\n\n setupDefaults() {\n this.dom = {\n el: this.el,\n videoTrigger: this.el.querySelector(\n '.figure__media-button'\n ),\n localVideo: this.el.querySelector('video'),\n captionOverlay: this.el.querySelector(\n '.figure__caption--overlay'\n ),\n youtubeImg: this.el.querySelector(\n '.figure__media-youtube-img'\n ),\n iframe: this.el.querySelector('.iframe'),\n iframeContainer: this.el.querySelector('.figure__media')\n };\n\n if (this.dom.localVideo && this.autoplay) {\n (this.dom.localVideo as HTMLVideoElement).muted = true;\n this.handleVideoClick();\n }\n }\n\n addListeners() {\n (this.dom.videoTrigger as HTMLButtonElement)?.addEventListener(\n 'click',\n this.handleVideoClick.bind(this)\n );\n\n if (this.dom.localVideo) {\n (this.dom.localVideo as HTMLVideoElement).addEventListener(\n 'play',\n this.handleVideoPlay.bind(this)\n );\n (this.dom.localVideo as HTMLVideoElement).addEventListener(\n 'pause',\n this.handleVideoPause.bind(this)\n );\n (this.dom.localVideo as HTMLVideoElement).addEventListener(\n 'ended',\n this.handleVideoEnd.bind(this)\n );\n }\n\n this.mobileVideoId = this.el.dataset.mobileVideoId || '';\n this.tabletVideoId =\n this.el.dataset.tabletVideoId || this.el.dataset.mobileVideoId || '';\n this.wideVideoId = this.el.dataset.wideVideoId || this.src || '';\n\n if (\n this.dom.iframe &&\n (this.mobileVideoId || this.tabletVideoId || this.wideVideoId)\n ) {\n window.addEventListener(\n 'resize',\n debounce(this.handleYoutubeResize.bind(this), 250)\n );\n }\n }\n\n addFacadeListeners() {\n this.facadeEvents.forEach(event => {\n window.addEventListener(event, this.handleWindowInteraction.bind(this));\n });\n }\n\n removeFacadeListeners() {\n this.facadeEvents.forEach(event => {\n window.removeEventListener(\n event,\n this.handleWindowInteraction.bind(this)\n );\n });\n }\n\n resizeYoutubePlayer() {\n if (this.player) {\n if (\n window.matchMedia(`(max-width: ${BREAKPOINTS.tablet - 1}px)`).matches &&\n this.currentBreakpoint !== BREAKPOINTS.mobile &&\n this.mobileVideoId\n ) {\n this.player?.loadVideoById(this.mobileVideoId, 0, 'large');\n this.currentBreakpoint = BREAKPOINTS.mobile;\n return;\n }\n\n if (\n window.matchMedia(\n `(min-width:${BREAKPOINTS.tablet}px) and (max-width: ${\n BREAKPOINTS.tabletLandscape - 1\n }px)`\n ).matches &&\n this.currentBreakpoint !== BREAKPOINTS.tablet &&\n this.tabletVideoId\n ) {\n this.player?.loadVideoById(this.tabletVideoId, 0, 'large');\n this.currentBreakpoint = BREAKPOINTS.tablet;\n return;\n }\n\n if (\n window.matchMedia(\n `(min-width:${BREAKPOINTS.tabletLandscape}px) and (max-width: ${\n BREAKPOINTS.wide - 1\n }px)`\n ).matches &&\n this.currentBreakpoint !== BREAKPOINTS.tabletLandscape &&\n this.src\n ) {\n this.player?.loadVideoById(this.src, 0, 'large');\n this.currentBreakpoint = BREAKPOINTS.tabletLandscape;\n return;\n }\n\n if (\n window.matchMedia(`(min-width: ${BREAKPOINTS.wide}px)`).matches &&\n this.currentBreakpoint !== BREAKPOINTS.wide &&\n this.wideVideoId\n ) {\n this.player?.loadVideoById(this.wideVideoId, 0, 'large');\n this.currentBreakpoint = BREAKPOINTS.wide;\n }\n }\n }\n\n playVideoEvent() {\n const videoPlayerPlay = this.el.dataset.videoPlayerPlay;\n if (videoPlayerPlay) {\n (window as ExtendedWindowType).dataLayer.push(\n JSON.parse(videoPlayerPlay) as DataLayerObject\n );\n }\n }\n\n progressVideoEvent(iframe: YoutubePlayer) {\n if (iframe && iframe.getCurrentTime && iframe.getDuration) {\n const progress = Math.floor(\n (iframe?.getCurrentTime() * 100) / iframe?.getDuration()\n );\n let progressVal = 0;\n if (progress === 75) {\n progressVal = 75;\n } else if (progress === 50) {\n progressVal = 50;\n } else if (progress === 25) {\n progressVal = 25;\n } else if (progress === 10) {\n progressVal = 10;\n }\n\n if (progressVal > 0) {\n if (!this.playedVideoTimes.includes(progressVal)) {\n this.playedVideoTimes.push(progressVal);\n const videoPlayerProgress =\n this.el.dataset.videoPlayerProgress?.replace(\n '{progress}',\n progressVal.toString()\n );\n if (videoPlayerProgress) {\n (window as ExtendedWindowType).dataLayer.push(\n JSON.parse(videoPlayerProgress) as DataLayerObject\n );\n }\n }\n }\n }\n }\n\n endVideoEvent() {\n this.playedVideoTimes = [];\n const videoPlayerEnd = this.el.dataset.videoPlayerEnd;\n if (videoPlayerEnd) {\n (window as ExtendedWindowType).dataLayer.push(\n JSON.parse(videoPlayerEnd) as DataLayerObject\n );\n }\n }\n\n loadIframe() {\n if (this.dom.iframe) {\n YouTubeIframeLoader.load(this.handleIframeLoader.bind(this));\n (this.dom.iframe as HTMLElement).setAttribute('tabindex', '-1');\n this.iframeLoaded = true;\n this.removeFacadeListeners();\n }\n }\n\n handleWindowInteraction() {\n if (!this.iframeLoaded) this.loadIframe();\n }\n\n handleYoutubeResize() {\n this.resizeYoutubePlayer();\n }\n\n handleIframeLoader(YT: {\n Player: new (\n arg0: HTMLElement | NodeListOf | null,\n arg1: {\n height: string;\n width: string;\n videoId: string;\n playerVars: object;\n events: {\n onStateChange: (event: { data: number }) => void;\n onReady: () => void;\n };\n }\n ) => YoutubePlayer | null;\n }) {\n this.config = {\n modestbranding: 1,\n rel: 0,\n showinfo: 0,\n autohide: 1,\n playsinline: 1\n };\n\n if (this.autoplay) {\n this.config = {\n modestbranding: 1,\n rel: 0,\n showinfo: 0,\n autohide: 1,\n playsinline: 1,\n autoplay: 1,\n mute: 1\n };\n }\n\n if (this.customControls) {\n this.config = {\n ...this.config,\n disable: 1,\n iv_load_policy: 3,\n loop: 1,\n ecver: 2\n };\n }\n\n this.player = new YT.Player(this.dom.iframe, {\n height: '390',\n width: '640',\n videoId: this.src,\n playerVars: this.config,\n events: {\n onStateChange: this.handleStateChange.bind(this),\n onReady: this.handlePlayerReady.bind(this)\n }\n });\n\n if (this.autoplay) {\n this.handleVideoPlay();\n }\n }\n\n handlePlayerReady() {\n if (this.customControls) {\n this.resizeYoutubePlayer();\n }\n }\n\n handleStateChange(event: { data: number }) {\n this.lastEvent = event.data;\n if (event.data === 0) {\n setTimeout(() => {\n this.handleVideoPause();\n this.player?.playVideo?.();\n this.endVideoEvent();\n }, 100);\n }\n\n if (event.data === 1) {\n if (!this.changed) {\n this.handleVideoPlay();\n this.player?.playVideo?.();\n } else {\n this.player?.pauseVideo?.();\n this.changed = false;\n }\n }\n\n if (event.data === 2) {\n setTimeout(() => this.handleVideoPause(), 250);\n }\n }\n\n async handleVideoClick() {\n if (this.el.getAttribute('data-prevent-playing') !== 'true') {\n if (this.dom.localVideo) {\n if ((this.dom.localVideo as HTMLVideoElement).paused) {\n (this.dom.localVideo as HTMLVideoElement).play();\n (this.dom.localVideo as HTMLVideoElement).setAttribute(\n 'controls',\n 'true'\n );\n } else {\n (this.dom.localVideo as HTMLVideoElement).pause();\n (this.dom.localVideo as HTMLVideoElement).removeAttribute('controls');\n }\n }\n\n if (this.dom.iframe) {\n if (this.player) {\n if (!this.playing) {\n const _iframe = this.dom.iframe as HTMLIFrameElement;\n if (_iframe.getAttribute('tabindex') === '-1') {\n _iframe.setAttribute('tabindex', '0');\n }\n this.player.playVideo?.();\n this.playing = true;\n } else {\n this.player.pauseVideo?.();\n this.handleVideoPause();\n this.playing = false;\n }\n }\n }\n }\n }\n\n handleExternalVideoPause() {\n if (this.playing) {\n this.player?.pauseVideo?.();\n this.playing = false;\n }\n }\n\n handleReplaceId(id: string, autoplay = false) {\n this.player?.loadVideoById(id, 0, '');\n this.changed = !autoplay;\n }\n\n handleRemoveImage() {\n if (this.player && this.player?.getCurrentTime() > 0.1) {\n this.el.classList.add('figure-video--playing');\n (this.dom.youtubeImg as HTMLElement)?.setAttribute(\n 'style',\n 'display:none'\n );\n\n (this.dom.videoTrigger as HTMLElement)?.classList.add(\n 'figure__media-button--pause'\n );\n\n if (this.playingInterval) {\n clearInterval(this.playingInterval);\n }\n } else {\n this.fallback++;\n }\n if (this.fallback > 500) {\n if (this.playingInterval) {\n clearInterval(this.playingInterval);\n }\n }\n }\n\n handleVideoPlay() {\n this.playVideoEvent();\n this.playedVideoTimes = [];\n const videoTrigger = this.dom.videoTrigger as HTMLVideoElement;\n\n if (this.customControls) {\n if (!this.autoplay) {\n videoTrigger.classList.add('figure__media-button--pause');\n }\n } else {\n (this.dom.iframeContainer as HTMLElement)\n ?.querySelector('.iframe')\n ?.setAttribute('tabindex', '0');\n }\n if (this.dom.iframe) {\n const ytIframe = this.el.querySelector('iframe');\n if (!this.customControls) {\n ytIframe?.focus();\n }\n this.progressVideoEvent(this.player as YoutubePlayer);\n\n if (this.autoplay && this.playingInterval === null) {\n this.playingInterval = setInterval(() => {\n this.handleRemoveImage();\n }, 100);\n } else {\n this.el.classList.add('figure-video--playing');\n (this.dom.youtubeImg as HTMLElement)?.setAttribute(\n 'style',\n 'display:none'\n );\n }\n\n videoTrigger.setAttribute('aria-label', this.pauseLabel);\n\n if (this.checkProgress) {\n clearInterval(this.checkProgress);\n }\n this.checkProgress = setInterval(() => {\n this.progressVideoEvent(this.player as YoutubePlayer);\n }, 1100);\n }\n\n this.playing = true;\n }\n\n handleVideoPause() {\n if (this.checkProgress) {\n clearInterval(this.checkProgress);\n }\n const videoTrigger = this.dom.videoTrigger as HTMLVideoElement;\n if (this.lastEvent === 2 || this.lastEvent === 0) {\n if (this.dom.iframe) {\n videoTrigger.setAttribute('aria-label', this.playLabel);\n\n if (this.customControls) {\n videoTrigger.classList.remove('figure__media-button--pause');\n this.el.classList.remove('figure-video--playing');\n }\n }\n this.playing = false;\n } else {\n if (this.dom.localVideo) {\n (this.dom.localVideo as HTMLVideoElement).removeAttribute('controls');\n (this.dom.videoTrigger as HTMLVideoElement).setAttribute(\n 'tabindex',\n '0'\n );\n }\n }\n }\n\n handleVideoEnd() {\n this.el.classList.remove('figure-video--playing');\n\n if (this.dom.localVideo) {\n (this.dom.localVideo as HTMLVideoElement).currentTime = 0;\n (this.dom.localVideo as HTMLVideoElement).load();\n (this.dom.localVideo as HTMLVideoElement).removeAttribute('controls');\n }\n }\n}\n\nexport default VideoFigure;\n"],"names":["window","YouTubeIframeLoader","callback","_this","script","module","VideoFigure","Component","el","__publicField","_a","debounce","event","BREAKPOINTS","_b","_c","_d","videoPlayerPlay","iframe","progress","progressVal","videoPlayerProgress","videoPlayerEnd","YT","_iframe","id","autoplay","videoTrigger","ytIframe"],"mappings":"2bAAC,SAASA,EAAQ,CACjB,IAAIC,EAAsB,CACzB,IAAK,qCACL,QAAS,GACT,OAAQ,GACR,UAAW,CAAE,EAEb,KAAM,SAASC,EAAU,CACxB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