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Q,MAAK,WACjC,IAAIiC,EAAQzC,EAAEW,MACMX,EAAE,mCAAoCyC,GAC5CjC,MAAK,SAAUmC,EAAGC,GAC9B,IAAI0B,EAAQtE,EAAE,mBAAoBA,EAAE4C,IAAc2B,OAClDvE,EAAE4C,GAAa4B,OAAM,SAAUC,GACxBzE,EAAEyE,EAAEC,QAAQC,SAAS,SAExBL,EAAM,GAAGE,OAEb,GACF,IACArB,YAAW,WACTV,EAAMlC,SAAS,0BACjB,GAAG,IACL,GACF,GACD,CArBD,CAqBGkD,O","sources":["webpack://oticon/./js/feature/blog/component-blog.js","webpack://oticon/./js/feature/blog/blog.js","webpack://oticon/./js/feature/blog/component-blog-latest-posts.js","webpack://oticon/./js/feature/blog/component-blog-list.js","webpack://oticon/./js/feature/blog/component-blog-author.js","webpack://oticon/./js/feature/blog/component-blog-related.js"],"sourcesContent":["(function ($, DGS) {\n \"use strict\";\n\n DGS.OnLoad.getInstance().register(function () {\n if ($('.component.blog').length) {\n $('.blog-content p:first:has(.bigger, strong)').addClass('blog-introduction');\n $('.component.blog').each(function () {\n // Moving around some elements to fit the design\n var $newHeadline = $(\"
\");\n // Have to append one by one to ensure the correct order\n $newHeadline.append($(\".blog-title\", $(this))).append($(\".blog-author\", $(this))).append($(\".blog-date\", $(this))).append($(\".blog-reading-time\", $(this)));\n $newHeadline.prependTo($(\".blog-image\", $(this)), null);\n });\n $('.blog-introduction').clone().insertAfter($('.blog-headline h1'));\n\n // Progress bar for blog posts\n var $header = $(\".header\");\n var $stickyNav = $(\".header .two-section-grid .sticky-navigation\");\n var $progressWrapper = $(\"
\");\n var $progress = $(\"\");\n var win = $(window);\n var content = $('#content');\n var setValue = function setValue() {\n return win.scrollTop();\n };\n var setMax = function setMax() {\n return content.height() - (win.height() - 150);\n };\n var progressBar;\n var initProgressBar = function initProgressBar() {\n win.innerWidth() <= 991 ? ($($progressWrapper).appendTo($header), $($progress).appendTo($progressWrapper)) : ($($progressWrapper).appendTo($stickyNav), $($progress).appendTo($progressWrapper));\n };\n initProgressBar();\n progressBar = $('progress');\n progressBar.attr({\n value: setValue(),\n max: setMax()\n });\n $(document).on('scroll', function () {\n progressBar.attr({\n value: setValue()\n });\n });\n win.on('resize', function () {\n initProgressBar();\n progressBar.attr({\n value: setValue(),\n max: setMax()\n });\n });\n }\n $('.component.related-blogs, .component.blog-list, .component.latest-blog-posts').each(function () {\n var postConfig = {\n characterLength: (parseFloat($('.news-text').css('width').replace('px', '')) / 1.35).toFixed(0),\n lines: 5\n };\n var $this = $(this);\n var $relatedPosts = $('.component-content ul > li > div, ul#blog-list li', $this);\n if ($('.component.blog-list ul#blog-list li').length) {\n postConfig.characterLength = parseFloat($('.news-text').css('width').replace('px', '')) / 1.7;\n }\n $relatedPosts.each(function (i, relatedPost) {\n var $newElement = $(relatedPost).find('.news-text');\n var calculateHeightPost = parseFloat($($newElement).css('height'));\n var lineHeightElement = parseFloat($($newElement).css('line-height'));\n var copyText = $($newElement).text();\n //waiting for all styles and fonts\n setTimeout(function () {\n if (calculateHeightPost / lineHeightElement > postConfig.lines && copyText.length > postConfig.characterLength) {\n var newsText = copyText.substring(0, postConfig.characterLength);\n $($newElement).css('max-height', lineHeightElement * postConfig.lines);\n $($newElement).html(newsText.substring(0, newsText.lastIndexOf(' ')) + '...');\n var questionMark = $($newElement).text().lastIndexOf('?') === -1 ? $($newElement).text().lastIndexOf(',') : $($newElement).text().lastIndexOf('?');\n if (questionMark > $($newElement).text().length - 5) {\n $($newElement).html($($newElement).text().substring(0, questionMark) + '...');\n }\n }\n }, 1000);\n });\n });\n });\n})(jQuery, window.DGS);","require('./component-blog.js');\nrequire('./component-blog-author.js');\nrequire('./component-blog-list.js');\nrequire('./component-blog-related.js');\nrequire('./component-blog-latest-posts.js');","(function ($, DGS) {\n DGS.OnLoad.getInstance().register(function () {\n $('.component.latest-blog-posts a').each(function () {\n var hrefAttr = $(this).attr('href');\n if (window.location.href.indexOf(hrefAttr) !== -1) {\n $(this).parent('li').remove();\n } else {\n var date = $(this).find('.news-date').remove();\n $(this).find('.news-image').append(date);\n $(this).find('.news-title').html($(this).find('.news-title').text());\n }\n });\n });\n})(jQuery, window.DGS);","(function ($, DGS) {\n \"use strict\";\n\n DGS.OnLoad.getInstance().register(function () {\n $('.component.blog-list').each(function () {\n $('#blog-list li', $(this)).each(function () {\n // Now change the date format\n var $newsDate = $(\".news-date\", $(this));\n\n // Moves the date to after the image\n $newsDate.insertAfter($(\".news-image\", $(this)), null);\n var $newsReadingTime = $(\"
\");\n var $blogPost = $(this).children('a');\n $newsReadingTime.insertAfter($($newsDate, $(this)), null);\n $newsReadingTime.append($blogPost.attr('data-readingtime'));\n });\n });\n });\n})(jQuery, window.DGS);","(function ($, DGS) {\n DGS.OnLoad.getInstance().register(function () {\n $('.component.blog-author').each(function () {\n var dummyContainer = $('
');\n dummyContainer.append($('.blog-author-name', $(this))).append($('.blog-author-title', $(this))).append($('.blog-author-intro', $(this))).append($('.blog-author-link', $(this)));\n dummyContainer.insertAfter($('.blog-author-image', $(this)));\n $('.blog-author-about').clone().prependTo($(this).find('.blog-author-right'));\n $(this).find('.blog-author-right .blog-author-about').addClass('hide-for-mobile');\n });\n });\n})(jQuery, window.DGS);","(function ($, DGS) {\n \"use strict\";\n\n DGS.OnLoad.getInstance().register(function () {\n $('.component.related-blogs').each(function () {\n var $this = $(this);\n var $relatedPosts = $('.component-content ul > li > div', $this);\n $relatedPosts.each(function (i, relatedPost) {\n var $link = $('.news-link .link', $(relatedPost)).last();\n $(relatedPost).click(function (e) {\n if (!$(e.target).hasClass('link')) {\n // jQuery click does not work on links\n $link[0].click();\n }\n });\n });\n setTimeout(function () {\n $this.addClass(\"component-ready animate\");\n }, 500);\n });\n });\n})(jQuery, window.DGS);"],"names":["$","window","DGS","OnLoad","getInstance","register","length","addClass","each","$newHeadline","append","this","prependTo","clone","insertAfter","progressBar","$header","$stickyNav","$progressWrapper","$progress","win","content","setValue","scrollTop","setMax","height","initProgressBar","innerWidth","appendTo","attr","value","max","document","on","postConfig","characterLength","parseFloat","css","replace","toFixed","lines","$this","$relatedPosts","i","relatedPost","$newElement","find","calculateHeightPost","lineHeightElement","copyText","text","setTimeout","newsText","substring","html","lastIndexOf","questionMark","jQuery","hrefAttr","location","href","indexOf","parent","remove","date","$newsDate","$newsReadingTime","$blogPost","children","dummyContainer","$link","last","click","e","target","hasClass"],"sourceRoot":""}