{"version":3,"file":"js/index/script.js","mappings":";;;;;;;;;;;;;AAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACwD;AACxD,YAAY,iBAAiB;AACe;AAC5C,+CAAY,GAAG,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,CAAC;;;;;;;;;;;;;;;;;;;;;;AChCY;;AAEe;AACuB;;AAEnD;;AAEgB;AACS;;AAElB;AACP,EAAE,sCAAI,gBAAgB,6DAAa;AACnC;;AAEA;AACO;AACP;AACA;AACA,4DAA4D;AAC5D;;AAEA;AACO;AACP;AACA;AACA,IAAI,6DAAa;AACjB;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,IAAI,6DAAa;AACjB;AACA;AACA;AACA,qBAAqB,uCAAuC;AAC5D,KAAK;AACL,GAAG;AACH;;;;;;;;;;;;;;;;AClDa;AAC4B;;AAElC;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,qDAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACjEO;AACP;AACA;;;;;;;UCFA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA;WACA;WACA,kBAAkB,qBAAqB;WACvC,oHAAoH,iDAAiD;WACrK;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC7BA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA,8CAA8C;;WAE9C;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,iCAAiC,mCAAmC;WACpE;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UElDA;UACA;UACA;UACA,wFAAwF,yDAAyD;UACjJ","sources":["webpack://frontend-starter/./src/js/index/script.js","webpack://frontend-starter/./src/js/utility/_gsap.js","webpack://frontend-starter/./src/js/utility/_smoothScroll.js","webpack://frontend-starter/./src/js/utility/_stripUnit.js","webpack://frontend-starter/webpack/bootstrap","webpack://frontend-starter/webpack/runtime/chunk loaded","webpack://frontend-starter/webpack/runtime/define property getters","webpack://frontend-starter/webpack/runtime/hasOwnProperty shorthand","webpack://frontend-starter/webpack/runtime/make namespace object","webpack://frontend-starter/webpack/runtime/jsonp chunk loading","webpack://frontend-starter/webpack/before-startup","webpack://frontend-starter/webpack/startup","webpack://frontend-starter/webpack/after-startup"],"sourcesContent":["\"use strict\";\n// ===========================================\n// variable / 変数宣言\n// ===========================================\n// アクティブなクラス\nconst activeClass = \"is-active\";\nconst mediaQuery = window.matchMedia(\"screen and (min-width: 960px)\");\n// ===========================================\n// library / ライブラリ\n// ===========================================\nimport { SmoothScroll } from \"../utility/_smoothScroll\";\n// import { setUpAccordion } from \"../utility/_accordion\";\nimport * as modGsap from \"../utility/_gsap\";\nmodGsap.init({ scrollTrigger: true });\n// ===========================================\n// setup /\n// ===========================================\nwindow.addEventListener(\"DOMContentLoaded\", () => {\n // setUpAccordion();\n // new SmoothScroll();\n const details = document.querySelectorAll(\".js-details\");\n const accordionBtn = document.querySelectorAll(\".faq-list-item__button\");\n\n accordionBtn.forEach((item, index) => {\n accordionBtn[index].addEventListener(\"click\", () => {\n const accordionItem = item.previousElementSibling;\n accordionItem.classList.toggle(\"is-active\");\n item.classList.toggle(\"is-active\");\n // console.log(accordionItem);\n });\n });\n // console.log(accordionBtn);\n});\n","\"use strict\";\n\nimport { gsap } from \"gsap\";\nimport { ScrollTrigger } from \"gsap/ScrollTrigger\";\n\nconst activeClass = \"is-active\";\n\nexport { gsap };\nexport { ScrollTrigger };\n\nexport function init() {\n gsap.registerPlugin(ScrollTrigger);\n}\n\n// ランダムなdelayを付けたいときに\nexport function getRandomIntInclusive(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive\n}\n\n//- scrollTriggerでクラスを付与 (1度だけ実行)\nexport function onceAnimation(className = \".anim-once\", viewportAnker = \"75%\") {\n const animOnce = document.querySelectorAll(className);\n animOnce.forEach((item) => {\n ScrollTrigger.create({\n trigger: item,\n start: \"top \" + viewportAnker,\n once: true,\n onEnter: () => {\n item.classList.add(activeClass);\n },\n });\n });\n}\n\n//- scrollTriggerでクラスを付与 (複数回実行)\nexport function repeatAnimation(\n className = \".anim-repeat\",\n viewportAnker = \"75%\"\n) {\n const animRepeat = document.querySelectorAll(className);\n animRepeat.forEach((item) => {\n ScrollTrigger.create({\n trigger: item,\n start: \"top \" + viewportAnker,\n toggleActions: \"play reverse play reverse\",\n toggleClass: { targets: item, className: activeClass },\n });\n });\n}\n","\"use strict\";\nimport { stripUnit } from \"./_stripUnit\";\n\nexport class SmoothScroll {\n #links;\n\n constructor(links) {\n this.#links = links;\n this.#links.forEach((link) => {\n link.addEventListener(\"click\", (e) => {\n this.#moveAnchorLink(e);\n });\n });\n }\n #moveAnchorLink = (e) => {\n const target = e.currentTarget;\n e.preventDefault();\n const targetId = target.hash;\n var href = target.href;\n var currentURL = location.href;\n if (currentURL.indexOf(\"#\") > -1) currentURL = currentURL.split(\"#\")[0];\n if (href.split(\"#\")[0] != currentURL) {\n window.location.href = href;\n } else {\n var param = href.substring(href.indexOf(\"?\"));\n\n if (\n target.hasAttribute(\"target\") &&\n target.getAttribute(\"target\") == \"_blank\"\n ) {\n open(target.href, \"_blank\");\n } else {\n if (href.indexOf(\"?\") > -1) {\n location.href = href.replace(param, \"\");\n } else {\n if (\n href.indexOf(currentURL) == -1 ||\n location.pathname == \"/\" ||\n href.split(\"#\")[0] != currentURL\n ) {\n location.href = href;\n } else if (href.indexOf(currentURL) > -1) {\n const targetElement = document.querySelector(targetId);\n // 画面上部から要素までの距離\n const rectTop = targetElement.getBoundingClientRect().top;\n // 現在のスクロール距離\n const offsetTop = window.scrollY;\n // scroll-margin-topプロパティでheaderの高さを確保\n const scrollMarginTop =\n stripUnit(\n window\n .getComputedStyle(targetElement)\n .getPropertyValue(\"scroll-margin-top\")\n ) || 0;\n const top = rectTop + offsetTop - scrollMarginTop;\n\n window.scrollTo({\n top,\n behavior: \"smooth\",\n });\n }\n }\n }\n }\n };\n}\n","export const stripUnit = (value) => {\n return Number((value || \"\").toString().replace(/[^\\d\\.-]/gi, \"\")) || null;\n};\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// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\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};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"js/index/script\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkfrontend_starter\"] = self[\"webpackChunkfrontend_starter\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"/js/vendor\"], function() { return __webpack_require__(\"./src/js/index/script.js\"); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":[],"sourceRoot":""}