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AoBc,EAAEF,EAAYC,KAASb,EAAoBc,EAAEV,EAASS,IAC5EE,OAAOC,eAAeZ,EAASS,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3Eb,EAAoBc,EAAI,SAASK,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,ICC/FpB,EAAoBwB,EAAI,SAASpB,GACX,oBAAXqB,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAeZ,EAASqB,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAeZ,EAAS,aAAc,CAAEuB,OAAO","sources":["webpack://webpack_template/./src/assets/js/script.js","webpack://webpack_template/webpack/bootstrap","webpack://webpack_template/webpack/runtime/compat get default export","webpack://webpack_template/webpack/runtime/define property getters","webpack://webpack_template/webpack/runtime/hasOwnProperty shorthand","webpack://webpack_template/webpack/runtime/make namespace object"],"sourcesContent":["// -----------------------------\n// グローバルな変数はここで定義しておく\n// -----------------------------\n\n// -----------------------------\n// 関数群\n// -----------------------------\n\n// アコーディオンパネル\nconst setUpAccordion = () => {\n const details = document.querySelectorAll(\".js-details\");\n const isRunning = \"running\"; // アニメーション実行中のときに付与する予定のカスタムデータ属性の値\n const isOpend = \"is-opened\"; // アイコン操作用のクラス名\n\n details.forEach((element) => {\n const summary = element.querySelector(\".js-summary\");\n const content = element.querySelector(\".js-content\");\n\n summary.addEventListener(\"click\", (event) => {\n event.preventDefault();\n if (element.dataset.animStatus === isRunning) {\n return;\n }\n if (element.open) {\n element.classList.toggle(isOpend);\n const closingAnim = content.animate(\n closingAnimKeyframes(content),\n animTiming\n );\n\n element.dataset.animStatus = isRunning;\n closingAnim.onfinish = () => {\n element.removeAttribute(\"open\");\n element.dataset.animStatus = \"\";\n };\n } else {\n element.setAttribute(\"open\", \"true\");\n element.classList.toggle(isOpend);\n\n const openingAnim = content.animate(\n openingAnimKeyframes(content),\n animTiming\n );\n element.dataset.animStatus = isRunning;\n openingAnim.onfinish = () => {\n element.dataset.animStatus = \"\";\n };\n }\n });\n });\n};\n\n\n/* アニメーションの時間とイージング */\nconst animTiming = {\n duration: 400,\n easing: \"ease-out\",\n};\n\n/* アコーディオンを閉じるときのキーフレーム */\nconst closingAnimKeyframes = (content) => [\n {\n height: content.offsetHeight + \"px\",\n opacity: 1,\n },\n {\n height: 0,\n opacity: 0,\n },\n];\n\n/* アコーディオンを開くときのキーフレーム */\nconst openingAnimKeyframes = (content) => [\n {\n height: 0,\n opacity: 0,\n },\n {\n height: content.offsetHeight + \"px\",\n opacity: 1,\n },\n];\n\nvar toggleButtons = document.querySelectorAll('.js-toggle');\ntoggleButtons.forEach(function(button) {\n button.addEventListener('click', function() {\n var targetId = button.dataset.target;\n var content = document.getElementById(targetId);\n\n if (content.style.height === '0px') {\n var contentContainer = content.querySelector('.accordion-container');\n var contentHeight = contentContainer.offsetHeight;\n\n content.style.height = contentHeight + 'px';\n content.scrollIntoView({ behavior: 'smooth' });\n\n button.classList.add('is-opened'); // .is-opened クラスを追加\n } else {\n content.style.height = '0px';\n button.classList.remove('is-opened'); // .is-opened クラスを削除\n }\n });\n});\n\n// -----------------------------\n// イベント系\n// -----------------------------\n\n// DOM読み込まれたら発火\nwindow.addEventListener(\"DOMContentLoaded\", function () {\n setUpAccordion();\n});\n\n// リサイズ時に発火\nwindow.addEventListener(\"resize\", function () {});\n\n// スクロール時に発火\nwindow.addEventListener(\"scroll\", function () {});\n\n// -----------------------------\n// その他\n// -----------------------------\n\n//スクロールでアニメーションクラスを追加\nif (document.querySelector(\".anm\") != null) {\n const anm = document.querySelectorAll(\".anm\");\n const options = {\n root: null,\n rootMargin: \"-4%\",\n threshold: [0],\n };\n const observe = new IntersectionObserver(addAnimation, options);\n anm.forEach(function (elem, index) {\n observe.observe(elem);\n });\n function addAnimation(entries) {\n entries.forEach(function (entry) {\n if (entry.isIntersecting) {\n entry.target.classList.add(\"is-show\");\n } else {\n // entry.target.classList.remove(\"is-show\");\n }\n });\n }\n}\n\n\nconst intersectionContainer = document.querySelector(\".js-inner\");\nconst intersectionTarget = document.querySelector(\".float-banner\");\nconst infiniteScrollObserver = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (!entry.isIntersecting) {\n intersectionTarget.classList.remove(\"is-shown\");\n } else {\n intersectionTarget.classList.add(\"is-shown\");\n }\n });\n});\ninfiniteScrollObserver.observe(intersectionContainer);","// 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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["animTiming","duration","easing","closingAnimKeyframes","content","height","offsetHeight","opacity","openingAnimKeyframes","document","querySelectorAll","forEach","button","addEventListener","targetId","dataset","target","getElementById","style","contentHeight","querySelector","scrollIntoView","behavior","classList","add","remove","window","details","isRunning","isOpend","element","summary","event","preventDefault","animStatus","open","toggle","closingAnim","animate","onfinish","removeAttribute","setAttribute","openingAnim","anm","observe","IntersectionObserver","entries","entry","isIntersecting","root","rootMargin","threshold","elem","index","intersectionContainer","intersectionTarget","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value"],"sourceRoot":""}