{"version":3,"file":"scripts.min.js","mappings":"iCAAA,EACA,EAEIA,E,sDCWJ,yBAA8B,GAAO,QAAS,SAoD9C,C,wDCrDA,4BAAiC,GAAO,QAAS,SAyCjD,C,GCrDIC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CHtBA,SACA,SAGoB,QAApB,GADIN,EAASS,QACNC,qBAAa,QAApBV,EAAOU,cAAkB,CAAC,GACQ,QAAlC,KAAAV,EAAOU,eAAcC,qBAAa,UAAbA,cAAkB,EAAAA,eACX,QAA5B,KAAAX,EAAOU,eAAcE,eAAO,UAAPA,QAAY,EAAAC,iB","sources":["webpack://app-accordion4/./src/ts/index.ts","webpack://app-accordion4/./src/ts/lib-2sxc-accordion.ts","webpack://app-accordion4/./src/ts/lib-2sxc-bs5-accordion.ts","webpack://app-accordion4/webpack/bootstrap"],"sourcesContent":["import { initAccordion } from './lib-2sxc-accordion';\r\nimport { initAccordionBs5 } from './lib-2sxc-bs5-accordion';\r\n\r\nvar winAny = window as any;\r\nwinAny.appAccordion4 ??= {};\r\nwinAny.appAccordion4.initAccordion ??= initAccordion;\r\nwinAny.appAccordion4.initBs5 ??= initAccordionBs5;","import { show, toggle } from 'slidetoggle';\r\nimport { AccordionOptions } from './lib-2sxc-accordion-options';\r\n\r\n/*\r\n This is a shared code used in various 2sxc apps. Make sure that they are in sync, so if you improve it, improve all 2sxc apps which use this. \r\n ATM they are:\r\n - Accordion\r\n - FAQ\r\n - App School System\r\n\r\n The master with the newest / best version must always be the Accordion, the others should then get a fresh copy.\r\n Because this is shared, all parameters like DOM-IDs etc. must be provided in the Init-call that it can work across apps\r\n*/ \r\n\r\nexport function initAccordion({ domId, options } : { domId: string, options: AccordionOptions }) {\r\n // // get navHight for correct scrollposition\r\n // var nav = (document.getElementsByTagName(options.tagStickyHeader)[0] as HTMLElement);\r\n // var navHeight = (nav != null ? nav.offsetHeight : 0);\r\n \r\n // let accordionWrapper = document.querySelector(`[${domId}]`)\r\n // // attach click to all accordions when loading\r\n // var accordionOpener = accordionWrapper.querySelectorAll(`.${options.accordionOpener}`);\r\n \r\n // accordionOpener.forEach((elem: HTMLElement) => {\t\r\n // elem.addEventListener('click', (event) => {\r\n // event.preventDefault();\r\n\r\n // const currentElem = event.currentTarget as HTMLElement;\r\n // const hash = currentElem.dataset.accordionParent.replace('#', '');\r\n // const parent = currentElem.parentElement;\r\n // const targetOpenElem = accordionWrapper.querySelector(`[${options.attrChild}=\"${hash}\"]`) as HTMLElement;\t\t\r\n\r\n // // add hash to url\r\n // location.hash = hash;\r\n\r\n // // open / close mechanic for slide\r\n // toggle(targetOpenElem, {});\r\n // parent.classList.toggle(`${options.classIsExpanded}`);\r\n // })\r\n // });\r\n\r\n // // get hash from url and open specific item\r\n // if(window.location.hash){\r\n // const hash = window.location.hash.replace('#', '');\r\n // const targetHashElem = accordionWrapper.querySelector(`[${options.attrChild}=\"${hash}\"]`);\r\n \r\n // // if target element exists scroll to element and open it\r\n // if(targetHashElem){\r\n // const elemOffsetX = targetHashElem.getBoundingClientRect().top + window.scrollY - navHeight;\r\n // const targetOpenElem = accordionWrapper.querySelector(`[${options.attrChild}=\"${hash}\"]`) as HTMLElement;\t\t\r\n\r\n // targetHashElem.parentElement.classList.add(`${options.classIsExpanded}`);\r\n\r\n // // open accordion\r\n // show(targetOpenElem, {\r\n // onAnimationEnd: () => {\r\n // // scroll to element which should open then\r\n // window.scrollTo({\r\n // top: elemOffsetX,\r\n // left: 0,\r\n // behavior: 'smooth'\r\n // });\r\n // }\r\n // });\r\n // }\r\n // }\r\n}","import { AccordionOptions } from './lib-2sxc-accordion-options';\r\n\r\n/*\r\n This is a shared code used in various 2sxc apps. Make sure that they are in sync, so if you improve it, improve all 2sxc apps which use this. \r\n ATM they are:\r\n - Accordion\r\n - FAQ\r\n - App School System\r\n\r\n The master with the newest / best version must always be the Accordion, the others should then get a fresh copy.\r\n Because this is shared, all parameters like DOM-IDs etc. must be provided in the Init-call that it can work across apps\r\n*/ \r\n\r\nexport function initAccordionBs5({ domId, options } : { domId: string, options: AccordionOptions }) {\r\n// // get navHight for correct scrollposition\r\n// var nav = (document.getElementsByTagName(options.tagStickyHeader)[0] as HTMLElement);\r\n// var navHeight = (nav != null ? nav.offsetHeight : 0);\r\n\r\n// let accordionWrapper = document.querySelector(`[${domId}]`)\r\n\r\n// // attach click to all accordions when loading\r\n// var accordionOpener = accordionWrapper.querySelectorAll(`.${options.accordionOpener}`);\r\n\r\n// accordionOpener.forEach((elem: HTMLElement) => {\t\r\n// elem.addEventListener('click', (event) => {\r\n// event.preventDefault();\r\n\r\n// const hash = elem.getAttribute(options.attrParent);\r\n \r\n// // add hash to url\r\n// location.hash = hash;\r\n// })\r\n// });\r\n\r\n// // get hash from url and open specific item\r\n// if(window.location.hash){\r\n// const hash = window.location.hash;\r\n// const targetButton = accordionWrapper.querySelector(`[${options.attrParent}=\"${hash}\"]`);\r\n// const targetContent = accordionWrapper.querySelector(hash);\r\n\r\n// // if target element exists scroll to element and open it\r\n// if(targetButton && targetContent){\r\n// const elemOffsetX = targetContent.getBoundingClientRect().top + window.scrollY - navHeight;\r\n// targetContent.classList.toggle(`${options.classIsExpanded}`);\r\n// targetButton.classList.toggle(`${options.classInactive}`);\r\n\r\n// // scroll to element which should open then\r\n// window.scrollTo({\r\n// top: elemOffsetX,\r\n// left: 0,\r\n// behavior: 'smooth'\r\n// });\r\n// }\r\n// }\r\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n"],"names":["winAny","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","window","appAccordion4","initAccordion","initBs5","initAccordionBs5"],"sourceRoot":""}