{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","__webpack_exports__","html","document","querySelector","body","menuToggle","menuIcon","siteMenu","socialMenu","toTopBtn","addEventListener","classList","toggle","error","getElementsByClassName","emojiArray","errorEmoji","Math","floor","random","length","appendChild","createTextNode","randomErrorEmoji","objectFitImages","lastPosition","ticking","window","scrollTop","requestAnimationFrame","remove","add","scroll","SmoothScroll","animateScroll"],"mappings":"aACA,IAAAA,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,IACAG,EAAAH,EACAI,GAAA,EACAH,YAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAZ,EAAAmB,EAAA,SAAAjB,GACAY,OAAAC,eAAAb,EAAA,cAAiDkB,OAAA,KAIjDpB,EAAAqB,EAAA,SAAAlB,GACA,IAAAS,EAAAT,KAAAmB,WACA,WAA2B,OAAAnB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAH,EAAAU,EAAAE,EAAA,IAAAA,GACAA,GAIAZ,EAAAa,EAAA,SAAAU,EAAAC,GAAsD,OAAAV,OAAAW,UAAAC,eAAAnB,KAAAgB,EAAAC,IAGtDxB,EAAA2B,EAAA,IAIA3B,IAAA4B,EAAA,mECnEA5B,EAAAmB,EAAAU,GAAA7B,EAAA,YAIM8B,EAAOC,SAASC,cAAc,QAC9BC,EAAOF,SAASC,cAAc,QAC9BE,EAAaH,SAASC,cAAc,gBACpCG,EAAWJ,SAASC,cAAc,cAClCI,EAAWL,SAASC,cAAc,cAClCK,EAAaN,SAASC,cAAc,gBACpCM,EAAWP,SAASC,cAAc,WAGpCE,GACFA,EAAWK,iBAAiB,QAAS,WACnCH,EAASI,UAAUC,OAAO,aAC1BJ,EAAWG,UAAUC,OAAO,aAC5BN,EAASK,UAAUC,OAAO,aAC1BN,EAASK,UAAUC,OAAO,iBAKL,WACvB,IAAMC,EAAQX,SAASY,uBAAuB,eAAe,GACvDC,GACJ,WAAY,SAAU,SAAU,SAAU,QAAS,SAAU,QAC7D,UAAa,QAAS,QAAS,YAEjC,GAAIF,EAAO,CACT,IAAMG,EAAaD,EAAWE,KAAKC,MAAMD,KAAKE,SAAWJ,EAAWK,SACpEP,EAAMQ,YAAYnB,SAASoB,eAAeN,KAG9CO,GAIAC,gBAAgB,kBAIhB,IAAIC,EAAe,EACfC,GAAU,EACdC,OAAOjB,iBAAiB,SAAU,WAChCe,EAAkC,IAAnBrB,EAAKwB,UAAkB3B,EAAK2B,UAAYxB,EAAKwB,UACvDF,GACHC,OAAOE,sBAAsB,WACvBJ,GAAgB,IAClBhB,EAASE,UAAUmB,OAAO,WAE1BrB,EAASE,UAAUoB,IAAI,WAEzBL,GAAU,IAGdA,GAAU,IAIZ,IAAMM,EAAS,IAAIC,aAAa,gBAChCxB,EAASC,iBAAiB,QAAS,WACjCsB,EAAOE,cAAc","file":"js/bundle.60cd93d1af.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"tjUo\");\n","import './styles/main.css';\nimport 'mermaid';\n\n// Selected DOM elements\nconst html = document.querySelector('html');\nconst body = document.querySelector('body');\nconst menuToggle = document.querySelector('.menu-toggle');\nconst menuIcon = document.querySelector('.icon-menu');\nconst siteMenu = document.querySelector('.site-menu');\nconst socialMenu = document.querySelector('.social-menu');\nconst toTopBtn = document.querySelector('.to-top');\n\n// Site and social menu toggle\nif (menuToggle) {\n menuToggle.addEventListener('click', () => {\n siteMenu.classList.toggle('collapsed');\n socialMenu.classList.toggle('collapsed');\n menuIcon.classList.toggle('icon-menu');\n menuIcon.classList.toggle('icon-close');\n });\n}\n\n// Random emoji for 404 error message.\nconst randomErrorEmoji = () => {\n const error = document.getElementsByClassName('error-emoji')[0];\n const emojiArray = [\n '\\\\(o_o)/', '(o^^)o', '(˚Δ˚)b', '(^-^*)', '(≥o≤)', '(^_^)b', '(·_·)',\n '(=\\'X\\'=)', '(>_<)', '(;-;)', '\\\\(^Д^)/',\n ];\n if (error) {\n const errorEmoji = emojiArray[Math.floor(Math.random() * emojiArray.length)];\n error.appendChild(document.createTextNode(errorEmoji));\n }\n};\nrandomErrorEmoji();\n\n// Object-fit polyfill for post cover\n/* eslint-disable no-undef */\nobjectFitImages('img.post-cover');\n\n// Show toTopBtn when scroll to 600px\n/* eslint-disable no-undef */\nlet lastPosition = 0;\nlet ticking = false;\nwindow.addEventListener('scroll', () => {\n lastPosition = body.scrollTop === 0 ? html.scrollTop : body.scrollTop;\n if (!ticking) {\n window.requestAnimationFrame(() => {\n if (lastPosition >= 600) {\n toTopBtn.classList.remove('is-hide');\n } else {\n toTopBtn.classList.add('is-hide');\n }\n ticking = false;\n });\n }\n ticking = true;\n});\n\n// Smooth Scroll to top when click toTopBtn\nconst scroll = new SmoothScroll('a[href*=\"#\"]');\ntoTopBtn.addEventListener('click', () => {\n scroll.animateScroll(0);\n});\n\n// HMR interface\nif (module.hot) module.hot.accept();\n// mermaid.initialize({startOnLoad:true});\n"],"sourceRoot":""}