{"version":3,"file":"blog.min.js","sources":["blog.min.js"],"sourcesContent":["/**\n * @file\n * BLOG DETAILS\n * Make the subscribe section on the left side fixed on scroll.\n */\n'use strict';\n\n(function ($, Drupal) {\n Drupal.behaviors.Blog = {\n attach: function attach() {\n $(window).on('scroll', function () {\n var section = $('.related-articles-section'),\n elValFromTop = Math.ceil(section.offset().top),\n windowHeight = $(window).height(),\n windowScrollValFromTop = $(window).scrollTop();\n\n // if the sum of the window height and scroll distance from the top is\n // greater than the target element's distance from the top, it should\n // be in view and the event should fire, otherwise reverse any\n // previously applied methods\n if (windowHeight + windowScrollValFromTop > elValFromTop) {\n $('#blog-detail-sidebar').addClass('remove-sticky');\n } else {\n $('#blog-detail-sidebar').removeClass('remove-sticky');\n }\n });\n }\n };\n})(jQuery, Drupal);"],"names":["$","Drupal","behaviors","Blog","attach","window","on","section","Math","ceil","offset","top","height","scrollTop","addClass","removeClass","jQuery"],"mappings":"CAOWA,IAqBAC,OApBFC,UAAUC,KAAO,CACtBC,OAAQ,WACNJ,EAAEK,MAAM,EAAEC,GAAG,SAAU,WACrB,IAAIC,EAAUP,EAAE,2BAA2B,EAC1BQ,KAAKC,KAAKF,EAAQG,OAAO,EAAEC,GAAG,EAC9BX,EAAEK,MAAM,EAAEO,OAAO,EACPZ,EAAEK,MAAM,EAAEQ,UAAU,EAO7Cb,EAAE,sBAAsB,EAAEc,SAAS,eAAe,EAElDd,EAAE,sBAAsB,EAAEe,YAAY,eAAe,CAEzD,CAAC,CACH,CACF,CACD,GAAEC,MAAc"}