{"version":3,"sources":["webpack:///./src/components/pmicom/components/scrollable-content/controller.js","webpack:///./src/js/FixedIn.js"],"names":["FixedIn","require","MAIN_EASING","DELAY_DEBOUNCE","getNumber","mediaQueryMin","toggleMenuArias","setHeightFrom","getFocusablesFrom","trackGtm","fillWithDomElementsAll","trackGtm4","stuttering","default","onWidthResize","evenSlowerDelay","breakMedium","asyncImport","CLASS_CURRENT","CLASS_CATEGORY_MENU","CLASS_CATEGORY_CONTAINER","CLASS_CATEGORY_LINK","CLASS_LEFT_MENU_CONTAINER","CLASS_LEFT_MENU_ITEMS","CLASS_LEFT_MENU_LINK","CLASS_STEP_LINK","CLASS_ENTRY","CLASS_ENTRY_CONTAINER","CLASS_ENTRY_UNFOLD","CLASS_ENTRY_ANSWER","CLASS_FAQ_CATEGORY","CLASS_LIST_CONTENT","selectorsAll","entryUnfold","module","exports","init","initElements","initEvents","updatePositions","scrollEvent","currentPosition","getCurrentIndex","fixingManager","Object","create","fixedElement","isFaq","containerElement","root","querySelector","entryQuestions","faqCategories","Array","from","querySelectorAll","forEach","question","__focusables","parentNode","closeQuestion","length","stepLinks","isTBEJourneyPresent","content","menuLinksSelector","menuLinks","throtteledScroll","throttle","bind","window","addEventListener","link","linkIndex","e","menuClickHandler","toggleQuestion","DEBOUNCE","activateEvents","preventDefault","clickedLinkIndex","positionsAffected","anime","targets","document","scrollingElement","scrollTop","positions","easing","duration","begin","scrolledBeforeAnim","scrollY","complete","onAnimDone","selectMenuLink","current","menu","i","headingId","decodeURIComponent","href","split","headingElement","getElementById","classList","add","remove","index","findIndex","pageYOffset","limitIndex","getContentPositions","map","Math","round","getBoundingClientRect","top","target","opened","getAttribute","openQuestion","gtmTracking","expend","button","eventCategory","dataset","category","eventAction","eventLabel","innerHTML","event","widget_name","faq_question","trim","faq_section","interaction_type","grandParent","closest","container","style","height","answer","DELAY_THROTTLE","POS_FIX_TOP","POS_UNFIX_BOTTOM","POS_UNFIX","marginTop","marginBottom","activated","declareEvents","activate","checkPositions","resizeEvent","lastPos","THROTTLE","deactivate","unfixElement","method","containerBox","fixedBottom","offsetHeight","isPastTop","isPastBottom","bottom","position","setPosition","fixElement","box","left"],"mappings":";;;;;;;;;AAAA;AACA,MAAMA,OAAO,GAAGC,mBAAO,CAAC,mDAAD,CAAvB;;AACA,MAAM;EAAEC,WAAF;EAAeC;AAAf,IAAkCF,mBAAO,CAAC,iDAAD,CAA/C;;AACA,MAAM;EACLG,SADK;EAELC,aAFK;EAGLC,eAHK;EAILC,aAJK;EAKLC,iBALK;EAMLC,QANK;EAOLC,sBAPK;EAQLC;AARK,IASFV,mBAAO,CAAC,6CAAD,CATX;;AAUA,MAAM;EAAEW,UAAF;EAAcC,OAAO,EAAEC;AAAvB,IAAyCb,mBAAO,CAAC,qDAAD,CAAtD;;AACA,IAAI;EAAEc,eAAF;EAAmBC;AAAnB,IAAmCf,mBAAO,CAAC,uDAAD,CAAP,CAA+BY,OAAtE;;AACA,MAAMI,WAAW,GAAGhB,mBAAO,CAAC,iDAAD,CAAP,CAA4BY,OAAhD;;AAEAE,eAAe,GAAGX,SAAS,CAACW,eAAD,CAAT,GAA6B,IAA/C;AAEA,MAAMG,aAAa,GAAG,SAAtB;AACA,MAAMC,mBAAmB,GAAG,gBAA5B;AACA,MAAMC,wBAAwB,GAAG,qBAAjC;AACA,MAAMC,mBAAmB,GAAG,gBAA5B;AACA,MAAMC,yBAAyB,GAAG,sBAAlC;AACA,MAAMC,qBAAqB,GAAG,kBAA9B;AACA,MAAMC,oBAAoB,GAAG,iBAA7B;AACA,MAAMC,eAAe,GAAG,sBAAxB;AACA,MAAMC,WAAW,GAAG,OAApB;AACA,MAAMC,qBAAqB,GAAG,kBAA9B;AACA,MAAMC,kBAAkB,GAAG,eAA3B;AACA,MAAMC,kBAAkB,GAAG,eAA3B;AACA,MAAMC,kBAAkB,GAAG,eAA3B;AACA,MAAMC,kBAAkB,GAAG,cAA3B;AAEA,MAAMC,YAAY,GAAG;EACpBC,WAAW,EAAEL;AADO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8B,IAAnD;IACAR,KAAK,CAAC6B,IAAN,GAAaL,MAAM,GAAG,CAAH,GAAOK,IAAI,GAAG,IAAjC;IAEA,KAAKf,OAAL,GAAeU,MAAM,GAAGnB,gBAAH,GAAsBD,WAA3C;EACA,CAvFe;;EAwFhBa,YAAY,GAAG;IACd,MAAMjB,KAAK,GAAG,KAAK9F,YAAL,CAAkB8F,KAAhC;IACAA,KAAK,CAACyB,QAAN,GAAiB,IAAjB;IACAzB,KAAK,CAACvB,GAAN,GAAY,IAAZ;IACAuB,KAAK,CAAC6B,IAAN,GAAa,IAAb;IACA,KAAKf,OAAL,GAAeR,SAAf;EACA;;AA9Fe,CAAjB,C","file":"components--scrollable-content299af21d05a0f2fe6759.js","sourcesContent":["// const Sticky = require(\"sticky-js\");\nconst FixedIn = require('../../../../js/FixedIn');\nconst { MAIN_EASING, DELAY_DEBOUNCE } = require('../../../../js/consts');\nconst {\n\tgetNumber,\n\tmediaQueryMin,\n\ttoggleMenuArias,\n\tsetHeightFrom,\n\tgetFocusablesFrom,\n\ttrackGtm,\n\tfillWithDomElementsAll,\n\ttrackGtm4,\n} = require('util/functions');\nconst { stuttering, default: onWidthResize } = require('util/onWidthResize');\nlet { evenSlowerDelay, breakMedium } = require('util/sass-variables').default;\nconst asyncImport = require('util/asyncImport').default;\n\nevenSlowerDelay = getNumber(evenSlowerDelay) * 1000;\n\nconst CLASS_CURRENT = 'current';\nconst CLASS_CATEGORY_MENU = 'category--menu';\nconst CLASS_CATEGORY_CONTAINER = 'category--container';\nconst CLASS_CATEGORY_LINK = 'category--link';\nconst CLASS_LEFT_MENU_CONTAINER = 'left-menu--container';\nconst CLASS_LEFT_MENU_ITEMS = 'left-menu--items';\nconst CLASS_LEFT_MENU_LINK = 'left-menu--link';\nconst CLASS_STEP_LINK = 'left-menu--step-link';\nconst CLASS_ENTRY = 'entry';\nconst CLASS_ENTRY_CONTAINER = 'entry--container';\nconst CLASS_ENTRY_UNFOLD = 'entry--unfold';\nconst CLASS_ENTRY_ANSWER = 'entry--answer';\nconst CLASS_FAQ_CATEGORY = 'faq--category';\nconst CLASS_LIST_CONTENT = 'list-content';\n\nconst selectorsAll = {\n\tentryUnfold: CLASS_ENTRY_UNFOLD,\n};\n\nmodule.exports = {\n\tasync init() {\n\t\tawait asyncImport(this, ['anime', 'throttle']);\n\n\t\tthis.initElements();\n\t\tthis.initEvents();\n\t\tthis.updatePositions();\n\t\tthis.scrollEvent();\n\n\t\tthis.currentPosition = this.getCurrentIndex();\n\t\tthis.fixingManager = Object.create(FixedIn);\n\t\tlet fixedElement = this.isFaq\n\t\t\t? `.${CLASS_CATEGORY_MENU}`\n\t\t\t: `.${CLASS_LEFT_MENU_ITEMS}`;\n\t\tlet containerElement = this.isFaq\n\t\t\t? `.${CLASS_CATEGORY_CONTAINER}`\n\t\t\t: `.${CLASS_LEFT_MENU_CONTAINER}`;\n\t\tthis.fixingManager.init(\n\t\t\tthis.root.querySelector(fixedElement),\n\t\t\tthis.root.querySelector(containerElement),\n\t\t\t200,\n\t\t\t100,\n\t\t);\n\t},\n\tinitElements() {\n\t\t// FAQ\n\t\tfillWithDomElementsAll(this, selectorsAll);\n\t\tthis.entryQuestions = this.entryUnfold;\n\n\t\tconst faqCategories = Array.from(\n\t\t\tthis.root.querySelectorAll(`.${CLASS_FAQ_CATEGORY}`),\n\t\t);\n\n\t\tthis.entryQuestions.forEach(question => {\n\t\t\tquestion.__focusables = getFocusablesFrom(\n\t\t\t\tquestion.parentNode.parentNode.querySelector(\n\t\t\t\t\t`.${CLASS_ENTRY_CONTAINER}`,\n\t\t\t\t),\n\t\t\t);\n\t\t\t// auto set tab indexes\n\t\t\tthis.closeQuestion(question);\n\t\t});\n\t\tthis.isFaq = !!faqCategories.length;\n\n\t\t// TBEJ\n\t\tconst stepLinks = Array.from(\n\t\t\tthis.root.querySelectorAll(`.${CLASS_STEP_LINK}`),\n\t\t);\n\t\tthis.isTBEJourneyPresent = !!stepLinks.length;\n\n\t\tthis.content = this.isFaq\n\t\t\t? faqCategories\n\t\t\t: Array.from(this.root.querySelectorAll(`.${CLASS_LIST_CONTENT}`));\n\n\t\tlet menuLinksSelector;\n\t\tif (this.isFaq) {\n\t\t\tmenuLinksSelector = `.${CLASS_CATEGORY_LINK}`;\n\t\t} else if (this.isTBEJourneyPresent) {\n\t\t\tmenuLinksSelector = `.${CLASS_STEP_LINK}`;\n\t\t} else {\n\t\t\t// Cou\n\t\t\tmenuLinksSelector = `.${CLASS_LEFT_MENU_LINK}`;\n\t\t}\n\n\t\tthis.menuLinks = Array.from(this.root.querySelectorAll(menuLinksSelector));\n\t},\n\tinitEvents() {\n\t\t// Desktop only\n\t\tif (mediaQueryMin(breakMedium)) {\n\t\t\tconst throtteledScroll = this.throttle(this.scrollEvent.bind(this), 50);\n\t\t\twindow.addEventListener('scroll', throtteledScroll);\n\n\t\t\tthis.menuLinks.forEach((link, linkIndex) => {\n\t\t\t\tlink.addEventListener('click', e => {\n\t\t\t\t\tthis.menuClickHandler(e, linkIndex);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tif (this.isFaq) {\n\t\t\tthis.entryQuestions.forEach(link => {\n\t\t\t\tlink.addEventListener('click', () => {\n\t\t\t\t\tthis.toggleQuestion(link);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\tonWidthResize(\n\t\t\tthis.updatePositions.bind(this),\n\t\t\tstuttering.DEBOUNCE,\n\t\t\tDELAY_DEBOUNCE,\n\t\t);\n\t\tonWidthResize(() => {\n\t\t\t// dont bother listening events for an undisplayed functionality\n\t\t\tthis.fixingManager.activateEvents(mediaQueryMin(breakMedium));\n\t\t});\n\t},\n\tmenuClickHandler(e, linkIndex) {\n\t\te.preventDefault();\n\t\tthis.clickedLinkIndex = linkIndex;\n\t\tif (this.positionsAffected) this.updatePositions();\n\t\tthis.anime({\n\t\t\ttargets: document.scrollingElement,\n\t\t\tscrollTop: this.positions[linkIndex],\n\t\t\teasing: MAIN_EASING,\n\t\t\tduration: evenSlowerDelay,\n\t\t\tbegin: () => {\n\t\t\t\tthis.scrolledBeforeAnim = window.scrollY;\n\t\t\t},\n\t\t\tcomplete: this.onAnimDone.bind(this),\n\t\t});\n\t},\n\tonAnimDone() {\n\t\tif (window.scrollY === this.scrolledBeforeAnim) {\n\t\t\t// No animation was performed => force link selection\n\t\t\tthis.selectMenuLink(this.clickedLinkIndex);\n\t\t}\n\t\tthis.scrolledBeforeAnim = null;\n\t\tthis.clickedLinkIndex = null;\n\t},\n\tscrollEvent() {\n\t\tif (this.positionsAffected) this.updatePositions();\n\t\tconst current = this.clickedLinkIndex || this.getCurrentIndex();\n\t\tthis.selectMenuLink(current);\n\t},\n\tselectMenuLink(current) {\n\t\tthis.menuLinks.forEach((menu, i) => {\n\t\t\tconst headingId = decodeURIComponent(menu.href.split('#')[1]);\n\t\t\tconst headingElement = document.getElementById(headingId);\n\t\t\tif (i === current) {\n\t\t\t\tmenu.classList.add(CLASS_CURRENT);\n\t\t\t\theadingElement.classList.add(CLASS_CURRENT);\n\t\t\t} else {\n\t\t\t\tmenu.classList.remove(CLASS_CURRENT);\n\t\t\t\theadingElement.classList.remove(CLASS_CURRENT);\n\t\t\t}\n\t\t});\n\t},\n\tgetCurrentIndex() {\n\t\tconst index = this.positions.findIndex(\n\t\t\tcurrentPosition => window.pageYOffset < currentPosition,\n\t\t);\n\n\t\treturn this.limitIndex(index);\n\t},\n\tlimitIndex(index) {\n\t\tif (index === -1) return this.positions.length - 1;\n\t\treturn index - 1 === -1 ? 0 : index - 1;\n\t},\n\tupdatePositions() {\n\t\tthis.positions = this.getContentPositions();\n\t\tthis.positionsAffected = false;\n\t},\n\tgetContentPositions() {\n\t\treturn this.content.map(\n\t\t\tcontent =>\n\t\t\t\tMath.round(content.getBoundingClientRect().top + window.pageYOffset) -\n\t\t\t\t120,\n\t\t);\n\t},\n\ttoggleQuestion(target) {\n\t\tconst opened = target.getAttribute('aria-expanded') === 'true';\n\t\tif (opened) this.closeQuestion(target);\n\t\telse this.openQuestion(target);\n\t\tthis.positionsAffected = true;\n\t\tif (opened) {\n\t\t\tthis.gtmTracking(false, target);\n\t\t} else {\n\t\t\tthis.gtmTracking(true, target);\n\t\t}\n\t},\n\tgtmTracking(expend, button) {\n\t\ttrackGtm({\n\t\t\teventCategory: `${button.dataset.category}`,\n\t\t\teventAction: `${expend ? 'expand' : 'collapse'}`,\n\t\t\teventLabel: `${button.innerHTML}`,\n\t\t});\n\t\ttrackGtm4({\n\t\t\tevent: 'GA4_event_c_faq_click',\n\t\t\twidget_name: 'V3-Faq',\n\t\t\tfaq_question: button.innerHTML.trim(),\n\t\t\tfaq_section: button.dataset.category,\n\t\t\tinteraction_type: `${expend ? 'show more' : 'show less'}`,\n\t\t});\n\t},\n\tcloseQuestion(target) {\n\t\ttoggleMenuArias(target, target.__focusables, false);\n\t\tconst grandParent = target.closest(`.${CLASS_ENTRY}`);\n\t\tconst container = grandParent.querySelector(`.${CLASS_ENTRY_CONTAINER}`);\n\t\tcontainer.style.height = 0;\n\t},\n\topenQuestion(target) {\n\t\ttoggleMenuArias(target, target.__focusables, true);\n\t\tconst grandParent = target.closest(`.${CLASS_ENTRY}`);\n\t\tconst container = grandParent.querySelector(`.${CLASS_ENTRY_CONTAINER}`);\n\t\tconst answer = container.querySelector(`.${CLASS_ENTRY_ANSWER}`);\n\t\tsetHeightFrom(container, answer);\n\t},\n};\n","const { DELAY_THROTTLE } = require('./consts');\nconst asyncImport = require('util/asyncImport').default;\nconst { stuttering, default: onWidthResize } = require('./onWidthResize');\n\nconst POS_FIX_TOP = 'pos_fix_top';\nconst POS_UNFIX_BOTTOM = 'pos_unfix_bottom';\nconst POS_UNFIX = 'pos_unfix';\n\nmodule.exports = {\n\tasync init(fixedElement, containerElement, marginTop, marginBottom) {\n\t\tthis.fixedElement = fixedElement;\n\t\tthis.containerElement = containerElement;\n\t\tthis.marginTop = marginTop;\n\t\tthis.marginBottom = marginBottom;\n\t\tthis.activated = false;\n\n\t\tawait asyncImport(this, 'throttle');\n\n\t\tthis.declareEvents();\n\t\tthis.activate();\n\t},\n\tdeclareEvents() {\n\t\tthis.scrollEvent = this.throttle(\n\t\t\tthis.checkPositions.bind(this),\n\t\t\tDELAY_THROTTLE,\n\t\t);\n\t\tthis.resizeEvent = onWidthResize(\n\t\t\t() => {\n\t\t\t\tthis.lastPos = null;\n\t\t\t\tthis.checkPositions();\n\t\t\t},\n\t\t\tstuttering.THROTTLE,\n\t\t\t50,\n\t\t\ttrue,\n\t\t);\n\t},\n\tactivate() {\n\t\tif (!this.activated) {\n\t\t\tthis.activated = true;\n\t\t\tthis.activateEvents(true);\n\t\t\tthis.checkPositions();\n\t\t}\n\t},\n\tdeactivate() {\n\t\tif (this.activated) {\n\t\t\tthis.activated = false;\n\t\t\tthis.activateEvents(false);\n\t\t\tthis.unfixElement();\n\t\t}\n\t},\n\tactivateEvents(activate) {\n\t\tconst method = activate ? 'addEventListener' : 'removeEventListener';\n\t\twindow[method]('scroll', this.scrollEvent);\n\t\twindow[method]('resize', this.resizeEvent);\n\t\tthis.lastPos = null;\n\t},\n\tcheckPositions() {\n\t\tconst containerBox = this.containerElement.getBoundingClientRect();\n\t\tconst fixedBottom = this.fixedElement.offsetHeight + this.marginTop;\n\t\tconst isPastTop = containerBox.top <= this.marginTop;\n\t\tconst isPastBottom = containerBox.bottom - this.marginBottom <= fixedBottom;\n\t\tlet position = null;\n\n\t\tif (isPastTop && !isPastBottom) position = POS_FIX_TOP;\n\t\telse if (isPastBottom) position = POS_UNFIX_BOTTOM;\n\t\telse position = POS_UNFIX;\n\n\t\tthis.setPosition(position, containerBox);\n\t},\n\tsetPosition(position, containerBox) {\n\t\tif (position !== this.lastPos) {\n\t\t\tswitch (position) {\n\t\t\t\tcase POS_FIX_TOP:\n\t\t\t\t\tthis.fixElement(containerBox);\n\t\t\t\t\tbreak;\n\t\t\t\tcase POS_UNFIX_BOTTOM:\n\t\t\t\t\tthis.fixElement(containerBox, true);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// POS_UNFIX\n\t\t\t\t\tthis.unfixElement();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t},\n\tfixElement(box, bottom) {\n\t\tconst { left } = box;\n\t\tconst style = this.fixedElement.style;\n\n\t\tstyle.position = bottom ? 'absolute' : 'fixed';\n\t\tstyle.top = bottom ? null : this.marginTop + 'px';\n\t\tstyle.bottom = bottom ? this.marginBottom + 'px' : null;\n\t\tstyle.left = bottom ? 0 : left + 'px';\n\n\t\tthis.lastPos = bottom ? POS_UNFIX_BOTTOM : POS_FIX_TOP;\n\t},\n\tunfixElement() {\n\t\tconst style = this.fixedElement.style;\n\t\tstyle.position = null;\n\t\tstyle.top = null;\n\t\tstyle.left = null;\n\t\tthis.lastPos = POS_UNFIX;\n\t},\n};\n"],"sourceRoot":""}