{ "version": 3, "sources": ["../../src/scripts/post.js"], "sourcesContent": ["jQuery(document).ready(function ($) {\n\t// scroll event for sidebar sticky\n\t$(window).on(\"scroll resize touchstart touchmove touchend\", function () {\n\t\tlet targetEl = $(\".post__inner\");\n\t\tlet sidebar = $(\".post__sidebar.fixed-sidebar\");\n\t\tlet sidebarCtn = $(\".post__sidebar.fixed-sidebar .fixed-sidebar-ctn\");\n\t\tlet topOffset = 75;\n\n\t\tlet targetHeightTop = targetEl.offset().top - topOffset,\n\t\t\ttargetTotalHeight = targetEl.outerHeight(),\n\t\t\ttargetHeightBottom = targetHeightTop + targetTotalHeight,\n\t\t\twindowHeight = $(window).height(),\n\t\t\tpixelsDown = $(this).scrollTop();\n\n\t\t// dynamic width/height\n\t\tsidebarCtn.width(sidebar.outerWidth());\n\t\tsidebarCtn.height(targetTotalHeight - topOffset);\n\n\t\t// console output to help debug\n\t\t// console.log('target height from top: ' + targetHeightTop);\n\t\t// console.log('target height from bottom: ' + targetHeightBottom);\n\t\t// console.log('total height: ' + targetTotalHeight);\n\t\t// console.log('window viewport: ' + windowHeight);\n\t\t// console.log('pixels down: ' + pixelsDown);\n\n\t\t// setting sticky class to sidebar\n\t\tif (pixelsDown >= targetHeightTop && pixelsDown <= targetHeightBottom - windowHeight) {\n\t\t\tsidebar.removeClass(\"sticky-bottom\");\n\t\t\tsidebar.addClass(\"sticky\");\n\t\t} else if (pixelsDown > targetHeightBottom - windowHeight - topOffset) {\n\t\t\tsidebar.addClass(\"sticky-bottom\");\n\t\t} else {\n\t\t\tsidebar.removeClass(\"sticky\");\n\t\t\tsidebar.removeClass(\"sticky-bottom\");\n\t\t}\n\t});\n\n\t$(\".toc-ctn .dropdown-trigger\").click(function () {\n\t\tif ($(window).width() < 1024) {\n\t\t\t$(\".toc-ctn\").toggleClass(\"active\");\n\t\t\t$(this).closest(\".fixed-sidebar-ctn\").toggleClass(\"white-bg\");\n\t\t\t$(this).next().slideToggle();\n\t\t\t$(this).closest(\".toc-ctn\").siblings().slideToggle();\n\t\t}\n\t});\n\n\t$(\".toc-ctn a\").click(function () {\n\t\t$(\".toc-ctn .dropdown-trigger\").trigger(\"click\");\n\t});\n\n\t$(window).load(function () {\n\t\t$(\".toc-ctn .dropdown-trigger\").trigger(\"click\");\n\t});\n});\n"], "mappings": "MAAA,OAAO,QAAQ,EAAE,MAAM,SAAUA,EAAG,CAEnCA,EAAE,MAAM,EAAE,GAAG,8CAA+C,UAAY,CACvE,IAAIC,EAAWD,EAAE,cAAc,EAC3BE,EAAUF,EAAE,8BAA8B,EAC1CG,EAAaH,EAAE,iDAAiD,EAChEI,EAAY,GAEZC,EAAkBJ,EAAS,OAAO,EAAE,IAAMG,EAC7CE,EAAoBL,EAAS,YAAY,EACzCM,EAAqBF,EAAkBC,EACvCE,EAAeR,EAAE,MAAM,EAAE,OAAO,EAChCS,EAAaT,EAAE,IAAI,EAAE,UAAU,EAGhCG,EAAW,MAAMD,EAAQ,WAAW,CAAC,EACrCC,EAAW,OAAOG,EAAoBF,CAAS,EAU3CK,GAAcJ,GAAmBI,GAAcF,EAAqBC,GACvEN,EAAQ,YAAY,eAAe,EACnCA,EAAQ,SAAS,QAAQ,GACfO,EAAaF,EAAqBC,EAAeJ,EAC3DF,EAAQ,SAAS,eAAe,GAEhCA,EAAQ,YAAY,QAAQ,EAC5BA,EAAQ,YAAY,eAAe,EAErC,CAAC,EAEDF,EAAE,4BAA4B,EAAE,MAAM,UAAY,CAC7CA,EAAE,MAAM,EAAE,MAAM,EAAI,OACvBA,EAAE,UAAU,EAAE,YAAY,QAAQ,EAClCA,EAAE,IAAI,EAAE,QAAQ,oBAAoB,EAAE,YAAY,UAAU,EAC5DA,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAC3BA,EAAE,IAAI,EAAE,QAAQ,UAAU,EAAE,SAAS,EAAE,YAAY,EAErD,CAAC,EAEDA,EAAE,YAAY,EAAE,MAAM,UAAY,CACjCA,EAAE,4BAA4B,EAAE,QAAQ,OAAO,CAChD,CAAC,EAEDA,EAAE,MAAM,EAAE,KAAK,UAAY,CAC1BA,EAAE,4BAA4B,EAAE,QAAQ,OAAO,CAChD,CAAC,CACF,CAAC", "names": ["$", "targetEl", "sidebar", "sidebarCtn", "topOffset", "targetHeightTop", "targetTotalHeight", "targetHeightBottom", "windowHeight", "pixelsDown"] }