{"version":3,"sources":["webpack:///./modules/Quote.ts"],"names":["__webpack_require__","r","__webpack_exports__","Quote","element","this","limitTextContent","setup","selector","Array","from","document","querySelectorAll","filter","node","dataset","moduleInitialized","forEach","prototype","el","console","log","textContent","length","substr"],"mappings":"2FAAAA,EAAAC,EAAAC,GAAA,IAEAC,EAAA,WAQI,SAAAA,EAAmBC,GAAAC,KAAAD,UACfC,KAAKC,mBAmBb,OA3BWH,EAAAI,MAAP,SAAaC,QAAA,IAAAA,MAHM,yBAIfC,MAAMC,KAAKC,SAASC,iBAAiBJ,IAAWK,OAAO,SAACC,GAAsB,OAACA,EAAKC,QAAQC,oBAAmBC,QAAQ,SAACb,GACpH,IAAID,EAAMC,GACVA,EAAQW,QAAQC,kBAAoB,UAQpCb,EAAAe,UAAAZ,iBAAR,WAC6BD,KAAKD,QAAQQ,iBAAiB,qDACtCK,QAAQ,SAACE,GAC1BC,QAAQC,IAAIF,GACJA,EAAGG,YAAYC,QAAU,KACzBJ,EAAGG,YAAcH,EAAGG,YAAYE,OAAO,EAAG,IAAM,SAGnCnB,KAAKD,QAAQQ,iBAAiB,8CACtCK,QAAQ,SAACE,GAClBC,QAAQC,IAAIF,GACRA,EAAGG,YAAYC,QAAU,MACzBJ,EAAGG,YAAcH,EAAGG,YAAYE,OAAO,EAAG,KAAO,UAIjErB,EA5BA,eA8BA,IAAIA,EAAMI,MAgBN,IAAIJ,EAAMI,MAhDS","file":"./modules/Quote.6b999c78.js","sourcesContent":["const moduleSelector = '[data-module=\"Quote\"]';\r\n\r\nexport default class Quote {\r\n static setup(selector: string = moduleSelector): void {\r\n Array.from(document.querySelectorAll(selector)).filter((node: HTMLElement) => !node.dataset.moduleInitialized).forEach((element: HTMLElement) => {\r\n new Quote(element);\r\n element.dataset.moduleInitialized = 'true';\r\n });\r\n }\r\n\r\n constructor(public element: HTMLElement) {\r\n this.limitTextContent();\r\n }\r\n\r\n private limitTextContent(): void {\r\n const headlineElements = this.element.querySelectorAll('.career-facelift .cw-career-quote .cw-h2-headline');\r\n headlineElements.forEach((el: Element) => {\r\n console.log(el)\r\n if (el.textContent.length >= 41) {\r\n el.textContent = el.textContent.substr(0, 40) + '...';\r\n }\r\n });\r\n const textElements = this.element.querySelectorAll('.career-facelift .cw-career-quote .cw-text');\r\n textElements.forEach((el: Element) => {\r\n console.log(el)\r\n if (el.textContent.length >= 458) {\r\n el.textContent = el.textContent.substr(0, 457) + '...';\r\n }\r\n });\r\n }\r\n}\r\n\r\nnew Quote.setup();\r\n\r\n\r\n// Hot Module Replacement\r\nif (module.hot) {\r\n let nodesCache: HMRNodes[] = Array.from(document.querySelectorAll(moduleSelector)).map((element: Node) => ({ nodeToReplace: element, nodeOrigin: element.cloneNode(true) }));\r\n\r\n new Quote.setup(moduleSelector);\r\n\r\n module.hot.accept(() => {\r\n new Quote.setup(moduleSelector);\r\n });\r\n module.hot.dispose(() => {\r\n nodesCache.forEach(({ nodeToReplace, nodeOrigin }) => { nodeToReplace = nodeToReplace.parentElement.replaceChild(nodeOrigin.cloneNode(true), nodeToReplace) });\r\n });\r\n} else {\r\n new Quote.setup(moduleSelector);\r\n}"],"sourceRoot":""}