[
  {
    "path": ".eslintignore",
    "content": "/config/*\n/src/registerServiceWorker.js\n/node_modules/*\n"
  },
  {
    "path": ".eslintrc.js",
    "content": "module.exports = {\n  extends: ['eslint-config-alloy/typescript-react', 'prettier', 'prettier/react'],\n  plugins: ['prettier', 'typescript'],\n  globals: {\n    // 这里填入你的项目需要的全局变量\n    // 这里值为 false 表示这个全局变量不允许被重新赋值，比如：\n    //\n    // React: false,\n    // ReactDOM: false\n  },\n  parser: 'typescript-eslint-parser',\n  rules: {\n    // 这里填入你的项目需要的个性化配置，比如：\n    //\n    // // @fixable 一个缩进必须用两个空格替代\n    semi: ['error', 'never'],\n    // 'no-console': 'off',\n    'no-unused-vars': [\n      'warn',\n      {\n        vars: 'all',\n        args: 'none',\n        caughtErrors: 'none'\n      }\n    ],\n    'max-nested-callbacks': 'off',\n    'react/no-children-prop': 'off',\n    'typescript/member-ordering': 'off',\n    'typescript/member-delimiter-style': 'off',\n    'react/jsx-indent-props': 'off',\n    'react/no-did-update-set-state': 'off',\n    indent: [\n      'off',\n      2,\n      {\n        SwitchCase: 1,\n        flatTernaryExpressions: true\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": ".gitignore",
    "content": "# See https://help.github.com/ignore-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n\n# testing\n/coverage\n\n# production\n/build\n\n# misc\n.DS_Store\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n"
  },
  {
    "path": ".postcssrc.js",
    "content": "module.exports = {\n  \"plugins\": {\n    \"postcss-import\": {},\n    \"postcss-url\": {},\n    \"postcss-aspect-ratio-mini\": {},\n    \"postcss-write-svg\": {\n      utf8: false\n    },\n    \"postcss-cssnext\": {},\n    \"postcss-px-to-viewport\": {\n      viewportWidth: 750,\n      viewportHeight: 1334, // (Number) The height of the viewport. \n      unitPrecision: 3, // (Number) The decimal numbers to allow the REM units to grow to. \n      viewportUnit: 'vw', // (String) Expected units. \n      selectorBlackList: ['.ignore', '.hairlines'], // (Array) The selectors to ignore and leave as px. \n      minPixelValue: 1, // (Number) Set the minimum pixel value to replace. \n      mediaQuery: false // (Boolean) Allow px to be converted in media queries.\n    },\n    \"postcss-viewport-units\": {},\n    \"cssnano\": {\n      preset: \"advanced\",\n      autoprefixer: false,\n      \"postcss-zindex\": false\n    }\n  }\n}"
  },
  {
    "path": ".prettierrc.js",
    "content": "module.exports = {\n  printWidth: 120,\n  tabWidth: 2,\n  // useTabs: false,\n  semi: false,\n  singleQuote: true\n  // trailingComma: 'none'\n  // bracketSpacing: true,\n  // jsxBracketSameLine: false,\n  // arrowParens: 'avoid',\n  // rangeStart: 0,\n  // rangeEnd: Infinity,\n  // proseWrap: \"preserve\"\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n  \"javascript.implicitProjectConfig.experimentalDecorators\": true,\n  \"files.exclude\": {\n    \"**/.git\": true\n  },\n  \"cSpell.words\": [\"NETEASE\"]\n}\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2018 Wee\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "🎶 基于 React 实现的仿 iOS 客户端网易云音乐。\n\n在线地址：**[戳我](http://118.24.21.99:5001/)**（PC 浏览器需切换到移动端模式）\n\n移动端体验：\n\n![qr](./docs/qr.png)\n\n## 预览\n\n![preview](./docs/preview.png)\n\n## 技术栈\n\n- React 16.3\n- TypeScript\n- Mobx + Redux\n- react-redux\n- react-router-v4\n- Scss\n\n## 实现细节\n\n目前只实现了上面四个页面，但是总体的结构已经形成了，其他页面的添加只是时间上的问题 ~~（其实是懒）~~，暂时没有实现，下面是目前已实现的功能的细节：\n\n### 局部状态管理\n\n像首页的 banner 或者推荐歌单等，都是不会被共享的局部状态，使用 Mobx 来进行请求的发起和状态的管理。\n\n### 全局状态\n\n播放器的状态是一个全局状态，包括当前的播放列表，切歌，播放 / 暂停等，所以很自然的使用 redux 来进行管理，可以清楚的掌握所有改变全局状态的行为。\n\n### TypeScript\n\n尽管上手需要掌握一些语法，但是静态类型与自动提示都能提供很大的帮助，在这个并不大的项目中我也体验到了很大的帮助。但是要注意的是 TS 其实并不严格限制对象的类型，只要够懒，遍地 any，就会把 TS 写成 JS，所以为了充分发挥 TS 的威力，一定要有良好的 TS 代码风格。\n\n### 手势滑动\n\n为了模仿 iOS 端可以通过滑屏切换页面的功能，通过监听 `touchStart`，`touchMove`，`touchEnd` 来进行手势的判断并通过 `transform` 触发模拟滚动实现，在  `touchMove` 中检测监听滑动的方向及距离，在 `touchEnd` 中触发路由的切换及页面吸附到整屏的位置。\n\n### 歌单的状态保留\n\n有这么一个操作需要注意：用户在某歌单往下滑了几下，然后点了某歌播放然后进入了播放器，会发生路由的改变，如果此时从播放器返回，会丢包包括滚动位置在内的歌单页的所有状态丢失（因为 re-mount 了）。\n\n我造了一个轮子来解决这个问题：[react-live-route](https://github.com/fi3ework/react-live-route)，是对 react-router-v4 中 Route 组件的增强，简单的说就是将歌单页隐藏掉而不是 unmount 掉，具体的解决思路可以参考轮子里的文档。\n\n### 跨组件传递状态\n\n在 iOS 版的网易云中，可以滑动来切换页面，同时会触发顶部 tab 下的滑块移动。在项目中，滑动页面与滑块分属于两个兄弟组件的子组件且嵌套层次较深，如果直接通过 prop 来传递略显丑陋，有如下解决方案：\n\n1. 通过 redux，但是 redux 最好只负责领域数据，这种 UI 的状态就不要往 store 中放了。\n\n2. 通过 event-emitter，其实和 redux 差不多，因为 redux 也是基于 event-emitter 实现的， 但是不经过 react-redux 虽然可以实现，但是破坏了 react 整个自顶向下界面更新的原则。\n\n3. 通过新的 context API 实现，如下图：\n\n   ![context](./docs/context.png)\n\n\n\n## API\n\n项目中用到的网易云音乐的 API 来自 [NeteaseCloudMusicApi](https://binaryify.github.io/NeteaseCloudMusicApi/#/?id=neteasecloudmusicapi)。\n\n## TODO\n\n目前还有一些部分没完成，包括但不限于：\n\n- [ ] code splitting\n- [ ] 组件中有些功能还是有耦合，需要再抽象\n- [ ] SSR\n\n## 开发\n\n克隆代码到本地之后，需要在 4000 端口运行 [NeteaseCloudMusicApi](https://binaryify.github.io/NeteaseCloudMusicApi/#/?id=neteasecloudmusicapi)。"
  },
  {
    "path": "config/env.js",
    "content": "'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\nconst paths = require('./paths');\n\n// Make sure that including paths.js after env.js will read .env variables.\ndelete require.cache[require.resolve('./paths')];\n\nconst NODE_ENV = process.env.NODE_ENV;\nif (!NODE_ENV) {\n  throw new Error(\n    'The NODE_ENV environment variable is required but was not specified.'\n  );\n}\n\n// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use\nvar dotenvFiles = [\n  `${paths.dotenv}.${NODE_ENV}.local`,\n  `${paths.dotenv}.${NODE_ENV}`,\n  // Don't include `.env.local` for `test` environment\n  // since normally you expect tests to produce the same\n  // results for everyone\n  NODE_ENV !== 'test' && `${paths.dotenv}.local`,\n  paths.dotenv,\n].filter(Boolean);\n\n// Load environment variables from .env* files. Suppress warnings using silent\n// if this file is missing. dotenv will never modify any environment variables\n// that have already been set.  Variable expansion is supported in .env files.\n// https://github.com/motdotla/dotenv\n// https://github.com/motdotla/dotenv-expand\ndotenvFiles.forEach(dotenvFile => {\n  if (fs.existsSync(dotenvFile)) {\n    require('dotenv-expand')(\n      require('dotenv').config({\n        path: dotenvFile,\n      })\n    );\n  }\n});\n\n// We support resolving modules according to `NODE_PATH`.\n// This lets you use absolute paths in imports inside large monorepos:\n// https://github.com/facebookincubator/create-react-app/issues/253.\n// It works similar to `NODE_PATH` in Node itself:\n// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders\n// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.\n// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.\n// https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421\n// We also resolve them to make sure all tools using them work consistently.\nconst appDirectory = fs.realpathSync(process.cwd());\nprocess.env.NODE_PATH = (process.env.NODE_PATH || '')\n  .split(path.delimiter)\n  .filter(folder => folder && !path.isAbsolute(folder))\n  .map(folder => path.resolve(appDirectory, folder))\n  .join(path.delimiter);\n\n// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be\n// injected into the application via DefinePlugin in Webpack configuration.\nconst REACT_APP = /^REACT_APP_/i;\n\nfunction getClientEnvironment(publicUrl) {\n  const raw = Object.keys(process.env)\n    .filter(key => REACT_APP.test(key))\n    .reduce(\n      (env, key) => {\n        env[key] = process.env[key];\n        return env;\n      },\n      {\n        // Useful for determining whether we’re running in production mode.\n        // Most importantly, it switches React into the correct mode.\n        NODE_ENV: process.env.NODE_ENV || 'development',\n        // Useful for resolving the correct path to static assets in `public`.\n        // For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.\n        // This should only be used as an escape hatch. Normally you would put\n        // images into the `src` and `import` them in code to get their paths.\n        PUBLIC_URL: publicUrl,\n      }\n    );\n  // Stringify all values so we can feed into Webpack DefinePlugin\n  const stringified = {\n    'process.env': Object.keys(raw).reduce(\n      (env, key) => {\n        env[key] = JSON.stringify(raw[key]);\n        return env;\n      },\n      {}\n    ),\n  };\n\n  return { raw, stringified };\n}\n\nmodule.exports = getClientEnvironment;\n"
  },
  {
    "path": "config/jest/cssTransform.js",
    "content": "'use strict';\n\n// This is a custom Jest transformer turning style imports into empty objects.\n// http://facebook.github.io/jest/docs/en/webpack.html\n\nmodule.exports = {\n  process() {\n    return 'module.exports = {};';\n  },\n  getCacheKey() {\n    // The output is always the same.\n    return 'cssTransform';\n  },\n};\n"
  },
  {
    "path": "config/jest/fileTransform.js",
    "content": "'use strict';\n\nconst path = require('path');\n\n// This is a custom Jest transformer turning file imports into filenames.\n// http://facebook.github.io/jest/docs/en/webpack.html\n\nmodule.exports = {\n  process(src, filename) {\n    return `module.exports = ${JSON.stringify(path.basename(filename))};`;\n  },\n};\n"
  },
  {
    "path": "config/jest/typescriptTransform.js",
    "content": "// Copyright 2004-present Facebook. All Rights Reserved.\n\n'use strict';\n\nconst tsJestPreprocessor = require('ts-jest/preprocessor');\n\nmodule.exports = tsJestPreprocessor;\n"
  },
  {
    "path": "config/paths.js",
    "content": "'use strict';\n\nconst path = require('path');\nconst fs = require('fs');\nconst url = require('url');\n\n// Make sure any symlinks in the project folder are resolved:\n// https://github.com/facebookincubator/create-react-app/issues/637\nconst appDirectory = fs.realpathSync(process.cwd());\nconst resolveApp = relativePath => path.resolve(appDirectory, relativePath);\n\nconst envPublicUrl = process.env.PUBLIC_URL;\n\nfunction ensureSlash(path, needsSlash) {\n  const hasSlash = path.endsWith('/');\n  if (hasSlash && !needsSlash) {\n    return path.substr(path, path.length - 1);\n  } else if (!hasSlash && needsSlash) {\n    return `${path}/`;\n  } else {\n    return path;\n  }\n}\n\nconst getPublicUrl = appPackageJson =>\n  envPublicUrl || require(appPackageJson).homepage;\n\n// We use `PUBLIC_URL` environment variable or \"homepage\" field to infer\n// \"public path\" at which the app is served.\n// Webpack needs to know it to put the right <script> hrefs into HTML even in\n// single-page apps that may serve index.html for nested URLs like /todos/42.\n// We can't use a relative path in HTML because we don't want to load something\n// like /todos/42/static/js/bundle.7289d.js. We have to know the root.\nfunction getServedPath(appPackageJson) {\n  const publicUrl = getPublicUrl(appPackageJson);\n  const servedUrl = envPublicUrl ||\n    (publicUrl ? url.parse(publicUrl).pathname : '/');\n  return ensureSlash(servedUrl, true);\n}\n\n// config after eject: we're in ./config/\nmodule.exports = {\n  dotenv: resolveApp('.env'),\n  appBuild: resolveApp('build'),\n  appPublic: resolveApp('public'),\n  appHtml: resolveApp('public/index.html'),\n  appIndexJs: resolveApp('src/index.tsx'),\n  appPackageJson: resolveApp('package.json'),\n  appSrc: resolveApp('src'),\n  yarnLockFile: resolveApp('yarn.lock'),\n  testsSetup: resolveApp('src/setupTests.ts'),\n  appNodeModules: resolveApp('node_modules'),\n  appTsConfig: resolveApp('tsconfig.json'),\n  appTsProdConfig: resolveApp('tsconfig.prod.json'),\n  appTsLint: resolveApp('tslint.json'),\n  publicUrl: getPublicUrl(resolveApp('package.json')),\n  servedPath: getServedPath(resolveApp('package.json')),\n};\n"
  },
  {
    "path": "config/polyfills.js",
    "content": "'use strict';\n\nif (typeof Promise === 'undefined') {\n  // Rejection tracking prevents a common issue where React gets into an\n  // inconsistent state due to an error, but it gets swallowed by a Promise,\n  // and the user has no idea what causes React's erratic future behavior.\n  require('promise/lib/rejection-tracking').enable();\n  window.Promise = require('promise/lib/es6-extensions.js');\n}\n\n// fetch() polyfill for making API calls.\nrequire('whatwg-fetch');\n\n// Object.assign() is commonly used with React.\n// It will use the native implementation if it's present and isn't buggy.\nObject.assign = require('object-assign');\n\n// In tests, polyfill requestAnimationFrame since jsdom doesn't provide it yet.\n// We don't polyfill it in the browser--this is user's responsibility.\nif (process.env.NODE_ENV === 'test') {\n  require('raf').polyfill(global);\n}\n"
  },
  {
    "path": "config/webpack.config.dev.js",
    "content": "'use strict'\n\nconst autoprefixer = require('autoprefixer')\nconst path = require('path')\nconst webpack = require('webpack')\nconst HtmlWebpackPlugin = require('html-webpack-plugin')\nconst CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin')\nconst InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin')\nconst WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin')\nconst ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin')\nconst ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')\nconst getClientEnvironment = require('./env')\nconst paths = require('./paths')\nconst TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin')\nconst postcssAspectRatioMini = require('postcss-aspect-ratio-mini')\nconst postcssPxToViewport = require('postcss-px-to-viewport')\nconst postcssWriteSvg = require('postcss-write-svg')\nconst postcssCssnext = require('postcss-cssnext')\nconst postcssViewportUnits = require('postcss-viewport-units')\nconst cssnano = require('cssnano')\nconst tsImportPluginFactory = require('ts-import-plugin')\nconst transformerFactory = require('ts-import-plugin')\n\n// Webpack uses `publicPath` to determine where the app is being served from.\n// In development, we always serve from the root. This makes config easier.\nconst publicPath = '/'\n// `publicUrl` is just like `publicPath`, but we will provide it to our app\n// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.\n// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.\nconst publicUrl = ''\n// Get environment variables to inject into our app.\nconst env = getClientEnvironment(publicUrl)\n\n// This is the development configuration.\n// It is focused on developer experience and fast rebuilds.\n// The production configuration is different and lives in a separate file.\nmodule.exports = {\n  // You may want 'eval' instead if you prefer to see the compiled output in DevTools.\n  // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.\n  devtool: 'cheap-module-source-map',\n  // These are the \"entry points\" to our application.\n  // This means they will be the \"root\" imports that are included in JS bundle.\n  // The first two entry points enable \"hot\" CSS and auto-refreshes for JS.\n  entry: [\n    // We ship a few polyfills by default:\n    require.resolve('./polyfills'),\n    // Include an alternative client for WebpackDevServer. A client's job is to\n    // connect to WebpackDevServer by a socket and get notified about changes.\n    // When you save a file, the client will either apply hot updates (in case\n    // of CSS changes), or refresh the page (in case of JS changes). When you\n    // make a syntax error, this client will display a syntax error overlay.\n    // Note: instead of the default WebpackDevServer client, we use a custom one\n    // to bring better experience for Create React App users. You can replace\n    // the line below with these two lines if you prefer the stock client:\n    // require.resolve('webpack-dev-server/client') + '?/',\n    // require.resolve('webpack/hot/dev-server'),\n    require.resolve('react-dev-utils/webpackHotDevClient'),\n    // Finally, this is your app's code:\n    paths.appIndexJs\n    // We include the app code last so that if there is a runtime error during\n    // initialization, it doesn't blow up the WebpackDevServer client, and\n    // changing JS code would still trigger a refresh.\n  ],\n  output: {\n    // Add /* filename */ comments to generated require()s in the output.\n    pathinfo: true,\n    // This does not produce a real file. It's just the virtual path that is\n    // served by WebpackDevServer in development. This is the JS bundle\n    // containing code from all our entry points, and the Webpack runtime.\n    filename: 'static/js/bundle.js',\n    // There are also additional JS chunk files if you use code splitting.\n    chunkFilename: 'static/js/[name].chunk.js',\n    // This is the URL that app is served from. We use \"/\" in development.\n    publicPath: publicPath,\n    // Point sourcemap entries to original disk location (format as URL on Windows)\n    devtoolModuleFilenameTemplate: info => path.resolve(info.absoluteResourcePath).replace(/\\\\/g, '/')\n  },\n  resolve: {\n    // This allows you to set a fallback for where Webpack should look for modules.\n    // We placed these paths second because we want `node_modules` to \"win\"\n    // if there are any conflicts. This matches Node resolution mechanism.\n    // https://github.com/facebookincubator/create-react-app/issues/253\n    modules: ['node_modules', paths.appNodeModules].concat(\n      // It is guaranteed to exist because we tweak it in `env.js`\n      process.env.NODE_PATH.split(path.delimiter).filter(Boolean)\n    ),\n    // These are the reasonable defaults supported by the Node ecosystem.\n    // We also include JSX as a common component filename extension to support\n    // some tools, although we do not recommend using it, see:\n    // https://github.com/facebookincubator/create-react-app/issues/290\n    // `web` extension prefixes have been added for better support\n    // for React Native Web.\n    extensions: ['.mjs', '.web.ts', '.ts', '.web.tsx', '.tsx', '.web.js', '.js', '.json', '.web.jsx', '.jsx', '.scss'],\n    alias: {\n      '@': path.resolve(__dirname, 'src'),\n      // Support React Native Web\n      // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/\n      'react-native': 'react-native-web'\n    },\n    plugins: [\n      // Prevents users from importing files from outside of src/ (or node_modules/).\n      // This often causes confusion because we only process files within src/ with babel.\n      // To fix this, we prevent you from importing files out of src/ -- if you'd like to,\n      // please link the files into your node_modules/ and let module-resolution kick in.\n      // Make sure your source files are compiled, as they will not be processed in any way.\n      new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),\n      new TsconfigPathsPlugin({\n        configFile: paths.appTsConfig\n      })\n    ]\n  },\n  module: {\n    strictExportPresence: true,\n    rules: [\n      // TODO: Disable require.ensure as it's not a standard language feature.\n      // We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.\n      // { parser: { requireEnsure: false } },\n\n      {\n        test: /\\.(js|jsx|mjs)$/,\n        loader: require.resolve('source-map-loader'),\n        enforce: 'pre',\n        include: paths.appSrc\n      },\n      {\n        // \"oneOf\" will traverse all following loaders until one will\n        // match the requirements. When no loader matches it will fall\n        // back to the \"file\" loader at the end of the loader list.\n        oneOf: [\n          // \"url\" loader works like \"file\" loader except that it embeds assets\n          // smaller than specified limit in bytes as data URLs to avoid requests.\n          // A missing `test` is equivalent to a match.\n          {\n            test: [/\\.bmp$/, /\\.gif$/, /\\.jpe?g$/, /\\.png$/],\n            loader: require.resolve('url-loader'),\n            options: {\n              limit: 10000,\n              name: 'static/media/[name].[hash:8].[ext]'\n            }\n          },\n          {\n            test: /\\.(js|jsx|mjs)$/,\n            include: paths.appSrc,\n            loader: require.resolve('babel-loader'),\n            options: {\n              compact: true\n            }\n          },\n          // Compile .tsx?\n          {\n            test: /\\.(ts|tsx)$/,\n            include: paths.appSrc,\n            use: [\n              {\n                loader: require.resolve('ts-loader'),\n                options: {\n                  // disable type checker - we will use it in fork plugin\n                  transpileOnly: true\n                }\n              }\n            ]\n          },\n          // \"postcss\" loader applies autoprefixer to our CSS.\n          // \"css\" loader resolves paths in CSS and adds assets as dependencies.\n          // \"style\" loader turns CSS into JS modules that inject <style> tags.\n          // In production, we use a plugin to extract that CSS to a file, but\n          // in development \"style\" loader enables hot editing of CSS.\n          {\n            test: /\\.(scss)$/,\n            exclude: /node_modules|antd\\.css/,\n            use: [\n              require.resolve('style-loader'),\n              {\n                loader: 'typings-for-css-modules-loader',\n                options: {\n                  modules: true,\n                  namedExport: true,\n                  camelCase: true,\n                  minimize: true,\n                  localIdentName: '[local]_[hash:base64:5]'\n                }\n              },\n              {\n                loader: require.resolve('postcss-loader'),\n                options: {\n                  // Necessary for external CSS imports to work\n                  // https://github.com/facebookincubator/create-react-app/issues/2677\n                  ident: 'postcss',\n                  plugins: () => [\n                    require('postcss-flexbugs-fixes'),\n                    autoprefixer({\n                      browsers: [\n                        '>1%',\n                        'last 4 versions',\n                        'Firefox ESR',\n                        'not ie < 9' // React doesn't support IE8 anyway\n                      ],\n                      flexbox: 'no-2009'\n                    }),\n                    postcssAspectRatioMini({}),\n                    postcssPxToViewport({\n                      viewportWidth: 750, // (Number) The width of the viewport.\n                      viewportHeight: 1334, // (Number) The height of the viewport.\n                      unitPrecision: 3, // (Number) The decimal numbers to allow the REM units to grow to.\n                      viewportUnit: 'vw', // (String) Expected units.\n                      selectorBlackList: ['.ignore', '.hairlines'], // (Array) The selectors to ignore and leave as px.\n                      minPixelValue: 1, // (Number) Set the minimum pixel value to replace.\n                      mediaQuery: false // (Boolean) Allow px to be converted in media queries.\n                    }),\n                    postcssWriteSvg({\n                      utf8: false\n                    }),\n                    postcssCssnext({}),\n                    postcssViewportUnits({}),\n                    cssnano({\n                      preset: 'advanced',\n                      autoprefixer: false,\n                      'postcss-zindex': false\n                    })\n                  ]\n                }\n              },\n              {\n                loader: require.resolve('sass-loader')\n              }\n            ]\n          },\n          {\n            test: /\\.svg$/,\n            loader: 'svg-inline-loader'\n          },\n          // \"file\" loader makes sure those assets get served by WebpackDevServer.\n          // When you `import` an asset, you get its (virtual) filename.\n          // In production, they would get copied to the `build` folder.\n          // This loader doesn't use a \"test\" so it will catch all modules\n          // that fall through the other loaders.\n          {\n            // Exclude `js` files to keep \"css\" loader working as it injects\n            // its runtime that would otherwise processed through \"file\" loader.\n            // Also exclude `html` and `json` extensions so they get processed\n            // by webpacks internal loaders.\n            exclude: [/\\.(js|jsx|mjs)$/, /\\.html$/, /\\.json$/],\n            loader: require.resolve('file-loader'),\n            options: {\n              name: 'static/media/[name].[hash:8].[ext]'\n            }\n          }\n        ]\n      }\n      // ** STOP ** Are you adding a new loader?\n      // Make sure to add the new loader(s) before the \"file\" loader.\n    ]\n  },\n  plugins: [\n    // Makes some environment variables available in index.html.\n    // The public URL is available as %PUBLIC_URL% in index.html, e.g.:\n    // <link rel=\"shortcut icon\" href=\"%PUBLIC_URL%/favicon.ico\">\n    // In development, this will be an empty string.\n    new InterpolateHtmlPlugin(env.raw),\n    // Generates an `index.html` file with the <script> injected.\n    new HtmlWebpackPlugin({\n      inject: true,\n      template: paths.appHtml\n    }),\n    // Add module names to factory functions so they appear in browser profiler.\n    new webpack.NamedModulesPlugin(),\n    // Makes some environment variables available to the JS code, for example:\n    // if (process.env.NODE_ENV === 'development') { ... }. See `./env.js`.\n    new webpack.DefinePlugin(env.stringified),\n    // This is necessary to emit hot updates (currently CSS only):\n    new webpack.HotModuleReplacementPlugin(),\n    // Watcher doesn't work well if you mistype casing in a path so we use\n    // a plugin that prints an error when you attempt to do this.\n    // See https://github.com/facebookincubator/create-react-app/issues/240\n    new CaseSensitivePathsPlugin(),\n    // If you require a missing module and then `npm install` it, you still have\n    // to restart the development server for Webpack to discover it. This plugin\n    // makes the discovery automatic so you don't have to restart.\n    // See https://github.com/facebookincubator/create-react-app/issues/186\n    new WatchMissingNodeModulesPlugin(paths.appNodeModules),\n    // Moment.js is an extremely popular library that bundles large locale files\n    // by default due to how Webpack interprets its code. This is a practical\n    // solution that requires the user to opt into importing specific locales.\n    // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack\n    // You can remove this if you don't use Moment.js:\n    new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/),\n    // Perform type checking and linting in a separate process to speed up compilation\n    new ForkTsCheckerWebpackPlugin({\n      async: false,\n      watch: paths.appSrc,\n      tsconfig: paths.appTsConfig,\n      tslint: paths.appTsLint\n    })\n  ],\n  // Some libraries import Node modules but don't use them in the browser.\n  // Tell Webpack to provide empty mocks for them so importing them works.\n  node: {\n    dgram: 'empty',\n    fs: 'empty',\n    net: 'empty',\n    tls: 'empty',\n    child_process: 'empty'\n  },\n  // Turn off performance hints during development because we don't do any\n  // splitting or minification in interest of speed. These warnings become\n  // cumbersome.\n  performance: {\n    hints: false\n  }\n}\n"
  },
  {
    "path": "config/webpack.config.prod.js",
    "content": "'use strict'\n\nconst autoprefixer = require('autoprefixer')\nconst path = require('path')\nconst webpack = require('webpack')\nconst HtmlWebpackPlugin = require('html-webpack-plugin')\nconst ExtractTextPlugin = require('extract-text-webpack-plugin')\nconst ManifestPlugin = require('webpack-manifest-plugin')\nconst InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin')\nconst SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin')\nconst ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin')\nconst ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin')\nconst paths = require('./paths')\nconst getClientEnvironment = require('./env')\nconst TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin')\nconst UglifyJsPlugin = require('uglifyjs-webpack-plugin')\nconst postcssAspectRatioMini = require('postcss-aspect-ratio-mini')\nconst postcssPxToViewport = require('postcss-px-to-viewport')\nconst postcssWriteSvg = require('postcss-write-svg')\nconst postcssCssnext = require('postcss-cssnext')\nconst postcssViewportUnits = require('postcss-viewport-units')\nconst cssnano = require('cssnano')\nconst BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin\n\n// Webpack uses `publicPath` to determine where the app is being served from.\n// It requires a trailing slash, or the file assets will get an incorrect path.\nconst publicPath = paths.servedPath\n// Some apps do not use client-side routing with pushState.\n// For these, \"homepage\" can be set to \".\" to enable relative asset paths.\nconst shouldUseRelativeAssetPaths = publicPath === './'\n// Source maps are resource heavy and can cause out of memory issue for large source files.\nconst shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false'\n// `publicUrl` is just like `publicPath`, but we will provide it to our app\n// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.\n// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.\nconst publicUrl = publicPath.slice(0, -1)\n// Get environment variables to inject into our app.\nconst env = getClientEnvironment(publicUrl)\n\n// Assert this just to be safe.\n// Development builds of React are slow and not intended for production.\nif (env.stringified['process.env'].NODE_ENV !== '\"production\"') {\n  throw new Error('Production builds must have NODE_ENV=production.')\n}\n\n// Note: defined here because it will be used more than once.\nconst cssFilename = 'static/css/[name].[contenthash:8].css'\n\n// ExtractTextPlugin expects the build output to be flat.\n// (See https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/27)\n// However, our output is structured with css, js and media folders.\n// To have this structure working with relative paths, we have to use custom options.\nconst extractTextPluginOptions = shouldUseRelativeAssetPaths\n  ? // Making sure that the publicPath goes back to to build folder.\n    { publicPath: Array(cssFilename.split('/').length).join('../') }\n  : {}\n\n// This is the production configuration.\n// It compiles slowly and is focused on producing a fast and minimal bundle.\n// The development configuration is different and lives in a separate file.\nmodule.exports = {\n  // Don't attempt to continue if there are any errors.\n  bail: true,\n  // We generate sourcemaps in production. This is slow but gives good results.\n  // You can exclude the *.map files from the build during deployment.\n  devtool: shouldUseSourceMap ? 'source-map' : false,\n  // In production, we only want to load the polyfills and the app code.\n  entry: [require.resolve('./polyfills'), paths.appIndexJs],\n  output: {\n    // The build folder.\n    path: paths.appBuild,\n    // Generated JS file names (with nested folders).\n    // There will be one main bundle, and one file per asynchronous chunk.\n    // We don't currently advertise code splitting but Webpack supports it.\n    filename: 'static/js/[name].[chunkhash:8].js',\n    chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js',\n    // We inferred the \"public path\" (such as / or /my-project) from homepage.\n    publicPath: publicPath,\n    // Point sourcemap entries to original disk location (format as URL on Windows)\n    devtoolModuleFilenameTemplate: info => path.relative(paths.appSrc, info.absoluteResourcePath).replace(/\\\\/g, '/')\n  },\n  resolve: {\n    // This allows you to set a fallback for where Webpack should look for modules.\n    // We placed these paths second because we want `node_modules` to \"win\"\n    // if there are any conflicts. This matches Node resolution mechanism.\n    // https://github.com/facebookincubator/create-react-app/issues/253\n    modules: ['node_modules', paths.appNodeModules].concat(\n      // It is guaranteed to exist because we tweak it in `env.js`\n      process.env.NODE_PATH.split(path.delimiter).filter(Boolean)\n    ),\n    // These are the reasonable defaults supported by the Node ecosystem.\n    // We also include JSX as a common component filename extension to support\n    // some tools, although we do not recommend using it, see:\n    // https://github.com/facebookincubator/create-react-app/issues/290\n    // `web` extension prefixes have been added for better support\n    // for React Native Web.\n    extensions: ['.mjs', '.web.ts', '.ts', '.web.tsx', '.tsx', '.web.js', '.js', '.json', '.web.jsx', '.jsx'],\n    alias: {\n      // Support React Native Web\n      // https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/\n      'react-native': 'react-native-web'\n    },\n    plugins: [\n      // Prevents users from importing files from outside of src/ (or node_modules/).\n      // This often causes confusion because we only process files within src/ with babel.\n      // To fix this, we prevent you from importing files out of src/ -- if you'd like to,\n      // please link the files into your node_modules/ and let module-resolution kick in.\n      // Make sure your source files are compiled, as they will not be processed in any way.\n      new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),\n      new TsconfigPathsPlugin({ configFile: paths.appTsConfig })\n    ]\n  },\n  module: {\n    strictExportPresence: true,\n    rules: [\n      // TODO: Disable require.ensure as it's not a standard language feature.\n      // We are waiting for https://github.com/facebookincubator/create-react-app/issues/2176.\n      // { parser: { requireEnsure: false } },\n      {\n        test: /\\.(js|jsx|mjs)$/,\n        loader: require.resolve('source-map-loader'),\n        enforce: 'pre',\n        include: paths.appSrc\n      },\n      {\n        // \"oneOf\" will traverse all following loaders until one will\n        // match the requirements. When no loader matches it will fall\n        // back to the \"file\" loader at the end of the loader list.\n        oneOf: [\n          // \"url\" loader works just like \"file\" loader but it also embeds\n          // assets smaller than specified size as data URLs to avoid requests.\n          {\n            test: [/\\.bmp$/, /\\.gif$/, /\\.jpe?g$/, /\\.png$/],\n            loader: require.resolve('url-loader'),\n            options: {\n              limit: 10000,\n              name: 'static/media/[name].[hash:8].[ext]'\n            }\n          },\n          {\n            test: /\\.(js|jsx|mjs)$/,\n            include: paths.appSrc,\n            loader: require.resolve('babel-loader'),\n            options: {\n              compact: true\n            }\n          },\n          // Compile .tsx?\n          {\n            test: /\\.(ts|tsx)$/,\n            include: paths.appSrc,\n            use: [\n              {\n                loader: require.resolve('ts-loader'),\n                options: {\n                  // disable type checker - we will use it in fork plugin\n                  transpileOnly: true,\n                  configFile: paths.appTsProdConfig\n                }\n              }\n            ]\n          },\n          // The notation here is somewhat confusing.\n          // \"postcss\" loader applies autoprefixer to our CSS.\n          // \"css\" loader resolves paths in CSS and adds assets as dependencies.\n          // \"style\" loader normally turns CSS into JS modules injecting <style>,\n          // but unlike in development configuration, we do something different.\n          // `ExtractTextPlugin` first applies the \"postcss\" and \"css\" loaders\n          // (second argument), then grabs the result CSS and puts it into a\n          // separate file in our build process. This way we actually ship\n          // a single CSS file in production instead of JS code injecting <style>\n          // tags. If you use code splitting, however, any async bundles will still\n          // use the \"style\" loader inside the async code so CSS from them won't be\n          // in the main CSS file.\n          {\n            test: /\\.(scss)$/,\n            exclude: /node_modules/,\n            loader: ExtractTextPlugin.extract(\n              Object.assign({\n                fallback: require.resolve('style-loader'),\n                use: [\n                  {\n                    loader: 'typings-for-css-modules-loader',\n                    options: {\n                      modules: true,\n                      namedExport: true,\n                      camelCase: true,\n                      minimize: true,\n                      localIdentName: '[local]_[hash:base64:5]'\n                    }\n                  },\n                  {\n                    loader: require.resolve('postcss-loader'),\n                    options: {\n                      // Necessary for external CSS imports to work\n                      // https://github.com/facebookincubator/create-react-app/issues/2677\n                      ident: 'postcss',\n                      plugins: () => [\n                        require('postcss-flexbugs-fixes'),\n                        autoprefixer({\n                          browsers: [\n                            '>1%',\n                            'last 4 versions',\n                            'Firefox ESR',\n                            'not ie < 9' // React doesn't support IE8 anyway\n                          ],\n                          flexbox: 'no-2009'\n                        }),\n                        postcssAspectRatioMini({}),\n                        postcssPxToViewport({\n                          viewportWidth: 750, // (Number) The width of the viewport.\n                          viewportHeight: 1334, // (Number) The height of the viewport.\n                          unitPrecision: 3, // (Number) The decimal numbers to allow the REM units to grow to.\n                          viewportUnit: 'vw', // (String) Expected units.\n                          selectorBlackList: ['.ignore', '.hairlines'], // (Array) The selectors to ignore and leave as px.\n                          minPixelValue: 1, // (Number) Set the minimum pixel value to replace.\n                          mediaQuery: false // (Boolean) Allow px to be converted in media queries.\n                        }),\n                        postcssWriteSvg({\n                          utf8: false\n                        }),\n                        postcssCssnext({}),\n                        postcssViewportUnits({}),\n                        cssnano({\n                          preset: 'advanced',\n                          autoprefixer: false,\n                          'postcss-zindex': false\n                        })\n                      ]\n                    }\n                  },\n                  {\n                    loader: require.resolve('sass-loader')\n                  }\n                ]\n              })\n            )\n          },\n          {\n            test: /\\.svg$/,\n            loader: 'svg-inline-loader'\n          },\n          // \"file\" loader makes sure assets end up in the `build` folder.\n          // When you `import` an asset, you get its filename.\n          // This loader doesn't use a \"test\" so it will catch all modules\n          // that fall through the other loaders.\n          {\n            loader: require.resolve('file-loader'),\n            // Exclude `js` files to keep \"css\" loader working as it injects\n            // it's runtime that would otherwise processed through \"file\" loader.\n            // Also exclude `html` and `json` extensions so they get processed\n            // by webpacks internal loaders.\n            exclude: [/\\.(js|jsx|mjs)$/, /\\.html$/, /\\.json$/],\n            options: {\n              name: 'static/media/[name].[hash:8].[ext]'\n            }\n          }\n          // ** STOP ** Are you adding a new loader?\n          // Make sure to add the new loader(s) before the \"file\" loader.\n        ]\n      }\n    ]\n  },\n  plugins: [\n    // Makes some environment variables available in index.html.\n    // The public URL is available as %PUBLIC_URL% in index.html, e.g.:\n    // <link rel=\"shortcut icon\" href=\"%PUBLIC_URL%/favicon.ico\">\n    // In production, it will be an empty string unless you specify \"homepage\"\n    // in `package.json`, in which case it will be the pathname of that URL.\n    new InterpolateHtmlPlugin(env.raw),\n    // Generates an `index.html` file with the <script> injected.\n    new HtmlWebpackPlugin({\n      inject: true,\n      template: paths.appHtml,\n      minify: {\n        removeComments: true,\n        collapseWhitespace: true,\n        removeRedundantAttributes: true,\n        useShortDoctype: true,\n        removeEmptyAttributes: true,\n        removeStyleLinkTypeAttributes: true,\n        keepClosingSlash: true,\n        minifyJS: true,\n        minifyCSS: true,\n        minifyURLs: true\n      }\n    }),\n    // Makes some environment variables available to the JS code, for example:\n    // if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.\n    // It is absolutely essential that NODE_ENV was set to production here.\n    // Otherwise React will be compiled in the very slow development mode.\n    new webpack.DefinePlugin(env.stringified),\n    // Minify the code.\n    new UglifyJsPlugin({\n      uglifyOptions: {\n        parse: {\n          // we want uglify-js to parse ecma 8 code. However we want it to output\n          // ecma 5 compliant code, to avoid issues with older browsers, this is\n          // whey we put `ecma: 5` to the compress and output section\n          // https://github.com/facebook/create-react-app/pull/4234\n          ecma: 8\n        },\n        compress: {\n          ecma: 5,\n          warnings: false,\n          // Disabled because of an issue with Uglify breaking seemingly valid code:\n          // https://github.com/facebook/create-react-app/issues/2376\n          // Pending further investigation:\n          // https://github.com/mishoo/UglifyJS2/issues/2011\n          comparisons: false,\n          drop_console: true\n        },\n        mangle: {\n          safari10: true\n        },\n        output: {\n          ecma: 5,\n          comments: false,\n          // Turned on because emoji and regex is not minified properly using default\n          // https://github.com/facebook/create-react-app/issues/2488\n          ascii_only: true\n        }\n      },\n      // Use multi-process parallel running to improve the build speed\n      // Default number of concurrent runs: os.cpus().length - 1\n      parallel: true,\n      // Enable file caching\n      cache: true,\n      sourceMap: shouldUseSourceMap\n    }), // Note: this won't work without ExtractTextPlugin.extract(..) in `loaders`.\n    new ExtractTextPlugin({\n      filename: cssFilename\n    }),\n    // Generate a manifest file which contains a mapping of all asset filenames\n    // to their corresponding output file so that tools can pick it up without\n    // having to parse `index.html`.\n    new ManifestPlugin({\n      fileName: 'asset-manifest.json'\n    }),\n    // Generate a service worker script that will precache, and keep up to date,\n    // the HTML & assets that are part of the Webpack build.\n    new SWPrecacheWebpackPlugin({\n      // By default, a cache-busting query parameter is appended to requests\n      // used to populate the caches, to ensure the responses are fresh.\n      // If a URL is already hashed by Webpack, then there is no concern\n      // about it being stale, and the cache-busting can be skipped.\n      dontCacheBustUrlsMatching: /\\.\\w{8}\\./,\n      filename: 'service-worker.js',\n      logger(message) {\n        if (message.indexOf('Total precache size is') === 0) {\n          // This message occurs for every build and is a bit too noisy.\n          return\n        }\n        if (message.indexOf('Skipping static resource') === 0) {\n          // This message obscures real errors so we ignore it.\n          // https://github.com/facebookincubator/create-react-app/issues/2612\n          return\n        }\n        console.log(message)\n      },\n      minify: true,\n      // For unknown URLs, fallback to the index page\n      navigateFallback: publicUrl + '/index.html',\n      // Ignores URLs starting from /__ (useful for Firebase):\n      // https://github.com/facebookincubator/create-react-app/issues/2237#issuecomment-302693219\n      navigateFallbackWhitelist: [/^(?!\\/__).*/],\n      // Don't precache sourcemaps (they're large) and build asset manifest:\n      staticFileGlobsIgnorePatterns: [/\\.map$/, /asset-manifest\\.json$/]\n    }),\n    // Moment.js is an extremely popular library that bundles large locale files\n    // by default due to how Webpack interprets its code. This is a practical\n    // solution that requires the user to opt into importing specific locales.\n    // https://github.com/jmblog/how-to-optimize-momentjs-with-webpack\n    // You can remove this if you don't use Moment.js:\n    new webpack.IgnorePlugin(/^\\.\\/locale$/, /moment$/),\n    // Perform type checking and linting in a separate process to speed up compilation\n    new ForkTsCheckerWebpackPlugin({\n      async: false,\n      tsconfig: paths.appTsProdConfig,\n      tslint: paths.appTsLint\n    }),\n    new BundleAnalyzerPlugin()\n  ],\n  // Some libraries import Node modules but don't use them in the browser.\n  // Tell Webpack to provide empty mocks for them so importing them works.\n  node: {\n    dgram: 'empty',\n    fs: 'empty',\n    net: 'empty',\n    tls: 'empty',\n    child_process: 'empty'\n  }\n}\n"
  },
  {
    "path": "config/webpackDevServer.config.js",
    "content": "'use strict';\n\nconst errorOverlayMiddleware = require('react-dev-utils/errorOverlayMiddleware');\nconst noopServiceWorkerMiddleware = require('react-dev-utils/noopServiceWorkerMiddleware');\nconst ignoredFiles = require('react-dev-utils/ignoredFiles');\nconst config = require('./webpack.config.dev');\nconst paths = require('./paths');\n\nconst protocol = process.env.HTTPS === 'true' ? 'https' : 'http';\nconst host = process.env.HOST || '0.0.0.0';\n\nmodule.exports = function(proxy, allowedHost) {\n  return {\n    // WebpackDevServer 2.4.3 introduced a security fix that prevents remote\n    // websites from potentially accessing local content through DNS rebinding:\n    // https://github.com/webpack/webpack-dev-server/issues/887\n    // https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a\n    // However, it made several existing use cases such as development in cloud\n    // environment or subdomains in development significantly more complicated:\n    // https://github.com/facebookincubator/create-react-app/issues/2271\n    // https://github.com/facebookincubator/create-react-app/issues/2233\n    // While we're investigating better solutions, for now we will take a\n    // compromise. Since our WDS configuration only serves files in the `public`\n    // folder we won't consider accessing them a vulnerability. However, if you\n    // use the `proxy` feature, it gets more dangerous because it can expose\n    // remote code execution vulnerabilities in backends like Django and Rails.\n    // So we will disable the host check normally, but enable it if you have\n    // specified the `proxy` setting. Finally, we let you override it if you\n    // really know what you're doing with a special environment variable.\n    disableHostCheck: !proxy ||\n      process.env.DANGEROUSLY_DISABLE_HOST_CHECK === 'true',\n    // Enable gzip compression of generated files.\n    compress: true,\n    // Silence WebpackDevServer's own logs since they're generally not useful.\n    // It will still show compile warnings and errors with this setting.\n    clientLogLevel: 'none',\n    // By default WebpackDevServer serves physical files from current directory\n    // in addition to all the virtual build products that it serves from memory.\n    // This is confusing because those files won’t automatically be available in\n    // production build folder unless we copy them. However, copying the whole\n    // project directory is dangerous because we may expose sensitive files.\n    // Instead, we establish a convention that only files in `public` directory\n    // get served. Our build script will copy `public` into the `build` folder.\n    // In `index.html`, you can get URL of `public` folder with %PUBLIC_URL%:\n    // <link rel=\"shortcut icon\" href=\"%PUBLIC_URL%/favicon.ico\">\n    // In JavaScript code, you can access it with `process.env.PUBLIC_URL`.\n    // Note that we only recommend to use `public` folder as an escape hatch\n    // for files like `favicon.ico`, `manifest.json`, and libraries that are\n    // for some reason broken when imported through Webpack. If you just want to\n    // use an image, put it in `src` and `import` it from JavaScript instead.\n    contentBase: paths.appPublic,\n    // By default files from `contentBase` will not trigger a page reload.\n    watchContentBase: true,\n    // Enable hot reloading server. It will provide /sockjs-node/ endpoint\n    // for the WebpackDevServer client so it can learn when the files were\n    // updated. The WebpackDevServer client is included as an entry point\n    // in the Webpack development configuration. Note that only changes\n    // to CSS are currently hot reloaded. JS changes will refresh the browser.\n    hot: true,\n    // It is important to tell WebpackDevServer to use the same \"root\" path\n    // as we specified in the config. In development, we always serve from /.\n    publicPath: config.output.publicPath,\n    // WebpackDevServer is noisy by default so we emit custom message instead\n    // by listening to the compiler events with `compiler.plugin` calls above.\n    quiet: true,\n    // Reportedly, this avoids CPU overload on some systems.\n    // https://github.com/facebookincubator/create-react-app/issues/293\n    // src/node_modules is not ignored to support absolute imports\n    // https://github.com/facebookincubator/create-react-app/issues/1065\n    watchOptions: {\n      ignored: ignoredFiles(paths.appSrc),\n    },\n    // Enable HTTPS if the HTTPS environment variable is set to 'true'\n    https: protocol === 'https',\n    host: host,\n    overlay: false,\n    historyApiFallback: {\n      // Paths with dots should still use the history fallback.\n      // See https://github.com/facebookincubator/create-react-app/issues/387.\n      disableDotRule: true,\n    },\n    public: allowedHost,\n    proxy,\n    before(app) {\n      // This lets us open files from the runtime error overlay.\n      app.use(errorOverlayMiddleware());\n      // This service worker file is effectively a 'no-op' that will reset any\n      // previous service worker registered for the same host:port combination.\n      // We do this in development to avoid hitting the production cache if\n      // it used the same host and port.\n      // https://github.com/facebookincubator/create-react-app/issues/2272#issuecomment-302832432\n      app.use(noopServiceWorkerMiddleware());\n    },\n  };\n};\n"
  },
  {
    "path": "images.d.ts",
    "content": "declare module '*.svg'\ndeclare module '*.png'\ndeclare module '*.jpg'\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"react-cloud-music\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"proxy\": {\n    \"/api\": {\n      \"target\": \"http://localhost:4000\",\n      \"pathRewrite\": {\n        \"^/api\": \"/\"\n      },\n      \"secure\": false,\n      \"changeOrigin\": false\n    }\n  },\n  \"dependencies\": {\n    \"@types/react-redux\": \"^6.0.2\",\n    \"@types/react-swipe\": \"^5.0.2\",\n    \"autoprefixer\": \"^7.1.6\",\n    \"axios\": \"^0.18.0\",\n    \"babel-eslint\": \"^8.2.3\",\n    \"babel-jest\": \"^22.1.0\",\n    \"babel-loader\": \"^7.1.2\",\n    \"babel-plugin-transform-imports\": \"^1.5.0\",\n    \"babel-preset-react-app\": \"^3.1.1\",\n    \"case-sensitive-paths-webpack-plugin\": \"2.1.1\",\n    \"chalk\": \"1.1.3\",\n    \"classnames\": \"^2.2.5\",\n    \"css-loader\": \"0.28.7\",\n    \"cssnano\": \"^3.10.0\",\n    \"dotenv\": \"4.0.0\",\n    \"dotenv-expand\": \"4.2.0\",\n    \"eslint-plugin-prettier\": \"^2.6.0\",\n    \"event-emitter\": \"^0.3.5\",\n    \"extract-text-webpack-plugin\": \"3.0.2\",\n    \"file-loader\": \"0.11.2\",\n    \"fork-ts-checker-webpack-plugin\": \"^0.2.8\",\n    \"fs-extra\": \"3.0.1\",\n    \"history\": \"^4.7.2\",\n    \"html-webpack-plugin\": \"2.29.0\",\n    \"jest\": \"22.4.2\",\n    \"less\": \"^3.0.4\",\n    \"less-loader\": \"^4.1.0\",\n    \"lodash\": \"^4.17.10\",\n    \"mobx\": \"^4.3.0\",\n    \"mobx-react\": \"^5.1.2\",\n    \"normalizr\": \"^3.2.4\",\n    \"object-assign\": \"4.1.1\",\n    \"path-to-regexp\": \"^2.2.1\",\n    \"postcss-aspect-ratio-mini\": \"0.0.2\",\n    \"postcss-cssnext\": \"^3.1.0\",\n    \"postcss-flexbugs-fixes\": \"3.2.0\",\n    \"postcss-import\": \"^11.1.0\",\n    \"postcss-loader\": \"2.0.8\",\n    \"postcss-px-to-viewport\": \"0.0.3\",\n    \"postcss-url\": \"^7.3.2\",\n    \"postcss-viewport-units\": \"^0.1.4\",\n    \"postcss-write-svg\": \"^3.0.1\",\n    \"prettier\": \"^1.13.5\",\n    \"promise\": \"8.0.1\",\n    \"prop-types\": \"^15.6.1\",\n    \"raf\": \"3.4.0\",\n    \"react\": \"^16.4.2\",\n    \"react-dev-utils\": \"^5.0.1\",\n    \"react-dom\": \"^16.4.2\",\n    \"react-live-route\": \"^1.2.4\",\n    \"react-redux\": \"^5.0.7\",\n    \"react-reviver\": \"^0.1.0\",\n    \"react-router\": \"^4.2.0\",\n    \"react-router-dom\": \"^4.2.2\",\n    \"react-router-transition\": \"^1.2.1\",\n    \"react-slick\": \"^0.23.1\",\n    \"react-svg-inline\": \"^2.1.0\",\n    \"react-swipe\": \"^5.1.1\",\n    \"react-transition-group\": \"^2.3.1\",\n    \"redux\": \"^4.0.0\",\n    \"redux-logger\": \"^3.0.6\",\n    \"redux-promise\": \"^0.6.0\",\n    \"redux-thunk\": \"^2.3.0\",\n    \"resolve\": \"1.6.0\",\n    \"signale\": \"^1.2.1\",\n    \"source-map-loader\": \"^0.2.1\",\n    \"style-loader\": \"0.19.0\",\n    \"sw-precache-webpack-plugin\": \"0.11.4\",\n    \"ts-jest\": \"22.0.1\",\n    \"ts-loader\": \"^2.3.7\",\n    \"tsconfig-paths-webpack-plugin\": \"^2.0.0\",\n    \"tslint\": \"^5.10.0\",\n    \"tslint-config-prettier\": \"^1.13.0\",\n    \"tslint-react\": \"^3.2.0\",\n    \"typings-for-css-modules-loader\": \"^1.7.0\",\n    \"uglifyjs-webpack-plugin\": \"^1.1.8\",\n    \"url-loader\": \"0.6.2\",\n    \"webpack\": \"3.8.1\",\n    \"webpack-bundle-analyzer\": \"^2.13.1\",\n    \"webpack-dev-server\": \"2.9.4\",\n    \"webpack-manifest-plugin\": \"1.3.2\",\n    \"whatwg-fetch\": \"2.0.3\"\n  },\n  \"scripts\": {\n    \"start\": \"node scripts/start.js\",\n    \"build\": \"node scripts/build.js\",\n    \"test\": \"node scripts/test.js --env=jsdom\"\n  },\n  \"devDependencies\": {\n    \"@types/jest\": \"^22.2.3\",\n    \"@types/node\": \"^10.1.0\",\n    \"@types/react\": \"^16.3.14\",\n    \"@types/react-dom\": \"^16.0.5\",\n    \"babel-plugin-import\": \"^1.7.0\",\n    \"eslint\": \"^4.19.1\",\n    \"eslint-config-alloy\": \"^1.4.2\",\n    \"eslint-config-prettier\": \"^2.9.0\",\n    \"eslint-plugin-react\": \"^7.8.2\",\n    \"eslint-plugin-typescript\": \"^0.12.0\",\n    \"node-sass\": \"^4.9.0\",\n    \"sass-loader\": \"^7.0.1\",\n    \"svg-inline-loader\": \"^0.8.0\",\n    \"ts-import-plugin\": \"^1.4.5\",\n    \"tslint-config-alloy\": \"^0.1.0\",\n    \"typescript\": \"^2.8.3\",\n    \"typescript-eslint-parser\": \"^15.0.0\"\n  },\n  \"jest\": {\n    \"collectCoverageFrom\": [\n      \"src/**/*.{js,jsx,ts,tsx}\"\n    ],\n    \"setupFiles\": [\n      \"<rootDir>/config/polyfills.js\"\n    ],\n    \"testMatch\": [\n      \"<rootDir>/src/**/__tests__/**/*.(j|t)s?(x)\",\n      \"<rootDir>/src/**/?(*.)(spec|test).(j|t)s?(x)\"\n    ],\n    \"testEnvironment\": \"node\",\n    \"testURL\": \"http://localhost\",\n    \"transform\": {\n      \"^.+\\\\.(js|jsx|mjs)$\": \"<rootDir>/node_modules/babel-jest\",\n      \"^.+\\\\.tsx?$\": \"<rootDir>/config/jest/typescriptTransform.js\",\n      \"^.+\\\\.css$\": \"<rootDir>/config/jest/cssTransform.js\",\n      \"^(?!.*\\\\.(js|jsx|mjs|css|json)$)\": \"<rootDir>/config/jest/fileTransform.js\"\n    },\n    \"transformIgnorePatterns\": [\n      \"[/\\\\\\\\]node_modules[/\\\\\\\\].+\\\\.(js|jsx|mjs|ts|tsx)$\"\n    ],\n    \"moduleNameMapper\": {\n      \"^react-native$\": \"react-native-web\"\n    },\n    \"moduleFileExtensions\": [\n      \"web.ts\",\n      \"ts\",\n      \"web.tsx\",\n      \"tsx\",\n      \"web.js\",\n      \"js\",\n      \"web.jsx\",\n      \"jsx\",\n      \"json\",\n      \"node\",\n      \"mjs\"\n    ],\n    \"globals\": {\n      \"ts-jest\": {\n        \"tsConfigFile\": \"/Users/wee/Project/react-cloud-music/tsconfig.test.json\"\n      }\n    }\n  },\n  \"babel\": {\n    \"presets\": [\n      \"react-app\"\n    ]\n  },\n  \"eslintConfig\": {\n    \"extends\": \"react-app\"\n  }\n}\n"
  },
  {
    "path": "public/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n  <meta charset=\"utf-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">\n  <meta name=\"theme-color\" content=\"#000000\">\n  <!--\n      manifest.json provides metadata used when your web app is added to the\n      homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/\n    -->\n  <link rel=\"manifest\" href=\"%PUBLIC_URL%/manifest.json\">\n  <link rel=\"shortcut icon\" href=\"https://s1.music.126.net/style/favicon.ico?v20180307\">\n  <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/normalize.css@8.0.0/normalize.min.css\" />\n  <script src=\"//g.alicdn.com/fdilab/lib3rd/viewport-units-buggyfill/0.6.2/??viewport-units-buggyfill.hacks.min.js,viewport-units-buggyfill.min.js\"></script>\n  </style>\n  <script>\n    window.onload = function () {\n      window.viewportUnitsBuggyfill.init({\n        hacks: window.viewportUnitsBuggyfillHacks\n      });\n    }\n  </script>\n  <!--\n      Notice the use of %PUBLIC_URL% in the tags above.\n      It will be replaced with the URL of the `public` folder during the build.\n      Only files inside the `public` folder can be referenced from the HTML.\n\n      Unlike \"/favicon.ico\" or \"favicon.ico\", \"%PUBLIC_URL%/favicon.ico\" will\n      work correctly both with client-side routing and a non-root public URL.\n      Learn how to configure a non-root public URL by running `npm run build`.\n    -->\n  <title>React Cloud Music</title>\n</head>\n\n<body>\n  <noscript>\n    You need to enable JavaScript to run this app.\n  </noscript>\n  <div id=\"root\"></div>\n  <!--\n      This HTML file is a template.\n      If you open it directly in the browser, you will see an empty page.\n\n      You can add webfonts, meta tags, or analytics to this file.\n      The build step will place the bundled scripts into the <body> tag.\n\n      To begin the development, run `npm start` or `yarn start`.\n      To create a production bundle, use `npm run build` or `yarn build`.\n    -->\n</body>\n\n</html>"
  },
  {
    "path": "public/manifest.json",
    "content": "{\n  \"short_name\": \"React App\",\n  \"name\": \"Create React App Sample\",\n  \"icons\": [\n    {\n      \"src\": \"favicon.ico\",\n      \"sizes\": \"64x64 32x32 24x24 16x16\",\n      \"type\": \"image/x-icon\"\n    }\n  ],\n  \"start_url\": \"./index.html\",\n  \"display\": \"standalone\",\n  \"theme_color\": \"#000000\",\n  \"background_color\": \"#ffffff\"\n}\n"
  },
  {
    "path": "scripts/build.js",
    "content": "'use strict';\n\n// Do this as the first thing so that any code reading it knows the right env.\nprocess.env.BABEL_ENV = 'production';\nprocess.env.NODE_ENV = 'production';\n\n// Makes the script crash on unhandled rejections instead of silently\n// ignoring them. In the future, promise rejections that are not handled will\n// terminate the Node.js process with a non-zero exit code.\nprocess.on('unhandledRejection', err => {\n  throw err;\n});\n\n// Ensure environment variables are read.\nrequire('../config/env');\n\nconst path = require('path');\nconst chalk = require('chalk');\nconst fs = require('fs-extra');\nconst webpack = require('webpack');\nconst config = require('../config/webpack.config.prod');\nconst paths = require('../config/paths');\nconst checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');\nconst formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');\nconst printHostingInstructions = require('react-dev-utils/printHostingInstructions');\nconst FileSizeReporter = require('react-dev-utils/FileSizeReporter');\nconst printBuildError = require('react-dev-utils/printBuildError');\n\nconst measureFileSizesBeforeBuild = FileSizeReporter.measureFileSizesBeforeBuild;\nconst printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild;\nconst useYarn = fs.existsSync(paths.yarnLockFile);\n\n// These sizes are pretty large. We'll warn for bundles exceeding them.\nconst WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;\nconst WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;\n\n// Warn and crash if required files are missing\nif (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {\n  process.exit(1);\n}\n\n// First, read the current file sizes in build directory.\n// This lets us display how much they changed later.\nmeasureFileSizesBeforeBuild(paths.appBuild)\n  .then(previousFileSizes => {\n    // Remove all content but keep the directory so that\n    // if you're in it, you don't end up in Trash\n    fs.emptyDirSync(paths.appBuild);\n    // Merge with the public folder\n    copyPublicFolder();\n    // Start the webpack build\n    return build(previousFileSizes);\n  })\n  .then(\n    ({ stats, previousFileSizes, warnings }) => {\n      if (warnings.length) {\n        console.log(chalk.yellow('Compiled with warnings.\\n'));\n        console.log(warnings.join('\\n\\n'));\n        console.log(\n          '\\nSearch for the ' +\n            chalk.underline(chalk.yellow('keywords')) +\n            ' to learn more about each warning.'\n        );\n        console.log(\n          'To ignore, add ' +\n            chalk.cyan('// eslint-disable-next-line') +\n            ' to the line before.\\n'\n        );\n      } else {\n        console.log(chalk.green('Compiled successfully.\\n'));\n      }\n\n      console.log('File sizes after gzip:\\n');\n      printFileSizesAfterBuild(\n        stats,\n        previousFileSizes,\n        paths.appBuild,\n        WARN_AFTER_BUNDLE_GZIP_SIZE,\n        WARN_AFTER_CHUNK_GZIP_SIZE\n      );\n      console.log();\n\n      const appPackage = require(paths.appPackageJson);\n      const publicUrl = paths.publicUrl;\n      const publicPath = config.output.publicPath;\n      const buildFolder = path.relative(process.cwd(), paths.appBuild);\n      printHostingInstructions(\n        appPackage,\n        publicUrl,\n        publicPath,\n        buildFolder,\n        useYarn\n      );\n    },\n    err => {\n      console.log(chalk.red('Failed to compile.\\n'));\n      printBuildError(err);\n      process.exit(1);\n    }\n  );\n\n// Create the production build and print the deployment instructions.\nfunction build(previousFileSizes) {\n  console.log('Creating an optimized production build...');\n\n  let compiler = webpack(config);\n  return new Promise((resolve, reject) => {\n    compiler.run((err, stats) => {\n      if (err) {\n        return reject(err);\n      }\n      const messages = formatWebpackMessages(stats.toJson({}, true));\n      if (messages.errors.length) {\n        // Only keep the first error. Others are often indicative\n        // of the same problem, but confuse the reader with noise.\n        if (messages.errors.length > 1) {\n          messages.errors.length = 1;\n        }\n        return reject(new Error(messages.errors.join('\\n\\n')));\n      }\n      if (\n        process.env.CI &&\n        (typeof process.env.CI !== 'string' ||\n          process.env.CI.toLowerCase() !== 'false') &&\n        messages.warnings.length\n      ) {\n        console.log(\n          chalk.yellow(\n            '\\nTreating warnings as errors because process.env.CI = true.\\n' +\n              'Most CI servers set it automatically.\\n'\n          )\n        );\n        return reject(new Error(messages.warnings.join('\\n\\n')));\n      }\n      return resolve({\n        stats,\n        previousFileSizes,\n        warnings: messages.warnings,\n      });\n    });\n  });\n}\n\nfunction copyPublicFolder() {\n  fs.copySync(paths.appPublic, paths.appBuild, {\n    dereference: true,\n    filter: file => file !== paths.appHtml,\n  });\n}\n"
  },
  {
    "path": "scripts/start.js",
    "content": "'use strict';\n\n// Do this as the first thing so that any code reading it knows the right env.\nprocess.env.BABEL_ENV = 'development';\nprocess.env.NODE_ENV = 'development';\n\n// Makes the script crash on unhandled rejections instead of silently\n// ignoring them. In the future, promise rejections that are not handled will\n// terminate the Node.js process with a non-zero exit code.\nprocess.on('unhandledRejection', err => {\n  throw err;\n});\n\n// Ensure environment variables are read.\nrequire('../config/env');\n\nconst fs = require('fs');\nconst chalk = require('chalk');\nconst webpack = require('webpack');\nconst WebpackDevServer = require('webpack-dev-server');\nconst clearConsole = require('react-dev-utils/clearConsole');\nconst checkRequiredFiles = require('react-dev-utils/checkRequiredFiles');\nconst {\n  choosePort,\n  createCompiler,\n  prepareProxy,\n  prepareUrls,\n} = require('react-dev-utils/WebpackDevServerUtils');\nconst openBrowser = require('react-dev-utils/openBrowser');\nconst paths = require('../config/paths');\nconst config = require('../config/webpack.config.dev');\nconst createDevServerConfig = require('../config/webpackDevServer.config');\n\nconst useYarn = fs.existsSync(paths.yarnLockFile);\nconst isInteractive = process.stdout.isTTY;\n\n// Warn and crash if required files are missing\nif (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) {\n  process.exit(1);\n}\n\n// Tools like Cloud9 rely on this.\nconst DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000;\nconst HOST = process.env.HOST || '0.0.0.0';\n\nif (process.env.HOST) {\n  console.log(\n    chalk.cyan(\n      `Attempting to bind to HOST environment variable: ${chalk.yellow(\n        chalk.bold(process.env.HOST)\n      )}`\n    )\n  );\n  console.log(\n    `If this was unintentional, check that you haven't mistakenly set it in your shell.`\n  );\n  console.log(`Learn more here: ${chalk.yellow('http://bit.ly/2mwWSwH')}`);\n  console.log();\n}\n\n// We attempt to use the default port but if it is busy, we offer the user to\n// run on a different port. `choosePort()` Promise resolves to the next free port.\nchoosePort(HOST, DEFAULT_PORT)\n  .then(port => {\n    if (port == null) {\n      // We have not found a port.\n      return;\n    }\n    const protocol = process.env.HTTPS === 'true' ? 'https' : 'http';\n    const appName = require(paths.appPackageJson).name;\n    const urls = prepareUrls(protocol, HOST, port);\n    // Create a webpack compiler that is configured with custom messages.\n    const compiler = createCompiler(webpack, config, appName, urls, useYarn);\n    // Load proxy config\n    const proxySetting = require(paths.appPackageJson).proxy;\n    const proxyConfig = prepareProxy(proxySetting, paths.appPublic);\n    // Serve webpack assets generated by the compiler over a web sever.\n    const serverConfig = createDevServerConfig(\n      proxyConfig,\n      urls.lanUrlForConfig\n    );\n    const devServer = new WebpackDevServer(compiler, serverConfig);\n    // Launch WebpackDevServer.\n    devServer.listen(port, HOST, err => {\n      if (err) {\n        return console.log(err);\n      }\n      if (isInteractive) {\n        clearConsole();\n      }\n      console.log(chalk.cyan('Starting the development server...\\n'));\n      openBrowser(urls.localUrlForBrowser);\n    });\n\n    ['SIGINT', 'SIGTERM'].forEach(function(sig) {\n      process.on(sig, function() {\n        devServer.close();\n        process.exit();\n      });\n    });\n  })\n  .catch(err => {\n    if (err && err.message) {\n      console.log(err.message);\n    }\n    process.exit(1);\n  });\n"
  },
  {
    "path": "scripts/test.js",
    "content": "'use strict';\n\n// Do this as the first thing so that any code reading it knows the right env.\nprocess.env.BABEL_ENV = 'test';\nprocess.env.NODE_ENV = 'test';\nprocess.env.PUBLIC_URL = '';\n\n// Makes the script crash on unhandled rejections instead of silently\n// ignoring them. In the future, promise rejections that are not handled will\n// terminate the Node.js process with a non-zero exit code.\nprocess.on('unhandledRejection', err => {\n  throw err;\n});\n\n// Ensure environment variables are read.\nrequire('../config/env');\n\nconst jest = require('jest');\nlet argv = process.argv.slice(2);\n\n// Watch unless on CI, in coverage mode, or explicitly running all tests\nif (\n  !process.env.CI &&\n  argv.indexOf('--coverage') === -1 &&\n  argv.indexOf('--watchAll') === -1\n) {\n  argv.push('--watch');\n}\n\n\njest.run(argv);\n"
  },
  {
    "path": "src/App.css.d.ts",
    "content": "export const App: string;\nexport const app: string;\nexport const appLogo: string;\nexport const appLogoSpin: string;\nexport const appHeader: string;\nexport const appTitle: string;\nexport const appIntro: string;\n"
  },
  {
    "path": "src/App.tsx",
    "content": "import * as React from 'react'\nimport Router from '@/router'\n\nclass App extends React.Component {\n  render() {\n    return <Router />\n  }\n}\n\nexport default App\n"
  },
  {
    "path": "src/components/Carousel/index.tsx",
    "content": "export { default } from './view'\n"
  },
  {
    "path": "src/components/Carousel/style.scss",
    "content": ":global {\n  .swipe-wrapper {\n    position: relative;\n  }\n\n  .swipe-item {\n    text-align: center;\n    width: 100%;\n    .swipe-image {\n      width: 100%; // height: 2.2rem;\n    }\n  }\n\n  .swipe-dots {\n    position: absolute;\n    width: 100%;\n    bottom: 0.07rem;\n    text-align: center;\n    .dot {\n      display: inline-block;\n      width: 15px;\n      height: 3px;\n      margin-right: 10px;\n      background: #d6d7d8;\n      &.active {\n        background: #b4282d;\n      }\n    }\n  }\n}\n\n.loading {\n  background-color: #ccc;\n  width: 100%;\n  height: 300px;\n}\n"
  },
  {
    "path": "src/components/Carousel/style.scss.d.ts",
    "content": "export const loading: string;\n"
  },
  {
    "path": "src/components/Carousel/view.tsx",
    "content": "import React from 'react'\nimport ReactSwipe from 'react-swipe'\nimport style from './style.scss'\n\ntype IProps = {}\n\ntype IState = {\n  index: number\n}\n\nexport default class Carousel extends React.Component<IProps, IState> {\n  swipe: ReactSwipe | null = null\n\n  state = {\n    index: 0\n  }\n\n  swipeOpt: SwipeOptions = {\n    auto: 5000,\n    continuous: false,\n    callback: index => {\n      this.setState({\n        index\n      })\n    }\n  }\n\n  dotClass = index => {\n    return this.state.index === index ? 'dot active' : 'dot'\n  }\n\n  handleClickDot = index => {\n    if (this.swipe !== null) {\n      this.swipe.slide(index, 1000)\n    }\n  }\n\n  render() {\n    const children = this.props.children ? this.props.children : <div className={style.loading} />\n    return (\n      <div className=\"swipe-wrapper\">\n        <ReactSwipe\n          key={React.Children.count(this.props.children)}\n          swipeOptions={this.swipeOpt}\n          ref={ref => {\n            this.swipe = ref\n          }}\n        >\n          {children}\n        </ReactSwipe>\n        <div className=\"swipe-dots\">\n          {Array(React.Children.count(this.props.children))\n            .fill('ph')\n            .map((val, index) => (\n              <span onClick={() => this.handleClickDot(index)} key={index} className={this.dotClass(index)} />\n            ))}\n        </div>\n      </div>\n    )\n  }\n}\n"
  },
  {
    "path": "src/components/Cover/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/components/Cover/style.scss",
    "content": ".cover {\n  width: 100%;\n  height: 100%;\n  position: relative;\n  overflow: hidden;\n}\n\n.coverImg {\n  display: block;\n  width: 100%;\n  border-radius: 5px;\n  background-color: #ddd;\n}\n\n.playCountWrapper {\n  position: absolute;\n  font-size: 20px;\n  color: #fff;\n  text-shadow: 2px 1px 1px rgba(0, 0, 0, 0.2);\n  margin: 0;\n  top: 10px;\n  right: 10px;\n}\n\n.playCountIcon {\n  font-size: 18px !important;\n  margin-right: 5px;\n}\n\n.listName {\n  font-size: 24px;\n  color: #333;\n  margin: 10px auto;\n}\n\n.linkWrapper {\n  display: block;\n  width: 100%;\n}\n\n:global {\n  .SVGInline {\n    display: block;\n    border-radius: 5px;\n    background-color: #eee;\n  }\n}\n"
  },
  {
    "path": "src/components/Cover/style.scss.d.ts",
    "content": "export const cover: string;\nexport const coverImg: string;\nexport const playCountWrapper: string;\nexport const playCountIcon: string;\nexport const listName: string;\nexport const linkWrapper: string;\n"
  },
  {
    "path": "src/components/Cover/view.tsx",
    "content": "import React from 'react'\nimport style from './style.scss'\nimport { Link } from 'react-router-dom'\nimport phSVG from './placeholder.svg'\nimport SVGInline from 'react-svg-inline'\nimport { calcPlayCount } from '@/utils/calcFunctions'\nimport cs from 'classnames'\n\ntype IProps = {\n  coverImg: string\n  listName: string\n  path: string\n  playCount?: number\n  id?: string\n}\n\ntype IState = {\n  isLoading: boolean\n}\n\nclass Cover extends React.Component<IProps, IState> {\n  coverImg: HTMLImageElement | null\n  state = {\n    isLoading: true\n  }\n\n  componentDidUpdate() {\n    if (this.state.isLoading === true) {\n      const newImg = new Image()\n      newImg.onload = () => {\n        this.setState({\n          isLoading: false\n        })\n      }\n      if (this.props.coverImg) {\n        newImg.src = this.props.coverImg\n      }\n    }\n  }\n\n  render() {\n    const { coverImg, path, playCount, listName } = this.props\n    const playCountShow = calcPlayCount(playCount)\n    return (\n      <div className={style.cover}>\n        <Link\n          className={style.linkWrapper}\n          to={{\n            pathname: path,\n            state: {\n              picUrl: coverImg,\n              name: listName,\n              playCount\n            }\n          }}\n        >\n          {this.state.isLoading ? (\n            <SVGInline component={'span'} svg={phSVG} />\n          ) : (\n            <img\n              src={coverImg}\n              className={style.coverImg}\n              ref={ref => {\n                this.coverImg = ref\n              }}\n            />\n          )}\n          {coverImg ? (\n            <React.Fragment>\n              <p className={style.listName}>{listName}</p>\n              <div className={style.playCountWrapper}>\n                <i className={cs({ 'iconfont-ncm': true, [style.playCountIcon]: true })}>&#xe645;</i>\n                <span>{playCountShow}</span>\n              </div>\n            </React.Fragment>\n          ) : null}\n        </Link>\n      </div>\n    )\n  }\n}\n\nexport default Cover\n"
  },
  {
    "path": "src/components/Matrix/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/components/Matrix/style.scss",
    "content": ".row{\n  display: flex;\n  justify-content: space-between;\n  margin-bottom: 10px;\n}"
  },
  {
    "path": "src/components/Matrix/style.scss.d.ts",
    "content": "export const row: string;\n"
  },
  {
    "path": "src/components/Matrix/view.tsx",
    "content": "import React, { ReactNode, Children } from 'react'\nimport style from './style.scss'\n\ntype IProps = {\n  cols?: number\n  width: number\n  children: ReactNode[]\n}\n\nconst defaultProps: Partial<IProps> = {\n  cols: 3\n}\n\nconst Matrix: React.SFC<IProps> = ({ children, cols, width }) => {\n  if (!children) {\n    return null\n  }\n\n  const layoutWidth = width ? `${width}%` : `${100 / (cols as number)}%`\n\n  const rows: ReactNode[] = []\n  for (let i = 0; i < children.length; i += cols as number) {\n    const currRow = children.slice(i, i + (cols as number))\n    rows.push(\n      currRow.map((item, index) => {\n        return (\n          <div key={index} style={{ width: layoutWidth }}>\n            {item}\n          </div>\n        )\n      })\n    )\n  }\n  // wrap a col\n  const colElements = rows.map((row, index) => {\n    return (\n      <div className={style.row} key={index}>\n        {row}\n      </div>\n    )\n  })\n\n  return <div>{colElements}</div>\n}\n\nMatrix.defaultProps = defaultProps\n\nexport default Matrix\n"
  },
  {
    "path": "src/components/SectionTitle/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/components/SectionTitle/style.scss",
    "content": ".title{\n  text-align: left;\n  color: #333;\n  margin: 20px 0 20px 10px;\n}"
  },
  {
    "path": "src/components/SectionTitle/style.scss.d.ts",
    "content": "export const title: string;\n"
  },
  {
    "path": "src/components/SectionTitle/view.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\n\nconst SectionTitle: React.SFC = ({ children }) => {\n  return <h3 className={style.title}>{children}</h3>\n}\n\nexport default SectionTitle\n"
  },
  {
    "path": "src/components/Track/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/components/Track/style.scss",
    "content": ".trackWrapper {\n  display: flex;\n  background-color: #fff;\n  color: #333;\n  padding: 0 0 20px 0;\n}\n\n.index {\n  display: flex;\n  justify-content: center;\n  flex-shrink: 0;\n  align-items: center;\n  width: 100px;\n  text-align: center;\n  color: #777;\n}\n\n.info {\n  flex-grow: 1;\n  color: #333;\n  padding: 0 40px 10px 0;\n  border-bottom: 1px solid #ddd;\n  text-align: left;\n}\n\n.songName {\n  margin-bottom: 10px;\n}\n\n.album {\n  font-size: 20px;\n  color: #888;\n}\n\n.bar {\n  padding: 30px 100px;\n  text-align: left;\n  background-color: #fff;\n  border-top-left-radius: 30px;\n  border-top-right-radius: 30px;\n}\n\n.loading {\n  border-top-left-radius: 30px;\n  border-top-right-radius: 30px;\n  height: 1000px;\n  background-color: #fff;\n}\n"
  },
  {
    "path": "src/components/Track/style.scss.d.ts",
    "content": "export const trackWrapper: string;\nexport const index: string;\nexport const info: string;\nexport const songName: string;\nexport const album: string;\nexport const bar: string;\nexport const loading: string;\n"
  },
  {
    "path": "src/components/Track/view.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport { Link } from 'react-router-dom'\n\ntype IArtist = {\n  name: string\n}\n\ntype IAlbum = {\n  name: string\n}\n\ntype ITrackProps = {\n  name: string\n  artists: IArtist[]\n  album: IAlbum\n  index: number\n  id: string\n  play: any\n}\n\nexport default class Track extends React.Component<ITrackProps> {\n  handleClick: React.MouseEventHandler<HTMLLinkElement> = e => {\n    this.props.play()\n  }\n\n  render() {\n    const { name, artists, album, index } = this.props\n    return (\n      <Link to={`/playing/`} className={style.trackWrapper} onClick={this.handleClick}>\n        <div className={style.index}>{index}</div>\n        <div className={style.info}>\n          <div className={style.songName}>{name}</div>\n          <div className={style.album}>\n            {artists[0].name} - {album.name}\n          </div>\n        </div>\n      </Link>\n    )\n  }\n}\n"
  },
  {
    "path": "src/components/TrackList/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/components/TrackList/style.scss",
    "content": ".trackWrapper {\n  display: flex;\n  background-color: #fff;\n  color: #333;\n  padding: 0 0 20px 0;\n}\n\n// bar\n.bar {\n  display: flex;\n  padding: 30px 0;\n  text-align: left;\n  background-color: #fff;\n  border-top-left-radius: 30px;\n  border-top-right-radius: 30px;\n  color: #333;\n  i {\n    margin: 0;\n    width: 100px;\n    text-align: center;\n  }\n}\n\n.playAllIcon {\n  margin-right: 10px;\n}\n\n// list\n.index {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  width: 100px;\n  text-align: center;\n  color: #777;\n}\n\n.info {\n  flex-grow: 1;\n  color: #333;\n  padding-bottom: 10px;\n  border-bottom: 1px solid #ddd;\n  text-align: left;\n}\n\n.album {\n  font-size: 20px;\n  color: #888;\n}\n\n.loading {\n  border-top-left-radius: 30px;\n  border-top-right-radius: 30px;\n  height: 1000px;\n  background-color: #fff;\n}\n"
  },
  {
    "path": "src/components/TrackList/style.scss.d.ts",
    "content": "export const trackWrapper: string;\nexport const bar: string;\nexport const playAllIcon: string;\nexport const index: string;\nexport const info: string;\nexport const album: string;\nexport const loading: string;\n"
  },
  {
    "path": "src/components/TrackList/view.tsx",
    "content": "import * as React from 'react'\nimport { observer } from 'mobx-react'\nimport get from 'lodash/get'\nimport * as style from './style.scss'\nimport Track from '@/components/Track'\nimport cs from 'classnames'\nimport PropTypes from 'prop-types'\nimport { IPlayingSong, playCurrPlaylist } from '../../store'\nimport { Link } from 'react-router-dom'\n\ntype ITrackListProps = {\n  payload: object | null\n}\n\nclass Bar extends React.Component<{ tracksCount: number; tracks: any[] }> {\n  static contextTypes = {\n    store: PropTypes.object\n  }\n\n  generateSongs: () => IPlayingSong[] = () => {\n    return this.props.tracks.map(track => {\n      const song: IPlayingSong = {\n        id: track.id,\n        name: track.name,\n        coverImg: track.album.picUrl,\n        url: '',\n        artists: track.artists.map(artist => artist.name),\n        album: track.album.name\n      }\n      return song\n    })\n  }\n\n  playAllSongs: React.MouseEventHandler<HTMLDivElement> = () => {\n    const songs = this.generateSongs()\n    this.context.store.dispatch(playCurrPlaylist(songs))\n  }\n\n  render() {\n    return (\n      <Link to={`/playing/`}>\n        <div className={style.bar} onClick={this.playAllSongs}>\n          <i className={cs({ 'iconfont-ncm': true, [style.playAllIcon]: true })}>&#xe641;</i>\n          {`播放全部（共${this.props.tracksCount}首）`}\n        </div>\n      </Link>\n    )\n  }\n}\n\n@observer\nexport default class TrackList extends React.Component<ITrackListProps> {\n  static contextTypes = {\n    store: PropTypes.object\n  }\n\n  generateSongs: () => IPlayingSong[] = () => {\n    console.log(this.props.payload)\n    return get(this.props.payload, 'playlist.tracks').map(track => {\n      const song: IPlayingSong = {\n        id: track.id,\n        name: track.name,\n        coverImg: track.al.picUrl,\n        url: '',\n        artists: track.ar.map(artist => artist.name),\n        album: track.al.name\n      }\n      return song\n    })\n  }\n\n  // tslint:disable-next-line:member-ordering\n  getNormalizedSongs = (() => {\n    let songs\n    return () => {\n      if (!songs) {\n        songs = this.generateSongs()\n      }\n      return songs\n    }\n  })()\n\n  playCertainSong = index => {\n    return () => {\n      this.context.store.dispatch(playCurrPlaylist(this.getNormalizedSongs(), index))\n    }\n  }\n\n  calcTracks = store => {\n    const tracks = get(store, 'playlist.tracks')\n    if (!tracks) {\n      return null\n    } else {\n      return tracks.map((item, index) => {\n        return (\n          <Track\n            key={item.id}\n            name={item.name}\n            artists={item.ar}\n            album={item.al}\n            index={index + 1}\n            id={item.id}\n            play={this.playCertainSong(index)}\n          />\n        )\n      })\n    }\n  }\n\n  render() {\n    const tracks = this.calcTracks(this.props.payload)\n    return (\n      <div>\n        {tracks ? (\n          <React.Fragment>\n            <Bar tracksCount={tracks.length} tracks={get(this.props.payload, 'playlist.tracks')} />\n            <div>{tracks}</div>\n          </React.Fragment>\n        ) : (\n          <div className={style.loading} />\n        )}\n      </div>\n    )\n  }\n}\n"
  },
  {
    "path": "src/constant/api.tsx",
    "content": "import { compile } from 'path-to-regexp'\n\ntype IPath = {\n  path: string\n}\n\ntype IApi =\n  | string\n  | {\n      path: string\n    }\n\ntype Iapis = {\n  banner: IApi\n  recommendList: IApi\n  recommendSong: IApi\n  songDetail: IApi\n  playlist: IApi\n  songUrl: IApi\n  songUrlBackUp: IApi\n  list: IApi\n}\n\nconst PROXY_HOST = process.env.NODE_ENV === 'production' ? 'http://118.24.21.99:4001' : '/api'\n\nconst NETEASE_API: Iapis = {\n  banner: '/banner', // 轮播图\n  recommendList: '/personalized', // 推荐歌单\n  recommendSong: '/personalized/newsong', // 推荐歌曲\n  // 歌单详情\n  playlist: {\n    path: '/playlist/detail?id=:id'\n  },\n  // 歌曲URL\n  songUrl: {\n    path: '/music/url?id=:ids'\n  },\n  // 歌曲详情\n  songDetail: {\n    path: '/song/detail?ids=:ids'\n  },\n  // 歌曲 URL 备胎\n  songUrlBackUp: {\n    path: 'http://music.163.com/song/media/outer/url?id=:id.mp3'\n  },\n  // 排行榜\n  list: {\n    path: '/top/list?idx=:idx'\n  }\n}\n\n// 给 URL 添加 hostPath\nconst addHost = (URL, hostPath) => {\n  return hostPath + URL\n}\n\nexport default NETEASE_API\n\n// 根据 API 和 params 来 compose URL\nexport const getURL = (API: IApi, params?) => {\n  // simple API\n  if (!params) {\n    return addHost(API, PROXY_HOST)\n  }\n  // complex API\n  const toPath = compile(`${(API as IPath).path}`)\n  const urlWithoutHost = toPath(params)\n  return addHost(urlWithoutHost, PROXY_HOST)\n}\n"
  },
  {
    "path": "src/constant/style.scss",
    "content": "$ncmRed: #e24e48; // netease cloud music red\n$headerBarHeight: 100px;\n$bottomBarHeight: 100px;\n\n@font-face {\n  font-family: 'iconfont-cloud-music'; /* project id 669459 */\n  src: url('//at.alicdn.com/t/font_669459_rskbi91kov.eot');\n  src: url('//at.alicdn.com/t/font_669459_rskbi91kov.eot?#iefix') format('embedded-opentype'),\n    url('//at.alicdn.com/t/font_669459_rskbi91kov.woff') format('woff'),\n    url('//at.alicdn.com/t/font_669459_rskbi91kov.ttf') format('truetype'),\n    url('//at.alicdn.com/t/font_669459_rskbi91kov.svg#iconfont-cloud-music') format('svg');\n}\n\n$base-font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB',\n  STHeiti, 'Microsoft YaHei', 'Microsoft JhengHei', 'Source Han Sans SC', 'Noto Sans CJK SC', 'Source Han Sans CN',\n  'Noto Sans SC', 'Source Han Sans TC', 'Noto Sans CJK TC', 'WenQuanYi Micro Hei', SimSun, sans-serif;\n\n:global {\n  html,\n  body,\n  #root {\n    -webkit-overflow-scrolling: touch;\n    position: relative;\n    height: 100%;\n    overflow: hidden;\n    font-family: $base-font-family;\n    outline: 0;\n    -webkit-text-size-adjust: none;\n    -webkit-tap-highlight-color: transparent;\n  }\n  a {\n    color: #fff;\n    text-decoration: none;\n  }\n  img {\n    content: normal !important;\n  }\n\n  .iconfont-ncm {\n    font-family: 'iconfont-cloud-music' !important;\n    font-size: 1rem;\n    font-style: normal;\n    -webkit-font-smoothing: antialiased;\n    -moz-osx-font-smoothing: grayscale;\n  }\n}\n\n@function height-by-width($width) {\n  @return (750 / 1334 * $width) * 1px;\n}\n"
  },
  {
    "path": "src/index.css",
    "content": ""
  },
  {
    "path": "src/index.css.d.ts",
    "content": "export {};\n"
  },
  {
    "path": "src/index.tsx",
    "content": "import * as React from 'react'\nimport * as ReactDOM from 'react-dom'\nimport App from './App'\nimport registerServiceWorker from './registerServiceWorker'\nimport { Provider } from 'react-redux'\nimport { createStore, applyMiddleware } from 'redux'\nimport { reducers, defaultState } from './store'\nimport promiseMiddleware from 'redux-promise'\nimport thunkMiddleware from 'redux-thunk'\n\nconst middlewares = [thunkMiddleware, promiseMiddleware]\nif (process.env.NODE_ENV === `development`) {\n  const { logger } = require(`redux-logger`)\n  middlewares.push(logger)\n}\n\nconst store = createStore(reducers, defaultState as object, applyMiddleware(...middlewares))\n\nReactDOM.render(\n  <Provider store={store}>\n    <App />\n  </Provider>,\n  document.getElementById('root') as HTMLElement\n)\nregisterServiceWorker()\n"
  },
  {
    "path": "src/layouts/BottomBar/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/layouts/BottomBar/style.scss",
    "content": "@import '@/constant/style.scss';\n\n.bottomBar {\n  position: absolute;\n  left: 0;\n  right: 0;\n  height: 44px;\n  bottom: 0;\n  display: flex;\n  bottom: 0;\n  box-sizing: border-box;\n  justify-content: space-between;\n  align-items: center;\n  width: 100%;\n  height: $bottomBarHeight;\n  margin: 0;\n  padding: 10px;\n  list-style-type: none;\n  background-color: #ececec;\n  border-top: 1px solid #eee;\n  bottom: 0;\n\n  li {\n    width: 20%;\n    text-align: center;\n  }\n\n  a {\n    color: #555;\n    display: flex;\n    flex-direction: column;\n  }\n\n  .icon {\n    font-size: 35px;\n    font-weight: bold;\n    margin: 0 0 10px 0;\n  }\n\n  .netease {\n    font-weight: lighter;\n  }\n}\n\n.title {\n  font-size: 13px;\n}\n\n.activeLink {\n  color: $ncmRed;\n}\n"
  },
  {
    "path": "src/layouts/BottomBar/style.scss.d.ts",
    "content": "export const bottomBar: string;\nexport const icon: string;\nexport const netease: string;\nexport const title: string;\nexport const activeLink: string;\n"
  },
  {
    "path": "src/layouts/BottomBar/view.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport { Link, withRouter } from 'react-router-dom'\nimport cs from 'classnames'\n\nclass BottomBar extends React.Component {\n  render() {\n    const linkData = [\n      {\n        router: 'explore',\n        name: '发现',\n        icon: '\\ue67c', // TODO: 不能直接写 &#xe67c;\n        styleName: 'netease'\n      },\n      {\n        router: 'video',\n        name: '视频',\n        icon: '\\ue61c'\n      },\n      {\n        router: 'mine',\n        name: '我的',\n        icon: '\\ue680'\n      },\n      {\n        router: 'friends',\n        name: '朋友',\n        icon: '\\ue60b'\n      },\n      {\n        router: 'account',\n        name: '账号',\n        icon: '\\ue63b'\n      }\n    ]\n\n    return (\n      <ul className={style.bottomBar}>\n        {linkData.map((item, index) => {\n          let computedClassName = { 'iconfont-ncm': true, [style.icon]: true }\n          if (typeof item.styleName === 'string') {\n            computedClassName = { ...computedClassName, [style[item.styleName]]: true }\n          }\n\n          return (\n            <li key={index} style={{}}>\n              <Link to={`/${item.router}`}>\n                <i className={cs(computedClassName)}>{item.icon}</i>\n                <div className={style.title}>{item.name}</div>\n              </Link>\n            </li>\n          )\n        })}\n      </ul>\n    )\n  }\n}\n\nexport default withRouter(BottomBar)\n"
  },
  {
    "path": "src/layouts/ExploreHeaderBar/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/layouts/ExploreHeaderBar/style.scss",
    "content": "@import '@/constant/style.scss';\n\n.headerBar {\n  height: 170px;\n}\n\n.wrapper {\n  position: relative;\n  background-color: $ncmRed;\n  margin: 10px 0 0 0;\n}\n\n.slideNav {\n  display: flex;\n  position: relative;\n  padding: 0 0 10px 0;\n  list-style-type: none;\n  justify-content: center;\n  a {\n    width: 250px;\n    padding: 10px 0;\n    text-align: center;\n  }\n}\n\n.slider {\n  transition: all ease 0.4s;\n  position: absolute;\n  bottom: 0px;\n  width: 100px;\n  left: 0;\n  height: 6px;\n  background-color: #fff;\n  border-radius: 3px;\n}\n\n.index0 {\n  transform: translate(190px, 0);\n}\n\n.index1 {\n  transform: translate(480px, 0);\n}\n\n.back {\n  display: block;\n  height: $headerBarHeight;\n  color: rgba(255, 255, 255, 0.7);\n  line-height: $headerBarHeight;\n  font-weight: bolder;\n  padding-left: 30px;\n  i {\n    font-size: 40px;\n  }\n}\n"
  },
  {
    "path": "src/layouts/ExploreHeaderBar/style.scss.d.ts",
    "content": "export const headerBar: string;\nexport const wrapper: string;\nexport const slideNav: string;\nexport const slider: string;\nexport const index0: string;\nexport const index1: string;\nexport const back: string;\n"
  },
  {
    "path": "src/layouts/ExploreHeaderBar/view.tsx",
    "content": "import * as React from 'react'\nimport BaseHeaderBar from '@/layouts/HeaderBar'\nimport * as style from '@/layouts/ExploreHeaderBar/style.scss'\nimport { Link } from 'react-router-dom'\nimport cs from 'classnames'\nimport { SlideContext } from '@/router/slideContext'\n\ntype IState = {\n  isGoingToStick: boolean\n  prevPos: number\n  isMounting: boolean\n  pageIndex: number\n}\n\ntype IProps = {\n  component: any\n  style: any\n  pos: number\n  pageIndex: number\n  setPageIndex: any\n}\n\nclass SlideNav extends React.Component<IProps, IState> {\n  static defaultProps = {\n    pageIndex: 0\n  }\n\n  INDEX0_POS_X = window.screen.width * (200 / 750)\n  INDEX1_POS_X = window.screen.width * (450 / 750)\n\n  state = {\n    prevPos: 0,\n    isGoingToStick: true,\n    isMounting: true,\n    pageIndex: this.props.pageIndex\n  }\n\n  static getDerivedStateFromProps(nextProps, prevState) {\n    return {\n      isGoingToStick: nextProps.pos === prevState.prevPos,\n      pageIndex: nextProps.pageIndex,\n      prevPos: nextProps.pos\n    }\n  }\n\n  componentDidMount() {\n    this.setState({\n      isMounting: false\n    })\n  }\n\n  calcPosByPercent: (disXPercent: number) => number = disXPercent => {\n    const disX = disXPercent * (this.INDEX1_POS_X - this.INDEX0_POS_X) + this[`INDEX${this.state.pageIndex}_POS_X`]\n    return disX\n  }\n\n  changePage = clickedPageIndex => {\n    this.props.setPageIndex(clickedPageIndex)\n  }\n\n  render() {\n    let disX = this.calcPosByPercent(this.props.pos)\n    if (this.state.isGoingToStick || this.state.isMounting) {\n      disX = this[`INDEX${this.state.pageIndex}_POS_X`]\n    }\n    return (\n      <div className={style.wrapper}>\n        <div className={style.slideNav}>\n          <Link to=\"/explore/custom\" onClick={() => this.changePage(0)}>\n            个性推荐\n          </Link>\n          <Link to=\"/explore/rank\" onClick={() => this.changePage(1)}>\n            排行榜\n          </Link>\n        </div>\n        <div\n          style={{\n            transform: `translate3d(${disX}px, 0, 0)`\n          }}\n          className={cs({\n            [style.slider]: true\n          })}\n        />\n      </div>\n    )\n  }\n}\n\nexport default () => {\n  return (\n    <SlideContext.Consumer>\n      {({ pos, pageIndex, setPageIndex }) => (\n        <BaseHeaderBar\n          component={SlideNav}\n          style={style.headerBar}\n          pos={pos}\n          pageIndex={pageIndex}\n          setPageIndex={setPageIndex}\n        />\n      )}\n    </SlideContext.Consumer>\n  )\n}\n"
  },
  {
    "path": "src/layouts/GithubFork/index.tsx",
    "content": "import React from 'react'\n\nexport default () => {\n  return (\n    <a href=\"https://github.com/fi3ework/react-cloud-music\" target=\"_blank\">\n      <img\n        style={{ position: 'absolute', top: '47.5px', left: 0, border: 0 }}\n        src=\"https://s3.amazonaws.com/github/ribbons/forkme_left_red_aa0000.png\"\n        alt=\"Fork me on GitHub\"\n      />\n    </a>\n  )\n}\n"
  },
  {
    "path": "src/layouts/HeaderBar/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/layouts/HeaderBar/style.scss",
    "content": "@import '@/constant/style.scss';\n\n.headerBar {\n  position: absolute;\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  top: 0;\n  left: 0;\n  right: 0;\n  z-index: 99;\n  width: 100%;\n  height: $headerBarHeight - 5px;\n  background-color: $ncmRed;\n  overflow: hidden;\n}\n\n.playingLink {\n  position: absolute;\n  right: 20px;\n  i {\n    font-size: 50px;\n  }\n}\n\n.search {\n  &::placeholder {\n    color: rgba($color: #fff, $alpha: 0.5);\n  }\n  display: block;\n  font-size: 30px;\n  line-height: 50px;\n  height: 45px;\n  width: 70%;\n  margin: 0 auto;\n  padding-left: 30px;\n  color: #eee;\n  background-color: rgba($color: #eee, $alpha: 0.3);\n  border: 1px solid $ncmRed;\n  border-radius: 100px;\n  outline: none;\n}\n"
  },
  {
    "path": "src/layouts/HeaderBar/style.scss.d.ts",
    "content": "export const headerBar: string;\nexport const playingLink: string;\nexport const search: string;\n"
  },
  {
    "path": "src/layouts/HeaderBar/view.tsx",
    "content": "import React, { ReactNode } from 'react'\nimport style from '@/layouts/HeaderBar/style.scss'\nimport { Link } from 'react-router-dom'\nimport cs from 'classnames'\n\ntype IProps = {\n  style?: any\n  render?: (props) => ReactNode\n  component?: React.ComponentClass\n  pos?: number\n  pageIndex?: number\n  setPageIndex?: any\n}\n\nconst HeaderBar: React.SFC<IProps> = props => {\n  let children\n  const { component, render } = props\n  if (component) {\n    children = React.createElement(component, props)\n  } else if (render) {\n    children = render(props)\n  }\n\n  return (\n    <nav\n      className={cs({\n        [style.headerBar]: true,\n        [props.style]: true\n      })}\n    >\n      <div>\n        <Link className={style.playingLink} to=\"/playing\">\n          <i className={'iconfont-ncm'}>&#xe6cf;</i>\n        </Link>\n        <input className={style.search} placeholder=\"Music on. World off.\" type=\"text\" />\n      </div>\n      {children}\n    </nav>\n  )\n}\n\nexport default HeaderBar\n"
  },
  {
    "path": "src/pages/Account/index.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport Fork from '@/layouts/GithubFork'\n\ninterface IProps {\n  style: React.CSSProperties\n}\n\nclass App extends React.Component<IProps> {\n  render() {\n    return (\n      <div className={style.wrapper}>\n        <a href=\"https://github.com/fi3ework/react-cloud-music\" target=\"_blank\">\n          <Fork />\n        </a>\n        <h1>👤 account page</h1>\n      </div>\n    )\n  }\n}\n\nexport default App\n"
  },
  {
    "path": "src/pages/Account/style.scss",
    "content": "@import '@/constant/style.scss';\n\n.wrapper {\n  text-align: center;\n  height: 100vh;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  background-color: mintcream;\n  overflow: hidden;\n  color: #333;\n}\n"
  },
  {
    "path": "src/pages/Account/style.scss.d.ts",
    "content": "export const wrapper: string;\n"
  },
  {
    "path": "src/pages/Explore/Banner/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/pages/Explore/Banner/style.scss",
    "content": "\n.slideItem{\n  background-color: #ccc;\n}\n\n.slideImg{\n  width: 100%;\n  display: block;\n}\n\n"
  },
  {
    "path": "src/pages/Explore/Banner/style.scss.d.ts",
    "content": "export const slideItem: string;\nexport const slideImg: string;\n"
  },
  {
    "path": "src/pages/Explore/Banner/view.tsx",
    "content": "import Carousel from '@/components/Carousel'\nimport * as React from 'react'\nimport * as style from './style.scss'\nimport { observer } from 'mobx-react'\nimport Store from '@/utils/models/componentFetchModel'\nimport get from 'lodash/get'\n\ntype IBannerItem = {\n  url: string\n  picUrl: string\n}\n\nexport type IBannerPayload = {\n  code: number\n  banners: IBannerItem[]\n}\n\ntype IProps = {\n  store: Store\n}\n\ntype IState = {\n  isImgsLoaded: boolean\n}\n\n@observer\nclass Banner extends React.Component<IProps, any> {\n  state = {\n    isInited: false,\n    isImgsLoaded: false\n  }\n\n  componentDidMount() {\n    this.isImgsLoadComplete(get(this.props, 'store.payload.banners'))\n  }\n\n  componentDidUpdate(prevProps, prevState) {\n    if (!this.state.isInited) {\n      this.isImgsLoadComplete(get(this.props, 'store.payload.banners'))\n    }\n  }\n\n  isImgsLoadComplete = urls => {\n    const length = get(urls, 'length')\n    if (!length) {\n      return\n    }\n\n    const totalImgCount = length\n    let loadedImgCount = 0\n    urls.forEach(img => {\n      const testImg = new Image()\n      testImg.src = img.picUrl\n      testImg.onload = () => {\n        loadedImgCount++\n        if (loadedImgCount === totalImgCount) {\n          this.setState({\n            isImgsLoaded: true,\n            isInited: true\n          })\n        }\n      }\n    })\n  }\n\n  render() {\n    const payload = this.props.store.payload as IBannerPayload\n    return (\n      <Carousel>\n        {payload && this.state.isImgsLoaded\n          ? payload.banners.map(banner => {\n              return (\n                <div key={banner.url} className={style.slideItem}>\n                  <img className={style.slideImg} src={banner.picUrl} />\n                </div>\n              )\n            })\n          : null}\n      </Carousel>\n    )\n  }\n}\n\nexport default Banner\n"
  },
  {
    "path": "src/pages/Explore/Custom.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport { ComponentFetchModel } from '@/utils/models'\nimport RecommendList from './RecommendList'\nimport Banner from './Banner'\nimport NETEASE_API, { getURL } from '../../constant/api'\n\nconst bannerStore: ComponentFetchModel = new ComponentFetchModel({ URL: getURL(NETEASE_API.banner) })\nconst listStore: ComponentFetchModel = new ComponentFetchModel({ URL: getURL(NETEASE_API.recommendList) })\nconst songStore: ComponentFetchModel = new ComponentFetchModel({ URL: getURL(NETEASE_API.recommendSong) })\n\nconst listNormalizer = result =>\n  result.map(item => ({\n    id: item.id,\n    picUrl: item.picUrl,\n    playCount: item.playCount,\n    name: item.name,\n    path: `/playlist/${item.id}`\n  }))\n\nconst songNormalizer = result =>\n  result.map(item => ({\n    id: item.song.id,\n    picUrl: item.song.album.picUrl,\n    playCount: null,\n    name: item.name,\n    path: `/playlist/${item.id}`\n  }))\n\nexport default class Custom extends React.Component<any> {\n  banner: HTMLDivElement | null\n  componentDidMount() {\n    if (this.banner) {\n      this.banner.addEventListener('touchmove', e => {\n        e.stopPropagation()\n      })\n    }\n\n    bannerStore.fetchData()\n    listStore.fetchData()\n    songStore.fetchData()\n  }\n\n  render() {\n    return (\n      <div className={style.custom}>\n        <div className={style.redBg} />\n        <div\n          className={style.banners}\n          ref={ref => {\n            this.banner = ref\n          }}\n        >\n          <Banner store={bannerStore} />\n        </div>\n        <RecommendList store={listStore} normalizer={listNormalizer} title=\"推荐歌单\" />\n        <RecommendList store={songStore} normalizer={songNormalizer} title=\"最新音乐\" />\n      </div>\n    )\n  }\n}\n"
  },
  {
    "path": "src/pages/Explore/List.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport ListCover from './ListCover'\n\nconst listIndexes: number[] = Array(23)\n  .fill(0)\n  .map((item, index) => index)\n\nexport default class List extends React.Component<any, any> {\n  render() {\n    return (\n      <div className={style.lists}>\n        {listIndexes.map(itemIndex => {\n          return <ListCover key={itemIndex} listIndex={itemIndex} />\n        })}\n      </div>\n    )\n  }\n}\n"
  },
  {
    "path": "src/pages/Explore/ListCover/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/pages/Explore/ListCover/style.scss",
    "content": ".coverImg {\n  width: 200px;\n  height: 200px;\n  border-radius: 10px;\n  margin-right: 30px;\n}\n\n.wrapper {\n  display: flex;\n  padding: 10px 30px;\n  border-bottom: 1px solid #eee;\n  box-sizing: border-box;\n}\n\n.previews {\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: flex-start;\n  padding: 40px 0;\n  font-size: 30px;\n  line-height: 40px;\n  color: #555;\n}\n"
  },
  {
    "path": "src/pages/Explore/ListCover/style.scss.d.ts",
    "content": "export const coverImg: string;\nexport const wrapper: string;\nexport const previews: string;\n"
  },
  {
    "path": "src/pages/Explore/ListCover/view.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport { observer } from 'mobx-react'\nimport { ComponentFetchModel } from '@/utils/models'\nimport NETEASE_API, { getURL } from '@/constant/api'\nimport get from 'lodash/get'\nimport { Link } from 'react-router-dom'\n\ntype IProps = {\n  store?: any\n  listIndex: number\n}\n\ntype IState = {\n  store: any\n}\n\n@observer\nexport default class Custom extends React.Component<IProps, IState> {\n  store: any = new ComponentFetchModel({ URL: getURL(NETEASE_API.list, { idx: this.props.listIndex }) })\n\n  componentDidMount() {\n    this.store.fetchData()\n  }\n\n  render() {\n    const coverImgUrl = get(this.store, 'payload.playlist.coverImgUrl')\n    const previewItems = get(this.store, 'payload.playlist.tracks')\n    const name = get(this.store, 'payload.playlist.name')\n    const playCount = get(this.store, 'payload.playlist.playCount')\n    const path = `/playlist/${get(this.store, 'payload.playlist.id')}`\n    return (\n      <Link\n        className={style.wrapper}\n        to={{\n          pathname: path,\n          state: {\n            picUrl: coverImgUrl,\n            name: name,\n            playCount\n          }\n        }}\n      >\n        <img className={style.coverImg} src={coverImgUrl} />\n        <div className={style.previews}>\n          {previewItems &&\n            previewItems.splice(0, 3).map((track, index) => (\n              <div key={index}>\n                {index + 1}. {track.name}\n              </div>\n            ))}\n        </div>\n      </Link>\n    )\n  }\n}\n"
  },
  {
    "path": "src/pages/Explore/RecommendList/index.tsx",
    "content": "export { default } from './view'"
  },
  {
    "path": "src/pages/Explore/RecommendList/style.scss",
    "content": ".recommendList{\n  margin: 10px 10px 50px 10px;\n}"
  },
  {
    "path": "src/pages/Explore/RecommendList/style.scss.d.ts",
    "content": "export const recommendList: string;\n"
  },
  {
    "path": "src/pages/Explore/RecommendList/view.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport { observer } from 'mobx-react'\nimport Matrix from '@/components/Matrix'\nimport Cover from '@/components/Cover'\nimport SectionTitle from '@/components/SectionTitle'\nimport Store from '@/utils/models/componentFetchModel'\n\ntype IProps = {\n  store: Store\n  normalizer: (result: object) => any[]\n  title: string\n}\n\nexport type IRecommendListPayload = {\n  code: number\n  result: object\n}\n\nconst RecommendList: React.SFC<IProps> = ({ store, normalizer, title }) => {\n  const payload = store.payload as IRecommendListPayload\n  const lists = payload\n    ? normalizer(payload.result)\n    : Array(6)\n        .fill({ key: '', coverImg: null, link: '' })\n        .map((item, index) => ({ ...item, key: index }))\n\n  return (\n    <div className={style.recommendList}>\n      <SectionTitle>{title}</SectionTitle>\n      <Matrix width={33}>\n        {lists.slice(0, 6).map((list, index) => {\n          return (\n            <Cover\n              key={index}\n              coverImg={list.picUrl}\n              playCount={list.playCount}\n              path={list.path}\n              listName={list.name}\n              id={list.id}\n            >\n              {list.id}\n            </Cover>\n          )\n        })}\n      </Matrix>\n    </div>\n  )\n}\n\nexport default observer(RecommendList)\n"
  },
  {
    "path": "src/pages/Explore/Slider.tsx",
    "content": "import * as React from 'react'\nimport * as cs from 'classnames'\nimport * as style from '@/pages/Explore/style.scss'\n\ninterface IProps {\n  location: { pathname: string }\n  history: any\n  style?: React.CSSProperties\n  setRankLoaded: (isLoaded: boolean) => void\n  changePos: (pos: number) => void\n  setPageIndex: (index: number) => void\n  pageIndex: number\n}\n\nclass Slider extends React.Component<IProps> {\n  pageWrapper: HTMLElement | null\n\n  state = {\n    touchStartPos: { x: 0, y: 0 },\n    prevOffsetX: 0,\n    swipedDisX: 0,\n    isVerticalScrolling: null,\n    isTransitioning: false\n  }\n\n  SWIPE_DIS_THRESH = 80 // 触发翻页生效的最小滑动距离\n  PAGE_WIDTH = window.screen.width // 一页的宽度（屏幕宽度）\n  PAGE_NUMBER = 2 // 页数\n  pageState = {\n    DO_NOT_CHANGE: -1 // flag\n  }\n\n  componentDidMount() {\n    if (this.pageWrapper) {\n      this.pageWrapper.addEventListener('touchstart', this.handleTouchStart)\n      this.pageWrapper.addEventListener('touchmove', this.handleTouchMove)\n      this.pageWrapper.addEventListener('touchend', this.handleTouchEnd)\n    }\n  }\n\n  componentDidUpdate(prevProps, prevState) {\n    if (this.props.pageIndex === this.pageState.DO_NOT_CHANGE) {\n      return\n    }\n\n    if (this.props.pageIndex !== prevProps.pageIndex) {\n      this.forceStickScroll(this.props.pageIndex)\n    }\n  }\n\n  changeRouter = pathName => {\n    this.props.history.push(`/explore/${pathName}`)\n    if (pathName.includes(`rank`)) {\n      this.setState({\n        hasRankLoaded: true\n      })\n      this.props.setRankLoaded(true)\n    }\n  }\n\n  forceStickScroll = pageIndex => {\n    const offset = pageIndex === 1 ? -this.PAGE_WIDTH : 0\n    this.setState({\n      prevOffsetX: offset,\n      swipedDisX: 0,\n      isTransitioning: true\n    })\n  }\n\n  stickScroll = () => {\n    if (this.pageWrapper) {\n      this.pageWrapper.addEventListener('transitionend', () => {\n        this.setState({\n          isTransitioning: false\n        })\n      })\n    }\n\n    const swipedDisX = this.state.swipedDisX\n\n    // 左滑切换到右侧页\n    if (swipedDisX < -this.SWIPE_DIS_THRESH) {\n      const nextPage = this.props.pageIndex + 1\n      this.setState({\n        prevOffsetX: -nextPage * this.PAGE_WIDTH,\n        swipedDisX: 0,\n        isTransitioning: true\n      })\n      this.changeRouter('rank')\n      return nextPage\n    }\n\n    // 右滑切换到左侧页\n    if (swipedDisX > this.SWIPE_DIS_THRESH) {\n      const nextPage = this.props.pageIndex - 1\n      this.setState({\n        prevOffsetX: -nextPage * this.PAGE_WIDTH,\n        swipedDisX: 0,\n        isTransitioning: true\n      })\n      this.changeRouter('custom')\n      return nextPage\n    }\n\n    // 不足以切换页回到原页\n    this.setState({\n      prevOffsetX: -this.props.pageIndex * this.PAGE_WIDTH,\n      swipedDisX: 0,\n      isTransitioning: true\n    })\n    return this.props.pageIndex\n  }\n\n  handleTouchStart = e => {\n    console.log('===== start moving =====')\n    if (e.touches.length === 1) {\n      this.setState({\n        prevOffsetX: this.state.prevOffsetX + this.state.swipedDisX,\n        touchStartPos: { x: e.touches[0].screenX, y: e.touches[0].screenY },\n        swipedDisX: 0\n      })\n    }\n  }\n\n  handleTouchMove = e => {\n    if (e.touches.length === 1) {\n      const touch = e.touches[0]\n      // 计算 x,y 方向的移动距离\n      const delta = {\n        x: touch.screenX - this.state.touchStartPos.x,\n        y: touch.screenY - this.state.touchStartPos.y\n      }\n      // 判断是否是垂直滚动\n      if (this.state.isVerticalScrolling === null) {\n        console.log('===== reset =====')\n        this.setState({\n          isVerticalScrolling: !!(Math.abs(delta.x) < Math.abs(delta.y))\n        })\n      }\n\n      if (!this.state.isVerticalScrolling) {\n        // 模拟滚动\n        e.preventDefault()\n        const currSwipedXDis = e.touches[0].screenX - this.state.touchStartPos.x\n\n        // 阻止滑动到边缘时继续滑动\n        if (\n          this.state.prevOffsetX + currSwipedXDis > 0 || // 右滑超过第 0 屏\n          this.state.prevOffsetX + currSwipedXDis < -(this.PAGE_WIDTH * (this.PAGE_NUMBER - 1)) // 左滑超过最后一屏\n        ) {\n          return\n        }\n\n        // update\n        this.setState({\n          swipedDisX: currSwipedXDis\n        })\n        this.props.changePos(-currSwipedXDis / this.PAGE_WIDTH)\n      }\n    }\n  }\n\n  handleTouchEnd = e => {\n    let endIndex\n    if (this.state.isVerticalScrolling === false) {\n      endIndex = this.stickScroll()\n      this.props.setPageIndex(endIndex)\n    }\n    this.setState({\n      isVerticalScrolling: null\n    })\n  }\n\n  render() {\n    const wrapperClass = cs({\n      [style.exploreWrapper]: true,\n      [style.isTransitioning]: this.state.isTransitioning === true\n    })\n\n    return (\n      <div\n        className={wrapperClass}\n        ref={node => {\n          this.pageWrapper = node\n        }}\n        style={{\n          transform: `translate3d(${this.state.prevOffsetX + this.state.swipedDisX}px, 0, 0)`,\n          ...this.props.style\n        }}\n      >\n        {this.props.children}\n      </div>\n    )\n  }\n}\n\nexport default Slider\n"
  },
  {
    "path": "src/pages/Explore/index.tsx",
    "content": "import * as React from 'react'\nimport * as style from '@/pages/Explore/style.scss'\nimport Custom from '@/pages/Explore/Custom'\nimport List from '@/pages/Explore/List'\nimport Slider from './Slider'\nimport { SlideContext } from '@/router/slideContext'\nimport { withRouter } from 'react-router'\n\ninterface IProps {\n  location: { pathname: string }\n  history: any\n  style: React.CSSProperties\n}\n\nclass Explore extends React.Component<IProps> {\n  state = { hasRankLoaded: false }\n\n  static getDerivedStateFromProps(nextProps, prevState) {\n    if (nextProps.location.pathname.split('/').indexOf('rank') >= 0 && !prevState.hasRankLoaded) {\n      return { hasRankLoaded: true }\n    }\n    return null\n  }\n\n  setRankLoaded = isLoaded => {\n    this.setState({\n      hasRankLoaded: isLoaded\n    })\n  }\n\n  render() {\n    return (\n      <SlideContext.Consumer>\n        {({ changePos, setPageIndex, pageIndex }) => (\n          <Slider\n            location={this.props.location}\n            history={this.props.history}\n            setRankLoaded={this.setRankLoaded}\n            changePos={changePos}\n            pageIndex={pageIndex}\n            setPageIndex={setPageIndex}\n          >\n            <div className={style.innerWrapper}>\n              <Custom />\n            </div>\n            <div className={style.innerWrapper}>{this.state.hasRankLoaded ? <List /> : null}</div>\n          </Slider>\n        )}\n      </SlideContext.Consumer>\n    )\n  }\n}\n\nexport default Explore\n"
  },
  {
    "path": "src/pages/Explore/style.scss",
    "content": "@import '@/constant/style.scss';\n.exploreWrapper {\n  margin: 0;\n  width: 200%;\n  text-align: center;\n  background-color: $ncmRed;\n  height: 100%;\n  overflow-x: scroll;\n  overflow-y: hidden;\n  display: flex;\n}\n\n.isTransitioning {\n  transition: transform 0.2s ease-out;\n}\n\n.custom {\n  position: relative;\n  background-color: #fff;\n  padding: 0 0 1px 0;\n}\n\n.lists {\n  padding-top: 30px;\n  background-color: #fff;\n}\n\n.innerWrapper {\n  flex-shrink: 0;\n  box-sizing: border-box;\n  border: 1px solid transparent;\n  border-width: 170px 0 $bottomBarHeight 0;\n  width: 50%;\n  height: 100%;\n  overflow-x: auto;\n  overflow-y: auto;\n}\n\n.banners {\n  border-radius: 10px;\n  margin: 10px auto 10px auto;\n  -webkit-mask-image: -webkit-radial-gradient(white, black); // TODO\n  width: 98%;\n  overflow: hidden;\n}\n\n.redBg {\n  position: absolute;\n  background-color: $ncmRed;\n  width: 100%;\n  height: 120px;\n}\n"
  },
  {
    "path": "src/pages/Explore/style.scss.d.ts",
    "content": "export const exploreWrapper: string;\nexport const isTransitioning: string;\nexport const custom: string;\nexport const lists: string;\nexport const innerWrapper: string;\nexport const banners: string;\nexport const redBg: string;\n"
  },
  {
    "path": "src/pages/Friends/index.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport Fork from '@/layouts/GithubFork'\n\ninterface IProps {\n  style: React.CSSProperties\n}\n\nclass App extends React.Component<IProps> {\n  // count: number\n\n  // state = {\n  //   count: 0\n  // }\n\n  // componentWillUnmount() {\n  //   console.log('=== Friends will unmount  =====')\n  // }\n\n  // componentDidMount() {\n  //   setInterval(() => {\n  //     this.setState({\n  //       count: this.state.count + 1\n  //     })\n  //   }, 200)\n  // }\n\n  render() {\n    return (\n      <div className={style.wrapper}>\n        <h1>🍻 friends page</h1>\n        <Fork />\n      </div>\n    )\n  }\n}\n\nexport default App\n"
  },
  {
    "path": "src/pages/Friends/style.scss",
    "content": "@import '@/constant/style.scss';\n\n.wrapper {\n  text-align: center;\n  height: 100vh;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  background-color: lightgoldenrodyellow;\n  overflow: hidden;\n  color: #333;\n}\n"
  },
  {
    "path": "src/pages/Friends/style.scss.d.ts",
    "content": "export const wrapper: string;\n"
  },
  {
    "path": "src/pages/Mine/index.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport Fork from '@/layouts/GithubFork'\n\ninterface IProps {\n  style: React.CSSProperties\n}\n\nclass App extends React.Component<IProps> {\n  render() {\n    return (\n      <div className={style.wrapper}>\n        <h1>👶🏻 mine page</h1>\n        <Fork />\n      </div>\n    )\n  }\n}\n\nexport default App\n"
  },
  {
    "path": "src/pages/Mine/style.scss",
    "content": "@import '@/constant/style.scss';\n\n.wrapper {\n    text-align: center;\n    height: 100vh;\n    display: flex;\n    justify-content: center;\n    align-items: center;\n    background-color: salmon;\n    overflow: hidden;\n    color: #333;\n  }\n  "
  },
  {
    "path": "src/pages/Mine/style.scss.d.ts",
    "content": "export const wrapper: string;\n"
  },
  {
    "path": "src/pages/Playing/ControlBar/index.tsx",
    "content": "export { default } from './view'\n"
  },
  {
    "path": "src/pages/Playing/ControlBar/style.scss",
    "content": ".controlButtonsWrapper {\n  margin: 0 auto 90px auto;\n  i {\n    font-weight: lighter;\n    color: rgba($color: #fff, $alpha: 0.5);\n    margin: 0 60px;\n    font-size: 100px;\n  }\n}\n"
  },
  {
    "path": "src/pages/Playing/ControlBar/style.scss.d.ts",
    "content": "export const controlButtonsWrapper: string;\n"
  },
  {
    "path": "src/pages/Playing/ControlBar/view.tsx",
    "content": "import React from 'react'\nimport * as style from './style.scss'\n\ntype IProps = {\n  isPlaying: boolean\n  switchPrevSong: React.MouseEventHandler<HTMLLIElement>\n  switchNextSong: React.MouseEventHandler<HTMLLIElement>\n  switchPlayState: React.MouseEventHandler<HTMLLIElement>\n}\n\nconst RotatingCover: React.SFC<IProps> = props => {\n  return (\n    <div className={style.controlButtonsWrapper}>\n      <i onClick={props.switchPrevSong} className={'iconfont-ncm'}>\n        &#xe67d;\n      </i>\n      {props.isPlaying ? (\n        <i onClick={props.switchPlayState} className={'iconfont-ncm'}>\n          &#xe83b;\n        </i>\n      ) : (\n        <i onClick={props.switchPlayState} className={'iconfont-ncm'}>\n          &#xe631;\n        </i>\n      )}\n      <i onClick={props.switchNextSong} className={'iconfont-ncm'}>\n        &#xe67e;\n      </i>\n    </div>\n  )\n}\n\nexport default RotatingCover\n"
  },
  {
    "path": "src/pages/Playing/HeaderBar/index.tsx",
    "content": "export { default } from './view'\n"
  },
  {
    "path": "src/pages/Playing/HeaderBar/style.scss",
    "content": ".headerWrapper {\n  position: relative;\n  width: 100%;\n  color: #fff;\n  padding: 20px 0 10px 0;\n  border-bottom: 1px solid rgba($color: #fff, $alpha: 0.5);\n}\n\n.songName {\n  margin: 0 auto 5px auto;\n  text-align: center;\n}\n\n.artists {\n  font-size: 20px;\n  text-align: center;\n}\n\n.back {\n  position: absolute;\n  top: 50%;\n  transform: translateY(-50%);\n  left: 10px;\n  i {\n    font-size: 50px;\n    font-weight: bold;\n  }\n}\n"
  },
  {
    "path": "src/pages/Playing/HeaderBar/style.scss.d.ts",
    "content": "export const headerWrapper: string;\nexport const songName: string;\nexport const artists: string;\nexport const back: string;\n"
  },
  {
    "path": "src/pages/Playing/HeaderBar/view.tsx",
    "content": "import React, { MouseEventHandler } from 'react'\nimport style from './style.scss'\nimport { withRouter } from 'react-router-dom'\ntype IProps = {\n  artists: string\n  name: string\n  history: any\n}\n\nclass RotatingCover extends React.Component<IProps> {\n  goBack: MouseEventHandler<HTMLDivElement> = e => {\n    this.props.history.goBack()\n  }\n\n  render() {\n    return (\n      <div className={style.headerWrapper}>\n        <div className={style.back} onClick={this.goBack}>\n          <i className=\"iconfont-ncm\">&#xe6fb;</i>\n        </div>\n        <div className={style.songName}>{this.props.name}</div>\n        <div className={style.artists}>{this.props.artists}</div>\n      </div>\n    )\n  }\n}\n\nexport default withRouter(RotatingCover)\n"
  },
  {
    "path": "src/pages/Playing/RotatingCover/index.tsx",
    "content": "export { default } from './view'\n"
  },
  {
    "path": "src/pages/Playing/RotatingCover/style.scss",
    "content": ".coverImg {\n  width: 500px;\n  border-radius: 50%;\n  border: 20px solid rgba($color: #fff, $alpha: 0.5);\n}\n"
  },
  {
    "path": "src/pages/Playing/RotatingCover/style.scss.d.ts",
    "content": "export const coverImg: string;\n"
  },
  {
    "path": "src/pages/Playing/RotatingCover/view.tsx",
    "content": "import React from 'react'\nimport * as style from './style.scss'\nimport { IPlayingSong, IPlayState } from '../../../store'\n\ntype IProps = {\n  playingSong: IPlayingSong\n}\n\nexport default class RotatingCover extends React.Component<IProps> {\n  render() {\n    return (\n      <div>\n        <img className={style.coverImg} src={this.props.playingSong.coverImg} />\n      </div>\n    )\n  }\n}\n"
  },
  {
    "path": "src/pages/Playing/index.tsx",
    "content": "export { default } from './view'\n"
  },
  {
    "path": "src/pages/Playing/style.scss",
    "content": "@import '@/constant/style.scss';\n\n.wrapper {\n  position: relative;\n  height: 750px;\n  height: 1334px;\n}\n\n.content {\n  height: 2222px;\n}\n\n.foreground {\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  background-color: rgba($color: #000, $alpha: 0.2);\n  align-items: center;\n  position: absolute;\n  z-index: 2;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n}\n\n.playingBg {\n  position: absolute;\n  left: 0;\n  top: 0;\n  background-size: cover;\n  background-position: center;\n  filter: blur(30px);\n  width: 100%;\n  height: 100%;\n}\n"
  },
  {
    "path": "src/pages/Playing/style.scss.d.ts",
    "content": "export const wrapper: string;\nexport const content: string;\nexport const foreground: string;\nexport const playingBg: string;\n"
  },
  {
    "path": "src/pages/Playing/view.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport { connect } from 'react-redux'\nimport { IStoreState, IPlayingSong, IPlayState, SwitchSongByPace, switchPlayState } from '../../store'\nimport RotatingCover from './RotatingCover'\nimport Header from './HeaderBar'\nimport ControlBar from './ControlBar'\nimport PropTypes from 'prop-types'\n\ninterface IProps {\n  style: React.CSSProperties\n  playState: IPlayState\n  playingSong: IPlayingSong\n}\n\ntype IState = {\n  isPlaying: boolean\n}\n\nclass PlayingPage extends React.Component<IProps, IState> {\n  static contextTypes = {\n    store: PropTypes.object\n  }\n\n  audio: HTMLAudioElement | null\n\n  getIsPlaying = () => {\n    return this.context.store.getState().playState.isPlaying\n  }\n\n  handleSwitchPrevSong = () => {\n    this.context.store.dispatch(SwitchSongByPace(-1))\n  }\n\n  handleSwitchNextSong = () => {\n    this.context.store.dispatch(SwitchSongByPace(1))\n  }\n\n  handleSwitchPlayState = () => {\n    this.context.store.dispatch(switchPlayState)\n    if (this.audio) {\n      const isPlaying = this.getIsPlaying()\n      if (isPlaying) {\n        this.audio.play()\n      } else {\n        this.audio.pause()\n      }\n    }\n  }\n\n  render() {\n    return (\n      <div className={style.wrapper} style={{ ...this.props.style }}>\n        <div className={style.foreground}>\n          <Header artists={this.props.playingSong.artists} name={this.props.playingSong.name} />\n          <RotatingCover playingSong={this.props.playingSong} />\n          <ControlBar\n            isPlaying={this.getIsPlaying()}\n            switchPrevSong={this.handleSwitchPrevSong}\n            switchNextSong={this.handleSwitchNextSong}\n            switchPlayState={this.handleSwitchPlayState}\n          />\n          <audio\n            ref={ref => {\n              this.audio = ref\n            }}\n            src={this.props.playingSong.url}\n            autoPlay={true}\n          />\n        </div>\n        <div style={{ backgroundImage: `url(${this.props.playingSong.coverImg})` }} className={style.playingBg} />\n      </div>\n    )\n  }\n}\n\nconst mapStateToProps = (state: IStoreState, ownProps) => {\n  return {\n    playState: state.playState,\n    playingSong: state.playingSong\n  }\n}\n\nexport default connect<any>(mapStateToProps)(PlayingPage)\n"
  },
  {
    "path": "src/pages/Playlist/Header/index.tsx",
    "content": "export { default } from './view'\n"
  },
  {
    "path": "src/pages/Playlist/Header/style.scss",
    "content": "@import '@/constant/style.scss';\n\n.headerWrapper {\n  position: fixed;\n  top: 0;\n  left: 0;\n  width: 100%;\n  z-index: 2;\n  height: $headerBarHeight;\n  background-color: #666;\n  color: rgba(255, 255, 255, 0.9);\n  line-height: $headerBarHeight;\n  background-size: cover;\n  overflow: hidden;\n}\n\n.foreground {\n  position: absolute;\n  display: flex;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  z-index: 2;\n  justify-content: space-between;\n}\n\n.back {\n  font-weight: bolder;\n  font-size: 40px;\n  padding-left: 20px;\n}\n\n.playingLink {\n  position: absolute;\n  right: 20px;\n  i {\n    font-size: 50px;\n    color: rgba(255, 255, 255, 0.9);\n  }\n}\n\n.bgImg {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: calc(100% + 50px);\n  z-index: 1;\n  background-size: cover;\n  filter: blur(15px);\n}\n"
  },
  {
    "path": "src/pages/Playlist/Header/style.scss.d.ts",
    "content": "export const headerWrapper: string;\nexport const foreground: string;\nexport const back: string;\nexport const playingLink: string;\nexport const bgImg: string;\n"
  },
  {
    "path": "src/pages/Playlist/Header/view.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport { withRouter } from 'react-router'\nimport { Link } from 'react-router-dom'\nimport cs from 'classnames'\n\ntype IProps = {\n  history: any\n  bgImgUrl: string\n}\n\nclass Header extends React.Component<IProps> {\n  goBack: React.MouseEventHandler<HTMLDivElement> = e => {\n    this.props.history.goBack()\n  }\n\n  render() {\n    return (\n      <div className={style.headerWrapper}>\n        <div className={style.foreground}>\n          <div className={style.back}>\n            <i\n              className={cs({\n                'iconfont-ncm': true,\n                [style.back]: true\n              })}\n              onClick={this.goBack}\n            >\n              &#xe6fb;\n            </i>\n          </div>\n          <Link className={style.playingLink} to=\"/playing\">\n            <i className={'iconfont-ncm'}>&#xe6cf;</i>\n          </Link>\n        </div>\n        <div className={style.bgImg} style={{ backgroundImage: `url(${this.props.bgImgUrl})` }} />\n      </div>\n    )\n  }\n}\n\nexport default withRouter(Header)\n"
  },
  {
    "path": "src/pages/Playlist/index.tsx",
    "content": "export { default } from './view'\n"
  },
  {
    "path": "src/pages/Playlist/style.scss",
    "content": "@import '@/constant/style.scss';\n\n.wrapper {\n  position: relative;\n  border: 1px solid transparent;\n  border-width: 0 0 $bottomBarHeight 0;\n  height: 100%;\n  box-sizing: border-box;\n  overflow-y: auto;\n  background-color: #666;\n  clear: both;\n}\n\n.foreground {\n  position: absolute;\n  margin-top: $headerBarHeight;\n  width: 100%;\n  left: 0;\n  z-index: 2;\n}\n\n.back {\n  display: block;\n  color: rgba(255, 255, 255, 0.7);\n  height: $headerBarHeight;\n  line-height: $headerBarHeight;\n  font-weight: bolder;\n  padding-left: 30px;\n}\n\n.content {\n  height: 2222px;\n}\n\n.infoWrapper {\n  display: flex;\n  align-items: center;\n  padding: 0 30px;\n  margin-bottom: 40px;\n  background: transparent;\n}\n\n.bgImg {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 500px;\n  z-index: 1;\n  background-size: cover;\n  filter: blur(15px);\n}\n\n.coverWrapper {\n  flex-shrink: 0;\n  position: relative;\n  width: 300px;\n  height: 300px;\n  border-radius: 5px;\n  overflow: hidden;\n\n  img {\n    height: 100%;\n    width: 100%;\n  }\n}\n\n.playCount {\n  position: absolute;\n  top: 10px;\n  right: 10px;\n  color: #fff;\n  margin: 0;\n}\n\n.listName {\n  margin-left: 20px;\n  color: #fff;\n  font-size: 30px;\n}\n"
  },
  {
    "path": "src/pages/Playlist/style.scss.d.ts",
    "content": "export const wrapper: string;\nexport const foreground: string;\nexport const back: string;\nexport const content: string;\nexport const infoWrapper: string;\nexport const bgImg: string;\nexport const coverWrapper: string;\nexport const playCount: string;\nexport const listName: string;\n"
  },
  {
    "path": "src/pages/Playlist/view.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport { calcPlayCount } from '@/utils/calcFunctions'\nimport { ComponentFetchModel } from '@/utils/models'\nimport { observer } from 'mobx-react'\nimport get from 'lodash/get'\nimport TrackList from '@/components/TrackList'\nimport NETEASE_API, { getURL } from '@/constant/api'\nimport Header from './Header'\n\ntype IProps = {\n  style?: React.CSSProperties\n  location?: any\n  match?: any\n}\n\n@observer\nclass Playlist extends React.Component<IProps> {\n  listStore = new ComponentFetchModel({\n    URL: getURL(NETEASE_API.playlist, { id: this.props.match.params.id })\n  })\n\n  componentDidMount() {\n    this.listStore.fetchData()\n  }\n\n  render() {\n    const locationState = this.props.location.state || {}\n    const { playCount, picUrl, name } = locationState\n    const coverImg = get(this.listStore, 'payload.playlist.coverImgUrl')\n    return (\n      <div className={style.wrapper}>\n        <div className={style.foreground}>\n          <Header bgImgUrl={coverImg} />\n          <div className={style.infoWrapper}>\n            <div className={style.coverWrapper}>\n              <img src={picUrl} />\n              <p className={style.playCount}>{calcPlayCount(playCount)}</p>\n            </div>\n            <h1 className={style.listName}>{name}</h1>\n          </div>\n          <div className={'songList'}>\n            <TrackList payload={this.listStore.payload} />\n          </div>\n        </div>\n        <div className={style.bgImg} style={{ backgroundImage: `url(${coverImg})` }} />\n      </div>\n    )\n  }\n}\n\nexport default Playlist\n"
  },
  {
    "path": "src/pages/Video/index.tsx",
    "content": "import * as React from 'react'\nimport * as style from './style.scss'\nimport Fork from '@/layouts/GithubFork'\n\ninterface IProps {\n  style: React.CSSProperties\n}\n\nclass App extends React.Component<IProps> {\n  render() {\n    return (\n      <div className={style.wrapper}>\n        <h1>🎞 video page</h1>\n        <Fork />\n      </div>\n    )\n  }\n}\n\nexport default App\n"
  },
  {
    "path": "src/pages/Video/style.scss",
    "content": "@import '@/constant/style.scss';\n\n.wrapper {\n  text-align: center;\n  height: 100vh;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  background-color: paleturquoise;\n  overflow: hidden;\n  color: #333;\n}\n"
  },
  {
    "path": "src/pages/Video/style.scss.d.ts",
    "content": "export const wrapper: string;\n"
  },
  {
    "path": "src/registerServiceWorker.ts",
    "content": "// tslint:disable:no-console\n// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the 'N+1' visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nconst isLocalhost = Boolean(\n  window.location.hostname === 'localhost' ||\n    // [::1] is the IPv6 localhost address.\n    window.location.hostname === '[::1]' ||\n    // 127.0.0.1/8 is considered localhost for IPv4.\n    window.location.hostname.match(\n      /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n    )\n);\n\nexport default function register() {\n  if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n    // The URL constructor is available in all browsers that support SW.\n    const publicUrl = new URL(\n      process.env.PUBLIC_URL!,\n      window.location.toString()\n    );\n    if (publicUrl.origin !== window.location.origin) {\n      // Our service worker won't work if PUBLIC_URL is on a different origin\n      // from what our page is served on. This might happen if a CDN is used to\n      // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\n      return;\n    }\n\n    window.addEventListener('load', () => {\n      const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n      if (isLocalhost) {\n        // This is running on localhost. Lets check if a service worker still exists or not.\n        checkValidServiceWorker(swUrl);\n\n        // Add some additional logging to localhost, pointing developers to the\n        // service worker/PWA documentation.\n        navigator.serviceWorker.ready.then(() => {\n          console.log(\n            'This web app is being served cache-first by a service ' +\n              'worker. To learn more, visit https://goo.gl/SC7cgQ'\n          );\n        });\n      } else {\n        // Is not local host. Just register service worker\n        registerValidSW(swUrl);\n      }\n    });\n  }\n}\n\nfunction registerValidSW(swUrl: string) {\n  navigator.serviceWorker\n    .register(swUrl)\n    .then(registration => {\n      registration.onupdatefound = () => {\n        const installingWorker = registration.installing;\n        if (installingWorker) {\n          installingWorker.onstatechange = () => {\n            if (installingWorker.state === 'installed') {\n              if (navigator.serviceWorker.controller) {\n                // At this point, the old content will have been purged and\n                // the fresh content will have been added to the cache.\n                // It's the perfect time to display a 'New content is\n                // available; please refresh.' message in your web app.\n                console.log('New content is available; please refresh.');\n              } else {\n                // At this point, everything has been precached.\n                // It's the perfect time to display a\n                // 'Content is cached for offline use.' message.\n                console.log('Content is cached for offline use.');\n              }\n            }\n          };\n        }\n      };\n    })\n    .catch(error => {\n      console.error('Error during service worker registration:', error);\n    });\n}\n\nfunction checkValidServiceWorker(swUrl: string) {\n  // Check if the service worker can be found. If it can't reload the page.\n  fetch(swUrl)\n    .then(response => {\n      // Ensure service worker exists, and that we really are getting a JS file.\n      if (\n        response.status === 404 ||\n        response.headers.get('content-type')!.indexOf('javascript') === -1\n      ) {\n        // No service worker found. Probably a different app. Reload the page.\n        navigator.serviceWorker.ready.then(registration => {\n          registration.unregister().then(() => {\n            window.location.reload();\n          });\n        });\n      } else {\n        // Service worker found. Proceed as normal.\n        registerValidSW(swUrl);\n      }\n    })\n    .catch(() => {\n      console.log(\n        'No internet connection found. App is running in offline mode.'\n      );\n    });\n}\n\nexport function unregister() {\n  if ('serviceWorker' in navigator) {\n    navigator.serviceWorker.ready.then(registration => {\n      registration.unregister();\n    });\n  }\n}\n"
  },
  {
    "path": "src/router/index.tsx",
    "content": "import * as React from 'react'\nimport { BrowserRouter, Route, Switch } from 'react-router-dom'\nimport LiveRoute from 'react-live-route'\nimport ExplorePage from '@/pages/Explore'\nimport VideoPage from '@/pages/Video'\nimport MinePage from '@/pages/Mine'\nimport FriendsPage from '@/pages/Friends'\nimport AccountPage from '@/pages/Account'\nimport Playing from '@/pages/Playing'\nimport Playlist from '@/pages/Playlist'\nimport BottomBar from '@/layouts/BottomBar'\nimport BaseHeaderBar from '@/layouts/HeaderBar'\nimport ExploreHeaderBar from '@/layouts/ExploreHeaderBar'\nimport * as style from '@/router/routerTrans.scss'\nimport { SlideContext } from '@/router/slideContext'\n\nconst AppRoutes = () => (\n  <BrowserRouter>\n    <div className={style.rootWrapper}>\n      <Switch>\n        <Route path={`/explore`} component={ExploreHeaderBar} />\n        <Route path={`/video`} component={BaseHeaderBar} />\n        <Route path={`/mine`} component={BaseHeaderBar} />\n        <Route path={`/friends`} component={BaseHeaderBar} />\n        <Route path={`/account`} component={BaseHeaderBar} />\n        <Route path={`/`} exact={true} component={ExploreHeaderBar} />\n      </Switch>\n      <div className={style.routeWrapper}>\n        <LiveRoute path={`/`} exact={true} component={ExplorePage} alwaysLive={true} />\n        <LiveRoute path={`/explore`} component={ExplorePage} alwaysLive={true} />\n        <LiveRoute path={`/video`} component={VideoPage} alwaysLive={true} />\n        <LiveRoute path={`/mine`} component={MinePage} alwaysLive={true} />\n        <LiveRoute path={`/friends`} component={FriendsPage} alwaysLive={true} />\n        <LiveRoute path={`/account`} component={AccountPage} alwaysLive={true} />\n        <LiveRoute path={`/playlist/:id`} component={Playlist} name=\"playlist\" livePath={`/playing`} />\n        <LiveRoute path={`/playing`} component={Playing} name=\"playing\" alwaysLive={true} />\n      </div>\n      <Switch>\n        <Route path={`/explore`} component={BottomBar} />\n        <Route path={`/video`} component={BottomBar} />\n        <Route path={`/mine`} component={BottomBar} />\n        <Route path={`/friends`} component={BottomBar} />\n        <Route path={`/account`} component={BottomBar} />\n        <Route path={`/playlist`} component={BottomBar} />\n        <Route path={`/`} exact={true} component={BottomBar} />\n      </Switch>\n    </div>\n  </BrowserRouter>\n)\n\nclass Slider extends React.Component {\n  state = { pos: 0, pageIndex: 0 }\n  changePos = newPos => {\n    this.setState({\n      pos: newPos\n    })\n  }\n\n  setPageIndex = index => {\n    this.setState({\n      pageIndex: index\n    })\n  }\n\n  render() {\n    return (\n      <React.Fragment>\n        <SlideContext.Provider\n          value={{\n            pos: this.state.pos,\n            pageIndex: this.state.pageIndex,\n            changePos: this.changePos,\n            setPageIndex: this.setPageIndex\n          }}\n        >\n          <AppRoutes />\n        </SlideContext.Provider>\n      </React.Fragment>\n    )\n  }\n}\n\nexport default Slider\n"
  },
  {
    "path": "src/router/routerTrans.scss",
    "content": ":global {\n  .switch-wrapper {\n    position: relative;\n    height: 100%;\n    width: 100%;\n  }\n  .switch-wrapper>div {\n    position: absolute;\n    height: 100%;\n    width: 100%;\n  }\n}\n\n.routeWrapper {\n  height: 100%;\n  width: 100%;\n  overflow-y: scroll;\n  overflow-x: hidden;\n}\n\n.rootWrapper {\n  background-color: #aaa;\n  width: 100%;\n  height: 100%;\n  overflow: hidden;\n}\n\n.transitionGroup {\n  position: relative;\n}"
  },
  {
    "path": "src/router/routerTrans.scss.d.ts",
    "content": "export const routeWrapper: string;\nexport const rootWrapper: string;\nexport const transitionGroup: string;\n"
  },
  {
    "path": "src/router/slideContext.tsx",
    "content": "import React from 'react'\n\nexport const slidePos = {\n  pageIndex: 0,\n  pos: 0,\n  changePos(newPos) {\n    slidePos.pos = newPos\n  },\n  setPageIndex(index) {\n    slidePos.pageIndex = index\n  }\n}\n\nexport const SlideContext = React.createContext(\n  slidePos // default value\n)\n"
  },
  {
    "path": "src/store.tsx",
    "content": "import NETEASE_API, { getURL } from '@/constant/api'\nimport axios from 'axios'\nimport defaultCover from './assets/cover-default.jpg'\nimport get from 'lodash/get'\n// ===== constant ===== //\nexport const PLAY_SONG = 'PLAY_SONG'\nexport const FETCH_URL = 'FETCH_URL'\nexport const FETCH_SONG_DETAIL_SUCCESS = 'FETCH_SONG_DETAIL_SUCCESS'\nexport const FETCH_SONG_URL_SUCCESS = 'FETCH_SONG_URL_SUCCESS'\nexport const SWITCH_PREV_SONG = 'SWITCH_PREV_SONG'\nexport const SWITCH_NEXT_SONG = 'SWITCH_NEXT_SONG'\nexport const SWITCH_PLAY_STATE = 'SWITCH_PLAY_STATE'\nexport const PUSH_TO_PLAYLIST = 'PUSH_TO_PLAYLIST'\nexport const EMPTY_PLAYLIST = 'EMPTY_PLAYLIST'\nexport const PLAY_PLAYLIST = 'PLAY_PLAYLIST'\nexport const CHANGE_PLAYLIST_INDEX = 'CHANGE_PLAYLIST_INDEX'\n\n// ===== type ===== //\nexport type IAction = {\n  readonly type: string\n  [propName: string]: any\n}\n\nexport type IActionCreator = (param: any) => IAction\n\nenum CycleMode {\n  single = 0,\n  all,\n  random\n}\n\n// 同步 action 修改\nexport type IPlayState = {\n  isPlaying: boolean\n  cycleMode: CycleMode\n  playingTime: number\n}\n\n// 异步 action 修改\nexport type IPlayingSong = {\n  id: string\n  name: string\n  coverImg: string\n  url: string\n  artists: string\n  album: string\n}\n\nexport type IPlaylist = {\n  currIndex: number\n  list: IPlayingSong[]\n}\n\nexport type IStoreState = {\n  playingSong: IPlayingSong\n  playState: IPlayState\n  playlist: IPlaylist\n}\n\nexport const defaultState: IStoreState = {\n  playingSong: {\n    id: '',\n    name: '💿',\n    coverImg: defaultCover,\n    url: '',\n    artists: '',\n    album: ''\n  },\n  playState: {\n    isPlaying: false,\n    cycleMode: CycleMode.all,\n    playingTime: 0\n  },\n  playlist: {\n    currIndex: 0,\n    list: []\n  }\n}\n\ntype IReducer = (state: IStoreState, action: IAction) => IStoreState\n\n// ===== action creator ===== //\n\n// 更改播放列表中的 index\nexport const changePlaylistIndexActionCreator: any = ({ pace, nextIndex }: { pace?: number; nextIndex?: number }) => {\n  return dispatch => {\n    if (typeof pace === 'number') {\n      dispatch({\n        type: CHANGE_PLAYLIST_INDEX,\n        pace\n      })\n    } else if (typeof nextIndex === 'number') {\n      dispatch({\n        type: CHANGE_PLAYLIST_INDEX,\n        nextIndex\n      })\n    } else {\n      dispatch({\n        type: CHANGE_PLAYLIST_INDEX\n      })\n    }\n  }\n}\n\n// compose：切换 index + 播放当前 index\nexport const SwitchSongByPace: (pace: number) => void = pace => {\n  return (dispatch, getState) => {\n    // 1. 先在调整当前播放歌曲的 index\n    dispatch(changePlaylistIndexActionCreator({ pace }))\n    // 2. 开始播放当前列表\n    dispatch({\n      type: PLAY_PLAYLIST\n    })\n    // 3. 异步获取对应的歌曲 url\n    const currState: IStoreState = getState()\n    const id = get(currState, 'playingSong.id')\n    if (typeof id === 'string') {\n      dispatch(fetchSongUrl(currState.playingSong.id))\n    } else {\n      console.error('bad song id requested!')\n    }\n  }\n}\n\n// 切换播放/暂停\nexport const switchPlayState: IAction = {\n  type: SWITCH_PLAY_STATE\n}\n\n// 将歌曲添加到播放列表中\nexport const addToPlaylist: IActionCreator = songs => {\n  return {\n    type: PUSH_TO_PLAYLIST,\n    songsToPush: Array.isArray(songs.songsToPush) ? songs.songsToPush : [songs.songsToPush]\n  }\n}\n\n// 开始播放当前列表\nexport const playCurrPlaylist = (songs, index = 0) => {\n  return (dispatch, getState) => {\n    // 1. 将歌添加到播放列表中\n    dispatch(\n      addToPlaylist({\n        type: PUSH_TO_PLAYLIST,\n        songsToPush: Array.isArray(songs) ? songs : [songs]\n      })\n    )\n    // 2. 将 currIndex 置为 0\n    dispatch(changePlaylistIndexActionCreator({ nextIndex: index }))\n    // 3. 开始播放 currIndex 对应的歌曲\n    dispatch({\n      type: PLAY_PLAYLIST\n    })\n    // 4. 异步获取对应的歌曲 url\n    const currState: IStoreState = getState()\n    dispatch(fetchSongUrl(currState.playingSong.id))\n  }\n}\n\n// 将播放列表清空\nexport const emptyPlaylist: IActionCreator = () => {\n  return {\n    type: EMPTY_PLAYLIST\n  }\n}\n\n// 点击一首歌\nexport const playSongActionCreator: IActionCreator = id => ({\n  type: PLAY_SONG,\n  nextPlayingSongId: id\n})\n\n// 已成功到获取一首歌的详情\nexport const syncReplacePlayingSong: IActionCreator = payload => ({\n  type: FETCH_SONG_DETAIL_SUCCESS,\n  payload\n})\n\n// 异步获取一首歌的 URL 成功\nexport const fetchSongUrlSuccessActionCreator: IActionCreator = payload => ({\n  type: FETCH_SONG_URL_SUCCESS,\n  payload\n})\n\n// 异步获取一首歌的详情（export 给组件）\nexport const fetchSongDetail = id =>\n  generateFetchActionCreator(getURL(NETEASE_API.songDetail, { ids: id }), syncReplacePlayingSong)\n\n// 异步获取一首歌的 URL（export 给组件）\nexport const fetchSongUrl = id =>\n  generateFetchActionCreator(getURL(NETEASE_API.songUrl, { ids: id }), fetchSongUrlSuccessActionCreator)\n\n// 通用异步获取\nexport const generateFetchActionCreator = (URL, actionCreator) => {\n  // TODO: 加入取消之前的请求\n  return axios\n    .get(URL)\n    .then(response => {\n      console.log(response.data)\n      return actionCreator(response.data)\n    })\n    .catch(error => {\n      console.log(error)\n    })\n}\n\n// ===== action reducers ===== //\n\n// 歌曲详情 reducer\nconst fetchSongDetailSuccessReducer: IReducer = (state, action) => {\n  const firstSong = action.payload.songs[0]\n  const prevPlayingSong = state.playingSong\n  const nextPlayingSong = { ...prevPlayingSong, coverImg: firstSong.al.picUrl }\n  return { ...state, playingSong: nextPlayingSong }\n}\n\n// 歌曲 URL reducer\nconst fetchSongUrlSuccessReducer: IReducer = (state, action) => {\n  const firstSong = action.payload.data[0]\n  const prevPlayingSong = state.playingSong\n  const nextPlayingSong = { ...prevPlayingSong, url: firstSong.url }\n  return { ...state, playingSong: nextPlayingSong }\n}\n\n// 开始播放当前列表中对应 index 的歌曲\nconst playCurrSongReducer: IReducer = (state, action) => {\n  const nextPlayingSong: IPlayingSong = state.playlist.list[state.playlist.currIndex]\n  if (!nextPlayingSong) {\n    return state\n  }\n  const nextPlayingState: IPlayState = {\n    isPlaying: true,\n    cycleMode: state.playState.cycleMode,\n    playingTime: 0\n  }\n  return { ...state, playingSong: nextPlayingSong, playState: nextPlayingState }\n}\n\n// 更改列表中的 index\nconst changePlaylistIndexReducer: IReducer = (state, action) => {\n  console.log('切歌')\n  const prevPlaylist = state.playlist\n  let nextSongIndex\n  if (typeof action.pace === 'number') {\n    nextSongIndex = prevPlaylist.currIndex + action.pace\n  } else if (typeof action.nextIndex === 'number') {\n    nextSongIndex = action.nextIndex\n  } else {\n    nextSongIndex = prevPlaylist.currIndex\n  }\n\n  // 如果超出播放列表的边界则什么都不做\n  // TODO: 全部循环时列表会首尾相接\n  if (nextSongIndex < 0 || nextSongIndex >= prevPlaylist.list.length || nextSongIndex === prevPlaylist.currIndex) {\n    return state\n  }\n  const nextIndex = nextSongIndex\n  const nextPlaylist = { ...prevPlaylist, currIndex: nextIndex }\n  return { ...state, playlist: nextPlaylist }\n}\n\n// 切换播放/暂停状态\nconst switchPlayingStateReducer: IReducer = (state, action) => {\n  const prevPlayState = state.playState\n  const nextPlayState = { ...prevPlayState, isPlaying: !prevPlayState.isPlaying }\n  return { ...state, playState: nextPlayState }\n}\n\n// 将新的歌推入歌单中\nconst pushSongsToPlaylistReducer: IReducer = (state, action) => {\n  const prevPlaylist = state.playlist\n  const nextPlaylist = { ...prevPlaylist, list: action.songsToPush }\n  return { ...state, playlist: nextPlaylist }\n}\n\n// 总 reducer\nexport const reducers: IReducer = (state, action) => {\n  // console.log(action)\n  switch (action.type) {\n    case PLAY_PLAYLIST:\n      return playCurrSongReducer(state, action)\n    case FETCH_SONG_DETAIL_SUCCESS:\n      return fetchSongDetailSuccessReducer(state, action)\n    case FETCH_SONG_URL_SUCCESS:\n      return fetchSongUrlSuccessReducer(state, action)\n    case CHANGE_PLAYLIST_INDEX:\n      return changePlaylistIndexReducer(state, action)\n    case SWITCH_PLAY_STATE:\n      return switchPlayingStateReducer(state, action)\n    case PUSH_TO_PLAYLIST:\n      return pushSongsToPlaylistReducer(state, action)\n    default:\n      return state\n  }\n}\n"
  },
  {
    "path": "src/utils/calcFunctions.tsx",
    "content": "const calcPlayCount = playCount => {\n  if (playCount > 100000000) {\n    return `${(playCount / 100000000).toFixed(1)}亿`\n  }\n\n  if (playCount > 10000) {\n    return `${Math.floor(playCount / 10000)}万`\n  }\n\n  return String(playCount)\n}\n\nexport { calcPlayCount }\n"
  },
  {
    "path": "src/utils/ee.tsx",
    "content": "import EE from 'event-emitter'\n\nconst ee = new EE()\n\n// ee.on('onTouchMove', disPercentX => {})\n\nexport default ee\n"
  },
  {
    "path": "src/utils/models/componentFetchModel.tsx",
    "content": "import { configure, observable, action, runInAction, computed, autorun } from 'mobx'\nimport { IRecommendListPayload } from '../../pages/Explore/RecommendList/view'\nimport { IBannerPayload } from '../../pages/Explore/Banner/view'\n\nconfigure({ enforceActions: true })\n\ntype IOption = {\n  URL: string\n}\n\nclass Store {\n  @observable URL: string = ''\n  @observable payload: IRecommendListPayload | IBannerPayload | null = null\n  @observable state: string = 'pending' // \"pending\" / \"done\" / \"error\"\n\n  constructor(option: IOption) {\n    this.URL = option.URL\n  }\n\n  fetchURL = () => {\n    return fetch(this.URL, {})\n  }\n\n  @action\n  fetchData() {\n    this.state = 'pending'\n    this.fetchURL().then(\n      response => {\n        if (!(response.status === 200 || response.status === 304)) {\n          throw new Error('Fail to get response with status:' + response.status)\n        }\n        response\n          .json()\n          .then(payload => {\n            runInAction(() => {\n              this.state = 'done'\n              this.payload = payload\n            })\n          })\n          .catch(error => {\n            throw new Error('Invalid json response: ' + error)\n          })\n      },\n      error => {\n        runInAction(() => {\n          this.state = 'error'\n        })\n      }\n    )\n  }\n}\n\nexport default Store\n"
  },
  {
    "path": "src/utils/models/index.tsx",
    "content": "import ComponentFetchModel from './componentFetchModel'\n\nexport { ComponentFetchModel }"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true,\n    \"allowSyntheticDefaultImports\": true,\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"@/*\": [\n        \"src/*\"\n      ]\n    },\n    \"outDir\": \"build/dist\",\n    \"module\": \"esnext\",\n    \"target\": \"es5\",\n    \"lib\": [\n      \"es6\",\n      \"dom\"\n    ],\n    \"sourceMap\": true,\n    \"allowJs\": true,\n    \"jsx\": \"react\",\n    \"moduleResolution\": \"node\",\n    \"rootDir\": \"src\",\n    \"forceConsistentCasingInFileNames\": true,\n    \"noImplicitReturns\": true,\n    \"noImplicitThis\": true,\n    \"noImplicitAny\": false,\n    \"strictNullChecks\": true,\n    \"suppressImplicitAnyIndexErrors\": true,\n    \"noUnusedLocals\": false\n  },\n  \"exclude\": [\n    \"node_modules\",\n    \"build\",\n    \"scripts\",\n    \"acceptance-tests\",\n    \"webpack\",\n    \"jest\",\n    \"src/setupTests.ts\"\n  ]\n}"
  },
  {
    "path": "tsconfig.prod.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\"\n}"
  },
  {
    "path": "tsconfig.test.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"module\": \"commonjs\"\n  }\n}"
  },
  {
    "path": "tslint.json",
    "content": "{\n  \"extends\": [\"tslint:recommended\", \"tslint-react\", \"tslint-config-prettier\"],\n  \"compilerOptions\": {\n    \"allowSyntheticDefaultImports\": true,\n    \"esModuleInterop\": true\n  },\n  \"linterOptions\": {\n    \"exclude\": [\"config/**/*.js\", \"node_modules/**/*.ts\", \"src/react-live-router/**/*.js\"]\n  },\n  \"rules\": {\n    \"no-var-requires\": false,\n    \"max-classes-per-file\": false,\n    // \"prettier\": true,\n    \"arrow-parens\": false,\n    \"arrow-return-shorthand\": [false],\n    \"comment-format\": [true, \"check-space\"],\n    \"import-blacklist\": [true, \"rxjs\"],\n    \"interface-over-type-literal\": false,\n    \"interface-name\": false,\n    \"member-access\": false,\n    \"member-ordering\": [true, { \"order\": \"fields-first\" }],\n    // \"newline-before-return\": false,]\n    \"no-any\": false,\n    \"no-empty-interface\": false,\n    \"no-import-side-effect\": [true],\n    \"no-inferrable-types\": [true, \"ignore-params\", \"ignore-properties\"],\n    \"no-invalid-this\": [true, \"check-function-in-method\"],\n    \"no-null-keyword\": false,\n    \"no-require-imports\": false,\n    \"no-this-assignment\": [true, { \"allow-destructuring\": true }],\n    \"no-trailing-whitespace\": true,\n    \"no-unused-variable\": [false, \"react\"],\n    \"object-literal-sort-keys\": false,\n    \"object-literal-shorthand\": false,\n    \"one-variable-per-declaration\": [false],\n    \"only-arrow-functions\": [true, \"allow-declarations\"],\n    \"ordered-imports\": [false],\n    \"no-console\": [false],\n    \"prefer-method-signature\": false,\n    \"prefer-template\": [true, \"allow-single-concat\"],\n    \"quotemark\": [true, \"single\", \"jsx-double\"],\n    \"triple-equals\": [true, \"allow-null-check\"],\n    // \"type-literal-delimiter\": true,\n    \"typedef\": {\n      \"severity\": \"off\",\n      \"options\": [\"parameter\", \"property-declaration\"]\n    },\n    \"variable-name\": [true, \"ban-keywords\", \"check-format\", \"allow-pascal-case\", \"allow-leading-underscore\"],\n    // tslint-react\n    \"jsx-no-lambda\": false\n  }\n}\n"
  }
]