{"version":3,"file":"content-scroll.7060a2.js","mappings":"gzBAAqBA,EAAgB,WAOhC,O,EAND,SAAAA,K,4FAAcC,CAAA,KAAAD,GACVE,KAAKC,YAAc,eACnBD,KAAKE,aAAeC,EAAE,kCAAkCC,cACxDJ,KAAKK,gBAAkBF,EAAE,eAAeC,eAAiB,EACzDJ,KAAKM,YAAcN,KAAKE,aAAeF,KAAKK,gBAAkB,GAC9DL,KAAKO,aACT,E,EAAC,EAAAC,IAAA,cAAAC,MAED,WAAc,IAAAC,EAAA,KACVP,EAAE,QAAQQ,UAAU,CAChBC,OAAQZ,KAAKC,YACbY,OAAQb,KAAKM,YAAc,IAG/BH,EAAE,gBAAgBW,GAAG,QAAS,cAAc,SAACC,GACzCA,EAAEC,iBACFD,EAAEE,kBACF,IACMC,EADMf,EAAEY,EAAEI,eACCC,KAAK,QACtBjB,EAAE,aAAakB,QAAQ,CAAEC,UAAWnB,EAAEe,GAAML,SAASU,IAAMb,EAAKJ,aACpE,IAEAH,EAAEqB,QAAQV,GAAG,yBAAyB,WAGpB,IAFEX,EAAE,iCAAiCsB,QAAQ,MACrCC,SAIlBvB,EAAE,6BAA6BwB,YAAY,cAEnD,GACJ,I,gFAAC,CAhCgC,E","sources":["webpack://cloroxpro-ca/./js/src/components/content-nav-scroll.js"],"sourcesContent":["export default class ContentNavScroll {\n constructor() {\n this.navSelector = '#content-nav';\n this.headerHeight = $('.header-global .sticky-wrapper').outerHeight();\n this.stickyNavHeight = $('#sticky-nav').outerHeight() || 0;\n this.totalOffset = this.headerHeight + this.stickyNavHeight + 20;\n this.setUpScroll();\n }\n\n setUpScroll() {\n $('body').scrollspy({\n target: this.navSelector,\n offset: this.totalOffset + 1,\n });\n\n $('.sidebar-nav').on('click', 'a.nav-link', (e) => {\n e.preventDefault();\n e.stopPropagation();\n const $el = $(e.currentTarget);\n const href = $el.attr('href');\n $('html,body').animate({ scrollTop: $(href).offset().top - this.totalOffset });\n });\n\n $(window).on('activate.bs.scrollspy', () => {\n const $parent = $('.sidebar-nav .nav-link.active').closest('li');\n const index = $parent.index();\n if (index === 0) {\n // $('.sidebar-nav .nav-link.active').addClass('stay-active');\n } else {\n $('.sidebar-nav .stay-active').removeClass('stay-active');\n }\n });\n }\n}\n"],"names":["ContentNavScroll","_classCallCheck","this","navSelector","headerHeight","$","outerHeight","stickyNavHeight","totalOffset","setUpScroll","key","value","_this","scrollspy","target","offset","on","e","preventDefault","stopPropagation","href","currentTarget","attr","animate","scrollTop","top","window","closest","index","removeClass"],"sourceRoot":""}