{"version":3,"sources":["webpack:///./Flugger.Web/Scripts/Flugger/components/youtube.js","webpack:///./Flugger.Web/Scripts/Flugger/components/article-gallery.js","webpack:///./node_modules/youtube-google-analytics/lunametrics-youtube.gtm.js"],"names":["_jquery","_interopRequireDefault","require","_lunametricsYoutubeGtm","obj","__esModule","default","externalVideos","$","videoOnPage","loadExternalVideos","videos","getScript","count","each","$currentElement","this","ytId","attr","ytVideo","currCount","playYtVideo","playVideo","after","YT","Player","width","height","videoId","playerVars","autoplay","controls","rel","showinfo","modestbranding","wmode","events","onStateChange","event","data","stopYtVideo","onReady","target","f","ytTracker","init","console","log","initYtVideo","parent","addClass","window","trigger","pauseVideo","removeClass","on","e","id","exports","length","hasVideo","stopAllVideo","_youtube","_debounce","galleries","i","el","gallery","$nav","$navPrev","$navNext","$wrap","$navCaption","$navCaptionNext","$navList","$navListLi","pic_real_width","pic_real_height","$gallery","$gallerySlidesContainer","find","$slides","$slidesImageWraps","currentSlide","slidesCount","captions","isPortrait","hasClass","isCustomHeight","ratioLoaded","updateSlidesAspect","matchMedia","matches","isPortraitSplitSlides","Math","ceil","css","aspectPercent","prevSlide","prev","setSlide","nextSlide","next","index","$slide","newPos","youtube","content","stop","animate","html","updateNavCaption","updateNavNextCaption","updateNavigation","calcHeight","maxSlideHeigth","maxSlideWidth","h","children","w","child","outerHeight","push","img","topOffset","load","setupGallery","append","preventDefault","createNavigation","debounce","makeGallery","document","config","navigator","userAgent","match","firstScriptTag","tag","key","o","_config","forceSyntax","dataLayerName","eventsFired","hasOwnProperty","createElement","src","getElementsByTagName","parentNode","insertBefore","onYouTubeIframeAPIReady","apply","arguments","readyState","bind","addEvent","potentialVideos","checkIfYouTubeVideo","addYouTubeEvents","normalizeYouTubeIframe","digestPotentialVideos","getTagsAsArr_","concat","addEventListener","bindToNewVideos_","potentialYouTubeVideo","potentialYouTubeVideoSrc","dataSrc","getAttribute","indexOf","jsApiEnabled","url","originEnabled","youTubeVideo","loc","location","a","href","tmpPathname","pathname","charAt","search","hostname","port","origin","protocol","type","newIframe","replace","replaceChild","hash","youTubeIframe","player","get","pauseFlag","evt","stateIndex","targetVideoId","getVideoUrl","playerState","getPlayerState","marks","duration","min","floor","percentageTracking","points","every","parseInt","num","_point","_time","getMarks","getDuration","state","playTracker","timer","clearInterval","setInterval","currentTime","getCurrentTime","fireAnalyticsEvent","checkCompletion","onStateChangeHandler","videoUrl","_ga","GoogleAnalyticsObject","getAll","_gaq","name","fn","attachEvent","srcElement","call","tagName","slice","isYT"],"mappings":"+JAAA,IAAAA,EAAAC,EAAAC,EAAA,IACAC,EAAAF,EAAAC,EAAA,MAA4E,SAAAD,EAAAG,GAAA,OAAAA,KAAAC,WAAAD,EAAA,CAAAE,QAAAF,GAE5E,IAAMG,GAAiB,EAAAC,WAAE,YACrBC,GAAc,EAYlB,SAASC,EAAmBC,GACxBH,UAAEI,UAAU,sCAAsC,WAC9C,IAAIC,EAAQ,EACZF,EAAOG,MAAK,WACR,IAAMC,GAAkB,EAAAP,WAAEQ,MACpBC,EAAOF,EAAgBG,KAAK,UAC9BC,EAAU,KACRC,EAAYP,EAElB,SAASQ,IACW,OAAZF,EACAA,EAAQG,YAyBhB,WACIP,EAAgBQ,OAAM,EAAAf,WAAE,cAAgBY,EAAY,aAWpDD,EAAU,IAAIK,GAAGC,OAAO,KAAOL,EAAW,CACtCM,MAAO,KACPC,OAAQ,IACRC,QAASX,EACTY,WAbe,CACfC,SAAU,EACVC,SAAU,EACVC,IAAK,EACLC,SAAU,EACVC,eAAgB,EAChBC,MAAO,eAQPC,OAAQ,CACJC,cAAe,SAASC,GACD,IAAfA,EAAMC,MACNlB,IAEe,IAAfiB,EAAMC,MACNC,KAGRC,QAAS,SAASH,IACJ,EAAA9B,WAAE8B,EAAMI,OAAOC,QAxExB,IAAdC,UACuB,mBAAnBA,UAAUC,MACjBD,UAAUC,OAGdC,QAAQC,IAAI,0BAiBAC,GAEJjC,EAAgBkC,SAASC,SAAS,YAClC,EAAA1C,WAAE2C,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EAAI1J,OAAS0J,EAAI1J,QAAU0J,EAAIqC,WAE/BF,EAAGG,KAAKxK,EAAIkI,KASlB,SAASlC,EAAcyE,GAErB,MAAO,GAAGC,MAAMF,KAAKtG,EAASgB,qBAAqBuF,IAIrD,SAAStE,EAAiB+B,GAExB,IAAIlI,EAAKkI,EAAI1J,QAAU0J,EAAIqC,WACvBI,EAAO/E,EAAoB5F,GAIZ,WAAfA,EAAGyK,SAAwBE,GAAQlE,EAAazG,EAAGiF,MAAQ0B,EAAc3G,EAAGiF,MAE9EY,EAAiB7F,IA9bvB,CAocGkE,SAAUjF","file":"7.19d096928b293e468b2f.chunk.js","sourcesContent":["import $ from 'jquery';\r\nimport ytTracker from 'youtube-google-analytics/lunametrics-youtube.gtm.js';\r\n\r\nconst externalVideos = $('[src-yt]');\r\nlet videoOnPage = false;\r\n\r\nfunction callYtTracker() {\r\n if (typeof ytTracker !== 'undefined') {\r\n if (typeof ytTracker.init === 'function') {\r\n ytTracker.init();\r\n }\r\n } else {\r\n console.log('no ytTracker found'); // eslint-disable-line no-console\r\n }\r\n}\r\n\r\nfunction loadExternalVideos(videos) {\r\n $.getScript('https://www.youtube.com/iframe_api', function() {\r\n let count = 0;\r\n videos.each(function() {\r\n const $currentElement = $(this);\r\n const ytId = $currentElement.attr('src-yt');\r\n let ytVideo = null;\r\n const currCount = count;\r\n\r\n function playYtVideo() {\r\n if (ytVideo !== null) {\r\n ytVideo.playVideo();\r\n } else {\r\n initYtVideo();\r\n }\r\n $currentElement.parent().addClass('playing');\r\n $(window).trigger('videoPlaying', [currCount]);\r\n }\r\n\r\n function stopYtVideo() {\r\n if (ytVideo !== null) {\r\n ytVideo.pauseVideo();\r\n $currentElement.parent().removeClass('playing');\r\n $(window).trigger('videoStopped', [currCount]);\r\n }\r\n }\r\n\r\n function showMedia($element) {\r\n /*\r\n if (!$element.is('iframe')) {\r\n $currentElement.after($element);\r\n }\r\n */\r\n callYtTracker();\r\n }\r\n\r\n function initYtVideo() {\r\n $currentElement.after($('
'));\r\n\r\n const playerVars = {\r\n autoplay: 1,\r\n controls: 1,\r\n rel: 0,\r\n showinfo: 0,\r\n modestbranding: 1,\r\n wmode: 'transparent'\r\n };\r\n\r\n ytVideo = new YT.Player('yt' + currCount, {\r\n width: 1280,\r\n height: 720,\r\n videoId: ytId,\r\n playerVars: playerVars,\r\n events: {\r\n onStateChange: function(event) {\r\n if (event.data === 1) {\r\n playYtVideo();\r\n }\r\n if (event.data === 2) {\r\n stopYtVideo();\r\n }\r\n },\r\n onReady: function(event) {\r\n showMedia($(event.target.f));\r\n }\r\n }\r\n });\r\n }\r\n\r\n $currentElement.parent().on('click', playYtVideo);\r\n\r\n $(window).on('videoStop', function(e, id) {\r\n stopYtVideo();\r\n });\r\n\r\n $(window).on('videoPlaying', function(e, id) {\r\n if (id !== currCount) {\r\n stopYtVideo();\r\n }\r\n });\r\n\r\n count++;\r\n });\r\n });\r\n}\r\n\r\nfunction playExternalBackgroundVideos(videos) {\r\n videos.each(function(index, element) {\r\n element.playVideo();\r\n });\r\n}\r\n\r\nfunction stopAllVideo() {\r\n $(window).trigger('videoStop');\r\n}\r\n\r\nfunction hasVideo() {\r\n return videoOnPage;\r\n}\r\n\r\nfunction init() {\r\n if (externalVideos.length < 1) return false;\r\n videoOnPage = true;\r\n loadExternalVideos(externalVideos);\r\n}\r\n\r\nexport default {\r\n init: init,\r\n hasVideo: hasVideo,\r\n stopAllVideo: stopAllVideo\r\n};\r\n","import $ from 'jquery';\r\nimport youtube from './youtube';\r\nimport debounce from '../utility/debounce';\r\n\r\nconst galleries = $('.article-gallery');\r\n\r\nfunction init() {\r\n if (galleries.length < 1) return;\r\n\r\n galleries.each(function (i, el) {\r\n makeGallery(el);\r\n });\r\n}\r\n\r\nfunction makeGallery(gallery) {\r\n\r\n const $gallery = $(gallery);\r\n const $gallerySlidesContainer = $gallery.find('.article-gallery-slides');\r\n const $slides = $gallerySlidesContainer.find('.gallery-slide');\r\n const $slidesImageWraps = $($gallerySlidesContainer.find('.gallery-slide-image'));\r\n let currentSlide = 0;\r\n const slidesCount = $slides.length;\r\n\r\n // nav\r\n let $nav;\r\n let $navPrev;\r\n let $navNext;\r\n let $wrap;\r\n let $navCaption;\r\n let $navCaptionNext;\r\n let $navList;\r\n let $navListLi;\r\n const captions = [];\r\n\r\n //\r\n const isPortrait = $gallery.hasClass('article-gallery--portrait');\r\n const isCustomHeight = $gallery.hasClass('article-gallery--custom-height');\r\n let aspectRation = 0;\r\n let ratioLoaded = false;\r\n let pic_real_width;\r\n let pic_real_height;\r\n\r\n $gallery.addClass('preload');\r\n\r\n setupGallery();\r\n createNavigation();\r\n\r\n setSlide(currentSlide);\r\n $(window).on('resize', debounce(calcHeight, 50));\r\n // setTimeout(calcHeight, 300);\r\n\r\n\r\n function setupGallery() {\r\n\r\n\r\n $slides.each(function (i, el) {\r\n const $slide = $(el);\r\n $slide.css({\r\n 'position': 'absolute'\r\n });\r\n\r\n captions.push($slide.find('.gallery-slide-caption').html());\r\n /*\r\n $($slide.find(\".gallery-slide-title\")).css({\r\n \"margin-bottom\": topOffset + \"px\"\r\n })\r\n */\r\n });\r\n\r\n $gallerySlidesContainer.addClass('gallery-active');\r\n\r\n\r\n let topOffset = (slidesCount * 5);\r\n\r\n if (topOffset > 20) {\r\n topOffset = 20;\r\n }\r\n\r\n $gallerySlidesContainer.css({\r\n 'margin-top': topOffset + 'px'\r\n });\r\n\r\n checkPortraitFeatures();\r\n setAspectRation();\r\n }\r\n\r\n function setAspectRation() {\r\n\r\n // find first img in gallery\r\n const img = $($gallery.find('img')[0]);\r\n\r\n $('