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AAK,UAAY,EAAI,SAAS,KAE/C,GAAG,IAPP,IACQ,CAFR,IAnBkD,GAClD,IAAI,EAAM,CAAC,EACP,EAAkB,GA4CtB,OAAO,SAjBP,WACQ,SAAS,KAAK,YACd,EAAI,SAAS,MAAQ,SAAS,KAAK,UAE3C,EAcA,OAAO,aAAe,WAClB,EAAkB,MAAM,UAAU,MAAM,KAAK,UACjD,CACH,CAtDD,EAwDO","file":"/npm/wc-body-scroll-fixed@1.0.4/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/wc-body-scroll-fixed@1.0.4/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","module.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \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/******/\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// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\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// 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/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\n(function () {\n    /*\n        绑定 hashchange, 在路由变化的时候, 直接就先初始化一下\n    */\n    window.addEventListener('hashchange', initScroll, false);\n    var map = {};\n    var needRecoverList = [];\n    /*\n        页面刚进来的时候, 先判断是不是已经保存过位置, 没有保存的话, 初始化\n        document.body.scrollTop = 0 是为了排除浏览器默认恢复的问题\n        去掉可以看见页面跳转的时候, 滚动条的位置不为 0;\n        为 0 是为了避免滚动条的位置的问题, 我现在是飘逸写代码的状态了吗\n    */\n    function initScroll() {\n        document.body.scrollTop = 0;\n        var hash = location.hash.split('?')[0].slice(2);\n        if (needRecoverList.indexOf(hash) === -1) {\n            return;\n        }\n        if (!map[location.hash]) {\n            map[location.hash] = 0;\n        }\n        recover();\n    }\n    function recover() {\n        var timer = setInterval(function () {\n            if (document.body.scrollTop == map[location.hash]) {\n                clearInterval(timer);\n            } else {\n                document.body.scrollTop = map[location.hash];\n            }\n        }, 90);\n    }\n    function scrolling() {\n        if (document.body.scrollTop) {\n            map[location.hash] = document.body.scrollTop;\n        }\n    }\n    // window.addEventListener('beforeunload', function() {\n    //     sessionStorage.setItem('_wc_map_', JSON.stringify(map));\n    // }, false);\n    // window.addEventListener('DOMContentLoaded', function() {\n    //     try {\n    //         map = JSON.parse(sessionStorage.getItem('_wc_map_')) || {};\n    //         sessionStorage.removeItem('_wc_map_');\n    //     } catch (e) {\n    //         map = {};\n    //     }\n    //     initScroll();\n    // }, false);\n    window.onscroll = scrolling;\n    window.scrollConfig = function () {\n        needRecoverList = Array.prototype.slice.call(arguments);\n    };\n})();\n\n/***/ })\n/******/ ]);"]}