text: "use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var flow=_interopDefault(require("lodash.flow"));function _defineProperty(e,s,r){return s in e?Object.defineProperty(e,s,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[s]=r,e}function _objectSpread2(e){for(var s=1;s<arguments.length;s++)if(s%2){var r=null!=arguments[s]?arguments[s]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(s){_defineProperty(e,s,r[s])})}else Object.defineProperties(e,Object.getOwnPropertyDescriptors(arguments[s]));return e}const getBabelLoader=(e,s)=>{let r;r=s?e=>e.loader&&e.loader.includes("babel")&&e.exclude:e=>e.loader&&e.loader.includes("babel")&&e.include;let o=e.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf,t=o.find(r);return t||(t=(o=o.reduce((e,s)=>e.concat(s.use||[]),[])).find(r)),t},addBundleVisualizer=(e={},s=!1)=>r=>{const o=require("webpack-bundle-analyzer").BundleAnalyzerPlugin;return s&&!process.argv.includes("--analyze")||r.plugins.push(new o(Object.assign({analyzerMode:"static",reportFilename:"report.html"},e))),r},disableEsLint=()=>e=>{return e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)).forEach(s=>{e.module.rules=e.module.rules.filter(e=>e!==s)}),e},addWebpackAlias=e=>s=>(s.resolve||(s.resolve={}),s.resolve.alias||(s.resolve.alias={}),Object.assign(s.resolve.alias,e),s),addWebpackResolve=e=>s=>(s.resolve||(s.resolve={}),Object.assign(s.resolve,e),s),addWebpackPlugin=e=>s=>(s.plugins.push(e),s),adjustWorkbox=e=>s=>(s.plugins.forEach(s=>{"GenerateSW"===s.constructor.name&&e(s.config)}),s),useEslintRc=e=>s=>{const r=s.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];r.use[0].options.useEslintrc=!0,r.use[0].options.ignore=!0,r.use[0].options.configFile=e,delete r.use[0].options.baseConfig;const o=s.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?r:e);return s.module.rules=o,s},enableEslintTypescript=()=>e=>{const s=e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];s.test=/\.([j,t]sx?|mjs)$/;const r=e.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?s:e);return e.module.rules=r,e},addLessLoader=(e={})=>s=>{const r="development"===process.env.NODE_ENV?"dev":"prod",o="./"===require("react-scripts/config/paths").servedPath,t="prod"===r&&"false"!==process.env.GENERATE_SOURCEMAP,l=/\.module\.less$/,a=e.localIdentName||"[path][name]__[local]--[hash:base64:5]",n=s=>["dev"===r?require.resolve("style-loader"):{loader:require("mini-css-extract-plugin").loader,options:Object.assign({},o?{publicPath:"../../"}:void 0)},{loader:require.resolve("css-loader"),options:s},{loader:require.resolve("postcss-loader"),options:{ident:"postcss",plugins:()=>[require("postcss-flexbugs-fixes"),require("postcss-preset-env")({autoprefixer:{flexbox:"no-2009"},stage:3})],sourceMap:t}},{loader:require.resolve("less-loader"),options:Object.assign(e,{source:t})}],i=s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf;return i.splice(i.length-1,0,{test:/\.less$/,exclude:l,use:n({importLoaders:2}),sideEffects:"prod"===r},{test:l,use:n({importLoaders:2,modules:!0,localIdentName:a})}),s},watchAll=()=>e=>(process.argv.includes("--watch-all")&&delete e.watchOptions,e),disableChunk=()=>e=>(e.optimization.splitChunks={cacheGroups:{default:!1}},e.optimization.runtimeChunk=!1,e),addWebpackExternals=e=>s=>{let r=s.externals;return r?Array.isArray(e)?r=e.concat(r):Array.isArray(r)||e.constructor===Function||e.constructor===RegExp?r=[e].concat(r):e instanceof Object&&r instanceof Object&&(r=_objectSpread2({},r,{},e)):r=e,s.externals=r,s},addPostcssPlugins=e=>s=>{return s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf.forEach(s=>s.use&&s.use.forEach(s=>{if(s.options&&"postcss"===s.options.ident&&(s.options.plugins||(s.options.plugins=()=>[...e]),s.options.plugins)){const r=s.options.plugins;s.options.plugins=()=>[...r(),...e]}})),s},removeModuleScopePlugin=()=>e=>(e.resolve.plugins=e.resolve.plugins.filter(e=>"ModuleScopePlugin"!==e.constructor.name),e),addTslintLoader=e=>s=>(s.module.rules.unshift({test:/\.(ts|tsx)$/,loader:"tslint-loader",options:e,enforce:"pre"}),s),addBabelPlugin=e=>s=>(getBabelLoader(s).options.plugins.push(e),s),addExternalBabelPlugin=e=>s=>{const r=getBabelLoader(s,!0).options;return r.plugins||(r.plugins=[]),r.plugins.push(e),s},addBabelPreset=e=>s=>(getBabelLoader(s).options.presets.push(e),s),addDecoratorsLegacy=()=>e=>addBabelPlugin(["@babel/plugin-proposal-decorators",{legacy:!0}])(e),useBabelRc=()=>e=>(getBabelLoader(e).options.babelrc=!0,e),babelInclude=e=>s=>(getBabelLoader(s).include=e,s),addBabelPlugins=(...e)=>e.map(e=>addBabelPlugin(e)),addExternalBabelPlugins=(...e)=>e.map(e=>addExternalBabelPlugin(e)),addBabelPresets=(...e)=>e.map(e=>addBabelPreset(e)),fixBabelImports=(e,s)=>addBabelPlugin(["import",Object.assign({},{libraryName:e},s),`fix-${e}-imports`]),override=(...e)=>flow(...e.filter(e=>e)),overrideDevServer=(...e)=>s=>(r,o)=>{const t=s(r,o);return override(...e)(t)};exports.addBabelPlugin=addBabelPlugin,exports.addBabelPlugins=addBabelPlugins,exports.addBabelPreset=addBabelPreset,exports.addBabelPresets=addBabelPresets,exports.addBundleVisualizer=addBundleVisualizer,exports.addDecoratorsLegacy=addDecoratorsLegacy,exports.addExternalBabelPlugin=addExternalBabelPlugin,exports.addExternalBabelPlugins=addExternalBabelPlugins,exports.addLessLoader=addLessLoader,exports.addPostcssPlugins=addPostcssPlugins,exports.addTslintLoader=addTslintLoader,exports.addWebpackAlias=addWebpackAlias,exports.addWebpackExternals=addWebpackExternals,exports.addWebpackPlugin=addWebpackPlugin,exports.addWebpackResolve=addWebpackResolve,exports.adjustWorkbox=adjustWorkbox,exports.babelInclude=babelInclude,exports.disableChunk=disableChunk,exports.disableEsLint=disableEsLint,exports.enableEslintTypescript=enableEslintTypescript,exports.fixBabelImports=fixBabelImports,exports.getBabelLoader=getBabelLoader,exports.override=override,exports.overrideDevServer=overrideDevServer,exports.removeModuleScopePlugin=removeModuleScopePlugin,exports.useBabelRc=useBabelRc,exports.useEslintRc=useEslintRc,exports.watchAll=watchAll;
  //# sourceMappingURL=index.cjs.js.map
  